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 ...


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