Skip to content

Commit

Permalink
pushed runtime upgrade for spec version 101
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharojha committed Apr 29, 2024
1 parent 1edfe4c commit 3e072ac
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] }
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }

pallet-utility = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v1.0.0" }
pallet-aura = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
pallet-balances = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
Expand Down Expand Up @@ -76,6 +77,7 @@ std = [
"pallet-timestamp/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transaction-payment/std",
"pallet-utility/std",
"sp-api/std",
"sp-block-builder/std",
"sp-consensus-aura/std",
Expand All @@ -100,6 +102,7 @@ runtime-benchmarks = [
"pallet-sudo/runtime-benchmarks",
"pallet-algorithms/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
try-runtime = [
Expand All @@ -114,4 +117,5 @@ try-runtime = [
"pallet-algorithms/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-utility/try-runtime",
]
11 changes: 10 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 100,
spec_version: 101,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -138,6 +138,13 @@ pub fn native_version() -> NativeVersion {

const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);

impl pallet_utility::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type PalletsOrigin = OriginCaller;
type WeightInfo = ();
}

parameter_types! {
pub const BlockHashCount: BlockNumber = 2400;
pub const Version: RuntimeVersion = VERSION;
Expand Down Expand Up @@ -296,6 +303,7 @@ construct_runtime!(
Balances: pallet_balances,
TransactionPayment: pallet_transaction_payment,
Sudo: pallet_sudo,
Utility: pallet_utility,
// Include the custom logic from the pallet-algorithms in the runtime.
AlgorithmsModule: pallet_algorithms,
IssuersModule: pallet_issuers,
Expand Down Expand Up @@ -348,6 +356,7 @@ mod benches {
[pallet_timestamp, Timestamp]
[pallet_sudo, Sudo]
[pallet_algorithms, AlgorithmsModule]
[pallet_utility, Utility]
);
}

Expand Down

0 comments on commit 3e072ac

Please sign in to comment.