Expand description
§op-alloy-protocol
Core protocol types for Optimism.
These include types, constants, and methods for derivation as well as batch-submission.
§Provenance
This code was initially ported from kona-primitives as part of ongoing op-alloy migrations.
Re-exports§
pub use deposits::decode_deposit;
pub use deposits::DepositError;
pub use deposits::DepositSourceDomain;
pub use deposits::DepositSourceDomainIdentifier;
pub use deposits::L1InfoDepositSource;
pub use deposits::UpgradeDepositSource;
pub use deposits::UserDepositSource;
pub use deposits::DEPOSIT_EVENT_ABI_HASH;
pub use block_info::L1BlockInfoBedrock;
pub use block_info::L1BlockInfoEcotone;
pub use block_info::L1BlockInfoTx;
pub use fee::calculate_tx_l1_cost_bedrock;
pub use fee::calculate_tx_l1_cost_ecotone;
pub use fee::calculate_tx_l1_cost_fjord;
pub use fee::calculate_tx_l1_cost_regolith;
pub use fee::data_gas_bedrock;
pub use fee::data_gas_fjord;
pub use fee::data_gas_regolith;
Modules§
- batch_
tx 🔒Transaction Types - block 🔒Block Types for Optimism.
- This module contains the L1BlockInfoTx type, and various encoding / decoding methods for it.
- channel 🔒Channel Types
- Contains deposit transaction types and helper methods.
- This module contains the L1 block fee calculation function.
- frame 🔒Frame Types
- iter 🔒An iterator over encoded frames.
- utils 🔒Utility methods used by protocol types.
Structs§
- BatchTransaction is a set of Frames that can be Into::into [Bytes]. if the size exceeds the desired threshold.
- Block Header Info
- A Channel is a set of batches that are split into at least one, but possibly multiple frames.
- A channel frame is a segment of a channel’s data.
- An iterator over encoded frames.
- L2 Block Header Info
Enums§
- An error returned when adding a frame to a channel.
- A frame decoding error.
- Frame parsing error.
- An error that can occur when converting an OpBlock to an L2BlockInfo.
- An error encountered during OpBlock conversion.
Constants§
- CHANNEL_ID_LENGTH is the length of the channel ID.
- The version of the derivation pipeline.
- FJORD_MAX_RLP_BYTES_PER_CHANNEL is the maximum amount of bytes that will be read from a channel when the Fjord Hardfork is activated. This limit is set when decoding the RLP.
- Count the tagging info as 200 in terms of buffer size.
- Frames cannot be larger than 1MB.
- MAX_RLP_BYTES_PER_CHANNEL is the maximum amount of bytes that will be read from a channel. This limit is set when decoding the RLP.
Functions§
- Returns if the given
value
is a deposit transaction. - Converts the OpBlock to a partial SystemConfig.
Type Aliases§
- ChannelId is an opaque identifier for a channel.