From 33439a04774d4522787b0676a87c3e20ac4ec1f8 Mon Sep 17 00:00:00 2001 From: Carlos Lostao Date: Wed, 15 Nov 2023 18:57:01 +0100 Subject: [PATCH] fix: importing encoding traits --- node/src/eth.rs | 2 ++ node/src/rpc/eth.rs | 1 - pallets/custom-balances/Cargo.toml | 4 ++-- pallets/custom-balances/src/lib.rs | 2 +- pallets/dnt-fee-controller/Cargo.toml | 4 ++-- pallets/erc20-manager/Cargo.toml | 4 ++-- pallets/fee-rewards-vault/Cargo.toml | 4 ++-- pallets/root-controller/Cargo.toml | 4 ++-- pallets/sponsored-transactions/Cargo.toml | 4 ++-- .../supported-tokens-manager/Cargo.toml | 4 ++-- pallets/token-fee-controller/user-fee-selector/Cargo.toml | 4 ++-- .../token-fee-controller/validator-fee-selector/Cargo.toml | 4 ++-- pallets/upgrade-runtime-proposal/Cargo.toml | 4 ++-- pallets/validator-keys-controller/Cargo.toml | 4 ++-- pallets/validator-set/Cargo.toml | 4 ++-- pallets/zero-gas-transactions/Cargo.toml | 4 ++-- test-utils/stability-tracing/Cargo.toml | 6 +++--- test-utils/stability-tracing/src/types.rs | 2 +- 18 files changed, 33 insertions(+), 32 deletions(-) diff --git a/node/src/eth.rs b/node/src/eth.rs index f02f627..4a1b202 100644 --- a/node/src/eth.rs +++ b/node/src/eth.rs @@ -47,6 +47,7 @@ pub enum EthApi { Txpool, Debug, Trace, + None, } impl FromStr for EthApi { @@ -57,6 +58,7 @@ impl FromStr for EthApi { "txpool" => Self::Txpool, "debug" => Self::Debug, "trace" => Self::Trace, + "none" => Self::None, _ => { return Err(format!( "`{}` is not recognized as a supported Ethereum Api", diff --git a/node/src/rpc/eth.rs b/node/src/rpc/eth.rs index a763f44..fd37f9d 100644 --- a/node/src/rpc/eth.rs +++ b/node/src/rpc/eth.rs @@ -215,7 +215,6 @@ where io.merge(Trace::new(client.clone(), trace_requester, 20).into_rpc())?; } } - io.merge(Web3::new(client).into_rpc())?; io.merge(tx_pool.into_rpc())?; Ok(io) diff --git a/pallets/custom-balances/Cargo.toml b/pallets/custom-balances/Cargo.toml index 3d5ff53..a468a0d 100644 --- a/pallets/custom-balances/Cargo.toml +++ b/pallets/custom-balances/Cargo.toml @@ -9,7 +9,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } @@ -29,7 +29,7 @@ stbl-core-primitives ={ workspace = true, features = ["std"] } [features] default = ["std"] std = [ - "codec/std", + "parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/pallets/custom-balances/src/lib.rs b/pallets/custom-balances/src/lib.rs index 7219103..dc29c6e 100644 --- a/pallets/custom-balances/src/lib.rs +++ b/pallets/custom-balances/src/lib.rs @@ -12,7 +12,7 @@ pub mod pallet { use core::marker::PhantomData; - use codec::MaxEncodedLen; + use parity_scale_codec::MaxEncodedLen; use frame_support::traits::tokens::{DepositConsequence, WithdrawConsequence, Preservation, Provenance, Fortitude}; use frame_support::traits::{Imbalance, SameOrOther, TryDrop}; use frame_support::RuntimeDebug; diff --git a/pallets/dnt-fee-controller/Cargo.toml b/pallets/dnt-fee-controller/Cargo.toml index 9fbd46b..5fc2c32 100644 --- a/pallets/dnt-fee-controller/Cargo.toml +++ b/pallets/dnt-fee-controller/Cargo.toml @@ -8,7 +8,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } @@ -30,7 +30,7 @@ pallet-evm = { workspace = true, features = ["std"]} [features] default = ["std"] std = [ - "codec/std", + "parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/pallets/erc20-manager/Cargo.toml b/pallets/erc20-manager/Cargo.toml index 18c8061..e8fd65a 100644 --- a/pallets/erc20-manager/Cargo.toml +++ b/pallets/erc20-manager/Cargo.toml @@ -9,7 +9,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } @@ -28,7 +28,7 @@ pallet-timestamp = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ - "codec/std", + "parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/pallets/fee-rewards-vault/Cargo.toml b/pallets/fee-rewards-vault/Cargo.toml index a9db493..abf722e 100644 --- a/pallets/fee-rewards-vault/Cargo.toml +++ b/pallets/fee-rewards-vault/Cargo.toml @@ -9,7 +9,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } @@ -19,7 +19,7 @@ stbl-tools = { workspace = true } [features] default = ["std"] std = [ - "codec/std", + "parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/pallets/root-controller/Cargo.toml b/pallets/root-controller/Cargo.toml index bc631ca..5a47289 100644 --- a/pallets/root-controller/Cargo.toml +++ b/pallets/root-controller/Cargo.toml @@ -8,7 +8,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } @@ -16,7 +16,7 @@ sp-io = { workspace = true } [features] default = ["std"] std = [ - "codec/std", + "parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/pallets/sponsored-transactions/Cargo.toml b/pallets/sponsored-transactions/Cargo.toml index ec8bb15..d516286 100644 --- a/pallets/sponsored-transactions/Cargo.toml +++ b/pallets/sponsored-transactions/Cargo.toml @@ -8,7 +8,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } hex = { workspace = true, default-features = false } scale-info = { workspace = true } sp-core = { workspace = true } @@ -36,7 +36,7 @@ ethereum = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ - "codec/std", + "parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/pallets/token-fee-controller/supported-tokens-manager/Cargo.toml b/pallets/token-fee-controller/supported-tokens-manager/Cargo.toml index 49945b0..f67be39 100644 --- a/pallets/token-fee-controller/supported-tokens-manager/Cargo.toml +++ b/pallets/token-fee-controller/supported-tokens-manager/Cargo.toml @@ -10,7 +10,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } @@ -23,7 +23,7 @@ pallet-balances = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ - "codec/std", + "parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/pallets/token-fee-controller/user-fee-selector/Cargo.toml b/pallets/token-fee-controller/user-fee-selector/Cargo.toml index ec99a89..4ab84e1 100644 --- a/pallets/token-fee-controller/user-fee-selector/Cargo.toml +++ b/pallets/token-fee-controller/user-fee-selector/Cargo.toml @@ -10,7 +10,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } @@ -24,7 +24,7 @@ pallet-balances = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ - "codec/std", + "parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/pallets/token-fee-controller/validator-fee-selector/Cargo.toml b/pallets/token-fee-controller/validator-fee-selector/Cargo.toml index de7a795..1c173ca 100644 --- a/pallets/token-fee-controller/validator-fee-selector/Cargo.toml +++ b/pallets/token-fee-controller/validator-fee-selector/Cargo.toml @@ -10,7 +10,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } @@ -28,7 +28,7 @@ fp-evm = { workspace = true } [features] default = ["std"] std = [ - "codec/std", + "parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/pallets/upgrade-runtime-proposal/Cargo.toml b/pallets/upgrade-runtime-proposal/Cargo.toml index 5a56138..3242eab 100644 --- a/pallets/upgrade-runtime-proposal/Cargo.toml +++ b/pallets/upgrade-runtime-proposal/Cargo.toml @@ -14,7 +14,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } scale-info = { workspace = true } syn = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } stbl-tools = { workspace = true } log = { workspace = true } @@ -33,7 +33,7 @@ std = [ 'sp-core/std', 'sp-std/std', 'sp-runtime/std', - 'codec/std', + 'parity-scale-codec/std', 'log/std' ] try-runtime = ['frame-support/try-runtime'] \ No newline at end of file diff --git a/pallets/validator-keys-controller/Cargo.toml b/pallets/validator-keys-controller/Cargo.toml index e7dd99d..2be2a8d 100644 --- a/pallets/validator-keys-controller/Cargo.toml +++ b/pallets/validator-keys-controller/Cargo.toml @@ -11,7 +11,7 @@ sp-runtime = { workspace = true } sp-std = { workspace = true } sp-staking = { workspace = true } log = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } @@ -29,7 +29,7 @@ serde = { version = '1.0.126',features = ['derive'] } default = ['std'] runtime-benchmarks = ['frame-benchmarking'] std = [ - 'codec/std', + 'parity-scale-codec/std', 'frame-benchmarking/std', 'frame-support/std', 'frame-system/std', diff --git a/pallets/validator-set/Cargo.toml b/pallets/validator-set/Cargo.toml index c0261de..2228970 100644 --- a/pallets/validator-set/Cargo.toml +++ b/pallets/validator-set/Cargo.toml @@ -11,7 +11,7 @@ sp-runtime = { workspace = true } sp-std = { workspace = true } sp-staking = { workspace = true } log = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } @@ -28,7 +28,7 @@ serde = { version = '1.0.126',features = ['derive'] } default = ['std'] runtime-benchmarks = ['frame-benchmarking'] std = [ - 'codec/std', + 'parity-scale-codec/std', 'frame-benchmarking/std', 'frame-support/std', 'frame-system/std', diff --git a/pallets/zero-gas-transactions/Cargo.toml b/pallets/zero-gas-transactions/Cargo.toml index c2ab00a..785b8ec 100644 --- a/pallets/zero-gas-transactions/Cargo.toml +++ b/pallets/zero-gas-transactions/Cargo.toml @@ -8,7 +8,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } -codec = { workspace = true } +parity-scale-codec = { workspace = true } hex = { workspace = true, default-features = false } scale-info = { workspace = true } sp-core = { workspace = true } @@ -39,7 +39,7 @@ ethereum = { workspace = true, features = ["std"] } [features] default = ["std"] std = [ - "codec/std", + "parity-scale-codec/std", "scale-info/std", "frame-support/std", "frame-system/std", diff --git a/test-utils/stability-tracing/Cargo.toml b/test-utils/stability-tracing/Cargo.toml index f079923..353bb4c 100644 --- a/test-utils/stability-tracing/Cargo.toml +++ b/test-utils/stability-tracing/Cargo.toml @@ -17,19 +17,19 @@ targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] [dependencies] sp-std = { workspace = true } -codec = { default-features = false, features = ["derive"], workspace = true } +parity-scale-codec = { default-features = false, features = ["derive"], workspace = true } tracing = { workspace = true } tracing-core = { workspace = true } tracing-subscriber = { workspace = true, optional = true } [features] default = ["std"] -with-tracing = ["codec/derive", "codec/full"] +with-tracing = ["parity-scale-codec/derive", "parity-scale-codec/full"] std = [ "with-tracing", "tracing/std", "tracing-core/std", - "codec/std", + "parity-scale-codec/std", "sp-std/std", "tracing-subscriber", ] diff --git a/test-utils/stability-tracing/src/types.rs b/test-utils/stability-tracing/src/types.rs index b0d119d..d1d2fea 100644 --- a/test-utils/stability-tracing/src/types.rs +++ b/test-utils/stability-tracing/src/types.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use codec::{Decode, Encode}; +use parity_scale_codec::{Decode, Encode}; /// Types for wasm based tracing. Loosly inspired by `tracing-core` but /// optimised for the specific use case. use core::{fmt::Debug, format_args};