EthereumAbi.encode not working properly #3555
-
Describe the bug When I use This was a part of a bigger project and I was having this issue so I tested this in an empty project as well. The version I am on is One more thing I would like to point out is when using the latest version |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @MhAhmadAli, I checked the example you sent me, and the values at screenshot doesn't match the result you've sent. Please make sure if you use the API in a correct way. We have multiple examples in Kotlin here: link Last, consider using the new API: link |
Beta Was this translation helpful? Give feedback.
-
Fixed the issues for me. Thanks for the help. |
Beta Was this translation helpful? Give feedback.
Hi @MhAhmadAli, I checked the example you sent me, and the values at screenshot doesn't match the result you've sent.
First of all, the
0xa5f7c148
prefix can be if the function has the following type:transfer(address, int)
. But if the function type istransfer(address, uint)
, the prefix will be0xa9059cbb
as you expect.Secondly, the amount on the screenshot should be 100000000 to get 0x05f5e100, but it's 1000 times less.
Please make sure if you use the API in a correct way. We have multiple examples in Kotlin here: link
Last, consider using the new API: link