Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pallet-revive: Remove unused dependencies #6796

Merged
merged 5 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions prdoc/pr_6796.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: 'pallet-revive: Remove unused dependencies'
doc:
- audience: Runtime Dev
description: The dependency on `pallet_balances` doesn't seem to be necessary. At
least everything compiles for me without it. Removed this dependency and a few
others that seem to be left overs.
crates:
- name: pallet-revive
bump: major
19 changes: 4 additions & 15 deletions substrate/frame/revive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@ impl-trait-for-tuples = { workspace = true }
rlp = { workspace = true }
derive_more = { workspace = true }
hex = { workspace = true }
jsonrpsee = { workspace = true, features = ["full"], optional = true }
ethereum-types = { workspace = true, features = ["codec", "rlp", "serialize"] }

# Polkadot SDK Dependencies
frame-benchmarking = { optional = true, workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-balances = { optional = true, workspace = true }
pallet-revive-fixtures = { workspace = true, default-features = false, optional = true }
pallet-revive-uapi = { workspace = true, default-features = true }
pallet-revive-proc-macro = { workspace = true, default-features = true }
pallet-revive-fixtures = { workspace = true, optional = true }
pallet-revive-uapi = { workspace = true, features = ["scale"] }
pallet-revive-proc-macro = { workspace = true }
pallet-transaction-payment = { workspace = true }
sp-api = { workspace = true }
sp-arithmetic = { workspace = true }
Expand All @@ -61,19 +59,16 @@ subxt-signer = { workspace = true, optional = true, features = [
array-bytes = { workspace = true, default-features = true }
assert_matches = { workspace = true }
pretty_assertions = { workspace = true }
pallet-revive-fixtures = { workspace = true, default-features = true }
secp256k1 = { workspace = true, features = ["recovery"] }
serde_json = { workspace = true }
hex-literal = { workspace = true }
env_logger = { workspace = true }

# Polkadot SDK Dependencies
pallet-balances = { workspace = true, default-features = true }
pallet-timestamp = { workspace = true, default-features = true }
pallet-message-queue = { workspace = true, default-features = true }
pallet-utility = { workspace = true, default-features = true }
pallet-assets = { workspace = true, default-features = true }
pallet-proxy = { workspace = true, default-features = true }
pallet-revive-fixtures = { workspace = true, default-features = true }
sp-keystore = { workspace = true, default-features = true }
sp-tracing = { workspace = true, default-features = true }
xcm-builder = { workspace = true, default-features = true }
Expand All @@ -88,9 +83,7 @@ std = [
"frame-support/std",
"frame-system/std",
"hex/std",
"jsonrpsee",
"log/std",
"pallet-balances?/std",
"pallet-proxy/std",
"pallet-revive-fixtures?/std",
"pallet-timestamp/std",
Expand Down Expand Up @@ -118,9 +111,7 @@ runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-revive-fixtures",
"pallet-timestamp/runtime-benchmarks",
Expand All @@ -132,9 +123,7 @@ runtime-benchmarks = [
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-assets/try-runtime",
"pallet-balances/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-proxy/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/revive/src/benchmarking/call_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub struct CallSetup<T: Config> {

impl<T> Default for CallSetup<T>
where
T: Config + pallet_balances::Config,
T: Config,
BalanceOf<T>: Into<U256> + TryFrom<U256>,
MomentOf<T>: Into<U256>,
T::Hash: frame_support::traits::IsType<H256>,
Expand All @@ -57,7 +57,7 @@ where

impl<T> CallSetup<T>
where
T: Config + pallet_balances::Config,
T: Config,
BalanceOf<T>: Into<U256> + TryFrom<U256>,
MomentOf<T>: Into<U256>,
T::Hash: frame_support::traits::IsType<H256>,
Expand Down
8 changes: 3 additions & 5 deletions substrate/frame/revive/src/benchmarking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ use frame_benchmarking::v2::*;
use frame_support::{
self, assert_ok,
storage::child,
traits::{fungible::InspectHold, Currency},
traits::fungible::InspectHold,
weights::{Weight, WeightMeter},
};
use frame_system::RawOrigin;
use pallet_balances;
use pallet_revive_uapi::{CallFlags, ReturnErrorCode, StorageFlags};
use sp_runtime::traits::{Bounded, Hash};

Expand Down Expand Up @@ -68,7 +67,7 @@ struct Contract<T: Config> {

impl<T> Contract<T>
where
T: Config + pallet_balances::Config,
T: Config,
BalanceOf<T>: Into<U256> + TryFrom<U256>,
MomentOf<T>: Into<U256>,
T::Hash: frame_support::traits::IsType<H256>,
Expand Down Expand Up @@ -220,11 +219,10 @@ fn default_deposit_limit<T: Config>() -> BalanceOf<T> {
#[benchmarks(
where
BalanceOf<T>: Into<U256> + TryFrom<U256>,
T: Config + pallet_balances::Config,
T: Config,
MomentOf<T>: Into<U256>,
<T as frame_system::Config>::RuntimeEvent: From<pallet::Event<T>>,
<T as Config>::RuntimeCall: From<frame_system::Call<T>>,
<pallet_balances::Pallet<T> as Currency<T::AccountId>>::Balance: From<BalanceOf<T>>,
<T as frame_system::Config>::Hash: frame_support::traits::IsType<H256>,
)]
mod benchmarks {
Expand Down
Loading