Why contract addresses are larger than account addresses?

For example:

  • '0xb794F5eA0ba39494cE839613fffBA74279579268' - This is an account address
  • '0x756d5ef58a6617002255726a99b3b72f4c30ea25fc2be2de0c6bede5a71e4e54' - This i s a contract address

Why is this?

Also, when I need to call MyContract.at(myAddress)with web3.js I need to shorten the contract address (instead it gives you an invalid address error). Any idea on how to do it?

  • A simple logic would be ease of identification, lets wait for any technical explanations.
    – niksmac
    Jul 11, 2016 at 15:50

1 Answer 1


Sorry, my fault.

The code I posted in the contract address is the tx hash where the contract was created.

I left the answer for anyone with the same confusion for the future

  • please add some more code details, that will better explain the issue
    – Paul S
    Jul 11, 2016 at 17:33

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.