diff --git a/.github/ISSUE_TEMPLATE/BUG-FORM.yml b/.github/ISSUE_TEMPLATE/BUG-FORM.yml
index 6a8ed1b4..7ce591bc 100644
--- a/.github/ISSUE_TEMPLATE/BUG-FORM.yml
+++ b/.github/ISSUE_TEMPLATE/BUG-FORM.yml
@@ -15,23 +15,15 @@ body:
description: What component is the bug in?
multiple: true
options:
- - consensus
- - network
- - genesis
- protocol
- provider
- - op-alloy
- - registry
- - rpc-jsonrpsee
- - rpc-types
- - rpc-types-engine
- other
validations:
required: true
- type: input
attributes:
- label: What version of op-alloy are you on?
- placeholder: "Run `cargo tree | grep op-alloy` and paste the output here"
+ label: What version of maili are you on?
+ placeholder: "Run `cargo tree | grep maili` and paste the output here"
- type: dropdown
attributes:
label: Operating System
diff --git a/.github/ISSUE_TEMPLATE/FEATURE-FORM.yml b/.github/ISSUE_TEMPLATE/FEATURE-FORM.yml
index c15dc772..d93ce5be 100644
--- a/.github/ISSUE_TEMPLATE/FEATURE-FORM.yml
+++ b/.github/ISSUE_TEMPLATE/FEATURE-FORM.yml
@@ -13,16 +13,8 @@ body:
description: What crate is the feature for?
multiple: true
options:
- - consensus
- - network
- - genesis
- protocol
- provider
- - op-alloy
- - registry
- - rpc-jsonrpsee
- - rpc-types
- - rpc-types-engine
- other
validations:
required: true
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 27830988..5da09c12 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -4,7 +4,7 @@ the requirements below.
Bug fixes and new features should include tests.
-Contributors guide: https://github.com/alloy-rs/core/blob/main/CONTRIBUTING.md
+Contributors guide: https://github.com/op-rs/maili/blob/main/CONTRIBUTING.md
The contributors guide includes instructions for running rustfmt and building the
documentation.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 697a1aa0..bf6e74d3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -85,7 +85,7 @@ jobs:
cache-on-failure: true
- name: cargo hack
run: |
- cargo hack build --workspace --target wasm32-unknown-unknown --exclude op-alloy-network --exclude op-alloy-rpc-jsonrpsee --exclude op-alloy-provider
+ cargo hack build --workspace --target wasm32-unknown-unknown --exclude maili-provider
wasm-wasi:
runs-on: ubuntu-latest
@@ -103,7 +103,7 @@ jobs:
cache-on-failure: true
- name: cargo hack
run: |
- cargo hack build --workspace --target wasm32-wasip1 --exclude op-alloy-network --exclude op-alloy-rpc-types --exclude op-alloy-provider
+ cargo hack build --workspace --target wasm32-wasip1 --exclude maili-provider
no-std:
runs-on: ubuntu-latest
diff --git a/Cargo.toml b/Cargo.toml
index 66da46e0..4b0d8a46 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,13 +3,13 @@ members = ["crates/*"]
resolver = "2"
[workspace.package]
-version = "0.9.0"
+version = "0.1.0"
edition = "2021"
rust-version = "1.81"
authors = ["Alloy Contributors"]
license = "MIT OR Apache-2.0"
-homepage = "https://github.com/alloy-rs/op-alloy"
-repository = "https://github.com/alloy-rs/op-alloy"
+homepage = "https://github.com/op-rs/maili"
+repository = "https://github.com/op-rs/maili"
exclude = ["benches/", "tests/"]
[workspace.lints.rustdoc]
@@ -36,15 +36,17 @@ rustdoc-args = ["--cfg", "docsrs"]
[workspace.dependencies]
# Workspace
-op-alloy-genesis = { version = "0.9.0", path = "crates/genesis", default-features = false }
-op-alloy-protocol = { version = "0.9.0", path = "crates/protocol", default-features = false }
-op-alloy-consensus = { version = "0.9.0", path = "crates/consensus", default-features = false }
-op-alloy-network = { version = "0.9.0", path = "crates/network", default-features = false }
-op-alloy-provider = { version = "0.9.0", path = "crates/provider", default-features = false }
-op-alloy-registry = { version = "0.9.0", path = "crates/registry", default-features = false }
-op-alloy-rpc-types = { version = "0.9.0", path = "crates/rpc-types", default-features = false }
-op-alloy-rpc-jsonrpsee = { version = "0.9.0", path = "crates/rpc-jsonrpsee", default-features = false }
-op-alloy-rpc-types-engine = { version = "0.9.0", path = "crates/rpc-types-engine", default-features = false }
+maili-protocol = { version = "0.1.0", path = "crates/protocol", default-features = false }
+maili-provider = { version = "0.1.0", path = "crates/provider", default-features = false }
+
+# OP-Alloy
+op-alloy-genesis = { version = "0.9.0", default-features = false }
+op-alloy-consensus = { version = "0.9.0", default-features = false }
+op-alloy-network = { version = "0.9.0", default-features = false }
+op-alloy-registry = { version = "0.9.0", default-features = false }
+op-alloy-rpc-types = { version = "0.9.0", default-features = false }
+op-alloy-rpc-jsonrpsee = { version = "0.9.0", default-features = false }
+op-alloy-rpc-types-engine = { version = "0.9.0", default-features = false }
# Alloy
alloy-eips = { version = "0.9.2", default-features = false }
diff --git a/Justfile b/Justfile
index 985121b9..2a925db6 100644
--- a/Justfile
+++ b/Justfile
@@ -54,7 +54,7 @@ check:
# Runs `cargo hack check` against the workspace
hack:
- cargo hack check --feature-powerset --no-dev-deps --exclude op-alloy --workspace
+ cargo hack check --feature-powerset --no-dev-deps --workspace
# Updates the git submodule source
source:
diff --git a/README.md b/README.md
index 60f1d672..33373bcf 100644
--- a/README.md
+++ b/README.md
@@ -1,38 +1,31 @@
-# op-alloy
+# maili
-
-
-
-
+
+
+
+
-Built on [Alloy][alloy], op-alloy connects applications to the OP Stack.
+OP Stack unique types and interfaces.
## Usage
-The following crates are provided by `op-alloy`.
+The following crates are provided by `maili`.
-- [`op-alloy-consensus`][op-alloy-consensus]
-- [`op-alloy-genesis`][op-alloy-genesis]
-- [`op-alloy-network`][op-alloy-network]
-- [`op-alloy-protocol`][op-alloy-protocol]
-- [`op-alloy-registry`][op-alloy-registry]
-- [`op-alloy-provider`][op-alloy-provider]
-- [`op-alloy-rpc-jsonrpsee`][op-alloy-rpc-jsonrpsee]
-- [`op-alloy-rpc-types-engine`][op-alloy-rpc-types-engine]
-- [`op-alloy-rpc-types`][op-alloy-rpc-types]
+- [`maili-protocol`][maili-protocol]
+- [`maili-provider`][maili-provider]
## Development Status
-`op-alloy` is currently in active development, and is not yet ready for use in production.
+`maili` is currently in active development, and is not yet ready for use in production.
## Supported Rust Versions (MSRV)
The current MSRV (minimum supported rust version) is 1.81.
-Unlike Alloy, op-alloy may use the latest stable release,
+Unlike Alloy, maili may use the latest stable release,
to benefit from the latest features.
The MSRV is not increased automatically, and will be updated
@@ -41,7 +34,7 @@ only as part of a patch (pre-1.0) or minor (post-1.0) release.
## Contributing
-op-alloy is built by open source contributors like you, thank you for improving the project!
+maili is built by open source contributors like you, thank you for improving the project!
A [contributing guide][contributing] is available that sets guidelines for contributing.
@@ -51,17 +44,13 @@ linting rules and passes clippy.
## `no_std`
-op-alloy is intended to be `no_std` compatible, initially for use in [kona][kona].
+maili is intended to be `no_std` compatible, initially for use in [kona][kona].
The following crates support `no_std`.
Notice, provider crates do not support `no_std` compatibility.
-- [`op-alloy-genesis`][op-alloy-genesis]
-- [`op-alloy-protocol`][op-alloy-protocol]
-- [`op-alloy-registry`][op-alloy-registry] (note: requires `serde`)
-- [`op-alloy-consensus`][op-alloy-consensus]
-- [`op-alloy-rpc-types`][op-alloy-rpc-types]
-- [`op-alloy-rpc-types-engine`][op-alloy-rpc-types-engine]
+- [`maili-protocol`][maili-protocol]
+- [`maili-provider`][maili-provider]
If you would like to add no_std support to a crate,
please make sure to update [scripts/check_no_std.sh][check-no-std].
@@ -69,7 +58,7 @@ please make sure to update [scripts/check_no_std.sh][check-no-std].
## Credits
-op-alloy is inspired by the work of several teams and projects, most notably [the Alloy project][alloy].
+maili implements the OP-unique spec, [op-alloy][op-alloy] is the glue that sticks OP to Ethereum.
This would not be possible without the hard work from open source contributors. Thank you.
@@ -89,15 +78,8 @@ shall be dual licensed as above, without any additional terms or conditions.
[check-no-std]: ./scripts/check_no_std.sh
[kona]: https://github.com/anton-rs/kona
-[alloy]: https://github.com/alloy-rs/alloy
-[contributing]: https://alloy-rs.github.io/op-alloy
-
-[op-alloy-consensus]: https://crates.io/crates/op-alloy-consensus
-[op-alloy-genesis]: https://crates.io/crates/op-alloy-genesis
-[op-alloy-network]: https://crates.io/crates/op-alloy-network
-[op-alloy-protocol]: https://crates.io/crates/op-alloy-protocol
-[op-alloy-registry]: https://crates.io/crates/op-alloy-registry
-[op-alloy-provider]: https://crates.io/crates/op-alloy-provider
-[op-alloy-rpc-jsonrpsee]: https://crates.io/crates/op-alloy-rpc-jsonrpsee
-[op-alloy-rpc-types-engine]: https://crates.io/crates/op-alloy-rpc-types-engine
-[op-alloy-rpc-types]: https://crates.io/crates/op-alloy-rpc-types
+[op-alloy]: https://github.com/alloy-rs/op-alloy
+[contributing]: https://op-rs.github.io/maili
+
+[maili-protocol]: https://crates.io/crates/maili-protocol
+[maili-provider]: https://crates.io/crates/maili-provider
diff --git a/book/README.md b/book/README.md
index c1614e4b..995c1081 100644
--- a/book/README.md
+++ b/book/README.md
@@ -1,6 +1,6 @@
-# `op-alloy-book`
+# `maili-book`
-This repository contains the source code for the op-alloy book, which is available at [alloy-rs.github.io/op-alloy](https://alloy-rs.github.io/op-alloy/).
+This repository contains the source code for the maili book, which is available at [op-rs.github.io/maili](https://op-rs.github.io/maili/).
## Contributing
diff --git a/book/book.toml b/book/book.toml
index 51fecf78..442b20bf 100644
--- a/book/book.toml
+++ b/book/book.toml
@@ -3,7 +3,7 @@ authors = ["refcell"]
language = "en"
multilingual = false
src = "src"
-title = "The op-alloy Book"
+title = "The maili Book"
[preprocessor.mermaid]
command = "mdbook-mermaid"
@@ -15,7 +15,7 @@ command = "mdbook-mermaid"
[output.html]
default-theme = "ferra"
preferred-dark-theme = "ferra"
-git-repository-url = "https://github.com/alloy-rs/op-alloy"
-edit-url-template = "https://github.com/alloy-rs/op-alloy/edit/main/book/{path}"
+git-repository-url = "https://github.com/op-rs/"
+edit-url-template = "https://github.com/op-rs/maili/edit/main/book/{path}"
additional-css = ["custom.css"]
additional-js = ["mermaid.min.js", "mermaid-init.js"]
diff --git a/book/src/CONTRIBUTING.md b/book/src/CONTRIBUTING.md
index 2a8da08c..e3c619f9 100644
--- a/book/src/CONTRIBUTING.md
+++ b/book/src/CONTRIBUTING.md
@@ -35,12 +35,12 @@ Before working with this repository locally, you'll need to install a few depend
The [OP Stack][op-stack] is a set of standardized open-source specifications
that powers Optimism, developed by the Optimism Collective.
-`op-alloy` is a rust implementation of core OP Stack types, transports,
-middleware and more. Not all types and implementation details in `op-alloy`
+`maili` is a rust implementation of distinguished OP Stack types, transports,
+middleware and more. Not all types and implementation details in `maili`
are present in the OP Stack [specs][specs], and on the flipside, not all
-specifications are implemented by `op-alloy`. That said, `op-alloy` is
+specifications are implemented by `maili`. That said, `maili` is
entirely _based off_ of the [specs][specs], and new functionality or
-core modifications to `op-alloy` must be reflected in the [specs][specs].
+core modifications to `maili` must be reflected in the [specs][specs].
As such, the first step for introducing changes to the OP Stack is to
[open a pr][specs-pr] in the [specs repository][specs-repo]. These
@@ -49,7 +49,7 @@ implementations of the OP Stack are able to synchronize and implement
the changes.
Once changes are merged in the OP Stack [specs][specs] repo, they
-may be added to `op-alloy` in a **backwards-compatible** way such
+may be added to `maili` in a **backwards-compatible** way such
that pre-upgrade functionality persists. The primary way to enable
backwards-compatibility is by using timestamp-based activation for
protocol upgrades.
@@ -62,5 +62,5 @@ protocol upgrades.
[specs-pr]: https://github.com/ethereum-optimism/specs/pulls
[specs]: https://specs.optimism.io/
[op-stack]: https://docs.optimism.io/stack/getting-started
-[book]: https://github.com/alloy-rs/op-alloy/tree/main/book
-[new-issue]: https://github.com/alloy-rs/op-alloy/issues/new
+[book]: https://github.com/op-rs/maili/tree/main/book
+[new-issue]: https://github.com/op-rs/maili/issues/new
diff --git a/book/src/LICENSE.md b/book/src/LICENSE.md
index 414b0e98..5c0cee7d 100644
--- a/book/src/LICENSE.md
+++ b/book/src/LICENSE.md
@@ -1,10 +1,6 @@
# Licensing
-op-alloy is dually licensed under the [Apache 2.0][apache] and the [MIT][mit] license.
+maili is dually licensed under the [Apache 2.0][apache] and the [MIT][mit] license.
-The [SNAPPY license][snappy] is added for the use of [snap][snap] in `op-alloy-rpc-types-engine`.
-
-[snap]: https://github.com/BurntSushi/rust-snappy
-[snappy]: https://github.com/alloy-rs/op-alloy/blob/main/SNAPPY-LICENSE
-[apache]: https://github.com/alloy-rs/op-alloy/blob/main/LICENSE-APACHE
-[mit]: https://github.com/alloy-rs/op-alloy/blob/main/LICENSE-MIT
+[apache]: https://github.com/op-rs/maili/blob/main/LICENSE-APACHE
+[mit]: https://github.com/op-rs/maili/blob/main/LICENSE-MIT
diff --git a/book/src/building/README.md b/book/src/building/README.md
index 5359e68d..10817f3b 100644
--- a/book/src/building/README.md
+++ b/book/src/building/README.md
@@ -1,38 +1,16 @@
# Building
-This section offers in-depth documentation into the various `op-alloy` crates.
+This section offers in-depth documentation into the various `maili` crates.
Some of the primary crates and their types are listed below.
-- [`op-alloy-genesis`][op-alloy-genesis] provides the
- [`RollupConfig`][rollup-config] and [`SystemConfig`][system-config] types.
-- [`op-alloy-consensus`][op-alloy-consensus] provides [`OpBlock`][op-block],
- [`OpTxEnvelope`][op-tx-envelope], [`OpReceiptEnvelope`][op-rx-envelope],
- [`Hardforks`][hardforks], and more.
-- [`op-alloy-rpc-types-engine`][op-alloy-rpc-types-engine] provides the
- [`OpPayloadAttributes`][op-payload-attributes] and
- [`OpAttributesWithParent`][op-attributes-with-parent].
-- [`op-alloy-protocol`][op-alloy-protocol] provides [`Frame`][frame],
+- [`maili-protocol`][maili-protocol] provides [`Frame`][frame],
[`Channel`][channel], [`Batch`][batch] types and more.
-[rollup-config]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/rollup/struct.RollupConfig.html
-[system-config]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/system/struct.SystemConfig.html
+[frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html
+[channel]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html
+[batch]: https://docs.rs/maili-protocol/latest/maili_protocol/enum.Batch.html
-[op-block]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/type.OpBlock.html
-[op-tx-envelope]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpTxEnvelope.html
-[op-rx-envelope]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpReceiptEnvelope.html
-[hardforks]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/hardforks/struct.Hardforks.html
-
-[op-payload-attributes]: https://docs.rs/op-alloy-rpc-types-engine/latest/op_alloy_rpc_types_engine/struct.OpPayloadAttributes.html
-[op-attributes-with-parent]: https://docs.rs/op-alloy-rpc-types-engine/latest/op_alloy_rpc_types_engine/struct.OpAttributesWithParent.html
-
-[frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html
-[channel]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html
-[batch]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.Batch.html
-
-[op-alloy-genesis]: https://crates.io/crates/op-alloy-genesis
-[op-alloy-consensus]: https://crates.io/crates/op-alloy-consensus
-[op-alloy-protocol]: https://crates.io/crates/op-alloy-protocol
-[op-alloy-rpc-types-engine]: https://crates.io/crates/op-alloy-rpc-types-engine
+[maili-protocol]: https://crates.io/crates/maili-protocol
diff --git a/book/src/building/consensus.md b/book/src/building/consensus.md
deleted file mode 100644
index 909c1e0d..00000000
--- a/book/src/building/consensus.md
+++ /dev/null
@@ -1,84 +0,0 @@
-# Consensus
-
-
-
-The `op-alloy-consensus` crate provides an Optimism consensus interface.
-It contains constants, types, and functions for implementing Optimism EL
-consensus and communication. This includes an extended `OpTxEnvelope` type
-with [deposit transactions][deposit], and receipts containing OP Stack
-specific fields (`deposit_nonce` + `deposit_receipt_version`).
-
-In general a type belongs in this crate if it exists in the
-`alloy-consensus` crate, but was modified from the base Ethereum protocol
-in the OP Stack. For consensus types that are not modified by the OP Stack,
-the `alloy-consensus` types should be used instead.
-
-
-## Block
-
-[`op-alloy-consensus`][consensus] exports an Optimism block type, [`OpBlock`][op-block].
-
-This type simply re-uses the `alloy-consensus` block type, with `OpTxEnvelope`
-as the type of transactions in the block.
-
-
-## Transactions
-
-Optimism extends the Ethereum [EIP-2718][2718] transaction envelope to include a
-deposit variant.
-
-### [`OpTxEnvelope`][envelope]
-
-The [`OpTxEnvelope`][envelope] type is based on [Alloy][alloy]'s
-[`TxEnvelope`][tx-envelope] type.
-
-Optimism modifies the `TxEnvelope` to the following.
-- Legacy
-- EIP-2930
-- EIP-1559
-- EIP-7702
-- Deposit
-
-Deposit is a custom transaction type that is either an L1 attributes
-deposit transaction or a user-submitted deposit transaction. Read more
-about deposit transactions in [the specs][specs].
-
-### Transaction Types ([`OpTxType`][ty])
-
-The [`OpTxType`][ty] enumerates the transaction types using their byte identifier,
-represents as a `u8` in rust.
-
-
-## Receipt Types
-
-Just like [`op-alloy-consensus`][consensus] defines transaction types,
-it also defines associated receipt types.
-
-[`OpReceiptEnvelope`][ore] defines an [Eip-2718][2718] receipt envelope type
-modified for the OP Stack. It contains the following variants - mapping
-directly to the `OpTxEnvelope` variants defined above.
-
-- Legacy
-- EIP-2930
-- EIP-1559
-- EIP-7702
-- Deposit
-
-There is also an [`OpDepositReceipt`][odr] type, extending the alloy receipt
-type with a deposit nonce and deposit receipt version.
-
-
-## Hardforks
-
-Aside from transactions and receipts, [`op-alloy-consensus`][consensus] exports
-one other core primitive called [`Hardforks`][hardforks].
-
-Hardforks provides hardfork transaction constructors - that is, it provides
-methods that return upgrade transactions for each hardfork. Some of these
-are the following.
-
-- [`Hardforks::ecotone_txs()`][ecotone]
-- [`Hardforks::fjord_txs()`][fjord]
-
-
-{{#include ../links.md}}
diff --git a/book/src/building/engine.md b/book/src/building/engine.md
deleted file mode 100644
index 6aca8dc9..00000000
--- a/book/src/building/engine.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# RPC Engine Types
-
-
-
-The [`op-alloy-rpc-types-engine`][engine] crate provides Optimism types for interfacing
-with the Engine API in the OP Stack.
-
-Optimism defines a custom payload attributes type called [`OpPayloadAttributes`][attributes].
-`OpPayloadAttributes` extends alloy's [`PayloadAttributes`][pa] with a few fields: transactions,
-a flag for enabling the tx pool, the gas limit, and EIP 1559 parameters.
-
-Wrapping `OpPayloadAttributes`, the [`OpAttributesWithParent`][parent] type extends payload
-attributes with the parent block (referenced as an [`L2BlockInfo`][lbi]) and a flag
-for whether the associated batch is the last batch in the span.
-
-Optimism also returns a custom type for the `engine_getPayload` request for both V3 and
-V4 payload envelopes. These are the [`OpExecutionPayloadEnvelopeV3`][v3] and
-[`OpExecutionPayloadEnvelopeV4`][v4] types, which both wrap payload envelope types
-from [`alloy-rpc-types-engine`][alloy-engine].
-
-
-
-
-[alloy-engine]: https://crates.io/crates/alloy-rpc-types-engine
-[v3]: https://docs.rs/op-alloy-rpc-types-engine/latest/op_alloy_rpc_types_engine/struct.OpExecutionPayloadEnvelopeV3.html
-[v4]: https://docs.rs/op-alloy-rpc-types-engine/latest/op_alloy_rpc_types_engine/struct.OpExecutionPayloadEnvelopeV4.html
-[parent]: https://docs.rs/op-alloy-rpc-types-engine/latest/op_alloy_rpc_types_engine/struct.OpAttributesWithParent.html
-[pa]: https://docs.rs/alloy-rpc-types-engine/latest/alloy_rpc_types_engine/payload/struct.PayloadAttributes.html
-[attributes]: https://docs.rs/op-alloy-rpc-types-engine/latest/op_alloy_rpc_types_engine/struct.OpPayloadAttributes.html
-[engine]: https://docs.rs/op-alloy-rpc-types-engine/latest/op_alloy_rpc_types_engine/struct.OpAttributesWithParent.html
diff --git a/book/src/building/genesis/README.md b/book/src/building/genesis/README.md
deleted file mode 100644
index 14f61fee..00000000
--- a/book/src/building/genesis/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Genesis
-
-
-
-The genesis crate contains types related to chain genesis.
-
-This section contains in-depth sections on building with [`op-alloy-genesis`][genesis] crate types.
-
-- [The Rollup Config](./rollup-config.md)
-- [The System Config](./system-config.md)
-
-
-
-{{#include ../../links.md}}
diff --git a/book/src/building/genesis/rollup-config.md b/book/src/building/genesis/rollup-config.md
deleted file mode 100644
index 23dd4c61..00000000
--- a/book/src/building/genesis/rollup-config.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# Rollup Configs
-
-Rollup configurations are a consensus construct used to configure an Optimism Consensus client.
-When an OP Stack chain is deployed into production or consensus nodes are configured to sync the chain,
-certain consensus parameters can be configured. These parameters are defined in the
-[OP Stack specs][spec-configurability].
-
-Consensus parameters are consumed by OP Stack software through the `RollupConfig` type defined in the
-[`op-alloy-genesis`][genesis] crate.
-
-## `RollupConfig` Type
-
-The [`RollupConfig`][rc] type is defined in [`op-alloy-genesis`][genesis].
-
-A predefined rollup config can be loaded from a given L2 chain id using
-the [`rollup_config_from_chain_id`][rcid] method. An example is shown below.
-
-```rust
-use op_alloy_genesis::{OP_MAINNET_CONFIG, rollup_config_from_chain_id};
-
-let op_mainnet_config = rollup_config_from_chain_id(10).expect("infallible");
-assert_eq!(OP_MAINNET_CONFIG, op_mainnet_config);
-```
-
-The `OP_MAINNET_CONFIG` is one of the predefined rollup configs exported by
-the [`op-alloy-genesis`][genesis] crate. Other predefined configs include
-the following.
-
-- `OP_MAINNET_CONFIG`
-- `OP_SEPOLIA_CONFIG`
-- `BASE_MAINNET_CONFIG`
-- `BASE_SEPOLIA_CONFIG`
-
-
-
-
-{{#include ../../links.md}}
diff --git a/book/src/building/genesis/system-config.md b/book/src/building/genesis/system-config.md
deleted file mode 100644
index d526c03c..00000000
--- a/book/src/building/genesis/system-config.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# System Config
-
-The system configuration is a set of configurable chain parameters
-defined in a contract on L1. These parameters can be changed through
-the system config contract, emitting events that are picked up by
-the [rollup node derivation process][derivation]. To dive deeper
-into the System Config, visit the
-[OP Stack Specifications][system-config-specs].
-
-## `SystemConfig` Type
-
-The [`SystemConfig`][system-config] type is defined in
-[`op-alloy-genesis`][genesis].
-
-Parameters defined in the [`SystemConfig`][system-config] are expected to be
-updated through L1 receipts, using the [`update_with_receipts`][update] method.
-
-## Holocene Updates
-
-The [Holocene Hardfork][holocene] introduced an update to the
-[`SystemConfig`][system-config] type, adding EIP-1559 parameters to the config.
-
-The [`SystemConfig`][system-config] type in [`op-alloy-genesis`][genesis] provides
-a method called [`eip_1559_params`][eip] that returns the EIP-1559 parameters
-encoded as a [`B64`][b64].
-
-
-
-
-{{#include ../../links.md}}
diff --git a/book/src/building/protocol/README.md b/book/src/building/protocol/README.md
index df694ba3..23e0a6d9 100644
--- a/book/src/building/protocol/README.md
+++ b/book/src/building/protocol/README.md
@@ -1,17 +1,17 @@
# Protocol
-
+
-The [`op-alloy-protocol`][protocol] crate contains types, constants, and methods
+The [`maili-protocol`][protocol] crate contains types, constants, and methods
specific to Optimism derivation and batch-submission.
-[`op-alloy-protocol`][protocol] supports `no_std`.
+[`maili-protocol`][protocol] supports `no_std`.
## Background
Protocol types are primarily used for L2 chain derivation. This section will
break down L2 chain derivation as it relates to types defined in
-`op-alloy-protocol` - that is, from the raw L2 chain data posted to L1, to the
+`maili-protocol` - that is, from the raw L2 chain data posted to L1, to the
[`Batch`][batch] type. And since the [`Batch`][batch] type naively breaks up
into the payload attributes, once executed, it becomes the canonical L2 block!
Note though, this provides an incredibly simplified introduction. It is advised
@@ -20,7 +20,7 @@ derivation.
The L2 chain is derived from data posted to the L1 chain - either as calldata
or blob data. Data is iteratively pulled from each L1 block and translated
-into the first type defined by `op-alloy-protocol`: the [`Frame`][frame] type.
+into the first type defined by `maili-protocol`: the [`Frame`][frame] type.
[`Frame`][frame]s are [parsed][parsed] from the raw data. Each [`Frame`][frame]
is a part of a [`Channel`][channel], the next type one level up in deriving
@@ -52,15 +52,15 @@ type.
-[decoded]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.Batch.html#method.decode
-[batch]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.Batch.html
-[ready]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html#method.is_ready
-[added]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html#method.add_frame
-[channel]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html
-[frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html
-[parsed]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#method.parse_frames
+[decoded]: https://docs.rs/maili-protocol/latest/maili_protocol/enum.Batch.html#method.decode
+[batch]: https://docs.rs/maili-protocol/latest/maili_protocol/enum.Batch.html
+[ready]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html#method.is_ready
+[added]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html#method.add_frame
+[channel]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html
+[frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html
+[parsed]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#method.parse_frames
-[protocol]: https://crates.io/crates/op-alloy-protocol
+[protocol]: https://crates.io/crates/maili-protocol
[s]: https://specs.optimism.io/protocol/derivation.html#overview
[lcd]: https://specs.optimism.io/protocol/derivation.html#overview
[channel-specs]: https://specs.optimism.io/protocol/derivation.html#channel-format
diff --git a/book/src/building/protocol/batches.md b/book/src/building/protocol/batches.md
index 7873873c..2acde3a8 100644
--- a/book/src/building/protocol/batches.md
+++ b/book/src/building/protocol/batches.md
@@ -92,26 +92,26 @@ more functionality.
[holocene]: https://specs.optimism.io/protocol/holocene/overview.html
-[check-batch-prefix]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.SpanBatch.html#method.check_batch_prefix
-[check-batch-span]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.SpanBatch.html#method.check_batch
-[span-batch-element]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.SpanBatchElement.html
-[check-batch-single]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.SingleBatch.html#method.check_batch
+[check-batch-prefix]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.SpanBatch.html#method.check_batch_prefix
+[check-batch-span]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.SpanBatch.html#method.check_batch
+[span-batch-element]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.SpanBatchElement.html
+[check-batch-single]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.SingleBatch.html#method.check_batch
[bytes]: https://docs.rs/alloy-primitives/latest/alloy_primitives/struct.Bytes.html
[block-hash]: https://docs.rs/alloy-primitives/latest/alloy_primitives/aliases/type.BlockHash.html
[epoch]: https://specs.optimism.io/glossary.html?highlight=Epoch#sequencing-epoch
-[decode]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.Batch.html#method.decode
-[timestamp]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.Batch.html#method.timestamp
+[decode]: https://docs.rs/maili-protocol/latest/maili_protocol/enum.Batch.html#method.decode
+[timestamp]: https://docs.rs/maili-protocol/latest/maili_protocol/enum.Batch.html#method.timestamp
[specs]: https://specs.optimism.io/protocol/derivation.html#batch-format
-[derived]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.RawSpanBatch.html#method.derive
-[batch-type]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.BatchType.html
-[channel]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html
-[batch]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.Batch.html
-[span-batch]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.SpanBatch.html
-[single-batch]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.SingleBatch.html
+[derived]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.RawSpanBatch.html#method.derive
+[batch-type]: https://docs.rs/maili-protocol/latest/maili_protocol/enum.BatchType.html
+[channel]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html
+[batch]: https://docs.rs/maili-protocol/latest/maili_protocol/enum.Batch.html
+[span-batch]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.SpanBatch.html
+[single-batch]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.SingleBatch.html
[delta]: https://specs.optimism.io/protocol/delta/overview.html
diff --git a/book/src/building/protocol/block-info.md b/book/src/building/protocol/block-info.md
index 06f980bd..aa0d6ef6 100644
--- a/book/src/building/protocol/block-info.md
+++ b/book/src/building/protocol/block-info.md
@@ -22,6 +22,6 @@ construct the [`L2BlockInfo`][lbi] from a block and `ChainGenesis`.
-[bi]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.BlockInfo.html
-[lbi]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.L2BlockInfo.html
-[fbg]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.L2BlockInfo.html#method.from_block_and_genesis
+[bi]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.BlockInfo.html
+[lbi]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.L2BlockInfo.html
+[fbg]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.L2BlockInfo.html#method.from_block_and_genesis
diff --git a/book/src/building/protocol/channels.md b/book/src/building/protocol/channels.md
index f5005f23..75ba19ce 100644
--- a/book/src/building/protocol/channels.md
+++ b/book/src/building/protocol/channels.md
@@ -61,7 +61,7 @@ expected to be populated with [`Frame`][frame]s using its
a minimal [`Channel`][channel] using a few frames.
```rust
-use op_alloy_protocol::{Channel, Frame};
+use maili_protocol::{Channel, Frame};
// Construct a channel at the given L1 block.
let id = [0xee; 16];
@@ -94,16 +94,16 @@ still open, and the frame hasn't already been added.
-[is-ready]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html#method.is_ready
-[add-frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html#method.add_frame
+[is-ready]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html#method.is_ready
+[add-frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html#method.add_frame
-[block-info]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.BlockInfo.html
+[block-info]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.BlockInfo.html
[frame-docs]: ./frames.md
[specs]: https://specs.optimism.io/protocol/derivation.html#batch-submission-wire-format
[seq-batch]: https://specs.optimism.io/glossary.html#sequencer-batch
-[channel]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html
-[cid]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/type.ChannelId.html
-[frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html
+[channel]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html
+[cid]: https://docs.rs/maili-protocol/latest/maili_protocol/type.ChannelId.html
+[frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html
diff --git a/book/src/building/protocol/frames.md b/book/src/building/protocol/frames.md
index 411e3acc..9cea7d5f 100644
--- a/book/src/building/protocol/frames.md
+++ b/book/src/building/protocol/frames.md
@@ -55,9 +55,9 @@ Where `++` represents concatenation. The frame's fields map to it's encoding.
- `is_last` is a single byte [`Frame::is_last`][is_last].
-## op-alloy's `Frame` Type
+## maili's `Frame` Type
-[`op-alloy-protocol`][protocol] provides the [`Frame`][frame] type with a few useful
+[`maili-protocol`][protocol] provides the [`Frame`][frame] type with a few useful
methods. [`Frame`][frame]s can be encoded and decoded using the [`Frame::encode`][encode]
and [`Frame::decode`][decode] methods. Given the raw batcher transaction data or blob data
containing the concatenated derivation version and contiguous list of encoded frames,
@@ -67,19 +67,19 @@ provide ways to decode single and multiple frames, respectively.
-[encode]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#method.encode
-[decode]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#method.decode
+[encode]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#method.encode
+[decode]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#method.decode
-[parse_frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#method.parse_frame
-[parse_frames]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#method.parse_frames
+[parse_frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#method.parse_frame
+[parse_frames]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#method.parse_frames
-[protocol]: https://crates.io/crate/op-alloy-protocol
+[protocol]: https://crates.io/crate/maili-protocol
-[id]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#structfield.id
-[number]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#structfield.number
-[data]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#structfield.data
-[is_last]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#structfield.is_last
+[id]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#structfield.id
+[number]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#structfield.number
+[data]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#structfield.data
+[is_last]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#structfield.is_last
-[cid]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/type.ChannelId.html
-[channel]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html
-[frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html
+[cid]: https://docs.rs/maili-protocol/latest/maili_protocol/type.ChannelId.html
+[channel]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html
+[frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html
diff --git a/book/src/building/rollup-configs.md b/book/src/building/rollup-configs.md
deleted file mode 100644
index 72fc9aa9..00000000
--- a/book/src/building/rollup-configs.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# Rollup Configs
-
-Rollup configurations are a consensus construct used to configure an Optimism Consensus client.
-When an OP Stack chain is deployed into production or consensus nodes are configured to sync the chain,
-certain consensus parameters can be configured. These parameters are defined in the
-[OP Stack specs][spec-configurability].
-
-Consensus parameters are consumed by OP Stack software through the `RollupConfig` type defined in the
-[`op-alloy-genesis`][genesis] crate.
-
-## `RollupConfig` Type
-
-The [`RollupConfig`][rc] type is defined in [`op-alloy-genesis`][genesis].
-
-A predefined rollup config can be loaded from a given L2 chain id using
-the [`rollup_config_from_chain_id`][rcid] method. An example is shown below.
-
-```rust
-use op_alloy_genesis::{OP_MAINNET_CONFIG, rollup_config_from_chain_id};
-
-let op_mainnet_config = rollup_config_from_chain_id(10).expect("infallible");
-assert_eq!(OP_MAINNET_CONFIG, op_mainnet_config);
-```
-
-The `OP_MAINNET_CONFIG` is one of the predefined rollup configs exported by
-the [`op-alloy-genesis`][genesis] crate. Other predefined configs include
-the following.
-
-- `OP_MAINNET_CONFIG`
-- `OP_SEPOLIA_CONFIG`
-- `BASE_MAINNET_CONFIG`
-- `BASE_SEPOLIA_CONFIG`
-
-
-
-
-{{#include ../links.md}}
diff --git a/book/src/building/rpc_types.md b/book/src/building/rpc_types.md
deleted file mode 100644
index ce2f2a9b..00000000
--- a/book/src/building/rpc_types.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# RPC Types
-
-The [`op-alloy-rpc-types`][rpc] crate contains RPC-related types.
-
-The [`OpTransactionRequest`][req] type acts as a builder for
-[`OpTypedTransaction`][typed].
-
-[`Transaction`][tx] is a transaction type.
-
-Related to receipts, [`op-alloy-rpc-types`][rpc] contains the
-[`OpTransactionReceipt`][receipt] type and it's field types.
-
-
-
-
-[rpc]: https://crates.io/crates/op-alloy-rpc-types
-[typed]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpTypedTransaction.html
-[tx]: https://docs.rs/op-alloy-rpc-types/latest/op_alloy_rpc_types/transaction/struct.Transaction.html
-[req]: https://docs.rs/op-alloy-rpc-types/latest/op_alloy_rpc_types/receipt/struct.OpTransactionReceipt.html
-[receipt]: https://docs.rs/op-alloy-rpc-types/latest/op_alloy_rpc_types/receipt/struct.OpTransactionReceipt.html
diff --git a/book/src/examples/README.md b/book/src/examples/README.md
index 7e241ba7..ce4f3ab6 100644
--- a/book/src/examples/README.md
+++ b/book/src/examples/README.md
@@ -1,8 +1,6 @@
# Examples
-Examples for working with `op-alloy-*` crates.
+Examples for working with `maili-*` crates.
-- [Load a Rollup Config for a Chain ID](./load-a-rollup-config.md)
-- [Create a new L1BlockInfoTx Hardfork Variant](./new-l1-block-info-tx-hardfork.md)
- [Transform Frames to a Batch](./frames-to-batch.md)
- [Transform a Batch to Frames](./batch-to-frames.md)
diff --git a/book/src/examples/batch-to-frames.md b/book/src/examples/batch-to-frames.md
index 4fc2bf80..2d27523f 100644
--- a/book/src/examples/batch-to-frames.md
+++ b/book/src/examples/batch-to-frames.md
@@ -48,7 +48,7 @@ ready to be batch-submitted to the data-availability layer.
## Running this example:
-- Clone the examples repository: `git clone git@github.com:alloy-rs/op-alloy.git`
+- Clone the examples repository: `git clone git@github.com:op-rs/maili.git`
- Run: `cargo run --example batch_to_frames`
```rust
diff --git a/book/src/examples/frames-to-batch.md b/book/src/examples/frames-to-batch.md
index 15736dd3..c73b559a 100644
--- a/book/src/examples/frames-to-batch.md
+++ b/book/src/examples/frames-to-batch.md
@@ -43,7 +43,7 @@ to wind up with the example's desired [`Batch`][batch].
## Running this example:
-- Clone the examples repository: `git clone git@github.com:alloy-rs/op-alloy.git`
+- Clone the examples repository: `git clone git@github.com:op-rs/maili.git`
- Run: `cargo run --example frames_to_batch`
```rust
diff --git a/book/src/examples/load-a-rollup-config.md b/book/src/examples/load-a-rollup-config.md
deleted file mode 100644
index ec2db0af..00000000
--- a/book/src/examples/load-a-rollup-config.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Loading a Rollup Config from a Chain ID
-
-In this section, the code examples demonstrate loading the
-rollup config for the given L2 Chain ID.
-
-Let's load the Rollup Config for OP Mainnet which hash chain id 10.
-
-```rust
-use op_alloy_genesis::{OP_MAINNET_CONFIG, rollup_config_from_chain_id};
-
-// The chain id for OP Mainnet
-let op_mainnet_id = 10;
-
-// Load a rollup config from the chain id.
-let op_mainnet_config = rollup_config_from_chain_id(op_mainnet_id).expect("infallible");
-
-// The chain id should match the hardcoded chain id.
-assert_eq!(OP_MAINNET_CONFIG, op_mainnet_config);
-```
-
-> ⚠️ Available Configs
->
-> The `rollup_config_from_chain_id` method in `op-alloy-genesis` uses hardcoded
-> rollup configs. But, there are only a few of these hardcoded rollup configs in
-> `op-alloy-genesis`. This method and these configs are provided for `no_std`
-> environments where dynamic filesystem loading at runtime is not supported
-> in `no_std` environments.
->
-> In a `std` environment, the [superchain][superchain] crate may be used which
-> dynamically provides all rollup configs from the [superchain-registry][registry]
-> for their respective chain ids.
-
-[superchain]: https://crates.io/crates/superchain
-[registry]: https://github.com/ethereum-optimism/superchain-registry
diff --git a/book/src/examples/new-l1-block-info-tx-hardfork.md b/book/src/examples/new-l1-block-info-tx-hardfork.md
deleted file mode 100644
index a16ad3e4..00000000
--- a/book/src/examples/new-l1-block-info-tx-hardfork.md
+++ /dev/null
@@ -1,113 +0,0 @@
-# Create a L1BlockInfoTx Variant for a new Hardfork
-
-This example walks through creating a variant of the [`L1BlockInfoTx`][info-tx]
-for a new Hardfork.
-
-> [!NOTE]
->
-> This example is very verbose.
-> To grok required changes, view [this PR diff][pr-diff]
-> which introduces Isthmus hardfork changes to the `L1BlockInfoTx` with a new variant.
-
-
-## Required Genesis Updates
-
-The first updates that need to be made are to [`op-alloy-genesis`][genesis]
-types, namely the [`RollupConfig`][rc] and [`HardForkConfiguration`][hfc].
-
-First, add a timestamp field to the [`RollupConfig`][rc]. Let's use the
-hardfork name "Glacier" as an example.
-
-```rust
-pub struct RollupConfig {
- ...
- /// `glacier_time` sets the activation time for the Glacier network upgrade.
- /// Active if `glacier_time` != None && L2 block timestamp >= Some(glacier_time), inactive
- /// otherwise.
- #[cfg_attr(feature = "serde", serde(skip_serializing_if = "Option::is_none"))]
- pub glacier_time: Option,
- ...
-}
-```
-
-Add an accessor on the [`RollupConfig`][rc] to provide a way of checking whether the
-"Glacier" hardfork is active for a given timestamp. Also update the prior hardfork
-accessor to call this method (let's use "Isthmus" as the prior hardfork).
-
-```rust
- /// Returns true if Isthmus is active at the given timestamp.
- pub fn is_isthmus_active(&self, timestamp: u64) -> bool {
- self.isthmus_time.map_or(false, |t| timestamp >= t) || self.is_glacier_active(timestamp)
- }
-
- /// Returns true if Glacier is active at the given timestamp.
- pub fn is_glacier_active(&self, timestamp: u64) -> bool {
- self.glacier_time.map_or(false, |t| timestamp >= t)
- }
-```
-
-Lastly, add the "Glacier" timestamp to the [`HardForkConfiguration`][hfc].
-
-```rust
-pub struct HardForkConfiguration {
- ...
- /// Glacier hardfork activation time
- pub glacier_time: Option,
-}
-```
-
-
-## Protocol Changes
-
-Introduce a new `glacier.rs` module containing a `L1BlockInfoGlacier` type
-in [`op_alloy_genesis::info` module][info-mod].
-
-This should include a few methods used in the `L1BlockInfoTx` later.
-
-```rust
- pub fn encode_calldata(&self) -> Bytes { ... }
-
- pub fn decode_calldata(r: &[u8]) -> Result { ... }
-```
-
-Use other hardfork variants like the [`L1BlockInfoEcotone`][ecotone]
-for reference.
-
-Next, add the new "Glacier" variant to the [`L1BlockInfoTx`][info-tx].
-
-```rust
-pub enum L1BlockInfoTx {
- ...
- Glacier(L1BlockInfoGlacier)
-}
-```
-
-Update [`L1BlockInfoTx::try_new`][try-new] to construct the `L1BlockInfoGlacier`
-if the hardfork is active using the `RollupConfig::is_glacier_active`.
-
-Also, be sure to update [`L1BlockInfoTx::decode_calldata`][decode-calldata]
-with the new variant decoding, as well as other [`L1BlockInfoTx`][info-tx]
-methods.
-
-Once some tests are added surrounding the decoding and encoding of the new
-`L1BlockInfoGlacier` variant, all required changes are complete!
-
-Now, [this example PR diff][pr-diff] introducing the Isthmus changes should
-make sense, since it effectively implements the above changes for the Isthmus
-hardfork (replacing "Glacier" with "Isthmus"). Notice, Isthmus introduces
-some new "operator fee" fields as part of it's `L1BlockInfoIsthmus` type.
-Some new error variants to the [`BlockInfoError`][bie] are needed as well.
-
-
-
-
-[bie]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.BlockInfoError.html
-[pr-diff]: https://github.com/alloy-rs/op-alloy/pull/130/files
-[decode-calldata]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.L1BlockInfoTx.html#method.decode_calldata
-[try-new]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.L1BlockInfoTx.html#method.try_new
-[ecotone]: https://github.com/alloy-rs/op-alloy/blob/main/crates/protocol/src/info/ecotone.rs
-[info-mod]: https://github.com/alloy-rs/op-alloy/blob/main/crates/protocol/src/info/mod.rs
-[genesis]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/index.html
-[rc]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/struct.RollupConfig.html
-[hfc]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/struct.HardForkConfiguration.html
-[info-tx]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.L1BlockInfoTx.html
diff --git a/book/src/glossary.md b/book/src/glossary.md
index 62c194a5..981bca45 100644
--- a/book/src/glossary.md
+++ b/book/src/glossary.md
@@ -1,5 +1,5 @@
# Glossary
-*This document contains definitions for terms used throughout the op-alloy book.*
+*This document contains definitions for terms used throughout the maili book.*
diff --git a/book/src/intro.md b/book/src/intro.md
index 87e44704..618f34b2 100644
--- a/book/src/intro.md
+++ b/book/src/intro.md
@@ -1,15 +1,15 @@
-# op-alloy
+# maili
-
+
-Welcome to the hands-on guide for getting started with `op-alloy`!
+Welcome to the hands-on guide for getting started with `maili`!
-`op-alloy` connects applications to the OP Stack, leveraging high
-performance types, traits, and middleware from [Alloy][alloy].
+`maili` connects the OP Stack, debuting unique types and interfaces linked to
+Ethereum via [OP-Alloy][op-alloy] primitives.
> 📖 Development Status
>
-> `op-alloy` is in active development, and is not yet ready for use in production.
+> `maili` is in active development, and is not yet ready for use in production.
> During development, this book will evolve quickly and may contain inaccuracies.
>
> Please [open an issue][new-issue] if you find any errors or have any suggestions for
@@ -19,28 +19,28 @@ performance types, traits, and middleware from [Alloy][alloy].
### [Getting Started](./starting/installation.md)
-To get started with op-alloy, add its crates as a dependency and take your first steps.
+To get started with maili, add its crates as a dependency and take your first steps.
-### [Building with op-alloy](./building/README.md)
+### [Building with maili](./building/README.md)
-Walk through types and functionality available in different `op-alloy` crates.
+Walk through types and functionality available in different `maili` crates.
### [Examples](./examples/README.md)
-Get hands-on experience using `op-alloy` crates for critical OP Stack functionality.
+Get hands-on experience using `maili` crates for critical OP Stack functionality.
### [Contributing](./CONTRIBUTING.md)
-Contributors are welcome! It is built and maintained by Alloy contributors,
-members of [OP Labs][op-labs], and the broader open source community.
+Contributors are welcome! It is built and maintained by op-rs contributors,
+members of [OP Labs][op-labs] and the broader open source community.
-`op-alloy` follows and expands the OP Stack standards set in the [specs].
+`maili` follows and expands the OP Stack standards set in the [specs].
The [contributing guide][contributing] breaks down how the [specs]
-integrate with `op-alloy` and how to contribute to `op-alloy`.
+integrate with `maili` and how to contribute to `maili`.
### [Licensing](./LICENSE.md)
-`op-alloy` is licensed under the combined Apache 2.0 and MIT License, along
+`maili` is licensed under the combined Apache 2.0 and MIT License, along
with a SNAPPY license for snappy encoding use.
diff --git a/book/src/links.md b/book/src/links.md
index 45dc9792..90a7c019 100644
--- a/book/src/links.md
+++ b/book/src/links.md
@@ -1,58 +1,34 @@
-
-
-[check-no-std]: https://github.com/alloy-rs/op-alloy/blob/main/scripts/check_no_std.sh
-[contributing]: https://alloy-rs.github.io/op-alloy
-[op-alloy-crate]: https://crates.io/crates/op-alloy
-[op-alloy-ff]: https://docs.rs/crate/op-alloy/latest/features
-
-[op-alloy-consensus]: https://crates.io/crates/op-alloy-consensus
-[op-alloy-genesis]: https://crates.io/crates/op-alloy-genesis
-[op-alloy-network]: https://crates.io/crates/op-alloy-network
-[op-alloy-protocol]: https://crates.io/crates/op-alloy-protocol
-[op-alloy-provider]: https://crates.io/crates/op-alloy-provider
-[op-alloy-rpc-jsonrpsee]: https://crates.io/crates/op-alloy-rpc-jsonrpsee
-[op-alloy-rpc-types-engine]: https://crates.io/crates/op-alloy-rpc-types-engine
-[op-alloy-rpc-types]: https://crates.io/crates/op-alloy-rpc-types
-
-
-
-[genesis]: https://crates.io/crates/op-alloy-genesis
-[rc]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/rollup/struct.RollupConfig.html
-[rcid]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/rollup/fn.rollup_config_from_chain_id.html
-[eip]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/system/struct.SystemConfig.html#method.eip_1559_params
-[update]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/system/struct.SystemConfig.html#method.update_with_receipts
-[system-config]: https://docs.rs/op-alloy-genesis/latest/op_alloy_genesis/system/struct.SystemConfig.html
-
-
-
-[compress-brotli]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/fn.compress_brotli.html
-[encode-batch]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.SingleBatch.html#method.encode
-[encode-frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#method.encode
-[add-frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html#method.add_frame
-[decode-batch]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.SingleBatch.html#method.decode
-[single-batch]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.SingleBatch.html
+
+
+[check-no-std]: https://github.com/op-rs/maili/blob/main/scripts/check_no_std.sh
+[contributing]: https://op-rs.github.io/maili
+[maili-crate]: https://crates.io/crates/maili
+[maili-ff]: https://docs.rs/crate/maili/latest/features
+
+[maili-protocol]: https://crates.io/crates/maili-protocol
+[maili-provider]: https://crates.io/crates/maili-provider
+
+
+
+[compress-brotli]: https://docs.rs/maili-protocol/latest/maili_protocol/fn.compress_brotli.html
+[encode-batch]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.SingleBatch.html#method.encode
+[encode-frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#method.encode
+[add-frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html#method.add_frame
+[decode-batch]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.SingleBatch.html#method.decode
+[single-batch]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.SingleBatch.html
[bytes]: https://docs.rs/alloy-primitives/latest/alloy_primitives/struct.Bytes.html
-[channel-id]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/type.ChannelId.html
-[channel]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html
-[channel-out]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.ChannelOut.html
-[ready-bytes]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.ChannelOut.html#method.ready_bytes
-[output-frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.ChannelOut.html#method.output_frame
-[decode-frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html#method.decode
+[channel-id]: https://docs.rs/maili-protocol/latest/maili_protocol/type.ChannelId.html
+[channel]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html
+[channel-out]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.ChannelOut.html
+[ready-bytes]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.ChannelOut.html#method.ready_bytes
+[output-frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.ChannelOut.html#method.output_frame
+[decode-frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html#method.decode
[hex]: https://docs.rs/hex-literal/latest/hex_literal/macro.hex.html
[fjord]: https://specs.optimism.io/protocol/fjord/overview.html
-[frame-data]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html#method.frame_data
-[is-ready]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Channel.html#method.is_ready
-[frame]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/struct.Frame.html
-[batch]: https://docs.rs/op-alloy-protocol/latest/op_alloy_protocol/enum.Batch.html
-
-
-
-[consensus]: https://crates.io/crates/op-alloy-consensus
-[odr]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/struct.OpDepositReceipt.html
-[ore]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpReceiptEnvelope.html
-[op-block]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/type.OpBlock.html
-[ty]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpTxType.html
-[envelope]: https://docs.rs/op-alloy-consensus/latest/op_alloy_consensus/enum.OpTxEnvelope.html
+[frame-data]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html#method.frame_data
+[is-ready]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Channel.html#method.is_ready
+[frame]: https://docs.rs/maili-protocol/latest/maili_protocol/struct.Frame.html
+[batch]: https://docs.rs/maili-protocol/latest/maili_protocol/enum.Batch.html
diff --git a/book/src/starting.md b/book/src/starting.md
index 4bcd96b8..4eeba160 100644
--- a/book/src/starting.md
+++ b/book/src/starting.md
@@ -1,42 +1,36 @@
# Installation
-[op-alloy][op-alloy] consists of a number of crates that provide a range of functionality
+[maili][maili] consists of a number of crates that provide a range of functionality
essential for interfacing with any OP Stack chain.
-The most succinct way to work with `op-alloy` is to add the [`op-alloy`][op-alloy-crate] crate
+The most succinct way to work with `maili` is to add the [`maili`][maili-crate] crate
with the `full` feature flag from the command-line using Cargo.
```txt
-cargo add op-alloy --features full
+cargo add maili --features full
```
Alternatively, you can add the following to your `Cargo.toml` file.
```txt
-op-alloy = { version = "0.5", features = ["full"] }
+maili = { version = "0.5", features = ["full"] }
```
For more fine-grained control over the features you wish to include, you can add the individual
-crates to your `Cargo.toml` file, or use the `op-alloy` crate with the features you need.
+crates to your `Cargo.toml` file, or use the `maili` crate with the features you need.
-After `op-alloy` is added as a dependency, crates re-exported by `op-alloy` are now available.
+After `maili` is added as a dependency, crates re-exported by `maili` are now available.
```rust
-use op_alloy::{
- genesis::{RollupConfig, SystemConfig},
- consensus::OpBlock,
+use maili::{
protocol::BlockInfo,
- network::Optimism,
provider::ext::engine::OpEngineApi,
- rpc_types::OpTransactionReceipt,
- rpc_jsonrpsee::traits::RollupNode,
- rpc_types_engine::OpAttributesWithParent,
};
```
## Features
-The [`op-alloy`][op-alloy-crate] defines many [feature flags][op-alloy-ff] including the following.
+The [`maili`][maili-crate] defines many [feature flags][maili-ff] including the following.
Default
- `std`
@@ -46,7 +40,7 @@ Default
Full enables the most commonly used crates.
- `full`
-The `k256` feature flag enables the `k256` feature on the `op-alloy-consensus` crate.
+The `k256` feature flag enables the `k256` feature on the `maili-consensus` crate.
- `k256`
Arbitrary enables arbitrary features on crates, deriving the `Arbitrary` trait on types.
@@ -56,29 +50,19 @@ Serde derives serde's Serialize and Deserialize traits on types.
- `serde`
Additionally, individual crates can be enabled using their shorthand names.
-For example, the `consensus` feature flag provides the `op-alloy-consensus` re-export
-so `op-alloy-consensus` types can be used from `op-alloy` through `op_alloy::consensus::InsertTypeHere`.
+For example, the `protocol` feature flag provides the `maili-protocol` re-export
+so `maili-protocol` types can be used from `maili` through `maili::protocol::InsertTypeHere`.
## Crates
-- [`op-alloy-network`][op-alloy-network]
-- [`op-alloy-genesis`][op-alloy-genesis] (supports `no_std`)
-- [`op-alloy-protocol`][op-alloy-protocol] (supports `no_std`)
-- [`op-alloy-provider`][op-alloy-provider]
-- [`op-alloy-consensus`][op-alloy-consensus] (supports `no_std`)
-- [`op-alloy-rpc-jsonrpsee`][op-alloy-rpc-jsonrpsee]
-- [`op-alloy-rpc-types`][op-alloy-rpc-types] (supports `no_std`)
-- [`op-alloy-rpc-types-engine`][op-alloy-rpc-types-engine] (supports `no_std`)
+- [`maili-protocol`][maili-protocol] (supports `no_std`)
+- [`maili-provider`][maili-provider]
## `no_std`
As noted above, the following crates are `no_std` compatible.
-- [`op-alloy-consensus`][op-alloy-consensus]
-- [`op-alloy-genesis`][op-alloy-genesis]
-- [`op-alloy-protocol`][op-alloy-protocol]
-- [`op-alloy-rpc-types-engine`][op-alloy-rpc-types-engine]
-- [`op-alloy-rpc-types`][op-alloy-rpc-types]
+- [`maili-protocol`][maili-protocol]
To add `no_std` support to a crate, ensure the [check_no_std][check-no-std]
script is updated to include this crate once `no_std` compatible.
diff --git a/cliff.toml b/cliff.toml
index dcb0f4b3..87cb83cf 100644
--- a/cliff.toml
+++ b/cliff.toml
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
# https://tera.netlify.app/docs/#introduction
body = """
{% if version %}\
- ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/alloy-rs/op-alloy
+ ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/op-rs/maili
/releases/tag/v{{ version | trim_start_matches(pat="v") }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
@@ -30,7 +30,7 @@ footer = ""
conventional_commits = true
filter_unconventional = false
commit_preprocessors = [
- { pattern = '#(\d+)', replace = "[#$1](https://github.com/alloy-rs/op-alloy/issues/$1)" },
+ { pattern = '#(\d+)', replace = "[#$1](https://github.com/op-rs/maili/issues/$1)" },
]
commit_parsers = [
{ message = "^[Ff]eat", group = "Features" },
diff --git a/crates/consensus/Cargo.toml b/crates/consensus/Cargo.toml
deleted file mode 100644
index 9e881d50..00000000
--- a/crates/consensus/Cargo.toml
+++ /dev/null
@@ -1,59 +0,0 @@
-[package]
-name = "op-alloy-consensus"
-description = "Optimism alloy consensus types"
-
-version.workspace = true
-edition.workspace = true
-rust-version.workspace = true
-authors.workspace = true
-license.workspace = true
-homepage.workspace = true
-repository.workspace = true
-exclude.workspace = true
-
-[lints]
-workspace = true
-
-[dependencies]
-# Alloy
-alloy-rlp.workspace = true
-alloy-eips.workspace = true
-alloy-consensus.workspace = true
-alloy-primitives = { workspace = true, features = ["rlp"] }
-
-# misc
-thiserror.workspace = true
-derive_more = { workspace = true, features = ["display"] }
-
-# arbitrary
-arbitrary = { workspace = true, features = ["derive"], optional = true }
-
-# serde
-serde_with = { workspace = true, optional = true }
-alloy-serde = { workspace = true, optional = true }
-serde = { workspace = true, features = ["derive"], optional = true }
-
-[dev-dependencies]
-rand.workspace = true
-bincode.workspace = true
-serde_json.workspace = true
-alloy-signer.workspace = true
-tokio = { workspace = true, features = ["macros"] }
-arbitrary = { workspace = true, features = ["derive"] }
-alloy-primitives = { workspace = true, features = ["rand", "arbitrary"] }
-
-[features]
-default = ["std"]
-std = ["alloy-eips/std", "alloy-consensus/std", "derive_more/std"]
-k256 = ["alloy-primitives/k256", "alloy-consensus/k256"]
-kzg = ["alloy-eips/kzg", "alloy-consensus/kzg", "std"]
-arbitrary = [
- "std",
- "dep:arbitrary",
- "alloy-consensus/arbitrary",
- "alloy-eips/arbitrary",
- "alloy-primitives/rand",
- "alloy-primitives/arbitrary",
-]
-serde = ["dep:serde", "dep:alloy-serde", "alloy-primitives/serde", "alloy-consensus/serde", "alloy-eips/serde"]
-serde-bincode-compat = ["serde_with"]
diff --git a/crates/consensus/README.md b/crates/consensus/README.md
deleted file mode 100644
index 67451d3b..00000000
--- a/crates/consensus/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-## `op-alloy-consensus`
-
-
-
-
-
-
-
-
-Optimism consensus interface.
-
-This crate contains constants, types, and functions for implementing Optimism EL consensus and communication. This
-includes an extended `OpTxEnvelope` type with [deposit transactions][deposit], and receipts containing OP Stack
-specific fields (`deposit_nonce` + `deposit_receipt_version`).
-
-In general a type belongs in this crate if it exists in the `alloy-consensus` crate, but was modified from the base Ethereum protocol in the OP Stack.
-For consensus types that are not modified by the OP Stack, the `alloy-consensus` types should be used instead.
-
-[deposit]: https://specs.optimism.io/protocol/deposits.html
-
-### Provenance
-
-Much of this code was ported from [reth-primitives] as part of ongoing alloy migrations.
-
-[reth-primitives]: https://github.com/paradigmxyz/reth/tree/main/crates/primitives
diff --git a/crates/consensus/src/block.rs b/crates/consensus/src/block.rs
deleted file mode 100644
index 4bc03b9e..00000000
--- a/crates/consensus/src/block.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-//! Optimism Block Type.
-
-use crate::OpTxEnvelope;
-
-/// An Optimism block type.
-pub type OpBlock = alloy_consensus::Block;
diff --git a/crates/consensus/src/eip1559.rs b/crates/consensus/src/eip1559.rs
deleted file mode 100644
index 01fa9e4a..00000000
--- a/crates/consensus/src/eip1559.rs
+++ /dev/null
@@ -1,99 +0,0 @@
-//! Support for EIP-1559 parameters after holocene.
-
-use alloy_eips::eip1559::BaseFeeParams;
-use alloy_primitives::{Bytes, B64};
-
-/// Extracts the Holocene 1599 parameters from the encoded form:
-///
-///
-/// Returns (`elasticity`, `denominator`)
-pub fn decode_eip_1559_params(eip_1559_params: B64) -> (u32, u32) {
- let denominator: [u8; 4] = eip_1559_params.0[..4].try_into().expect("sufficient length");
- let elasticity: [u8; 4] = eip_1559_params.0[4..8].try_into().expect("sufficient length");
-
- (u32::from_be_bytes(elasticity), u32::from_be_bytes(denominator))
-}
-
-/// Decodes the `eip1559` parameters from the `extradata` bytes.
-///
-/// Returns (`elasticity`, `denominator`)
-pub fn decode_holocene_extra_data(extra_data: &[u8]) -> Result<(u32, u32), EIP1559ParamError> {
- if extra_data.len() < 9 {
- return Err(EIP1559ParamError::NoEIP1559Params);
- }
-
- if extra_data[0] != 0 {
- // version must be 0: https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/holocene/exec-engine.md#eip-1559-parameters-in-block-header
- return Err(EIP1559ParamError::InvalidVersion(extra_data[0]));
- }
- // skip the first version byte
- Ok(decode_eip_1559_params(B64::from_slice(&extra_data[1..9])))
-}
-
-/// Encodes the `eip1559` parameters for the payload.
-pub fn encode_holocene_extra_data(
- eip_1559_params: B64,
- default_base_fee_params: BaseFeeParams,
-) -> Result {
- // 9 bytes: 1 byte for version (0) and 8 bytes for eip1559 params
- let mut extra_data = [0u8; 9];
- // If eip 1559 params aren't set, use the canyon base fee param constants
- // otherwise use them
- if eip_1559_params.is_zero() {
- // Try casting max_change_denominator to u32
- let max_change_denominator: u32 = (default_base_fee_params.max_change_denominator)
- .try_into()
- .map_err(|_| EIP1559ParamError::DenominatorOverflow)?;
-
- // Try casting elasticity_multiplier to u32
- let elasticity_multiplier: u32 = (default_base_fee_params.elasticity_multiplier)
- .try_into()
- .map_err(|_| EIP1559ParamError::ElasticityOverflow)?;
-
- // Copy the values safely
- extra_data[1..5].copy_from_slice(&max_change_denominator.to_be_bytes());
- extra_data[5..9].copy_from_slice(&elasticity_multiplier.to_be_bytes());
- } else {
- let (elasticity, denominator) = decode_eip_1559_params(eip_1559_params);
- extra_data[1..5].copy_from_slice(&denominator.to_be_bytes());
- extra_data[5..9].copy_from_slice(&elasticity.to_be_bytes());
- }
- Ok(Bytes::copy_from_slice(&extra_data))
-}
-
-/// Error type for EIP-1559 parameters
-#[derive(Debug, thiserror::Error, Clone, Copy, PartialEq, Eq)]
-pub enum EIP1559ParamError {
- /// Thrown if the extra data begins with the wrong version byte.
- #[error("Invalid EIP1559 version byte: {0}")]
- InvalidVersion(u8),
- /// No EIP-1559 parameters provided.
- #[error("No EIP1559 parameters provided")]
- NoEIP1559Params,
- /// Denominator overflow.
- #[error("Denominator overflow")]
- DenominatorOverflow,
- /// Elasticity overflow.
- #[error("Elasticity overflow")]
- ElasticityOverflow,
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use core::str::FromStr;
-
- #[test]
- fn test_get_extra_data_post_holocene() {
- let eip_1559_params = B64::from_str("0x0000000800000008").unwrap();
- let extra_data = encode_holocene_extra_data(eip_1559_params, BaseFeeParams::new(80, 60));
- assert_eq!(extra_data.unwrap(), Bytes::copy_from_slice(&[0, 0, 0, 0, 8, 0, 0, 0, 8]));
- }
-
- #[test]
- fn test_get_extra_data_post_holocene_default() {
- let eip_1559_params = B64::ZERO;
- let extra_data = encode_holocene_extra_data(eip_1559_params, BaseFeeParams::new(80, 60));
- assert_eq!(extra_data.unwrap(), Bytes::copy_from_slice(&[0, 0, 0, 0, 80, 0, 0, 0, 60]));
- }
-}
diff --git a/crates/consensus/src/hardforks/bytecode/ecotone_tx_0.hex b/crates/consensus/src/hardforks/bytecode/ecotone_tx_0.hex
deleted file mode 100644
index fc51cb65..00000000
--- a/crates/consensus/src/hardforks/bytecode/ecotone_tx_0.hex
+++ /dev/null
@@ -1 +0,0 @@
-7ef90afea0877a6077205782ea15a6dc8699fa5ebcec5e0f4389f09cb8eda09488231346f89442100000000000000000000000000000000000008080808305b8d880b90abd3630383036303430353233343830313536313030313035373630303038306664356235303631303533653830363130303230363030303339363030306633666536303830363034303532333438303135363130303130353736303030383066643562353036303034333631303631303066353537363030303335363065303163383036333833383166353861313136313030393735373830363363353938353931383131363130303636353738303633633539383539313831343631303232393537383036336535393162323832313436313032343935373830363365383162326336643134363130323839353738303633663832303631343031343631303239323537363030303830666435623830363338333831663538613134363130316533353738303633386232333966373331343631303166373537383036333965386334393636313436313032303035373830363362383037373765613134363130323039353736303030383066643562383036333534666434643530313136313030643335373830363335346664346435303134363130313333353738303633356366323439363931343631303137633537383036333634636132336566313436313031383535373830363336386435646361363134363130316232353736303030383066643562383036333031356438656239313436313030666135373830363330396264356136303134363130313066353738303633343430613565323031343631303132623537356236303030383066643562363130313064363130313038333636303034363130343463353635623631303239623536356230303562363130313138363030323534383135363562363034303531393038313532363032303031356236303430353138303931303339306633356236313031306436313033646135363562363130313666363034303531383036303430303136303430353238303630303538313532363032303031376633313265333232653330303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323530383135363562363034303531363130313232393139303631303462653536356236313031313836303031353438313536356236303033353436313031393939303637666666666666666666666666666666663136383135363562363034303531363766666666666666666666666666666666393039313136383135323630323030313631303132323536356236303033353436313031636539303638303130303030303030303030303030303030393030343633666666666666666631363831353635623630343035313633666666666666666639303931313638313532363032303031363130313232353635623630303035343631303139393930363766666666666666666666666666666666313638313536356236313031313836303035353438313536356236313031313836303036353438313536356236303030353436313031393939303638303130303030303030303030303030303030393030343637666666666666666666666666666666663136383135363562363030333534363130316365393036633031303030303030303030303030303030303030303030303030393030343633666666666666666631363831353635623631303236343733646561646465616464656164646561646465616464656164646561646465616464656164303030313831353635623630343035313733666666666666666666666666666666666666666666666666666666666666666666666666666666663930393131363831353236303230303136313031323235363562363130313138363030343534383135363562363130313138363030373534383135363562333337336465616464656164646561646465616464656164646561646465616464656164646561643030303131343631303334323537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630323036303034383230313532363033623630323438323031353237663463333134323663366636333662336132303666366536633739323037343638363532303634363537303666373336393734366637323230363136333633366636303434383230313532376637353665373432303633363136653230373336353734323034633331323036323663366636333662323037363631366337353635373330303030303030303030363036343832303135323630383430313630343035313830393130333930666435623630303038303534363766666666666666666666666666666666393838393136363830313030303030303030303030303030303030323766666666666666666666666666666666666666666666666666666666666666666630303030303030303030303030303030303030303030303030303030303030303930393131363939383931363939393039393137393839303938313739303937353536303031393439303934353536303032393239303932353536303033383035343931393039343136376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666630303030303030303030303030303030393139303931313631373930393235353630303439313930393135353630303535353630303635353536356233333733646561646465616464656164646561646465616464656164646561646465616464656164303030313134363130343033353736333363633530623435363030303532363030343630316366643562363030343335363038303163363030333535363031343335363038303163363030303535363032343335363030313535363034343335363030373535363036343335363030323535363038343335363030343535353635623830333536376666666666666666666666666666666638313136383131343631303434373537363030303830666435623931393035303536356236303030383036303030383036303030383036303030383036313031303038393862303331323135363130343639353736303030383066643562363130343732383936313034326635363562393735303631303438303630323038613031363130343266353635623936353036303430383930313335393535303630363038393031333539343530363130343963363038303861303136313034326635363562393739613936393935303934393739333936393536306130383530313335393535303630633038353031333539343630653030313335393335303931353035303536356236303030363032303830383335323833353138303832383530313532363030303562383138313130313536313034656235373835383130313833303135313835383230313630343030313532383230313631303463663536356238313831313131353631303466643537363030303630343038333837303130313532356235303630316630313766666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666665303136393239303932303136303430303139333932353035303530353666656131363437333666366336333433303030383066303030610a
\ No newline at end of file
diff --git a/crates/consensus/src/hardforks/bytecode/ecotone_tx_1.hex b/crates/consensus/src/hardforks/bytecode/ecotone_tx_1.hex
deleted file mode 100644
index 696061df..00000000
--- a/crates/consensus/src/hardforks/bytecode/ecotone_tx_1.hex
+++ /dev/null
@@ -1 +0,0 @@
-7ef91feca0a312b4510adf943510f05fcc8f15f86995a5066bd83ce11384688ae20e6ecf42944210000000000000000000000000000000000001808080830f424080b91fab3630383036303430353233343830313536313030313035373630303038306664356235303631306662353830363130303230363030303339363030306633666536303830363034303532333438303135363130303130353736303030383066643562353036303034333631303631303066353537363030303335363065303163383036333534666434643530313136313030393735373830363364653236633461313131363130303636353738303633646532366334613131343631303164613537383036336634356536356438313436313031656435373830363366383230363134303134363130316635353738303633666531373362393731343631303163633537363030303830666435623830363335346664346435303134363130313636353738303633363864356463613631343631303161663537383036333665663235633361313436313031636335373830363363353938353931383134363130316432353736303030383066643562383036333331336365353637313136313030643335373830363333313363653536373134363130313237353738303633343939343865306531343631303132653537383036333465663665323234313436313031343135373830363335313962346264333134363130313565353736303030383066643562383036333063313863313632313436313030666135373830363332326239306162333134363130313135353738303633326530663236323531343631303131663537356236303030383066643562363130313032363130316664353635623630343035313930383135323630323030313562363034303531383039313033393066333562363130313164363130333165353635623030356236313031303236303036383135363562363030363631303130323536356236313031303236313031336333363630303436313062373335363562363130353431353635623630303035343631303134653930363066663136383135363562363034303531393031353135383135323630323030313631303130633536356236313031303236313035363535363562363130316132363034303531383036303430303136303430353238303630303538313532363032303031376633313265333232653330303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323530383135363562363034303531363130313063393139303631306334323536356236313031623736313035633635363562363034303531363366666666666666663930393131363831353236303230303136313031306335363562343836313031303235363562363130316237363130363462353635623631303130323631303165383336363030343631306237333536356236313036616335363562363130313032363130373630353635623631303130323631303835333536356236303030383035343630666631363135363130323936353736303430353137663038633337396130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532363032303630303438323031353236303238363032343832303135323766343736313733353037323639363336353466373236313633366336353361323036663736363537323638363536313634323832393230363937333230363436353630343438323031353237663730373236353633363137343635363430303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303036303634383230313532363038343031356236303430353138303931303339306664356237333432303030303030303030303030303030303030303030303030303030303030303030303030313537336666666666666666666666666666666666666666666666666666666666666666666666666666666631363633386232333966373336303430353138313633666666666666666631363630653031623831353236303034303136303230363034303531383038333033383138363561666131353830313536313032663535373364363030303830336533643630303066643562353035303530353036303430353133643630316631393630316638323031313638323031383036303430353235303831303139303631303331393931393036313063623535363562393035303930353635623733343230303030303030303030303030303030303030303030303030303030303030303030303031353733666666666666666666666666666666666666666666666666666666666666666666666666666666663136363365353931623238323630343035313831363366666666666666663136363065303162383135323630303430313630323036303430353138303833303338313836356166613135383031353631303337643537336436303030383033653364363030306664356235303530353035303630343035313364363031663139363031663832303131363832303138303630343035323530383130313930363130336131393139303631306363653536356237336666666666666666666666666666666666666666666666666666666666666666666666666666666631363333373366666666666666666666666666666666666666666666666666666666666666666666666666666666313631343631303438313537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630323036303034383230313532363034313630323438323031353237663437363137333530373236393633363534663732363136333663363533613230366636653663373932303734363836353230363436353730366637333639373436303434383230313532376636663732323036313633363336663735366537343230363336313665323037333635373432303639373334353633366637343666366536353230363636633631363036343832303135323766363730303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630383438323031353236306134303136313032386435363562363030303534363066663136313536313035313435373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303230363030343832303135323630323636303234383230313532376634373631373335303732363936333635346637323631363336633635336132303435363336663734366636653635323036313663373236353631363437393230363034343832303135323766363136333734363937363635303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630363438323031353236303834303136313032386435363562363030303830353437666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666303031363630303131373930353535363562363030303830353436306666313631353631303535633537363130353536383236313038623435363562393239313530353035363562363130353536383236313039353835363562363030303733343230303030303030303030303030303030303030303030303030303030303030303030303031353733666666666666666666666666666666666666666666666666666666666666666666666666666666663136363335636632343936393630343035313831363366666666666666663136363065303162383135323630303430313630323036303430353138303833303338313836356166613135383031353631303266353537336436303030383033653364363030306664356236303030373334323030303030303030303030303030303030303030303030303030303030303030303030303135373366666666666666666666666666666666666666666666666666666666666666666666666666666666313636333638643564636136363034303531383136336666666666666666313636306530316238313532363030343031363032303630343035313830383330333831383635616661313538303135363130363237353733643630303038303365336436303030666435623530353035303530363034303531336436303166313936303166383230313136383230313830363034303532353038313031393036313033313939313930363130643034353635623630303037333432303030303030303030303030303030303030303030303030303030303030303030303030313537336666666666666666666666666666666666666666666666666666666666666666666666666666666631363633633539383539313836303430353138313633666666666666666631363630653031623831353236303034303136303230363034303531383038333033383138363561666131353830313536313036323735373364363030303830336533643630303066643562363030303830363130366238383336313061623435363562363030303534393039313530363066663136313536313036636335373932393135303530353635623733343230303030303030303030303030303030303030303030303030303030303030303030303031353733666666666666666666666666666666666666666666666666666666666666666666666666666666663136363338623233396637333630343035313831363366666666666666663136363065303162383135323630303430313630323036303430353138303833303338313836356166613135383031353631303732623537336436303030383033653364363030306664356235303530353035303630343035313364363031663139363031663832303131363832303138303630343035323530383130313930363130373466393139303631306362353536356236313037353939303832363130643539353635623933393235303530353035363562363030303830353436306666313631353631303766343537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630323036303034383230313532363032363630323438323031353237663437363137333530373236393633363534663732363136333663363533613230373336333631366336313732323832393230363937333230363436353730373236303434383230313532376636353633363137343635363430303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030363036343832303135323630383430313631303238643536356237333432303030303030303030303030303030303030303030303030303030303030303030303030313537336666666666666666666666666666666666666666666666666666666666666666666666666666666631363633396538633439363636303430353138313633666666666666666631363630653031623831353236303034303136303230363034303531383038333033383138363561666131353830313536313032663535373364363030303830336533643630303066643562363030303733343230303030303030303030303030303030303030303030303030303030303030303030303031353733666666666666666666666666666666666666666666666666666666666666666666666666666666663136363366383230363134303630343035313831363366666666666666663136363065303162383135323630303430313630323036303430353138303833303338313836356166613135383031353631303266353537336436303030383033653364363030306664356236303030383036313038633038333631306162343536356239303530363030303631303863633631303536353536356236313038643436313036346235363562363130386466393036303130363130643731353635623633666666666666666631363631303865663931393036313064396435363562393035303630303036313038666236313038353335363562363130393033363130356336353635623633666666666666666631363631303931333931393036313064396435363562393035303630303036313039323138323834363130643539353635623631303932623930383536313064396435363562393035303631303933393630303636303061363130656661353635623631303934343930363031303631306439643536356236313039346539303832363130663036353635623936393535303530353035303530353035363562363030303830363130393634383336313061623435363562393035303630303037333432303030303030303030303030303030303030303030303030303030303030303030303030313537336666666666666666666666666666666666666666666666666666666666666666666666666666666631363633396538633439363636303430353138313633666666666666666631363630653031623831353236303034303136303230363034303531383038333033383138363561666131353830313536313039633735373364363030303830336533643630303066643562353035303530353036303430353133643630316631393630316638323031313638323031383036303430353235303831303139303631303965623931393036313063623535363562363130396633363130353635353635623733343230303030303030303030303030303030303030303030303030303030303030303030303031353733666666666666666666666666666666666666666666666666666666666666666666666666666666663136363338623233396637333630343035313831363366666666666666663136363065303162383135323630303430313630323036303430353138303833303338313836356166613135383031353631306135323537336436303030383033653364363030306664356235303530353035303630343035313364363031663139363031663832303131363832303138303630343035323530383130313930363130613736393139303631306362353536356236313061383039303835363130643539353635623631306138613931393036313064396435363562363130613934393139303631306439643536356239303530363130616132363030363630306136313065666135363562363130616163393038323631306630363536356239343933353035303530353035363562383035313630303039303831393038313562383138313130313536313062333735373834383138313531383131303631306164373537363130616437363130663431353635623031363032303031353137666666303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303031363630303030333631306231373537363130623130363030343834363130643539353635623932353036313062323535363562363130623232363031303834363130643539353635623932353035623830363130623266383136313066373035363562393135303530363130616264353635623530363130616163383236313034343036313064353935363562376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030363030303532363034313630303435323630323436303030666435623630303036303230383238343033313231353631306238353537363030303830666435623831333536376666666666666666666666666666666638303832313131353631306239643537363030303830666435623831383430313931353038343630316638333031313236313062623135373630303038306664356238313335383138313131313536313062633335373631306263333631306234343536356236303430353136303166383230313766666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666665303930383131363630336630313136383130313930383338323131383138333130313731353631306330393537363130633039363130623434353635623831363034303532383238313532383736303230383438373031303131313135363130633232353736303030383066643562383236303230383630313630323038333031333736303030393238313031363032303031393239303932353235303935393435303530353035303530353635623630303036303230383038333532383335313830383238353031353236303030356238313831313031353631306336663537383538313031383330313531383538323031363034303031353238323031363130633533353635623831383131313135363130633831353736303030363034303833383730313031353235623530363031663031376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666530313639323930393230313630343030313933393235303530353035363562363030303630323038323834303331323135363130636337353736303030383066643562353035313931393035303536356236303030363032303832383430333132313536313063653035373630303038306664356238313531373366666666666666666666666666666666666666666666666666666666666666666666666666666666383131363831313436313037353935373630303038306664356236303030363032303832383430333132313536313064313635373630303038306664356238313531363366666666666666663831313638313134363130373539353736303030383066643562376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030363030303532363031313630303435323630323436303030666435623630303038323139383231313135363130643663353736313064366336313064326135363562353030313930353635623630303036336666666666666666383038333136383138353136383138333034383131313832313531353136313536313064393435373631306439343631306432613536356230323934393335303530353035303536356236303030383137666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666630343833313138323135313531363135363130646435353736313064643536313064326135363562353030323930353635623630303138313831356238303835313131353631306533333537383137666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666630343832313131353631306531393537363130653139363130643261353635623830383531363135363130653236353739313831303239313562393338343163393339303830303239303631306464663536356235303932353039323930353035363562363030303832363130653461353735303630303136313035353635363562383136313065353735373530363030303631303535363536356238313630303138313134363130653664353736303032383131343631306537373537363130653933353635623630303139313530353036313035353635363562363066663834313131353631306538383537363130653838363130643261353635623530353036303031383231623631303535363536356235303630323038333130363130313333383331303136363034653834313036303062383431303136313731353631306562363537353038313831306136313035353635363562363130656330383338333631306464613536356238303766666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666663034383231313135363130656632353736313065663236313064326135363562303239333932353035303530353635623630303036313037353938333833363130653362353635623630303038323631306633633537376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030363030303532363031323630303435323630323436303030666435623530303439303536356237663465343837623731303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303036303030353236303332363030343532363032343630303066643562363030303766666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666663832303336313066613135373631306661313631306432613536356235303630303130313930353666656131363437333666366336333433303030383066303030610a
\ No newline at end of file
diff --git a/crates/consensus/src/hardforks/bytecode/ecotone_tx_2.hex b/crates/consensus/src/hardforks/bytecode/ecotone_tx_2.hex
deleted file mode 100644
index 21029860..00000000
--- a/crates/consensus/src/hardforks/bytecode/ecotone_tx_2.hex
+++ /dev/null
@@ -1 +0,0 @@
-7ef86aa018acb38c5ff1c238a7460ebc1b421fa49ec4874bdf1e0a530d234104e5e67dbc940000000000000000000000000000000000000000944210000000000000000000000000000000000000808082c35080983659cfe607dbe8500fc591d1852b76fee44d5a05e13097ff
\ No newline at end of file
diff --git a/crates/consensus/src/hardforks/bytecode/ecotone_tx_3.hex b/crates/consensus/src/hardforks/bytecode/ecotone_tx_3.hex
deleted file mode 100644
index 11850b04..00000000
--- a/crates/consensus/src/hardforks/bytecode/ecotone_tx_3.hex
+++ /dev/null
@@ -1 +0,0 @@
-7ef86aa0ee4f9385eceef498af0be7ec5862229f426dec41c8d42397c7257a5117d9230a940000000000000000000000000000000000000000944210000000000000000000000000000000000001808082c35080983659cfe6b528d11cc114e026f138fe568744c6d45ce6da7a
\ No newline at end of file
diff --git a/crates/consensus/src/hardforks/bytecode/ecotone_tx_4.hex b/crates/consensus/src/hardforks/bytecode/ecotone_tx_4.hex
deleted file mode 100644
index 063a89f9..00000000
--- a/crates/consensus/src/hardforks/bytecode/ecotone_tx_4.hex
+++ /dev/null
@@ -1 +0,0 @@
-7ef857a00c1cb38e99dbc9cbfab3bb80863380b0905290b37eb3d6ab18dc01c1f3e75f9394421000000000000000000000000000000000000094b528d11cc114e026f138fe568744c6d45ce6da7a808083013880808422b908b3
\ No newline at end of file
diff --git a/crates/consensus/src/hardforks/bytecode/ecotone_tx_5.hex b/crates/consensus/src/hardforks/bytecode/ecotone_tx_5.hex
deleted file mode 100644
index d2d1e456..00000000
--- a/crates/consensus/src/hardforks/bytecode/ecotone_tx_5.hex
+++ /dev/null
@@ -1 +0,0 @@
-7ef90115a069b763c48478b9dc2f65ada09b3d92133ec592ea715ec65ad6e7f3dc519dc00c940b799c86a49deeb90402691f1041aa3af2d3c8758080808303d09080b8d536303631383036303039356633393566663333333733666666666666666666666666666666666666666666666666666666666666666666666666666666653134363034643537363032303336313436303234353735663566666435623566333538303135363034393537363230303166666638313036393038313534313436303363353735663566666435623632303031666666303135343566353236303230356666333562356635666664356236323030316666663432303634323831353535663335393036323030316666663031353530300a
\ No newline at end of file
diff --git a/crates/consensus/src/hardforks/bytecode/eip4788_ecotone.hex b/crates/consensus/src/hardforks/bytecode/eip4788_ecotone.hex
deleted file mode 100644
index 1764b177..00000000
--- a/crates/consensus/src/hardforks/bytecode/eip4788_ecotone.hex
+++ /dev/null
@@ -1 +0,0 @@
-60618060095f395ff33373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500
diff --git a/crates/consensus/src/hardforks/bytecode/fjord_tx_0.hex b/crates/consensus/src/hardforks/bytecode/fjord_tx_0.hex
deleted file mode 100644
index 9b5f4713..00000000
--- a/crates/consensus/src/hardforks/bytecode/fjord_tx_0.hex
+++ /dev/null
@@ -1 +0,0 @@
-7ef9306ea086122c533fdcb89b16d8713174625e44578a89751d96c098ec19ab40a51a8ea39442100000000000000000000000000000000000028080808316201080b9302d36303830363034303532333438303135363130303130353736303030383066643562353036313137663638303631303032303630303033393630303066336665363038303630343035323334383031353631303031303537363030303830666435623530363030343336313036313031333635373630303033353630653031633830363336656632356333613131363130306232353738303633646532366334613131313631303038313537383036336634356536356438313136313030363635373830363366343565363564383134363130323562353738303633663832303631343031343631303236333537383036336665313733623937313436313032306435373630303038306664356238303633646532366334613131343631303233353537383036336631633761353862313436313032343835373630303038306664356238303633366566323563336131343631303230643537383036333865393862313036313436313032313335373830363339363065336132333134363130323162353738303633633539383539313831343631303232643537363030303830666435623830363334393934386530653131363130313039353738303633353139623462643331313631303065653537383036333531396234626433313436313031396635373830363335346664346435303134363130316137353738303633363864356463613631343631303166303537363030303830666435623830363334393934386530653134363130313666353738303633346566366532323431343631303138323537363030303830666435623830363330633138633136323134363130313362353738303633323262393061623331343631303135363537383036333265306632363235313436313031363035373830363333313363653536373134363130313638353735623630303038306664356236313031343336313032366235363562363034303531393038313532363032303031356236303430353138303931303339306633356236313031356536313033386335363562303035623631303134333630303638313536356236303036363130313433353635623631303134333631303137643336363030343631313261313536356236313035313535363562363030303534363130313866393036306666313638313536356236303430353139303135313538313532363032303031363130313464353635623631303134333631303535323536356236313031653336303430353138303630343030313630343035323830363030353831353236303230303137663331326533333265333030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532353038313536356236303430353136313031346439313930363131333730353635623631303166383631303562333536356236303430353136336666666666666666393039313136383135323630323030313631303134643536356234383631303134333536356236313031356536313036333835363562363030303534363130313866393036313031303039303034363066663136383135363562363130316638363130383332353635623631303134333631303234333336363030343631313261313536356236313038393335363562363130313433363130323536333636303034363131336533353635623631303938643536356236313031343336313061363935363562363130313433363130623563353635623630303038303534363066663136313536313033303435373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303230363030343832303135323630323836303234383230313532376634373631373335303732363936333635346637323631363336633635336132303666373636353732363836353631363432383239323036393733323036343635363034343832303135323766373037323635363336313734363536343030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630363438323031353236303834303135623630343035313830393130333930666435623733343230303030303030303030303030303030303030303030303030303030303030303030303031353733666666666666666666666666666666666666666666666666666666666666666666666666666666663136363338623233396637333630343035313831363366666666666666663136363065303162383135323630303430313630323036303430353138303833303338313836356166613135383031353631303336333537336436303030383033653364363030306664356235303530353035303630343035313364363031663139363031663832303131363832303138303630343035323530383130313930363130333837393139303631313366633536356239303530393035363562333337336465616464656164646561646465616464656164646561646465616464656164646561643030303131343631303435353537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630323036303034383230313532363034313630323438323031353237663437363137333530373236393633363534663732363136333663363533613230366636653663373932303734363836353230363436353730366637333639373436303434383230313532376636663732323036313633363336663735366537343230363336313665323037333635373432303639373334353633366637343666366536353230363636633631363036343832303135323766363730303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630383438323031353236306134303136313032666235363562363030303534363066663136313536313034653835373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303230363030343832303135323630323636303234383230313532376634373631373335303732363936333635346637323631363336633635336132303435363336663734366636653635323036313663373236353631363437393230363034343832303135323766363136333734363937363635303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630363438323031353236303834303136313032666235363562363030303830353437666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666303031363630303131373930353535363562363030303830353436313031303039303034363066663136313536313035333535373631303532663832363130626264353635623932393135303530353635623630303035343630666631363135363130353439353736313035326638323631306264633536356236313035326638323631306338303536356236303030373334323030303030303030303030303030303030303030303030303030303030303030303030303135373366666666666666666666666666666666666666666666666666666666666666666666666666666666313636333563663234393639363034303531383136336666666666666666313636306530316238313532363030343031363032303630343035313830383330333831383635616661313538303135363130333633353733643630303038303365336436303030666435623630303037333432303030303030303030303030303030303030303030303030303030303030303030303030313537336666666666666666666666666666666666666666666666666666666666666666666666666666666631363633363864356463613636303430353138313633666666666666666631363630653031623831353236303034303136303230363034303531383038333033383138363561666131353830313536313036313435373364363030303830336533643630303066643562353035303530353036303430353133643630316631393630316638323031313638323031383036303430353235303831303139303631303338373931393036313134313535363562333337336465616464656164646561646465616464656164646561646465616464656164646561643030303131343631303664623537363034303531376630386333373961303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030383135323630323036303034383230313532363033663630323438323031353237663437363137333530373236393633363534663732363136333663363533613230366636653663373932303734363836353230363436353730366637333639373436303434383230313532376636663732323036313633363336663735366537343230363336313665323037333635373432303639373334363661366637323634323036363663363136373030363036343832303135323630383430313631303266623536356236303030353436306666313636313037366435373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303230363030343832303135323630333936303234383230313532376634373631373335303732363936333635346637323631363336633635336132303436366136663732363432303633363136653230366636653663373932303632363034343832303135323766363532303631363337343639373636313734363536343230363136363734363537323230343536333666373436663665363530303030303030303030303030303630363438323031353236303834303136313032666235363562363030303534363130313030393030343630666631363135363130383034353736303430353137663038633337396130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303038313532363032303630303438323031353236303234383038323031353237663437363137333530373236393633363534663732363136333663363533613230343636613666373236343230363136633732363536313634373932303631363336303434383230313532376637343639373636353030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030363036343832303135323630383430313631303266623536356236303030383035343766666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666303066663136363130313030313739303535353635623630303037333432303030303030303030303030303030303030303030303030303030303030303030303030313537336666666666666666666666666666666666666666666666666666666666666666666666666666666631363633633539383539313836303430353138313633666666666666666631363630653031623831353236303034303136303230363034303531383038333033383138363561666131353830313536313036313435373364363030303830336533643630303066643562363030303830353436313031303039303034363066663136313536313038646135373632306634323430363130386335363130386234383436313064643435363562353136313038633039303630343436313134366135363562363131306631353635623631303864303930363031303631313438323536356236313035326639313930363131346266353635623630303036313038653538333631313135303536356236303030353439303931353036306666313631353631303866393537393239313530353035363562373334323030303030303030303030303030303030303030303030303030303030303030303030303135373366666666666666666666666666666666666666666666666666666666666666666666666666666666313636333862323339663733363034303531383136336666666666666666313636306530316238313532363030343031363032303630343035313830383330333831383635616661313538303135363130393538353733643630303038303365336436303030666435623530353035303530363034303531336436303166313936303166383230313136383230313830363034303532353038313031393036313039376339313930363131336663353635623631303938363930383236313134366135363562393339323530353035303536356236303030383035343631303130303930303436306666313636313061323535373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303230363030343832303135323630333636303234383230313532376634373631373335303732363936333635346637323631363336633635336132303637363537343463333134363635363535353730373036353732343236663735363034343832303135323766366536343230366636653663373932303733373537303730366637323734373332303436366136663732363430303030303030303030303030303030303030303630363438323031353236303834303136313032666235363562363030303631306133323833363034343631313436613536356239303530363030303631306134313630666638333631313462663536356236313061346239303833363131343661353635623631306135363930363031303631313436613536356239303530363130613631383136313131653035363562393439333530353035303530353635623630303038303534363066663136313536313061666435373630343035313766303863333739613030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303831353236303230363030343832303135323630323636303234383230313532376634373631373335303732363936333635346637323631363336633635336132303733363336313663363137323238323932303639373332303634363537303732363034343832303135323766363536333631373436353634303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630363438323031353236303834303136313032666235363562373334323030303030303030303030303030303030303030303030303030303030303030303030303135373366666666666666666666666666666666666666666666666666666666666666666666666666666666313636333965386334393636363034303531383136336666666666666666313636306530316238313532363030343031363032303630343035313830383330333831383635616661313538303135363130333633353733643630303038303365336436303030666435623630303037333432303030303030303030303030303030303030303030303030303030303030303030303030313537336666666666666666666666666666666666666666666666666666666666666666666666666666666631363633663832303631343036303430353138313633666666666666666631363630653031623831353236303034303136303230363034303531383038333033383138363561666131353830313536313033363335373364363030303830336533643630303066643562363030303631303532663631306263623833363130646434353635623531363130626437393036303434363131343661353635623631313165303536356236303030383036313062653838333631313135303536356239303530363030303631306266343631303535323536356236313062666336313038333235363562363130633037393036303130363131346661353635623633666666666666666631363631306331373931393036313134383235363562393035303630303036313063323336313062356335363562363130633262363130356233353635623633666666666666666631363631306333623931393036313134383235363562393035303630303036313063343938323834363131343661353635623631306335333930383536313134383235363562393035303631306336313630303636303061363131363436353635623631306336633930363031303631313438323536356236313063373639303832363131346266353635623936393535303530353035303530353035363562363030303830363130633863383336313131353035363562393035303630303037333432303030303030303030303030303030303030303030303030303030303030303030303030313537336666666666666666666666666666666666666666666666666666666666666666666666666666666631363633396538633439363636303430353138313633666666666666666631363630653031623831353236303034303136303230363034303531383038333033383138363561666131353830313536313063656635373364363030303830336533643630303066643562353035303530353036303430353133643630316631393630316638323031313638323031383036303430353235303831303139303631306431333931393036313133666335363562363130643162363130353532353635623733343230303030303030303030303030303030303030303030303030303030303030303030303031353733666666666666666666666666666666666666666666666666666666666666666666666666666666663136363338623233396637333630343035313831363366666666666666663136363065303162383135323630303430313630323036303430353138303833303338313836356166613135383031353631306437613537336436303030383033653364363030306664356235303530353035303630343035313364363031663139363031663832303131363832303138303630343035323530383130313930363130643965393139303631313366633536356236313064613839303835363131343661353635623631306462323931393036313134383235363562363130646263393139303631313438323536356239303530363130646361363030363630306136313136343635363562363130613631393038323631313462663536356236303630363130663633353635623831383135333630303130313931393035303536356236303030383238343033393335303562383338313130313536313039383635373832383130313531383238323031353131383630303031613135393039333032393236303031303136313064656535363562383235623630323038323130363130653562353738323531363130653236363031663833363130646462353635623532363032303932393039323031393137666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666653039303931303139303630323130313631306531313536356238313135363130393836353738323531363130653730363030313834303338333631306464623536356235323031363030313031393239313530353035363562363030303630303138333033393235303562363130313037383231303631306562633537363130656165383336306666313636313065613936306664363130656139383736303038316336306530303138393631306464623536356236313064646235363562393335303631303130363832303339313530363130653834353635623630303738323130363130656539353736313065653238333630666631363631306561393630303738353033363130656139383736303038316336306530303138393631306464623536356239303530363130393836353635623631306136313833363066663136363130656139383536303038316338353630303531623031383736313064646235363562363130663562383238323033363130663366363130663266383436303030383135313830363030303161383136303031316136303038316231373831363030323161363031303162313739313530353039313930353035363562363339653337373962393032363031333163363131666666313639303536356238303630303231623630343035313031383238313531363065303163313836306530316238313531313838313532353035303530353635623630303130313931393035303536356236313830303033383630343035313339363138303030363034303531303136303230383330313830363030643835353138323031303338323630303230313562383138313130313536313130393635373630303038303562353035303830353136303430353136303030383239303161363030313833393031613630303831623137363030323932393039323161363031303162393139303931313736333965333737396239383130323630313131633631376666633136393039313031383035313630653038313831316338373836303338313138393039313162393039313138393039313532383430313930383138333033393038343834313036313066656235373530363131303236353635623630303138343031393335303631316666663832313136313130323035373832353136303030383139303161363030313832393031613630303831623137363030323931393039313161363031303162313738313033363131303230353735303631313032363536356235303631306638663536356238333833313036313130333435373530353036313130393635363562363030313833303339323530383538333131313536313130353235373631313034663837383738383836303336313065306635363562393635303562363131303636363030393835303136303033383530313630303338353031363130646536353635623931353036313130373338373832383436313065376235363562393635303530363131303862383436313130383638363834383630313631306630323536356236313066303235363562393135303530383039333530363130663833353635623530353036313130613838333833383438383531383530313033363130653066353635623932353035303530363034303531393135303631383030303832303138303832303339313530383138333532363032303833303136303030356238333831313031353631313064643537383238313031353138323832303135323630323030313631313063353536356235303630303039323031393138323532353036303230303136303430353239313930353035363562363030303830363131313031383336323063633339343631313438323536356236313131326239303766666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666643736333230303631313635323536356239303530363131313362363036343632306634323430363131366336353635623831313231353631303532663537363130393836363036343632306634323430363131366336353635623830353136303030393038313930383135623831383131303135363131316433353738343831383135313831313036313131373335373631313137333631313738323536356230313630323030313531376666663030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030313636303030303336313131623335373631313161633630303438343631313436613536356239323530363131316331353635623631313162653630313038343631313436613536356239323530356238303631313163623831363131376231353635623931353035303631313135393536356235303631306136313832363130343430363131343661353635623630303038303631313165633833363131306631353635623930353036303030363131316638363130623563353635623631313230303631303562333536356236336666666666666666313636313132313039313930363131343832353635623631313231383631303535323536356236313132323036313038333235363562363131323262393036303130363131346661353635623633666666666666666631363631313233623931393036313134383235363562363131323435393139303631313436613536356239303530363131323533363030363630303236313134383235363562363131323565393036303061363131363436353635623631313236383832383436313134383235363562363130613631393139303631313462663536356237663465343837623731303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303036303030353236303431363030343532363032343630303066643562363030303630323038323834303331323135363131326233353736303030383066643562383133353637666666666666666666666666666666663830383231313135363131326362353736303030383066643562383138343031393135303834363031663833303131323631313264663537363030303830666435623831333538313831313131353631313266313537363131326631363131323732353635623630343035313630316638323031376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666530393038313136363033663031313638313031393038333832313138313833313031373135363131333337353736313133333736313132373235363562383136303430353238323831353238373630323038343837303130313131313536313133353035373630303038306664356238323630323038363031363032303833303133373630303039323831303136303230303139323930393235323530393539343530353035303530353035363562363030303630323038303833353238333531383038323835303135323630303035623831383131303135363131333964353738353831303138333031353138353832303136303430303135323832303136313133383135363562383138313131313536313133616635373630303036303430383338373031303135323562353036303166303137666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666653031363932393039323031363034303031393339323530353035303536356236303030363032303832383430333132313536313133663535373630303038306664356235303335393139303530353635623630303036303230383238343033313231353631313430653537363030303830666435623530353139313930353035363562363030303630323038323834303331323135363131343237353736303030383066643562383135313633666666666666666638313136383131343631303938363537363030303830666435623766346534383762373130303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303630303035323630313136303034353236303234363030306664356236303030383231393832313131353631313437643537363131343764363131343362353635623530303139303536356236303030383137666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666630343833313138323135313531363135363131346261353736313134626136313134336235363562353030323930353635623630303038323631313466353537376634653438376237313030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030363030303532363031323630303435323630323436303030666435623530303439303536356236303030363366666666666666663830383331363831383531363831383330343831313138323135313531363135363131353164353736313135316436313134336235363562303239343933353035303530353035363562363030313831383135623830383531313135363131353766353738313766666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666663034383231313135363131353635353736313135363536313134336235363562383038353136313536313135373235373931383130323931356239333834316339333930383030323930363131353262353635623530393235303932393035303536356236303030383236313135393635373530363030313631303532663536356238313631313561333537353036303030363130353266353635623831363030313831313436313135623935373630303238313134363131356333353736313135646635363562363030313931353035303631303532663536356236306666383431313135363131356434353736313135643436313134336235363562353035303630303138323162363130353266353635623530363032303833313036313031333338333130313636303465383431303630306238343130313631373135363131363032353735303831383130613631303532663536356236313136306338333833363131353236353635623830376666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666303438323131313536313136336535373631313633653631313433623536356230323933393235303530353035363562363030303631303938363833383336313135383735363562363030303830383231323832376637666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666303338343133383131353136313536313136386335373631313638633631313433623536356238323766383030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303033383431323831313631353631313663303537363131366330363131343362353635623530353030313930353635623630303037663766666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666636303030383431333630303038343133383538333034383531313832383231363136313536313137303735373631313730373631313433623536356237663830303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303036303030383731323836383230353838313238313834313631363135363131373432353736313137343236313134336235363562363030303837313239323530383738323035383731323834383431363136313536313137356535373631313735653631313433623536356238373835303538373132383138343136313631353631313737343537363131373734363131343362353635623530353035303932393039333032393339323530353035303536356237663465343837623731303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303036303030353236303332363030343532363032343630303066643562363030303766666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666663832303336313137653235373631313765323631313433623536356235303630303130313930353666656131363437333666366336333433303030383066303030610a
\ No newline at end of file
diff --git a/crates/consensus/src/hardforks/bytecode/fjord_tx_1.hex b/crates/consensus/src/hardforks/bytecode/fjord_tx_1.hex
deleted file mode 100644
index 652af273..00000000
--- a/crates/consensus/src/hardforks/bytecode/fjord_tx_1.hex
+++ /dev/null
@@ -1 +0,0 @@
-7ef86aa01e6bb0c28bfab3dc9b36ffb0f721f00d6937f33577606325692db0965a7d58c694000000000000000000000000000000000000000094b528d11cc114e026f138fe568744c6d45ce6da7a808082c35080983659cfe6a919894851548179a0750865e7974da599c0fac7
\ No newline at end of file
diff --git a/crates/consensus/src/hardforks/bytecode/fjord_tx_2.hex b/crates/consensus/src/hardforks/bytecode/fjord_tx_2.hex
deleted file mode 100644
index e72d425a..00000000
--- a/crates/consensus/src/hardforks/bytecode/fjord_tx_2.hex
+++ /dev/null
@@ -1 +0,0 @@
-7ef857a0bac7bb0d5961cad209a345408b0280a0d4686b1b20665e1b0f9cdafd73b19b6b94deaddeaddeaddeaddeaddeaddeaddeaddead000194b528d11cc114e026f138fe568744c6d45ce6da7a808083015f9080848e98b106
\ No newline at end of file
diff --git a/crates/consensus/src/hardforks/bytecode/gpo_ecotone.hex b/crates/consensus/src/hardforks/bytecode/gpo_ecotone.hex
deleted file mode 100644
index 4fc96a0e..00000000
--- a/crates/consensus/src/hardforks/bytecode/gpo_ecotone.hex
+++ /dev/null
@@ -1 +0,0 @@
-608060405234801561001057600080fd5b50610fb5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806354fd4d5011610097578063de26c4a111610066578063de26c4a1146101da578063f45e65d8146101ed578063f8206140146101f5578063fe173b97146101cc57600080fd5b806354fd4d501461016657806368d5dca6146101af5780636ef25c3a146101cc578063c5985918146101d257600080fd5b8063313ce567116100d3578063313ce5671461012757806349948e0e1461012e5780634ef6e22414610141578063519b4bd31461015e57600080fd5b80630c18c162146100fa57806322b90ab3146101155780632e0f26251461011f575b600080fd5b6101026101fd565b6040519081526020015b60405180910390f35b61011d61031e565b005b610102600681565b6006610102565b61010261013c366004610b73565b610541565b60005461014e9060ff1681565b604051901515815260200161010c565b610102610565565b6101a26040518060400160405280600581526020017f312e322e3000000000000000000000000000000000000000000000000000000081525081565b60405161010c9190610c42565b6101b76105c6565b60405163ffffffff909116815260200161010c565b48610102565b6101b761064b565b6101026101e8366004610b73565b6106ac565b610102610760565b610102610853565b6000805460ff1615610296576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f47617350726963654f7261636c653a206f76657268656164282920697320646560448201527f707265636174656400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103199190610cb5565b905090565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663e591b2826040518163ffffffff1660e01b8152600401602060405180830381865afa15801561037d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103a19190610cce565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610481576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e2073657420697345636f746f6e6520666c6160648201527f6700000000000000000000000000000000000000000000000000000000000000608482015260a40161028d565b60005460ff1615610514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a2045636f746f6e6520616c72656164792060448201527f6163746976650000000000000000000000000000000000000000000000000000606482015260840161028d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6000805460ff161561055c57610556826108b4565b92915050565b61055682610958565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f5573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610627573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103199190610d04565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610627573d6000803e3d6000fd5b6000806106b883610ab4565b60005490915060ff16156106cc5792915050565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa15801561072b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074f9190610cb5565b6107599082610d59565b9392505050565b6000805460ff16156107f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a207363616c61722829206973206465707260448201527f6563617465640000000000000000000000000000000000000000000000000000606482015260840161028d565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f5573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f5573d6000803e3d6000fd5b6000806108c083610ab4565b905060006108cc610565565b6108d461064b565b6108df906010610d71565b63ffffffff166108ef9190610d9d565b905060006108fb610853565b6109036105c6565b63ffffffff166109139190610d9d565b905060006109218284610d59565b61092b9085610d9d565b90506109396006600a610efa565b610944906010610d9d565b61094e9082610f06565b9695505050505050565b60008061096483610ab4565b9050600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109eb9190610cb5565b6109f3610565565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a769190610cb5565b610a809085610d59565b610a8a9190610d9d565b610a949190610d9d565b9050610aa26006600a610efa565b610aac9082610f06565b949350505050565b80516000908190815b81811015610b3757848181518110610ad757610ad7610f41565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016600003610b1757610b10600484610d59565b9250610b25565b610b22601084610d59565b92505b80610b2f81610f70565b915050610abd565b50610aac82610440610d59565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215610b8557600080fd5b813567ffffffffffffffff80821115610b9d57600080fd5b818401915084601f830112610bb157600080fd5b813581811115610bc357610bc3610b44565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610c0957610c09610b44565b81604052828152876020848701011115610c2257600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b81811015610c6f57858101830151858201604001528201610c53565b81811115610c81576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b600060208284031215610cc757600080fd5b5051919050565b600060208284031215610ce057600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461075957600080fd5b600060208284031215610d1657600080fd5b815163ffffffff8116811461075957600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115610d6c57610d6c610d2a565b500190565b600063ffffffff80831681851681830481118215151615610d9457610d94610d2a565b02949350505050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610dd557610dd5610d2a565b500290565b600181815b80851115610e3357817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610e1957610e19610d2a565b80851615610e2657918102915b93841c9390800290610ddf565b509250929050565b600082610e4a57506001610556565b81610e5757506000610556565b8160018114610e6d5760028114610e7757610e93565b6001915050610556565b60ff841115610e8857610e88610d2a565b50506001821b610556565b5060208310610133831016604e8410600b8410161715610eb6575081810a610556565b610ec08383610dda565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610ef257610ef2610d2a565b029392505050565b60006107598383610e3b565b600082610f3c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610fa157610fa1610d2a565b506001019056fea164736f6c634300080f000a
diff --git a/crates/consensus/src/hardforks/bytecode/gpo_fjord.hex b/crates/consensus/src/hardforks/bytecode/gpo_fjord.hex
deleted file mode 100644
index 42f73850..00000000
--- a/crates/consensus/src/hardforks/bytecode/gpo_fjord.hex
+++ /dev/null
@@ -1 +0,0 @@
-608060405234801561001057600080fd5b506117f6806100206000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c80636ef25c3a116100b2578063de26c4a111610081578063f45e65d811610066578063f45e65d81461025b578063f820614014610263578063fe173b971461020d57600080fd5b8063de26c4a114610235578063f1c7a58b1461024857600080fd5b80636ef25c3a1461020d5780638e98b10614610213578063960e3a231461021b578063c59859181461022d57600080fd5b806349948e0e11610109578063519b4bd3116100ee578063519b4bd31461019f57806354fd4d50146101a757806368d5dca6146101f057600080fd5b806349948e0e1461016f5780634ef6e2241461018257600080fd5b80630c18c1621461013b57806322b90ab3146101565780632e0f262514610160578063313ce56714610168575b600080fd5b61014361026b565b6040519081526020015b60405180910390f35b61015e61038c565b005b610143600681565b6006610143565b61014361017d3660046112a1565b610515565b60005461018f9060ff1681565b604051901515815260200161014d565b610143610552565b6101e36040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b60405161014d9190611370565b6101f86105b3565b60405163ffffffff909116815260200161014d565b48610143565b61015e610638565b60005461018f90610100900460ff1681565b6101f8610832565b6101436102433660046112a1565b610893565b6101436102563660046113e3565b61098d565b610143610a69565b610143610b5c565b6000805460ff1615610304576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f47617350726963654f7261636c653a206f76657268656164282920697320646560448201527f707265636174656400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038791906113fc565b905090565b3373deaddeaddeaddeaddeaddeaddeaddeaddead000114610455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e2073657420697345636f746f6e6520666c6160648201527f6700000000000000000000000000000000000000000000000000000000000000608482015260a4016102fb565b60005460ff16156104e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a2045636f746f6e6520616c72656164792060448201527f616374697665000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008054610100900460ff16156105355761052f82610bbd565b92915050565b60005460ff16156105495761052f82610bdc565b61052f82610c80565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610614573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190611415565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146106db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e20736574206973466a6f726420666c61670060648201526084016102fb565b60005460ff1661076d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f47617350726963654f7261636c653a20466a6f72642063616e206f6e6c79206260448201527f65206163746976617465642061667465722045636f746f6e650000000000000060648201526084016102fb565b600054610100900460ff1615610804576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f47617350726963654f7261636c653a20466a6f726420616c726561647920616360448201527f746976650000000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610614573d6000803e3d6000fd5b60008054610100900460ff16156108da57620f42406108c56108b484610dd4565b516108c090604461146a565b6110f1565b6108d0906010611482565b61052f91906114bf565b60006108e583611150565b60005490915060ff16156108f95792915050565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097c91906113fc565b610986908261146a565b9392505050565b60008054610100900460ff16610a25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f47617350726963654f7261636c653a206765744c314665655570706572426f7560448201527f6e64206f6e6c7920737570706f72747320466a6f72640000000000000000000060648201526084016102fb565b6000610a3283604461146a565b90506000610a4160ff836114bf565b610a4b908361146a565b610a5690601061146a565b9050610a61816111e0565b949350505050565b6000805460ff1615610afd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a207363616c61722829206973206465707260448201527f656361746564000000000000000000000000000000000000000000000000000060648201526084016102fb565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600061052f610bcb83610dd4565b51610bd790604461146a565b6111e0565b600080610be883611150565b90506000610bf4610552565b610bfc610832565b610c079060106114fa565b63ffffffff16610c179190611482565b90506000610c23610b5c565b610c2b6105b3565b63ffffffff16610c3b9190611482565b90506000610c49828461146a565b610c539085611482565b9050610c616006600a611646565b610c6c906010611482565b610c7690826114bf565b9695505050505050565b600080610c8c83611150565b9050600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1391906113fc565b610d1b610552565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9e91906113fc565b610da8908561146a565b610db29190611482565b610dbc9190611482565b9050610dca6006600a611646565b610a6190826114bf565b6060610f63565b818153600101919050565b600082840393505b838110156109865782810151828201511860001a1590930292600101610dee565b825b60208210610e5b578251610e26601f83610ddb565b52602092909201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090910190602101610e11565b8115610986578251610e706001840383610ddb565b520160010192915050565b60006001830392505b6101078210610ebc57610eae8360ff16610ea960fd610ea98760081c60e00189610ddb565b610ddb565b935061010682039150610e84565b60078210610ee957610ee28360ff16610ea960078503610ea98760081c60e00189610ddb565b9050610986565b610a618360ff16610ea98560081c8560051b0187610ddb565b610f5b828203610f3f610f2f84600081518060001a8160011a60081b178160021a60101b17915050919050565b639e3779b90260131c611fff1690565b8060021b6040510182815160e01c1860e01b8151188152505050565b600101919050565b6180003860405139618000604051016020830180600d8551820103826002015b81811015611096576000805b50508051604051600082901a600183901a60081b1760029290921a60101b91909117639e3779b9810260111c617ffc16909101805160e081811c878603811890911b90911890915284019081830390848410610feb5750611026565b600184019350611fff8211611020578251600081901a600182901a60081b1760029190911a60101b1781036110205750611026565b50610f8f565b838310611034575050611096565b600183039250858311156110525761104f8787888603610e0f565b96505b611066600985016003850160038501610de6565b9150611073878284610e7b565b96505061108b8461108686848601610f02565b610f02565b915050809350610f83565b50506110a88383848851850103610e0f565b925050506040519150618000820180820391508183526020830160005b838110156110dd5782810151828201526020016110c5565b506000920191825250602001604052919050565b60008061110183620cc394611482565b61112b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd763200611652565b905061113b6064620f42406116c6565b81121561052f576109866064620f42406116c6565b80516000908190815b818110156111d35784818151811061117357611173611782565b01602001517fff00000000000000000000000000000000000000000000000000000000000000166000036111b3576111ac60048461146a565b92506111c1565b6111be60108461146a565b92505b806111cb816117b1565b915050611159565b50610a618261044061146a565b6000806111ec836110f1565b905060006111f8610b5c565b6112006105b3565b63ffffffff166112109190611482565b611218610552565b611220610832565b61122b9060106114fa565b63ffffffff1661123b9190611482565b611245919061146a565b905061125360066002611482565b61125e90600a611646565b6112688284611482565b610a6191906114bf565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156112b357600080fd5b813567ffffffffffffffff808211156112cb57600080fd5b818401915084601f8301126112df57600080fd5b8135818111156112f1576112f1611272565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561133757611337611272565b8160405282815287602084870101111561135057600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b8181101561139d57858101830151858201604001528201611381565b818111156113af576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6000602082840312156113f557600080fd5b5035919050565b60006020828403121561140e57600080fd5b5051919050565b60006020828403121561142757600080fd5b815163ffffffff8116811461098657600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561147d5761147d61143b565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156114ba576114ba61143b565b500290565b6000826114f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600063ffffffff8083168185168183048111821515161561151d5761151d61143b565b02949350505050565b600181815b8085111561157f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156115655761156561143b565b8085161561157257918102915b93841c939080029061152b565b509250929050565b6000826115965750600161052f565b816115a35750600061052f565b81600181146115b957600281146115c3576115df565b600191505061052f565b60ff8411156115d4576115d461143b565b50506001821b61052f565b5060208310610133831016604e8410600b8410161715611602575081810a61052f565b61160c8383611526565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561163e5761163e61143b565b029392505050565b60006109868383611587565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0384138115161561168c5761168c61143b565b827f80000000000000000000000000000000000000000000000000000000000000000384128116156116c0576116c061143b565b50500190565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000841360008413858304851182821616156117075761170761143b565b7f800000000000000000000000000000000000000000000000000000000000000060008712868205881281841616156117425761174261143b565b6000871292508782058712848416161561175e5761175e61143b565b878505871281841616156117745761177461143b565b505050929093029392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036117e2576117e261143b565b506001019056fea164736f6c634300080f000a
diff --git a/crates/consensus/src/hardforks/bytecode/l1_block_ecotone.hex b/crates/consensus/src/hardforks/bytecode/l1_block_ecotone.hex
deleted file mode 100644
index 2baf6f70..00000000
--- a/crates/consensus/src/hardforks/bytecode/l1_block_ecotone.hex
+++ /dev/null
@@ -1 +0,0 @@
-608060405234801561001057600080fd5b5061053e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638381f58a11610097578063c598591811610066578063c598591814610229578063e591b28214610249578063e81b2c6d14610289578063f82061401461029257600080fd5b80638381f58a146101e35780638b239f73146101f75780639e8c496614610200578063b80777ea1461020957600080fd5b806354fd4d50116100d357806354fd4d50146101335780635cf249691461017c57806364ca23ef1461018557806368d5dca6146101b257600080fd5b8063015d8eb9146100fa57806309bd5a601461010f578063440a5e201461012b575b600080fd5b61010d61010836600461044c565b61029b565b005b61011860025481565b6040519081526020015b60405180910390f35b61010d6103da565b61016f6040518060400160405280600581526020017f312e322e3000000000000000000000000000000000000000000000000000000081525081565b60405161012291906104be565b61011860015481565b6003546101999067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610122565b6003546101ce9068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610122565b6000546101999067ffffffffffffffff1681565b61011860055481565b61011860065481565b6000546101999068010000000000000000900467ffffffffffffffff1681565b6003546101ce906c01000000000000000000000000900463ffffffff1681565b61026473deaddeaddeaddeaddeaddeaddeaddeaddead000181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610122565b61011860045481565b61011860075481565b3373deaddeaddeaddeaddeaddeaddeaddeaddead000114610342576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4c31426c6f636b3a206f6e6c7920746865206465706f7369746f72206163636f60448201527f756e742063616e20736574204c3120626c6f636b2076616c7565730000000000606482015260840160405180910390fd5b6000805467ffffffffffffffff98891668010000000000000000027fffffffffffffffffffffffffffffffff00000000000000000000000000000000909116998916999099179890981790975560019490945560029290925560038054919094167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009190911617909255600491909155600555600655565b3373deaddeaddeaddeaddeaddeaddeaddeaddead00011461040357633cc50b456000526004601cfd5b60043560801c60035560143560801c600055602435600155604435600755606435600255608435600455565b803567ffffffffffffffff8116811461044757600080fd5b919050565b600080600080600080600080610100898b03121561046957600080fd5b6104728961042f565b975061048060208a0161042f565b9650604089013595506060890135945061049c60808a0161042f565b979a969950949793969560a0850135955060c08501359460e001359350915050565b600060208083528351808285015260005b818110156104eb578581018301518582016040015282016104cf565b818111156104fd576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01692909201604001939250505056fea164736f6c634300080f000a
diff --git a/crates/consensus/src/hardforks/ecotone.rs b/crates/consensus/src/hardforks/ecotone.rs
deleted file mode 100644
index 144b2f59..00000000
--- a/crates/consensus/src/hardforks/ecotone.rs
+++ /dev/null
@@ -1,192 +0,0 @@
-//! Module containing a [Transaction] builder for the Ecotone network upgrade transactions.
-//!
-//! [Transaction]: alloy_consensus::Transaction
-
-use alloc::{string::String, vec::Vec};
-use alloy_eips::eip2718::Encodable2718;
-use alloy_primitives::{address, hex, Address, Bytes, TxKind, B256, U256};
-
-use crate::{Hardfork, TxDeposit, UpgradeDepositSource};
-
-/// The Ecotone network upgrade transactions.
-#[derive(Debug, Default, Clone, Copy)]
-pub struct Ecotone;
-
-impl Ecotone {
- /// The Gas Price Oracle Address
- /// This is computed by using go-ethereum's `crypto.CreateAddress` function,
- /// with the Gas Price Oracle Deployer Address and nonce 0.
- pub const GAS_PRICE_ORACLE: Address = address!("b528d11cc114e026f138fe568744c6d45ce6da7a");
-
- /// The Enable Ecotone Input Method 4Byte Signature
- pub const ENABLE_ECOTONE_INPUT: [u8; 4] = hex!("22b908b3");
-
- /// L1 Block Deployer Address
- pub const L1_BLOCK_DEPLOYER: Address = address!("4210000000000000000000000000000000000000");
-
- /// The Gas Price Oracle Deployer Address
- pub const GAS_PRICE_ORACLE_DEPLOYER: Address =
- address!("4210000000000000000000000000000000000001");
-
- /// The new L1 Block Address
- /// This is computed by using go-ethereum's `crypto.CreateAddress` function,
- /// with the L1 Block Deployer Address and nonce 0.
- pub const NEW_L1_BLOCK: Address = address!("07dbe8500fc591d1852b76fee44d5a05e13097ff");
-
- /// EIP-4788 From Address
- pub const EIP4788_FROM: Address = address!("0B799C86a49DEeb90402691F1041aa3AF2d3C875");
-
- /// Returns the source hash for the deployment of the l1 block contract.
- pub fn deploy_l1_block_source() -> B256 {
- UpgradeDepositSource { intent: String::from("Ecotone: L1 Block Deployment") }.source_hash()
- }
-
- /// Returns the source hash for the deployment of the gas price oracle contract.
- pub fn deploy_gas_price_oracle_source() -> B256 {
- UpgradeDepositSource { intent: String::from("Ecotone: Gas Price Oracle Deployment") }
- .source_hash()
- }
-
- /// Returns the source hash for the update of the l1 block proxy.
- pub fn update_l1_block_source() -> B256 {
- UpgradeDepositSource { intent: String::from("Ecotone: L1 Block Proxy Update") }
- .source_hash()
- }
-
- /// Returns the source hash for the update of the gas price oracle proxy.
- pub fn update_gas_price_oracle_source() -> B256 {
- UpgradeDepositSource { intent: String::from("Ecotone: Gas Price Oracle Proxy Update") }
- .source_hash()
- }
-
- /// Returns the source hash for the Ecotone Beacon Block Roots Contract deployment.
- pub fn beacon_roots_source() -> B256 {
- UpgradeDepositSource {
- intent: String::from("Ecotone: beacon block roots contract deployment"),
- }
- .source_hash()
- }
-
- /// Returns the source hash for the Ecotone Gas Price Oracle activation.
- pub fn enable_ecotone_source() -> B256 {
- UpgradeDepositSource { intent: String::from("Ecotone: Gas Price Oracle Set Ecotone") }
- .source_hash()
- }
-
- /// Returns the EIP-4788 creation data.
- pub fn eip4788_creation_data() -> Bytes {
- include_bytes!("./bytecode/eip4788_ecotone.hex").into()
- }
-
- /// Returns the raw bytecode for the L1 Block deployment.
- pub fn l1_block_deployment_bytecode() -> Bytes {
- include_bytes!("./bytecode/l1_block_ecotone.hex").into()
- }
-
- /// Returns the gas price oracle deployment bytecode.
- pub fn ecotone_gas_price_oracle_deployment_bytecode() -> Bytes {
- include_bytes!("./bytecode/gpo_ecotone.hex").into()
- }
-
- /// Returns the list of [TxDeposit]s for the Ecotone network upgrade.
- pub fn deposits() -> impl Iterator- {
- ([
- TxDeposit {
- source_hash: Self::deploy_l1_block_source(),
- from: Self::L1_BLOCK_DEPLOYER,
- to: TxKind::Create,
- mint: 0.into(),
- value: U256::ZERO,
- gas_limit: 375_000,
- is_system_transaction: false,
- input: Self::l1_block_deployment_bytecode(),
- },
- TxDeposit {
- source_hash: Self::deploy_gas_price_oracle_source(),
- from: Self::GAS_PRICE_ORACLE_DEPLOYER,
- to: TxKind::Create,
- mint: 0.into(),
- value: U256::ZERO,
- gas_limit: 1_000_000,
- is_system_transaction: false,
- input: Self::ecotone_gas_price_oracle_deployment_bytecode(),
- },
- TxDeposit {
- source_hash: Self::update_l1_block_source(),
- from: Address::default(),
- to: TxKind::Call(Self::L1_BLOCK_DEPLOYER),
- mint: 0.into(),
- value: U256::ZERO,
- gas_limit: 50_000,
- is_system_transaction: false,
- input: super::upgrade_to_calldata(Self::NEW_L1_BLOCK),
- },
- TxDeposit {
- source_hash: Self::update_gas_price_oracle_source(),
- from: Address::default(),
- to: TxKind::Call(Self::GAS_PRICE_ORACLE_DEPLOYER),
- mint: 0.into(),
- value: U256::ZERO,
- gas_limit: 50_000,
- is_system_transaction: false,
- input: super::upgrade_to_calldata(Self::GAS_PRICE_ORACLE),
- },
- TxDeposit {
- source_hash: Self::enable_ecotone_source(),
- from: Self::L1_BLOCK_DEPLOYER,
- to: TxKind::Call(Self::GAS_PRICE_ORACLE),
- mint: 0.into(),
- value: U256::ZERO,
- gas_limit: 80_000,
- is_system_transaction: false,
- input: Self::ENABLE_ECOTONE_INPUT.into(),
- },
- TxDeposit {
- source_hash: Self::beacon_roots_source(),
- from: Self::EIP4788_FROM,
- to: TxKind::Create,
- mint: 0.into(),
- value: U256::ZERO,
- gas_limit: 250_000,
- is_system_transaction: false,
- input: Self::eip4788_creation_data(),
- },
- ])
- .into_iter()
- }
-}
-
-impl Hardfork for Ecotone {
- /// Constructs the Ecotone network upgrade transactions.
- fn txs(&self) -> impl Iterator
- + '_ {
- Self::deposits().map(|tx| {
- let mut encoded = Vec::new();
- tx.encode_2718(&mut encoded);
- Bytes::from(encoded)
- })
- }
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use alloc::vec;
-
- #[test]
- fn test_ecotone_txs_encoded() {
- let ecotone_upgrade_tx = Ecotone.txs().collect::>();
- assert_eq!(ecotone_upgrade_tx.len(), 6);
-
- let expected_txs: Vec = vec![
- hex::decode(include_bytes!("./bytecode/ecotone_tx_0.hex")).unwrap().into(),
- hex::decode(include_bytes!("./bytecode/ecotone_tx_1.hex")).unwrap().into(),
- hex::decode(include_bytes!("./bytecode/ecotone_tx_2.hex")).unwrap().into(),
- hex::decode(include_bytes!("./bytecode/ecotone_tx_3.hex")).unwrap().into(),
- hex::decode(include_bytes!("./bytecode/ecotone_tx_4.hex")).unwrap().into(),
- hex::decode(include_bytes!("./bytecode/ecotone_tx_5.hex")).unwrap().into(),
- ];
- for (i, expected) in expected_txs.iter().enumerate() {
- assert_eq!(ecotone_upgrade_tx[i], *expected);
- }
- }
-}
diff --git a/crates/consensus/src/hardforks/fjord.rs b/crates/consensus/src/hardforks/fjord.rs
deleted file mode 100644
index 1d4cf831..00000000
--- a/crates/consensus/src/hardforks/fjord.rs
+++ /dev/null
@@ -1,127 +0,0 @@
-//! Module containing a [Transaction] builder for the Fjord network upgrade transactions.
-//!
-//! [Transaction]: alloy_consensus::Transaction
-
-use alloc::{string::String, vec::Vec};
-use alloy_eips::eip2718::Encodable2718;
-use alloy_primitives::{address, hex, Address, Bytes, TxKind, B256, U256};
-
-use crate::{Hardfork, TxDeposit, UpgradeDepositSource};
-
-/// The Fjord network upgrade transactions.
-#[derive(Debug, Default, Clone, Copy)]
-pub struct Fjord;
-
-impl Fjord {
- /// The Gas Price Oracle Address
- /// This is computed by using go-ethereum's `crypto.CreateAddress` function,
- /// with the Gas Price Oracle Deployer Address and nonce 0.
- pub const GAS_PRICE_ORACLE: Address = address!("b528d11cc114e026f138fe568744c6d45ce6da7a");
-
- /// The L1 Info Depositer Address.
- pub const L1_INFO_DEPOSITER: Address = address!("deaddeaddeaddeaddeaddeaddeaddeaddead0001");
-
- /// Fjord Gas Price Oracle Deployer Address.
- pub const GAS_PRICE_ORACLE_FJORD_DEPLOYER: Address =
- address!("4210000000000000000000000000000000000002");
-
- /// Fjord Gas Price Oracle address.
- pub const FJORD_GAS_PRICE_ORACLE: Address =
- address!("a919894851548179a0750865e7974da599c0fac7");
-
- /// The Set Fjord Four Byte Method Signature.
- pub const SET_FJORD_METHOD_SIGNATURE: [u8; 4] = hex!("8e98b106");
-
- /// Returns the source hash for the deployment of the Fjord Gas Price Oracle.
- pub fn deploy_fjord_gas_price_oracle_source() -> B256 {
- UpgradeDepositSource { intent: String::from("Fjord: Gas Price Oracle Deployment") }
- .source_hash()
- }
-
- /// Returns the source hash for the update of the Fjord Gas Price Oracle.
- pub fn update_fjord_gas_price_oracle_source() -> B256 {
- UpgradeDepositSource { intent: String::from("Fjord: Gas Price Oracle Proxy Update") }
- .source_hash()
- }
-
- /// [UpgradeDepositSource] for setting the Fjord Gas Price Oracle.
- pub fn enable_fjord_source() -> B256 {
- UpgradeDepositSource { intent: String::from("Fjord: Gas Price Oracle Set Fjord") }
- .source_hash()
- }
-
- /// Returns the fjord gas price oracle deployment bytecode.
- pub fn gas_price_oracle_deployment_bytecode() -> alloy_primitives::Bytes {
- include_bytes!("./bytecode/gpo_fjord.hex").into()
- }
-
- /// Returns the list of [TxDeposit]s for the Fjord network upgrade.
- pub fn deposits() -> impl Iterator
- {
- ([
- TxDeposit {
- source_hash: Self::deploy_fjord_gas_price_oracle_source(),
- from: Self::GAS_PRICE_ORACLE_FJORD_DEPLOYER,
- to: TxKind::Create,
- mint: 0.into(),
- value: U256::ZERO,
- gas_limit: 1_450_000,
- is_system_transaction: false,
- input: Self::gas_price_oracle_deployment_bytecode(),
- },
- TxDeposit {
- source_hash: Self::update_fjord_gas_price_oracle_source(),
- from: Address::ZERO,
- to: TxKind::Call(Self::GAS_PRICE_ORACLE),
- mint: 0.into(),
- value: U256::ZERO,
- gas_limit: 50_000,
- is_system_transaction: false,
- input: super::upgrade_to_calldata(Self::FJORD_GAS_PRICE_ORACLE),
- },
- // Enable Fjord
- TxDeposit {
- source_hash: Self::enable_fjord_source(),
- from: Self::L1_INFO_DEPOSITER,
- to: TxKind::Call(Self::GAS_PRICE_ORACLE),
- mint: 0.into(),
- value: U256::ZERO,
- gas_limit: 90_000,
- is_system_transaction: false,
- input: Self::SET_FJORD_METHOD_SIGNATURE.into(),
- },
- ])
- .into_iter()
- }
-}
-
-impl Hardfork for Fjord {
- /// Constructs the Fjord network upgrade transactions.
- fn txs(&self) -> impl Iterator
- + '_ {
- Self::deposits().map(|tx| {
- let mut encoded = Vec::new();
- tx.encode_2718(&mut encoded);
- Bytes::from(encoded)
- })
- }
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use alloc::vec;
-
- #[test]
- fn test_fjord_txs_encoded() {
- let fjord_upgrade_tx = Fjord.txs().collect::>();
- assert_eq!(fjord_upgrade_tx.len(), 3);
-
- let expected_txs: Vec = vec![
- hex::decode(include_bytes!("./bytecode/fjord_tx_0.hex")).unwrap().into(),
- hex::decode(include_bytes!("./bytecode/fjord_tx_1.hex")).unwrap().into(),
- hex::decode(include_bytes!("./bytecode/fjord_tx_2.hex")).unwrap().into(),
- ];
- for (i, expected) in expected_txs.iter().enumerate() {
- assert_eq!(fjord_upgrade_tx[i], *expected);
- }
- }
-}
diff --git a/crates/consensus/src/hardforks/forks.rs b/crates/consensus/src/hardforks/forks.rs
deleted file mode 100644
index 4862ef4f..00000000
--- a/crates/consensus/src/hardforks/forks.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-//! Contains all hardforks represented in the [crate::Hardfork] type.
-
-use crate::{Ecotone, Fjord};
-
-/// Optimism Hardforks
-///
-/// This type is used to encapsulate hardfork transactions.
-/// It exposes methods that return hardfork upgrade transactions
-/// as [alloy_primitives::Bytes].
-///
-/// # Example
-///
-/// Build ecotone hardfork upgrade transaction:
-/// ```rust
-/// use op_alloy_consensus::{Hardfork, Hardforks};
-/// let ecotone_upgrade_tx = Hardforks::ECOTONE.txs();
-/// assert_eq!(ecotone_upgrade_tx.collect::>().len(), 6);
-/// ```
-///
-/// Build fjord hardfork upgrade transactions:
-/// ```rust
-/// use op_alloy_consensus::{Hardfork, Hardforks};
-/// let fjord_upgrade_txs = Hardforks::FJORD.txs();
-/// assert_eq!(fjord_upgrade_txs.collect::>().len(), 3);
-/// ```
-#[derive(Debug, Default, Clone, Copy)]
-#[non_exhaustive]
-pub struct Hardforks;
-
-impl Hardforks {
- /// The ecotone hardfork upgrade transactions.
- pub const ECOTONE: Ecotone = Ecotone;
-
- /// The fjord hardfork upgrade transactions.
- pub const FJORD: Fjord = Fjord;
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use crate::Hardfork;
- use alloc::vec::Vec;
-
- #[test]
- fn test_hardforks() {
- let ecotone_upgrade_tx = Hardforks::ECOTONE.txs();
- assert_eq!(ecotone_upgrade_tx.collect::>().len(), 6);
-
- let fjord_upgrade_txs = Hardforks::FJORD.txs();
- assert_eq!(fjord_upgrade_txs.collect::>().len(), 3);
- }
-}
diff --git a/crates/consensus/src/hardforks/mod.rs b/crates/consensus/src/hardforks/mod.rs
deleted file mode 100644
index b66c9744..00000000
--- a/crates/consensus/src/hardforks/mod.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-//! OP Stack Hardfork Transaction Updates
-
-mod traits;
-pub use traits::Hardfork;
-
-mod forks;
-pub use forks::Hardforks;
-
-mod fjord;
-pub use fjord::Fjord;
-
-mod ecotone;
-pub use ecotone::Ecotone;
-
-mod utils;
-pub(crate) use utils::upgrade_to_calldata;
diff --git a/crates/consensus/src/hardforks/traits.rs b/crates/consensus/src/hardforks/traits.rs
deleted file mode 100644
index f4bbd3d0..00000000
--- a/crates/consensus/src/hardforks/traits.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-//! The trait abstraction for a Hardfork.
-
-use alloy_primitives::Bytes;
-
-/// The trait abstraction for a Hardfork.
-pub trait Hardfork {
- /// Returns the hardfork upgrade transactions as [Bytes].
- fn txs(&self) -> impl Iterator
- + '_;
-}
diff --git a/crates/consensus/src/hardforks/utils.rs b/crates/consensus/src/hardforks/utils.rs
deleted file mode 100644
index c8052abf..00000000
--- a/crates/consensus/src/hardforks/utils.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-//! Utilities for creating hardforks.
-
-use alloy_primitives::{hex, Address, Bytes};
-
-/// UpgradeTo Function 4Byte Signature
-pub(crate) const UPGRADE_TO_FUNC_BYTES_4: [u8; 4] = hex!("3659cfe6");
-
-/// Turns the given address into calldata for the `upgradeTo` function.
-pub(crate) fn upgrade_to_calldata(addr: Address) -> Bytes {
- let mut v = UPGRADE_TO_FUNC_BYTES_4.to_vec();
- v.extend_from_slice(addr.as_slice());
- v.into()
-}
diff --git a/crates/consensus/src/lib.rs b/crates/consensus/src/lib.rs
deleted file mode 100644
index ab118c65..00000000
--- a/crates/consensus/src/lib.rs
+++ /dev/null
@@ -1,47 +0,0 @@
-#![doc = include_str!("../README.md")]
-#![doc(
- html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
- html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
-)]
-#![cfg_attr(not(test), warn(unused_crate_dependencies))]
-#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
-#![cfg_attr(not(feature = "std"), no_std)]
-
-extern crate alloc;
-
-mod receipt;
-pub use receipt::{OpDepositReceipt, OpDepositReceiptWithBloom, OpReceiptEnvelope, OpTxReceipt};
-
-mod transaction;
-pub use transaction::{
- DepositSourceDomain, DepositSourceDomainIdentifier, DepositTransaction, L1InfoDepositSource,
- OpPooledTransaction, OpTxEnvelope, OpTxType, OpTypedTransaction, TxDeposit,
- UpgradeDepositSource, UserDepositSource, DEPOSIT_TX_TYPE_ID,
-};
-
-pub mod eip1559;
-pub use eip1559::{
- decode_eip_1559_params, decode_holocene_extra_data, encode_holocene_extra_data,
- EIP1559ParamError,
-};
-
-mod hardforks;
-pub use hardforks::{Ecotone, Fjord, Hardfork, Hardforks};
-
-mod block;
-pub use block::OpBlock;
-
-#[cfg(feature = "serde")]
-pub use transaction::serde_deposit_tx_rpc;
-
-/// Bincode-compatible serde implementations for consensus types.
-///
-/// `bincode` crate doesn't work well with optionally serializable serde fields, but some of the
-/// consensus types require optional serialization for RPC compatibility. This module makes so that
-/// all fields are serialized.
-///
-/// Read more:
-#[cfg(all(feature = "serde", feature = "serde-bincode-compat"))]
-pub mod serde_bincode_compat {
- pub use super::transaction::serde_bincode_compat::TxDeposit;
-}
diff --git a/crates/consensus/src/receipt/envelope.rs b/crates/consensus/src/receipt/envelope.rs
deleted file mode 100644
index b321e81a..00000000
--- a/crates/consensus/src/receipt/envelope.rs
+++ /dev/null
@@ -1,377 +0,0 @@
-//! Receipt envelope types for Optimism.
-
-use crate::{OpDepositReceipt, OpDepositReceiptWithBloom, OpTxType};
-use alloc::vec::Vec;
-use alloy_consensus::{Eip658Value, Receipt, ReceiptWithBloom, TxReceipt};
-use alloy_eips::eip2718::{Decodable2718, Eip2718Error, Eip2718Result, Encodable2718};
-use alloy_primitives::{logs_bloom, Bloom, Log};
-use alloy_rlp::{length_of_length, BufMut, Decodable, Encodable};
-
-/// Receipt envelope, as defined in [EIP-2718], modified for OP Stack chains.
-///
-/// This enum distinguishes between tagged and untagged legacy receipts, as the
-/// in-protocol merkle tree may commit to EITHER 0-prefixed or raw. Therefore
-/// we must ensure that encoding returns the precise byte-array that was
-/// decoded, preserving the presence or absence of the `TransactionType` flag.
-///
-/// Transaction receipt payloads are specified in their respective EIPs.
-///
-/// [EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718
-#[derive(Debug, Clone, PartialEq, Eq)]
-#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
-#[cfg_attr(feature = "serde", serde(tag = "type"))]
-#[non_exhaustive]
-pub enum OpReceiptEnvelope {
- /// Receipt envelope with no type flag.
- #[cfg_attr(feature = "serde", serde(rename = "0x0", alias = "0x00"))]
- Legacy(ReceiptWithBloom>),
- /// Receipt envelope with type flag 1, containing a [EIP-2930] receipt.
- ///
- /// [EIP-2930]: https://eips.ethereum.org/EIPS/eip-2930
- #[cfg_attr(feature = "serde", serde(rename = "0x1", alias = "0x01"))]
- Eip2930(ReceiptWithBloom>),
- /// Receipt envelope with type flag 2, containing a [EIP-1559] receipt.
- ///
- /// [EIP-1559]: https://eips.ethereum.org/EIPS/eip-1559
- #[cfg_attr(feature = "serde", serde(rename = "0x2", alias = "0x02"))]
- Eip1559(ReceiptWithBloom>),
- /// Receipt envelope with type flag 4, containing a [EIP-7702] receipt.
- ///
- /// [EIP-7702]: https://eips.ethereum.org/EIPS/eip-7702
- #[cfg_attr(feature = "serde", serde(rename = "0x4", alias = "0x04"))]
- Eip7702(ReceiptWithBloom>),
- /// Receipt envelope with type flag 126, containing a [deposit] receipt.
- ///
- /// [deposit]: https://specs.optimism.io/protocol/deposits.html
- #[cfg_attr(feature = "serde", serde(rename = "0x7e", alias = "0x7E"))]
- Deposit(ReceiptWithBloom>),
-}
-
-impl OpReceiptEnvelope {
- /// Creates a new [`OpReceiptEnvelope`] from the given parts.
- pub fn from_parts<'a>(
- status: bool,
- cumulative_gas_used: u64,
- logs: impl IntoIterator
- ,
- tx_type: OpTxType,
- deposit_nonce: Option,
- deposit_receipt_version: Option,
- ) -> Self {
- let logs = logs.into_iter().cloned().collect::>();
- let logs_bloom = logs_bloom(&logs);
- let inner_receipt =
- Receipt { status: Eip658Value::Eip658(status), cumulative_gas_used, logs };
- match tx_type {
- OpTxType::Legacy => {
- Self::Legacy(ReceiptWithBloom { receipt: inner_receipt, logs_bloom })
- }
- OpTxType::Eip2930 => {
- Self::Eip2930(ReceiptWithBloom { receipt: inner_receipt, logs_bloom })
- }
- OpTxType::Eip1559 => {
- Self::Eip1559(ReceiptWithBloom { receipt: inner_receipt, logs_bloom })
- }
- OpTxType::Eip7702 => {
- Self::Eip7702(ReceiptWithBloom { receipt: inner_receipt, logs_bloom })
- }
- OpTxType::Deposit => {
- let inner = OpDepositReceiptWithBloom {
- receipt: OpDepositReceipt {
- inner: inner_receipt,
- deposit_nonce,
- deposit_receipt_version,
- },
- logs_bloom,
- };
- Self::Deposit(inner)
- }
- }
- }
-}
-
-impl OpReceiptEnvelope {
- /// Return the [`OpTxType`] of the inner receipt.
- pub const fn tx_type(&self) -> OpTxType {
- match self {
- Self::Legacy(_) => OpTxType::Legacy,
- Self::Eip2930(_) => OpTxType::Eip2930,
- Self::Eip1559(_) => OpTxType::Eip1559,
- Self::Eip7702(_) => OpTxType::Eip7702,
- Self::Deposit(_) => OpTxType::Deposit,
- }
- }
-
- /// Return true if the transaction was successful.
- pub fn is_success(&self) -> bool {
- self.status()
- }
-
- /// Returns the success status of the receipt's transaction.
- pub fn status(&self) -> bool {
- self.as_receipt().unwrap().status.coerce_status()
- }
-
- /// Returns the cumulative gas used at this receipt.
- pub fn cumulative_gas_used(&self) -> u64 {
- self.as_receipt().unwrap().cumulative_gas_used
- }
-
- /// Return the receipt logs.
- pub fn logs(&self) -> &[T] {
- &self.as_receipt().unwrap().logs
- }
-
- /// Return the receipt's bloom.
- pub const fn logs_bloom(&self) -> &Bloom {
- match self {
- Self::Legacy(t) => &t.logs_bloom,
- Self::Eip2930(t) => &t.logs_bloom,
- Self::Eip1559(t) => &t.logs_bloom,
- Self::Eip7702(t) => &t.logs_bloom,
- Self::Deposit(t) => &t.logs_bloom,
- }
- }
-
- /// Return the receipt's deposit_nonce if it is a deposit receipt.
- pub fn deposit_nonce(&self) -> Option {
- self.as_deposit_receipt().and_then(|r| r.deposit_nonce)
- }
-
- /// Return the receipt's deposit version if it is a deposit receipt.
- pub fn deposit_receipt_version(&self) -> Option {
- self.as_deposit_receipt().and_then(|r| r.deposit_receipt_version)
- }
-
- /// Returns the deposit receipt if it is a deposit receipt.
- pub const fn as_deposit_receipt_with_bloom(&self) -> Option<&OpDepositReceiptWithBloom> {
- match self {
- Self::Deposit(t) => Some(t),
- _ => None,
- }
- }
-
- /// Returns the deposit receipt if it is a deposit receipt.
- pub const fn as_deposit_receipt(&self) -> Option<&OpDepositReceipt> {
- match self {
- Self::Deposit(t) => Some(&t.receipt),
- _ => None,
- }
- }
-
- /// Return the inner receipt. Currently this is infallible, however, future
- /// receipt types may be added.
- pub const fn as_receipt(&self) -> Option<&Receipt> {
- match self {
- Self::Legacy(t) | Self::Eip2930(t) | Self::Eip1559(t) | Self::Eip7702(t) => {
- Some(&t.receipt)
- }
- Self::Deposit(t) => Some(&t.receipt.inner),
- }
- }
-}
-
-impl OpReceiptEnvelope {
- /// Get the length of the inner receipt in the 2718 encoding.
- pub fn inner_length(&self) -> usize {
- match self {
- Self::Legacy(t) => t.length(),
- Self::Eip2930(t) => t.length(),
- Self::Eip1559(t) => t.length(),
- Self::Eip7702(t) => t.length(),
- Self::Deposit(t) => t.length(),
- }
- }
-
- /// Calculate the length of the rlp payload of the network encoded receipt.
- pub fn rlp_payload_length(&self) -> usize {
- let length = self.inner_length();
- match self {
- Self::Legacy(_) => length,
- _ => length + 1,
- }
- }
-}
-
-impl TxReceipt for OpReceiptEnvelope
-where
- T: Clone + core::fmt::Debug + PartialEq + Eq + Send + Sync,
-{
- type Log = T;
-
- fn status_or_post_state(&self) -> Eip658Value {
- self.as_receipt().unwrap().status
- }
-
- fn status(&self) -> bool {
- self.as_receipt().unwrap().status.coerce_status()
- }
-
- /// Return the receipt's bloom.
- fn bloom(&self) -> Bloom {
- *self.logs_bloom()
- }
-
- fn bloom_cheap(&self) -> Option {
- Some(self.bloom())
- }
-
- /// Returns the cumulative gas used at this receipt.
- fn cumulative_gas_used(&self) -> u64 {
- self.as_receipt().unwrap().cumulative_gas_used
- }
-
- /// Return the receipt logs.
- fn logs(&self) -> &[T] {
- &self.as_receipt().unwrap().logs
- }
-}
-
-impl Encodable for OpReceiptEnvelope {
- fn encode(&self, out: &mut dyn alloy_rlp::BufMut) {
- self.network_encode(out)
- }
-
- fn length(&self) -> usize {
- let mut payload_length = self.rlp_payload_length();
- if !self.is_legacy() {
- payload_length += length_of_length(payload_length);
- }
- payload_length
- }
-}
-
-impl Decodable for OpReceiptEnvelope {
- fn decode(buf: &mut &[u8]) -> alloy_rlp::Result {
- Self::network_decode(buf)
- .map_or_else(|_| Err(alloy_rlp::Error::Custom("Unexpected type")), Ok)
- }
-}
-
-impl Encodable2718 for OpReceiptEnvelope {
- fn type_flag(&self) -> Option {
- match self {
- Self::Legacy(_) => None,
- Self::Eip2930(_) => Some(OpTxType::Eip2930 as u8),
- Self::Eip1559(_) => Some(OpTxType::Eip1559 as u8),
- Self::Eip7702(_) => Some(OpTxType::Eip7702 as u8),
- Self::Deposit(_) => Some(OpTxType::Deposit as u8),
- }
- }
-
- fn encode_2718_len(&self) -> usize {
- self.inner_length() + !self.is_legacy() as usize
- }
-
- fn encode_2718(&self, out: &mut dyn BufMut) {
- match self.type_flag() {
- None => {}
- Some(ty) => out.put_u8(ty),
- }
- match self {
- Self::Deposit(t) => t.encode(out),
- Self::Legacy(t) | Self::Eip2930(t) | Self::Eip1559(t) | Self::Eip7702(t) => {
- t.encode(out)
- }
- }
- }
-}
-
-impl Decodable2718 for OpReceiptEnvelope {
- fn typed_decode(ty: u8, buf: &mut &[u8]) -> Eip2718Result {
- match ty.try_into().map_err(|_| Eip2718Error::UnexpectedType(ty))? {
- OpTxType::Legacy => {
- Err(alloy_rlp::Error::Custom("type-0 eip2718 transactions are not supported")
- .into())
- }
- OpTxType::Eip1559 => Ok(Self::Eip1559(Decodable::decode(buf)?)),
- OpTxType::Eip7702 => Ok(Self::Eip7702(Decodable::decode(buf)?)),
- OpTxType::Eip2930 => Ok(Self::Eip2930(Decodable::decode(buf)?)),
- OpTxType::Deposit => Ok(Self::Deposit(Decodable::decode(buf)?)),
- }
- }
-
- fn fallback_decode(buf: &mut &[u8]) -> Eip2718Result {
- Ok(Self::Legacy(Decodable::decode(buf)?))
- }
-}
-
-#[cfg(all(test, feature = "arbitrary"))]
-impl<'a, T> arbitrary::Arbitrary<'a> for OpReceiptEnvelope
-where
- T: arbitrary::Arbitrary<'a>,
-{
- fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result {
- match u.int_in_range(0..=4)? {
- 0 => Ok(Self::Legacy(ReceiptWithBloom::arbitrary(u)?)),
- 1 => Ok(Self::Eip2930(ReceiptWithBloom::arbitrary(u)?)),
- 2 => Ok(Self::Eip1559(ReceiptWithBloom::arbitrary(u)?)),
- _ => Ok(Self::Deposit(OpDepositReceiptWithBloom::arbitrary(u)?)),
- }
- }
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use alloy_consensus::{Receipt, ReceiptWithBloom};
- use alloy_eips::eip2718::Encodable2718;
- use alloy_primitives::{address, b256, bytes, hex, Log, LogData};
- use alloy_rlp::Encodable;
-
- #[cfg(not(feature = "std"))]
- use alloc::vec;
-
- // Test vector from: https://eips.ethereum.org/EIPS/eip-2481
- #[test]
- fn encode_legacy_receipt() {
- let expected = hex!("f901668001b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f85ff85d940000000000000000000000000000000000000011f842a0000000000000000000000000000000000000000000000000000000000000deada0000000000000000000000000000000000000000000000000000000000000beef830100ff");
-
- let mut data = vec![];
- let receipt =
- OpReceiptEnvelope::Legacy(ReceiptWithBloom {
- receipt: Receipt {
- status: false.into(),
- cumulative_gas_used: 0x1,
- logs: vec![Log {
- address: address!("0000000000000000000000000000000000000011"),
- data: LogData::new_unchecked(
- vec![
- b256!("000000000000000000000000000000000000000000000000000000000000dead"),
- b256!("000000000000000000000000000000000000000000000000000000000000beef"),
- ],
- bytes!("0100ff"),
- ),
- }],
- },
- logs_bloom: [0; 256].into(),
- });
-
- receipt.network_encode(&mut data);
-
- // check that the rlp length equals the length of the expected rlp
- assert_eq!(receipt.length(), expected.len());
- assert_eq!(data, expected);
- }
-
- #[test]
- fn legacy_receipt_from_parts() {
- let receipt =
- OpReceiptEnvelope::from_parts(true, 100, vec![], OpTxType::Legacy, None, None);
- assert!(receipt.status());
- assert_eq!(receipt.cumulative_gas_used(), 100);
- assert_eq!(receipt.logs().len(), 0);
- assert_eq!(receipt.tx_type(), OpTxType::Legacy);
- }
-
- #[test]
- fn deposit_receipt_from_parts() {
- let receipt =
- OpReceiptEnvelope::from_parts(true, 100, vec![], OpTxType::Deposit, Some(1), Some(2));
- assert!(receipt.status());
- assert_eq!(receipt.cumulative_gas_used(), 100);
- assert_eq!(receipt.logs().len(), 0);
- assert_eq!(receipt.tx_type(), OpTxType::Deposit);
- assert_eq!(receipt.deposit_nonce(), Some(1));
- assert_eq!(receipt.deposit_receipt_version(), Some(2));
- }
-}
diff --git a/crates/consensus/src/receipt/mod.rs b/crates/consensus/src/receipt/mod.rs
deleted file mode 100644
index a259ee52..00000000
--- a/crates/consensus/src/receipt/mod.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-//! Receipt types for Optimism.
-
-use alloy_consensus::TxReceipt;
-
-mod envelope;
-pub use envelope::OpReceiptEnvelope;
-
-mod receipts;
-pub use receipts::{OpDepositReceipt, OpDepositReceiptWithBloom};
-
-/// Receipt is the result of a transaction execution.
-pub trait OpTxReceipt: TxReceipt {
- /// Returns the deposit nonce of the transaction.
- fn deposit_nonce(&self) -> Option;
-
- /// Returns the deposit receipt version of the transaction.
- fn deposit_receipt_version(&self) -> Option;
-}
diff --git a/crates/consensus/src/receipt/receipts.rs b/crates/consensus/src/receipt/receipts.rs
deleted file mode 100644
index 4a9ba7ed..00000000
--- a/crates/consensus/src/receipt/receipts.rs
+++ /dev/null
@@ -1,352 +0,0 @@
-//! Transaction receipt types for Optimism.
-
-use super::OpTxReceipt;
-use alloy_consensus::{
- Eip658Value, Receipt, ReceiptWithBloom, RlpDecodableReceipt, RlpEncodableReceipt, TxReceipt,
-};
-use alloy_primitives::{Bloom, Log};
-use alloy_rlp::{Buf, BufMut, Decodable, Encodable, Header};
-
-/// Receipt containing result of transaction execution.
-#[derive(Clone, Debug, PartialEq, Eq, Default)]
-#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
-#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
-pub struct OpDepositReceipt {
- /// The inner receipt type.
- #[cfg_attr(feature = "serde", serde(flatten))]
- pub inner: Receipt,
- /// Deposit nonce for Optimism deposit transactions
- #[cfg_attr(
- feature = "serde",
- serde(
- default,
- skip_serializing_if = "Option::is_none",
- with = "alloy_serde::quantity::opt"
- )
- )]
- pub deposit_nonce: Option,
- /// Deposit receipt version for Optimism deposit transactions
- ///
- /// The deposit receipt version was introduced in Canyon to indicate an update to how
- /// receipt hashes should be computed when set. The state transition process
- /// ensures this is only set for post-Canyon deposit transactions.
- #[cfg_attr(
- feature = "serde",
- serde(
- default,
- skip_serializing_if = "Option::is_none",
- with = "alloy_serde::quantity::opt"
- )
- )]
- pub deposit_receipt_version: Option,
-}
-
-impl OpDepositReceipt {
- /// Calculates [`Log`]'s bloom filter. this is slow operation and [OpDepositReceiptWithBloom]
- /// can be used to cache this value.
- pub fn bloom_slow(&self) -> Bloom {
- self.inner.logs.iter().collect()
- }
-
- /// Calculates the bloom filter for the receipt and returns the [OpDepositReceiptWithBloom]
- /// container type.
- pub fn with_bloom(self) -> OpDepositReceiptWithBloom {
- self.into()
- }
-}
-
-impl OpDepositReceipt {
- /// Returns length of RLP-encoded receipt fields with the given [`Bloom`] without an RLP header.
- pub fn rlp_encoded_fields_length_with_bloom(&self, bloom: &Bloom) -> usize {
- self.inner.rlp_encoded_fields_length_with_bloom(bloom)
- + self.deposit_nonce.map_or(0, |nonce| nonce.length())
- + self.deposit_receipt_version.map_or(0, |version| version.length())
- }
-
- /// RLP-encodes receipt fields with the given [`Bloom`] without an RLP header.
- pub fn rlp_encode_fields_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut) {
- self.inner.rlp_encode_fields_with_bloom(bloom, out);
-
- if let Some(nonce) = self.deposit_nonce {
- nonce.encode(out);
- }
- if let Some(version) = self.deposit_receipt_version {
- version.encode(out);
- }
- }
-
- /// Returns RLP header for this receipt encoding with the given [`Bloom`].
- pub fn rlp_header_with_bloom(&self, bloom: &Bloom) -> Header {
- Header { list: true, payload_length: self.rlp_encoded_fields_length_with_bloom(bloom) }
- }
-}
-
-impl OpDepositReceipt {
- /// RLP-decodes receipt's field with a [`Bloom`].
- ///
- /// Does not expect an RLP header.
- pub fn rlp_decode_fields_with_bloom(
- buf: &mut &[u8],
- ) -> alloy_rlp::Result> {
- let ReceiptWithBloom { receipt: inner, logs_bloom } =
- Receipt::rlp_decode_fields_with_bloom(buf)?;
-
- let deposit_nonce = (!buf.is_empty()).then(|| Decodable::decode(buf)).transpose()?;
- let deposit_receipt_version =
- (!buf.is_empty()).then(|| Decodable::decode(buf)).transpose()?;
-
- Ok(ReceiptWithBloom {
- logs_bloom,
- receipt: Self { inner, deposit_nonce, deposit_receipt_version },
- })
- }
-}
-
-impl AsRef> for OpDepositReceipt {
- fn as_ref(&self) -> &Receipt {
- &self.inner
- }
-}
-
-impl TxReceipt for OpDepositReceipt
-where
- T: AsRef + Clone + core::fmt::Debug + PartialEq + Eq + Send + Sync,
-{
- type Log = T;
-
- fn status_or_post_state(&self) -> Eip658Value {
- self.inner.status_or_post_state()
- }
-
- fn status(&self) -> bool {
- self.inner.status()
- }
-
- fn bloom(&self) -> Bloom {
- self.inner.bloom_slow()
- }
-
- fn cumulative_gas_used(&self) -> u64 {
- self.inner.cumulative_gas_used()
- }
-
- fn logs(&self) -> &[Self::Log] {
- self.inner.logs()
- }
-}
-
-impl RlpEncodableReceipt for OpDepositReceipt {
- fn rlp_encoded_length_with_bloom(&self, bloom: &Bloom) -> usize {
- self.rlp_header_with_bloom(bloom).length_with_payload()
- }
-
- fn rlp_encode_with_bloom(&self, bloom: &Bloom, out: &mut dyn BufMut) {
- self.rlp_header_with_bloom(bloom).encode(out);
- self.rlp_encode_fields_with_bloom(bloom, out);
- }
-}
-
-impl RlpDecodableReceipt for OpDepositReceipt {
- fn rlp_decode_with_bloom(buf: &mut &[u8]) -> alloy_rlp::Result> {
- let header = Header::decode(buf)?;
- if !header.list {
- return Err(alloy_rlp::Error::UnexpectedString);
- }
-
- if buf.len() < header.payload_length {
- return Err(alloy_rlp::Error::InputTooShort);
- }
-
- // Note: we pass a separate buffer to `rlp_decode_fields_with_bloom` to allow it decode
- // optional fields based on the remaining length.
- let mut fields_buf = &buf[..header.payload_length];
- let this = Self::rlp_decode_fields_with_bloom(&mut fields_buf)?;
-
- if !fields_buf.is_empty() {
- return Err(alloy_rlp::Error::UnexpectedLength);
- }
-
- buf.advance(header.payload_length);
-
- Ok(this)
- }
-}
-
-impl OpTxReceipt for OpDepositReceipt {
- fn deposit_nonce(&self) -> Option {
- self.deposit_nonce
- }
-
- fn deposit_receipt_version(&self) -> Option {
- self.deposit_receipt_version
- }
-}
-
-/// [`OpDepositReceipt`] with calculated bloom filter, modified for the OP Stack.
-///
-/// This convenience type allows us to lazily calculate the bloom filter for a
-/// receipt, similar to [`Sealed`].
-///
-/// [`Sealed`]: alloy_consensus::Sealed
-pub type OpDepositReceiptWithBloom = ReceiptWithBloom>;
-
-#[cfg(any(test, feature = "arbitrary"))]
-impl<'a, T> arbitrary::Arbitrary<'a> for OpDepositReceipt
-where
- T: arbitrary::Arbitrary<'a>,
-{
- fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result {
- #[cfg(not(feature = "std"))]
- use alloc::vec::Vec;
- let deposit_nonce = Option::::arbitrary(u)?;
- let deposit_receipt_version =
- deposit_nonce.is_some().then(|| u64::arbitrary(u)).transpose()?;
- Ok(Self {
- inner: Receipt {
- status: Eip658Value::arbitrary(u)?,
- cumulative_gas_used: u64::arbitrary(u)?,
- logs: Vec::::arbitrary(u)?,
- },
- deposit_nonce,
- deposit_receipt_version,
- })
- }
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
- use alloy_consensus::Receipt;
- use alloy_primitives::{address, b256, bytes, hex, Bytes, Log, LogData};
- use alloy_rlp::{Decodable, Encodable};
-
- #[cfg(not(feature = "std"))]
- use alloc::{vec, vec::Vec};
-
- // Test vector from: https://eips.ethereum.org/EIPS/eip-2481
- #[test]
- fn decode_legacy_receipt() {
- let data = hex!("f901668001b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f85ff85d940000000000000000000000000000000000000011f842a0000000000000000000000000000000000000000000000000000000000000deada0000000000000000000000000000000000000000000000000000000000000beef830100ff");
-
- // EIP658Receipt
- let expected =
- OpDepositReceiptWithBloom {
- receipt: OpDepositReceipt {
- inner: Receipt {
- status: false.into(),
- cumulative_gas_used: 0x1,
- logs: vec![Log {
- address: address!("0000000000000000000000000000000000000011"),
- data: LogData::new_unchecked(
- vec![
- b256!("000000000000000000000000000000000000000000000000000000000000dead"),
- b256!("000000000000000000000000000000000000000000000000000000000000beef"),
- ],
- bytes!("0100ff"),
- ),
- }],
- },
- deposit_nonce: None,
- deposit_receipt_version: None,
- },
- logs_bloom: [0; 256].into(),
- };
-
- let receipt = OpDepositReceiptWithBloom::decode(&mut &data[..]).unwrap();
- assert_eq!(receipt, expected);
- }
-
- #[test]
- fn gigantic_receipt() {
- let receipt = OpDepositReceipt {
- inner: Receipt {
- cumulative_gas_used: 16747627,
- status: true.into(),
- logs: vec![
- Log {
- address: address!("4bf56695415f725e43c3e04354b604bcfb6dfb6e"),
- data: LogData::new_unchecked(
- vec![b256!(
- "c69dc3d7ebff79e41f525be431d5cd3cc08f80eaf0f7819054a726eeb7086eb9"
- )],
- Bytes::from(vec![1; 0xffffff]),
- ),
- },
- Log {
- address: address!("faca325c86bf9c2d5b413cd7b90b209be92229c2"),
- data: LogData::new_unchecked(
- vec![b256!(
- "8cca58667b1e9ffa004720ac99a3d61a138181963b294d270d91c53d36402ae2"
- )],
- Bytes::from(vec![1; 0xffffff]),
- ),
- },
- ],
- },
- deposit_nonce: None,
- deposit_receipt_version: None,
- }
- .with_bloom();
-
- let mut data = vec![];
-
- receipt.encode(&mut data);
- let decoded = OpDepositReceiptWithBloom::decode(&mut &data[..]).unwrap();
-
- // receipt.clone().to_compact(&mut data);
- // let (decoded, _) = Receipt::from_compact(&data[..], data.len());
- assert_eq!(decoded, receipt);
- }
-
- #[test]
- fn regolith_receipt_roundtrip() {
- let data = hex!("f9010c0182b741b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0833d3bbf");
-
- // Deposit Receipt (post-regolith)
- let expected = OpDepositReceiptWithBloom {
- receipt: OpDepositReceipt {
- inner: Receipt:: {
- cumulative_gas_used: 46913,
- logs: vec![],
- status: true.into(),
- },
- deposit_nonce: Some(4012991),
- deposit_receipt_version: None,
- },
- logs_bloom: [0; 256].into(),
- };
-
- let receipt = OpDepositReceiptWithBloom::decode(&mut &data[..]).unwrap();
- assert_eq!(receipt, expected);
-
- let mut buf = Vec::new();
- receipt.encode(&mut buf);
- assert_eq!(buf, &data[..]);
- }
-
- #[test]
- fn post_canyon_receipt_roundtrip() {
- let data = hex!("f9010d0182b741b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0833d3bbf01");
-
- // Deposit Receipt (post-regolith)
- let expected = OpDepositReceiptWithBloom {
- receipt: OpDepositReceipt {
- inner: Receipt:: {
- cumulative_gas_used: 46913,
- logs: vec![],
- status: true.into(),
- },
- deposit_nonce: Some(4012991),
- deposit_receipt_version: Some(1),
- },
- logs_bloom: [0; 256].into(),
- };
-
- let receipt = OpDepositReceiptWithBloom::decode(&mut &data[..]).unwrap();
- assert_eq!(receipt, expected);
-
- let mut buf = Vec::new();
- expected.encode(&mut buf);
- assert_eq!(buf, &data[..]);
- }
-}
diff --git a/crates/consensus/src/transaction/deposit.rs b/crates/consensus/src/transaction/deposit.rs
deleted file mode 100644
index 75149600..00000000
--- a/crates/consensus/src/transaction/deposit.rs
+++ /dev/null
@@ -1,671 +0,0 @@
-//! Deposit Transaction type.
-
-use super::OpTxType;
-use crate::DepositTransaction;
-use alloc::vec::Vec;
-use alloy_consensus::{Sealable, Transaction, Typed2718};
-use alloy_eips::{
- eip2718::{Decodable2718, Eip2718Error, Eip2718Result, Encodable2718},
- eip2930::AccessList,
-};
-use alloy_primitives::{
- keccak256, Address, Bytes, ChainId, PrimitiveSignature as Signature, TxHash, TxKind, B256, U256,
-};
-use alloy_rlp::{
- Buf, BufMut, Decodable, Encodable, Error as DecodeError, Header, EMPTY_STRING_CODE,
-};
-use core::mem;
-
-/// Deposit transactions, also known as deposits are initiated on L1, and executed on L2.
-#[derive(Debug, Clone, PartialEq, Eq, Hash, Default)]
-#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
-#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
-#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
-pub struct TxDeposit {
- /// Hash that uniquely identifies the source of the deposit.
- pub source_hash: B256,
- /// The address of the sender account.
- pub from: Address,
- /// The address of the recipient account, or the null (zero-length) address if the deposited
- /// transaction is a contract creation.
- #[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "TxKind::is_create"))]
- pub to: TxKind,
- /// The ETH value to mint on L2.
- #[cfg_attr(feature = "serde", serde(default, with = "alloy_serde::quantity::opt"))]
- pub mint: Option,
- /// The ETH value to send to the recipient account.
- pub value: U256,
- /// The gas limit for the L2 transaction.
- #[cfg_attr(feature = "serde", serde(with = "alloy_serde::quantity", rename = "gas"))]
- pub gas_limit: u64,
- /// Field indicating if this transaction is exempt from the L2 gas limit.
- #[cfg_attr(
- feature = "serde",
- serde(
- default,
- with = "alloy_serde::quantity",
- rename = "isSystemTx",
- skip_serializing_if = "core::ops::Not::not"
- )
- )]
- pub is_system_transaction: bool,
- /// Input has two uses depending if transaction is Create or Call (if `to` field is None or
- /// Some).
- pub input: Bytes,
-}
-
-impl DepositTransaction for TxDeposit {
- fn source_hash(&self) -> Option {
- Some(self.source_hash)
- }
-
- fn mint(&self) -> Option {
- self.mint
- }
-
- fn is_system_transaction(&self) -> bool {
- self.is_system_transaction
- }
-
- fn is_deposit(&self) -> bool {
- true
- }
-}
-
-impl TxDeposit {
- /// Decodes the inner [TxDeposit] fields from RLP bytes.
- ///
- /// NOTE: This assumes a RLP header has already been decoded, and _just_ decodes the following
- /// RLP fields in the following order:
- ///
- /// - `source_hash`
- /// - `from`
- /// - `to`
- /// - `mint`
- /// - `value`
- /// - `gas_limit`
- /// - `is_system_transaction`
- /// - `input`
- pub fn rlp_decode_fields(buf: &mut &[u8]) -> alloy_rlp::Result {
- Ok(Self {
- source_hash: Decodable::decode(buf)?,
- from: Decodable::decode(buf)?,
- to: Decodable::decode(buf)?,
- mint: if *buf.first().ok_or(DecodeError::InputTooShort)? == EMPTY_STRING_CODE {
- buf.advance(1);
- None
- } else {
- Some(Decodable::decode(buf)?)
- },
- value: Decodable::decode(buf)?,
- gas_limit: Decodable::decode(buf)?,
- is_system_transaction: Decodable::decode(buf)?,
- input: Decodable::decode(buf)?,
- })
- }
-
- /// Decodes the transaction from RLP bytes.
- pub fn rlp_decode(buf: &mut &[u8]) -> alloy_rlp::Result {
- let header = Header::decode(buf)?;
- if !header.list {
- return Err(alloy_rlp::Error::UnexpectedString);
- }
- let remaining = buf.len();
-
- if header.payload_length > remaining {
- return Err(alloy_rlp::Error::InputTooShort);
- }
-
- let this = Self::rlp_decode_fields(buf)?;
-
- if buf.len() + header.payload_length != remaining {
- return Err(alloy_rlp::Error::UnexpectedLength);
- }
-
- Ok(this)
- }
-
- /// Outputs the length of the transaction's fields, without a RLP header or length of the
- /// eip155 fields.
- pub(crate) fn rlp_encoded_fields_length(&self) -> usize {
- self.source_hash.length()
- + self.from.length()
- + self.to.length()
- + self.mint.map_or(1, |mint| mint.length())
- + self.value.length()
- + self.gas_limit.length()
- + self.is_system_transaction.length()
- + self.input.0.length()
- }
-
- /// Encodes only the transaction's fields into the desired buffer, without a RLP header.
- ///
- pub(crate) fn rlp_encode_fields(&self, out: &mut dyn alloy_rlp::BufMut) {
- self.source_hash.encode(out);
- self.from.encode(out);
- self.to.encode(out);
- if let Some(mint) = self.mint {
- mint.encode(out);
- } else {
- out.put_u8(EMPTY_STRING_CODE);
- }
- self.value.encode(out);
- self.gas_limit.encode(out);
- self.is_system_transaction.encode(out);
- self.input.encode(out);
- }
-
- /// Calculates a heuristic for the in-memory size of the [TxDeposit] transaction.
- #[inline]
- pub fn size(&self) -> usize {
- mem::size_of::() + // source_hash
- mem::size_of::() + // from
- self.to.size() + // to
- mem::size_of::