From 49cf3ac2996862454a6421968e46a29e0e4c21f7 Mon Sep 17 00:00:00 2001 From: Shiv Bhonde Date: Fri, 12 Apr 2024 18:25:37 +0530 Subject: [PATCH] type client from any to PublicClient --- packages/nextjs/utils/abi-ninja/proxyContracts.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/utils/abi-ninja/proxyContracts.ts b/packages/nextjs/utils/abi-ninja/proxyContracts.ts index 106523ae..6c88ed7c 100644 --- a/packages/nextjs/utils/abi-ninja/proxyContracts.ts +++ b/packages/nextjs/utils/abi-ninja/proxyContracts.ts @@ -1,3 +1,5 @@ +import { PublicClient } from "wagmi"; + const EIP_1967_LOGIC_SLOT = "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc" as const; const EIP_1967_BEACON_SLOT = "0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50" as const; // const OPEN_ZEPPELIN_IMPLEMENTATION_SLOT = "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"; @@ -10,7 +12,7 @@ const EIP_897_INTERFACE = ["0x5c60da1b000000000000000000000000000000000000000000 const GNOSIS_SAFE_PROXY_INTERFACE = ["0xa619486e00000000000000000000000000000000000000000000000000000000"] as const; const COMPTROLLER_PROXY_INTERFACE = ["0xbb82aa5e00000000000000000000000000000000000000000000000000000000"] as const; -const readAddress = (value: string): string => { +const readAddress = (value: string | undefined) => { if (typeof value !== "string" || value === "0x") { throw new Error(`Invalid address value: ${value}`); } @@ -57,7 +59,7 @@ export const parse1167Bytecode = (bytecode: unknown): string => { return `0x${addressFromBytecode.padStart(40, "0")}`; }; -export const detectProxyTarget = async (proxyAddress: string, client: any): Promise => { +export const detectProxyTarget = async (proxyAddress: string, client: PublicClient): Promise => { try { return await Promise.any([ (async () => {