Skip to content

Commit

Permalink
Rename pallet_evm_nonce_tracker to pallet-evm-tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Jan 20, 2025
1 parent c3b4bd3 commit 27ca2d0
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 33 deletions.
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions crates/sp-domains/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1074,10 +1074,10 @@ pub(crate) fn evm_chain_id_storage_key() -> StorageKey {
pub(crate) fn evm_contract_creation_allowed_by_storage_key() -> StorageKey {
StorageKey(
storage_prefix(
// This is the name used for `pallet_evm_nonce_tracker` in the `construct_runtime` macro
// i.e. `EVMNoncetracker: pallet_evm_nonce_tracker = 84,`
// This is the name used for `pallet_evm_tracker` in the `construct_runtime` macro
// i.e. `EVMNoncetracker: pallet_evm_tracker = 84,`
"EVMNoncetracker".as_bytes(),
// This is the storage item name used inside `pallet_evm_nonce_tracker`
// This is the storage item name used inside `pallet_evm_tracker`
"ContractCreationAllowedBy".as_bytes(),
)
.to_vec(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "pallet-evm-nonce-tracker"
name = "pallet-evm-tracker"
version = "0.1.0"
authors = ["Subspace Labs <https://subspace.network>"]
edition = "2021"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions domains/runtime/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,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-nonce-tracker = { version = "0.1.0", path = "../../pallets/evm_nonce_tracker", default-features = false }
pallet-evm-tracker = { version = "0.1.0", path = "../../pallets/evm-tracker", default-features = false }
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 Expand Up @@ -99,7 +99,7 @@ std = [
"pallet-ethereum/std",
"pallet-evm/std",
"pallet-evm-chain-id/std",
"pallet-evm-nonce-tracker/std",
"pallet-evm-tracker/std",
"pallet-evm-precompile-modexp/std",
"pallet-evm-precompile-sha3fips/std",
"pallet-evm-precompile-simple/std",
Expand Down
12 changes: 6 additions & 6 deletions domains/runtime/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ type CustomSignedExtra = (
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckMortality<Runtime>,
pallet_evm_nonce_tracker::CheckNonce<Runtime>,
pallet_evm_tracker::CheckNonce<Runtime>,
domain_check_weight::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
CheckContractCreation,
Expand Down Expand Up @@ -155,7 +155,7 @@ const MAX_CONTRACT_RECURSION_DEPTH: u16 = 5;
/// Otherwise, returns true.
pub fn is_create_contract_allowed(call: &RuntimeCall, signer: &AccountId) -> bool {
// Only enter recursive code if this account can't create contracts
if !pallet_evm_nonce_tracker::Pallet::<Runtime>::is_allowed_to_create_contracts(signer)
if !pallet_evm_tracker::Pallet::<Runtime>::is_allowed_to_create_contracts(signer)
&& is_create_contract(call, MAX_CONTRACT_RECURSION_DEPTH)
{
return false;
Expand All @@ -170,7 +170,7 @@ pub fn is_create_contract_allowed(call: &RuntimeCall, signer: &AccountId) -> boo
/// list. Otherwise, returns true.
pub fn is_create_unsigned_contract_allowed(call: &RuntimeCall) -> bool {
// Only enter recursive code if unsigned contracts can't be created
if !pallet_evm_nonce_tracker::Pallet::<Runtime>::is_allowed_to_create_unsigned_contracts()
if !pallet_evm_tracker::Pallet::<Runtime>::is_allowed_to_create_unsigned_contracts()
&& is_create_contract(call, MAX_CONTRACT_RECURSION_DEPTH)
{
return false;
Expand Down Expand Up @@ -835,7 +835,7 @@ impl pallet_evm::Config for Runtime {
type WeightInfo = pallet_evm::weights::SubstrateWeight<Self>;
}

impl pallet_evm_nonce_tracker::Config for Runtime {}
impl pallet_evm_tracker::Config for Runtime {}

parameter_types! {
pub const PostOnlyBlockHash: PostLogContent = PostLogContent::OnlyBlockHash;
Expand Down Expand Up @@ -933,7 +933,7 @@ construct_runtime!(
EVM: pallet_evm = 81,
EVMChainId: pallet_evm_chain_id = 82,
BaseFee: pallet_base_fee = 83,
EVMNoncetracker: pallet_evm_nonce_tracker = 84,
EVMNoncetracker: pallet_evm_tracker = 84,

// domain instance stuff
SelfDomainId: pallet_domain_id = 90,
Expand Down Expand Up @@ -1156,7 +1156,7 @@ fn check_transaction_and_do_pre_dispatch_inner(
extra.2,
extra.3,
extra.4,
pallet_evm_nonce_tracker::CheckNonce::from(extra.5 .0),
pallet_evm_tracker::CheckNonce::from(extra.5 .0),
extra.6,
extra.7,
extra.8,
Expand Down
4 changes: 2 additions & 2 deletions domains/test/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",
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-nonce-tracker = { version = "0.1.0", path = "../../../pallets/evm_nonce_tracker", default-features = false }
pallet-evm-tracker = { version = "0.1.0", path = "../../../pallets/evm-tracker", default-features = false }
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 Expand Up @@ -93,7 +93,7 @@ std = [
"pallet-ethereum/std",
"pallet-evm/std",
"pallet-evm-chain-id/std",
"pallet-evm-nonce-tracker/std",
"pallet-evm-tracker/std",
"pallet-evm-precompile-modexp/std",
"pallet-evm-precompile-sha3fips/std",
"pallet-evm-precompile-simple/std",
Expand Down
8 changes: 4 additions & 4 deletions domains/test/runtime/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ type CustomSignedExtra = (
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckMortality<Runtime>,
pallet_evm_nonce_tracker::CheckNonce<Runtime>,
pallet_evm_tracker::CheckNonce<Runtime>,
domain_check_weight::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
);
Expand Down Expand Up @@ -645,7 +645,7 @@ impl pallet_evm::OnChargeEVMTransaction<Runtime> for EVMCurrencyAdapter {
}
}

impl pallet_evm_nonce_tracker::Config for Runtime {}
impl pallet_evm_tracker::Config for Runtime {}

impl pallet_evm::Config for Runtime {
type FeeCalculator = BaseFee;
Expand Down Expand Up @@ -756,7 +756,7 @@ construct_runtime!(
EVM: pallet_evm = 81,
EVMChainId: pallet_evm_chain_id = 82,
BaseFee: pallet_base_fee = 83,
EVMNoncetracker: pallet_evm_nonce_tracker = 84,
EVMNoncetracker: pallet_evm_tracker = 84,

// domain instance stuff
SelfDomainId: pallet_domain_id = 90,
Expand Down Expand Up @@ -969,7 +969,7 @@ fn check_transaction_and_do_pre_dispatch_inner(
extra.2,
extra.3,
extra.4,
pallet_evm_nonce_tracker::CheckNonce::from(extra.5 .0),
pallet_evm_tracker::CheckNonce::from(extra.5 .0),
extra.6,
extra.7,
);
Expand Down

0 comments on commit 27ca2d0

Please sign in to comment.