-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Use frame umbrella crate in pallet-proxy and pallet-multisig
#5995
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
Changes from 8 commits
27df8ea
8eefc00
c151681
78b52f2
0305c59
d253bc5
a4b1fd2
e0293d1
253ce3f
ff36c53
2d8323f
687b61f
49a4cc3
4debb8e
556e8ea
a6dfbed
645f2f4
21cd6da
2c910cb
6e6f1ac
bd17cf2
532ee9b
d0120f2
1e7d1bb
4d8b583
cf32fbf
d460295
ca35eed
68c5eea
393d998
2f5eea9
b85d644
9e771ee
66d7396
88265e5
dc2973d
8cd8c73
5918bef
325d62e
801156c
48050fd
d9f132b
61db970
f5ba680
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,11 +18,7 @@ targets = ["x86_64-unknown-linux-gnu"] | |
| [dependencies] | ||
| codec = { workspace = true } | ||
| scale-info = { features = ["derive"], workspace = true } | ||
| frame-benchmarking = { optional = true, workspace = true } | ||
| frame-support = { workspace = true } | ||
| frame-system = { workspace = true } | ||
| sp-io = { workspace = true } | ||
| sp-runtime = { workspace = true } | ||
| frame = { workspace = true, features = ["experimental", "runtime"] } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we actually need experimental? I don't see it used in the past AFAICT
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will remove it as soon as I am a bit more confident in the readiness of the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What we should try here is to see if removing the The idea in the |
||
|
|
||
| # third party | ||
| log = { workspace = true } | ||
|
|
@@ -34,25 +30,12 @@ pallet-balances = { workspace = true, default-features = true } | |
| default = ["std"] | ||
| std = [ | ||
| "codec/std", | ||
| "frame-benchmarking?/std", | ||
| "frame-support/std", | ||
| "frame-system/std", | ||
| "log/std", | ||
| "pallet-balances/std", | ||
| "scale-info/std", | ||
| "sp-io/std", | ||
| "sp-runtime/std", | ||
| "frame/std", | ||
| ] | ||
| runtime-benchmarks = [ | ||
| "frame-benchmarking/runtime-benchmarks", | ||
| "frame-support/runtime-benchmarks", | ||
| "frame-system/runtime-benchmarks", | ||
| "pallet-balances/runtime-benchmarks", | ||
| "sp-runtime/runtime-benchmarks", | ||
| "frame/runtime-benchmarks", | ||
| ] | ||
| try-runtime = [ | ||
| "frame-support/try-runtime", | ||
| "frame-system/try-runtime", | ||
| "pallet-balances/try-runtime", | ||
| "sp-runtime/try-runtime", | ||
| "frame/try-runtime", | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,18 +20,13 @@ | |
| #![cfg(test)] | ||
|
|
||
| use super::*; | ||
|
|
||
| use crate as pallet_multisig; | ||
| use frame_support::{ | ||
| assert_noop, assert_ok, derive_impl, | ||
| traits::{ConstU32, ConstU64, Contains}, | ||
| }; | ||
| use sp_runtime::{BuildStorage, TokenError}; | ||
| use frame::{prelude::*, runtime::prelude::*, testing_prelude::*}; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One little detail here is which preludes are a superset of the others. I recall I made a deliberate choice about preludes being a superset of one another, but I didn't update the code 🙈 For example here, I think |
||
|
|
||
| type Block = frame_system::mocking::MockBlockU32<Test>; | ||
|
|
||
| frame_support::construct_runtime!( | ||
| pub enum Test { | ||
| construct_runtime!( | ||
| pub struct Test { | ||
| System: frame_system, | ||
| Balances: pallet_balances, | ||
| Multisig: pallet_multisig, | ||
|
|
@@ -75,14 +70,14 @@ impl Config for Test { | |
|
|
||
| use pallet_balances::Call as BalancesCall; | ||
|
|
||
| pub fn new_test_ext() -> sp_io::TestExternalities { | ||
| pub fn new_test_ext() -> TestState { | ||
| let mut t = frame_system::GenesisConfig::<Test>::default().build_storage().unwrap(); | ||
| pallet_balances::GenesisConfig::<Test> { | ||
| balances: vec![(1, 10), (2, 10), (3, 10), (4, 10), (5, 2)], | ||
| } | ||
| .assimilate_storage(&mut t) | ||
| .unwrap(); | ||
| let mut ext = sp_io::TestExternalities::new(t); | ||
| let mut ext = TestState::new(t); | ||
| ext.execute_with(|| System::set_block_number(1)); | ||
| ext | ||
| } | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.