Skip to main content

Crate nectar_contracts

Crate nectar_contracts 

Source
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).
IChequebookFactory
Chequebook factory contract interface (SimpleSwapFactory).
IERC20
Standard ERC20 token interface.
IPostageStamp
Postage stamp contract interface.
IRedistribution
Redistribution contract interface.
IStakeRegistry
Stake registry contract interface.
IStoragePriceOracle
Storage price oracle contract interface.
ISwapPriceOracle
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.
ChequebookFactory
Chequebook factory contract deployment information.
PostageStamp
Postage stamp contract deployment information.
Redistribution
Redistribution contract deployment information.
StakeRegistry
Stake registry contract deployment information.
StoragePriceOracle
Storage price oracle contract deployment information.
SwapPriceOracle
Swap price oracle contract deployment information.
Token
BZZ token deployment information.