-
Notifications
You must be signed in to change notification settings - Fork 11
Fail to sign transaction. Error: could not decode result data (value="0x", info={ "method": "readNonce", "signature": "readNonce(uint256)" }, code=BAD_DATA, version=6.13.5) #457
New issue
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
Comments
Hi BestStream, we've begun early analysis of this, could we check a few things, firstly is this TransactionRequest being sent via the Unity SDK , if so which version of the Unity SDK are you on? We also checked that contract is "Life Coin (LFC)" on Immutable ZkEVM testnet, and you have correctly set value as 0x0, as we do not support payable transactions. The issue seems to be related to the data payload, could you share more on what the transaction purpose is, in many cases the contract will need to be pre-approved via this process first, https://docs.immutable.com/guides/zkevm/game-currencies/pre-approved-transactions/ could you indicate if you've done so? I would also like to further inspect the payload, could you share the breakdown of it, I noticed you are calling the transfer function(0xa9059cbb), but would also like to check what params filled in etc, and how it was generated, the issue likely lies in mis-constructed payload or not yet approved transaction, as all transactions in game/unity has to be pre-approved As a sanity check, do also update to the latest version of the SDK that you are using as we had earlier resolved an issue in the SDK that may cause this error |
![]() Do also recommend trying to build the payload here https://passport.immutable.com/sdk-sample-app and compare it, you can also try to perform the transaction in that sample web app first to validate that the payload is correct, and remember to update your SDK version to the latest, please let us know if this helps to resolve the issue, our teams will look into it further if not yet resolved, early next week! |
I'm just trying to test if our token transfer works via your wallet. As I mentioned, the same transaction works via MetaMask. I expect that work via your wallet will be similar to work via MetaMask as a generally accepted standard. I prepare the transaction exactly the same way as I do it for MetaMask (and any other web3 evm compatible wallet). If some pre-approval actions is required - I expect to see the corresponding error text, so as not to guess about the causes of the problem. And yes, I use the current version of Unity and Immutable SDK |
So, I have read your documentation about pre-approved transactions. As I understand it, this is a mechanism that allows transactions to be sent without asking for the user’s permission each time. It looks like this is an optional mechanism — if I’m fine with asking the user for permission every time a transaction is sent, I can simply ignore it. If I understood correctly, then how is this related to my issue? |
"I would also like to further inspect the payload, could you share the breakdown of it, I noticed you are calling the transfer function(0xa9059cbb)" - That's right, this is a standart ERC20 token transfer function. The data is generated by the Nethereum plugin (works for MetaMask) |
First of all, I am frustrated by the error text "readNonce". What does it mean? How does it relate to the action I am about to take? It looks like your wallet wants to read the nonce for some reason and can’t do it. |
I was informed that pre-approval is not optional, but a mandatory feature. So I added contracts to the Hub. However, it did not help. I tested it on the production environment, and the transactions were signed successfully! So the mystery is solved!
|
Hi @BestStream , Good to hear that it's working on production for you.
|
@nattb8 "This is documented in the prerequisites list here..." - I haven't seen this part of the documentation, I saw the description of the method here and there are no prerequisites https://docs.immutable.com/sdks/zkEVM/unity/sdk-reference#zkevmsendtransaction (anyway, as I found out, my bug is not related to prerequisites) |
In any case, it's terribly frustrating when you can send a transaction through MetaMask, which everyone uses, but you can't through your wallet. Moreover, now thanks to the link you shared I saw that there is a group of transactions that are completely impossible to send - it's just terrible! |
Hey @BestStream, I was able to reproduce the issue, and it seems to only affect newly created wallets. We've addressed this in TypeScript SDK v2.2.0, which is included in the latest Unity SDK release. Could you please try updating to Unity SDK v1.33.1 and let us know if the issue persists? |
@nattb8 We have updated to v1.33.1 and I can confirm that the error no longer occurs. Thank you! |
I create such a request:
Then call await _passport.ZkEvmSendTransaction(request)
And get this error
could not decode result data (value="0x", info={ "method": "readNonce", "signature": "readNonce(uint256)" }, code=BAD_DATA, version=6.13.5)
If I send the same transaction via MetaMask everything works
The text was updated successfully, but these errors were encountered: