10

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?

1 Answer 1

15

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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