Web3 Dictionary Logo
Web3 Dictionary
Contribute

Categories

AllBlockchainDappsDAOsDeFiNFTsRegulationSecuritySmart ContractsTokenomicsWalletsWeb3 GamingOthers
  1. Web3 Dictionary
  2. Smart Contracts
  3. Event
Smart Contracts

Event

A logging mechanism that records important contract actions on the blockchain for external monitoring.

Last Updated

2026-03-19

Related Concepts

Smart ContractSolidity
Web3-Explorer Logo

Scale Blockchain Infra

AD

Smart contracts, protocol integrations, and scalable architecture for high-performance Web3 products.

See Blockchain Services

What is Event?

In smart contract development (specifically Solidity), an event is a language construct used to output data to the blockchain's logging facility. It allows developers to "broadcast" that something significant has happened within their code.

How does Event work?

  1. A developer defines an event signature at the top of their contract (e.g., event Transfer(address indexed from, address indexed to, uint value)).
  2. Inside a function, the developer uses the emit keyword to trigger the event.
  3. Up to three parameters can be marked as indexed, which allows external tools to filter for specific values (like a specific address).
  4. Once emitted, the event data is stored in the transaction's logs and cannot be accessed by smart contracts themselves.
  5. External "listeners" (using libraries like ethers.js) detect these emissions and trigger off-chain actions.

Why does Event matter?

Events are the "output" mechanism for decentralized applications. They enable the creation of responsive user interfaces and efficient data indexing.

Key features of Event

  • Defined in Solidity via the event keyword
  • Triggered using the emit statement
  • Supports up to 3 indexed parameters for filtering
  • Inaccessible to smart contracts (one-way communication)
  • Highly efficient for off-chain data retrieval

Examples of Event

The most common example is the Transfer event in the ERC-20 standard. Every time tokens move, this event is emitted, allowing wallets like MetaMask to "see" the incoming tokens and update your balance display instantly.

External References

  • Solidity Events
  • Ethereum.org: Smart Contracts