Crate superchain_primitives
source ·Expand description
§superchain-primitives
A set of Superchain Primitive Types.
§Usage
Add this to your Cargo.toml:
[dependencies]
superchain-primitives = "0.1.0"
§Example
use alloy_primitives::b256;
use superchain_primitives::BlockID;
let block_id = BlockID {
hash: b256!("0000000000000000000000000000000000000000000000000000000000000000"),
number: 0u64,
};
println!("Block ID: {block_id}");§Feature Flags
serde: Implements serialization and deserialization for types.std: Uses standard library types.
Re-exports§
pub use predeploys::BASE_FEE_VAULT;pub use predeploys::BEACON_BLOCK_ROOT;pub use predeploys::EAS;pub use predeploys::GAS_PRICE_ORACLE;pub use predeploys::GOVERNANCE_TOKEN;pub use predeploys::L1_BLOCK;pub use predeploys::L1_BLOCK_NUMBER;pub use predeploys::L1_FEE_VAULT;pub use predeploys::L2_CROSS_DOMAIN_MESSENGER;pub use predeploys::L2_ERC721_BRIDGE;pub use predeploys::L2_STANDARD_BRIDGE;pub use predeploys::L2_TO_L1_MESSAGE_PASSER;pub use predeploys::OPTIMISM_MINTABLE_ERC20_FACTORY;pub use predeploys::OPTIMISM_MINTABLE_ERC721_FACTORY;pub use predeploys::PROXY_ADMIN;pub use predeploys::SCHEMA_REGISTRY;pub use predeploys::SEQUENCER_FEE_VAULT;pub use predeploys::WETH9;
Modules§
- Contains all predeploy contract addresses.
Structs§
- The set of network-specific contracts for a given chain.
- Block identifier.
- A chain configuration.
- Chain genesis information.
- Contract Implementations.
- Re-export the Genesis type from alloy_genesis. The genesis block specification.
- Hardfork configuration.
- Plasma configuration.
- The Rollup configuration.
- A superchain configuration.
- A superchain configuration file format
- Superchain L1 anchor information
- System configuration.
Enums§
- Level of integration with the superchain.
Constants§
- The RollupConfig for Base Mainnet.
- Get the base fee parameters for Base Sepolia.
- Get the base fee parameters for Base Sepolia (post Canyon).
- The RollupConfig for Base Sepolia.
- Base fee max change denominator for Base Sepolia as defined in the Optimism transaction costs doc.
- Get the base fee parameters for Optimism Mainnet.
- Get the base fee parameters for Optimism Mainnet (post Canyon).
- The RollupConfig for OP Mainnet.
- Get the base fee parameters for Optimism Sepolia.
- Get the base fee parameters for Optimism Sepolia (post Canyon).
- The RollupConfig for OP Sepolia.
- Base fee max change denominator for Optimism Sepolia as defined in the Optimism Canyon hardfork.
- Base fee max change denominator for Optimism Sepolia as defined in the Optimism transaction costs doc.
- Base fee max change denominator for Optimism Sepolia as defined in the Optimism transaction costs doc.
Functions§
- Validates if a file is a configuration file.
Type Aliases§
- A set of addresses for a given contract. The key is the semver version.
- Map of chain IDs to their address lists.
- Map of chain IDs to their chain’s genesis system configurations.
- Map of superchain names to their implementation contract semvers.
- Map of OPChain IDs to their ChainConfig.
- Map of superchain names to their configurations.