Looks like a bug in simulateContract.js #2339
Replies: 1 comment
-
Update on this issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I observe strange behavior in the simulateContract code.
I develop the application based on nextJS. Configuration from package.json:
Next, the code that calls the smart contract (USDT smart-contract).
The goal is to get approval to transfer from one wallet to another and make this transfer.
console.log('approve txn_id = ' + txnId as string);
App behavior on the Polygon network:
Metamask confirmation window appears and the expected entry is printed in the browser console:
approve txn_id = 0x4957fa50af02b0aa3df9d2b18fcd5d9f5784bf6257392a7ec1cbab5a3a78adf0
App behavior on the Arbitrum network:
on the Arbitrum network the Metamask window does not open, and in the browser console there is an entry:
TypeError: Cannot use 'in' operator to search for 'data' in 1103
at eval (getContractError.js:18:40)
at walk (base.js:78:13)
at walk (base.js:81:16)
at walk (base.js:81:16)
at CallExecutionError.walk (base.js:74:16)
at getContractError (getContractError.js:18:19)
at simulateContract (simulateContract.js:83:98)
at async simulateContract (simulateContract.js:30:33)
at async writeContract (writeContract.js:32:46)
Judging by the stack trace, the error occurs in the simulateContract code (simulateContract.js:83:98)
Here is the viem library code which is available in debug mode:
Question.
Why does this the same viem code run without errors on the Polygon network, but crash on the Arbitrum network?
Beta Was this translation helpful? Give feedback.
All reactions