diff --git a/Cargo.lock b/Cargo.lock index da80905d2..d7cba4bf4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2668,7 +2668,7 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fc-cli" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "clap", "ethereum-types", @@ -2686,7 +2686,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "async-trait", "fp-consensus", @@ -2702,7 +2702,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "async-trait", "ethereum", @@ -2732,7 +2732,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "fc-db", "fc-storage", @@ -2755,7 +2755,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "ethereum", "ethereum-types", @@ -2805,7 +2805,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "ethereum", "ethereum-types", @@ -2818,7 +2818,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "ethereum", "ethereum-types", @@ -2996,7 +2996,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "hex", "impl-serde", @@ -3015,7 +3015,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "ethereum", "parity-scale-codec", @@ -3027,7 +3027,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "ethereum", "ethereum-types", @@ -3041,7 +3041,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "evm", "frame-support", @@ -3056,7 +3056,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "ethereum", "ethereum-types", @@ -3073,7 +3073,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "frame-support", "parity-scale-codec", @@ -3085,7 +3085,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "parity-scale-codec", "serde", @@ -4198,7 +4198,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.13", - "socket2 0.4.10", + "socket2 0.5.5", "tokio", "tower-service", "tracing", @@ -6477,7 +6477,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "ethereum", "ethereum-types", @@ -6513,7 +6513,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "environmental", "evm", @@ -6553,7 +6553,7 @@ dependencies = [ [[package]] name = "pallet-evm-balances" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "frame-support", "frame-system", @@ -6567,7 +6567,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "fp-evm", ] @@ -6575,7 +6575,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "fp-evm", "sp-core", @@ -6585,7 +6585,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "fp-evm", "num", @@ -6594,7 +6594,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "fp-evm", "tiny-keccak", @@ -6603,7 +6603,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "fp-evm", "ripemd", @@ -6613,7 +6613,7 @@ dependencies = [ [[package]] name = "pallet-evm-system" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "fp-evm", "frame-support", @@ -6628,7 +6628,7 @@ dependencies = [ [[package]] name = "pallet-evm-test-vector-support" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" +source = "git+https://github.com/humanode-network/frontier?branch=h-polkadot-v0.9.42-evm-system-has-code-migrations#c2c4bb7683b7d41ad2d69314c7ba4617ae8715ba" dependencies = [ "evm", "fp-evm", diff --git a/Cargo.toml b/Cargo.toml index d3b021771..64676ec57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 10eb56475..f8d6fd1f1 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -874,6 +874,15 @@ pub type UncheckedExtrinsic = /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; +/// Evm provider. +pub struct EvmProvider; + +impl pallet_evm_system::migrations::v1::EvmProvider for EvmProvider { + fn is_managed_by_evm(account_id: &EvmAccountId) -> bool { + pallet_evm::AccountCodes::::contains_key(account_id) + } +} + /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -887,6 +896,7 @@ pub type Executive = frame_executive::Executive< BalancedCurrencySwapBridgesInitializer, Runtime, >, + pallet_evm_system::migrations::v1::MigrationV0ToV1, ), >;