feat(viem): add depositSuperchainWETH #2111
Annotations
6 errors and 3 warnings
Unhandled error:
packages/viem/src/actions/sendSupERC20.ts#L142
ContractFunctionExecutionError: The contract function "sendERC20" reverted with the following reason:
Arithmetic operation resulted in underflow or overflow.
Contract Call:
address: 0x4200000000000000000000000000000000000028
function: sendERC20(address _token, address _to, uint256 _amount, uint256 _chainId)
args: (0x4200000000000000000000000000000000000024, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 10, 902)
sender: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
Docs: https://viem.sh/docs/contract/simulateContract
Version: viem@2.17.9
❯ getContractError ../../node_modules/.pnpm/viem@2.17.9_bufferutil@4.0.8_typescript@5.4.5_utf-8-validate@6.0.3_zod@3.22.4/node_modules/viem/utils/errors/getContractError.ts:72:10
❯ Module.simulateContract ../../node_modules/.pnpm/viem@2.17.9_bufferutil@4.0.8_typescript@5.4.5_utf-8-validate@6.0.3_zod@3.22.4/node_modules/viem/actions/public/simulateContract.ts:272:11
❯ Module.simulateSendSupERC20 src/actions/sendSupERC20.ts:142:15
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { details: undefined, docsPath: '/docs/contract/simulateContract', metaMessages: [ 'Contract Call:', ' address: 0x4200000000000000000000000000000000000028\n function: sendERC20(address _token, address _to, uint256 _amount, uint256 _chainId)\n args: (0x4200000000000000000000000000000000000024, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 10, 902)\n sender: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266' ], shortMessage: 'The contract function "sendERC20" reverted with the following reason:\nArithmetic operation resulted in underflow or overflow.', version: 'viem@2.17.9', abi: [ { type: 'function', name: 'relayERC20', inputs: [ { name: '_token', type: 'address', internalType: 'address' }, { name: '_from', type: 'address', internalType: 'address' }, { name: '_to', type: 'address', internalType: 'address' }, { name: '_amount', type: 'uint256', internalType: 'uint256' } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'sendERC20', inputs: [ { name: '_token', type: 'address', internalType: 'address' }, { name: '_to', type: 'address', internalType: 'address' }, { name: '_amount', type: 'uint256', internalType: 'uint256' }, { name: '_chainId', type: 'uint256', internalType: 'uint256' } ], outputs: [ { name: 'msgHash_', type: 'bytes32', internalType: 'bytes32' } ], stateMutability: 'nonpayable' }, { type: 'function', name: 'version', inputs: [], outputs: [ { name: '', type: 'string', internalType: 'string' } ], stateMutability: 'view' }, { type: 'event', name: 'RelayERC20', inputs: [ { name: 'token', type: 'address', indexed: true, internalType: 'address' }, { name: 'from', type: 'address', indexed: true, internalType: 'address' }, { name: 'to', type: 'address', indexed: true, internalType: 'address' }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256' }, { name: 'source', type: 'uint256', indexed: false, internalType: 'uint256' } ], anonymous: false }, { type: 'event', name: 'SendERC20', inputs: [ { name: 'token', type: 'address', indexed: true, internalType: 'address' }, { name: 'from', type: 'address', indexed: true, internalType: 'address' }, { name: 'to', type: 'address', indexed: true, internalType: 'address' }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256' }, { name: 'destination', type: 'uint256', indexed: false, internalType: 'uint256' } ], anonymous: false }, { type: 'error', name: 'InvalidCrossDomainSender', inputs: [] }, { type: 'error', name: 'Unauthorized', inputs: [] }, { type: 'error', name: 'ZeroAddress', inputs: [] } ], args: [ '0x4200000000000000000000000000000000000024', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', 10n, 902n ], contractAddress: '0x4200000000000000000000000000000000000028', formattedArgs: undefined, functionName: 'sendERC20', sender: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', walk: 'Function<walk>' }
This error originated in "src/actions/sendSuperchainWETH.spec.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running
|
src/actions/depositSuperchainWETH.spec.ts > depositSuperchainWETH > write contract > should return expected request:
packages/viem/src/actions/depositSuperchainWETH.spec.ts#L32
AssertionError: expected 0n to deeply equal 10n
- Expected
+ Received
- 10n
+ 0n
❯ src/actions/depositSuperchainWETH.spec.ts:32:29
|
src/actions/sendSuperchainWETH.spec.ts > sendSuperchainWETH > write contract > should return expected request:
packages/viem/src/core/baseWriteAction.ts#L89
ContractFunctionExecutionError: The contract function "sendERC20" reverted with the following reason:
Arithmetic operation resulted in underflow or overflow.
Contract Call:
address: 0x4200000000000000000000000000000000000028
function: sendERC20(address _token, address _to, uint256 _amount, uint256 _chainId)
args: (0x4200000000000000000000000000000000000024, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 10, 902)
Docs: https://viem.sh/docs/contract/estimateContractGas
Version: viem@2.17.9
❯ getContractError ../../node_modules/.pnpm/viem@2.17.9_bufferutil@4.0.8_typescript@5.4.5_utf-8-validate@6.0.3_zod@3.22.4/node_modules/viem/utils/errors/getContractError.ts:72:10
❯ Module.estimateContractGas ../../node_modules/.pnpm/viem@2.17.9_bufferutil@4.0.8_typescript@5.4.5_utf-8-validate@6.0.3_zod@3.22.4/node_modules/viem/actions/public/estimateContractGas.ts:125:11
❯ Module.baseWriteAction src/core/baseWriteAction.ts:89:9
❯ src/actions/sendSuperchainWETH.spec.ts:33:20
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { details: undefined, docsPath: '/docs/contract/estimateContractGas', metaMessages: [ 'Contract Call:', ' address: 0x4200000000000000000000000000000000000028\n function: sendERC20(address _token, address _to, uint256 _amount, uint256 _chainId)\n args: (0x4200000000000000000000000000000000000024, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 10, 902)' ], shortMessage: 'The contract function "sendERC20" reverted with the following reason:\nArithmetic operation resulted in underflow or overflow.', version: 'viem@2.17.9', abi: [ { type: 'function', name: 'relayERC20', inputs: [ { name: '_token', type: 'address', internalType: 'address' }, { name: '_from', type: 'address', internalType: 'address' }, { name: '_to', type: 'address', internalType: 'address' }, { name: '_amount', type: 'uint256', internalType: 'uint256' } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'sendERC20', inputs: [ { name: '_token', type: 'address', internalType: 'address' }, { name: '_to', type: 'address', internalType: 'address' }, { name: '_amount', type: 'uint256', internalType: 'uint256' }, { name: '_chainId', type: 'uint256', internalType: 'uint256' } ], outputs: [ { name: 'msgHash_', type: 'bytes32', internalType: 'bytes32' } ], stateMutability: 'nonpayable' }, { type: 'function', name: 'version', inputs: [], outputs: [ { name: '', type: 'string', internalType: 'string' } ], stateMutability: 'view' }, { type: 'event', name: 'RelayERC20', inputs: [ { name: 'token', type: 'address', indexed: true, internalType: 'address' }, { name: 'from', type: 'address', indexed: true, internalType: 'address' }, { name: 'to', type: 'address', indexed: true, internalType: 'address' }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256' }, { name: 'source', type: 'uint256', indexed: false, internalType: 'uint256' } ], anonymous: false }, { type: 'event', name: 'SendERC20', inputs: [ { name: 'token', type: 'address', indexed: true, internalType: 'address' }, { name: 'from', type: 'address', indexed: true, internalType: 'address' }, { name: 'to', type: 'address', indexed: true, internalType: 'address' }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256' }, { name: 'destination', type: 'uint256', indexed: false, internalType: 'uint256' } ], anonymous: false }, { type: 'error', name: 'InvalidCrossDomainSender', inputs: [] }, { type: 'error', name: 'Unauthorized', inputs: [] }, { type: 'error', name: 'ZeroAddress', inputs: [] } ], args: [ '0x4200000000000000000000000000000000000024', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', 10n, 902n ], contractAddress: '0x4200000000000000000000000000000000000028', formattedArgs: undefined, functionName: 'sendERC20', sender: undefined, walk: 'Function<walk>' }
Caused by: Caused by: ContractFunctionRevertedError: The contract function "sendERC20" reverted with the following reason:
Arithmetic operation resulted in underflow or overflow.
Version: viem@2.17.9
❯ ../../node_modules/.pnpm/viem@2.17.9_bufferutil@4.0.8
|
src/actions/sendSuperchainWETH.spec.ts > sendSuperchainWETH > estimate gas > should estimate gas:
packages/viem/src/actions/sendSuperchainWETH.spec.ts#L60
ContractFunctionExecutionError: The contract function "sendERC20" reverted with the following reason:
Arithmetic operation resulted in underflow or overflow.
Contract Call:
address: 0x4200000000000000000000000000000000000028
function: sendERC20(address _token, address _to, uint256 _amount, uint256 _chainId)
args: (0x4200000000000000000000000000000000000024, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 10, 902)
sender: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
Docs: https://viem.sh/docs/contract/estimateContractGas
Version: viem@2.17.9
❯ getContractError ../../node_modules/.pnpm/viem@2.17.9_bufferutil@4.0.8_typescript@5.4.5_utf-8-validate@6.0.3_zod@3.22.4/node_modules/viem/utils/errors/getContractError.ts:72:10
❯ Module.estimateContractGas ../../node_modules/.pnpm/viem@2.17.9_bufferutil@4.0.8_typescript@5.4.5_utf-8-validate@6.0.3_zod@3.22.4/node_modules/viem/actions/public/estimateContractGas.ts:125:11
❯ src/actions/sendSuperchainWETH.spec.ts:60:19
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { details: undefined, docsPath: '/docs/contract/estimateContractGas', metaMessages: [ 'Contract Call:', ' address: 0x4200000000000000000000000000000000000028\n function: sendERC20(address _token, address _to, uint256 _amount, uint256 _chainId)\n args: (0x4200000000000000000000000000000000000024, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 10, 902)\n sender: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266' ], shortMessage: 'The contract function "sendERC20" reverted with the following reason:\nArithmetic operation resulted in underflow or overflow.', version: 'viem@2.17.9', abi: [ { type: 'function', name: 'relayERC20', inputs: [ { name: '_token', type: 'address', internalType: 'address' }, { name: '_from', type: 'address', internalType: 'address' }, { name: '_to', type: 'address', internalType: 'address' }, { name: '_amount', type: 'uint256', internalType: 'uint256' } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'sendERC20', inputs: [ { name: '_token', type: 'address', internalType: 'address' }, { name: '_to', type: 'address', internalType: 'address' }, { name: '_amount', type: 'uint256', internalType: 'uint256' }, { name: '_chainId', type: 'uint256', internalType: 'uint256' } ], outputs: [ { name: 'msgHash_', type: 'bytes32', internalType: 'bytes32' } ], stateMutability: 'nonpayable' }, { type: 'function', name: 'version', inputs: [], outputs: [ { name: '', type: 'string', internalType: 'string' } ], stateMutability: 'view' }, { type: 'event', name: 'RelayERC20', inputs: [ { name: 'token', type: 'address', indexed: true, internalType: 'address' }, { name: 'from', type: 'address', indexed: true, internalType: 'address' }, { name: 'to', type: 'address', indexed: true, internalType: 'address' }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256' }, { name: 'source', type: 'uint256', indexed: false, internalType: 'uint256' } ], anonymous: false }, { type: 'event', name: 'SendERC20', inputs: [ { name: 'token', type: 'address', indexed: true, internalType: 'address' }, { name: 'from', type: 'address', indexed: true, internalType: 'address' }, { name: 'to', type: 'address', indexed: true, internalType: 'address' }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256' }, { name: 'destination', type: 'uint256', indexed: false, internalType: 'uint256' } ], anonymous: false }, { type: 'error', name: 'InvalidCrossDomainSender', inputs: [] }, { type: 'error', name: 'Unauthorized', inputs: [] }, { type: 'error', name: 'ZeroAddress', inputs: [] } ], args: [ '0x4200000000000000000000000000000000000024', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', 10n, 902n ], contractAddress: '0x4200000000000000000000000000000000000028', formattedArgs: undefined, functionName: 'sendERC20', sender: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', walk: 'Function<walk>' }
Caused by: ContractFunctionRevertedError: The contract function "sendERC20" reverted with the following reason:
Arithmetic operation resulted in underflow or overflow.
|
src/test/e2e/interop.spec.ts > SuperchainWETH Flow > should send SuperchainWETH and relay cross chain message to burn/mint tokens:
packages/viem/src/core/baseWriteAction.ts#L89
ContractFunctionExecutionError: The contract function "sendERC20" reverted with the following reason:
Arithmetic operation resulted in underflow or overflow.
Contract Call:
address: 0x4200000000000000000000000000000000000028
function: sendERC20(address _token, address _to, uint256 _amount, uint256 _chainId)
args: (0x4200000000000000000000000000000000000024, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 10, 902)
Docs: https://viem.sh/docs/contract/estimateContractGas
Version: viem@2.17.9
❯ getContractError ../../node_modules/.pnpm/viem@2.17.9_bufferutil@4.0.8_typescript@5.4.5_utf-8-validate@6.0.3_zod@3.22.4/node_modules/viem/utils/errors/getContractError.ts:72:10
❯ Module.estimateContractGas ../../node_modules/.pnpm/viem@2.17.9_bufferutil@4.0.8_typescript@5.4.5_utf-8-validate@6.0.3_zod@3.22.4/node_modules/viem/actions/public/estimateContractGas.ts:125:11
❯ Module.baseWriteAction src/core/baseWriteAction.ts:89:9
❯ src/test/e2e/interop.spec.ts:145:18
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { details: undefined, docsPath: '/docs/contract/estimateContractGas', metaMessages: [ 'Contract Call:', ' address: 0x4200000000000000000000000000000000000028\n function: sendERC20(address _token, address _to, uint256 _amount, uint256 _chainId)\n args: (0x4200000000000000000000000000000000000024, 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, 10, 902)' ], shortMessage: 'The contract function "sendERC20" reverted with the following reason:\nArithmetic operation resulted in underflow or overflow.', version: 'viem@2.17.9', abi: [ { type: 'function', name: 'relayERC20', inputs: [ { name: '_token', type: 'address', internalType: 'address' }, { name: '_from', type: 'address', internalType: 'address' }, { name: '_to', type: 'address', internalType: 'address' }, { name: '_amount', type: 'uint256', internalType: 'uint256' } ], outputs: [], stateMutability: 'nonpayable' }, { type: 'function', name: 'sendERC20', inputs: [ { name: '_token', type: 'address', internalType: 'address' }, { name: '_to', type: 'address', internalType: 'address' }, { name: '_amount', type: 'uint256', internalType: 'uint256' }, { name: '_chainId', type: 'uint256', internalType: 'uint256' } ], outputs: [ { name: 'msgHash_', type: 'bytes32', internalType: 'bytes32' } ], stateMutability: 'nonpayable' }, { type: 'function', name: 'version', inputs: [], outputs: [ { name: '', type: 'string', internalType: 'string' } ], stateMutability: 'view' }, { type: 'event', name: 'RelayERC20', inputs: [ { name: 'token', type: 'address', indexed: true, internalType: 'address' }, { name: 'from', type: 'address', indexed: true, internalType: 'address' }, { name: 'to', type: 'address', indexed: true, internalType: 'address' }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256' }, { name: 'source', type: 'uint256', indexed: false, internalType: 'uint256' } ], anonymous: false }, { type: 'event', name: 'SendERC20', inputs: [ { name: 'token', type: 'address', indexed: true, internalType: 'address' }, { name: 'from', type: 'address', indexed: true, internalType: 'address' }, { name: 'to', type: 'address', indexed: true, internalType: 'address' }, { name: 'amount', type: 'uint256', indexed: false, internalType: 'uint256' }, { name: 'destination', type: 'uint256', indexed: false, internalType: 'uint256' } ], anonymous: false }, { type: 'error', name: 'InvalidCrossDomainSender', inputs: [] }, { type: 'error', name: 'Unauthorized', inputs: [] }, { type: 'error', name: 'ZeroAddress', inputs: [] } ], args: [ '0x4200000000000000000000000000000000000024', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', 10n, 902n ], contractAddress: '0x4200000000000000000000000000000000000028', formattedArgs: undefined, functionName: 'sendERC20', sender: undefined, walk: 'Function<walk>' }
Caused by: ContractFunctionRevertedError: The contract function "sendERC20" reverted with the following reason:
Arithmetic operation resulted in underflow or overflow.
Version: viem@2.17.9
❯ ../../node_modules/.pnpm/viem@2.17.9_bufferutil@4.0.8_typescript@5.4.5_ut
|
test
Process completed with exit code 1.
|
typecheck
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, pnpm/action-setup@v2, actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
lint
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, pnpm/action-setup@v2, actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
test
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, pnpm/action-setup@v2, actions/setup-node@v3, jaxxstorm/action-install-gh-release@v1.10.0. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|