We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verifyEIP6492Signature
Steps to reproduce:
@zerodev/sdk
Expected: code should compile. Observed: TypeScript error when client is an OP stack chain client.
client
Package versions:
5.3.10
viem
2.17.0
viem < 2.18.0
Triage: It appears that viem expects a generic to be used to type the PublicClient instance correctly.
PublicClient
import { verifyEIP6492Signature } from "@zerodev/sdk"; import { createPublicClient, http } from "viem"; import { arbitrum, base, mainnet, optimism } from "viem/chains"; const mainnetPublicClient = createPublicClient({ chain: mainnet, transport: http(), }); const arbPublicClient = createPublicClient({ chain: arbitrum, transport: http(), }); const optPublicClient = createPublicClient({ chain: optimism, transport: http(), }); const basePublicClient = createPublicClient({ chain: base, transport: http(), }); const SIGNATURE_PARAMS = { signer: "0x3535353535353535353535353535353535353535", hash: "0x35353535353535353535353535353535353535353535353535353535353535353535353535353535", signature: "0x35353535353535353535353535353535353535353535353535353535353535353535353535353535", } as const; void verifyEIP6492Signature({ ...SIGNATURE_PARAMS, client: mainnetPublicClient, // OK }); void verifyEIP6492Signature({ ...SIGNATURE_PARAMS, client: arbPublicClient, // OK }); void verifyEIP6492Signature({ ...SIGNATURE_PARAMS, client: optPublicClient, // ERR: not assignable to type }); void verifyEIP6492Signature({ ...SIGNATURE_PARAMS, client: basePublicClient, // ERR: not assignable to type });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Steps to reproduce:
@zerodev/sdk
(just the package, no client-side required).verifyEIP6492Signature
(example below).Expected: code should compile.
Observed: TypeScript error when
client
is an OP stack chain client.Package versions:
@zerodev/sdk
:5.3.10
viem
:2.17.0
(due to permissionless requiringviem < 2.18.0
)Triage:
It appears that
viem
expects a generic to be used to type thePublicClient
instance correctly.Repro code
The text was updated successfully, but these errors were encountered: