5

I have the following contract:

pragma solidity ^0.4.13;


contract Test {

    function test() public payable {
        address(0xCF5609B003B2776699EEA1233F7C82D5695CC9AA).call(1);
    }
}

The Remix static code analysis tool gives me a warning:

Warning: This looks like an address but has an invalid checksum.

How do I fix it?

7

Here is how the address with the valid checksum should look like: 0xCf5609B003B2776699eEA1233F7C82D5695cC9AA (note the different case of letters).

Here is the specification of the checksum: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md

To fix the checksum use this method web3.utils.toChecksumAddress().

Alternatively put your address to the url for etherscan like this https://etherscan.io/address/0xCF5609B003B2776699EEA1233F7C82D5695CC9AA then copy the address with valid checksum on the loaded page.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.