Hot answers tagged

1

If you are using web3, you can encode it with: web3.eth.abi.encodeParamter('string', <lorem_ipsum_text>) You can then decode the output with the following: web3.eth.abi.decodeParamter('string', <lorem_ipsum_encoded_string>) Encoding is based on the Contract ABI Specification. It is hard to get through, but these docs have all the answers to ...


1

From the details that you've posted, I believe that the address parameter in your event is indexed. Therefore, it is not going to be provided in the data string, but in the topics array at the 2nd entry (i.e., topics[1]). If you want the actual address, then you can do: const address = "0x" + topics[1].slice(26); // get rid of 24 leading zeros Since the ...


1

Is there any difference if I compile everytime I want to deploy another multisig wallet. No, provided you haven't changed anything in the contract. In case if you haven't changed anything in the contract and try compiling it again, truffle returns the below result > truffle compile Compiling your contracts... =========================== > Everything ...


1

Basically, a tuple is encoded as if all its members were separate parameters, so the following function returns true: struct Foo { uint x; uint y; uint z; } function foo () public pure returns (bool) { return keccak256 (abi.encode (1, 2, 3)) == keccak256 (abi.encode (Foo (1, 2, 3))); }


Only top voted, non community-wiki answers of a minimum length are eligible