Created
December 6, 2020 10:09
-
-
Save parv3213/c90a227b46bbad633d0e833794dfeea5 to your computer and use it in GitHub Desktop.
GetPastEvents web3 event function
This file contains 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
const eventGetPastEvents = () => { | |
console.log(`Returns all the past events`); | |
contractInstance.getPastEvents("Transfer", (error, event) => { | |
if(!error) console.log(event); | |
else console.log(`Error: ${error}`); | |
}) | |
} | |
eventGetPastEvents(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment