Skip to content

Commit

Permalink
Add Utility pallet (paritytech#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
Álvaro Castro-Castilla committed Mar 22, 2021
1 parent 2f32a7f commit af643f5
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions parachain/Cargo.lock

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

2 changes: 2 additions & 0 deletions parachain/runtime/local/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.
pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-utility = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
Expand Down Expand Up @@ -76,6 +77,7 @@ std = [
"pallet-balances/std",
"pallet-randomness-collective-flip/std",
"pallet-timestamp/std",
"pallet-utility/std",
"pallet-transaction-payment/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"sp-api/std",
Expand Down
7 changes: 7 additions & 0 deletions parachain/runtime/local/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ impl pallet_timestamp::Config for Runtime {
type WeightInfo = ();
}

impl pallet_utility::Config for Runtime {
type Event = Event;
type Call = Call;
type WeightInfo = ();
}

parameter_types! {
pub const ExistentialDeposit: u128 = 500;
pub const MaxLocks: u32 = 50;
Expand Down Expand Up @@ -509,6 +515,7 @@ construct_runtime!(

LocalXcmHandler: cumulus_pallet_xcm_handler::{Module, Event<T>, Origin} = 18,
Transfer: artemis_transfer::{Module, Call, Event<T>} = 19,
Utility: pallet_utility::{Module, Call, Event, Storage} = 20,

ETH: eth_app::{Module, Call, Config, Storage, Event<T>} = 12,
ERC20: erc20_app::{Module, Call, Config, Storage, Event<T>} = 13,
Expand Down
2 changes: 2 additions & 0 deletions parachain/runtime/rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.
pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-utility = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
Expand Down Expand Up @@ -76,6 +77,7 @@ std = [
"pallet-balances/std",
"pallet-randomness-collective-flip/std",
"pallet-timestamp/std",
"pallet-utility/std",
"pallet-transaction-payment/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"sp-api/std",
Expand Down
7 changes: 7 additions & 0 deletions parachain/runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ impl pallet_timestamp::Config for Runtime {
type WeightInfo = weights::pallet_timestamp_weights::WeightInfo<Runtime>;
}

impl pallet_utility::Config for Runtime {
type Event = Event;
type Call = Call;
type WeightInfo = ();
}

parameter_types! {
pub const ExistentialDeposit: u128 = 500;
pub const MaxLocks: u32 = 50;
Expand Down Expand Up @@ -511,6 +517,7 @@ construct_runtime!(

LocalXcmHandler: cumulus_pallet_xcm_handler::{Module, Event<T>, Origin} = 18,
Transfer: artemis_transfer::{Module, Call, Event<T>} = 19,
Utility: pallet_utility::{Module, Call, Event, Storage} = 20,

ETH: eth_app::{Module, Call, Config, Storage, Event<T>} = 12,
ERC20: erc20_app::{Module, Call, Config, Storage, Event<T>} = 13,
Expand Down
2 changes: 2 additions & 0 deletions parachain/runtime/snowbridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.
pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-utility = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate.git", branch = "rococo-v1", default-features = false }
Expand Down Expand Up @@ -76,6 +77,7 @@ std = [
"pallet-balances/std",
"pallet-randomness-collective-flip/std",
"pallet-timestamp/std",
"pallet-utility/std",
"pallet-transaction-payment/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"sp-api/std",
Expand Down
7 changes: 7 additions & 0 deletions parachain/runtime/snowbridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ impl pallet_timestamp::Config for Runtime {
type WeightInfo = weights::pallet_timestamp_weights::WeightInfo<Runtime>;
}

impl pallet_utility::Config for Runtime {
type Event = Event;
type Call = Call;
type WeightInfo = ();
}

parameter_types! {
pub const ExistentialDeposit: u128 = 500;
pub const MaxLocks: u32 = 50;
Expand Down Expand Up @@ -511,6 +517,7 @@ construct_runtime!(

LocalXcmHandler: cumulus_pallet_xcm_handler::{Module, Event<T>, Origin} = 18,
Transfer: artemis_transfer::{Module, Call, Event<T>} = 19,
Utility: pallet_utility::{Module, Call, Event, Storage} = 20,

ETH: eth_app::{Module, Call, Config, Storage, Event<T>} = 12,
ERC20: erc20_app::{Module, Call, Config, Storage, Event<T>} = 13,
Expand Down

0 comments on commit af643f5

Please sign in to comment.