1

This is going to be short question and may be silly, but I'm literally stuck with a problem, where I need to pass address(0) to function in Truffle Test in JS and don't really know how to do it. In solidity it's simply address(0), but in Truffle JS?

2

You can simply use 0, or 0x0000000000000000000000000000000000000000.

address(0) in Solidity is equivalent to 0x0000000000000000000000000000000000000000.

  • 1
    I get invalid address error, with Truffle 5, Web3 1, Solidity .5 – ferit Jun 18 at 20:11

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.