Created
March 14, 2019 18:31
-
-
Save miguelmota/c7e057eafaea27a07917afcfa6d7e853 to your computer and use it in GitHub Desktop.
Web3.js Solidity SHA3 (keccak256) Solidity equivalent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // in web3 | |
| web3.utils.keccak256(web3.eth.abi.encodeParameters(['string', 'address'], ['foo', '0x4ccA5F2f01746B1c13ca7a3Dab0462d225795D3A'])) | |
| // in solidity | |
| keccak256(abi.encode("foo", 0x4ccA5F2f01746B1c13ca7a3Dab0462d225795D3A)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment