We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b362c48 commit 972a727Copy full SHA for 972a727
script/checks/opcodes.ts
@@ -1,4 +1,4 @@
1
-import { type Hex, type PublicClient, toHex } from 'viem';
+import { type Hex, type PublicClient, toHex, zeroAddress } from 'viem';
2
3
type Opcode = number;
4
type CallError = { details: string };
@@ -27,7 +27,7 @@ export async function checkOpcodes(
27
28
async function checkOpcode(opcode: Opcode, client: PublicClient): Promise<boolean | 'unknown'> {
29
try {
30
- await client.call({ data: toHex(opcode, { size: 1 }) });
+ await client.call({ data: toHex(opcode, { size: 1 }), to: zeroAddress });
31
return true; // Call succeeded so opcode is supported.
32
} catch (e: unknown) {
33
const err = e as CallError;
0 commit comments