Smart Contracts
Interface
A blueprint that defines function signatures and behaviors a smart contract must implement.
Last Updated
2026-03-19
Related Concepts
What is Interface?
An interface is a technical "blueprint" for a smart contract. It defines a list of functions that a contract must have (including their names, inputs, and outputs) without providing the actual code for how those functions should work.
How does Interface work?
- A developer writes an interface defining the required function "signatures."
- Other developers "implement" this interface in their own smart contracts.
- The implementing contract must include all functions defined in the interface.
- Other contracts can interact with these implementations as long as they know the interface.
- This creates a standard way for different programs to talk to each other.
Why does Interface matter?
Interfaces are the foundation of interoperability in Web3. They allow wallets, exchanges, and other dApps to interact with any new token or contract as long as it follows a recognized standard like ERC-20 or ERC-721.
Key features of Interface
- Defines function names and types
- Contains no executable logic or state
- Enables technical standardization (e.g., ERCs)
- Promotes code modularity and reuse
- Enforced by the compiler during development
Examples of Interface
The IERC20 interface is used by thousands of projects to ensure their tokens can be easily sent and received by any Ethereum-compatible wallet or exchange.
