Blockchain events

Overview: What are chain events?

Events are objects containing decoded values (data) provided by the chain in the result of any transaction triggered using the submitTxBlocking function. At least one of these two ExtrinsicSuccessEvent or ExtrinsicFailedEvent events is provided for any transaction depending on its success or failure. While submitTxBlocking provides the SDK handlers' main events list of BlockchainEvents available, we also allow you to filter this list to get the ones you need. An example to filter only the events list of a balance transfer transaction:

const balanceTransfertEvents = BlockchainEvents.findEvents(

note: BlockchainEvents is the result of the submitTxBlocking function. It can be stored in a constant for example.

To better understand Events, we already jumped a bit deeper than the first and easiest option to get the extrinsics events list. In case you do not need to manually sign or send your transaction, each of the Ternoa extrinsics features comes with two functions to execute a transaction and an easy one to directly get the required events list. See the example below : When the balancesTransferTx function creates an unsigned unsubmitted transaction hash, the balancesTransfer function signs and submits the transaction to provide the events list.

About the Event Design Format:

To make the returned events data useful, we provide both the native format and a more friendly, ready-to-use format:

  • a string as an AccountId32 corresponds to a classic user-valid address.

  • a string as u128 is a BN value as a string natively used under the hood by the chain.

  • rounded data (ex: amoutRounded) is the "human" version of data, (usually a BN) that can be directly used.

  • some events from the utility pallet do not return any data.

The events below are the Events handled in the Ternoa SDK sorted by categories

Assets events

  • AssetTransferredEvent

    • Summary: Gtoken transfer succeeded.

Auctions events

  • AuctionCreatedEvent

    • Summary: An auction has been created.

  • AuctionCancelledEvent

    • Summary: An existing auction has been canceled.

  • AuctionCompletedEvent

    • Summary: An auction has been completed.

  • BidAddedEvent

    • Summary: A bid has been added to an auction.

  • BidRemovedEvent

    • Summary: A bid has been removed from an auction.

Balances events

  • BalancesWithdrawEvent

    • Summary: Some amount was withdrawn from the account

  • BalancesDepositEvent

    • Summary: Some amount was deposited.

  • BalancesTransferEvent

    • Summary: Transfer succeeded.

  • BalancesEndowedEvent

    • Summary: An account was created with some free balance

Capsule events

  • NFTConvertedToCapsuleEvent

    • Summary: An existing NFT has been converted to a Capsule NFT

  • CapsuleOffchainDataSetEvent

    • Summary: The capsule metadata has been set or updated.

  • CapsuleKeyUpdateNotifiedEvent

    • Summary: The blockchain has been notified that the capsule owner requests new keys.

  • CapsuleRevertedEvent

    • Summary: The Capsule NFT assets have been reverted from an NFT.

Collection events

  • CollectionCreatedEvent

    • Summary: A Collection has been created.

  • CollectionLimitedEvent

    • Summary: The collection's limit has been set.

  • CollectionClosedEvent

    • Summary: A collection has been closed.

  • CollectionBurnedEvent

    • Summary: A collection has been burned.

  • CollectionOffchainDataSetEvent

    • Summary: The collection metadata has been set or updated.

Marketplace events

  • MarketplaceCreatedEvent

    • Summary: A marketplace has been created.

  • MarketplaceOwnerSetEvent

    • Summary: The marketplace owner has been set.

  • MarketplaceKindSetEvent

    • Summary: The marketplace kind has been set.

  • MarketplaceConfigSetEvent

    • Summary: The marketplace configuration has been updated. Parameters can be unchanged (Noop), Removed, or Set

  • MarketplaceMintFeeSetEvent

    • Summary: The marketplace mint fee has been set.

  • NFTListedEvent

    • Summary: An NFT has been listed for sale on a marketplace.

  • NFTUnlistedEvent

    • Summary: An NFT has been unlisted from a marketplace.

  • NFTSoldEvent

    • Summary: An NFT has sold.

NFT events

  • NFTCreatedEvent

    • Summary: An NFT has been created.

  • SecretAddedToNFTEvent

    • Summary: An NFT has been converted to a Secret NFT.

  • NFTBurnedEvent

    • Summary: An NFT has been burned.

  • NFTDelegatedEvent

    • Summary: An NFT has been delegated.

  • NFTRoyaltySetEvent

    • Summary: The NFT's royalty has been set.

  • NFTTransferredEvent

    • Summary: An NFT has been transferred.

  • NFTAddedToCollection

    • Summary: An NFT has been added to a collection.

Rent events

  • ContractCreatedEvent

    • Summary: A rental contract has been created.

  • ContractCanceledEvent

    • Summary: A rental contract has been canceled.

  • ContractStartedEvent

    • Summary: A rental contract has started.

  • ContractRevokedEvent

    • Summary: A rental contract has been revoked.

  • ContractOfferCreatedEvent

    • Summary: An offer for a rental contract has been created.

  • ContractOfferRetractedEvent

    • Summary: An offer for a rental contract has been created.

  • ContractSubscriptionTermsChangedEvent

    • Summary: The rental contract owner has requested new conditions.

  • ContractSubscriptionTermsAcceptedEvent

    • Summary: The new rental contract conditions have been accepted by the rentee.

  • ContractEndedEvent

    • Summary: The rental contract has ended.

  • ContractSubscriptionPeriodStartedEvent

    • Summary: The rental contract's new subscription period has started.

  • ContractExpiredEvent

    • Summary: The rental contract has expired.

System events

  • ExtrinsicFailedEvent

    • Summary: An extrinsic failed.

  • ExtrinsicSuccessEvent

    • Summary: An extrinsic was completed successfully.

  • NewAccountEvent

    • Summary: A new account was created.

Tee events

  • MetricsServerReportSubmittedEvent

    • Summary: The metric server has submitted a report.

  • RewardsClaimedEvent

    • Summary: The enclave owner has claimed his rewards.

Transmission protocols events

  • ProtocolSetEvent

    • Summary: A transmission protocol has been set.

  • ProtocolRemovedEvent

    • Summary: A transmission protocol has been removed.

  • TimerResetEvent

    • Summary: A transmission protocol's timer has been reset.

  • ConsentAddedEvent

    • Summary: A consent has been given to a transmission protocol.

  • ThresholdReachedEvent

    • Summary: The transmission protocol's threshold has been reached.

  • TransmittedEvent

    • Summary: The NFT has been transmitted through a transmission protocol.

Treasury events

  • TreasuryDepositEvent

    • Summary: Some funds have been deposited.

Utility events

  • ItemCompletedEvent

    • Summary: A single item within a Batch of dispatches has been completed with no error.

  • BatchInterruptedEvent

    • Summary: The batch of dispatches was not completed fully. Index of first failing dispatch given, as well as the error.

  • BatchCompletedEvent

    • Summary: Batch of dispatches completed fully with no error.

Last updated