Expand description
Swarm contract bindings and deployment information.
This crate provides type-safe Solidity contract bindings using Alloy’s sol! macro,
along with deployment information for mainnet and testnet.
§Deployment Information
Each contract has a deployment struct that bundles address and deployment block:
use nectar_contracts::mainnet;
let postage = mainnet::POSTAGE_STAMP;
assert_ne!(postage.address, alloy_primitives::Address::ZERO);
assert!(postage.block > 0);§Contract Bindings
The sol! macro generates call types, return types, and event types that can be
used with alloy providers:
ⓘ
use alloy_sol_types::SolCall;
use nectar_contracts::{IPostageStamp, mainnet};
// Encode a call
let call = IPostageStamp::batchOwnerCall { batchId: batch_id };
let encoded = call.abi_encode();Modules§
- IChequebook
- Chequebook contract interface (ERC20SimpleSwap).
- IChequebook
Factory - Chequebook factory contract interface (SimpleSwapFactory).
- IERC20
- Standard ERC20 token interface.
- IPostage
Stamp - Postage stamp contract interface.
- IRedistribution
- Redistribution contract interface.
- IStake
Registry - Stake registry contract interface.
- IStorage
Price Oracle - Storage price oracle contract interface.
- ISwap
Price Oracle - Swap price oracle contract interface.
- mainnet
- Gnosis Chain mainnet contract deployments.
- testnet
- Sepolia testnet contract deployments.
Structs§
- Cheque
- EIP-712 cheque struct for chequebook payments.
- Chequebook
Factory - Chequebook factory contract deployment information.
- Postage
Stamp - Postage stamp contract deployment information.
- Redistribution
- Redistribution contract deployment information.
- Stake
Registry - Stake registry contract deployment information.
- Storage
Price Oracle - Storage price oracle contract deployment information.
- Swap
Price Oracle - Swap price oracle contract deployment information.
- Token
- BZZ token deployment information.