Quick Start
Two Modes: Addressed vs Factory
Contracts can be defined with or without an address:With Address (Addressed Mode)
When you provide anaddress, you get a fully instantiated ContractInstance ready to use:
Without Address (Factory Mode)
When you omit theaddress, you get a ContractFactory with an at() method:
Mixed Mode
You can mix both patterns:Contract Instance Methods
Addressed contracts (and factory-created instances) have these methods:Type Safety
The registry is fully typed based on your ABIs:Type Helper
UseInferContractRegistry to extract types:
Layer Composition
The registry layer requiresProviderService:
Best Practices
1. Define Contracts in a Central Module
2. Use Factories for User-Provided Addresses
3. Chain-Specific Registries
See Also
- Contract Factory - Low-level Contract() factory function
- Explorer Contracts - Create contracts from address when ABI is unknown
- Block Explorer API - ABI resolution from Sourcify/Etherscan/Blockscout
- Provider Service - Required for all contract operations
- Signer Service - Required for write operations

