I need to access the data from topic 2 below (see image):

transaction log

With this code I can render the topic hash, but not the topic data:

  .getPastEvents('allEvents', {
    fromBlock: START_BLOCK,
    toBlock: END_BLOCK, // You can also specify 'latest'
  // .then((events) => console.log(events))
  .then((events) => alert(JSON.stringify(events[0].raw.topics[2])))
  .catch((err) => console.error(err));

Do you know how to render it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.