-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Transaction arguments parsing issue in Aptos transaction blind signing #3899
Comments
face the same issue with the same dapp, quite amazing 🤔 |
Here's another failed tx: https://explorer.aptoslabs.com/txn/0x154cea3fe33ca021694fb1b8c0ae6ef80ab3e2df761a7041124fa48fbd239dc2/payload?network=mainnet the raw payload is
after signed by trust core, argument 0 change to "0x00000000000000000000000000000000000000004d61696e204163636f756e74". Here's the success one signed by martian wallet extension: |
Hi @wayne-law, could you please advise how do you broadcast the signed transaction? We do recommend to broadcast |
Hi @satoshiotomakan, could you please find someone to address this issue? The root cause is that deserializing the EntryFunction from JSON is ambiguous, as I mentioned in the pr #4011. |
Hi @10gic, I'll review the PR today, thank you for the reminder |
@10gic @wayne-law the issues are different.
|
Update: Aptos node is able to get expected calling function argument types, and based on expected types, it parses the given JSON argument values: Unfortunately, we can't do the same in WalletCore as we don't have access to the network. However, we should probably consider taking the contract ABI as a parameter in SigningInput. @10gic @Milerius wdyt? |
Hi @satoshiotomakan, I agree with you that we should pass the ABI into the wallet core and then use that information to reconstruct the EntryFunction. |
@10gic @wayne-law I scheduled a work on adding the ABI into SigningInput, but can't say when I'll be able to do it. Unfortunately |
Please also note that an issue related to this failed transaction https://aptoscan.com/transaction/983120591#payload has been fixed by @10gic at #4011 |
Describe the bug
I'm trying to use a payloadJson to do an aptos transaction blind signing, but I found that the trust core will change the arguments's value in the encoded of output, it will cause the transaction go to fail.
here is the failed tx: https://aptoscan.com/transaction/983120591#payload
To Reproduce
here's an exmaple to do an aptos transaction blind signing: https://github.com/trustwallet/wallet-core/blob/master/android/app/src/androidTest/java/com/trustwallet/core/app/blockchains/aptos/TestAptosSigner.kt
Expected behavior
Don't change the value of argument in the transaction payload's arguments when do the signing
The text was updated successfully, but these errors were encountered: