Skip to main content

Contract Events

You can listen to events that are emitted by a contract.

This is useful when you want real-time updates of events happening on the blockchain.

The names of the events are the same as the events emitted from the smart contract.

For pre-built contracts, you can inspect the source code to see the events that are emitted in each function call.

Below are some examples:

Event NameDescriptionSource Code
TokensClaimedToken claimed by a wallet from a Drop contractSmart Contract Code
TokensMintedToken minted by a wallet into a NFT / Token contractSmart Contract Code
ListingAddedNew listing created in a marketplace contractSmart Contract Code

Listen to All Events

Listen to all events emitted by the contract. => {
console.log(event.eventName) // the name of the emitted event
console.log( // event payload

Listen to a Specific Event

Listen to all occurrences of a specific event."TokensMinted", (event) => {

Listen to Transactions

Listen to all transactions in their raw form. => {

Remove All Listeners;

Remove an Event Listener"TokensMinted", (event) => {

Remove a Transaction Listener => {