diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b357789..ae9987f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,6 @@ permissions: {} on: push: - branches: [main] pull_request: env: diff --git a/Cargo.toml b/Cargo.toml index f6418f97..a6b3d616 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,6 +39,7 @@ alloy-evm = { version = "0.37.0", path = "crates/evm", default-features = false # alloy alloy-eip2124 = { version = "0.2", default-features = false } +alloy-eip7928 = { version = "0.4.1", default-features = false } alloy-chains = { version = "0.2.0", default-features = false } alloy-eips = { version = "2.0.0", default-features = false } alloy-consensus = { version = "2.0.0", default-features = false } @@ -61,3 +62,8 @@ serde = { version = "1", default-features = false, features = ["derive"] } thiserror = { version = "2.0.0", default-features = false } serde_json = "1" test-case = "3" + +[patch.crates-io] +alloy-hardforks = { git = "https://github.com/Rimeeeeee/hardforks", branch = "eip-8268" } +alloy-eip7928 = { git = "https://github.com/Rimeeeeee/eips", branch = "eip-8268" } +revm = { git = "https://github.com/Rimeeeeee/revm", branch = "eip-8268" } \ No newline at end of file diff --git a/crates/evm/src/eth/spec_id.rs b/crates/evm/src/eth/spec_id.rs index 2791aa19..f21488db 100644 --- a/crates/evm/src/eth/spec_id.rs +++ b/crates/evm/src/eth/spec_id.rs @@ -21,7 +21,9 @@ pub fn spec_by_timestamp_and_block_number( where C: EthereumHardforks, { - if chain_spec.is_amsterdam_active_at_timestamp(timestamp) { + if chain_spec.is_bogota_active_at_timestamp(timestamp) { + SpecId::BOGOTA + } else if chain_spec.is_amsterdam_active_at_timestamp(timestamp) { SpecId::AMSTERDAM } else if chain_spec.is_osaka_active_at_timestamp(timestamp) { SpecId::OSAKA @@ -85,6 +87,10 @@ mod tests { Self::from_timestamp_zero(EthereumHardfork::Amsterdam) } + fn bogota() -> Self { + Self::from_timestamp_zero(EthereumHardfork::Bogota) + } + fn prague() -> Self { Self::from_timestamp_zero(EthereumHardfork::Prague) } @@ -150,6 +156,7 @@ mod tests { #[test_case::test_case(FakeHardfork::osaka(), SpecId::OSAKA; "Osaka")] #[test_case::test_case(FakeHardfork::amsterdam(), SpecId::AMSTERDAM; "Amsterdam")] + #[test_case::test_case(FakeHardfork::bogota(), SpecId::BOGOTA; "Bogota")] #[test_case::test_case(FakeHardfork::prague(), SpecId::PRAGUE; "Prague")] #[test_case::test_case(FakeHardfork::cancun(), SpecId::CANCUN; "Cancun")] #[test_case::test_case(FakeHardfork::shanghai(), SpecId::SHANGHAI; "Shanghai")]