Skip to content

Commit

Permalink
Add a create-contract-filter feature to pallet-evm-tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Feb 10, 2025
1 parent bf819de commit cdff7ed
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
29 changes: 20 additions & 9 deletions domains/pallets/evm-tracker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,39 @@ codec = { package = "parity-scale-codec", version = "3.6.12", default-features =
domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtime", default-features = false }
frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "94a1a8143a89bbe9f938c1939ff68abc1519a305" }
frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "94a1a8143a89bbe9f938c1939ff68abc1519a305" }
pallet-ethereum = { default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "94a1a8143a89bbe9f938c1939ff68abc1519a305" }
scale-info = { version = "2.11.2", default-features = false, features = ["derive"] }
sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "94a1a8143a89bbe9f938c1939ff68abc1519a305" }
sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" }
sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "94a1a8143a89bbe9f938c1939ff68abc1519a305" }
subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false }

# optional contract creation filter dependencies
pallet-ethereum = { default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", optional = true }
pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968", optional = true }
pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "94a1a8143a89bbe9f938c1939ff68abc1519a305", optional = true }
subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives", default-features = false, optional = true }

[features]
default = ["std"]
default = [
"std",
"create-contract-filter",
]
create-contract-filter = [
"pallet-ethereum",
"pallet-evm",
"pallet-utility",
"subspace-runtime-primitives",
]
std = [
"codec/std",
"domain-runtime-primitives/std",
"frame-support/std",
"frame-system/std",
"pallet-ethereum/std",
"pallet-evm/std",
"pallet-utility/std",
"pallet-ethereum?/std",
"pallet-evm?/std",
"pallet-utility?/std",
"scale-info/std",
"sp-core/std",
"sp-domains/std",
"sp-runtime/std",
"subspace-runtime-primitives/std",
"subspace-runtime-primitives?/std",
]
2 changes: 1 addition & 1 deletion domains/pallets/evm-tracker/src/create_contract.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Contract creation allow list implementations
//! Contract creation allow list filtering implementations.
use crate::traits::{AccountIdFor, MaybeIntoEthCall, MaybeIntoEvmCall};
use codec::{Decode, Encode};
Expand Down
2 changes: 2 additions & 0 deletions domains/pallets/evm-tracker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
extern crate alloc;

mod check_nonce;
#[cfg(feature = "create-contract-filter")]
pub mod create_contract;
#[cfg(feature = "create-contract-filter")]
pub mod traits;

pub use check_nonce::CheckNonce;
Expand Down
2 changes: 1 addition & 1 deletion domains/runtime/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pallet-domain-sudo = { version = "0.1.0", path = "../../pallets/domain-sudo", de
pallet-ethereum = { default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm-tracker = { version = "0.1.0", path = "../../pallets/evm-tracker", default-features = false }
pallet-evm-tracker = { version = "0.1.0", path = "../../pallets/evm-tracker", default-features = false, features = ["create-contract-filter"] }
pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
Expand Down
2 changes: 1 addition & 1 deletion domains/test/runtime/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pallet-domain-sudo = { version = "0.1.0", path = "../../../pallets/domain-sudo",
pallet-ethereum = { default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm = { version = "6.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm-chain-id = { version = "1.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm-tracker = { version = "0.1.0", path = "../../../pallets/evm-tracker", default-features = false }
pallet-evm-tracker = { version = "0.1.0", path = "../../../pallets/evm-tracker", default-features = false, features = ["create-contract-filter"] }
pallet-evm-precompile-modexp = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm-precompile-sha3fips = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
pallet-evm-precompile-simple = { version = "2.0.0-dev", default-features = false, git = "https://github.com/autonomys/frontier", rev = "f80f9e2bad338f3bf3854b256b3c4edea23e5968" }
Expand Down

0 comments on commit cdff7ed

Please sign in to comment.