New answers tagged

0

actually there's no need to waste gas on this. address is available and can be used in constructor using address(this)


0

Updated version of @k06a's answer for Solidity version 0.6 and above: function addressFrom(address _origin, uint _nonce) public pure returns (address _address) { bytes memory data; if(_nonce == 0x00) data = abi.encodePacked(byte(0xd6), byte(0x94), _origin, byte(0x80)); else if(_nonce <= 0x7f) data = abi....


Top 50 recent answers are included