Here's a simple contract:

contract C {
    event myEvent(bool x, address y);
    address someAddress;

    function someAddressExist(){
        if(someAddress != 0){
            myEvent(true, someAddress);

    function setSomeAddress(address y){
        someAddress = y;

When I try to send a transaction to any address on the test network, except 0x1, it works. What's so special about this address? Are there any other addresses like that?

3 Answers 3


Im not sure...what is your understanding of a valid address? In your example the argument you specify is a perfect valid address.

An address is just a variable that can hold a 20 byte value.

To answer the edited question of the OP I can link to this thread: Not all addresses created equal?. Basically some addresses hold some precompiled contracts so they will execute code if transactions are sent to them.

  • when I do web3.isAddress('0x1') is returns false. A bit confusing. I was thinking that maybe Solidity pads it to look like 0x10000000000000000000, but it returns 0x1 in the log. I wonder if it's possible to do something like address('0x1').send()
    – manidos
    Commented Aug 13, 2016 at 11:30
  • Strange but isAddress() is not documented in the javascript api...you can see that in the solidity documents the type of address can be of.the form you mentioned solidity.readthedocs.io/en/latest/types.html. And im still not sure what you understand by a valid address
    – dragosb
    Commented Aug 13, 2016 at 11:47
  • well, to me a valid address is a 20 bytes HEX string which I can send transactions to. If I try to send some wei from inside the contractt using address.send() to 0x1000000000000000000000000000000000000000, it works, but if try to send to 0x0000000000000000000000000000000000000001 as well as to 0x1 it doesn't work. What might be the problem here?
    – manidos
    Commented Aug 14, 2016 at 4:32
  • 1
    I think you got the answer in another thread :) If that is the case i will link that answer here
    – dragosb
    Commented Aug 14, 2016 at 17:34

Checks if a given string is a valid Ethereum address. It will also check the checksum, if the address has upper and lowercase letters.


You can also check the address on Etherscan and see if it points to anything.

Your Answer

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

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