Closed euj1n0ng closed 3 years ago
Hey, I have tried your address in unit test, and I see it is fine?
For your second question, you should put validator.IsChecksumAddress("0x60911ea27a72FD0bF474B0428665F11Ef0cd2189") and it will return true. But this should not be the blocker, as Sign
function will handle this for you:
Yes, Sign
function prefixes 0x
. But still getting the same error message - "not checksum Address or bech32".
Can you please double check your address in your go code, this is what I use your address to do the transfer:
Thanks!
To say again, I am using v1.2.0
. Do I have to update it into the latest version?
Yep, I did see the transactions. Your unit test was Okay.
Yes, I notice you are on v1.2.0 whose commit hash is 8388182. I was doing the transaction in v1.2.0 too.
Really weird. What's wrong in my side? Okay, I will check again. Thank you for your responses.
Maybe you can track the Sign
function you are actually using to see if there is anything different.
The error message is complained by it I believe.
I will close this issue after resolving it in my side. You mean validator can complain due to not only the target address but also other one. Thank you.
The problem is in keytools.GetAddressFromPublic
, which returns all-lowercased hex address.
The payload which caused the error was { ... , ToAddr: "60911ea27a72fd0bf474b0428665f11ef0cd2189", ... }
. Please note that there are no capital letters at all. I wrongly mentioned at the time of creating this ticket.
In other words, the all-lowercased wallet address isn't recognized as a valid checksum address by validator.IsChecksumAddress
.
I was able to avoid this issue by using bech32
address, instead of using checksum address.
I'd like you to handle this issue according to its significance. I haven't any objection if you close this issue at your will freely.
Thank you for your help, @renlulu
Oh yes, you are right? all lowercased address is not checksumed, i usually call it normal base16 format by the way. so basically we have 3 formats. We are encouraging to use bech32 on top of sdk.
I faced an issue to be unable to sign a transaction of sending Zil.
The error message was "not checksum Address or bech32". But the target address was a valid address. The transaction payload is as follows:
{ Version: "21823489", SenderPubKey: "0331C7A6FDA8B75D6D5041E8A21F0AC7B76732697C893726A6BF3DB71702660567", ToAddr: "60911ea27a72FD0bF474B0428665F11Ef0cd2189", Amount: "50000000000000", GasPrice: "2000000000", GasLimit: "1", Code: "", Data: "", Priority: false, }
With the same wallet address, I was able to do sending and receiving transaction by using Zilliqa JavaScript library. I am using Zilliqa Go SDK version one (v1.2.0).
Why
validator.IsChecksumAddress
returnsfalse
as for the valid address? I'd like you to correct me if I did something wrong.Or, do I have to use version 2? Thanks.