From bce3a5c64cafc9dc4ca18d08fbb4991656513ef6 Mon Sep 17 00:00:00 2001 From: Dino Pacandi Date: Mon, 15 Apr 2024 17:42:30 +0900 Subject: [PATCH] Comments --- Cargo.lock | 48 +++++++++++++-------------- pallets/ethereum-checked/src/tests.rs | 12 ++----- 2 files changed, 26 insertions(+), 34 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 850064c940..a17726640b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4179,7 +4179,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "async-trait", "fp-storage", @@ -4191,7 +4191,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "async-trait", "fp-consensus", @@ -4207,7 +4207,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "async-trait", "fc-api", @@ -4228,7 +4228,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "fc-db", "fc-storage", @@ -4249,7 +4249,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "ethereum", "ethereum-types", @@ -4303,7 +4303,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "ethereum", "ethereum-types", @@ -4316,7 +4316,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "ethereum", "ethereum-types", @@ -4481,7 +4481,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "hex", "impl-serde", @@ -4500,7 +4500,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "ethereum", "parity-scale-codec", @@ -4512,7 +4512,7 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "ethereum", "ethereum-types", @@ -4525,7 +4525,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "evm", "frame-support", @@ -4541,7 +4541,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "ethereum", "ethereum-types", @@ -4558,7 +4558,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "frame-support", "parity-scale-codec", @@ -4570,7 +4570,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "parity-scale-codec", "serde", @@ -8564,7 +8564,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "ethereum", "ethereum-types", @@ -8612,7 +8612,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "environmental", "evm", @@ -8638,7 +8638,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "frame-support", "frame-system", @@ -8675,7 +8675,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "fp-evm", ] @@ -8683,7 +8683,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "fp-evm", "sp-core", @@ -8721,7 +8721,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "fp-evm", "frame-support", @@ -8759,7 +8759,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-ed25519" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "ed25519-dalek", "fp-evm", @@ -8768,7 +8768,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "fp-evm", "num", @@ -8777,7 +8777,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "fp-evm", "tiny-keccak", @@ -8786,7 +8786,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#73d814d42ed30e9b896adeff1cb2429bd465e82e" +source = "git+https://github.com/AstarNetwork/frontier?branch=polkadot-v1.3.0#198d640a72a957ca94cdbee3c4416598dd45ec6d" dependencies = [ "fp-evm", "ripemd", diff --git a/pallets/ethereum-checked/src/tests.rs b/pallets/ethereum-checked/src/tests.rs index 620d80772e..e037265883 100644 --- a/pallets/ethereum-checked/src/tests.rs +++ b/pallets/ethereum-checked/src/tests.rs @@ -32,14 +32,6 @@ fn bounded_input(data: &'static str) -> EthereumTxInput { .expect("input too large") } -// A hacky way to get around crate pub visibility of the storage item. -#[frame_support::storage_alias] -type Pending = StorageValue< - pallet_ethereum::Pallet, - Vec<(Transaction, TransactionStatus, Receipt)>, - ValueQuery, ->; - #[test] fn transact_works() { ExtBuilder::default().build().execute_with(|| { @@ -61,7 +53,7 @@ fn transact_works() { RawOrigin::XcmEthereumTx(ALICE).into(), store_tx )); - let pending = Pending::::get(); + let pending = pallet_ethereum::Pending::::get(); assert_eq!(pending.len(), 2); match pending[0] { @@ -152,7 +144,7 @@ fn no_hash_collision() { )); } - let mut tx_hashes = Pending::::get() + let mut tx_hashes = pallet_ethereum::Pending::::get() .iter() .map(|(tx, _, _)| tx.hash()) .collect::>();