-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Invalid Warning: This looks like an address but has an invalid checksum #2092
Comments
I cannot reproduce this with latest master or browser-solidity. Which version of solidity are you using? |
solc 0.4.10 |
@ruchevits if you use literal addresses, you have to use the uppercase / lowercase encoding. This error might also come from the |
@chriseth @federicobond Sorry, my mistake, the error actually happens with: contract Users {
struct User {
address addr;
string name;
}
mapping (bytes32 => User) users;
function create(bytes32 id, string name) {
address myAddr = 0x0E5CB767CCE09A7F3CA594DF118AA519BE5E2B5A;
users[id] = User(myAddr, name);
}
} (when the address is hardcoded) If I wrap the address in double quotes, the error is:
If I try to explicitly cast literal string to address, the error is:
|
The warning asks you to add a checksum to your address: ethereum/EIPs#55 |
@chriseth Thank you! |
So how exactly did you fix this? Can you please post an example? Because I tried everything |
Just follow what the compiler suggests - it also suggests you the correctly encoded address. Note: the distinction between lower and uppercase letters matters. |
I had the same issue, but you can make it work by using For how they did it, please refer to |
I'm getting the following error trying to compile it:
It looks like an address because it is an address. And it is used as an address.
The text was updated successfully, but these errors were encountered: