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:
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
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
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
CollectionOffchainDataSetEvent
Summary: The collection metadata has been set or updated.
Marketplace events
NFT events
SecretAddedToNFTEvent
Summary: An NFT has been converted to a Secret NFT.
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
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
Utility events
Last updated