Skip to main content
The Verifier smart contract emits events to log information about every intent execution and balance change. You can use these events to track on-chain actions, build indexers, and verify intent outcomes.

Event structure

Based on NEP-297, NEAR events are prefixed with the string EVENT_JSON. The Verifier contract emits events using the DIP-4 standard, which wraps event data in a JSON object with standard, version, event, and data fields. Here is a token_diff event emitted after a successful trade:
EVENT_JSON:{
  "standard": "dip4",
  "version": "0.3.0",
  "event": "token_diff",
  "data": [
    {
      "account_id": "charlie.near",
      "intent_hash": "5GpL6PsUQVHFYAk5FWEwBUaEQqcZkc2SjTvPYHgHAnx8",
      "diff": {
        "nep141:usdc.near": "-100",
        "nep141:usdt.near": "100"
      }
    }
  ]
}
FieldDescription
standardAlways "dip4".
versionDIP-4 version (currently "0.3.0").
eventEvent name (e.g., "token_diff", "intents_executed").
dataArray of event-specific payloads.

Intent events

These events are directly related to submitted intents. See the full list of available events.
EventDescription
public_key_addedEmitted when a public key is added to an account.
public_key_removedEmitted when a public key is removed from an account.
transferEmitted when a transfer between two accounts executes.
token_diffEmitted when a token_diff intent executes successfully.
intents_executedEmitted after successfully executing the listed intents.
ft_withdrawEmitted when a fungible token withdrawal intent is made.
nft_withdrawEmitted when an NFT withdrawal intent is made.
mt_withdrawEmitted when a multi-token withdrawal intent is made.
native_withdrawEmitted when a native NEAR withdrawal intent is made.
storage_depositEmitted when a storage deposit intent is submitted.
For withdrawal events, it is often difficult to emit only on success because the outcome depends on cross-contract calls.

Multi Token events

Multi Token events indicate changes in the internal balances of the Verifier contract. See the available events.
EventDescription
mt_mintEmitted when the balance of a given account increases (due to deposits).
mt_burnEmitted when the balance of a given account decreases (due to withdrawals).
mt_transferEmitted when tokens move between accounts (after executing intents like token_diff).

Why “mint” and “burn”?

You can think of the Verifier as a set of isolated balances that can increase, decrease, or move between accounts. Although balances are conserved and simply moved between accounts, from the Verifier contract’s perspective:
  • Increasing token amounts is equivalent to minting
  • Decreasing token amounts is akin to burning
This design stems from how all tokens use the Multi Token standard for storage inside the Verifier smart contract.