Skip to content

Commit

Permalink
Test EvmSystem migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrylavrenov committed Jan 22, 2025
1 parent 4260cdb commit 3348fbc
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 46 deletions.
50 changes: 25 additions & 25 deletions Cargo.lock

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

42 changes: 21 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,27 +142,27 @@ substrate-wasm-builder = { git = "https://github.com/humanode-network/substrate"
try-runtime-cli = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }

# Frontier fork.
fc-cli = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fc-consensus = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fc-db = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fc-mapping-sync = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fc-rpc = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fc-rpc-core = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fc-storage = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fp-evm = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fp-rpc = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fp-self-contained = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fp-storage = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
pallet-ethereum = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
pallet-evm = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
pallet-evm-balances = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
pallet-evm-precompile-blake2 = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
pallet-evm-precompile-bn128 = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
pallet-evm-precompile-modexp = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
pallet-evm-precompile-sha3fips = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
pallet-evm-precompile-simple = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
pallet-evm-system = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
pallet-evm-test-vector-support = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false }
fc-cli = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
fc-consensus = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
fc-db = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
fc-mapping-sync = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
fc-rpc = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
fc-rpc-core = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
fc-storage = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
fp-evm = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
fp-rpc = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
fp-self-contained = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
fp-storage = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
pallet-ethereum = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
pallet-evm = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
pallet-evm-balances = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
pallet-evm-precompile-blake2 = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
pallet-evm-precompile-bn128 = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
pallet-evm-precompile-modexp = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
pallet-evm-precompile-sha3fips = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
pallet-evm-precompile-simple = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
pallet-evm-system = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }
pallet-evm-test-vector-support = { git = "https://github.com/humanode-network/frontier", branch = "h-polkadot-v0.9.42-evm-system-has-code-migrations", default-features = false }

[profile.release]
debug = "line-tables-only"
Expand Down
10 changes: 10 additions & 0 deletions crates/humanode-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,15 @@ pub type UncheckedExtrinsic =
/// The payload being signed in transactions.
pub type SignedPayload = generic::SignedPayload<RuntimeCall, SignedExtra>;

/// Evm provider.
pub struct EvmProvider;

impl pallet_evm_system::migrations::v1::EvmProvider<EvmAccountId> for EvmProvider {
fn is_managed_by_evm(account_id: &EvmAccountId) -> bool {
pallet_evm::AccountCodes::<Runtime>::contains_key(account_id)
}
}

/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
Runtime,
Expand All @@ -887,6 +896,7 @@ pub type Executive = frame_executive::Executive<
BalancedCurrencySwapBridgesInitializer,
Runtime,
>,
pallet_evm_system::migrations::v1::MigrationV0ToV1<EvmProvider, Runtime>,
),
>;

Expand Down

0 comments on commit 3348fbc

Please sign in to comment.