Open kombos opened 1 year ago
Can you console log the unstakeTokenTxn
just before doing multiCallDataBytesArray
? Also, is unstakeTokenTxn
assigned elsewhere? It seems like it is JSON stringified and parsed again.
Can you console log the
unstakeTokenTxn
just before doingmultiCallDataBytesArray
? Also, isunstakeTokenTxn
assigned elsewhere? It seems like it is JSON stringified and parsed again.
Hi, please find the console logs below. also both these variables are not assigned or modfied elsewhere:
unstakeTokenTxn: 0xf549ab420000000000000000000000002c4f1df9c7de0c59778936c9b145ff56813f3295000000000000000000000000f5b8304dc18579c4247caad705df01928248bc710000000000000000000000000000000000000000000000000000000063e65c1d0000000000000000000000000000000000000000000000000000000063e8ff1d0000000000000000000000000ad4de31fc1e1e01eaaf815da18690441190f7ed000000000000000000000000000000000000000000000000000000000006a747
withdrawTokenTxn: 0x3c423f0b000000000000000000000000000000000000000000000000000000000006a7470000000000000000000000009709f170c885cc844d6b30691b63686502bbda3600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
These values should work. At what point are you getting the error? Is it around multiCallDataBytesArray or the next lines? Can you add logs for multiCallDataBytesArray, config, and writeAsync.
These values should work. At what point are you getting the error? Is it around multiCallDataBytesArray or the next lines? Can you add logs for multiCallDataBytesArray, config, and writeAsync.
I'm getting this error in usePrepareContractWrite
, in which there is an 'onError' clause, which is getting triggered. But if we continue with sending the transaction, then the txn goes through and the 'onError' of useContractWrite
doesnt get triggered. Also the multicall successfully executes. also here are the logs (lemme know if you need a more clearer log values) :
If usePrepareContractWrite
is imported from a library, you may create an issue on that repo since the problem seems to be in there. Otherwise, feel free to share the source code here.
Interestingly, it successfully gave encoded data in config.request.data
regardless of the encoding error. It should not call onError
if it's successful and if it's really not successful then maybe null/undefined can be returned instead of an incomplete config object.
If
usePrepareContractWrite
is imported from a library, you may create an issue on that repo since the problem seems to be in there. Otherwise, feel free to share the source code here.Interestingly, it successfully gave encoded data in
config.request.data
regardless of the encoding error. It should not callonError
if it's successful and if it's really not successful then maybe null/undefined can be returned instead of an incomplete config object.
the usePrepareContractWrite
is from a library called wagmi hooks (https://wagmi.sh/). but it internally uses ethers.js library for communicating with blockchain. Had approached the wagmi team but they had mentioned to create a github issue here since this pertains to ethers.
Describe the Feature
I'm trying to create a write transaction with these value:
its throwing this error in prepare phase, but if we ignore and finish the transaction, it is going through successfully:
Code Example
No response