Skip to content

Commit

Permalink
Add pallet-utility to the evm and auto-id domain runtime
Browse files Browse the repository at this point in the history
Signed-off-by: linning <[email protected]>
  • Loading branch information
NingLin-P committed Jul 29, 2024
1 parent 4de5f05 commit 7d52dbb
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Cargo.lock

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

5 changes: 4 additions & 1 deletion domains/runtime/auto-id/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pallet-timestamp = { default-features = false, git = "https://github.com/subspac
pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false }
pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
scale-info = { version = "2.11.2", default-features = false, features = ["derive"] }
sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
Expand Down Expand Up @@ -85,6 +86,7 @@ std = [
"pallet-transaction-payment/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transporter/std",
"pallet-utility/std",
"scale-info/std",
"sp-api/std",
"sp-block-builder/std",
Expand Down Expand Up @@ -120,5 +122,6 @@ runtime-benchmarks = [
"pallet-auto-id/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-messenger/runtime-benchmarks",
"pallet-domain-id/runtime-benchmarks"
"pallet-domain-id/runtime-benchmarks",
"pallet-utility/runtime-benchmarks"
]
8 changes: 8 additions & 0 deletions domains/runtime/auto-id/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,13 @@ impl pallet_domain_sudo::Config for Runtime {
type IntoRuntimeCall = IntoRuntimeCall;
}

impl pallet_utility::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type PalletsOrigin = OriginCaller;
type WeightInfo = pallet_utility::weights::SubstrateWeight<Runtime>;
}

// Create the runtime by composing the FRAME pallets that were previously configured.
//
// NOTE: Currently domain runtime does not naturally support the pallets with inherent extrinsics.
Expand All @@ -481,6 +488,7 @@ construct_runtime!(
// extrinsic.
Timestamp: pallet_timestamp = 1,
ExecutivePallet: domain_pallet_executive = 2,
Utility: pallet_utility = 8,

// monetary stuff
Balances: pallet_balances = 20,
Expand Down
3 changes: 3 additions & 0 deletions domains/runtime/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pallet-timestamp = { default-features = false, git = "https://github.com/subspac
pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false }
pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
scale-info = { version = "2.11.2", default-features = false, features = ["derive"] }
sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "0cbfcb0232bbf71ac5b14cc8c99bf043cec420ef" }
Expand Down Expand Up @@ -105,6 +106,7 @@ std = [
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transaction-payment/std",
"pallet-transporter/std",
"pallet-utility/std",
"scale-info/std",
"sp-api/std",
"sp-block-builder/std",
Expand Down Expand Up @@ -139,6 +141,7 @@ runtime-benchmarks = [
"pallet-ethereum/runtime-benchmarks",
"pallet-evm/runtime-benchmarks",
"pallet-messenger/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-storage",
]
8 changes: 8 additions & 0 deletions domains/runtime/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,13 @@ impl pallet_domain_sudo::Config for Runtime {
type IntoRuntimeCall = IntoRuntimeCall;
}

impl pallet_utility::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type PalletsOrigin = OriginCaller;
type WeightInfo = pallet_utility::weights::SubstrateWeight<Runtime>;
}

// Create the runtime by composing the FRAME pallets that were previously configured.
//
// NOTE: Currently domain runtime does not naturally support the pallets with inherent extrinsics.
Expand All @@ -755,6 +762,7 @@ construct_runtime!(
// extrinsic.
Timestamp: pallet_timestamp = 1,
ExecutivePallet: domain_pallet_executive = 2,
Utility: pallet_utility = 8,

// monetary stuff
Balances: pallet_balances = 20,
Expand Down

0 comments on commit 7d52dbb

Please sign in to comment.