diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 49f1be9ec..f10aff1ed 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -61,6 +61,8 @@ jobs: toolchain: ${{ matrix.rust }} target: wasm32-unknown-unknown override: true + - name: Install Protoc + uses: arduino/setup-protoc@v1 # # Work around https://github.com/actions/cache/issues/403 by using GNU tar # # instead of BSD tar. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bb7ff3c6..b9be95d95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,7 +97,8 @@ jobs: toolchain: ${{ matrix.rust }} target: wasm32-unknown-unknown override: true - + - name: Install Protoc + uses: arduino/setup-protoc@v1 # # Work around https://github.com/actions/cache/issues/403 by using GNU tar # # instead of BSD tar. # - name: Install GNU tar diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index c2651638a..7176e1e77 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -69,6 +69,8 @@ jobs: target: wasm32-unknown-unknown default: true path: "" + - name: Install Protoc + uses: arduino/setup-protoc@v1 - name: Run cargo-tarpaulin run: | wget https://github.com/xd009642/tarpaulin/releases/download/${{ env.TARPAULIN_VERSION }}/cargo-tarpaulin-${{ env.TARPAULIN_VERSION }}-travis.tar.gz diff --git a/.github/workflows/try-runtime.yml b/.github/workflows/try-runtime.yml index a780f8541..4517a002d 100644 --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -56,6 +56,8 @@ jobs: components: rustfmt target: wasm32-unknown-unknown default: true + - name: Install Protoc + uses: arduino/setup-protoc@v1 - name: Try Heiko Runtime Upgrade run: | make try-heiko-live-upgrade diff --git a/.maintain/frame-weight-template.hbs b/.maintain/frame-weight-template.hbs index 991ed118d..1cd468d5e 100644 --- a/.maintain/frame-weight-template.hbs +++ b/.maintain/frame-weight-template.hbs @@ -19,6 +19,7 @@ //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}} //! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}` +//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}` //! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}} // Executed Command: @@ -55,27 +56,31 @@ impl WeightInfo for SubstrateWeight { {{#each benchmark.comments as |comment|}} // {{comment}} {{/each}} + {{#each benchmark.component_ranges as |range|}} + /// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`. + {{/each}} fn {{benchmark.name~}} ( {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - ({{underscore benchmark.base_weight}} as Weight) + // Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds. + Weight::from_ref_time({{underscore benchmark.base_weight}}) {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) {{/each}} {{#if (ne benchmark.base_reads "0")}} - .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) + .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}})) {{/if}} {{#each benchmark.component_reads as |cr|}} - .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + .saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into()))) {{/each}} {{#if (ne benchmark.base_writes "0")}} - .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) + .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}})) {{/if}} {{#each benchmark.component_writes as |cw|}} - .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + .saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into()))) {{/each}} } {{/each}} @@ -87,28 +92,34 @@ impl WeightInfo for () { {{#each benchmark.comments as |comment|}} // {{comment}} {{/each}} + {{#each benchmark.component_ranges as |range|}} + /// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`. + {{/each}} fn {{benchmark.name~}} ( {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - ({{underscore benchmark.base_weight}} as Weight) + // Minimum execution time: {{underscore benchmark.min_execution_time}} nanoseconds. + Weight::from_ref_time({{underscore benchmark.base_weight}}) {{#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) {{/each}} {{#if (ne benchmark.base_reads "0")}} - .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight)) + .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}})) {{/if}} {{#each benchmark.component_reads as |cr|}} - .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + .saturating_add(RocksDbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into()))) {{/each}} {{#if (ne benchmark.base_writes "0")}} - .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight)) + .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}})) {{/if}} {{#each benchmark.component_writes as |cw|}} - .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + .saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into()))) {{/each}} } {{/each}} } + + diff --git a/Cargo.lock b/Cargo.lock index 0a631959e..9ec10be89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -68,16 +68,16 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.7", + "getrandom 0.2.8", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "0.7.19" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] @@ -108,9 +108,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.65" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" +checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" [[package]] name = "approx" @@ -121,6 +121,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "array-bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + [[package]] name = "arrayref" version = "0.3.6" @@ -167,7 +173,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" dependencies = [ "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -176,30 +182,30 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e14485364214912d3b19cc3435dde4df66065127f05fa0d75c712f36f12c2f28" dependencies = [ - "concurrent-queue", + "concurrent-queue 1.2.4", "event-listener", "futures-core", ] [[package]] name = "async-executor" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" +checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" dependencies = [ + "async-lock", "async-task", - "concurrent-queue", + "concurrent-queue 2.0.0", "fastrand", "futures-lite", - "once_cell", "slab", ] [[package]] name = "async-global-executor" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da5b41ee986eed3f524c380e6d64965aea573882a8907682ad100f7859305ca" +checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" dependencies = [ "async-channel", "async-executor", @@ -212,16 +218,16 @@ dependencies = [ [[package]] name = "async-io" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e21f3a490c72b3b0cf44962180e60045de2925d8dff97918f7ee43c8f637c7" +checksum = "e8121296a9f05be7f34aa4196b1747243b3b62e048bb7906f644f3fbfc490cf7" dependencies = [ + "async-lock", "autocfg", - "concurrent-queue", + "concurrent-queue 1.2.4", "futures-lite", "libc", "log", - "once_cell", "parking", "polling", "slab", @@ -232,11 +238,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" +checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" dependencies = [ "event-listener", + "futures-lite", ] [[package]] @@ -287,9 +294,9 @@ dependencies = [ [[package]] name = "async-std-resolver" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2f8a4a203be3325981310ab243a28e6e4ea55b6519bffce05d41ab60e09ad8" +checksum = "6ba50e24d9ee0a8950d3d03fc6d0dd10aa14b5de3b101949b4e160f7fee7c723" dependencies = [ "async-std", "async-trait", @@ -308,20 +315,20 @@ checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" [[package]] name = "async-trait" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" +checksum = "1e805d94e6b5001b651426cf4cd446b1ab5f319d27bab5c644f61de0a804360c" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "asynchronous-codec" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" +checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" dependencies = [ "bytes", "futures-sink", @@ -354,9 +361,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", +] + +[[package]] +name = "auto_impl" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a8c1df849285fbacd587de7818cc7d13be6cd2cbcd47a04fb1801b0e2706e33" +dependencies = [ + "proc-macro-error", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -372,7 +391,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ "futures-core", - "getrandom 0.2.7", + "getrandom 0.2.8", "instant", "pin-project-lite 0.2.9", "rand 0.8.5", @@ -390,7 +409,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.29.0", + "object", "rustc-demangle", ] @@ -414,9 +433,15 @@ checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" -version = "0.13.0" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64ct" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "beef" @@ -430,14 +455,14 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ + "array-bytes", "async-trait", "beefy-primitives", "fnv", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", - "hex", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -447,6 +472,7 @@ dependencies = [ "sc-finality-grandpa", "sc-keystore", "sc-network", + "sc-network-common", "sc-network-gossip", "sc-utils", "sp-api", @@ -466,11 +492,11 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "beefy-gadget", "beefy-primitives", - "futures 0.3.24", + "futures 0.3.25", "jsonrpsee", "log", "parity-scale-codec", @@ -486,32 +512,30 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "beefy-primitives", "sp-api", + "sp-runtime", ] [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "scale-info", + "serde", "sp-api", "sp-application-crypto", "sp-core", + "sp-io", + "sp-mmr-primitives", "sp-runtime", "sp-std", ] -[[package]] -name = "bimap" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0455254eb5c6964c4545d8bac815e1a1be4f3afe0ae695ea539c12d728d44b" - [[package]] name = "bincode" version = "1.3.3" @@ -523,9 +547,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.59.2" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" +checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6" dependencies = [ "bitflags", "cexpr", @@ -533,7 +557,7 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "regex", "rustc-hash", @@ -560,11 +584,11 @@ dependencies = [ [[package]] name = "blake2" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388" +checksum = "b12e5fd123190ce1c2e559308a94c9bacad77907d4c6005d9e58fe1a0689e55e" dependencies = [ - "digest 0.10.4", + "digest 0.10.6", ] [[package]] @@ -574,7 +598,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" dependencies = [ "arrayvec 0.4.12", - "constant_time_eq", + "constant_time_eq 0.1.5", ] [[package]] @@ -585,7 +609,7 @@ checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127" dependencies = [ "arrayref", "arrayvec 0.7.2", - "constant_time_eq", + "constant_time_eq 0.1.5", ] [[package]] @@ -596,21 +620,21 @@ checksum = "db539cc2b5f6003621f1cd9ef92d7ded8ea5232c7de0f9faa2de251cd98730d4" dependencies = [ "arrayref", "arrayvec 0.7.2", - "constant_time_eq", + "constant_time_eq 0.1.5", ] [[package]] name = "blake3" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f" +checksum = "895adc16c8b3273fbbc32685a7d55227705eda08c01e77704020f3491924b44b" dependencies = [ "arrayref", "arrayvec 0.7.2", "cc", "cfg-if 1.0.0", - "constant_time_eq", - "digest 0.10.4", + "constant_time_eq 0.2.4", + "digest 0.10.6", ] [[package]] @@ -619,7 +643,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -631,7 +655,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", "generic-array 0.14.6", ] @@ -653,12 +676,6 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "blocking" version = "1.2.0" @@ -710,15 +727,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.11.0" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "byte-slice-cast" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "byte-tools" @@ -734,9 +751,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" [[package]] name = "bzip2-sys" @@ -788,9 +805,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.73" +version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" dependencies = [ "jobserver", ] @@ -804,6 +821,15 @@ dependencies = [ "nom", ] +[[package]] +name = "cfg-expr" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +dependencies = [ + "smallvec", +] + [[package]] name = "cfg-if" version = "0.1.10" @@ -849,9 +875,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ "iana-time-zone", "js-sys", @@ -895,63 +921,52 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.3.3" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a050e2153c5be08febd6734e29298e844fdb0fa21aeddd63b4eb7baa106c69b" +checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" dependencies = [ "glob", "libc", - "libloading 0.7.3", + "libloading", ] [[package]] name = "clap" -version = "3.2.21" +version = "4.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed5341b2301a26ab80be5cbdced622e80ed808483c52e45e3310a877d3b37d7" +checksum = "2148adefda54e14492fb9bddcc600b4344c5d1a3123bd666dcb939c6f0e0e57e" dependencies = [ "atty", "bitflags", "clap_derive", "clap_lex", - "indexmap", "once_cell", "strsim", "termcolor", - "textwrap", ] [[package]] name = "clap_derive" -version = "3.2.18" +version = "4.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" +checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "clap_lex" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" dependencies = [ "os_str_bytes", ] -[[package]] -name = "cmake" -version = "0.1.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" -dependencies = [ - "cc", -] - [[package]] name = "coarsetime" version = "0.1.22" @@ -964,11 +979,21 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "comfy-table" -version = "6.1.0" +version = "6.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85914173c2f558d61613bfbbf1911f14e630895087a7ed2fafc0f5319e1536e7" +checksum = "e621e7e86c46fd8a14c32c6ae3cb95656621b4743a27d0cffedb831d46e7ad21" dependencies = [ "strum", "strum_macros", @@ -984,15 +1009,24 @@ dependencies = [ "cache-padded", ] +[[package]] +name = "concurrent-queue" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd7bef69dc86e3c610e4e7aed41035e2a7ed12e72dd7530f61327a6579a4390b" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "console" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89eab4d20ce20cea182308bca13088fecea9c05f6776cf287205d41a0ed3c847" +checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c" dependencies = [ "encode_unicode", + "lazy_static", "libc", - "once_cell", "terminal_size", "winapi", ] @@ -1009,6 +1043,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "constant_time_eq" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" + [[package]] name = "convert_case" version = "0.4.0" @@ -1060,19 +1100,21 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749d0d6022c9038dccf480bdde2a38d435937335bf2bb0f14e815d94517cdce8" +checksum = "52056f6d0584484b57fa6c1a65c1fcb15f3780d8b6a758426d9e3084169b2ddd" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94370cc7b37bf652ccd8bb8f09bd900997f7ccf97520edfc75554bb5c4abbea" +checksum = "18fed94c8770dc25d01154c3ffa64ed0b3ba9d583736f305fed7beebe5d9cf74" dependencies = [ + "arrayvec 0.7.2", + "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", @@ -1087,33 +1129,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a3cea8fdab90e44018c5b9a1dfd460d8ee265ac354337150222a354628bdb6" +checksum = "1c451b81faf237d11c7e4f3165eeb6bac61112762c5cfe7b4c0fb7241474358f" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ac72f76f2698598951ab26d8c96eaa854810e693e7dd52523958b5909fde6b2" +checksum = "e7c940133198426d26128f08be2b40b0bd117b84771fd36798969c4d712d81fc" [[package]] name = "cranelift-entity" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09eaeacfcd2356fe0e66b295e8f9d59fdd1ac3ace53ba50de14d628ec902f72d" +checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba69c9980d5ffd62c18a2bde927855fcd7c8dc92f29feaf8636052662cbd99c" +checksum = "34897538b36b216cc8dd324e73263596d51b8cf610da6498322838b2546baf8a" dependencies = [ "cranelift-codegen", "log", @@ -1123,15 +1165,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2920dc1e05cac40304456ed3301fde2c09bd6a9b0210bcfa2f101398d628d5b" +checksum = "1b2629a569fae540f16a76b70afcc87ad7decb38dc28fa6c648ac73b51e78470" [[package]] name = "cranelift-native" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04dfa45f9b2a6f587c564d6b63388e00cd6589d2df6ea2758cf79e1a13285e6" +checksum = "20937dab4e14d3e225c5adfc9c7106bafd4ac669bdb43027b911ff794c6fb318" dependencies = [ "cranelift-codegen", "libc", @@ -1140,9 +1182,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.85.3" +version = "0.88.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31a46513ae6f26f3f267d8d75b5373d555fbbd1e68681f348d99df43f747ec54" +checksum = "80fc2288957a94fd342a015811479de1837850924166d1f1856d8406e6f3609b" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1186,23 +1228,22 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.10" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", - "memoffset", - "once_cell", + "memoffset 0.7.1", "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd42583b04998a5363558e5f9291ee5a5ff6b49944332103f251e7479a82aa7" +checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -1210,12 +1251,11 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.11" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ "cfg-if 1.0.0", - "once_cell", ] [[package]] @@ -1268,12 +1308,12 @@ dependencies = [ [[package]] name = "ctor" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdffe87e1d521a10f9696f833fe502293ea446d7f256c06128293a4119bdf4cb" +checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -1285,21 +1325,10 @@ dependencies = [ "cipher", ] -[[package]] -name = "cuckoofilter" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" -dependencies = [ - "byteorder", - "fnv", - "rand 0.7.3", -] - [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "clap", "parity-scale-codec", @@ -1314,13 +1343,12 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "futures 0.3.24", + "futures 0.3.25", "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-primitives", @@ -1338,12 +1366,12 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", - "futures 0.3.24", + "futures 0.3.25", "parity-scale-codec", "sc-client-api", "sc-consensus", @@ -1367,17 +1395,16 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "async-trait", "cumulus-relay-chain-interface", "dyn-clone", - "futures 0.3.24", + "futures 0.3.25", "parity-scale-codec", "polkadot-primitives", "sc-client-api", "sc-consensus", - "sp-api", "sp-blockchain", "sp-consensus", "sp-runtime", @@ -1388,15 +1415,14 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-relay-chain" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "async-trait", "cumulus-client-consensus-common", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.24", + "futures 0.3.25", "parking_lot 0.12.1", - "sc-client-api", "sc-consensus", "sp-api", "sp-block-builder", @@ -1412,12 +1438,11 @@ dependencies = [ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "async-trait", "cumulus-relay-chain-interface", - "derive_more 0.99.17", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "parity-scale-codec", "parking_lot 0.12.1", @@ -1425,7 +1450,6 @@ dependencies = [ "polkadot-parachain", "polkadot-primitives", "sc-client-api", - "sp-api", "sp-blockchain", "sp-consensus", "sp-core", @@ -1437,11 +1461,11 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "parity-scale-codec", "polkadot-node-primitives", @@ -1451,7 +1475,6 @@ dependencies = [ "rand 0.8.5", "sc-client-api", "sc-consensus", - "sp-api", "sp-consensus", "sp-maybe-compressed-blob", "sp-runtime", @@ -1461,7 +1484,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -1470,34 +1493,27 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "parking_lot 0.12.1", - "polkadot-overseer", "polkadot-primitives", "sc-client-api", "sc-consensus", - "sc-consensus-babe", "sc-service", - "sc-telemetry", - "sc-tracing", "sp-api", "sp-blockchain", "sp-consensus", "sp-core", "sp-runtime", - "tracing", ] [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ - "frame-executive", "frame-support", "frame-system", "pallet-aura", "parity-scale-codec", "scale-info", - "serde", "sp-application-crypto", "sp-consensus-aura", "sp-runtime", @@ -1507,7 +1523,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1519,13 +1535,12 @@ dependencies = [ "sp-runtime", "sp-std", "xcm", - "xcm-executor", ] [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1536,11 +1551,9 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "log", - "pallet-balances", "parity-scale-codec", "polkadot-parachain", "scale-info", - "serde", "sp-core", "sp-externalities", "sp-inherents", @@ -1550,24 +1563,23 @@ dependencies = [ "sp-std", "sp-trie", "sp-version", - "xcm", ] [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "cumulus-pallet-session-benchmarking" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "frame-support", "frame-system", @@ -1580,14 +1592,13 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "serde", "sp-io", "sp-runtime", "sp-std", @@ -1597,7 +1608,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -1613,29 +1624,11 @@ dependencies = [ "xcm-executor", ] -[[package]] -name = "cumulus-ping" -version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" -dependencies = [ - "cumulus-pallet-xcm", - "cumulus-primitives-core", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde", - "sp-runtime", - "sp-std", - "xcm", -] - [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ - "frame-support", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain", @@ -1649,7 +1642,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1672,10 +1665,10 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-primitives-core", - "futures 0.3.24", + "futures 0.3.25", "parity-scale-codec", "sp-inherents", "sp-std", @@ -1685,18 +1678,14 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-primitives-core", "frame-support", "log", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain", - "polkadot-primitives", "sp-runtime", "sp-std", - "sp-trie", "xcm", "xcm-builder", "xcm-executor", @@ -1705,73 +1694,110 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "polkadot-cli", "polkadot-client", "polkadot-service", "sc-cli", "sc-client-api", - "sc-consensus-babe", - "sc-network", "sc-sysinfo", "sc-telemetry", "sc-tracing", "sp-api", - "sp-blockchain", "sp-consensus", "sp-core", "sp-runtime", "sp-state-machine", - "tracing", ] [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "async-trait", "cumulus-primitives-core", - "derive_more 0.99.17", - "futures 0.3.24", + "futures 0.3.25", "jsonrpsee-core", "parity-scale-codec", - "parking_lot 0.12.1", "polkadot-overseer", "polkadot-service", "sc-client-api", "sp-api", "sp-blockchain", - "sp-core", - "sp-runtime", "sp-state-machine", "thiserror", ] +[[package]] +name = "cumulus-relay-chain-minimal-node" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" +dependencies = [ + "array-bytes", + "async-trait", + "cumulus-primitives-core", + "cumulus-relay-chain-interface", + "cumulus-relay-chain-rpc-interface", + "futures 0.3.25", + "lru 0.8.1", + "polkadot-availability-distribution", + "polkadot-core-primitives", + "polkadot-network-bridge", + "polkadot-node-core-av-store", + "polkadot-node-network-protocol", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "polkadot-service", + "sc-authority-discovery", + "sc-client-api", + "sc-consensus", + "sc-keystore", + "sc-network", + "sc-network-common", + "sc-network-light", + "sc-network-sync", + "sc-service", + "sc-telemetry", + "sc-tracing", + "sc-transaction-pool", + "sc-transaction-pool-api", + "sp-api", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-runtime", + "tokio", + "tracing", + "url", +] + [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "async-trait", "backoff", "cumulus-primitives-core", "cumulus-relay-chain-interface", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "jsonrpsee", "parity-scale-codec", - "parking_lot 0.12.1", "polkadot-service", "sc-client-api", "sc-rpc-api", "sp-api", + "sp-authority-discovery", + "sp-consensus-babe", "sp-core", "sp-runtime", "sp-state-machine", @@ -1784,7 +1810,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -1833,6 +1859,50 @@ dependencies = [ "zeroize", ] +[[package]] +name = "cxx" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a41a86530d0fe7f5d9ea779916b7cadd2d4f9add748b99c2c029cbbdfaf453" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06416d667ff3e3ad2df1cd8cd8afae5da26cf9cec4d0825040f88b5ca659a2f0" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2 1.0.47", + "quote 1.0.21", + "scratch", + "syn 1.0.103", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "820a9a2af1669deeef27cb271f476ffd196a2c4b6731336011e0ba63e2c7cf71" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a08a6e2fcc370a089ad3b4aaf54db3b1b4cee38ddabce5896b33eb693275f470" +dependencies = [ + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", +] + [[package]] name = "data-encoding" version = "2.3.2" @@ -1856,7 +1926,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -1874,9 +1944,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -1900,12 +1970,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "rustc_version 0.4.0", - "syn 1.0.99", + "syn 1.0.103", ] +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + [[package]] name = "digest" version = "0.8.1" @@ -1926,9 +2002,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.4" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e287ab672bc35c3dfc456f9da59473d8f60450cc57dc4dc350d5dccd000167a" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer 0.10.3", "crypto-common", @@ -1986,6 +2062,12 @@ dependencies = [ "quick-error", ] +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + [[package]] name = "downcast-rs" version = "1.2.0" @@ -1994,9 +2076,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6053ff46b5639ceb91756a85a4c8914668393a03170efd79c8884a529d80656" +checksum = "f8a6eee2d5d0d113f015688310da018bd1d864d86bd567c8fca9c266889e1bfa" [[package]] name = "dyn-clonable" @@ -2014,9 +2096,9 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -2060,6 +2142,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ed25519-zebra" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +dependencies = [ + "curve25519-dalek 3.2.0", + "hashbrown", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", +] + [[package]] name = "either" version = "1.8.0" @@ -2092,14 +2188,14 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "enum-as-inner" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73" +checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" dependencies = [ "heck", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -2117,9 +2213,9 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -2128,16 +2224,16 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "038b1afa59052df211f9efd58f8b1d84c242935ede1c3dbaed26b018a9e06ae2" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "env_logger" -version = "0.9.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ "atty", "humantime", @@ -2180,30 +2276,61 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" dependencies = [ "crunchy", - "fixed-hash", + "fixed-hash 0.7.0", "impl-codec", "impl-rlp", - "impl-serde", "scale-info", "tiny-keccak", ] [[package]] -name = "ethereum" -version = "0.12.0" +name = "ethbloom" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23750149fe8834c0e24bb9adcbacbe06c45b9861f15df53e09f26cb7c4ab91ef" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ - "bytes", - "ethereum-types", - "hash-db", + "crunchy", + "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23750149fe8834c0e24bb9adcbacbe06c45b9861f15df53e09f26cb7c4ab91ef" +dependencies = [ + "bytes", + "ethereum-types 0.13.1", + "hash-db", "hash256-std-hasher", "parity-scale-codec", "rlp", "rlp-derive", "scale-info", + "sha3 0.10.6", + "triehash", +] + +[[package]] +name = "ethereum" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a89fb87a9e103f71b903b80b670200b54cc67a07578f070681f1fffb7396fb7" +dependencies = [ + "bytes", + "ethereum-types 0.14.0", + "hash-db", + "hash256-std-hasher", + "parity-scale-codec", + "rlp", + "scale-info", "serde", - "sha3 0.10.4", + "sha3 0.10.6", "triehash", ] @@ -2213,12 +2340,27 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" dependencies = [ - "ethbloom", - "fixed-hash", + "ethbloom 0.12.1", + "fixed-hash 0.7.0", + "impl-codec", + "impl-rlp", + "primitive-types 0.11.1", + "scale-info", + "uint", +] + +[[package]] +name = "ethereum-types" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81224dc661606574f5a0f28c9947d0ee1d93ff11c5f1c4e7272f52e8c0b5483c" +dependencies = [ + "ethbloom 0.13.0", + "fixed-hash 0.8.0", "impl-codec", "impl-rlp", "impl-serde", - "primitive-types", + "primitive-types 0.12.1", "scale-info", "uint", ] @@ -2234,19 +2376,37 @@ name = "evm" version = "0.35.0" source = "git+https://github.com/rust-blockchain/evm?rev=01bcbd2205a212c34451d3b4fabc962793b057d3#01bcbd2205a212c34451d3b4fabc962793b057d3" dependencies = [ - "auto_impl", + "auto_impl 0.5.0", + "ethereum 0.12.0", + "evm-core 0.35.0", + "evm-gasometer 0.35.0", + "evm-runtime 0.35.0", + "log", + "parity-scale-codec", + "primitive-types 0.11.1", + "rlp", + "scale-info", + "sha3 0.10.6", +] + +[[package]] +name = "evm" +version = "0.37.0" +source = "git+https://github.com/rust-blockchain/evm?rev=6274e6dd2d43ea84a52573f871fe62047d314e22#6274e6dd2d43ea84a52573f871fe62047d314e22" +dependencies = [ + "auto_impl 1.0.1", "environmental", - "ethereum", - "evm-core", - "evm-gasometer", - "evm-runtime", + "ethereum 0.14.0", + "evm-core 0.37.0", + "evm-gasometer 0.37.0", + "evm-runtime 0.37.0", "log", "parity-scale-codec", - "primitive-types", + "primitive-types 0.12.1", "rlp", "scale-info", "serde", - "sha3 0.10.4", + "sha3 0.10.6", ] [[package]] @@ -2255,7 +2415,17 @@ version = "0.35.0" source = "git+https://github.com/rust-blockchain/evm?rev=01bcbd2205a212c34451d3b4fabc962793b057d3#01bcbd2205a212c34451d3b4fabc962793b057d3" dependencies = [ "parity-scale-codec", - "primitive-types", + "primitive-types 0.11.1", + "scale-info", +] + +[[package]] +name = "evm-core" +version = "0.37.0" +source = "git+https://github.com/rust-blockchain/evm?rev=6274e6dd2d43ea84a52573f871fe62047d314e22#6274e6dd2d43ea84a52573f871fe62047d314e22" +dependencies = [ + "parity-scale-codec", + "primitive-types 0.12.1", "scale-info", "serde", ] @@ -2264,11 +2434,21 @@ dependencies = [ name = "evm-gasometer" version = "0.35.0" source = "git+https://github.com/rust-blockchain/evm?rev=01bcbd2205a212c34451d3b4fabc962793b057d3#01bcbd2205a212c34451d3b4fabc962793b057d3" +dependencies = [ + "evm-core 0.35.0", + "evm-runtime 0.35.0", + "primitive-types 0.11.1", +] + +[[package]] +name = "evm-gasometer" +version = "0.37.0" +source = "git+https://github.com/rust-blockchain/evm?rev=6274e6dd2d43ea84a52573f871fe62047d314e22#6274e6dd2d43ea84a52573f871fe62047d314e22" dependencies = [ "environmental", - "evm-core", - "evm-runtime", - "primitive-types", + "evm-core 0.37.0", + "evm-runtime 0.37.0", + "primitive-types 0.12.1", ] [[package]] @@ -2276,11 +2456,22 @@ name = "evm-runtime" version = "0.35.0" source = "git+https://github.com/rust-blockchain/evm?rev=01bcbd2205a212c34451d3b4fabc962793b057d3#01bcbd2205a212c34451d3b4fabc962793b057d3" dependencies = [ - "auto_impl", + "auto_impl 0.5.0", + "evm-core 0.35.0", + "primitive-types 0.11.1", + "sha3 0.10.6", +] + +[[package]] +name = "evm-runtime" +version = "0.37.0" +source = "git+https://github.com/rust-blockchain/evm?rev=6274e6dd2d43ea84a52573f871fe62047d314e22#6274e6dd2d43ea84a52573f871fe62047d314e22" +dependencies = [ + "auto_impl 1.0.1", "environmental", - "evm-core", - "primitive-types", - "sha3 0.10.4", + "evm-core 0.37.0", + "primitive-types 0.12.1", + "sha3 0.10.6", ] [[package]] @@ -2289,7 +2480,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", ] [[package]] @@ -2300,7 +2491,7 @@ checksum = "a718c0675c555c5f976fff4ea9e2c150fa06cefa201cadef87cfbf9324075881" dependencies = [ "blake3", "fs-err", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", ] @@ -2312,9 +2503,9 @@ checksum = "3774182a5df13c3d1690311ad32fbe913feef26baba609fa2dd5f72042bd2ab6" dependencies = [ "blake2", "fs-err", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -2363,16 +2554,16 @@ dependencies = [ "expander 0.0.4", "indexmap", "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", "thiserror", ] [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "async-trait", "fc-db", @@ -2391,14 +2582,17 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "fp-storage", "kvdb-rocksdb", + "log", "parity-db", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-db", + "smallvec", + "sp-blockchain", "sp-core", "sp-database", "sp-runtime", @@ -2407,12 +2601,12 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "fc-db", "fp-consensus", "fp-rpc", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "log", "sc-client-api", @@ -2424,22 +2618,23 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ - "ethereum", - "ethereum-types", - "evm", + "ethereum 0.14.0", + "ethereum-types 0.14.0", + "evm 0.37.0", "fc-db", "fc-rpc-core", + "fp-ethereum", "fp-evm", "fp-rpc", "fp-storage", - "futures 0.3.24", + "futures 0.3.25", "hex", "jsonrpsee", "libsecp256k1", "log", - "lru 0.7.8", + "lru 0.8.1", "parity-scale-codec", "prometheus", "rand 0.8.5", @@ -2466,10 +2661,10 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ - "ethereum", - "ethereum-types", + "ethereum 0.14.0", + "ethereum-types 0.14.0", "jsonrpsee", "rlp", "rustc-hex", @@ -2508,14 +2703,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" +checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -2525,7 +2720,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b22349c6a11563a202d95772a68e0fcf56119e74ea8a2a19cf2301460fcd0df5" dependencies = [ "either", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "log", "num-traits", @@ -2539,6 +2734,17 @@ name = "fixed-hash" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +dependencies = [ + "byteorder", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", "rand 0.8.5", @@ -2563,6 +2769,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", +] + [[package]] name = "fnv" version = "1.0.7" @@ -2572,7 +2787,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", ] @@ -2589,9 +2804,9 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ - "ethereum", + "ethereum 0.14.0", "parity-scale-codec", "sp-core", "sp-runtime", @@ -2601,7 +2816,7 @@ dependencies = [ [[package]] name = "fp-dynamic-fee" version = "1.0.0" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "async-trait", "sp-core", @@ -2611,12 +2826,13 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ - "ethereum", - "ethereum-types", + "ethereum 0.14.0", + "ethereum-types 0.14.0", "fp-evm", "frame-support", + "num_enum", "parity-scale-codec", "sp-core", "sp-std", @@ -2625,9 +2841,9 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ - "evm", + "evm 0.37.0", "frame-support", "parity-scale-codec", "serde", @@ -2638,10 +2854,10 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ - "ethereum", - "ethereum-types", + "ethereum 0.14.0", + "ethereum-types 0.14.0", "fp-evm", "parity-scale-codec", "scale-info", @@ -2655,9 +2871,9 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ - "ethereum", + "ethereum 0.14.0", "frame-support", "parity-scale-codec", "parity-util-mem", @@ -2669,16 +2885,22 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "parity-scale-codec", "serde", ] +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -2690,6 +2912,7 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", + "sp-core", "sp-io", "sp-runtime", "sp-runtime-interface", @@ -2700,9 +2923,10 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "Inflector", + "array-bytes", "chrono", "clap", "comfy-table", @@ -2712,7 +2936,6 @@ dependencies = [ "gethostname", "handlebars", "hash-db", - "hex", "itertools", "kvdb", "lazy_static", @@ -2751,18 +2974,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2778,10 +3001,11 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", + "frame-try-runtime", "parity-scale-codec", "scale-info", "sp-core", @@ -2806,7 +3030,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "bitflags", "frame-metadata", @@ -2831,47 +3055,50 @@ dependencies = [ "sp-state-machine", "sp-std", "sp-tracing", + "sp-weights", "tt-call", ] [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "Inflector", + "cfg-expr", "frame-support-procedural-tools", - "proc-macro2 1.0.43", + "itertools", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "log", @@ -2883,12 +3110,13 @@ dependencies = [ "sp-runtime", "sp-std", "sp-version", + "sp-weights", ] [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -2903,7 +3131,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "sp-api", @@ -2912,9 +3140,10 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", + "parity-scale-codec", "sp-api", "sp-runtime", "sp-std", @@ -2922,21 +3151,9 @@ dependencies = [ [[package]] name = "fs-err" -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64db3e262960f0662f43a6366788d5f10f7f244b8f7d7d987f560baf5ded5c50" - -[[package]] -name = "fs-swap" -version = "0.2.6" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d47dad3685eceed8488986cad3d5027165ea5edb164331770e2059555f10a5" -dependencies = [ - "lazy_static", - "libc", - "libloading 0.5.2", - "winapi", -] +checksum = "0845fa252299212f0389d64ba26f34fa32cfe41588355f21ed507c59a0f64541" [[package]] name = "fs2" @@ -2968,9 +3185,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" dependencies = [ "futures-channel", "futures-core", @@ -2983,9 +3200,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ "futures-core", "futures-sink", @@ -2993,15 +3210,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] name = "futures-executor" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" dependencies = [ "futures-core", "futures-task", @@ -3011,9 +3228,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" [[package]] name = "futures-lite" @@ -3032,13 +3249,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -3054,15 +3271,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] name = "futures-task" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" [[package]] name = "futures-timer" @@ -3072,9 +3289,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" dependencies = [ "futures 0.1.31", "futures-channel", @@ -3142,9 +3359,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if 1.0.0", "libc", @@ -3216,9 +3433,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ "bytes", "fnv", @@ -3235,9 +3452,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.3.4" +version = "4.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b224eaa4987c03c30b251de7ef0c15a6a59f34222905850dbc3026dfb24d5f" +checksum = "433e4ab33f1213cdc25b5fa45c76881240cfe79284cf2b395e8b9e312a30a2fd" dependencies = [ "log", "pest", @@ -3262,15 +3479,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -3397,12 +3605,6 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" - [[package]] name = "hmac" version = "0.8.1" @@ -3453,7 +3655,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 1.0.3", + "itoa", ] [[package]] @@ -3487,9 +3689,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.20" +version = "0.14.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" dependencies = [ "bytes", "futures-channel", @@ -3500,7 +3702,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.3", + "itoa", "pin-project-lite 0.2.9", "socket2", "tokio", @@ -3511,9 +3713,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" +checksum = "59df7c4e19c950e6e0e868dcc0a300b09a9b88e9ec55bd879ca819087a77355d" dependencies = [ "http", "hyper", @@ -3526,18 +3728,28 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.48" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a0714f28b1ee39ccec0770ccb544eb02c9ef2c82bb096230eefcffa6468b0" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" dependencies = [ "android_system_properties", "core-foundation-sys", + "iana-time-zone-haiku", "js-sys", - "once_cell", "wasm-bindgen", "winapi", ] +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +dependencies = [ + "cxx", + "cxx-build", +] + [[package]] name = "idna" version = "0.2.3" @@ -3571,14 +3783,14 @@ dependencies = [ [[package]] name = "if-watch" -version = "1.1.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015a7df1eb6dda30df37f34b63ada9b7b352984b0e84de2a20ed526345000791" +checksum = "065c008e570a43c00de6aed9714035e5ea6a498c255323db9091722af6ee67dd" dependencies = [ "async-io", "core-foundation", "fnv", - "futures 0.3.24", + "futures 0.3.25", "if-addrs", "ipnet", "log", @@ -3607,9 +3819,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ "serde", ] @@ -3620,19 +3832,19 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", - "hashbrown 0.12.3", + "hashbrown", "serde", ] @@ -3662,15 +3874,19 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "0.5.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec58677acfea8a15352d42fc87d11d63596ade9239e0a7c9352914417515dbe6" +checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "io-lifetimes" -version = "0.7.3" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea37f355c05dde75b84bba2d767906ad522e97cd9e2eef2be7a4ab7fb442c06" +checksum = "a7d367024b3f3414d8e01f437f704f41a9f64ab36f9067fa73e526ad4c763c87" +dependencies = [ + "libc", + "windows-sys 0.42.0", +] [[package]] name = "ip_network" @@ -3680,9 +3896,9 @@ checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" [[package]] name = "ipconfig" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723519edce41262b05d4143ceb95050e4c614f483e78e9fd9e39a8275a84ad98" +checksum = "bd302af1b90f2463a98fa5ad469fc212c8e3175a41c3068601bfa2727591c5be" dependencies = [ "socket2", "widestring", @@ -3692,36 +3908,30 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.5.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" [[package]] name = "itertools" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bf247779e67a9082a4790b45e71ac7cfd1321331a5c856a74a9faebdab78d0" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "itoa" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "jobserver" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" dependencies = [ "libc", ] @@ -3828,9 +4038,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd67957d4280217247588ac86614ead007b301ca2fa9f19c19f880a536f029e3" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -3893,9 +4103,12 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" +checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +dependencies = [ + "cpufeatures", +] [[package]] name = "kerria-runtime" @@ -4005,8 +4218,8 @@ dependencies = [ [[package]] name = "kusama-runtime" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "beefy-primitives", "bitvec", @@ -4029,10 +4242,12 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", + "pallet-fast-unstake", "pallet-gilt", "pallet-grandpa", "pallet-identity", @@ -4047,7 +4262,9 @@ dependencies = [ "pallet-offences-benchmarking", "pallet-preimage", "pallet-proxy", + "pallet-ranked-collective", "pallet-recovery", + "pallet-referenda", "pallet-scheduler", "pallet-session", "pallet-session-benchmarking", @@ -4061,6 +4278,7 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", @@ -4098,14 +4316,16 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] @@ -4119,9 +4339,9 @@ dependencies = [ [[package]] name = "kvdb" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a301d8ecb7989d4a6e2c57a49baca77d353bdbf879909debe3f375fe25d61f86" +checksum = "585089ceadba0197ffe9af6740ab350b325e3c1f5fccfbc3522e0250c750409b" dependencies = [ "parity-util-mem", "smallvec", @@ -4129,9 +4349,9 @@ dependencies = [ [[package]] name = "kvdb-memorydb" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357" +checksum = "40d109c87bfb7759edd2a49b2649c1afe25af785d930ad6a38479b4dc70dd873" dependencies = [ "kvdb", "parity-util-mem", @@ -4140,15 +4360,13 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca7fbdfd71cd663dceb0faf3367a99f8cf724514933e9867cec4995b6027cbc1" +checksum = "c076cc2cdbac89b9910c853a36c957d3862a779f31c2661174222cefb49ee597" dependencies = [ - "fs-swap", "kvdb", "log", "num_cpus", - "owning_ref", "parity-util-mem", "parking_lot 0.12.1", "regex", @@ -4173,25 +4391,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.132" +version = "0.2.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" +checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" [[package]] name = "libloading" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" -dependencies = [ - "cc", - "winapi", -] - -[[package]] -name = "libloading" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ "cfg-if 1.0.0", "winapi", @@ -4199,28 +4407,24 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "292a948cd991e376cf75541fe5b97a1081d713c618b4f1b9500f8844e49eb565" +checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "libp2p" -version = "0.46.1" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81327106887e42d004fbdab1fef93675be2e2e07c1b95fce45e2cc813485611d" +checksum = "ec878fda12ebec479186b3914ebc48ff180fa4c51847e11a1a68bf65249e02c1" dependencies = [ "bytes", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", - "getrandom 0.2.7", + "getrandom 0.2.8", "instant", "lazy_static", - "libp2p-autonat", "libp2p-core", - "libp2p-deflate", "libp2p-dns", - "libp2p-floodsub", - "libp2p-gossipsub", "libp2p-identify", "libp2p-kad", "libp2p-mdns", @@ -4228,60 +4432,34 @@ dependencies = [ "libp2p-mplex", "libp2p-noise", "libp2p-ping", - "libp2p-plaintext", - "libp2p-pnet", - "libp2p-relay", - "libp2p-rendezvous", "libp2p-request-response", "libp2p-swarm", "libp2p-swarm-derive", "libp2p-tcp", - "libp2p-uds", "libp2p-wasm-ext", "libp2p-websocket", "libp2p-yamux", "multiaddr", "parking_lot 0.12.1", "pin-project", - "rand 0.7.3", "smallvec", ] -[[package]] -name = "libp2p-autonat" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4decc51f3573653a9f4ecacb31b1b922dd20c25a6322bb15318ec04287ec46f9" -dependencies = [ - "async-trait", - "futures 0.3.24", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-request-response", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.8.5", -] - [[package]] name = "libp2p-core" -version = "0.34.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf9b94cefab7599b2d3dff2f93bee218c6621d68590b23ede4485813cbcece6" +checksum = "799676bb0807c788065e57551c6527d461ad572162b0519d1958946ff9e0539d" dependencies = [ "asn1_der", "bs58", "ed25519-dalek", "either", "fnv", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "instant", "lazy_static", - "libsecp256k1", "log", "multiaddr", "multihash", @@ -4291,9 +4469,8 @@ dependencies = [ "prost", "prost-build", "rand 0.8.5", - "ring", "rw-stream-sink", - "sha2 0.10.5", + "sha2 0.10.6", "smallvec", "thiserror", "unsigned-varint", @@ -4301,25 +4478,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "libp2p-deflate" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0183dc2a3da1fbbf85e5b6cf51217f55b14f5daea0c455a9536eef646bfec71" -dependencies = [ - "flate2", - "futures 0.3.24", - "libp2p-core", -] - [[package]] name = "libp2p-dns" -version = "0.34.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbf54723250fa5d521383be789bf60efdabe6bacfb443f87da261019a49b4b5" +checksum = "2322c9fb40d99101def6a01612ee30500c89abbbecb6297b3cd252903a4c1720" dependencies = [ "async-std-resolver", - "futures 0.3.24", + "futures 0.3.25", "libp2p-core", "log", "parking_lot 0.12.1", @@ -4327,65 +4493,19 @@ dependencies = [ "trust-dns-resolver", ] -[[package]] -name = "libp2p-floodsub" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a4b6ffd53e355775d24b76f583fdda54b3284806f678499b57913adb94f231" -dependencies = [ - "cuckoofilter", - "fnv", - "futures 0.3.24", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "smallvec", -] - -[[package]] -name = "libp2p-gossipsub" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74b4b888cfbeb1f5551acd3aa1366e01bf88ede26cc3c4645d0d2d004d5ca7b0" -dependencies = [ - "asynchronous-codec", - "base64", - "byteorder", - "bytes", - "fnv", - "futures 0.3.24", - "hex_fmt", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "prometheus-client", - "prost", - "prost-build", - "rand 0.7.3", - "regex", - "sha2 0.10.5", - "smallvec", - "unsigned-varint", - "wasm-timer", -] - [[package]] name = "libp2p-identify" -version = "0.37.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50b585518f8efd06f93ac2f976bd672e17cdac794644b3117edd078e96bda06" +checksum = "dcf9a121f699e8719bda2e6e9e9b6ddafc6cff4602471d6481c1067930ccb29b" dependencies = [ "asynchronous-codec", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "libp2p-core", "libp2p-swarm", "log", - "lru 0.7.8", + "lru 0.8.1", "prost", "prost-build", "prost-codec", @@ -4396,16 +4516,16 @@ dependencies = [ [[package]] name = "libp2p-kad" -version = "0.38.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740862893bb5f06ac24acc9d49bdeadc3a5e52e51818a30a25c1f3519da2c851" +checksum = "6721c200e2021f6c3fab8b6cf0272ead8912d871610ee194ebd628cecf428f22" dependencies = [ "arrayvec 0.7.2", "asynchronous-codec", "bytes", "either", "fnv", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "instant", "libp2p-core", @@ -4413,8 +4533,8 @@ dependencies = [ "log", "prost", "prost-build", - "rand 0.7.3", - "sha2 0.10.5", + "rand 0.8.5", + "sha2 0.10.6", "smallvec", "thiserror", "uint", @@ -4424,16 +4544,15 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.38.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66e5e5919509603281033fd16306c61df7a4428ce274b67af5e14b07de5cdcb2" +checksum = "761704e727f7d68d58d7bc2231eafae5fc1b9814de24290f126df09d4bd37a15" dependencies = [ "async-io", "data-encoding", "dns-parser", - "futures 0.3.24", + "futures 0.3.25", "if-watch", - "lazy_static", "libp2p-core", "libp2p-swarm", "log", @@ -4445,54 +4564,52 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.7.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8aff4a1abef42328fbb30b17c853fff9be986dc39af17ee39f9c5f755c5e0c" +checksum = "9ee31b08e78b7b8bfd1c4204a9dd8a87b4fcdf6dafc57eb51701c1c264a81cb9" dependencies = [ "libp2p-core", - "libp2p-gossipsub", "libp2p-identify", "libp2p-kad", "libp2p-ping", - "libp2p-relay", "libp2p-swarm", "prometheus-client", ] [[package]] name = "libp2p-mplex" -version = "0.34.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fd1b20638ec209c5075dfb2e8ce6a7ea4ec3cd3ad7b77f7a477c06d53322e2" +checksum = "692664acfd98652de739a8acbb0a0d670f1d67190a49be6b4395e22c37337d89" dependencies = [ "asynchronous-codec", "bytes", - "futures 0.3.24", + "futures 0.3.25", "libp2p-core", "log", "nohash-hasher", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "unsigned-varint", ] [[package]] name = "libp2p-noise" -version = "0.37.0" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "762408cb5d84b49a600422d7f9a42c18012d8da6ebcd570f9a4a4290ba41fb6f" +checksum = "048155686bd81fe6cb5efdef0c6290f25ad32a0a42e8f4f72625cf6a505a206f" dependencies = [ "bytes", "curve25519-dalek 3.2.0", - "futures 0.3.24", + "futures 0.3.25", "lazy_static", "libp2p-core", "log", "prost", "prost-build", "rand 0.8.5", - "sha2 0.10.5", + "sha2 0.10.6", "snow", "static_assertions", "x25519-dalek", @@ -4501,133 +4618,53 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "100a6934ae1dbf8a693a4e7dd1d730fd60b774dafc45688ed63b554497c6c925" -dependencies = [ - "futures 0.3.24", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.7.3", - "void", -] - -[[package]] -name = "libp2p-plaintext" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be27bf0820a6238a4e06365b096d428271cce85a129cf16f2fe9eb1610c4df86" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures 0.3.24", - "libp2p-core", - "log", - "prost", - "prost-build", - "unsigned-varint", - "void", -] - -[[package]] -name = "libp2p-pnet" -version = "0.22.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1a458bbda880107b5b36fcb9b5a1ef0c329685da0e203ed692a8ebe64cc92c" +checksum = "7228b9318d34689521349a86eb39a3c3a802c9efc99a0568062ffb80913e3f91" dependencies = [ - "futures 0.3.24", - "log", - "pin-project", - "rand 0.7.3", - "salsa20", - "sha3 0.9.1", -] - -[[package]] -name = "libp2p-relay" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4931547ee0cce03971ccc1733ff05bb0c4349fd89120a39e9861e2bbe18843c3" -dependencies = [ - "asynchronous-codec", - "bytes", - "either", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "instant", "libp2p-core", "libp2p-swarm", "log", - "pin-project", - "prost", - "prost-build", - "prost-codec", - "rand 0.8.5", - "smallvec", - "static_assertions", - "thiserror", - "void", -] - -[[package]] -name = "libp2p-rendezvous" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9511c9672ba33284838e349623319c8cad2d18cfad243ae46c6b7e8a2982ea4e" -dependencies = [ - "asynchronous-codec", - "bimap", - "futures 0.3.24", - "futures-timer", - "instant", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", "rand 0.8.5", - "sha2 0.10.5", - "thiserror", - "unsigned-varint", "void", ] [[package]] name = "libp2p-request-response" -version = "0.19.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "508a189e2795d892c8f5c1fa1e9e0b1845d32d7b0b249dbf7b05b18811361843" +checksum = "8827af16a017b65311a410bb626205a9ad92ec0473967618425039fa5231adc1" dependencies = [ "async-trait", "bytes", - "futures 0.3.24", + "futures 0.3.25", "instant", "libp2p-core", "libp2p-swarm", "log", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "unsigned-varint", ] [[package]] name = "libp2p-swarm" -version = "0.37.0" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ac5be6c2de2d1ff3f7693fda6faf8a827b1f3e808202277783fea9f527d114" +checksum = "46d13df7c37807965d82930c0e4b04a659efcb6cca237373b206043db5398ecf" dependencies = [ "either", "fnv", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "instant", "libp2p-core", "log", "pin-project", - "rand 0.7.3", + "rand 0.8.5", "smallvec", "thiserror", "void", @@ -4635,50 +4672,38 @@ dependencies = [ [[package]] name = "libp2p-swarm-derive" -version = "0.28.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f54a64b6957249e0ce782f8abf41d97f69330d02bf229f0672d864f0650cc76" +checksum = "a0eddc4497a8b5a506013c40e8189864f9c3a00db2b25671f428ae9007f3ba32" dependencies = [ + "heck", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "libp2p-tcp" -version = "0.34.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6771dc19aa3c65d6af9a8c65222bfc8fcd446630ddca487acd161fa6096f3b" +checksum = "9839d96761491c6d3e238e70554b856956fca0ab60feb9de2cd08eed4473fa92" dependencies = [ "async-io", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "if-watch", - "ipnet", "libc", "libp2p-core", "log", "socket2", ] -[[package]] -name = "libp2p-uds" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d125e3e5f0d58f3c6ac21815b20cf4b6a88b8db9dc26368ea821838f4161fd4d" -dependencies = [ - "async-std", - "futures 0.3.24", - "libp2p-core", - "log", -] - [[package]] name = "libp2p-wasm-ext" -version = "0.34.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec894790eec3c1608f8d1a8a0bdf0dbeb79ed4de2dce964222011c2896dfa05a" +checksum = "a17b5b8e7a73e379e47b1b77f8a82c4721e97eca01abcd18e9cd91a23ca6ce97" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "js-sys", "libp2p-core", "parity-send-wrapper", @@ -4688,12 +4713,12 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.36.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9808e57e81be76ff841c106b4c5974fb4d41a233a7bdd2afbf1687ac6def3818" +checksum = "3758ae6f89b2531a24b6d9f5776bda6a626b60a57600d7185d43dfa75ca5ecc4" dependencies = [ "either", - "futures 0.3.24", + "futures 0.3.25", "futures-rustls", "libp2p-core", "log", @@ -4707,12 +4732,13 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.38.0" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6dea686217a06072033dc025631932810e2f6ad784e4fafa42e27d311c7a81c" +checksum = "0d6874d66543c4f7e26e3b8ca9a6bead351563a13ab4fafd43c7927f7c0d6c12" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "libp2p-core", + "log", "parking_lot 0.12.1", "thiserror", "yamux", @@ -4720,9 +4746,9 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "0.6.1+6.28.2" +version = "0.8.0+7.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc587013734dadb7cf23468e531aa120788b87243648be42e2d3a072186291" +checksum = "611804e4666a25136fcc5f8cf425ab4d26c7f74ea245ffe92ea23b85b6420b5d" dependencies = [ "bindgen", "bzip2-sys", @@ -4792,6 +4818,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "link-cplusplus" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +dependencies = [ + "cc", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -4819,21 +4854,21 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.0.42" +version = "0.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5284f00d480e1c39af34e72f8ad60b94f47007e3481cd3b731c1d67190ddc7b7" +checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" [[package]] name = "linux-raw-sys" -version = "0.0.46" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" +checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f" [[package]] name = "lock_api" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ "autocfg", "scopeguard", @@ -4855,16 +4890,16 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" dependencies = [ - "hashbrown 0.12.3", + "hashbrown", ] [[package]] name = "lru" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936d98d2ddd79c18641c6709e7bb09981449694e402d1a0f0f657ea8d61f4a51" +checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" dependencies = [ - "hashbrown 0.12.3", + "hashbrown", ] [[package]] @@ -4943,18 +4978,18 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.4.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6627dc657574b49d6ad27105ed671822be56e0d2547d413bfbf3e8d8fa92e7a" +checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" dependencies = [ - "libc", + "rustix 0.36.3", ] [[package]] name = "memmap2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498" +checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" dependencies = [ "libc", ] @@ -4968,14 +5003,23 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + [[package]] name = "memory-db" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" +checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" dependencies = [ "hash-db", - "hashbrown 0.12.3", + "hashbrown", "parity-util-mem", ] @@ -4985,14 +5029,14 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce95ae042940bad7e312857b929ee3d11b8f799a80cb7b9c7ec5125516906395" dependencies = [ - "lru 0.8.0", + "lru 0.8.1", ] [[package]] name = "memory_units" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" [[package]] name = "merlin" @@ -5012,7 +5056,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "rand 0.8.5", "thrift", ] @@ -5034,21 +5078,42 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] -name = "more-asserts" -version = "0.2.2" +name = "mockall" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e4a1c770583dac7ab5e2f6c139153b783a53a1bbee9729613f193e59828326" +dependencies = [ + "cfg-if 1.0.0", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" +checksum = "832663583d5fa284ca8810bf7015e46c9fff9622d3cf34bd1eea5003fec06dd0" +dependencies = [ + "cfg-if 1.0.0", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", +] [[package]] name = "multiaddr" @@ -5089,10 +5154,10 @@ dependencies = [ "blake2s_simd", "blake3", "core2", - "digest 0.10.4", + "digest 0.10.6", "multihash-derive", - "sha2 0.10.5", - "sha3 0.10.4", + "sha2 0.10.6", + "sha3 0.10.6", "unsigned-varint", ] @@ -5104,9 +5169,9 @@ checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" dependencies = [ "proc-macro-crate", "proc-macro-error", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", "synstructure", ] @@ -5118,12 +5183,12 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "multistream-select" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "363a84be6453a70e63513660f4894ef815daf88e3356bffcda9ca27d810ce83b" +checksum = "9bc41247ec209813e2fd414d6e16b9d94297dacf3cd613fa6ef09cd4d9755c10" dependencies = [ "bytes", - "futures 0.3.24", + "futures 0.3.25", "log", "pin-project", "smallvec", @@ -5154,9 +5219,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -5219,7 +5284,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65b4b14489ab424703c092062176d52ba55485a89c076b4f9db05092b7223aa6" dependencies = [ "bytes", - "futures 0.3.24", + "futures 0.3.25", "log", "netlink-packet-core", "netlink-sys", @@ -5235,7 +5300,7 @@ checksum = "92b654097027250401127914afb37cb1f311df6610a9891ff07a757e94199027" dependencies = [ "async-io", "bytes", - "futures 0.3.24", + "futures 0.3.25", "libc", "log", ] @@ -5273,6 +5338,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + [[package]] name = "num" version = "0.4.0" @@ -5320,12 +5391,12 @@ dependencies = [ [[package]] name = "num-format" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" +checksum = "54b862ff8df690cf089058c98b183676a7ed0f974cc08b426800093227cbff3b" dependencies = [ - "arrayvec 0.4.12", - "itoa 0.4.8", + "arrayvec 0.7.2", + "itoa", ] [[package]] @@ -5385,9 +5456,9 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ "hermit-abi", "libc", @@ -5408,21 +5479,10 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro-crate", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", -] - -[[package]] -name = "object" -version = "0.28.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" -dependencies = [ - "crc32fast", - "hashbrown 0.11.2", - "indexmap", - "memchr", + "syn 1.0.103", ] [[package]] @@ -5431,14 +5491,17 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ + "crc32fast", + "hashbrown", + "indexmap", "memchr", ] [[package]] name = "once_cell" -version = "1.14.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "opaque-debug" @@ -5460,12 +5523,13 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "orchestra" -version = "0.0.1" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aab54694ddaa8a9b703724c6ef04272b2d27bc32d2c855aae5cdd1857216b43" dependencies = [ "async-trait", "dyn-clonable", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "orchestra-proc-macro", "pin-project", @@ -5476,16 +5540,17 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.1" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a702b2f6bf592b3eb06c00d80d05afaf7a8eff6b41bb361e397d799acc21b45a" dependencies = [ "expander 0.0.6", "itertools", "petgraph", "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -5500,7 +5565,7 @@ dependencies = [ [[package]] name = "orml-oracle" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=20969f385bf77e41386e8d8aa9626b003a306204#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=f336875e48599b5e9500b301385259354821f01f#f336875e48599b5e9500b301385259354821f01f" dependencies = [ "frame-support", "frame-system", @@ -5518,7 +5583,7 @@ dependencies = [ [[package]] name = "orml-oracle-rpc" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=20969f385bf77e41386e8d8aa9626b003a306204#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=f336875e48599b5e9500b301385259354821f01f#f336875e48599b5e9500b301385259354821f01f" dependencies = [ "jsonrpsee", "orml-oracle-rpc-runtime-api", @@ -5533,7 +5598,7 @@ dependencies = [ [[package]] name = "orml-oracle-rpc-runtime-api" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=20969f385bf77e41386e8d8aa9626b003a306204#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=f336875e48599b5e9500b301385259354821f01f#f336875e48599b5e9500b301385259354821f01f" dependencies = [ "parity-scale-codec", "sp-api", @@ -5543,7 +5608,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=20969f385bf77e41386e8d8aa9626b003a306204#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=f336875e48599b5e9500b301385259354821f01f#f336875e48599b5e9500b301385259354821f01f" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -5561,7 +5626,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=20969f385bf77e41386e8d8aa9626b003a306204#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=f336875e48599b5e9500b301385259354821f01f#f336875e48599b5e9500b301385259354821f01f" dependencies = [ "frame-support", "parity-scale-codec", @@ -5575,7 +5640,7 @@ dependencies = [ [[package]] name = "orml-vesting" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=20969f385bf77e41386e8d8aa9626b003a306204#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=f336875e48599b5e9500b301385259354821f01f#f336875e48599b5e9500b301385259354821f01f" dependencies = [ "frame-support", "frame-system", @@ -5590,7 +5655,7 @@ dependencies = [ [[package]] name = "orml-xcm" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=20969f385bf77e41386e8d8aa9626b003a306204#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=f336875e48599b5e9500b301385259354821f01f#f336875e48599b5e9500b301385259354821f01f" dependencies = [ "frame-support", "frame-system", @@ -5604,7 +5669,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=20969f385bf77e41386e8d8aa9626b003a306204#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=f336875e48599b5e9500b301385259354821f01f#f336875e48599b5e9500b301385259354821f01f" dependencies = [ "frame-support", "orml-traits", @@ -5618,7 +5683,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=20969f385bf77e41386e8d8aa9626b003a306204#20969f385bf77e41386e8d8aa9626b003a306204" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library.git?rev=f336875e48599b5e9500b301385259354821f01f#f336875e48599b5e9500b301385259354821f01f" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -5638,18 +5703,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" - -[[package]] -name = "owning_ref" -version = "0.4.1" +version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -dependencies = [ - "stable_deref_trait", -] +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] name = "pallet-amm" @@ -5697,7 +5753,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -5714,7 +5770,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5728,7 +5784,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -5744,7 +5800,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -5760,7 +5816,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -5775,7 +5831,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5799,7 +5855,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5819,7 +5875,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5834,7 +5890,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "fp-evm", "frame-support", @@ -5849,7 +5905,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "beefy-primitives", "frame-support", @@ -5865,13 +5921,13 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ + "array-bytes", "beefy-merkle-tree", "beefy-primitives", "frame-support", "frame-system", - "hex", "log", "pallet-beefy", "pallet-mmr", @@ -5888,7 +5944,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5926,7 +5982,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5945,7 +6001,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" version = "3.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "frame-benchmarking", "frame-support", @@ -5956,7 +6012,6 @@ dependencies = [ "parity-scale-codec", "rand 0.8.5", "scale-info", - "serde", "sp-runtime", "sp-staking", "sp-std", @@ -5965,7 +6020,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -5973,7 +6028,24 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-conviction-voting" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" +dependencies = [ + "assert_matches", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "serde", "sp-io", "sp-runtime", "sp-std", @@ -6040,14 +6112,16 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "serde", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -6056,13 +6130,14 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-support", "frame-system", "log", + "pallet-election-provider-support-benchmarking", "parity-scale-codec", "rand 0.7.3", "scale-info", @@ -6079,7 +6154,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6092,7 +6167,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6125,11 +6200,11 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ - "ethereum", - "ethereum-types", - "evm", + "ethereum 0.14.0", + "ethereum-types 0.14.0", + "evm 0.37.0", "fp-consensus", "fp-ethereum", "fp-evm", @@ -6152,9 +6227,10 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ - "evm", + "environmental", + "evm 0.37.0", "fp-evm", "frame-benchmarking", "frame-support", @@ -6163,7 +6239,7 @@ dependencies = [ "log", "pallet-timestamp", "parity-scale-codec", - "primitive-types", + "primitive-types 0.12.1", "rlp", "scale-info", "serde", @@ -6192,7 +6268,7 @@ dependencies = [ "precompile-utils", "scale-info", "serde", - "sha3 0.10.4", + "sha3 0.10.6", "slices", "sp-core", "sp-io", @@ -6231,7 +6307,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "fp-evm", ] @@ -6239,7 +6315,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "fp-evm", "sp-core", @@ -6249,7 +6325,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "fp-evm", "frame-support", @@ -6259,7 +6335,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-ed25519" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "ed25519-dalek", "fp-evm", @@ -6268,7 +6344,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "fp-evm", "num", @@ -6277,7 +6353,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "fp-evm", "tiny-keccak", @@ -6286,7 +6362,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/parallel-finance/frontier.git?rev=2e09cac89ef57f688a73dccff72d88c1003c786a#2e09cac89ef57f688a73dccff72d88c1003c786a" +source = "git+https://github.com/parallel-finance/frontier.git?rev=aee1041c59274939484348b886762d522a7b4e28#aee1041c59274939484348b886762d522a7b4e28" dependencies = [ "fp-evm", "ripemd", @@ -6337,10 +6413,31 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-fast-unstake" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "pallet-staking", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6355,7 +6452,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6378,7 +6475,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6394,7 +6491,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6414,7 +6511,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6531,7 +6628,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6548,7 +6645,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -6566,7 +6663,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -6581,11 +6678,12 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-io", @@ -6596,7 +6694,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -6613,7 +6711,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6625,6 +6723,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", + "sp-runtime-interface", "sp-staking", "sp-std", ] @@ -6632,7 +6731,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "sp-api", @@ -6642,7 +6741,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -6659,7 +6758,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6682,11 +6781,12 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", "sp-core", @@ -6722,13 +6822,31 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-ranked-collective" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec", "scale-info", + "sp-arithmetic", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -6737,13 +6855,31 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-referenda" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ + "assert_matches", "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", + "serde", + "sp-arithmetic", "sp-io", "sp-runtime", "sp-std", @@ -6801,7 +6937,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6817,7 +6953,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -6838,7 +6974,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6854,7 +6990,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -6891,7 +7027,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6914,18 +7050,18 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "log", "sp-arithmetic", @@ -6958,7 +7094,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -6972,7 +7108,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -6990,7 +7126,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7031,7 +7167,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-support", "frame-system", @@ -7047,7 +7183,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7057,23 +7193,25 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", + "sp-weights", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "sp-api", "sp-runtime", + "sp-weights", ] [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7090,7 +7228,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7105,7 +7243,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7121,7 +7259,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-benchmarking", "frame-support", @@ -7133,10 +7271,25 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-whitelist" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-xcm" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "frame-support", "frame-system", @@ -7153,8 +7306,8 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "frame-benchmarking", "frame-support", @@ -7210,23 +7363,21 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "serde", ] [[package]] name = "parachains-common" version = "1.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-primitives-utility", - "frame-executive", "frame-support", "frame-system", "pallet-asset-tx-payment", @@ -7236,7 +7387,6 @@ dependencies = [ "pallet-collator-selection", "parity-scale-codec", "polkadot-primitives", - "polkadot-runtime-common", "scale-info", "sp-consensus-aura", "sp-core", @@ -7245,7 +7395,6 @@ dependencies = [ "sp-std", "substrate-wasm-builder", "xcm", - "xcm-builder", "xcm-executor", ] @@ -7266,6 +7415,7 @@ dependencies = [ "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", + "cumulus-relay-chain-minimal-node", "cumulus-relay-chain-rpc-interface", "derive_more 0.15.0", "fc-consensus", @@ -7282,7 +7432,7 @@ dependencies = [ "frame-benchmarking", "frame-benchmarking-cli", "frame-system-rpc-runtime-api", - "futures 0.3.24", + "futures 0.3.25", "heiko-runtime", "hex-literal", "jsonrpsee", @@ -7515,9 +7665,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9299338969a3d2f491d65f140b00ddec470858402f888af98e8642fb5e8965cd" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -7528,18 +7678,18 @@ checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" [[package]] name = "parity-util-mem" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" +checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" dependencies = [ "cfg-if 1.0.0", - "ethereum-types", - "hashbrown 0.12.3", + "ethereum-types 0.14.0", + "hashbrown", "impl-trait-for-tuples", - "lru 0.7.8", + "lru 0.8.1", "parity-util-mem-derive", "parking_lot 0.12.1", - "primitive-types", + "primitive-types 0.12.1", "smallvec", "winapi", ] @@ -7550,8 +7700,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "proc-macro2 1.0.43", - "syn 1.0.99", + "proc-macro2 1.0.47", + "syn 1.0.103", "synstructure", ] @@ -7566,9 +7716,9 @@ dependencies = [ [[package]] name = "parity-wasm" -version = "0.42.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" @@ -7594,7 +7744,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.3", + "parking_lot_core 0.9.4", ] [[package]] @@ -7613,15 +7763,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-sys 0.42.0", ] [[package]] @@ -7662,9 +7812,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb779fcf4bb850fbbb0edc96ff6cf34fd90c4b1a112ce042653280d9a7364048" +checksum = "a528564cc62c19a7acac4d81e01f39e53e25e17b934878f4c6d25cc2836e62f8" dependencies = [ "thiserror", "ucd-trie", @@ -7672,9 +7822,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502b62a6d0245378b04ffe0a7fb4f4419a4815fce813bd8a0ec89a56e07d67b1" +checksum = "d5fd9bc6500181952d34bd0b2b0163a54d794227b498be0b7afa7698d0a7b18f" dependencies = [ "pest", "pest_generator", @@ -7682,22 +7832,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451e629bf49b750254da26132f1a5a9d11fd8a95a3df51d15c4abd1ba154cb6c" +checksum = "d2610d5ac5156217b4ff8e46ddcef7cdf44b273da2ac5bca2ecbfa86a330e7c4" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "pest_meta" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcec162c71c45e269dfc3fc2916eaeb97feab22993a21bcce4721d08cd7801a6" +checksum = "824749bf7e21dd66b36fbe26b3f45c713879cccd4a009a917ab8e045ca8246fe" dependencies = [ "once_cell", "pest", @@ -7729,9 +7879,9 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -7752,11 +7902,22 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "platforms" @@ -7766,10 +7927,10 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "polkadot-approval-distribution" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7781,10 +7942,10 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -7795,13 +7956,13 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "derive_more 0.99.17", "fatality", - "futures 0.3.24", - "lru 0.7.8", + "futures 0.3.25", + "lru 0.8.1", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7818,12 +7979,12 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "fatality", - "futures 0.3.24", - "lru 0.7.8", + "futures 0.3.25", + "lru 0.8.1", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7839,12 +8000,12 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "clap", "frame-benchmarking-cli", - "futures 0.3.24", + "futures 0.3.25", "log", "polkadot-client", "polkadot-node-core-pvf", @@ -7865,8 +8026,8 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "beefy-primitives", "frame-benchmarking", @@ -7906,12 +8067,13 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "always-assert", + "bitvec", "fatality", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -7927,8 +8089,8 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "parity-scale-codec", "parity-util-mem", @@ -7940,13 +8102,15 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "derive_more 0.99.17", "fatality", - "futures 0.3.24", - "lru 0.7.8", + "futures 0.3.25", + "futures-timer", + "indexmap", + "lru 0.8.1", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-network-protocol", @@ -7963,8 +8127,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -7977,10 +8141,10 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -7997,14 +8161,14 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "always-assert", "async-trait", "bytes", "fatality", - "futures 0.3.24", + "futures 0.3.25", "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-network-protocol", @@ -8021,10 +8185,10 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "parity-scale-codec", "polkadot-erasure-coding", "polkadot-node-primitives", @@ -8039,15 +8203,15 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "bitvec", "derive_more 0.99.17", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "kvdb", - "lru 0.7.8", + "lru 0.8.1", "merlin", "parity-scale-codec", "polkadot-node-jaeger", @@ -8068,11 +8232,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "bitvec", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "kvdb", "parity-scale-codec", @@ -8088,12 +8252,12 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "bitvec", "fatality", - "futures 0.3.24", + "futures 0.3.25", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -8107,10 +8271,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", @@ -8122,11 +8286,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "async-trait", - "futures 0.3.24", + "futures 0.3.25", "parity-scale-codec", "polkadot-node-core-pvf", "polkadot-node-primitives", @@ -8140,10 +8304,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", @@ -8155,10 +8319,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "kvdb", "parity-scale-codec", @@ -8172,13 +8336,13 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "fatality", - "futures 0.3.24", + "futures 0.3.25", "kvdb", - "lru 0.7.8", + "lru 0.8.1", "parity-scale-codec", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -8191,11 +8355,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "async-trait", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "polkadot-node-subsystem", "polkadot-primitives", @@ -8208,12 +8372,12 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "bitvec", "fatality", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -8226,19 +8390,19 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "always-assert", "assert_matches", "async-process", "async-std", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "parity-scale-codec", "pin-project", "polkadot-core-primitives", - "polkadot-node-subsystem-util", + "polkadot-node-metrics", "polkadot-parachain", "rand 0.8.5", "rayon", @@ -8258,10 +8422,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -8274,10 +8438,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "memory-lru", "parity-util-mem", "polkadot-node-subsystem", @@ -8290,8 +8454,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "async-std", "lazy_static", @@ -8308,11 +8472,11 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "bs58", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "log", "parity-scale-codec", @@ -8327,13 +8491,13 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "async-trait", "derive_more 0.99.17", "fatality", - "futures 0.3.24", + "futures 0.3.25", "hex", "parity-scale-codec", "polkadot-node-jaeger", @@ -8342,6 +8506,7 @@ dependencies = [ "rand 0.8.5", "sc-authority-discovery", "sc-network", + "sc-network-common", "strum", "thiserror", "tracing-gum", @@ -8349,11 +8514,11 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "bounded-vec", - "futures 0.3.24", + "futures 0.3.25", "parity-scale-codec", "polkadot-parachain", "polkadot-primitives", @@ -8371,8 +8536,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -8381,12 +8546,12 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "async-trait", "derive_more 0.99.17", - "futures 0.3.24", + "futures 0.3.25", "orchestra", "polkadot-node-jaeger", "polkadot-node-network-protocol", @@ -8404,16 +8569,16 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "async-trait", "derive_more 0.99.17", "fatality", - "futures 0.3.24", + "futures 0.3.25", "itertools", "kvdb", - "lru 0.7.8", + "lru 0.8.1", "parity-db", "parity-scale-codec", "parity-util-mem", @@ -8437,13 +8602,13 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "async-trait", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", - "lru 0.7.8", + "lru 0.8.1", "orchestra", "parity-util-mem", "parking_lot 0.12.1", @@ -8460,8 +8625,8 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "derive_more 0.99.17", "frame-support", @@ -8477,8 +8642,8 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "env_logger", "kusama-runtime", @@ -8492,8 +8657,8 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "bitvec", "frame-system", @@ -8522,8 +8687,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", @@ -8554,8 +8719,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "beefy-primitives", "bitvec", @@ -8581,6 +8746,7 @@ dependencies = [ "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", + "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -8589,6 +8755,7 @@ dependencies = [ "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", + "pallet-nomination-pools-runtime-api", "pallet-offences", "pallet-offences-benchmarking", "pallet-preimage", @@ -8641,8 +8808,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "beefy-primitives", "bitvec", @@ -8688,20 +8855,22 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] name = "polkadot-runtime-metrics" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "bs58", "parity-scale-codec", @@ -8712,8 +8881,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "bitflags", "bitvec", @@ -8755,20 +8924,21 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "async-trait", "beefy-gadget", "beefy-primitives", + "frame-support", "frame-system-rpc-runtime-api", - "futures 0.3.24", + "futures 0.3.25", "hex-literal", "kusama-runtime", "kusama-runtime-constants", "kvdb", "kvdb-rocksdb", - "lru 0.7.8", + "lru 0.8.1", "pallet-babe", "pallet-im-online", "pallet-staking", @@ -8859,12 +9029,12 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "arrayvec 0.5.2", "fatality", - "futures 0.3.24", + "futures 0.3.25", "indexmap", "parity-scale-codec", "polkadot-node-network-protocol", @@ -8880,8 +9050,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -8890,9 +9060,9 @@ dependencies = [ [[package]] name = "polling" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899b00b9c8ab553c743b3e11e87c5c7d423b2a2de229ba95b24a756344748011" +checksum = "ab4609a838d88b73d8238967b60dd115cc08d38e2bbaf51ee1e4b695f89122e2" dependencies = [ "autocfg", "cfg-if 1.0.0", @@ -8927,15 +9097,15 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "precompile-utils" version = "1.9.2" dependencies = [ - "evm", + "evm 0.35.0", "fp-evm", "frame-support", "frame-system", @@ -8946,7 +9116,7 @@ dependencies = [ "pallet-evm", "parity-scale-codec", "precompile-utils-macro", - "sha3 0.10.4", + "sha3 0.10.6", "similar-asserts", "sp-core", "sp-io", @@ -8960,10 +9130,50 @@ name = "precompile-utils-macro" version = "0.1.0" dependencies = [ "num_enum", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "sha3 0.8.2", - "syn 1.0.99", + "syn 1.0.103", +] + +[[package]] +name = "predicates" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed6bd09a7f7e68f3f0bf710fb7ab9c4615a488b58b5f653382a687701e458c92" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" + +[[package]] +name = "predicates-tree" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "prettyplease" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c142c0e46b57171fe0c528bee8c5b7569e80f0c17e377cd0e30ea57dbc11bb51" +dependencies = [ + "proc-macro2 1.0.47", + "syn 1.0.103", ] [[package]] @@ -8972,7 +9182,20 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" dependencies = [ - "fixed-hash", + "fixed-hash 0.7.0", + "impl-codec", + "impl-rlp", + "scale-info", + "uint", +] + +[[package]] +name = "primitive-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +dependencies = [ + "fixed-hash 0.8.0", "impl-codec", "impl-rlp", "impl-serde", @@ -8983,12 +9206,13 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" version = "0.2.0" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382698e48a268c832d0b181ed438374a6bb708a82a8ca273bb0f61c74cf209c4" dependencies = [ "coarsetime", "crossbeam-queue", "derive_more 0.99.17", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "nanorand", "thiserror", @@ -9013,9 +9237,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", "version_check", ] @@ -9025,7 +9249,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "version_check", ] @@ -9041,18 +9265,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] [[package]] name = "prometheus" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c8babc29389186697fe5a2a4859d697825496b83db5d0b65271cdc0488e88c" +checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" dependencies = [ "cfg-if 1.0.0", "fnv", @@ -9064,32 +9288,32 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.16.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1abe0255c04d15f571427a2d1e00099016506cf3297b53853acd2b7eb87825" +checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" dependencies = [ "dtoa", - "itoa 1.0.3", - "owning_ref", + "itoa", + "parking_lot 0.12.1", "prometheus-client-derive-text-encode", ] [[package]] name = "prometheus-client-derive-text-encode" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e12d01b9d66ad9eb4529c57666b6263fc1993cb30261d83ead658fdd932652" +checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "prost" -version = "0.10.4" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" +checksum = "a0841812012b2d4a6145fae9a6af1534873c32aa67fff26bd09f8fa42c83f95a" dependencies = [ "bytes", "prost-derive", @@ -9097,31 +9321,31 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.10.4" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae5a4388762d5815a9fc0dea33c56b021cdc8dde0c55e0c9ca57197254b0cab" +checksum = "1d8b442418ea0822409d9e7d047cbf1e7e9e1760b172bf9982cf29d517c93511" dependencies = [ "bytes", - "cfg-if 1.0.0", - "cmake", "heck", "itertools", "lazy_static", "log", "multimap", "petgraph", + "prettyplease", "prost", "prost-types", "regex", + "syn 1.0.103", "tempfile", "which", ] [[package]] name = "prost-codec" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00af1e92c33b4813cc79fda3f2dbf56af5169709be0202df730e9ebc3e4cd007" +checksum = "011ae9ff8359df7915f97302d591cdd9e0e27fbd5a4ddc5bd13b71079bb20987" dependencies = [ "asynchronous-codec", "bytes", @@ -9132,22 +9356,22 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.10.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" +checksum = "164ae68b6587001ca506d3bf7f1000bfa248d0e1217b618108fba4ec1d0cc306" dependencies = [ "anyhow", "itertools", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "prost-types" -version = "0.10.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" +checksum = "747761bc3dc48f9a34553bf65605cf6cb6288ba219f3450b4275dbd81539551a" dependencies = [ "bytes", "prost", @@ -9155,9 +9379,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f446d0a6efba22928558c4fb4ce0b3fd6c89b0061343e390bf01a703742b8125" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" dependencies = [ "cc", ] @@ -9194,7 +9418,7 @@ version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", ] [[package]] @@ -9263,7 +9487,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.7", + "getrandom 0.2.8", ] [[package]] @@ -9311,11 +9535,10 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.5.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b" dependencies = [ - "autocfg", "crossbeam-deque", "either", "rayon-core", @@ -9323,9 +9546,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -9348,7 +9571,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.7", + "getrandom 0.2.8", "redox_syscall", "thiserror", ] @@ -9362,35 +9585,35 @@ dependencies = [ "derive_more 0.99.17", "fs-err", "itertools", - "static_init", + "static_init 0.5.2", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.9" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed13bcd201494ab44900a96490291651d200730904221832b9547d24a87d332b" +checksum = "53b15debb4f9d60d767cd8ca9ef7abb2452922f3214671ff052defc7f3502c44" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.9" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5234cd6063258a5e32903b53b1b6ac043a0541c8adc1f610f67b0326c7a578fa" +checksum = "abfa8511e9e94fd3de6585a3d3cd00e01ed556dc9814829280af0e8dc72a8f36" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "regalloc2" -version = "0.2.3" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a8d23b35d7177df3b9d31ed8a9ab4bf625c668be77a319d4f5efd4a5257701c" +checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779" dependencies = [ "fxhash", "log", @@ -9400,9 +9623,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" dependencies = [ "aho-corasick", "memchr", @@ -9420,29 +9643,16 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" - -[[package]] -name = "region" -version = "2.2.0" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0" -dependencies = [ - "bitflags", - "libc", - "mach", - "winapi", -] +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "env_logger", - "jsonrpsee", "log", "parity-scale-codec", "serde", @@ -9451,6 +9661,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-version", + "substrate-rpc-client", ] [[package]] @@ -9500,20 +9711,21 @@ dependencies = [ [[package]] name = "ripemd" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1facec54cb5e0dc08553501fa740091086d0259ad0067e0d4103448e4cb22ed3" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "digest 0.10.4", + "digest 0.10.6", ] [[package]] name = "rlp" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", + "rlp-derive", "rustc-hex", ] @@ -9523,16 +9735,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "rocksdb" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290" +checksum = "7e9562ea1d70c0cc63a34a22d977753b50cca91cc6b6527750463bd5dd8697bc" dependencies = [ "libc", "librocksdb-sys", @@ -9540,8 +9752,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -9559,23 +9771,37 @@ dependencies = [ "pallet-balances", "pallet-beefy", "pallet-beefy-mmr", + "pallet-bounties", + "pallet-child-bounties", "pallet-collective", + "pallet-democracy", + "pallet-elections-phragmen", + "pallet-gilt", "pallet-grandpa", + "pallet-identity", "pallet-im-online", "pallet-indices", "pallet-membership", "pallet-mmr", "pallet-multisig", "pallet-offences", + "pallet-preimage", "pallet-proxy", + "pallet-recovery", + "pallet-scheduler", "pallet-session", + "pallet-society", "pallet-staking", "pallet-sudo", "pallet-timestamp", + "pallet-tips", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", "pallet-utility", + "pallet-vesting", "pallet-xcm", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-parachain", "polkadot-primitives", @@ -9601,6 +9827,7 @@ dependencies = [ "sp-std", "sp-transaction-pool", "sp-version", + "static_assertions", "substrate-wasm-builder", "xcm", "xcm-builder", @@ -9609,21 +9836,23 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] name = "rpassword" -version = "5.0.1" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" +checksum = "20c9f5d2a0c3e2ea729ab3706d22217177770654c3ef5056b68b69d07332d3f5" dependencies = [ "libc", "winapi", @@ -9636,7 +9865,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322c53fd76a18698f1c27381d58091de3a043d356aa5bd0d510608b565f469a0" dependencies = [ "async-global-executor", - "futures 0.3.24", + "futures 0.3.25", "log", "netlink-packet-route", "netlink-proto", @@ -9755,37 +9984,37 @@ dependencies = [ [[package]] name = "rustix" -version = "0.33.7" +version = "0.35.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938a344304321a9da4973b9ff4f9f8db9caf4597dfd9dda6a60b523340a0fff0" +checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" dependencies = [ "bitflags", "errno", - "io-lifetimes 0.5.3", + "io-lifetimes 0.7.5", "libc", - "linux-raw-sys 0.0.42", - "winapi", + "linux-raw-sys 0.0.46", + "windows-sys 0.42.0", ] [[package]] name = "rustix" -version = "0.35.9" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c825b8aa8010eb9ee99b75f05e10180b9278d161583034d7574c9d617aeada" +checksum = "0b1fbb4dfc4eb1d390c02df47760bb19a84bb80b301ecc947ab5406394d8223e" dependencies = [ "bitflags", "errno", - "io-lifetimes 0.7.3", + "io-lifetimes 1.0.1", "libc", - "linux-raw-sys 0.0.46", - "windows-sys", + "linux-raw-sys 0.1.3", + "windows-sys 0.42.0", ] [[package]] name = "rustls" -version = "0.20.6" +version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" +checksum = "539a2bfe908f471bfa933876bd1eb6a19cf2176d375f82ef7f99530a40e48c2c" dependencies = [ "log", "ring", @@ -9826,7 +10055,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26338f5e09bb721b85b135ea05af7767c90b52f6de4f087d4f4a3a9d64e7dc04" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "pin-project", "static_assertions", ] @@ -9837,15 +10066,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" -[[package]] -name = "salsa20" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0fbb5f676da676c260ba276a8f43a8dc67cf02d1438423aeb1c677a7212686" -dependencies = [ - "cipher", -] - [[package]] name = "same-file" version = "1.0.6" @@ -9858,7 +10078,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "log", "sp-core", @@ -9869,9 +10089,10 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "async-trait", + "futures 0.3.25", "futures-timer", "ip_network", "libp2p", @@ -9881,7 +10102,6 @@ dependencies = [ "prost-build", "rand 0.7.3", "sc-client-api", - "sc-network", "sc-network-common", "sp-api", "sp-authority-discovery", @@ -9896,9 +10116,9 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "log", "parity-scale-codec", @@ -9919,7 +10139,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9935,13 +10155,13 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "impl-trait-for-tuples", "memmap2", "parity-scale-codec", "sc-chain-spec-derive", - "sc-network", + "sc-network-common", "sc-telemetry", "serde", "serde_json", @@ -9952,24 +10172,24 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ + "array-bytes", "chrono", "clap", "fdlimit", - "futures 0.3.24", - "hex", + "futures 0.3.25", "libp2p", "log", "names", @@ -9981,6 +10201,7 @@ dependencies = [ "sc-client-db", "sc-keystore", "sc-network", + "sc-network-common", "sc-service", "sc-telemetry", "sc-tracing", @@ -10002,10 +10223,10 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "fnv", - "futures 0.3.24", + "futures 0.3.25", "hash-db", "log", "parity-scale-codec", @@ -10030,7 +10251,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "hash-db", "kvdb", @@ -10055,10 +10276,10 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "libp2p", "log", @@ -10079,10 +10300,10 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", - "futures 0.3.24", + "futures 0.3.25", "log", "parity-scale-codec", "sc-block-builder", @@ -10108,11 +10329,11 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", "fork-tree", - "futures 0.3.24", + "futures 0.3.25", "log", "merlin", "num-bigint 0.2.6", @@ -10150,9 +10371,9 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "jsonrpsee", "sc-consensus-babe", "sc-consensus-epochs", @@ -10172,7 +10393,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10185,11 +10406,11 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "assert_matches", "async-trait", - "futures 0.3.24", + "futures 0.3.25", "jsonrpsee", "log", "parity-scale-codec", @@ -10219,10 +10440,10 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "log", "parity-scale-codec", @@ -10237,14 +10458,13 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-timestamp", "thiserror", ] [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "lazy_static", "lru 0.7.8", @@ -10271,7 +10491,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "environmental", "parity-scale-codec", @@ -10287,7 +10507,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "log", "parity-scale-codec", @@ -10302,15 +10522,15 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "cfg-if 1.0.0", "libc", "log", "once_cell", "parity-scale-codec", - "parity-wasm 0.42.2", - "rustix 0.35.9", + "parity-wasm 0.45.0", + "rustix 0.35.13", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -10322,16 +10542,16 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "ahash", + "array-bytes", "async-trait", "dyn-clone", "finality-grandpa", "fork-tree", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", - "hex", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -10363,10 +10583,10 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "finality-grandpa", - "futures 0.3.24", + "futures 0.3.25", "jsonrpsee", "log", "parity-scale-codec", @@ -10384,10 +10604,10 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "ansi_term", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "log", "parity-util-mem", @@ -10401,10 +10621,10 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ + "array-bytes", "async-trait", - "hex", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -10416,8 +10636,9 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ + "array-bytes", "async-trait", "asynchronous-codec", "bitflags", @@ -10426,9 +10647,8 @@ dependencies = [ "either", "fnv", "fork-tree", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", - "hex", "ip_network", "libp2p", "linked-hash-map", @@ -10439,7 +10659,6 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "prost", - "prost-build", "rand 0.7.3", "sc-block-builder", "sc-client-api", @@ -10458,44 +10677,68 @@ dependencies = [ "substrate-prometheus-endpoint", "thiserror", "unsigned-varint", - "void", "zeroize", ] +[[package]] +name = "sc-network-bitswap" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" +dependencies = [ + "cid", + "futures 0.3.25", + "libp2p", + "log", + "prost", + "prost-build", + "sc-client-api", + "sc-network-common", + "sp-blockchain", + "sp-runtime", + "thiserror", + "unsigned-varint", + "void", +] + [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", "bitflags", "bytes", - "futures 0.3.24", + "futures 0.3.25", + "futures-timer", "libp2p", + "linked_hash_set", "parity-scale-codec", "prost-build", "sc-consensus", "sc-peerset", + "serde", "smallvec", + "sp-blockchain", "sp-consensus", "sp-finality-grandpa", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "ahash", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "libp2p", "log", "lru 0.7.8", - "sc-network", "sc-network-common", + "sc-peerset", "sp-runtime", "substrate-prometheus-endpoint", "tracing", @@ -10504,10 +10747,10 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", - "hex", + "array-bytes", + "futures 0.3.25", "libp2p", "log", "parity-scale-codec", @@ -10525,14 +10768,15 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ + "array-bytes", "fork-tree", - "futures 0.3.24", - "hex", + "futures 0.3.25", "libp2p", "log", "lru 0.7.8", + "mockall", "parity-scale-codec", "prost", "prost-build", @@ -10540,6 +10784,7 @@ dependencies = [ "sc-consensus", "sc-network-common", "sc-peerset", + "sc-utils", "smallvec", "sp-arithmetic", "sp-blockchain", @@ -10550,26 +10795,46 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-network-transactions" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" +dependencies = [ + "array-bytes", + "futures 0.3.25", + "hex", + "libp2p", + "log", + "parity-scale-codec", + "pin-project", + "sc-network-common", + "sc-peerset", + "sp-consensus", + "sp-runtime", + "substrate-prometheus-endpoint", +] + [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ + "array-bytes", "bytes", "fnv", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", - "hex", "hyper", "hyper-rustls", + "libp2p", "num_cpus", "once_cell", "parity-scale-codec", "parking_lot 0.12.1", "rand 0.7.3", "sc-client-api", - "sc-network", "sc-network-common", + "sc-peerset", "sc-utils", "sp-api", "sp-core", @@ -10582,9 +10847,9 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "libp2p", "log", "sc-utils", @@ -10595,7 +10860,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10604,9 +10869,9 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "hash-db", "jsonrpsee", "log", @@ -10634,9 +10899,9 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "jsonrpsee", "log", "parity-scale-codec", @@ -10657,9 +10922,9 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "jsonrpsee", "log", "serde_json", @@ -10667,15 +10932,34 @@ dependencies = [ "tokio", ] +[[package]] +name = "sc-rpc-spec-v2" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" +dependencies = [ + "futures 0.3.25", + "hex", + "jsonrpsee", + "parity-scale-codec", + "sc-chain-spec", + "sc-transaction-pool-api", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "hash-db", "jsonrpsee", @@ -10694,12 +10978,15 @@ dependencies = [ "sc-informant", "sc-keystore", "sc-network", + "sc-network-bitswap", "sc-network-common", "sc-network-light", "sc-network-sync", + "sc-network-transactions", "sc-offchain", "sc-rpc", "sc-rpc-server", + "sc-rpc-spec-v2", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -10726,6 +11013,7 @@ dependencies = [ "sp-transaction-storage-proof", "sp-trie", "sp-version", + "static_init 1.0.3", "substrate-prometheus-endpoint", "tempfile", "thiserror", @@ -10737,7 +11025,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "log", "parity-scale-codec", @@ -10751,7 +11039,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10770,9 +11058,9 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "libc", "log", "rand 0.7.3", @@ -10789,10 +11077,10 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "chrono", - "futures 0.3.24", + "futures 0.3.25", "libp2p", "log", "parking_lot 0.12.1", @@ -10807,7 +11095,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "ansi_term", "atty", @@ -10838,20 +11126,21 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "async-trait", + "futures 0.3.25", "futures-timer", "linked-hash-map", "log", @@ -10875,9 +11164,10 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "async-trait", + "futures 0.3.25", "log", "serde", "sp-blockchain", @@ -10888,9 +11178,9 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "lazy_static", "log", @@ -10900,9 +11190,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "333af15b02563b8182cd863f925bd31ef8fa86a0e095d30c091956057d436153" +checksum = "88d8a765117b237ef233705cc2cc4c6a27fccd46eea6ef0c8c6dae5f3ef407f8" dependencies = [ "bitvec", "cfg-if 1.0.0", @@ -10914,14 +11204,14 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f56acbd0743d29ffa08f911ab5397def774ad01bab3786804cf6ee057fb5e1" +checksum = "cdcd47b380d8c4541044e341dcd9475f55ba37ddc50c908d945fc036a8642496" dependencies = [ "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -10931,7 +11221,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "windows-sys", + "windows-sys 0.36.1", ] [[package]] @@ -10958,6 +11248,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "scratch" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" + [[package]] name = "sct" version = "0.7.0" @@ -10976,24 +11272,25 @@ checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" dependencies = [ "der", "generic-array 0.14.6", + "pkcs8", "subtle", "zeroize", ] [[package]] name = "secp256k1" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7649a0b3ffb32636e60c7ce0d70511eda9c52c658cd0634e194d5a19943aeff" +checksum = "ff55dc09d460954e9ef2fa8a7ced735a964be9981fd50e870b2b3b0705e14964" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7058dc8eaf3f2810d7828680320acda0b25a288f6d288e19278e249bbf74226b" +checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" dependencies = [ "cc", ] @@ -11065,31 +11362,31 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.144" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" +checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.144" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "serde_json" -version = "1.0.85" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" +checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" dependencies = [ - "itoa 1.0.3", + "itoa", "ryu", "serde", ] @@ -11118,13 +11415,13 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.4", + "digest 0.10.6", ] [[package]] @@ -11154,13 +11451,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9db03534dff993187064c4e0c05a5708d2a9728ace9a8959b77bedf415dac5" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.4", + "digest 0.10.6", ] [[package]] @@ -11178,23 +11475,11 @@ dependencies = [ [[package]] name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha3" -version = "0.10.4" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaedf34ed289ea47c2b741bb72e5357a209512d67bcd4bda44359e5bf0470f56" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" dependencies = [ - "digest 0.10.4", + "digest 0.10.6", "keccak", ] @@ -11256,9 +11541,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ac7f900db32bf3fd12e0117dd3dc4da74bc52ebaac97f39668446d89694803" +checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" dependencies = [ "bstr", "unicode-segmentation", @@ -11296,15 +11581,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2086e458a369cdca838e9f6ed04b4cc2e3ce636d99abb80c9e2eada107749cf" dependencies = [ "faster-hex", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "slot-range-helper" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "enumn", "parity-scale-codec", @@ -11324,15 +11609,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "snap" -version = "1.0.5" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45456094d1983e2ee2a18fdfebce3189fa451699d0502cb8e3b49dba5ba41451" +checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" @@ -11347,7 +11632,7 @@ dependencies = [ "rand_core 0.6.4", "ring", "rustc_version 0.4.0", - "sha2 0.10.5", + "sha2 0.10.6", "subtle", ] @@ -11370,7 +11655,7 @@ dependencies = [ "base64", "bytes", "flate2", - "futures 0.3.24", + "futures 0.3.25", "httparse", "log", "rand 0.8.5", @@ -11380,7 +11665,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "hash-db", "log", @@ -11390,6 +11675,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-std", + "sp-trie", "sp-version", "thiserror", ] @@ -11397,19 +11683,19 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "blake2", "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11422,7 +11708,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "integer-sqrt", "num-traits", @@ -11437,7 +11723,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11450,7 +11736,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", "parity-scale-codec", @@ -11462,7 +11748,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "sp-api", @@ -11474,9 +11760,9 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "log", "lru 0.7.8", "parity-scale-codec", @@ -11492,10 +11778,10 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", - "futures 0.3.24", + "futures 0.3.25", "futures-timer", "log", "parity-scale-codec", @@ -11511,7 +11797,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", "parity-scale-codec", @@ -11529,7 +11815,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", "merlin", @@ -11552,7 +11838,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11566,7 +11852,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11579,18 +11865,18 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ + "array-bytes", "base58", "bitflags", - "blake2-rfc", + "blake2", "byteorder", "dyn-clonable", - "ed25519-dalek", - "futures 0.3.24", + "ed25519-zebra", + "futures 0.3.25", "hash-db", "hash256-std-hasher", - "hex", "impl-serde", "lazy_static", "libsecp256k1", @@ -11600,7 +11886,7 @@ dependencies = [ "parity-scale-codec", "parity-util-mem", "parking_lot 0.12.1", - "primitive-types", + "primitive-types 0.12.1", "rand 0.7.3", "regex", "scale-info", @@ -11625,13 +11911,13 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "blake2", "byteorder", - "digest 0.10.4", - "sha2 0.10.5", - "sha3 0.10.4", + "digest 0.10.6", + "sha2 0.10.6", + "sha3 0.10.6", "sp-std", "twox-hash", ] @@ -11639,18 +11925,18 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "sp-core-hashing", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11659,17 +11945,17 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "environmental", "parity-scale-codec", @@ -11680,7 +11966,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "finality-grandpa", "log", @@ -11698,7 +11984,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11712,10 +11998,10 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "bytes", - "futures 0.3.24", + "futures 0.3.25", "hash-db", "libsecp256k1", "log", @@ -11738,7 +12024,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "lazy_static", "sp-core", @@ -11749,10 +12035,10 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", - "futures 0.3.24", + "futures 0.3.25", "merlin", "parity-scale-codec", "parking_lot 0.12.1", @@ -11766,7 +12052,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "thiserror", "zstd", @@ -11775,10 +12061,11 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "log", "parity-scale-codec", + "scale-info", "serde", "sp-api", "sp-core", @@ -11790,7 +12077,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11804,7 +12091,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "sp-api", "sp-core", @@ -11814,7 +12101,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "backtrace", "lazy_static", @@ -11824,7 +12111,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "rustc-hash", "serde", @@ -11834,7 +12121,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "either", "hash256-std-hasher", @@ -11851,17 +12138,18 @@ dependencies = [ "sp-core", "sp-io", "sp-std", + "sp-weights", ] [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "primitive-types", + "primitive-types 0.12.1", "sp-externalities", "sp-runtime-interface-proc-macro", "sp-std", @@ -11874,19 +12162,19 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "Inflector", "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "log", "parity-scale-codec", @@ -11900,7 +12188,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11914,7 +12202,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "scale-info", @@ -11925,7 +12213,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "hash-db", "log", @@ -11947,12 +12235,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11965,7 +12253,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "log", "sp-core", @@ -11978,7 +12266,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", "futures-timer", @@ -11994,7 +12282,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", "sp-std", @@ -12006,7 +12294,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "sp-api", "sp-runtime", @@ -12015,7 +12303,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "async-trait", "log", @@ -12031,15 +12319,22 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ + "ahash", "hash-db", + "hashbrown", + "lazy_static", + "lru 0.7.8", "memory-db", + "nohash-hasher", "parity-scale-codec", + "parking_lot 0.12.1", "scale-info", "sp-core", "sp-std", "thiserror", + "tracing", "trie-db", "trie-root", ] @@ -12047,11 +12342,11 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "impl-serde", "parity-scale-codec", - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", "scale-info", "serde", "sp-core-hashing-proc-macro", @@ -12064,18 +12359,18 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "parity-scale-codec", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "impl-trait-for-tuples", "log", @@ -12085,21 +12380,47 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sp-weights" +version = "4.0.0" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" +dependencies = [ + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde", + "smallvec", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", +] + [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "ss58-registry" -version = "1.29.0" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0837b5d62f42082c9d56cd946495ae273a3c68083b637b9153341d5e465146d" +checksum = "fa0813c10b9dbdc842c2305f949f724c64866e4ef4d09c9151e96f6a2106773c" dependencies = [ "Inflector", "num-format", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "serde", "serde_json", @@ -12115,7 +12436,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "statemine-runtime" version = "2.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -12123,7 +12444,6 @@ dependencies = [ "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", - "cumulus-ping", "cumulus-primitives-core", "cumulus-primitives-timestamp", "cumulus-primitives-utility", @@ -12155,14 +12475,12 @@ dependencies = [ "polkadot-parachain", "polkadot-runtime-common", "scale-info", - "serde", "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", "sp-core", "sp-inherents", - "sp-io", "sp-offchain", "sp-runtime", "sp-session", @@ -12178,7 +12496,7 @@ dependencies = [ [[package]] name = "statemint-runtime" version = "1.0.0" -source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.28#15f48687e545e4b171a0af1065cec59002bc7145" +source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.32#6abd385ce49f7feb882218646410feb063404b77" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -12186,7 +12504,6 @@ dependencies = [ "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", - "cumulus-ping", "cumulus-primitives-core", "cumulus-primitives-timestamp", "cumulus-primitives-utility", @@ -12218,14 +12535,12 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-constants", "scale-info", - "serde", "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", "sp-core", "sp-inherents", - "sp-io", "sp-offchain", "sp-runtime", "sp-session", @@ -12253,7 +12568,22 @@ dependencies = [ "cfg_aliases", "libc", "parking_lot 0.11.2", - "static_init_macro", + "static_init_macro 0.5.0", +] + +[[package]] +name = "static_init" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" +dependencies = [ + "bitflags", + "cfg_aliases", + "libc", + "parking_lot 0.11.2", + "parking_lot_core 0.8.5", + "static_init_macro 1.0.2", + "winapi", ] [[package]] @@ -12264,9 +12594,22 @@ checksum = "f2261c91034a1edc3fc4d1b80e89d82714faede0515c14a75da10cb941546bbf" dependencies = [ "cfg_aliases", "memchr", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", +] + +[[package]] +name = "static_init_macro" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a2595fc3aa78f2d0e45dd425b22282dd863273761cc77780914b2cf3003acf" +dependencies = [ + "cfg_aliases", + "memchr", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -12304,10 +12647,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "rustversion", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -12339,7 +12682,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "platforms", ] @@ -12357,10 +12700,10 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "frame-system-rpc-runtime-api", - "futures 0.3.24", + "futures 0.3.25", "jsonrpsee", "log", "parity-scale-codec", @@ -12378,7 +12721,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "futures-util", "hyper", @@ -12388,10 +12731,23 @@ dependencies = [ "tokio", ] +[[package]] +name = "substrate-rpc-client" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" +dependencies = [ + "async-trait", + "jsonrpsee", + "log", + "sc-rpc-api", + "serde", + "sp-runtime", +] + [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "jsonrpsee", "log", @@ -12412,7 +12768,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "ansi_term", "build-helper", @@ -12445,11 +12801,11 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.99" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", "unicode-ident", ] @@ -12460,9 +12816,9 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", "unicode-xid 0.2.4", ] @@ -12495,9 +12851,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" +checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" [[package]] name = "tempfile" @@ -12533,29 +12889,29 @@ dependencies = [ ] [[package]] -name = "textwrap" -version = "0.15.1" +name = "termtree" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" +checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" [[package]] name = "thiserror" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -12597,9 +12953,9 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.4.3+5.2.1-patched.2" +version = "0.5.2+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49" +checksum = "ec45c14da997d0925c7835883e4d5c181f196fa142f8c19d7643d1e9af2592c3" dependencies = [ "cc", "fs_extra", @@ -12662,9 +13018,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.21.1" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0020c875007ad96677dcc890298f4b942882c5d4eb7cc8f439fc3bf813dc9c95" +checksum = "d76ce4a75fb488c605c54bf610f221cea8b0dafb53333c1a67e8ee199dcd2ae3" dependencies = [ "autocfg", "bytes", @@ -12672,7 +13028,6 @@ dependencies = [ "memchr", "mio", "num_cpus", - "once_cell", "parking_lot 0.12.1", "pin-project-lite 0.2.9", "signal-hook-registry", @@ -12687,9 +13042,9 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -12705,9 +13060,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" dependencies = [ "futures-core", "pin-project-lite 0.2.9", @@ -12746,9 +13101,9 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.36" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", "pin-project-lite 0.2.9", @@ -12758,20 +13113,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "tracing-core" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ "once_cell", "valuable", @@ -12789,8 +13144,8 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -12800,14 +13155,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "expander 0.0.6", "proc-macro-crate", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] @@ -12856,12 +13211,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.23.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83" +checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" dependencies = [ "hash-db", - "hashbrown 0.12.3", + "hashbrown", "log", "rustc-hex", "smallvec", @@ -12888,9 +13243,9 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c31f240f59877c3d4bb3b3ea0ec5a6a0cff07323580ff8c7a605cd7d08b255d" +checksum = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" dependencies = [ "async-trait", "cfg-if 1.0.0", @@ -12902,30 +13257,30 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "log", "rand 0.8.5", "smallvec", "thiserror", "tinyvec", + "tracing", "url", ] [[package]] name = "trust-dns-resolver" -version = "0.21.2" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ba72c2ea84515690c9fcef4c6c660bb9df3036ed1051686de84605b74fd558" +checksum = "aff21aa4dcefb0a1afbfac26deb0adc93888c7d295fb63ab273ef276ba2b7cfe" dependencies = [ "cfg-if 1.0.0", "futures-util", "ipconfig", "lazy_static", - "log", "lru-cache", "parking_lot 0.12.1", "resolv-conf", "smallvec", "thiserror", + "tracing", "trust-dns-proto", ] @@ -12938,10 +13293,10 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d95309aaccfa399c5f72e5a14a4b7c6c4ca1" dependencies = [ "clap", - "jsonrpsee", + "frame-try-runtime", "log", "parity-scale-codec", "remote-externalities", @@ -12957,6 +13312,8 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-version", + "sp-weights", + "substrate-rpc-client", "zstd", ] @@ -12973,7 +13330,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if 1.0.0", - "digest 0.10.4", + "digest 0.10.6", "rand 0.8.5", "static_assertions", ] @@ -13001,9 +13358,9 @@ checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "a45526d29728d135c2900b0d30573fe3ee79fceb12ef534c7bb30e810a91b601" dependencies = [ "byteorder", "crunchy", @@ -13028,15 +13385,15 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "unicode-normalization" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] @@ -13309,9 +13666,9 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", "wasm-bindgen-shared", ] @@ -13343,9 +13700,9 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -13369,11 +13726,11 @@ dependencies = [ [[package]] name = "wasm-instrument" -version = "0.1.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "962e5b0401bbb6c887f54e69b8c496ea36f704df65db73e81fd5ff8dc3e63a9f" +checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" dependencies = [ - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", ] [[package]] @@ -13382,7 +13739,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -13393,58 +13750,63 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.9.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" +checksum = "06c326c93fbf86419608361a2c925a31754cf109da1b8b55737070b4d6669422" dependencies = [ - "downcast-rs", - "libc", - "libm", - "memory_units", - "num-rational 0.2.4", - "num-traits", - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", "wasmi-validation", + "wasmi_core", ] [[package]] name = "wasmi-validation" -version = "0.4.1" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" +dependencies = [ + "parity-wasm 0.45.0", +] + +[[package]] +name = "wasmi_core" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165343ecd6c018fc09ebcae280752702c9a2ef3e6f8d02f1cfcbdb53ef6d7937" +checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" dependencies = [ - "parity-wasm 0.42.2", + "downcast-rs", + "libm", + "memory_units", + "num-rational 0.4.1", + "num-traits", ] [[package]] name = "wasmparser" -version = "0.85.0" +version = "0.89.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570460c58b21e9150d2df0eaaedbb7816c34bcec009ae0dcc976e40ba81463e7" +checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" dependencies = [ "indexmap", ] [[package]] name = "wasmtime" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f50eadf868ab6a04b7b511460233377d0bfbb92e417b2f6a98b98fef2e098f5" +checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731" dependencies = [ "anyhow", - "backtrace", "bincode", "cfg-if 1.0.0", "indexmap", - "lazy_static", "libc", "log", - "object 0.28.4", + "object", "once_cell", "paste", "psm", "rayon", - "region", "serde", "target-lexicon", "wasmparser", @@ -13453,14 +13815,23 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "winapi", + "windows-sys 0.36.1", +] + +[[package]] +name = "wasmtime-asm-macros" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597" +dependencies = [ + "cfg-if 1.0.0", ] [[package]] name = "wasmtime-cache" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1df23c642e1376892f3b72f311596976979cbf8b85469680cdd3a8a063d12a2" +checksum = "bcd849399d17d2270141cfe47fa0d91ee52d5f8ea9b98cf7ddde0d53e5f79882" dependencies = [ "anyhow", "base64", @@ -13468,19 +13839,19 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.33.7", + "rustix 0.35.13", "serde", "sha2 0.9.9", "toml", - "winapi", + "windows-sys 0.36.1", "zstd", ] [[package]] name = "wasmtime-cranelift" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f264ff6b4df247d15584f2f53d009fbc90032cfdc2605b52b961bffc71b6eccd" +checksum = "4bd91339b742ff20bfed4532a27b73c86b5bcbfedd6bea2dcdf2d64471e1b5c6" dependencies = [ "anyhow", "cranelift-codegen", @@ -13490,8 +13861,7 @@ dependencies = [ "cranelift-wasm", "gimli", "log", - "more-asserts", - "object 0.28.4", + "object", "target-lexicon", "thiserror", "wasmparser", @@ -13500,17 +13870,16 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "839d2820e4b830f4b9e7aa08d4c0acabf4a5036105d639f6dfa1c6891c73bdc6" +checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644" dependencies = [ "anyhow", "cranelift-entity", "gimli", "indexmap", "log", - "more-asserts", - "object 0.28.4", + "object", "serde", "target-lexicon", "thiserror", @@ -13520,9 +13889,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef0a0bcbfa18b946d890078ba0e1bc76bcc53eccfb40806c0020ec29dcd1bd49" +checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" dependencies = [ "addr2line", "anyhow", @@ -13531,38 +13900,36 @@ dependencies = [ "cpp_demangle", "gimli", "log", - "object 0.28.4", - "region", + "object", "rustc-demangle", - "rustix 0.33.7", + "rustix 0.35.13", "serde", "target-lexicon", "thiserror", "wasmtime-environ", "wasmtime-jit-debug", "wasmtime-runtime", - "winapi", + "windows-sys 0.36.1", ] [[package]] name = "wasmtime-jit-debug" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4779d976206c458edd643d1ac622b6c37e4a0800a8b1d25dfbf245ac2f2cac" +checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" dependencies = [ - "lazy_static", - "object 0.28.4", - "rustix 0.33.7", + "object", + "once_cell", + "rustix 0.35.13", ] [[package]] name = "wasmtime-runtime" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7eb6ffa169eb5dcd18ac9473c817358cd57bc62c244622210566d473397954a" +checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd" dependencies = [ "anyhow", - "backtrace", "cc", "cfg-if 1.0.0", "indexmap", @@ -13570,22 +13937,22 @@ dependencies = [ "log", "mach", "memfd", - "memoffset", - "more-asserts", + "memoffset 0.6.5", + "paste", "rand 0.8.5", - "region", - "rustix 0.33.7", + "rustix 0.35.13", "thiserror", + "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "winapi", + "windows-sys 0.36.1", ] [[package]] name = "wasmtime-types" -version = "0.38.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d932b0ac5336f7308d869703dd225610a6a3aeaa8e968c52b43eed96cefb1c2" +checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb" dependencies = [ "cranelift-entity", "serde", @@ -13615,9 +13982,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.4" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" +checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be" dependencies = [ "webpki", ] @@ -13633,8 +14000,8 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "beefy-primitives", "bitvec", @@ -13658,6 +14025,7 @@ dependencies = [ "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", + "pallet-fast-unstake", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -13722,14 +14090,16 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", + "sp-core", "sp-runtime", + "sp-weights", ] [[package]] @@ -13806,6 +14176,27 @@ dependencies = [ "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + [[package]] name = "windows_aarch64_msvc" version = "0.34.0" @@ -13818,6 +14209,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + [[package]] name = "windows_i686_gnu" version = "0.34.0" @@ -13830,6 +14227,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + [[package]] name = "windows_i686_msvc" version = "0.34.0" @@ -13842,6 +14245,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + [[package]] name = "windows_x86_64_gnu" version = "0.34.0" @@ -13854,6 +14263,18 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + [[package]] name = "windows_x86_64_msvc" version = "0.34.0" @@ -13866,20 +14287,26 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + [[package]] name = "winreg" -version = "0.7.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ "winapi", ] [[package]] name = "wyz" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" dependencies = [ "tap", ] @@ -13897,8 +14324,8 @@ dependencies = [ [[package]] name = "xcm" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -13911,8 +14338,8 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "frame-support", "frame-system", @@ -13932,7 +14359,7 @@ dependencies = [ [[package]] name = "xcm-emulator" version = "0.1.0" -source = "git+https://github.com/shaunxw/xcm-simulator.git?rev=6c02911a3eeb04c342e4eb273d2ffbedd45dabff#6c02911a3eeb04c342e4eb273d2ffbedd45dabff" +source = "git+https://github.com/MrPai/xcm-simulator.git?rev=5f0839a34b2b32e312901afffd16de07a7714757#5f0839a34b2b32e312901afffd16de07a7714757" dependencies = [ "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -13948,6 +14375,7 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-parachains", "quote 1.0.21", + "sp-arithmetic", "sp-io", "sp-std", "xcm", @@ -13956,8 +14384,8 @@ dependencies = [ [[package]] name = "xcm-executor" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "frame-benchmarking", "frame-support", @@ -13974,19 +14402,19 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "Inflector", - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", ] [[package]] name = "xcm-simulator" -version = "0.9.28" -source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.28#314298c32ac6df996ea8f3fe23fa5d3768340066" +version = "0.9.32" +source = "git+https://github.com/paritytech/polkadot.git?branch=release-v0.9.32#c71e872afed296d1825b15ea4b2a74750c1ba647" dependencies = [ "frame-support", "parity-scale-codec", @@ -14006,7 +14434,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d9ba232399af1783a58d8eb26f6b5006fbefe2dc9ef36bd283324792d03ea5" dependencies = [ - "futures 0.3.24", + "futures 0.3.25", "log", "nohash-hasher", "parking_lot 0.12.1", @@ -14029,9 +14457,9 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" dependencies = [ - "proc-macro2 1.0.43", + "proc-macro2 1.0.47", "quote 1.0.21", - "syn 1.0.99", + "syn 1.0.103", "synstructure", ] diff --git a/Cargo.toml b/Cargo.toml index 235c8cf51..52ccae0c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,33 +15,33 @@ members = ['node/*', 'pallets/*', 'runtime/*', 'support', 'precompiles/*','integ [patch.crates-io] #orml -orml-oracle = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = '20969f385bf77e41386e8d8aa9626b003a306204' } -orml-oracle-rpc = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = '20969f385bf77e41386e8d8aa9626b003a306204' } -orml-oracle-rpc-runtime-api = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = '20969f385bf77e41386e8d8aa9626b003a306204' } -orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = '20969f385bf77e41386e8d8aa9626b003a306204' } -orml-vesting = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = '20969f385bf77e41386e8d8aa9626b003a306204' } -orml-xcm = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = '20969f385bf77e41386e8d8aa9626b003a306204' } -orml-xcm-support = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = '20969f385bf77e41386e8d8aa9626b003a306204' } -orml-xtokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = '20969f385bf77e41386e8d8aa9626b003a306204' } +orml-oracle = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = 'f336875e48599b5e9500b301385259354821f01f' } +orml-oracle-rpc = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = 'f336875e48599b5e9500b301385259354821f01f' } +orml-oracle-rpc-runtime-api = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = 'f336875e48599b5e9500b301385259354821f01f' } +orml-traits = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = 'f336875e48599b5e9500b301385259354821f01f' } +orml-vesting = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = 'f336875e48599b5e9500b301385259354821f01f' } +orml-xcm = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = 'f336875e48599b5e9500b301385259354821f01f' } +orml-xcm-support = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = 'f336875e48599b5e9500b301385259354821f01f' } +orml-xtokens = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', rev = 'f336875e48599b5e9500b301385259354821f01f' } #evm -fc-consensus = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -fc-db = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -fc-mapping-sync = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -fc-rpc = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -fc-rpc-core = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -fp-consensus = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -fp-evm = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -fp-rpc = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -fp-storage = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -fp-dynamic-fee = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -pallet-ethereum = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -pallet-evm = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -fp-self-contained = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -pallet-base-fee = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -pallet-evm-precompile-blake2 = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -pallet-evm-precompile-bn128 = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -pallet-evm-precompile-dispatch = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -pallet-evm-precompile-ed25519 = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -pallet-evm-precompile-modexp = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -pallet-evm-precompile-sha3fips = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } -pallet-evm-precompile-simple = { git = 'https://github.com/parallel-finance/frontier.git', rev = '2e09cac89ef57f688a73dccff72d88c1003c786a' } +fc-consensus = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +fc-db = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +fc-mapping-sync = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +fc-rpc = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +fc-rpc-core = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +fp-consensus = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +fp-evm = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +fp-rpc = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +fp-storage = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +fp-dynamic-fee = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +pallet-ethereum = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +pallet-evm = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +fp-self-contained = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +pallet-base-fee = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +pallet-evm-precompile-blake2 = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +pallet-evm-precompile-bn128 = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +pallet-evm-precompile-dispatch = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +pallet-evm-precompile-ed25519 = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +pallet-evm-precompile-modexp = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +pallet-evm-precompile-sha3fips = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } +pallet-evm-precompile-simple = { git = 'https://github.com/parallel-finance/frontier.git', rev = 'aee1041c59274939484348b886762d522a7b4e28' } diff --git a/Makefile b/Makefile index dea76e15c..99b6cd84e 100644 --- a/Makefile +++ b/Makefile @@ -311,7 +311,7 @@ try-snapshot-upgrade: .PHONY: try-live-upgrade try-live-upgrade: - cargo run --bin parallel --release --features try-runtime --features runtime-benchmarks -- try-runtime --chain $(CHAIN) --wasm-execution=compiled on-runtime-upgrade live --uri=$(URL) + cargo run --bin parallel --release --features try-runtime --features runtime-benchmarks -- try-runtime --chain $(CHAIN) --wasm-execution=compiled --no-spec-check-panic on-runtime-upgrade live --uri=$(URL) .PHONY: try-heiko-live-upgrade try-heiko-live-upgrade: diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index f8b4a17ff..9eafb272f 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -18,32 +18,32 @@ static_assertions = '1.1.0' scale-info = { version = "2.1", default-features = false, features = ["derive"] } # Substrate -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-staking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-staking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } # Cumulus dependencies -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } # ORML dependencies orml-oracle = { version = '0.4.1-dev' } @@ -74,16 +74,16 @@ parallel-runtime = { path = '../runtime/parallel' } primitives = { package = 'parallel-primitives', path = '../primitives' } [dev-dependencies] -cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-test-relay-sproof-builder = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } +cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-test-relay-sproof-builder = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } env_logger = '0.9.0' -kusama-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } +kusama-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } log = '0.4.14' -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -statemine-runtime = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -statemint-runtime = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -xcm-emulator = { git = 'https://github.com/shaunxw/xcm-simulator.git', rev = '6c02911a3eeb04c342e4eb273d2ffbedd45dabff' } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +statemine-runtime = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +statemint-runtime = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +xcm-emulator = { git = 'https://github.com/MrPai/xcm-simulator.git', rev = '5f0839a34b2b32e312901afffd16de07a7714757' } diff --git a/integration-tests/src/kusama_call.rs b/integration-tests/src/kusama_call.rs index 7d0c2fea2..3d95fddb9 100644 --- a/integration-tests/src/kusama_call.rs +++ b/integration-tests/src/kusama_call.rs @@ -29,9 +29,9 @@ fn liquidate_staking_call_should_work() { hex_literal::hex!["5d199b535508990c59f411757617904ce65c905fced6878bacfbf26d3b4a1e97"] .into(); Heiko::execute_with(|| { - use heiko_runtime::{LiquidStaking, Origin}; + use heiko_runtime::{LiquidStaking, RuntimeOrigin}; assert_ok!(LiquidStaking::stake( - Origin::signed(AccountId::from(ALICE)), + RuntimeOrigin::signed(AccountId::from(ALICE)), amount )); assert_ok!(with_transaction( @@ -56,7 +56,7 @@ fn liquidate_staking_call_should_work() { total: amount, active: amount, unlocking: Default::default(), - claimed_rewards: vec![] + claimed_rewards: Default::default() }) ); }) diff --git a/integration-tests/src/kusama_test_net.rs b/integration-tests/src/kusama_test_net.rs index ff57efdd5..ff5ac79c6 100644 --- a/integration-tests/src/kusama_test_net.rs +++ b/integration-tests/src/kusama_test_net.rs @@ -35,7 +35,7 @@ decl_test_relay_chain! { decl_test_parachain! { pub struct Heiko { Runtime = heiko_runtime::Runtime, - Origin = heiko_runtime::Origin, + RuntimeOrigin = heiko_runtime::RuntimeOrigin, XcmpMessageHandler = heiko_runtime ::XcmpQueue, DmpMessageHandler = heiko_runtime::DmpQueue, new_ext = para_ext(2085), @@ -45,7 +45,7 @@ decl_test_parachain! { decl_test_parachain! { pub struct Statemine { Runtime = statemine_runtime::Runtime, - Origin = statemine_runtime::Origin, + RuntimeOrigin = statemine_runtime::RuntimeOrigin, XcmpMessageHandler = statemine_runtime::XcmpQueue, DmpMessageHandler = statemine_runtime::DmpQueue, new_ext = stamine_ext(), @@ -55,7 +55,7 @@ decl_test_parachain! { decl_test_parachain! { pub struct MockSibling { Runtime = heiko_runtime::Runtime, - Origin = heiko_runtime::Origin, + RuntimeOrigin = heiko_runtime::RuntimeOrigin, XcmpMessageHandler = heiko_runtime::XcmpQueue, DmpMessageHandler = heiko_runtime::DmpQueue, new_ext = sibling_ext(2000), @@ -87,7 +87,7 @@ fn default_parachains_host_configuration() -> HostConfiguration { max_upward_queue_count: 8, max_upward_queue_size: 1024 * 1024, max_downward_message_size: 1024 * 1024, - ump_service_total_weight: 100_000_000_000, + ump_service_total_weight: Weight::from_ref_time(100_000_000_000), max_upward_message_size: 50 * 1024, max_upward_message_num_per_candidate: 5, hrmp_sender_deposit: 0, diff --git a/integration-tests/src/kusama_transfer.rs b/integration-tests/src/kusama_transfer.rs index 0ba408a72..41600618d 100644 --- a/integration-tests/src/kusama_transfer.rs +++ b/integration-tests/src/kusama_transfer.rs @@ -28,7 +28,7 @@ use crate::{kusama_test_net::*, setup::*}; fn transfer_from_relay_chain() { KusamaNet::execute_with(|| { assert_ok!(kusama_runtime::XcmPallet::reserve_transfer_assets( - kusama_runtime::Origin::signed(ALICE.into()), + kusama_runtime::RuntimeOrigin::signed(ALICE.into()), Box::new(VersionedMultiLocation::V1(X1(Parachain(2085)).into())), Box::new(VersionedMultiLocation::V1( X1(Junction::AccountId32 { @@ -50,10 +50,10 @@ fn transfer_from_relay_chain() { #[test] fn transfer_to_relay_chain() { - use heiko_runtime::{Origin, XTokens}; + use heiko_runtime::{RuntimeOrigin, XTokens}; Heiko::execute_with(|| { assert_ok!(XTokens::transfer( - Origin::signed(ALICE.into()), + RuntimeOrigin::signed(ALICE.into()), KSM, ksm(1f64), Box::new(xcm::VersionedMultiLocation::V1(MultiLocation::new( @@ -63,7 +63,7 @@ fn transfer_to_relay_chain() { network: NetworkId::Any }) ))), - 4_000_000_000 + WeightLimit::Limited(4_000_000_000) )); }); @@ -72,7 +72,7 @@ fn transfer_to_relay_chain() { println!("heiko para account in relaychain:{:?}", para_acc); assert_eq!( kusama_runtime::Balances::free_balance(&AccountId::from(BOB)), - 999_988_476_752 //xcm fee in kusama is 11_523_248 ~=0.015$ + 999_989_594_258 ); }); } diff --git a/integration-tests/src/polkadot_test_net.rs b/integration-tests/src/polkadot_test_net.rs index e5b59dce1..69b9affe2 100644 --- a/integration-tests/src/polkadot_test_net.rs +++ b/integration-tests/src/polkadot_test_net.rs @@ -34,7 +34,7 @@ decl_test_relay_chain! { decl_test_parachain! { pub struct Parallel { Runtime = parallel_runtime::Runtime, - Origin = parallel_runtime::Origin, + RuntimeOrigin = parallel_runtime::RuntimeOrigin, XcmpMessageHandler = parallel_runtime ::XcmpQueue, DmpMessageHandler = parallel_runtime::DmpQueue, new_ext = para_ext(2012), @@ -44,7 +44,7 @@ decl_test_parachain! { decl_test_parachain! { pub struct Statemint { Runtime = statemint_runtime::Runtime, - Origin = statemint_runtime::Origin, + RuntimeOrigin = statemint_runtime::RuntimeOrigin, XcmpMessageHandler = statemint_runtime::XcmpQueue, DmpMessageHandler = statemint_runtime::DmpQueue, new_ext = para_ext(1000), @@ -54,7 +54,7 @@ decl_test_parachain! { decl_test_parachain! { pub struct MockSibling { Runtime = parallel_runtime::Runtime, - Origin = parallel_runtime::Origin, + RuntimeOrigin = parallel_runtime::RuntimeOrigin, XcmpMessageHandler = parallel_runtime::XcmpQueue, DmpMessageHandler = parallel_runtime::DmpQueue, new_ext = sibling_ext(2002), @@ -86,7 +86,7 @@ fn default_parachains_host_configuration() -> HostConfiguration { max_upward_queue_count: 8, max_upward_queue_size: 1024 * 1024, max_downward_message_size: 1024 * 1024, - ump_service_total_weight: 100_000_000_000, + ump_service_total_weight: Weight::from_ref_time(100_000_000_000), max_upward_message_size: 50 * 1024, max_upward_message_num_per_candidate: 5, hrmp_sender_deposit: 0, diff --git a/integration-tests/src/polkadot_transfer.rs b/integration-tests/src/polkadot_transfer.rs index c6bc0296b..befd03779 100644 --- a/integration-tests/src/polkadot_transfer.rs +++ b/integration-tests/src/polkadot_transfer.rs @@ -28,7 +28,7 @@ use crate::{polkadot_test_net::*, setup::*}; fn transfer_from_relay_chain() { PolkadotNet::execute_with(|| { assert_ok!(polkadot_runtime::XcmPallet::reserve_transfer_assets( - polkadot_runtime::Origin::signed(ALICE.into()), + polkadot_runtime::RuntimeOrigin::signed(ALICE.into()), Box::new(VersionedMultiLocation::V1(X1(Parachain(2012)).into())), Box::new(VersionedMultiLocation::V1( X1(Junction::AccountId32 { @@ -50,10 +50,10 @@ fn transfer_from_relay_chain() { #[test] fn transfer_to_relay_chain() { - use parallel_runtime::{Origin, XTokens}; + use parallel_runtime::{RuntimeOrigin, XTokens}; Parallel::execute_with(|| { assert_ok!(XTokens::transfer( - Origin::signed(ALICE.into()), + RuntimeOrigin::signed(ALICE.into()), DOT, dot(10f64), Box::new(xcm::VersionedMultiLocation::V1(MultiLocation::new( @@ -63,7 +63,7 @@ fn transfer_to_relay_chain() { network: NetworkId::Any }) ))), - 4_000_000_000 + WeightLimit::Limited(4_000_000_000) )); }); @@ -72,7 +72,7 @@ fn transfer_to_relay_chain() { println!("parallel para account in relaychain:{:?}", para_acc); assert_eq!( polkadot_runtime::Balances::free_balance(&AccountId::from(BOB)), - 995_305_825_48 + 99_573_469_824 ); }); } @@ -83,11 +83,11 @@ fn transfer_sibling_chain_asset() { TestNet::reset(); //since not easy to introduce runtime from other chain,just use heiko's - use parallel_runtime::{Assets, Balances, Origin, PolkadotXcm, XTokens}; + use parallel_runtime::{Assets, Balances, PolkadotXcm, RuntimeOrigin, XTokens}; MockSibling::execute_with(|| { assert_ok!(PolkadotXcm::reserve_transfer_assets( - Origin::signed(ALICE.into()).clone(), + RuntimeOrigin::signed(ALICE.into()).clone(), Box::new(MultiLocation::new(1, X1(Parachain(2012))).into()), Box::new( Junction::AccountId32 { @@ -121,7 +121,7 @@ fn transfer_sibling_chain_asset() { Parallel::execute_with(|| { assert_ok!(XTokens::transfer( - Origin::signed(ALICE.into()), + RuntimeOrigin::signed(ALICE.into()), PARA, 10_000_000_000_000, Box::new( @@ -137,7 +137,7 @@ fn transfer_sibling_chain_asset() { ) .into() ), - 4_000_000_000, + WeightLimit::Limited(4_000_000_000), )); assert_eq!( diff --git a/integration-tests/src/setup.rs b/integration-tests/src/setup.rs index 184559e7a..3dc2d5964 100644 --- a/integration-tests/src/setup.rs +++ b/integration-tests/src/setup.rs @@ -16,6 +16,7 @@ use frame_support::traits::ConstU32; use frame_support::traits::GenesisBuild; use frame_support::WeakBoundedVec; +pub use frame_support::pallet_prelude::Weight; use frame_support::traits::Currency; use pallet_loans::{InterestRateModel, JumpModel, Market, MarketState}; use pallet_traits::{ @@ -120,14 +121,14 @@ impl ExtBuilder { pub fn heiko_build(self) -> sp_io::TestExternalities { use heiko_runtime::{ - AssetRegistry, Assets, LiquidStaking, Loans, Origin, System, XcmHelper, + AssetRegistry, Assets, LiquidStaking, Loans, RuntimeOrigin, System, XcmHelper, }; use paras::statemine::{ID as StatemineChainId, PALLET_INSTANCE as StatemineAssetInstance}; let mut ext = sp_io::TestExternalities::new(self.init()); ext.execute_with(|| { System::set_block_number(1); Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), KSM, MultiAddress::Id(AccountId::from(ALICE)), true, @@ -135,7 +136,7 @@ impl ExtBuilder { ) .unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), KSM, b"Kusama".to_vec(), b"KSM".to_vec(), @@ -144,7 +145,7 @@ impl ExtBuilder { ) .unwrap(); Assets::mint( - Origin::signed(AccountId::from(ALICE)), + RuntimeOrigin::signed(AccountId::from(ALICE)), KSM, MultiAddress::Id(AccountId::from(ALICE)), ksm(100f64), @@ -153,7 +154,7 @@ impl ExtBuilder { //initialize for statemine rmrk Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), RMRK, MultiAddress::Id(AccountId::from(ALICE)), true, @@ -161,7 +162,7 @@ impl ExtBuilder { ) .unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), RMRK, b"RMRK".to_vec(), b"RMRK".to_vec(), @@ -181,9 +182,10 @@ impl ExtBuilder { ), ); let hko_asset_type = AssetType::Xcm(hko_asset_location); - AssetRegistry::register_asset(Origin::root(), HKO, hko_asset_type.clone()).unwrap(); + AssetRegistry::register_asset(RuntimeOrigin::root(), HKO, hko_asset_type.clone()) + .unwrap(); AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), hko_asset_type, HKO_WEIGHT_PER_SEC, ) @@ -191,9 +193,10 @@ impl ExtBuilder { let ksm_asset_location = MultiLocation::parent(); let ksm_asset_type = AssetType::Xcm(ksm_asset_location); - AssetRegistry::register_asset(Origin::root(), KSM, ksm_asset_type.clone()).unwrap(); + AssetRegistry::register_asset(RuntimeOrigin::root(), KSM, ksm_asset_type.clone()) + .unwrap(); AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), ksm_asset_type, KSM_WEIGHT_PER_SEC, ) @@ -208,20 +211,24 @@ impl ExtBuilder { ), ); let statemine_rmrk_asset_type = AssetType::Xcm(statemine_rmrk_asset_location); - AssetRegistry::register_asset(Origin::root(), RMRK, statemine_rmrk_asset_type.clone()) - .unwrap(); + AssetRegistry::register_asset( + RuntimeOrigin::root(), + RMRK, + statemine_rmrk_asset_type.clone(), + ) + .unwrap(); AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), statemine_rmrk_asset_type, RMRK_WEIGHT_PER_SEC, ) .unwrap(); XcmHelper::update_xcm_weight_fee( - Origin::root(), + RuntimeOrigin::root(), XcmCall::TransferToSiblingchain(Box::new((1, Parachain(1000)).into())), XcmWeightFeeMisc { - weight: WEIGHT_IN_STATEMINE, + weight: Weight::from_ref_time(WEIGHT_IN_STATEMINE), fee: FEE_IN_STATEMINE, }, ) @@ -229,7 +236,7 @@ impl ExtBuilder { //initialize for statemine usdt Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), USDT, MultiAddress::Id(AccountId::from(ALICE)), true, @@ -237,7 +244,7 @@ impl ExtBuilder { ) .unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), USDT, b"USDT".to_vec(), b"USDT".to_vec(), @@ -254,10 +261,14 @@ impl ExtBuilder { ), ); let statemine_usdt_asset_type = AssetType::Xcm(statemine_usdt_asset_location); - AssetRegistry::register_asset(Origin::root(), USDT, statemine_usdt_asset_type.clone()) - .unwrap(); + AssetRegistry::register_asset( + RuntimeOrigin::root(), + USDT, + statemine_usdt_asset_type.clone(), + ) + .unwrap(); AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), statemine_usdt_asset_type, USDT_WEIGHT_PER_SEC, ) @@ -265,7 +276,7 @@ impl ExtBuilder { //initialize for acala kar as mock sibling Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), KAR, MultiAddress::Id(AccountId::from(ALICE)), true, @@ -273,7 +284,7 @@ impl ExtBuilder { ) .unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), KAR, b"KAR".to_vec(), b"KAR".to_vec(), @@ -293,9 +304,10 @@ impl ExtBuilder { ), ); let kar_asset_type = AssetType::Xcm(kar_asset_location); - AssetRegistry::register_asset(Origin::root(), KAR, kar_asset_type.clone()).unwrap(); + AssetRegistry::register_asset(RuntimeOrigin::root(), KAR, kar_asset_type.clone()) + .unwrap(); AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), kar_asset_type, KAR_WEIGHT_PER_SEC, ) @@ -303,7 +315,7 @@ impl ExtBuilder { //initialize for liquidate staking Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), SKSM, MultiAddress::Id(AccountId::from(ALICE)), true, @@ -311,7 +323,7 @@ impl ExtBuilder { ) .unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), SKSM, b"Parallel Kusama".to_vec(), b"sKSM".to_vec(), @@ -321,30 +333,30 @@ impl ExtBuilder { .unwrap(); Assets::mint( - Origin::signed(AccountId::from(ALICE)), + RuntimeOrigin::signed(AccountId::from(ALICE)), SKSM, MultiAddress::Id(AccountId::from(ALICE)), ksm(100f64), ) .unwrap(); - LiquidStaking::update_staking_ledger_cap(Origin::root(), ksm(10000f64)).unwrap(); + LiquidStaking::update_staking_ledger_cap(RuntimeOrigin::root(), ksm(10000f64)).unwrap(); Assets::mint( - Origin::signed(AccountId::from(ALICE)), + RuntimeOrigin::signed(AccountId::from(ALICE)), KSM, MultiAddress::Id(XcmHelper::account_id()), ksm(100f64), ) .unwrap(); - Loans::add_market(Origin::root(), KSM, market_mock(PKSM)).unwrap(); - Loans::activate_market(Origin::root(), KSM).unwrap(); + Loans::add_market(RuntimeOrigin::root(), KSM, market_mock(PKSM)).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), KSM).unwrap(); }); ext } pub fn parallel_build(self) -> sp_io::TestExternalities { - use parallel_runtime::{AssetRegistry, Assets, Origin, Runtime, System}; + use parallel_runtime::{AssetRegistry, Assets, Runtime, RuntimeOrigin, System}; let mut t = frame_system::GenesisConfig::default() .build_storage::() .unwrap(); @@ -378,7 +390,7 @@ impl ExtBuilder { ext.execute_with(|| { System::set_block_number(1); Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), DOT, MultiAddress::Id(AccountId::from(ALICE)), true, @@ -386,7 +398,7 @@ impl ExtBuilder { ) .unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), DOT, b"Polkadot".to_vec(), b"DOT".to_vec(), @@ -395,7 +407,7 @@ impl ExtBuilder { ) .unwrap(); Assets::mint( - Origin::signed(AccountId::from(ALICE)), + RuntimeOrigin::signed(AccountId::from(ALICE)), DOT, MultiAddress::Id(AccountId::from(ALICE)), dot(100f64), @@ -404,7 +416,7 @@ impl ExtBuilder { //initialize for clv as mock sibling Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), CLV, MultiAddress::Id(AccountId::from(ALICE)), true, @@ -412,7 +424,7 @@ impl ExtBuilder { ) .unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), CLV, b"CLV".to_vec(), b"CLV".to_vec(), @@ -431,18 +443,20 @@ impl ExtBuilder { ), ); let para_asset_type = AssetType::Xcm(para_asset_location); - AssetRegistry::register_asset(Origin::root(), PARA, para_asset_type.clone()).unwrap(); + AssetRegistry::register_asset(RuntimeOrigin::root(), PARA, para_asset_type.clone()) + .unwrap(); AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), para_asset_type, PARA_WEIGHT_PER_SEC, ) .unwrap(); let dot_asset_location = MultiLocation::parent(); let dot_asset_type = AssetType::Xcm(dot_asset_location); - AssetRegistry::register_asset(Origin::root(), DOT, dot_asset_type.clone()).unwrap(); + AssetRegistry::register_asset(RuntimeOrigin::root(), DOT, dot_asset_type.clone()) + .unwrap(); AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), dot_asset_type, DOT_WEIGHT_PER_SEC, ) @@ -459,9 +473,10 @@ impl ExtBuilder { ), ); let clv_asset_type = AssetType::Xcm(clv_asset_location); - AssetRegistry::register_asset(Origin::root(), CLV, clv_asset_type.clone()).unwrap(); + AssetRegistry::register_asset(RuntimeOrigin::root(), CLV, clv_asset_type.clone()) + .unwrap(); AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), clv_asset_type, CLV_WEIGHT_PER_SEC, ) @@ -471,7 +486,7 @@ impl ExtBuilder { } pub fn statemine_build(self) -> sp_io::TestExternalities { - use statemine_runtime::{Assets, Balances, Origin, Runtime, System}; + use statemine_runtime::{Assets, Balances, Runtime, RuntimeOrigin, System}; let mut t = frame_system::GenesisConfig::default() .build_storage::() @@ -506,7 +521,7 @@ impl ExtBuilder { // prepare for rmrk Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), RMRK_ASSET_ID, MultiAddress::Id(AccountId::from(ALICE)), true, @@ -514,7 +529,7 @@ impl ExtBuilder { ) .unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), RMRK_ASSET_ID.into(), b"RMRK".to_vec(), b"RMRK".to_vec(), @@ -523,7 +538,7 @@ impl ExtBuilder { ) .unwrap(); Assets::mint( - Origin::signed(AccountId::from(ALICE)), + RuntimeOrigin::signed(AccountId::from(ALICE)), RMRK_ASSET_ID, MultiAddress::Id(AccountId::from(ALICE)), rmrk(10), @@ -532,7 +547,7 @@ impl ExtBuilder { // prepare for usdt Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), USDT_ASSET_ID, MultiAddress::Id(AccountId::from(ALICE)), true, @@ -540,7 +555,7 @@ impl ExtBuilder { ) .unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), USDT_ASSET_ID, b"USDT".to_vec(), b"USDT".to_vec(), @@ -549,7 +564,7 @@ impl ExtBuilder { ) .unwrap(); Assets::mint( - Origin::signed(AccountId::from(ALICE)), + RuntimeOrigin::signed(AccountId::from(ALICE)), USDT_ASSET_ID, MultiAddress::Id(AccountId::from(ALICE)), usdt(10), @@ -560,7 +575,7 @@ impl ExtBuilder { } pub fn karura_build(self) -> sp_io::TestExternalities { - use heiko_runtime::{AssetRegistry, Origin, System}; + use heiko_runtime::{AssetRegistry, RuntimeOrigin, System}; let mut ext = sp_io::TestExternalities::new(self.init()); ext.execute_with(|| { System::set_block_number(1); @@ -572,9 +587,10 @@ impl ExtBuilder { ))), ); let hko_asset_type = AssetType::Xcm(hko_asset_location); - AssetRegistry::register_asset(Origin::root(), HKO, hko_asset_type.clone()).unwrap(); + AssetRegistry::register_asset(RuntimeOrigin::root(), HKO, hko_asset_type.clone()) + .unwrap(); AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), hko_asset_type, HKO_WEIGHT_PER_SEC, ) @@ -584,7 +600,7 @@ impl ExtBuilder { } pub fn clv_build(self) -> sp_io::TestExternalities { - use heiko_runtime::{AssetRegistry, Origin, System}; + use heiko_runtime::{AssetRegistry, RuntimeOrigin, System}; let mut ext = sp_io::TestExternalities::new(self.init()); ext.execute_with(|| { System::set_block_number(1); @@ -596,9 +612,10 @@ impl ExtBuilder { ))), ); let para_asset_type = AssetType::Xcm(para_asset_location); - AssetRegistry::register_asset(Origin::root(), PARA, para_asset_type.clone()).unwrap(); + AssetRegistry::register_asset(RuntimeOrigin::root(), PARA, para_asset_type.clone()) + .unwrap(); AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), para_asset_type, PARA_WEIGHT_PER_SEC, ) diff --git a/integration-tests/src/sibling_transfer.rs b/integration-tests/src/sibling_transfer.rs index d85a34b7c..7b7aaae6c 100644 --- a/integration-tests/src/sibling_transfer.rs +++ b/integration-tests/src/sibling_transfer.rs @@ -52,7 +52,7 @@ fn transfer_sibling_chain_asset() { TestNet::reset(); //since not easy to introduce runtime from other chain,just use heiko's - use heiko_runtime::{Assets, Balances, Origin, PolkadotXcm, XTokens}; + use heiko_runtime::{Assets, Balances, PolkadotXcm, RuntimeOrigin, XTokens}; MockSibling::execute_with(|| { let mut general_key = @@ -71,7 +71,7 @@ fn transfer_sibling_chain_asset() { assert_eq!(general_key_hex, "0x040d000000"); assert_ok!(PolkadotXcm::reserve_transfer_assets( - Origin::signed(ALICE.into()).clone(), + RuntimeOrigin::signed(ALICE.into()).clone(), Box::new(MultiLocation::new(1, X1(Parachain(2085))).into()), Box::new( Junction::AccountId32 { @@ -105,7 +105,7 @@ fn transfer_sibling_chain_asset() { Heiko::execute_with(|| { assert_ok!(XTokens::transfer( - Origin::signed(ALICE.into()), + RuntimeOrigin::signed(ALICE.into()), 0, 10_000_000_000_000, Box::new( @@ -121,7 +121,7 @@ fn transfer_sibling_chain_asset() { ) .into() ), - 4_000_000_000, + WeightLimit::Limited(4_000_000_000), )); assert_eq!( diff --git a/integration-tests/src/statemine.rs b/integration-tests/src/statemine.rs index 4f2ae519d..0725625a6 100644 --- a/integration-tests/src/statemine.rs +++ b/integration-tests/src/statemine.rs @@ -28,10 +28,10 @@ pub const STATEMINE_TOTAL_FEE_AMOUNT: u128 = 1_000_000_000; //still can be decre fn transfer_statemine_rmrk() { //reserve transfer rmrk from statemine to heiko Statemine::execute_with(|| { - use statemine_runtime::{Origin, PolkadotXcm}; + use statemine_runtime::{PolkadotXcm, RuntimeOrigin}; - assert_ok!(PolkadotXcm::reserve_transfer_assets( - Origin::signed(ALICE.into()).clone(), + assert_ok!(PolkadotXcm::limited_reserve_transfer_assets( + RuntimeOrigin::signed(ALICE.into()).clone(), Box::new(MultiLocation::new(1, X1(Parachain(2085))).into()), Box::new( Junction::AccountId32 { @@ -42,7 +42,8 @@ fn transfer_statemine_rmrk() { .into() ), Box::new((X2(PalletInstance(50), GeneralIndex(8)), rmrk(2)).into()), - 0 + 0, + WeightLimit::Unlimited )); }); @@ -51,17 +52,17 @@ fn transfer_statemine_rmrk() { //check rmrk transferred and then transfer it back to statemine with ksm as fee Heiko::execute_with(|| { - use heiko_runtime::{Assets, Origin, XTokens}; + use heiko_runtime::{Assets, RuntimeOrigin, XTokens}; //with RMRK_WEIGHT_PER_SEC set in heiko rmrk fee is 12_000_000 which is 0.0012rmrk~=0.004$ assert_eq!(Assets::balance(RMRK, &AccountId::from(BOB)), 19988000000); assert_ok!(Assets::mint( - Origin::signed(AccountId::from(ALICE)), + RuntimeOrigin::signed(AccountId::from(ALICE)), KSM, MultiAddress::Id(AccountId::from(BOB)), ksm(1f64), )); //mint some ksm to BOB to pay for the xcm fee assert_ok!(XTokens::transfer_multicurrencies( - Origin::signed(BOB.into()), + RuntimeOrigin::signed(BOB.into()), vec![(KSM, STATEMINE_TOTAL_FEE_AMOUNT), (RMRK, rmrk(1)),], 0, Box::new( @@ -77,7 +78,7 @@ fn transfer_statemine_rmrk() { ) .into() ), - WEIGHT_IN_STATEMINE as u64 + WeightLimit::Limited(WEIGHT_IN_STATEMINE as u64) )); }); // check reserved ksm move from heiko sovereign to statemine sovereign @@ -110,10 +111,10 @@ fn transfer_statemine_rmrk() { fn transfer_statemine_usdt() { //reserve transfer usdt from statemine to heiko Statemine::execute_with(|| { - use statemine_runtime::{Origin, PolkadotXcm}; + use statemine_runtime::{PolkadotXcm, RuntimeOrigin}; - assert_ok!(PolkadotXcm::reserve_transfer_assets( - Origin::signed(ALICE.into()).clone(), + assert_ok!(PolkadotXcm::limited_reserve_transfer_assets( + RuntimeOrigin::signed(ALICE.into()).clone(), Box::new(MultiLocation::new(1, X1(Parachain(2085))).into()), Box::new( Junction::AccountId32 { @@ -130,7 +131,8 @@ fn transfer_statemine_usdt() { ) .into() ), - 0 + 0, + WeightLimit::Unlimited )); }); @@ -138,17 +140,17 @@ fn transfer_statemine_usdt() { //check usdt transferred and then transfer it back to statemine with ksm as fee Heiko::execute_with(|| { - use heiko_runtime::{Assets, Origin, XTokens}; + use heiko_runtime::{Assets, RuntimeOrigin, XTokens}; //with USDT_WEIGHT_PER_SEC set in heiko usdt fee is 0.018$ assert_eq!(Assets::balance(USDT, &AccountId::from(BOB)), 1982000); assert_ok!(Assets::mint( - Origin::signed(AccountId::from(ALICE)), + RuntimeOrigin::signed(AccountId::from(ALICE)), KSM, MultiAddress::Id(AccountId::from(BOB)), ksm(1f64), )); //mint some ksm to BOB to pay for the xcm fee assert_ok!(XTokens::transfer_multicurrencies( - Origin::signed(BOB.into()), + RuntimeOrigin::signed(BOB.into()), vec![(KSM, STATEMINE_TOTAL_FEE_AMOUNT), (USDT, usdt(1)),], 0, Box::new( @@ -164,7 +166,7 @@ fn transfer_statemine_usdt() { ) .into() ), - WEIGHT_IN_STATEMINE as u64 + WeightLimit::Limited(WEIGHT_IN_STATEMINE as u64) )); }); diff --git a/node/parallel/Cargo.toml b/node/parallel/Cargo.toml index 5f6bfc996..5fdbb2eeb 100644 --- a/node/parallel/Cargo.toml +++ b/node/parallel/Cargo.toml @@ -15,8 +15,8 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5' } derive_more = '0.15.0' -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } hex-literal = '0.3.4' jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } log = '0.4.13' @@ -27,8 +27,8 @@ primitives = { package = 'parallel-primitives', path = '../../primitives' } pallet-loans-rpc = { path = '../../pallets/loans/rpc' } pallet-router-rpc = { path = '../../pallets/router/rpc' } -pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } # runtimes heiko-runtime = { path = '../../runtime/heiko' } @@ -36,71 +36,72 @@ parallel-runtime = { path = '../../runtime/parallel' } kerria-runtime = { path = '../../runtime/kerria', optional = true} vanilla-runtime = { path = '../../runtime/vanilla', optional = true } -sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', features = ['wasmtime'] } -sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', features = ['wasmtime'] } -sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', features = ['wasmtime'] } -sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-network-common = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sc-consensus-manual-seal = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } - -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -try-runtime-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', optional = true } - -clap = { version = '3.1', features = ['derive'] } +sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', features = ['wasmtime'] } +sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', features = ['wasmtime'] } +sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', features = ['wasmtime'] } +sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-network-common = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sc-consensus-manual-seal = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } + +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +try-runtime-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', optional = true } + +clap = { version = '4.0.9', features = ['derive'] } serde = { version = '1.0.136', features = ['derive'] } serde_json = '1.0.79' -tracing-core = '=0.1.29' +tracing-core = '0.1.30' orml-oracle-rpc = { version = '0.4.1-dev', default-features = false } -substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -substrate-prometheus-endpoint = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" } - -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } - -cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-relay-chain-inprocess-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-relay-chain-rpc-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } - -polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', features = ['kusama-native'] } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } +substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +substrate-prometheus-endpoint = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.32" } + +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } + +cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-relay-chain-inprocess-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-relay-chain-rpc-interface = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-client-consensus-relay-chain = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-relay-chain-minimal-node = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } + +polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', features = ['kusama-native'] } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } # Frontier dependencies fc-consensus = { version='2.0.0-dev' } @@ -120,7 +121,7 @@ pallet-evm = { version='6.0.0-dev'} [build-dependencies] -substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } [[bin]] name = 'parallel' diff --git a/node/parallel/src/cli.rs b/node/parallel/src/cli.rs index dffef769c..c049fcb01 100644 --- a/node/parallel/src/cli.rs +++ b/node/parallel/src/cli.rs @@ -18,10 +18,10 @@ use clap::Parser; use sc_cli::{KeySubcommand, SignCmd, VanityCmd, VerifyCmd}; /// Sub-commands supported by the collator. -#[derive(Debug, clap::Subcommand)] +#[derive(Debug, Parser)] pub enum Subcommand { /// Key management CLI utilities - #[clap(subcommand)] + #[command(subcommand)] Key(KeySubcommand), Sign(SignCmd), @@ -64,7 +64,7 @@ pub enum Subcommand { Revert(sc_cli::RevertCmd), /// The custom benchmark subcommmand benchmarking runtime pallets. - #[clap(subcommand)] + #[command(subcommand)] Benchmark(frame_benchmarking_cli::BenchmarkCmd), } @@ -75,7 +75,7 @@ pub enum Subcommand { subcommand_negates_reqs = true )] pub struct Cli { - #[clap(subcommand)] + #[command(subcommand)] pub subcommand: Option, #[clap(flatten)] diff --git a/node/parallel/src/client.rs b/node/parallel/src/client.rs index 930642b62..c4a0a8741 100644 --- a/node/parallel/src/client.rs +++ b/node/parallel/src/client.rs @@ -301,63 +301,63 @@ impl sc_client_api::BlockBackend for Client { impl sc_client_api::StorageProvider for Client { fn storage( &self, - id: &BlockId, + hash: &::Hash, key: &StorageKey, ) -> sp_blockchain::Result> { with_client! { self, client, { - client.storage(id, key) + client.storage(hash, key) } } } fn storage_keys( &self, - id: &BlockId, + hash: &::Hash, key_prefix: &StorageKey, ) -> sp_blockchain::Result> { with_client! { self, client, { - client.storage_keys(id, key_prefix) + client.storage_keys(hash, key_prefix) } } } fn storage_hash( &self, - id: &BlockId, + hash: &::Hash, key: &StorageKey, ) -> sp_blockchain::Result::Hash>> { with_client! { self, client, { - client.storage_hash(id, key) + client.storage_hash(hash, key) } } } fn storage_pairs( &self, - id: &BlockId, + hash: &::Hash, key_prefix: &StorageKey, ) -> sp_blockchain::Result> { with_client! { self, client, { - client.storage_pairs(id, key_prefix) + client.storage_pairs(hash, key_prefix) } } } fn storage_keys_iter<'a>( &self, - id: &BlockId, + hash: &::Hash, prefix: Option<&'a StorageKey>, start_key: Option<&StorageKey>, ) -> sp_blockchain::Result< @@ -371,14 +371,14 @@ impl sc_client_api::StorageProvider for Clie self, client, { - client.storage_keys_iter(id, prefix, start_key) + client.storage_keys_iter(hash, prefix, start_key) } } } fn child_storage( &self, - id: &BlockId, + hash: &::Hash, child_info: &ChildInfo, key: &StorageKey, ) -> sp_blockchain::Result> { @@ -386,14 +386,14 @@ impl sc_client_api::StorageProvider for Clie self, client, { - client.child_storage(id, child_info, key) + client.child_storage(hash, child_info, key) } } } fn child_storage_keys( &self, - id: &BlockId, + hash: &::Hash, child_info: &ChildInfo, key_prefix: &StorageKey, ) -> sp_blockchain::Result> { @@ -401,14 +401,14 @@ impl sc_client_api::StorageProvider for Clie self, client, { - client.child_storage_keys(id, child_info, key_prefix) + client.child_storage_keys(hash, child_info, key_prefix) } } } fn child_storage_keys_iter<'a>( &self, - id: &BlockId, + hash: &::Hash, child_info: ChildInfo, prefix: Option<&'a StorageKey>, start_key: Option<&StorageKey>, @@ -423,14 +423,14 @@ impl sc_client_api::StorageProvider for Clie self, client, { - client.child_storage_keys_iter(id, child_info, prefix, start_key) + client.child_storage_keys_iter(hash, child_info, prefix, start_key) } } } fn child_storage_hash( &self, - id: &BlockId, + hash: &::Hash, child_info: &ChildInfo, key: &StorageKey, ) -> sp_blockchain::Result::Hash>> { @@ -438,7 +438,7 @@ impl sc_client_api::StorageProvider for Clie self, client, { - client.child_storage_hash(id, child_info, key) + client.child_storage_hash(hash, child_info, key) } } } diff --git a/node/parallel/src/command.rs b/node/parallel/src/command.rs index b0c84c83a..651898262 100644 --- a/node/parallel/src/command.rs +++ b/node/parallel/src/command.rs @@ -397,6 +397,12 @@ pub fn run() -> Result<()> { crate::service::new_partial::(&config)?; cmd.run(partials.client) }), + #[cfg(not(feature = "runtime-benchmarks"))] + BenchmarkCmd::Storage(_) => Err( + "Storage benchmarking can be enabled with `--features runtime-benchmarks`." + .into(), + ), + #[cfg(feature = "runtime-benchmarks")] BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| { let partials = crate::service::new_partial::(&config)?; @@ -581,7 +587,7 @@ impl CliConfiguration for RelayChainCli { fn base_path(&self) -> Result> { Ok(self .shared_params() - .base_path() + .base_path()? .or_else(|| self.base_path.clone().map(Into::into))) } @@ -638,8 +644,8 @@ impl CliConfiguration for RelayChainCli { self.base.base.transaction_pool(is_dev) } - fn state_cache_child_ratio(&self) -> Result> { - self.base.base.state_cache_child_ratio() + fn trie_cache_maximum_size(&self) -> Result> { + self.base.base.trie_cache_maximum_size() } fn rpc_methods(&self) -> Result { diff --git a/node/parallel/src/evm_rpc.rs b/node/parallel/src/evm_rpc.rs index b8758f662..734ad495a 100644 --- a/node/parallel/src/evm_rpc.rs +++ b/node/parallel/src/evm_rpc.rs @@ -14,6 +14,7 @@ #![allow(dead_code, unused)] +use fc_db::DatabaseSource; use fc_rpc::{ Eth, EthApiServer, EthBlockDataCacheTask, EthFilter, EthFilterApiServer, EthPubSub, EthPubSubApiServer, Net, NetApiServer, OverrideHandle, RuntimeApiStorageOverride, @@ -23,9 +24,14 @@ use fc_rpc_core::types::{FeeHistoryCache, FilterPool}; use fp_storage::EthereumStorageSchema; use jsonrpsee::RpcModule; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; +use primitives::*; use sc_client_api::{AuxStore, Backend, BlockchainEvents, StateBackend, StorageProvider}; use sc_network::NetworkService; pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor}; +use sc_service::{ + error::Error as ServiceError, BasePath, ChainSpec, Configuration, PartialComponents, + TFullBackend, TFullClient, TaskManager, +}; use sc_transaction_pool::{ChainApi, Pool}; use sc_transaction_pool_api::TransactionPool; use sp_api::ProvideRuntimeApi; @@ -38,30 +44,47 @@ use std::collections::BTreeMap; use std::sync::Arc; use substrate_frame_rpc_system::{System, SystemApiServer}; -use primitives::*; - use orml_oracle_rpc::{Oracle, OracleApiServer}; use pallet_loans_rpc::{Loans, LoansApiServer}; use pallet_router_rpc::{Router, RouterApiServer}; -pub fn open_frontier_backend( - config: &sc_service::Configuration, -) -> Result>, String> { +pub fn frontier_database_dir(config: &Configuration, path: &str) -> std::path::PathBuf { let config_dir = config .base_path .as_ref() .map(|base_path| base_path.config_dir(config.chain_spec.id())) .unwrap_or_else(|| { - sc_service::BasePath::from_project("", "", "parallel") - .config_dir(config.chain_spec.id()) + BasePath::from_project("", "", "parallel").config_dir(config.chain_spec.id()) }); - let path = config_dir.join("frontier").join("db"); + config_dir.join("frontier").join(path) +} +pub fn open_frontier_backend( + client: Arc, + config: &Configuration, +) -> Result>, String> +where + C: sp_blockchain::HeaderBackend, +{ Ok(Arc::new(fc_db::Backend::::new( + client, &fc_db::DatabaseSettings { - source: fc_db::DatabaseSource::RocksDb { - path, - cache_size: 0, + source: match config.database { + DatabaseSource::RocksDb { .. } => DatabaseSource::RocksDb { + path: frontier_database_dir(config, "db"), + cache_size: 0, + }, + DatabaseSource::ParityDb { .. } => DatabaseSource::ParityDb { + path: frontier_database_dir(config, "paritydb"), + }, + DatabaseSource::Auto { .. } => DatabaseSource::Auto { + rocksdb_path: frontier_database_dir(config, "db"), + paritydb_path: frontier_database_dir(config, "paritydb"), + cache_size: 0, + }, + _ => { + return Err("Supported db sources: `rocksdb` | `paritydb` | `auto`".to_string()) + } }, }, )?)) diff --git a/node/parallel/src/evm_service.rs b/node/parallel/src/evm_service.rs index 1950cb647..19e36ce89 100644 --- a/node/parallel/src/evm_service.rs +++ b/node/parallel/src/evm_service.rs @@ -36,7 +36,7 @@ use cumulus_client_service::{ use cumulus_primitives_core::ParaId; use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain; use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult}; -use cumulus_relay_chain_rpc_interface::{create_client_and_start_worker, RelayChainRpcInterface}; +use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node; use fc_consensus::FrontierBlockImport; use fc_rpc_core::types::{FeeHistoryCache, FilterPool}; use futures::StreamExt; @@ -330,7 +330,7 @@ where client.clone(), ); - let frontier_backend = crate::evm_rpc::open_frontier_backend(config)?; + let frontier_backend = crate::evm_rpc::open_frontier_backend(client.clone(), config)?; let frontier_block_import = FrontierBlockImport::new(client.clone(), client.clone(), frontier_backend.clone()); @@ -368,11 +368,7 @@ async fn build_relay_chain_interface( )> { match collator_options.relay_chain_rpc_url { Some(relay_chain_url) => { - let client = create_client_and_start_worker(relay_chain_url, task_manager).await?; - Ok(( - Arc::new(RelayChainRpcInterface::new(client)) as Arc<_>, - None, - )) + build_minimal_relay_chain_node(polkadot_config, task_manager, relay_chain_url).await } None => build_inprocess_relay_chain( polkadot_config, @@ -485,7 +481,7 @@ where let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue); - let (network, system_rpc_tx, start_network) = + let (network, system_rpc_tx, tx_handler_controller, start_network) = sc_service::build_network(sc_service::BuildNetworkParams { config: ¶chain_config, client: client.clone(), @@ -593,6 +589,7 @@ where backend: backend.clone(), network: network.clone(), system_rpc_tx, + tx_handler_controller, telemetry: telemetry.as_mut(), })?; @@ -642,7 +639,6 @@ where relay_chain_interface, relay_chain_slot_duration, import_queue, - collator_options, }; start_full_node(params)?; @@ -701,7 +697,6 @@ where sp_consensus_aura::sr25519::AuthorityPair, _, _, - _, >( cumulus_client_consensus_aura::BuildVerifierParams { client: client2.clone(), @@ -714,11 +709,8 @@ where slot_duration, ); - Ok((time, slot)) + Ok((slot, time)) }, - can_author_with: sp_consensus::CanAuthorWithNativeVersion::new( - client2.executor().clone(), - ), telemetry: telemetry_handle, }, )) as Box<_> @@ -792,7 +784,6 @@ where telemetry, task_manager| { let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - let can_author_with = sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()); cumulus_client_consensus_aura::import_queue::< sp_consensus_aura::sr25519::AuthorityPair, @@ -801,7 +792,6 @@ where _, _, _, - _, >(cumulus_client_consensus_aura::ImportQueueParams { block_import, client, @@ -814,10 +804,9 @@ where slot_duration, ); - Ok((time, slot)) + Ok((slot, time)) }, registry: config.prometheus_registry(), - can_author_with, spawner: &task_manager.spawn_essential_handle(), telemetry, }) @@ -881,7 +870,7 @@ where "Failed to create parachain inherent", ) })?; - Ok((time, slot, parachain_inherent)) + Ok((slot, time, parachain_inherent)) } }, block_import: client.clone(), @@ -989,7 +978,7 @@ where task_manager.spawn_essential_handle(), client.clone(), ); - let frontier_backend = crate::evm_rpc::open_frontier_backend(config)?; + let frontier_backend = crate::evm_rpc::open_frontier_backend(client.clone(), config)?; let frontier_block_import = FrontierBlockImport::new(client.clone(), client.clone(), frontier_backend.clone()); @@ -1051,7 +1040,7 @@ where other: (block_import, mut telemetry, frontier_backend), } = new_dev_partial::(&config)?; - let (network, system_rpc_tx, network_starter) = + let (network, system_rpc_tx, tx_handler_controller, network_starter) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, client: client.clone(), @@ -1168,6 +1157,7 @@ where backend, system_rpc_tx, config, + tx_handler_controller, telemetry: telemetry.as_mut(), })?; @@ -1219,6 +1209,8 @@ where current_para_block, relay_offset: 1000, relay_blocks_per_para_block: 2, + para_blocks_per_relay_epoch: 10, + relay_randomness_config: (), xcm_config: Default::default(), raw_downward_messages: vec![], raw_horizontal_messages: vec![], diff --git a/node/parallel/src/service.rs b/node/parallel/src/service.rs index 72ed155a3..2b35b71ab 100644 --- a/node/parallel/src/service.rs +++ b/node/parallel/src/service.rs @@ -19,7 +19,6 @@ use cumulus_client_service::{ }; use polkadot_service::{CollatorPair, ConstructRuntimeApi}; -use sc_client_api::call_executor::ExecutorProvider; use sc_executor::NativeElseWasmExecutor; use sc_network_common::service::NetworkBlock; use sc_service::{Configuration, PartialComponents, TaskManager}; @@ -32,7 +31,7 @@ use std::{sync::Arc, time::Duration}; use cumulus_client_cli::CollatorOptions; use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain; use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult}; -use cumulus_relay_chain_rpc_interface::{create_client_and_start_worker, RelayChainRpcInterface}; +use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node; pub use sc_executor::NativeExecutionDispatch; @@ -177,7 +176,6 @@ where _, _, _, - _, >(cumulus_client_consensus_aura::ImportQueueParams { block_import: client.clone(), client: client.clone(), @@ -190,10 +188,9 @@ where slot_duration, ); - Ok((time, slot)) + Ok((slot, time)) }, registry: config.prometheus_registry(), - can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()), spawner: &task_manager.spawn_essential_handle(), telemetry: telemetry.as_ref().map(|telemetry| telemetry.handle()), })?; @@ -225,11 +222,7 @@ async fn build_relay_chain_interface( )> { match collator_options.relay_chain_rpc_url { Some(relay_chain_url) => { - let client = create_client_and_start_worker(relay_chain_url, task_manager).await?; - Ok(( - Arc::new(RelayChainRpcInterface::new(client)) as Arc<_>, - None, - )) + build_minimal_relay_chain_node(polkadot_config, task_manager, relay_chain_url).await } None => build_inprocess_relay_chain( polkadot_config, @@ -289,7 +282,7 @@ where let transaction_pool = params.transaction_pool.clone(); let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue); - let (network, system_rpc_tx, start_network) = + let (network, system_rpc_tx, tx_handler_controller, start_network) = sc_service::build_network(sc_service::BuildNetworkParams { config: ¶chain_config, client: client.clone(), @@ -327,15 +320,16 @@ where } sc_service::spawn_tasks(sc_service::SpawnTasksParams { - rpc_builder, + network: network.clone(), client: client.clone(), - transaction_pool: transaction_pool.clone(), - task_manager: &mut task_manager, - config: parachain_config, keystore: params.keystore_container.sync_keystore(), + task_manager: &mut task_manager, + transaction_pool: transaction_pool.clone(), + rpc_builder: Box::new(rpc_builder), backend: backend.clone(), - network: network.clone(), system_rpc_tx, + tx_handler_controller, + config: parachain_config, telemetry: telemetry.as_mut(), })?; @@ -374,10 +368,10 @@ where ) .await; - let time = sp_timestamp::InherentDataProvider::from_system_time(); + let timestamp = sp_timestamp::InherentDataProvider::from_system_time(); let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration( - *time, + *timestamp, slot_duration, ); @@ -387,7 +381,7 @@ where ) })?; - Ok((time, slot, parachain_inherent)) + Ok((slot, timestamp, parachain_inherent)) } }, block_import: client.clone(), @@ -429,7 +423,6 @@ where relay_chain_interface, relay_chain_slot_duration, import_queue, - collator_options, }; start_full_node(params)?; diff --git a/pallets/amm/Cargo.toml b/pallets/amm/Cargo.toml index 6e56a8347..87b199769 100644 --- a/pallets/amm/Cargo.toml +++ b/pallets/amm/Cargo.toml @@ -9,24 +9,24 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', features = ['max-encoded-len'], default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } num-traits = { default-features = false, version = '0.2' } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } serde = { version = '1.0.136', features = ['derive'], optional = true } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [dev-dependencies] -pallet-balances = { branch = 'polkadot-v0.9.28', git = 'https://github.com/paritytech/substrate.git' } +pallet-balances = { branch = 'polkadot-v0.9.32', git = 'https://github.com/paritytech/substrate.git' } pallet-currency-adapter = { path = '../currency-adapter' } -sp-core = { branch = 'polkadot-v0.9.28', git = 'https://github.com/paritytech/substrate.git' } -sp-io = { branch = 'polkadot-v0.9.28', git = 'https://github.com/paritytech/substrate.git' } +sp-core = { branch = 'polkadot-v0.9.32', git = 'https://github.com/paritytech/substrate.git' } +sp-io = { branch = 'polkadot-v0.9.32', git = 'https://github.com/paritytech/substrate.git' } [features] default = ['std'] diff --git a/pallets/amm/src/benchmarking.rs b/pallets/amm/src/benchmarking.rs index 329dcf8da..1b6164782 100644 --- a/pallets/amm/src/benchmarking.rs +++ b/pallets/amm/src/benchmarking.rs @@ -23,7 +23,7 @@ const INITIAL_AMOUNT: u128 = 1_000_000_000_000_000; const ASSET_ID: u32 = 10; const MINIMUM_LIQUIDITY: u128 = 1_000u128; -fn assert_last_event, I: 'static>(generic_event: >::Event) { +fn assert_last_event, I: 'static>(generic_event: >::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } diff --git a/pallets/amm/src/lib.rs b/pallets/amm/src/lib.rs index 6fa88e009..b7200b5ea 100644 --- a/pallets/amm/src/lib.rs +++ b/pallets/amm/src/lib.rs @@ -68,7 +68,8 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + + IsType<::RuntimeEvent>; /// Currency type for deposit/withdraw assets to/from amm /// module @@ -86,10 +87,10 @@ pub mod pallet { type AMMWeightInfo: WeightInfo; /// Specify which origin is allowed to create new pools. - type CreatePoolOrigin: EnsureOrigin; + type CreatePoolOrigin: EnsureOrigin; /// Specify which origin is allowed to update fee receiver. - type ProtocolFeeUpdateOrigin: EnsureOrigin; + type ProtocolFeeUpdateOrigin: EnsureOrigin; /// Defines the fees taken out of each trade and sent back to the AMM pool, /// typically 0.3%. diff --git a/pallets/amm/src/mock.rs b/pallets/amm/src/mock.rs index aaa6d2d84..5dac9c10a 100644 --- a/pallets/amm/src/mock.rs +++ b/pallets/amm/src/mock.rs @@ -86,8 +86,8 @@ impl system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -95,7 +95,7 @@ impl system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -116,7 +116,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -135,7 +135,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -167,7 +167,7 @@ impl SortedMembers for AliceCreatePoolOrigin { } impl pallet_amm::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = AMMPalletId; type LockAccountId = LockAccountId; @@ -210,46 +210,82 @@ pub fn new_test_ext() -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { - Assets::force_create(Origin::root(), tokens::DOT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::SDOT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::KSM, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), SAMPLE_LP_TOKEN, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), SAMPLE_LP_TOKEN_2, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::DOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::SDOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::KSM, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SAMPLE_LP_TOKEN, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SAMPLE_LP_TOKEN_2, ALICE, true, 1).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::DOT, ALICE, 100_000_000).unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::DOT, + ALICE, + 100_000_000, + ) + .unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), tokens::DOT, BOB, 100_000_000_000_000_000_000, ) .unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::DOT, CHARLIE, 1000_000_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::DOT, EVE, 1000_000_000).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + tokens::DOT, + CHARLIE, + 1000_000_000, + ) + .unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), tokens::DOT, EVE, 1000_000_000).unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), tokens::DOT, FRANK, 100_000_000_000_000_000_000, ) .unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::SDOT, ALICE, 100_000_000).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + tokens::SDOT, + ALICE, + 100_000_000, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), tokens::SDOT, BOB, 100_000_000_000_000_000_000, ) .unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::SDOT, CHARLIE, 1000_000_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::SDOT, EVE, 1000_000_000).unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::SDOT, + CHARLIE, + 1000_000_000, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::SDOT, + EVE, + 1000_000_000, + ) + .unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::KSM, ALICE, 100_000_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::KSM, BOB, 100_000_000).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + tokens::KSM, + ALICE, + 100_000_000, + ) + .unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), tokens::KSM, BOB, 100_000_000).unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), tokens::KSM, FRANK, 100_000_000_000_000_000_000, diff --git a/pallets/amm/src/tests.rs b/pallets/amm/src/tests.rs index e957fb102..87a7f55fc 100644 --- a/pallets/amm/src/tests.rs +++ b/pallets/amm/src/tests.rs @@ -1109,7 +1109,7 @@ fn update_protocol_fee_should_work() { assert!(AMM::protocol_fee().is_zero()); assert_ok!(AMM::update_protocol_fee( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Ratio::from_percent(20) )); @@ -1123,7 +1123,7 @@ fn update_protocol_fee_receiver_should_work() { assert!(AMM::protolcol_fee_receiver().is_err()); assert_ok!(AMM::update_protocol_fee_receiver( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), PROTOCOL_FEE_RECEIVER )); @@ -1148,12 +1148,12 @@ fn handling_fees_should_work() { )); assert_ok!(AMM::update_protocol_fee( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Ratio::from_percent(20) )); assert_ok!(AMM::update_protocol_fee_receiver( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), PROTOCOL_FEE_RECEIVER )); @@ -1276,18 +1276,18 @@ fn quote_should_not_overflow() { #[test] fn glmr_add_liquidity_should_work() { new_test_ext().execute_with(|| { - Assets::force_create(Origin::root(), tokens::GLMR, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::PARA, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::GLMR, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::PARA, ALICE, true, 1).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), tokens::GLMR, ALICE, 1000000000000000000000000, ) .unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), tokens::PARA, ALICE, 200000000000000000000, @@ -1304,7 +1304,7 @@ fn glmr_add_liquidity_should_work() { .unwrap(); assert_ok!(AMM::add_liquidity( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (tokens::GLMR, tokens::PARA), (15000000000000000000000, 251621563685000000), (14925000000000000000000, 250363455866575000), diff --git a/pallets/amm/src/weights.rs b/pallets/amm/src/weights.rs index c5cb7cda3..f81f4bd8e 100644 --- a/pallets/amm/src/weights.rs +++ b/pallets/amm/src/weights.rs @@ -60,18 +60,18 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn add_liquidity() -> Weight { - (217_917_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(217_917_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn remove_liquidity() -> Weight { - (238_051_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(238_051_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) @@ -79,17 +79,17 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:6 w:6) // Storage: System Account (r:2 w:2) fn create_pool() -> Weight { - (291_928_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) + Weight::from_ref_time(291_928_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(13 as u64)) } // Storage: AMM ProtocolFee (r:0 w:1) fn update_protocol_fee() -> Weight { - (4_067_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(4_067_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: AMM ProtocolFeeReceiver (r:0 w:1) fn update_protocol_fee_receiver() -> Weight { - (4_114_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(4_114_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -100,18 +100,18 @@ impl WeightInfo for () { // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn add_liquidity() -> Weight { - (217_917_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(10 as Weight)) - .saturating_add(RocksDbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(217_917_000 as u64) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn remove_liquidity() -> Weight { - (238_051_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(10 as Weight)) - .saturating_add(RocksDbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(238_051_000 as u64) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) @@ -119,16 +119,16 @@ impl WeightInfo for () { // Storage: Assets Account (r:6 w:6) // Storage: System Account (r:2 w:2) fn create_pool() -> Weight { - (291_928_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(13 as Weight)) - .saturating_add(RocksDbWeight::get().writes(13 as Weight)) + Weight::from_ref_time(291_928_000 as u64) + .saturating_add(RocksDbWeight::get().reads(13 as u64)) + .saturating_add(RocksDbWeight::get().writes(13 as u64)) } // Storage: AMM ProtocolFee (r:0 w:1) fn update_protocol_fee() -> Weight { - (4_067_000 as Weight).saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(4_067_000 as u64).saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: AMM ProtocolFeeReceiver (r:0 w:1) fn update_protocol_fee_receiver() -> Weight { - (4_114_000 as Weight).saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(4_114_000 as u64).saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/pallets/asset-registry/Cargo.toml b/pallets/asset-registry/Cargo.toml index f4b72998a..2ec136e42 100644 --- a/pallets/asset-registry/Cargo.toml +++ b/pallets/asset-registry/Cargo.toml @@ -9,24 +9,24 @@ log = { version = '0.4', default-features = false } serde = { version = '1.0.136', optional = true } # Substrate -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } parity-scale-codec = { version = '3.1.5', default-features = false, features = ['derive'] } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } # Polkadot -xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.28', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.32', default-features = false } # Benchmarks -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', optional = true, default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', optional = true, default-features = false } [dev-dependencies] -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } [features] default = ['std'] diff --git a/pallets/asset-registry/src/lib.rs b/pallets/asset-registry/src/lib.rs index b32a4b14d..1a59af89b 100644 --- a/pallets/asset-registry/src/lib.rs +++ b/pallets/asset-registry/src/lib.rs @@ -43,7 +43,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The Asset Id. This will be used to register the asset in Assets type AssetId: Member + Parameter + Default + Copy + HasCompact + MaxEncodedLen; @@ -55,7 +55,7 @@ pub mod pallet { type Balance: Member + Parameter + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen; /// Origin that is allowed to create and modify asset information - type UpdateOrigin: EnsureOrigin; + type UpdateOrigin: EnsureOrigin; type WeightInfo: WeightInfo; } diff --git a/pallets/asset-registry/src/mock.rs b/pallets/asset-registry/src/mock.rs index 068fb0d0c..367a2f6a7 100644 --- a/pallets/asset-registry/src/mock.rs +++ b/pallets/asset-registry/src/mock.rs @@ -48,8 +48,8 @@ impl frame_system::Config for Test { type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -57,7 +57,7 @@ impl frame_system::Config for Test { type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); @@ -78,7 +78,7 @@ parameter_types! { impl pallet_balances::Config for Test { type Balance = u64; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = (); @@ -143,7 +143,7 @@ impl Into> for MockAssetType { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = u64; type AssetId = u32; type AssetType = MockAssetType; @@ -166,7 +166,7 @@ pub(crate) fn events() -> Vec> { .into_iter() .map(|r| r.event) .filter_map(|e| { - if let Event::AssetRegistry(inner) = e { + if let RuntimeEvent::AssetRegistry(inner) = e { Some(inner) } else { None diff --git a/pallets/asset-registry/src/tests.rs b/pallets/asset-registry/src/tests.rs index 98955463b..c6bf2207d 100644 --- a/pallets/asset-registry/src/tests.rs +++ b/pallets/asset-registry/src/tests.rs @@ -22,7 +22,7 @@ use frame_support::{assert_noop, assert_ok}; fn registering_works() { new_test_ext().execute_with(|| { assert_ok!(AssetRegistry::register_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), )); @@ -46,7 +46,7 @@ fn registering_works() { fn test_asset_exists_error() { new_test_ext().execute_with(|| { assert_ok!(AssetRegistry::register_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), )); @@ -57,7 +57,7 @@ fn test_asset_exists_error() { ); assert_noop!( AssetRegistry::register_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), ), @@ -70,13 +70,13 @@ fn test_asset_exists_error() { fn test_root_can_change_units_per_second() { new_test_ext().execute_with(|| { assert_ok!(AssetRegistry::register_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), )); assert_ok!(AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1), 200u128.into(), )); @@ -107,7 +107,7 @@ fn test_regular_user_cannot_call_extrinsics() { new_test_ext().execute_with(|| { assert_noop!( AssetRegistry::register_asset( - Origin::signed(1), + RuntimeOrigin::signed(1), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), ), @@ -116,7 +116,7 @@ fn test_regular_user_cannot_call_extrinsics() { assert_noop!( AssetRegistry::update_asset_units_per_second( - Origin::signed(1), + RuntimeOrigin::signed(1), MockAssetType::MockAsset(1), 200u128.into(), ), @@ -124,7 +124,11 @@ fn test_regular_user_cannot_call_extrinsics() { ); assert_noop!( - AssetRegistry::update_asset_type(Origin::signed(1), 1, MockAssetType::MockAsset(2),), + AssetRegistry::update_asset_type( + RuntimeOrigin::signed(1), + 1, + MockAssetType::MockAsset(2), + ), sp_runtime::DispatchError::BadOrigin ); }); @@ -134,19 +138,19 @@ fn test_regular_user_cannot_call_extrinsics() { fn test_root_can_change_asset_id_type() { new_test_ext().execute_with(|| { assert_ok!(AssetRegistry::register_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), )); assert_ok!(AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1), 200u128.into(), )); assert_ok!(AssetRegistry::update_asset_type( - Origin::root(), + RuntimeOrigin::root(), 1, MockAssetType::MockAsset(2), )); @@ -194,13 +198,13 @@ fn test_root_can_change_asset_id_type() { fn test_change_units_per_second_after_setting_it_once() { new_test_ext().execute_with(|| { assert_ok!(AssetRegistry::register_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), )); assert_ok!(AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1), 200u128.into(), )); @@ -214,7 +218,7 @@ fn test_change_units_per_second_after_setting_it_once() { ); assert_ok!(AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1), 100u128.into(), )); @@ -248,13 +252,13 @@ fn test_change_units_per_second_after_setting_it_once() { fn test_root_can_change_units_per_second_and_then_remove() { new_test_ext().execute_with(|| { assert_ok!(AssetRegistry::register_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), )); assert_ok!(AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1), 200u128.into(), )); @@ -268,7 +272,7 @@ fn test_root_can_change_units_per_second_and_then_remove() { ); assert_ok!(AssetRegistry::remove_fee_payment_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1), )); @@ -296,19 +300,19 @@ fn test_root_can_change_units_per_second_and_then_remove() { fn test_weight_hint_error() { new_test_ext().execute_with(|| { assert_ok!(AssetRegistry::register_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), )); assert_ok!(AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1), 200u128.into(), )); assert_ok!(AssetRegistry::remove_fee_payment_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1) )); }); @@ -319,14 +323,18 @@ fn test_asset_id_non_existent_error() { new_test_ext().execute_with(|| { assert_noop!( AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1), 200u128.into(), ), Error::::AssetDoesNotExist ); assert_noop!( - AssetRegistry::update_asset_type(Origin::root(), 1, MockAssetType::MockAsset(2),), + AssetRegistry::update_asset_type( + RuntimeOrigin::root(), + 1, + MockAssetType::MockAsset(2), + ), Error::::AssetDoesNotExist ); }); @@ -336,18 +344,18 @@ fn test_asset_id_non_existent_error() { fn test_root_can_remove_asset_association() { new_test_ext().execute_with(|| { assert_ok!(AssetRegistry::register_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), )); assert_ok!(AssetRegistry::update_asset_units_per_second( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1), 200u128.into(), )); - assert_ok!(AssetRegistry::deregister_asset(Origin::root(), 1,)); + assert_ok!(AssetRegistry::deregister_asset(RuntimeOrigin::root(), 1,)); // Mappings are deleted assert!(AssetRegistry::asset_type_id(MockAssetType::MockAsset(1)).is_none()); @@ -377,12 +385,12 @@ fn test_root_can_remove_asset_association() { fn test_removing_without_asset_units_per_second_does_not_panic() { new_test_ext().execute_with(|| { assert_ok!(AssetRegistry::register_asset( - Origin::root(), + RuntimeOrigin::root(), MockAssetType::MockAsset(1).into(), MockAssetType::MockAsset(1), )); - assert_ok!(AssetRegistry::deregister_asset(Origin::root(), 1,)); + assert_ok!(AssetRegistry::deregister_asset(RuntimeOrigin::root(), 1,)); // Mappings are deleted assert!(AssetRegistry::asset_type_id(MockAssetType::MockAsset(1)).is_none()); diff --git a/pallets/asset-registry/src/weights.rs b/pallets/asset-registry/src/weights.rs index 31806f09d..ed469dd3d 100644 --- a/pallets/asset-registry/src/weights.rs +++ b/pallets/asset-registry/src/weights.rs @@ -58,42 +58,42 @@ impl WeightInfo for SubstrateWeight { // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeId (r:0 w:1) fn register_asset() -> Weight { - (36_449_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_449_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry AssetTypeId (r:1 w:0) // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn update_asset_units_per_second() -> Weight { - (45_578_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(45_578_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:1 w:2) // Storage: AssetRegistry AssetTypeId (r:0 w:2) fn update_asset_type() -> Weight { - (61_904_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(61_904_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn remove_fee_payment_asset() -> Weight { - (38_682_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(38_682_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) // Storage: AssetRegistry AssetTypeId (r:0 w:1) fn deregister_asset() -> Weight { - (48_719_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(48_719_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } } @@ -102,41 +102,41 @@ impl WeightInfo for () { // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeId (r:0 w:1) fn register_asset() -> Weight { - (36_449_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_449_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry AssetTypeId (r:1 w:0) // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn update_asset_units_per_second() -> Weight { - (45_578_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(45_578_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:1 w:2) // Storage: AssetRegistry AssetTypeId (r:0 w:2) fn update_asset_type() -> Weight { - (61_904_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(61_904_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn remove_fee_payment_asset() -> Weight { - (38_682_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(38_682_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) // Storage: AssetRegistry AssetTypeId (r:0 w:1) fn deregister_asset() -> Weight { - (48_719_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(48_719_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) } } diff --git a/pallets/bridge/Cargo.toml b/pallets/bridge/Cargo.toml index 352495187..069c91ff5 100644 --- a/pallets/bridge/Cargo.toml +++ b/pallets/bridge/Cargo.toml @@ -9,22 +9,22 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [dev-dependencies] pallet-currency-adapter = { path = '../currency-adapter' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } [features] default = ['std'] diff --git a/pallets/bridge/src/benchmarking.rs b/pallets/bridge/src/benchmarking.rs index 09afd06b5..035741263 100644 --- a/pallets/bridge/src/benchmarking.rs +++ b/pallets/bridge/src/benchmarking.rs @@ -50,7 +50,7 @@ pub fn dollar(d: u128) -> u128 { d.saturating_mul(10_u128.pow(12)) } -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } diff --git a/pallets/bridge/src/lib.rs b/pallets/bridge/src/lib.rs index 22294ce73..97c635c8b 100644 --- a/pallets/bridge/src/lib.rs +++ b/pallets/bridge/src/lib.rs @@ -76,19 +76,19 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Relay members has permission to materialize the assets type RelayMembers: SortedMembers; /// The origin which can update bridged token - type UpdateTokenOrigin: EnsureOrigin; + type UpdateTokenOrigin: EnsureOrigin; /// The origin which can update bridged chain - type UpdateChainOrigin: EnsureOrigin; + type UpdateChainOrigin: EnsureOrigin; /// The origin which can clean accumulated cap value - type CapOrigin: EnsureOrigin; + type CapOrigin: EnsureOrigin; /// The root operator account id #[pallet::constant] @@ -641,7 +641,7 @@ pub mod pallet { #[pallet::hooks] impl Hooks for Pallet { - fn on_initialize(block_number: T::BlockNumber) -> u64 { + fn on_initialize(block_number: T::BlockNumber) -> Weight { let expired = ProposalVotes::::iter().filter(|x| (x).2.can_be_cleaned_up(block_number)); expired.for_each(|x| { @@ -650,7 +650,7 @@ pub mod pallet { ProposalVotes::::remove(chain_id, chain_nonce); }); - 0 + Weight::zero() } } } @@ -663,7 +663,7 @@ impl Pallet { } /// Checks if the origin is relay members - fn ensure_relay_member(origin: T::Origin) -> Result> { + fn ensure_relay_member(origin: T::RuntimeOrigin) -> Result> { let who = match ensure_signed_or_root(origin).map_err(|_| Error::::OriginNoPermission)? { Some(account_id) => account_id, None => return Ok(T::RootOperatorAccountId::get()), diff --git a/pallets/bridge/src/mock.rs b/pallets/bridge/src/mock.rs index b1b99da1f..51b151727 100644 --- a/pallets/bridge/src/mock.rs +++ b/pallets/bridge/src/mock.rs @@ -82,8 +82,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -91,7 +91,7 @@ impl frame_system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -114,7 +114,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -138,7 +138,7 @@ parameter_types! { impl pallet_balances::Config for Test { type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = (); @@ -177,7 +177,7 @@ impl ChangeMembers for ChangeBridgeMembers { type BridgeMembershipInstance = pallet_membership::Instance1; impl pallet_membership::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrigin; type RemoveOrigin = EnsureRootOrigin; type SwapOrigin = EnsureRootOrigin; @@ -217,7 +217,7 @@ impl BalanceConversion for GiftConvert { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RelayMembers = BridgeMembership; type RootOperatorAccountId = RootOperatorAccountId; type UpdateChainOrigin = EnsureRoot; @@ -237,7 +237,7 @@ impl Config for Test { } pub type Block = sp_runtime::generic::Block; -pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; frame_support::construct_runtime!( pub enum Test where @@ -262,9 +262,9 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { - Assets::force_create(Origin::root(), KSM, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), KSM, ALICE, true, 1).unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), KSM, b"Kusama".to_vec(), b"KSM".to_vec(), @@ -272,9 +272,9 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { false, ) .unwrap(); - Assets::force_create(Origin::root(), USDT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), USDT, ALICE, true, 1).unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), USDT, b"USDT".to_vec(), b"USDT".to_vec(), @@ -283,22 +283,22 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { ) .unwrap(); - Balances::set_balance(Origin::root(), EVE, dollar(100), dollar(0)).unwrap(); + Balances::set_balance(RuntimeOrigin::root(), EVE, dollar(100), dollar(0)).unwrap(); Balances::set_balance( - Origin::root(), + RuntimeOrigin::root(), PalletId(*b"par/gift").into_account_truncating(), dollar(1000000), dollar(0), ) .unwrap(); - BridgeMembership::add_member(Origin::root(), ALICE).unwrap(); - BridgeMembership::add_member(Origin::root(), BOB).unwrap(); - BridgeMembership::add_member(Origin::root(), CHARLIE).unwrap(); + BridgeMembership::add_member(RuntimeOrigin::root(), ALICE).unwrap(); + BridgeMembership::add_member(RuntimeOrigin::root(), BOB).unwrap(); + BridgeMembership::add_member(RuntimeOrigin::root(), CHARLIE).unwrap(); - Bridge::register_chain(Origin::root(), ETH).unwrap(); - Bridge::register_bridge_token(Origin::root(), HKO, EHKO_CURRENCY).unwrap(); - Bridge::register_bridge_token(Origin::root(), USDT, EUSDT_CURRENCY).unwrap(); + Bridge::register_chain(RuntimeOrigin::root(), ETH).unwrap(); + Bridge::register_bridge_token(RuntimeOrigin::root(), HKO, EHKO_CURRENCY).unwrap(); + Bridge::register_bridge_token(RuntimeOrigin::root(), USDT, EUSDT_CURRENCY).unwrap(); System::set_block_number(0); run_to_block(1); @@ -307,8 +307,8 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { } // Checks events against the latest. -pub fn assert_events(mut expected: Vec) { - let mut actual: Vec = system::Pallet::::events() +pub fn assert_events(mut expected: Vec) { + let mut actual: Vec = system::Pallet::::events() .iter() .map(|e| e.event.clone()) .collect(); diff --git a/pallets/bridge/src/tests.rs b/pallets/bridge/src/tests.rs index a0654ca0c..0a8154e9e 100644 --- a/pallets/bridge/src/tests.rs +++ b/pallets/bridge/src/tests.rs @@ -12,14 +12,14 @@ fn change_bridge_members_works() { assert_eq!(Bridge::vote_threshold(), 3); // After remove and swap, members count should be 2 - BridgeMembership::remove_member(Origin::root(), ALICE).unwrap(); - BridgeMembership::swap_member(Origin::root(), BOB, DAVE).unwrap(); + BridgeMembership::remove_member(RuntimeOrigin::root(), ALICE).unwrap(); + BridgeMembership::swap_member(RuntimeOrigin::root(), BOB, DAVE).unwrap(); assert_eq!(Bridge::get_members_count(), 2); assert_eq!(Bridge::vote_threshold(), 2); - BridgeMembership::add_member(Origin::root(), ALICE).unwrap(); - BridgeMembership::add_member(Origin::root(), BOB).unwrap(); - BridgeMembership::add_member(Origin::root(), EVE).unwrap(); + BridgeMembership::add_member(RuntimeOrigin::root(), ALICE).unwrap(); + BridgeMembership::add_member(RuntimeOrigin::root(), BOB).unwrap(); + BridgeMembership::add_member(RuntimeOrigin::root(), EVE).unwrap(); assert_eq!(Bridge::vote_threshold(), 4); }); } @@ -54,28 +54,41 @@ fn test_valid_threshold() { fn register_unregister_works() { new_test_ext().execute_with(|| { assert_noop!( - Bridge::register_chain(Origin::root(), ETH), + Bridge::register_chain(RuntimeOrigin::root(), ETH), Error::::ChainIdAlreadyRegistered, ); // Register a new chain_id succeed - Bridge::register_chain(Origin::root(), BNB).unwrap(); + Bridge::register_chain(RuntimeOrigin::root(), BNB).unwrap(); assert_noop!( - Bridge::register_chain(Origin::root(), BNB), + Bridge::register_chain(RuntimeOrigin::root(), BNB), Error::::ChainIdAlreadyRegistered, ); // Teleport succeed when the chain is registered - Bridge::teleport(Origin::signed(EVE), BNB, EHKO, "TELE".into(), dollar(10)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + BNB, + EHKO, + "TELE".into(), + dollar(10), + ) + .unwrap(); // Unregister a exist chain_id succeed - Bridge::unregister_chain(Origin::root(), ETH).unwrap(); + Bridge::unregister_chain(RuntimeOrigin::root(), ETH).unwrap(); assert_noop!( - Bridge::unregister_chain(Origin::root(), ETH), + Bridge::unregister_chain(RuntimeOrigin::root(), ETH), Error::::ChainIdNotRegistered, ); // Teleport fails when the chain is not registered assert_noop!( - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(10)), + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(10) + ), Error::::ChainIdNotRegistered, ); }); @@ -88,12 +101,35 @@ fn gift_fees_works() { assert_eq!(::Assets::balance(USDT, &DAVE), dollar(0)); assert_eq!(::Assets::balance(HKO, &DAVE), dollar(0)); - Bridge::set_bridge_token_cap(Origin::root(), EUSDT, BridgeType::BridgeIn, usdt(300)) - .unwrap(); - Bridge::materialize(Origin::signed(ALICE), ETH, 0, EUSDT, DAVE, usdt(300), true).unwrap(); - Bridge::materialize(Origin::signed(BOB), ETH, 0, EUSDT, DAVE, usdt(300), true).unwrap(); + Bridge::set_bridge_token_cap( + RuntimeOrigin::root(), + EUSDT, + BridgeType::BridgeIn, + usdt(300), + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 0, + EUSDT, + DAVE, + usdt(300), + true, + ) + .unwrap(); Bridge::materialize( - Origin::signed(CHARLIE), + RuntimeOrigin::signed(BOB), + ETH, + 0, + EUSDT, + DAVE, + usdt(300), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(CHARLIE), ETH, 0, EUSDT, @@ -113,11 +149,42 @@ fn gift_fees_works() { assert_eq!(::Assets::balance(USDT, &BOB), dollar(0)); assert_eq!(::Assets::balance(HKO, &BOB), dollar(0)); - Bridge::clean_cap_accumulated_value(Origin::signed(ALICE), EUSDT, BridgeType::BridgeIn) - .unwrap(); - Bridge::materialize(Origin::signed(ALICE), ETH, 1, EUSDT, BOB, usdt(229), true).unwrap(); - Bridge::materialize(Origin::signed(BOB), ETH, 1, EUSDT, BOB, usdt(229), true).unwrap(); - Bridge::materialize(Origin::signed(CHARLIE), ETH, 1, EUSDT, BOB, usdt(229), true).unwrap(); + Bridge::clean_cap_accumulated_value( + RuntimeOrigin::signed(ALICE), + EUSDT, + BridgeType::BridgeIn, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 1, + EUSDT, + BOB, + usdt(229), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(BOB), + ETH, + 1, + EUSDT, + BOB, + usdt(229), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(CHARLIE), + ETH, + 1, + EUSDT, + BOB, + usdt(229), + true, + ) + .unwrap(); assert_eq!(::Assets::balance(USDT, &BOB), usdt(229)); assert_eq!(::Assets::balance(HKO, &BOB), 0,); @@ -125,12 +192,43 @@ fn gift_fees_works() { // gift_fees = 0.025 HKO - (0.022 HKO - 0.01 HKO) = 0.013 HKO // final_gift = existential_deposit + 0.013 HKO = 0.023 HKO // final_balance = 0.022 HKO + 0.023 HKO = 0.045 HKO - Balances::set_balance(Origin::root(), BOB, dollar(22) / 1000, dollar(0)).unwrap(); - Bridge::clean_cap_accumulated_value(Origin::signed(ALICE), EUSDT, BridgeType::BridgeIn) - .unwrap(); - Bridge::materialize(Origin::signed(ALICE), ETH, 2, EUSDT, BOB, usdt(300), true).unwrap(); - Bridge::materialize(Origin::signed(BOB), ETH, 2, EUSDT, BOB, usdt(300), true).unwrap(); - Bridge::materialize(Origin::signed(CHARLIE), ETH, 2, EUSDT, BOB, usdt(300), true).unwrap(); + Balances::set_balance(RuntimeOrigin::root(), BOB, dollar(22) / 1000, dollar(0)).unwrap(); + Bridge::clean_cap_accumulated_value( + RuntimeOrigin::signed(ALICE), + EUSDT, + BridgeType::BridgeIn, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 2, + EUSDT, + BOB, + usdt(300), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(BOB), + ETH, + 2, + EUSDT, + BOB, + usdt(300), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(CHARLIE), + ETH, + 2, + EUSDT, + BOB, + usdt(300), + true, + ) + .unwrap(); assert_eq!( ::Assets::balance(HKO, &BOB), dollar(35) / 1000 + dollar(1) / 100, @@ -140,12 +238,43 @@ fn gift_fees_works() { // gift_fees = 0.025 HKO - (0.035 HKO - 0.01 HKO) = 0 HKO // final_gift = 0 HKO // final_balance = 0.035 HKO - Balances::set_balance(Origin::root(), BOB, dollar(35) / 1000, dollar(0)).unwrap(); - Bridge::clean_cap_accumulated_value(Origin::signed(ALICE), EUSDT, BridgeType::BridgeIn) - .unwrap(); - Bridge::materialize(Origin::signed(ALICE), ETH, 3, EUSDT, BOB, usdt(10), true).unwrap(); - Bridge::materialize(Origin::signed(BOB), ETH, 3, EUSDT, BOB, usdt(10), true).unwrap(); - Bridge::materialize(Origin::signed(CHARLIE), ETH, 3, EUSDT, BOB, usdt(10), true).unwrap(); + Balances::set_balance(RuntimeOrigin::root(), BOB, dollar(35) / 1000, dollar(0)).unwrap(); + Bridge::clean_cap_accumulated_value( + RuntimeOrigin::signed(ALICE), + EUSDT, + BridgeType::BridgeIn, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 3, + EUSDT, + BOB, + usdt(10), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(BOB), + ETH, + 3, + EUSDT, + BOB, + usdt(10), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(CHARLIE), + ETH, + 3, + EUSDT, + BOB, + usdt(10), + true, + ) + .unwrap(); assert_eq!( ::Assets::balance(HKO, &BOB), dollar(35) / 1000, @@ -157,7 +286,14 @@ fn teleport_works() { new_test_ext().execute_with(|| { assert_eq!(::Assets::balance(HKO, &EVE), dollar(100)); - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(10)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(10), + ) + .unwrap(); assert_eq!(::Assets::balance(HKO, &EVE), dollar(90)); assert_eq!( @@ -172,10 +308,44 @@ fn materialize_works() { new_test_ext().execute_with(|| { // EVE has 50 HKO left, and then requests for materializing 20 EHKO // Current vote threshold is 2 - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(50)).unwrap(); - Bridge::materialize(Origin::signed(ALICE), ETH, 0, EHKO, EVE, dollar(10), true).unwrap(); - Bridge::materialize(Origin::signed(BOB), ETH, 0, EHKO, EVE, dollar(10), true).unwrap(); - Bridge::materialize(Origin::signed(CHARLIE), ETH, 0, EHKO, EVE, dollar(10), true).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(50), + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 0, + EHKO, + EVE, + dollar(10), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(BOB), + ETH, + 0, + EHKO, + EVE, + dollar(10), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(CHARLIE), + ETH, + 0, + EHKO, + EVE, + dollar(10), + true, + ) + .unwrap(); assert_eq!( ::Assets::balance(HKO, &Bridge::account_id()), dollar(40) @@ -184,25 +354,60 @@ fn materialize_works() { // The chain_nonce should be unique to avoid comduplicate call assert_noop!( - Bridge::materialize(Origin::signed(ALICE), ETH, 0, EHKO, EVE, dollar(10), true), + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 0, + EHKO, + EVE, + dollar(10), + true + ), Error::::ProposalAlreadyComplete, ); // Adjust threshold with 2 // Vote_for: [ALICE, CHARLIE] // Vote_against [BOB] - Bridge::materialize(Origin::signed(ALICE), ETH, 1, EHKO, EVE, dollar(10), true).unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 1, + EHKO, + EVE, + dollar(10), + true, + ) + .unwrap(); assert_eq!(::Assets::balance(HKO, &EVE), dollar(60)); - Bridge::materialize(Origin::signed(BOB), ETH, 1, EHKO, EVE, dollar(10), true).unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(BOB), + ETH, + 1, + EHKO, + EVE, + dollar(10), + true, + ) + .unwrap(); assert_eq!(::Assets::balance(HKO, &EVE), dollar(60)); - Bridge::materialize(Origin::signed(CHARLIE), ETH, 1, EHKO, EVE, dollar(10), true).unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(CHARLIE), + ETH, + 1, + EHKO, + EVE, + dollar(10), + true, + ) + .unwrap(); assert_eq!(::Assets::balance(HKO, &EVE), dollar(70)); assert_eq!( ::Assets::balance(HKO, &Bridge::account_id()), dollar(30) ); // Success in generating `Minted` event - assert_events(vec![mock::Event::Bridge(Event::MaterializeMinted( + assert_events(vec![mock::RuntimeEvent::Bridge(Event::MaterializeMinted( ETH, 1, EHKO, @@ -217,12 +422,19 @@ fn set_bridge_token_fee_works() { new_test_ext().execute_with(|| { // Case 1: Bridge token is HKO // Set HKO fee equal to 2 HKO - Bridge::set_bridge_token_fee(Origin::root(), EHKO, dollar(1)).unwrap(); + Bridge::set_bridge_token_fee(RuntimeOrigin::root(), EHKO, dollar(1)).unwrap(); // Initial balance of EVE is 100 HKO assert_eq!(::Assets::balance(HKO, &EVE), dollar(100)); - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(10)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(10), + ) + .unwrap(); // After teleport 10 HKO, EVE should have 90 HKO assert_eq!(::Assets::balance(HKO, &EVE), dollar(90)); @@ -234,7 +446,7 @@ fn set_bridge_token_fee_works() { // Success in generating `TeleportBurned` event // actual amount is 9 HKO // fee is 1 HKO - assert_events(vec![mock::Event::Bridge(Event::TeleportBurned( + assert_events(vec![mock::RuntimeEvent::Bridge(Event::TeleportBurned( EVE, ETH, 1, @@ -246,14 +458,21 @@ fn set_bridge_token_fee_works() { // Case 2: Bridge toke is EUSDT // Set EUSDT fee equal to 1 EUSDT - Bridge::set_bridge_token_fee(Origin::root(), EUSDT, usdt(1)).unwrap(); + Bridge::set_bridge_token_fee(RuntimeOrigin::root(), EUSDT, usdt(1)).unwrap(); // EVE has 10 USDT initialized - Assets::mint(Origin::signed(ALICE), USDT, EVE, usdt(10)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), USDT, EVE, usdt(10)).unwrap(); assert_eq!(::Assets::balance(USDT, &EVE), usdt(10)); // EVE teleport 10 EUSDT - Bridge::teleport(Origin::signed(EVE), ETH, EUSDT, "TELE".into(), usdt(10)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EUSDT, + "TELE".into(), + usdt(10), + ) + .unwrap(); // After teleport 10 EUSDT // EVE should have 0 USDT @@ -267,7 +486,7 @@ fn set_bridge_token_fee_works() { // Success in generating `TeleportBurned` event // actual amount is 9 EUSDT // fee is 1 EUSDT - assert_events(vec![mock::Event::Bridge(Event::TeleportBurned( + assert_events(vec![mock::RuntimeEvent::Bridge(Event::TeleportBurned( EVE, ETH, 2, @@ -284,24 +503,45 @@ fn set_bridge_token_status_works() { new_test_ext().execute_with(|| { // Case 1: Cannot teleport / materialize a disabled token // Set bridge token status to disabled - Bridge::set_bridge_token_status(Origin::root(), EHKO, false).unwrap(); + Bridge::set_bridge_token_status(RuntimeOrigin::root(), EHKO, false).unwrap(); // Set HKO transaction fee to 2 HKO - Bridge::set_bridge_token_fee(Origin::root(), EHKO, dollar(1)).unwrap(); + Bridge::set_bridge_token_fee(RuntimeOrigin::root(), EHKO, dollar(1)).unwrap(); // Initial balance of EVE is 100 HKO assert_eq!(::Assets::balance(HKO, &EVE), dollar(100)); assert_noop!( - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(10)), + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(10) + ), Error::::BridgeTokenDisabled, ); assert_noop!( - Bridge::materialize(Origin::signed(ALICE), ETH, 0, EHKO, EVE, dollar(100), true,), + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 0, + EHKO, + EVE, + dollar(100), + true, + ), Error::::BridgeTokenDisabled, ); // Case 2: User can teleport / materialize a enabled token - Bridge::set_bridge_token_status(Origin::root(), EHKO, true).unwrap(); - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(10)).unwrap(); + Bridge::set_bridge_token_status(RuntimeOrigin::root(), EHKO, true).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(10), + ) + .unwrap(); assert_eq!( ::Assets::balance(HKO, &Bridge::account_id()), dollar(10) @@ -310,7 +550,7 @@ fn set_bridge_token_status_works() { // Success in generating `TeleportBurned` event // actual amount is 9 HKO // fee is 1 HKO - assert_events(vec![mock::Event::Bridge(Event::TeleportBurned( + assert_events(vec![mock::RuntimeEvent::Bridge(Event::TeleportBurned( EVE, ETH, 1, @@ -320,9 +560,36 @@ fn set_bridge_token_status_works() { dollar(1), ))]); - Bridge::materialize(Origin::signed(ALICE), ETH, 0, EHKO, EVE, dollar(100), true).unwrap(); - Bridge::materialize(Origin::signed(BOB), ETH, 0, EHKO, EVE, dollar(100), true).unwrap(); - Bridge::materialize(Origin::signed(CHARLIE), ETH, 0, EHKO, EVE, dollar(1), true).unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 0, + EHKO, + EVE, + dollar(100), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(BOB), + ETH, + 0, + EHKO, + EVE, + dollar(100), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(CHARLIE), + ETH, + 0, + EHKO, + EVE, + dollar(1), + true, + ) + .unwrap(); }); } @@ -330,14 +597,21 @@ fn set_bridge_token_status_works() { fn teleport_external_currency_works() { new_test_ext().execute_with(|| { // Set EUSDT fee equal to 1 USDT - Bridge::set_bridge_token_fee(Origin::root(), EUSDT, usdt(1)).unwrap(); + Bridge::set_bridge_token_fee(RuntimeOrigin::root(), EUSDT, usdt(1)).unwrap(); // EVE has 100 USDT initialized - Assets::mint(Origin::signed(ALICE), USDT, EVE, usdt(100)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), USDT, EVE, usdt(100)).unwrap(); assert_eq!(::Assets::balance(USDT, &EVE), usdt(100)); // EVE teleport 10 EUSDT - Bridge::teleport(Origin::signed(EVE), ETH, EUSDT, "TELE".into(), usdt(10)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EUSDT, + "TELE".into(), + usdt(10), + ) + .unwrap(); assert_eq!(::Assets::balance(USDT, &EVE), usdt(90)); assert_eq!( @@ -345,7 +619,7 @@ fn teleport_external_currency_works() { usdt(1), ); - assert_events(vec![mock::Event::Bridge(Event::TeleportBurned( + assert_events(vec![mock::RuntimeEvent::Bridge(Event::TeleportBurned( EVE, ETH, 1, @@ -368,12 +642,39 @@ fn materialize_external_currency_works() { // EVE has 0 USDT, and then requests for materializing 10 USDT // Current vote threshold is 3 - Bridge::materialize(Origin::signed(ALICE), ETH, 1, EUSDT, EVE, usdt(10), true).unwrap(); - Bridge::materialize(Origin::signed(BOB), ETH, 1, EUSDT, EVE, usdt(10), true).unwrap(); - Bridge::materialize(Origin::signed(CHARLIE), ETH, 1, EUSDT, EVE, usdt(10), true).unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 1, + EUSDT, + EVE, + usdt(10), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(BOB), + ETH, + 1, + EUSDT, + EVE, + usdt(10), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(CHARLIE), + ETH, + 1, + EUSDT, + EVE, + usdt(10), + true, + ) + .unwrap(); assert_eq!(::Assets::balance(USDT, &EVE), usdt(10)); - assert_events(vec![mock::Event::Bridge(Event::MaterializeMinted( + assert_events(vec![mock::RuntimeEvent::Bridge(Event::MaterializeMinted( ETH, 1, EUSDT, @@ -382,10 +683,23 @@ fn materialize_external_currency_works() { ))]); assert_noop!( - Bridge::teleport(Origin::signed(EVE), ETH, EUSDT, "TELE".into(), usdt(11)), + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EUSDT, + "TELE".into(), + usdt(11) + ), pallet_assets::Error::::BalanceLow, ); - Bridge::teleport(Origin::signed(EVE), ETH, EUSDT, "TELE".into(), usdt(10)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EUSDT, + "TELE".into(), + usdt(10), + ) + .unwrap(); assert_eq!(::Assets::balance(USDT, &EVE), dollar(0)); assert_eq!( @@ -401,28 +715,77 @@ fn bridge_in_and_out_cap_works() { // Case 1: bridge out cap works assert_eq!(::Assets::balance(HKO, &EVE), dollar(100)); // bridge_out_cp = 100 HKO, teleport 10 HKO is ok - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(10)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(10), + ) + .unwrap(); // It reaches the bridge out cap - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(90)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(90), + ) + .unwrap(); // Failed if bridgeing amount exceed the bridge out cap assert_noop!( - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(1)), + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(1) + ), Error::::BridgeOutCapExceeded, ); // Bob also cannot teleport when bridge out capacity is exceeded assert_noop!( - Bridge::teleport(Origin::signed(BOB), ETH, EHKO, "TELE".into(), dollar(1)), + Bridge::teleport( + RuntimeOrigin::signed(BOB), + ETH, + EHKO, + "TELE".into(), + dollar(1) + ), Error::::BridgeOutCapExceeded, ); // Case 2: bridge in cap works - Balances::set_balance(Origin::root(), Bridge::account_id(), dollar(200), dollar(0)) - .unwrap(); + Balances::set_balance( + RuntimeOrigin::root(), + Bridge::account_id(), + dollar(200), + dollar(0), + ) + .unwrap(); // Bridge_in cap is 100 HKO - Bridge::materialize(Origin::signed(ALICE), ETH, 0, EHKO, EVE, dollar(100), true).unwrap(); - Bridge::materialize(Origin::signed(BOB), ETH, 0, EHKO, EVE, dollar(100), true).unwrap(); Bridge::materialize( - Origin::signed(CHARLIE), + RuntimeOrigin::signed(ALICE), + ETH, + 0, + EHKO, + EVE, + dollar(100), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(BOB), + ETH, + 0, + EHKO, + EVE, + dollar(100), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(CHARLIE), ETH, 0, EHKO, @@ -434,7 +797,15 @@ fn bridge_in_and_out_cap_works() { // Failed if exceed the bridge in cap assert_noop!( - Bridge::materialize(Origin::signed(ALICE), ETH, 1, EHKO, EVE, dollar(100), true), + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 1, + EHKO, + EVE, + dollar(100), + true + ), Error::::BridgeInCapExceeded, ); }) @@ -443,21 +814,51 @@ fn bridge_in_and_out_cap_works() { #[test] fn clean_cap_accumulated_value_works() { new_test_ext().execute_with(|| { - Balances::set_balance(Origin::root(), EVE, dollar(200), dollar(0)).unwrap(); - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(100)).unwrap(); + Balances::set_balance(RuntimeOrigin::root(), EVE, dollar(200), dollar(0)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(100), + ) + .unwrap(); assert_noop!( - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(100)), + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(100) + ), Error::::BridgeOutCapExceeded, ); // CapOrigin can clean the accumulated cap value - Bridge::clean_cap_accumulated_value(Origin::signed(ALICE), EHKO, BridgeType::BridgeOut) - .unwrap(); + Bridge::clean_cap_accumulated_value( + RuntimeOrigin::signed(ALICE), + EHKO, + BridgeType::BridgeOut, + ) + .unwrap(); // Bridge out works again - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(100)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(100), + ) + .unwrap(); assert_noop!( - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(1)), + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(1) + ), Error::::BridgeOutCapExceeded, ); }) @@ -466,21 +867,52 @@ fn clean_cap_accumulated_value_works() { #[test] fn set_bridge_token_cap_works() { new_test_ext().execute_with(|| { - Balances::set_balance(Origin::root(), EVE, dollar(500), dollar(0)).unwrap(); - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(100)).unwrap(); + Balances::set_balance(RuntimeOrigin::root(), EVE, dollar(500), dollar(0)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(100), + ) + .unwrap(); assert_noop!( - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(250)), + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(250) + ), Error::::BridgeOutCapExceeded, ); // Set a higher cap to continue the transaction above - Bridge::set_bridge_token_cap(Origin::root(), EHKO, BridgeType::BridgeOut, dollar(350)) - .unwrap(); + Bridge::set_bridge_token_cap( + RuntimeOrigin::root(), + EHKO, + BridgeType::BridgeOut, + dollar(350), + ) + .unwrap(); // It works after cap changes - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(250)).unwrap(); + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(250), + ) + .unwrap(); assert_noop!( - Bridge::teleport(Origin::signed(EVE), ETH, EHKO, "TELE".into(), dollar(1)), + Bridge::teleport( + RuntimeOrigin::signed(EVE), + ETH, + EHKO, + "TELE".into(), + dollar(1) + ), Error::::BridgeOutCapExceeded, ); }) @@ -489,16 +921,57 @@ fn set_bridge_token_cap_works() { #[test] fn multi_materialize_cap_limit_works() { new_test_ext().execute_with(|| { - Balances::set_balance(Origin::root(), Bridge::account_id(), dollar(300), dollar(0)) - .unwrap(); + Balances::set_balance( + RuntimeOrigin::root(), + Bridge::account_id(), + dollar(300), + dollar(0), + ) + .unwrap(); // Try to materialize for EVE with 100 EHKO - Bridge::materialize(Origin::signed(ALICE), ETH, 0, EHKO, EVE, dollar(100), true).unwrap(); - Bridge::materialize(Origin::signed(BOB), ETH, 0, EHKO, EVE, dollar(100), true).unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(ALICE), + ETH, + 0, + EHKO, + EVE, + dollar(100), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(BOB), + ETH, + 0, + EHKO, + EVE, + dollar(100), + true, + ) + .unwrap(); // But another materialize tx was finished advance and reach the bridge in cap - Bridge::materialize(Origin::signed(ALICE), ETH, 1, EHKO, BOB, dollar(100), true).unwrap(); - Bridge::materialize(Origin::signed(BOB), ETH, 1, EHKO, BOB, dollar(100), true).unwrap(); Bridge::materialize( - Origin::signed(CHARLIE), + RuntimeOrigin::signed(ALICE), + ETH, + 1, + EHKO, + BOB, + dollar(100), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(BOB), + ETH, + 1, + EHKO, + BOB, + dollar(100), + true, + ) + .unwrap(); + Bridge::materialize( + RuntimeOrigin::signed(CHARLIE), ETH, 1, EHKO, @@ -510,7 +983,7 @@ fn multi_materialize_cap_limit_works() { // Failed if exceed the bridge in cap assert_noop!( Bridge::materialize( - Origin::signed(CHARLIE), + RuntimeOrigin::signed(CHARLIE), ETH, 0, EHKO, @@ -522,11 +995,15 @@ fn multi_materialize_cap_limit_works() { ); // CapOrigin should clean the accumulated cap value - Bridge::clean_cap_accumulated_value(Origin::signed(ALICE), EHKO, BridgeType::BridgeIn) - .unwrap(); + Bridge::clean_cap_accumulated_value( + RuntimeOrigin::signed(ALICE), + EHKO, + BridgeType::BridgeIn, + ) + .unwrap(); // Succeed after the accumulated cap value is cleaned Bridge::materialize( - Origin::signed(CHARLIE), + RuntimeOrigin::signed(CHARLIE), ETH, 0, EHKO, diff --git a/pallets/bridge/src/weights.rs b/pallets/bridge/src/weights.rs index 2b8aab447..4d1a4469b 100644 --- a/pallets/bridge/src/weights.rs +++ b/pallets/bridge/src/weights.rs @@ -64,65 +64,65 @@ impl WeightInfo for SubstrateWeight { // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn register_chain() -> Weight { - (40_997_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(40_997_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn unregister_chain() -> Weight { - (41_155_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(41_155_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge BridgeTokens (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:1) fn register_bridge_token() -> Weight { - (46_856_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(46_856_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:1) // Storage: Bridge BridgeTokens (r:0 w:1) fn unregister_bridge_token() -> Weight { - (44_675_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(44_675_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_fee() -> Weight { - (51_194_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_194_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_status() -> Weight { - (50_720_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(50_720_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_cap() -> Weight { - (51_069_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_069_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn clean_cap_accumulated_value() -> Weight { - (50_332_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(50_332_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:1) @@ -130,9 +130,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Bridge BridgeTokens (r:1 w:1) // Storage: System Account (r:1 w:1) fn teleport() -> Weight { - (128_432_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(128_432_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:0) @@ -145,9 +145,9 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:2 w:1) // Storage: Assets Metadata (r:1 w:0) fn materialize() -> Weight { - (209_544_000 as Weight) - .saturating_add(T::DbWeight::get().reads(11 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(209_544_000 as u64) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } } @@ -157,65 +157,65 @@ impl WeightInfo for () { // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn register_chain() -> Weight { - (40_997_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(40_997_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn unregister_chain() -> Weight { - (41_155_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(41_155_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge BridgeTokens (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:1) fn register_bridge_token() -> Weight { - (46_856_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(46_856_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:1) // Storage: Bridge BridgeTokens (r:0 w:1) fn unregister_bridge_token() -> Weight { - (44_675_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(44_675_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_fee() -> Weight { - (51_194_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_194_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_status() -> Weight { - (50_720_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(50_720_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_cap() -> Weight { - (51_069_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_069_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn clean_cap_accumulated_value() -> Weight { - (50_332_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(50_332_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:1) @@ -223,9 +223,9 @@ impl WeightInfo for () { // Storage: Bridge BridgeTokens (r:1 w:1) // Storage: System Account (r:1 w:1) fn teleport() -> Weight { - (128_432_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(128_432_000 as u64) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:0) @@ -238,8 +238,8 @@ impl WeightInfo for () { // Storage: System Account (r:2 w:1) // Storage: Assets Metadata (r:1 w:0) fn materialize() -> Weight { - (209_544_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(11 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(209_544_000 as u64) + .saturating_add(RocksDbWeight::get().reads(11 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } } diff --git a/pallets/crowdloans/Cargo.toml b/pallets/crowdloans/Cargo.toml index 4325307c5..cd91858b7 100644 --- a/pallets/crowdloans/Cargo.toml +++ b/pallets/crowdloans/Cargo.toml @@ -9,46 +9,46 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', features = ['max-encoded-len'], default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } pallet-xcm-helper = { path = '../xcm-helper', default-features = false } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } parallel-support = { path = '../../support', default-features = false } [dev-dependencies] -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -kusama-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', features = ['runtime-benchmarks'] } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +kusama-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', features = ['runtime-benchmarks'] } orml-traits = { version = '0.4.1-dev' } orml-xcm-support = { version = '0.4.1-dev' } orml-xtokens = { version = '0.4.1-dev' } -pallet-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } +pallet-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } serde = { version = '1.0.136' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } bytes = { version = "1.1.0"} [features] diff --git a/pallets/crowdloans/src/benchmarking.rs b/pallets/crowdloans/src/benchmarking.rs index 023ba84f9..05da5848b 100644 --- a/pallets/crowdloans/src/benchmarking.rs +++ b/pallets/crowdloans/src/benchmarking.rs @@ -15,7 +15,7 @@ use sp_std::prelude::*; use xcm::latest::prelude::*; const XCM_WEIGHT_FEE: XcmWeightFeeMisc = XcmWeightFeeMisc { - weight: 3_000_000_000, + weight: Weight::from_ref_time(3_000_000_000), fee: 50000000000u128, }; const CONTRIBUTE_AMOUNT: u128 = 20000000000000u128; @@ -28,7 +28,7 @@ const LEASE_END: u32 = 7; const END_BLOCK: u32 = 1_000_000_000u32; const START_TRIE_INDEX: u32 = 0; -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } @@ -87,7 +87,7 @@ benchmarks! { where_clause { where T: pallet_assets::Config + pallet_xcm_helper::Config, - ::Origin: From + ::RuntimeOrigin: From } create_vault { diff --git a/pallets/crowdloans/src/lib.rs b/pallets/crowdloans/src/lib.rs index 1a998a023..cd3ae6171 100644 --- a/pallets/crowdloans/src/lib.rs +++ b/pallets/crowdloans/src/lib.rs @@ -102,17 +102,17 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + pallet_xcm::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Assets for deposit/withdraw assets to/from crowdloan account type Assets: Transfer + Inspect + Mutate; - type Origin: IsType<::Origin> - + Into::Origin>>; + type RuntimeOrigin: IsType<::RuntimeOrigin> + + Into::RuntimeOrigin>>; - type Call: IsType<::Call> + From>; + type RuntimeCall: IsType<::RuntimeCall> + From>; /// Returns the parachain ID we are running with. #[pallet::constant] @@ -150,34 +150,36 @@ pub mod pallet { type LeasePerYear: Get; /// The origin which can update global proxy address - type ProxyOrigin: EnsureOrigin<::Origin>; + type ProxyOrigin: EnsureOrigin<::RuntimeOrigin>; /// The origin which can migrate pending contribution - type MigrateOrigin: EnsureOrigin<::Origin>; + type MigrateOrigin: EnsureOrigin<::RuntimeOrigin>; /// The origin which can set vrf flag - type VrfOrigin: EnsureOrigin<::Origin>; + type VrfOrigin: EnsureOrigin<::RuntimeOrigin>; /// The origin which can create vault - type CreateOrigin: EnsureOrigin<::Origin>; + type CreateOrigin: EnsureOrigin<::RuntimeOrigin>; /// The origin which can refund - type RefundOrigin: EnsureOrigin<::Origin>; + type RefundOrigin: EnsureOrigin<::RuntimeOrigin>; /// The origin which can dissolve vault - type DissolveOrigin: EnsureOrigin<::Origin>; + type DissolveOrigin: EnsureOrigin<::RuntimeOrigin>; /// The origin which can update vault - type UpdateOrigin: EnsureOrigin<::Origin>; + type UpdateOrigin: EnsureOrigin<::RuntimeOrigin>; /// The origin which can close/reopen vault - type OpenCloseOrigin: EnsureOrigin<::Origin>; + type OpenCloseOrigin: EnsureOrigin<::RuntimeOrigin>; /// The origin which can call auction failed/succeeded - type AuctionSucceededFailedOrigin: EnsureOrigin<::Origin>; + type AuctionSucceededFailedOrigin: EnsureOrigin< + ::RuntimeOrigin, + >; /// The origin which can call slot expired - type SlotExpiredOrigin: EnsureOrigin<::Origin>; + type SlotExpiredOrigin: EnsureOrigin<::RuntimeOrigin>; /// Approved automation group for Phase Transition, Vrf, VaultCreation, VaultUpdate, Refund and Dissolve type Members: SortedMembers; @@ -998,7 +1000,7 @@ pub mod pallet { query_id: QueryId, response: Response, ) -> DispatchResultWithPostInfo { - let responder = ensure_response(::Origin::from(origin))?; + let responder = ensure_response(::RuntimeOrigin::from(origin))?; if let Response::ExecutionResult(res) = response { if let Some(request) = Self::xcm_request(&query_id) { Self::do_notification_received(query_id, request, res)?; @@ -1222,8 +1224,8 @@ pub mod pallet { .ok_or(ArithmeticError::Overflow) } - fn notify_placeholder() -> ::Call { - ::Call::from(Call::::notification_received { + fn notify_placeholder() -> ::RuntimeCall { + ::RuntimeCall::from(Call::::notification_received { query_id: Default::default(), response: Default::default(), }) diff --git a/pallets/crowdloans/src/mock.rs b/pallets/crowdloans/src/mock.rs index 79ce758bc..6ec6634e9 100644 --- a/pallets/crowdloans/src/mock.rs +++ b/pallets/crowdloans/src/mock.rs @@ -80,12 +80,12 @@ impl BlockNumberProvider for MockBlockNumberProvider { } parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND / 4; - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND / 4; + pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); + pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = ParachainInfo; type DmpMessageHandler = DmpQueue; @@ -101,7 +101,7 @@ impl parachain_info::Config for Test {} parameter_types! { pub RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayCurrency: CurrencyId = DOT; - pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); } @@ -112,15 +112,15 @@ pub type LocationToAccountId = ( ); pub type XcmOriginToCallOrigin = ( - SovereignSignedViaLocation, - RelayChainAsNative, - SiblingParachainAsNative, - SignedAccountId32AsNative, - XcmPassthrough, + SovereignSignedViaLocation, + RelayChainAsNative, + SiblingParachainAsNative, + SignedAccountId32AsNative, + XcmPassthrough, ); parameter_types! { - pub const UnitWeightCost: Weight = 1; + pub const UnitWeightCost: u64 = 1; pub DotPerSecond: (AssetId, u128) = (AssetId::Concrete(MultiLocation::parent()), 1); } @@ -155,7 +155,7 @@ pub type Barrier = AllowUnpaidExecutionFrom; pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = XcmOriginToCallOrigin; @@ -163,7 +163,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = (); type SubscriptionService = PolkadotXcm; @@ -175,17 +175,23 @@ type KusamaXcmOriginToCallOrigin = ( // A `Signed` origin of the sovereign account that the original location controls. SovereignSignedViaLocation< kusama_runtime::xcm_config::SovereignAccountOf, - kusama_runtime::Origin, + kusama_runtime::RuntimeOrigin, >, // A child parachain, natively expressed, has the `Parachain` origin. - ChildParachainAsNative, + ChildParachainAsNative< + polkadot_runtime_parachains::origin::Origin, + kusama_runtime::RuntimeOrigin, + >, // The AccountId32 location type can be expressed natively as a `Signed` origin. - SignedAccountId32AsNative, + SignedAccountId32AsNative< + kusama_runtime::xcm_config::KusamaNetwork, + kusama_runtime::RuntimeOrigin, + >, // A system child parachain, expressed as a Superuser, converts to the `Root` origin. - ChildSystemParachainAsSuperuser, + ChildSystemParachainAsSuperuser, ); -pub type KusamaCall = kusama_runtime::Call; +pub type KusamaCall = kusama_runtime::RuntimeCall; pub type KusamaLocalAssetTransactor = kusama_runtime::xcm_config::LocalAssetTransactor; // pub type KusamaXcmOriginToCallOrigin = kusama_runtime::LocalOriginConverter; // pub type KusamaLocationInverter = kusama_runtime::LocationInverter; @@ -195,7 +201,7 @@ pub type KusamaXcmPallet = kusama_runtime::XcmPallet; pub struct RelayXcmConfig; impl Config for RelayXcmConfig { - type Call = KusamaCall; + type RuntimeCall = KusamaCall; type XcmSender = RelayChainXcmRouter; type AssetTransactor = KusamaLocalAssetTransactor; type OriginConverter = KusamaXcmOriginToCallOrigin; @@ -211,12 +217,14 @@ impl Config for RelayXcmConfig { type AssetClaims = KusamaXcmPallet; } -pub struct SystemParachainAsSuperuser(PhantomData); -impl ConvertOrigin for SystemParachainAsSuperuser { +pub struct SystemParachainAsSuperuser(PhantomData); +impl ConvertOrigin + for SystemParachainAsSuperuser +{ fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); if kind == OriginKind::Superuser && matches!( @@ -227,7 +235,7 @@ impl ConvertOrigin for SystemParachainAsSuperuser ConvertOrigin for SystemParachainAsSuperuser; type ExecuteOverweightOrigin = EnsureRoot; type ChannelInfo = ParachainSystem; type VersionWrapper = (); type ControllerOrigin = EnsureRoot; - type ControllerOriginConverter = SystemParachainAsSuperuser; + type ControllerOriginConverter = SystemParachainAsSuperuser; type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; } impl cumulus_pallet_dmp_queue::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRoot; } impl cumulus_pallet_xcm::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Test { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type Origin = Origin; - type Call = Call; - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } @@ -341,7 +349,7 @@ impl Convert for AccountIdToMultiLocation { parameter_types! { pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); - pub const BaseXcmWeight: Weight = 100_000_000; + pub const BaseXcmWeight: u64 = 100_000_000; pub const MaxInstructions: u32 = 100; pub const MaxAssetsForTransfer: usize = 2; } @@ -353,14 +361,14 @@ parameter_type_with_key! { } impl orml_xtokens::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; type AccountIdToMultiLocation = AccountIdToMultiLocation; type SelfLocation = SelfLocation; type XcmExecutor = XcmExecutor; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; @@ -385,8 +393,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = Index; type BlockNumber = BlockNumber; type Hash = H256; @@ -394,7 +402,7 @@ impl frame_system::Config for Test { type AccountId = AccountId; type Lookup = AccountIdLookup; type Header = generic::Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -415,7 +423,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -488,9 +496,9 @@ pub type SlotExpiredOrigin = EitherOfDiverse, EnsureSignedBy>; impl crate::Config for Test { - type Event = Event; - type Origin = Origin; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type PalletId = CrowdloansPalletId; type SelfParaId = SelfParaId; type Assets = Assets; @@ -542,7 +550,7 @@ parameter_types! { } impl pallet_xcm_helper::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRoot; type Assets = Assets; type XcmSender = XcmRouter; @@ -566,7 +574,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -614,25 +622,29 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { .unwrap(); let xcm_weight_fee_misc = XcmWeightFeeMisc { - weight: 3_000_000_000, + weight: Weight::from_ref_time(3_000_000_000u64), fee: dot(10f64), }; let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { - Assets::force_create(Origin::root(), DOT, Id(ALICE), true, 1).unwrap(); - Assets::force_create(Origin::root(), SDOT, Id(ALICE), true, 1).unwrap(); - Assets::mint(Origin::signed(ALICE), DOT, Id(ALICE), dot(100f64)).unwrap(); - Assets::mint(Origin::signed(ALICE), SDOT, Id(ALICE), dot(100f64)).unwrap(); + Assets::force_create(RuntimeOrigin::root(), DOT, Id(ALICE), true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SDOT, Id(ALICE), true, 1).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), DOT, Id(ALICE), dot(100f64)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), SDOT, Id(ALICE), dot(100f64)).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), DOT, Id(XcmHelper::account_id()), dot(30f64), ) .unwrap(); - XcmHelper::update_xcm_weight_fee(Origin::root(), XcmCall::AddMemo, xcm_weight_fee_misc) - .unwrap(); + XcmHelper::update_xcm_weight_fee( + RuntimeOrigin::root(), + XcmCall::AddMemo, + xcm_weight_fee_misc, + ) + .unwrap(); }); ext @@ -672,7 +684,7 @@ pub type RelayCrowdloan = polkadot_runtime_common::crowdloan::Pallet; pub type RelayCrowdloanEvent = polkadot_runtime_common::crowdloan::Event; pub type RelaySystem = frame_system::Pallet; -pub type RelayEvent = kusama_runtime::Event; +pub type RelayEvent = kusama_runtime::RuntimeEvent; pub fn para_a_id() -> ParaId { ParaId::from(1) @@ -688,7 +700,7 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { .unwrap(); let xcm_weight_fee_misc = XcmWeightFeeMisc { - weight: 3_000_000_000, + weight: Weight::from_ref_time(3_000_000_000u64), fee: dot(10f64), }; @@ -704,19 +716,29 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { System::set_block_number(1); - Assets::force_create(Origin::root(), DOT, Id(ALICE), true, 1).unwrap(); - Assets::force_create(Origin::root(), SDOT, Id(ALICE), true, 1).unwrap(); - Assets::mint(Origin::signed(ALICE), DOT, Id(ALICE), dot(100_000f64)).unwrap(); - Assets::mint(Origin::signed(ALICE), SDOT, Id(ALICE), dot(100f64)).unwrap(); + Assets::force_create(RuntimeOrigin::root(), DOT, Id(ALICE), true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SDOT, Id(ALICE), true, 1).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + DOT, + Id(ALICE), + dot(100_000f64), + ) + .unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), SDOT, Id(ALICE), dot(100f64)).unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), DOT, Id(XcmHelper::account_id()), dot(30f64), ) .unwrap(); - XcmHelper::update_xcm_weight_fee(Origin::root(), XcmCall::AddMemo, xcm_weight_fee_misc) - .unwrap(); + XcmHelper::update_xcm_weight_fee( + RuntimeOrigin::root(), + XcmCall::AddMemo, + xcm_weight_fee_misc, + ) + .unwrap(); }); ext diff --git a/pallets/crowdloans/src/tests.rs b/pallets/crowdloans/src/tests.rs index 365167e8d..0ad464f2e 100644 --- a/pallets/crowdloans/src/tests.rs +++ b/pallets/crowdloans/src/tests.rs @@ -40,39 +40,39 @@ fn create_new_vault_should_work() { assert_noop!( Crowdloans::create_vault( - Origin::signed(EVE), // origin - crowdloan, // crowdloan - ctoken, // ctoken - LEASE_START, // lease_start - LEASE_END, // lease_end - contribution_strategy, // contribution_strategy - cap, // cap - end_block // end_block + RuntimeOrigin::signed(EVE), // origin + crowdloan, // crowdloan + ctoken, // ctoken + LEASE_START, // lease_start + LEASE_END, // lease_end + contribution_strategy, // contribution_strategy + cap, // cap + end_block // end_block ), DispatchError::BadOrigin ); assert_ok!(Crowdloans::create_vault( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - ctoken, // ctoken - LEASE_START, // lease_start - LEASE_END, // lease_end - contribution_strategy, // contribution_strategy - cap, // cap - end_block // end_block + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + ctoken, // ctoken + LEASE_START, // lease_start + LEASE_END, // lease_end + contribution_strategy, // contribution_strategy + cap, // cap + end_block // end_block )); assert_noop!( Crowdloans::create_vault( - Origin::signed(CHARLIE), // origin - crowdloan, // crowdloan - ctoken, // ctoken - LEASE_START, // lease_start - LEASE_END, // lease_end - contribution_strategy, // contribution_strategy - cap, // cap - end_block // end_block + RuntimeOrigin::signed(CHARLIE), // origin + crowdloan, // crowdloan + ctoken, // ctoken + LEASE_START, // lease_start + LEASE_END, // lease_end + contribution_strategy, // contribution_strategy + cap, // cap + end_block // end_block ), Error::::VaultAlreadyExists ); @@ -115,7 +115,7 @@ fn create_new_vault_should_not_work_if_ctoken_is_different() { )); Assets::mint( - Origin::signed(Crowdloans::account_id()), + RuntimeOrigin::signed(Crowdloans::account_id()), ctoken, Id(ALICE), dot(100f64), @@ -319,9 +319,9 @@ fn set_vrf_should_work() { // do contribute assert_noop!( Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount Vec::new() ), Error::::VrfDelayInProgress @@ -329,9 +329,9 @@ fn set_vrf_should_work() { assert_noop!( Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan + 1, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan + 1, // crowdloan + amount, // amount Vec::new() ), Error::::VrfDelayInProgress @@ -378,9 +378,9 @@ fn contribute_should_work() { // do contribute assert_ok!(Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount vec![12, 34], )); @@ -440,9 +440,9 @@ fn contribute_should_fail_insufficient_funds() { // do contribute assert_noop!( Crowdloans::contribute( - Origin::signed(BOB), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(BOB), // origin + crowdloan, // crowdloan + amount, // amount Vec::new() ), pallet_assets::Error::::NoAccount @@ -625,9 +625,9 @@ fn claim_failed_should_work() { // do contribute assert_ok!(Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount Vec::new() )); @@ -661,10 +661,10 @@ fn claim_failed_should_work() { // do withdraw assert_ok!(Crowdloans::withdraw( - Origin::signed(ALICE), // origin - crowdloan, // ctoken - LEASE_START, // lease_start - LEASE_END, // lease_end + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // ctoken + LEASE_START, // lease_start + LEASE_END, // lease_end )); assert_eq!(Assets::balance(DOT, ALICE), dot(100f64)); @@ -717,9 +717,9 @@ fn claim_succeed_and_expired_should_work() { // do contribute assert_ok!(Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount Vec::new() )); @@ -745,10 +745,10 @@ fn claim_succeed_and_expired_should_work() { // do claim succeed assert_ok!(Crowdloans::claim( - Origin::signed(ALICE), // origin - crowdloan, // ctoken - LEASE_START, // lease_start - LEASE_END, // lease_end + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // ctoken + LEASE_START, // lease_start + LEASE_END, // lease_end )); assert_eq!(Assets::balance(ctoken, ALICE), amount); assert_eq!(Assets::balance(DOT, ALICE), dot(100f64) - amount); @@ -775,11 +775,11 @@ fn claim_succeed_and_expired_should_work() { // do redeem expired assert_ok!(Crowdloans::redeem( - Origin::signed(ALICE), // origin - crowdloan, // ctoken - LEASE_START, // lease_start - LEASE_END, // lease_end - amount // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // ctoken + LEASE_START, // lease_start + LEASE_END, // lease_end + amount // amount )); assert_eq!(Assets::balance(ctoken, ALICE), 0u128); assert_eq!(Assets::balance(DOT, ALICE), dot(100f64)); @@ -926,7 +926,7 @@ fn xcm_contribute_should_work() { ); RelayInitializer::on_finalize(3); assert_ok!(RelayCrowdloan::create( - kusama_runtime::Origin::signed(ALICE), + kusama_runtime::RuntimeOrigin::signed(ALICE), crowdloan, amount, 0, @@ -966,9 +966,9 @@ fn xcm_contribute_should_work() { // do contribute assert_ok!(Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount Vec::new() )); @@ -1210,9 +1210,9 @@ fn refund_should_work_when_vault_phase_is_closed() { .ok(); Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount vec![], ) .ok(); @@ -1284,9 +1284,9 @@ fn claim_for_should_work() { // do contribute assert_ok!(Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount Vec::new() )); @@ -1312,11 +1312,11 @@ fn claim_for_should_work() { // do claim_for succeed assert_ok!(Crowdloans::claim_for( - Origin::signed(BOB), // origin - Id(ALICE), //dest - crowdloan, // ctoken - LEASE_START, // lease_start - LEASE_END, // lease_end + RuntimeOrigin::signed(BOB), // origin + Id(ALICE), //dest + crowdloan, // ctoken + LEASE_START, // lease_start + LEASE_END, // lease_end )); assert_eq!(Assets::balance(ctoken, ALICE), amount); assert_eq!(Assets::balance(DOT, ALICE), dot(100f64) - amount); @@ -1368,9 +1368,9 @@ fn withdraw_for_should_work() { // do contribute assert_ok!(Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount Vec::new() )); @@ -1405,11 +1405,11 @@ fn withdraw_for_should_work() { // do withdraw_for succeed assert_ok!(Crowdloans::withdraw_for( - Origin::signed(BOB), // origin - Id(ALICE), //dest - crowdloan, // ctoken - LEASE_START, // lease_start - LEASE_END, // lease_end + RuntimeOrigin::signed(BOB), // origin + Id(ALICE), //dest + crowdloan, // ctoken + LEASE_START, // lease_start + LEASE_END, // lease_end )); assert_eq!(Assets::balance(DOT, ALICE), dot(100f64)); @@ -1443,14 +1443,14 @@ fn get_ctoken_exchange_rate_should_work() { let end_lease = 13; assert_ok!(Crowdloans::create_vault( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - ctoken, // ctoken - start_lease, // lease_start - end_lease, // lease_end - contribution_strategy, // contribution_strategy - cap, // cap - end_block // end_block + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + ctoken, // ctoken + start_lease, // lease_start + end_lease, // lease_end + contribution_strategy, // contribution_strategy + cap, // cap + end_block // end_block )); let start_rate = Rate::from_inner(450_000_000_000_000_000); //set relay_block_num as 0 is invalid and will not get rate @@ -1556,14 +1556,14 @@ fn get_ctoken_exchange_rate_with_partial_lease_should_work() { let end_lease = 9; assert_ok!(Crowdloans::create_vault( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - ctoken, // ctoken - start_lease, // lease_start - end_lease, // lease_end - contribution_strategy, // contribution_strategy - cap, // cap - end_block // end_block + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + ctoken, // ctoken + start_lease, // lease_start + end_lease, // lease_end + contribution_strategy, // contribution_strategy + cap, // cap + end_block // end_block )); let start_rate = Rate::from_inner(450_000_000_000_000_000); //set relay_block_num as lease_start_block + 1 @@ -1610,14 +1610,14 @@ fn get_ctoken_exchange_rate_with_minor_input_change_should_work() { let end_lease = 13; assert_ok!(Crowdloans::create_vault( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - ctoken, // ctoken - start_lease, // lease_start - end_lease, // lease_end - contribution_strategy, // contribution_strategy - cap, // cap - end_block // end_block + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + ctoken, // ctoken + start_lease, // lease_start + end_lease, // lease_end + contribution_strategy, // contribution_strategy + cap, // cap + end_block // end_block )); let start_rate = Rate::from_inner(450_000_000_000_000_000); @@ -1714,9 +1714,9 @@ fn refund_should_work_for_single_user() { .ok(); Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount vec![], ) .ok(); @@ -1807,9 +1807,9 @@ fn xcm_proxy_contribute_should_work() { // do contribute assert_err!( Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount vec![12, 34], ), Error::::EmptyProxyAddress, @@ -1822,9 +1822,9 @@ fn xcm_proxy_contribute_should_work() { // do contribute assert_ok!(Crowdloans::contribute( - Origin::signed(ALICE), // origin - crowdloan, // crowdloan - amount, // amount + RuntimeOrigin::signed(ALICE), // origin + crowdloan, // crowdloan + amount, // amount vec![12, 34], )); diff --git a/pallets/crowdloans/src/weights.rs b/pallets/crowdloans/src/weights.rs index e5d10e9fd..43d1d5723 100644 --- a/pallets/crowdloans/src/weights.rs +++ b/pallets/crowdloans/src/weights.rs @@ -77,18 +77,18 @@ impl WeightInfo for SubstrateWeight { // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: Crowdloans NextTrieIndex (r:1 w:1) fn create_vault() -> Weight { - (80_394_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(80_394_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: ParachainSystem ValidationData (r:1 w:0) fn update_vault() -> Weight { - (65_113_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(65_113_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -110,48 +110,48 @@ impl WeightInfo for SubstrateWeight { // Storage: PolkadotXcm Queries (r:0 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - (278_975_000 as Weight) - .saturating_add(T::DbWeight::get().reads(19 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) + Weight::from_ref_time(278_975_000 as u64) + .saturating_add(T::DbWeight::get().reads(19 as u64)) + .saturating_add(T::DbWeight::get().writes(13 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn open() -> Weight { - (60_974_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(60_974_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn close() -> Weight { - (60_720_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(60_720_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans IsVrf (r:0 w:1) fn set_vrf() -> Weight { - (31_127_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_127_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn reopen() -> Weight { - (62_489_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(62_489_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn auction_succeeded() -> Weight { - (63_164_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(63_164_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -169,9 +169,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn auction_failed() -> Weight { - (193_909_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(193_909_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans CTokensRegistry (r:1 w:0) @@ -180,9 +180,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn claim() -> Weight { - (125_035_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(125_035_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -190,9 +190,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn withdraw() -> Weight { - (114_845_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(114_845_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans CTokensRegistry (r:1 w:0) @@ -200,9 +200,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:2 w:2) fn redeem() -> Weight { - (160_437_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(160_437_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -220,9 +220,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn slot_expired() -> Weight { - (190_108_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(190_108_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -243,9 +243,9 @@ impl WeightInfo for SubstrateWeight { // Storage: unknown [0x] (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn migrate_pending() -> Weight { - (303_337_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(303_337_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans XcmRequests (r:1 w:1) @@ -255,26 +255,26 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn notification_received() -> Weight { - (169_282_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(169_282_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: unknown [0x] (r:3 w:0) fn refund() -> Weight { - (148_788_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(148_788_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:1) // Storage: unknown [0x] (r:3 w:0) fn dissolve_vault() -> Weight { - (153_319_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(153_319_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -283,20 +283,20 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn refund_for() -> Weight { - (169_339_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(169_339_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } fn update_proxy() -> Weight { - (31_127_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_127_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn update_leases_bonus() -> Weight { - (31_127_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_127_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } @@ -309,18 +309,18 @@ impl WeightInfo for () { // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: Crowdloans NextTrieIndex (r:1 w:1) fn create_vault() -> Weight { - (80_394_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(80_394_000 as u64) + .saturating_add(RocksDbWeight::get().reads(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: ParachainSystem ValidationData (r:1 w:0) fn update_vault() -> Weight { - (65_113_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(65_113_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -342,48 +342,48 @@ impl WeightInfo for () { // Storage: PolkadotXcm Queries (r:0 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - (278_975_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(19 as Weight)) - .saturating_add(RocksDbWeight::get().writes(13 as Weight)) + Weight::from_ref_time(278_975_000 as u64) + .saturating_add(RocksDbWeight::get().reads(19 as u64)) + .saturating_add(RocksDbWeight::get().writes(13 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn open() -> Weight { - (60_974_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(60_974_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn close() -> Weight { - (60_720_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(60_720_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans IsVrf (r:0 w:1) fn set_vrf() -> Weight { - (31_127_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_127_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn reopen() -> Weight { - (62_489_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(62_489_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn auction_succeeded() -> Weight { - (63_164_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(63_164_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -401,9 +401,9 @@ impl WeightInfo for () { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn auction_failed() -> Weight { - (193_909_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(13 as Weight)) - .saturating_add(RocksDbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(193_909_000 as u64) + .saturating_add(RocksDbWeight::get().reads(13 as u64)) + .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans CTokensRegistry (r:1 w:0) @@ -412,9 +412,9 @@ impl WeightInfo for () { // Storage: Assets Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn claim() -> Weight { - (125_035_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(125_035_000 as u64) + .saturating_add(RocksDbWeight::get().reads(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -422,9 +422,9 @@ impl WeightInfo for () { // Storage: Assets Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn withdraw() -> Weight { - (114_845_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(114_845_000 as u64) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans CTokensRegistry (r:1 w:0) @@ -432,9 +432,9 @@ impl WeightInfo for () { // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:2 w:2) fn redeem() -> Weight { - (160_437_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(160_437_000 as u64) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -452,9 +452,9 @@ impl WeightInfo for () { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn slot_expired() -> Weight { - (190_108_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(13 as Weight)) - .saturating_add(RocksDbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(190_108_000 as u64) + .saturating_add(RocksDbWeight::get().reads(13 as u64)) + .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -475,9 +475,9 @@ impl WeightInfo for () { // Storage: unknown [0x] (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn migrate_pending() -> Weight { - (303_337_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(17 as Weight)) - .saturating_add(RocksDbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(303_337_000 as u64) + .saturating_add(RocksDbWeight::get().reads(17 as u64)) + .saturating_add(RocksDbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans XcmRequests (r:1 w:1) @@ -487,26 +487,26 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn notification_received() -> Weight { - (169_282_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(169_282_000 as u64) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: unknown [0x] (r:3 w:0) fn refund() -> Weight { - (148_788_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(148_788_000 as u64) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:1) // Storage: unknown [0x] (r:3 w:0) fn dissolve_vault() -> Weight { - (153_319_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(153_319_000 as u64) + .saturating_add(RocksDbWeight::get().reads(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -515,18 +515,18 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn refund_for() -> Weight { - (169_339_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(169_339_000 as u64) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) } fn update_proxy() -> Weight { - (31_127_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_127_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn update_leases_bonus() -> Weight { - (31_127_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_127_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } } diff --git a/pallets/currency-adapter/Cargo.toml b/pallets/currency-adapter/Cargo.toml index 8026f44a2..ad44945a0 100644 --- a/pallets/currency-adapter/Cargo.toml +++ b/pallets/currency-adapter/Cargo.toml @@ -9,11 +9,11 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', features = ['max-encoded-len'], default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [features] default = ['std'] diff --git a/pallets/currency-adapter/src/lib.rs b/pallets/currency-adapter/src/lib.rs index 43f87e5ee..f095ed106 100644 --- a/pallets/currency-adapter/src/lib.rs +++ b/pallets/currency-adapter/src/lib.rs @@ -65,7 +65,7 @@ pub mod pallet { type GetNativeCurrencyId: Get>; // Origin which can lock asset balance - type LockOrigin: EnsureOrigin<::Origin>; + type LockOrigin: EnsureOrigin<::RuntimeOrigin>; } #[pallet::pallet] diff --git a/pallets/emergency-shutdown/Cargo.toml b/pallets/emergency-shutdown/Cargo.toml index 992b73286..a6858931e 100644 --- a/pallets/emergency-shutdown/Cargo.toml +++ b/pallets/emergency-shutdown/Cargo.toml @@ -9,16 +9,16 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', features = ['max-encoded-len'], default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } [features] default = ['std'] diff --git a/pallets/emergency-shutdown/src/lib.rs b/pallets/emergency-shutdown/src/lib.rs index 23199734f..ac0d1198d 100644 --- a/pallets/emergency-shutdown/src/lib.rs +++ b/pallets/emergency-shutdown/src/lib.rs @@ -41,17 +41,17 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// This can be used by the runtime to define which calls should be allowed in an emergency shutdown state. - type Whitelist: Contains<::Call>; + type Whitelist: Contains<::RuntimeCall>; /// The origin which can shutdown. - type ShutdownOrigin: EnsureOrigin; + type ShutdownOrigin: EnsureOrigin; /// The overarching call type. - type Call: Parameter - + Dispatchable + type RuntimeCall: Parameter + + Dispatchable + GetDispatchInfo + From>; } @@ -84,7 +84,7 @@ pub mod pallet { #[pallet::call] impl Pallet { /// Toggle the shutdown flag - #[pallet::weight(10_000 + T::DbWeight::get().writes(1))] + #[pallet::weight(Weight::from_ref_time(10_000).saturating_add(T::DbWeight::get().writes(1)))] pub fn toggle_pallet(origin: OriginFor, pallet_idx: u8) -> DispatchResult { T::ShutdownOrigin::ensure_origin(origin)?; @@ -96,7 +96,7 @@ pub mod pallet { Ok(()) } - #[pallet::weight(10_000 + T::DbWeight::get().writes(1))] + #[pallet::weight(Weight::from_ref_time(10_000).saturating_add(T::DbWeight::get().writes(1)))] pub fn toggle_call(origin: OriginFor, pallet_idx: u8, call_idx: u8) -> DispatchResult { T::ShutdownOrigin::ensure_origin(origin)?; @@ -110,8 +110,8 @@ pub mod pallet { } } -impl EmergencyCallFilter<::Call> for Pallet { - fn contains(call: &::Call) -> bool { +impl EmergencyCallFilter<::RuntimeCall> for Pallet { + fn contains(call: &::RuntimeCall) -> bool { let (pallet_idx, call_idx): (u8, u8) = call .using_encoded(|mut bytes| Decode::decode(&mut bytes)) .expect( diff --git a/pallets/emergency-shutdown/src/mock.rs b/pallets/emergency-shutdown/src/mock.rs index 7064be5f7..11faaf52f 100644 --- a/pallets/emergency-shutdown/src/mock.rs +++ b/pallets/emergency-shutdown/src/mock.rs @@ -29,15 +29,15 @@ parameter_types! { } pub struct BaseCallFilter; -impl Contains for BaseCallFilter { - fn contains(c: &Call) -> bool { +impl Contains for BaseCallFilter { + fn contains(c: &RuntimeCall) -> bool { EmergencyShutdown::contains(c) } } pub struct WhiteListFilter; -impl Contains for WhiteListFilter { - fn contains(_c: &Call) -> bool { +impl Contains for WhiteListFilter { + fn contains(_c: &RuntimeCall) -> bool { false } } @@ -47,8 +47,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -56,7 +56,7 @@ impl frame_system::Config for Test { type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -70,10 +70,10 @@ impl frame_system::Config for Test { } impl pallet_emergency_shutdown::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Whitelist = WhiteListFilter; type ShutdownOrigin = EnsureRoot; - type Call = Call; + type RuntimeCall = RuntimeCall; } // Build genesis storage according to the mock runtime. diff --git a/pallets/emergency-shutdown/src/tests.rs b/pallets/emergency-shutdown/src/tests.rs index ffe65b920..fb2c46036 100644 --- a/pallets/emergency-shutdown/src/tests.rs +++ b/pallets/emergency-shutdown/src/tests.rs @@ -6,7 +6,7 @@ use frame_support::{assert_noop, assert_ok, dispatch::*}; fn toggle_call_works() { new_test_ext().execute_with(|| { let remark = "test".as_bytes().to_vec(); - let call = Call::System(frame_system::Call::remark { remark }); + let call = RuntimeCall::System(frame_system::Call::remark { remark }); let (pallet_idx, call_idx): (u8, u8) = call .using_encoded(|mut bytes| Decode::decode(&mut bytes)) @@ -18,7 +18,7 @@ fn toggle_call_works() { false ); assert_ok!(EmergencyShutdown::toggle_call( - Origin::root(), + RuntimeOrigin::root(), pallet_idx.clone(), call_idx.clone() )); @@ -27,7 +27,7 @@ fn toggle_call_works() { true ); assert_ok!(EmergencyShutdown::toggle_call( - Origin::root(), + RuntimeOrigin::root(), pallet_idx.clone(), call_idx.clone() )); @@ -48,7 +48,7 @@ fn toggle_pallet_works() { false ); assert_ok!(EmergencyShutdown::toggle_pallet( - Origin::root(), + RuntimeOrigin::root(), pallet_idx.clone() )); assert_eq!( @@ -56,7 +56,7 @@ fn toggle_pallet_works() { true ); assert_ok!(EmergencyShutdown::toggle_pallet( - Origin::root(), + RuntimeOrigin::root(), pallet_idx.clone() )); assert_eq!(EmergencyShutdown::disabled_pallets(pallet_idx), false); @@ -73,25 +73,28 @@ fn call_filter_works() { false ); assert_ok!(EmergencyShutdown::toggle_pallet( - Origin::root(), + RuntimeOrigin::root(), pallet_idx.clone() )); let remark = "test".as_bytes().to_vec(); - let call = Call::System(frame_system::Call::remark { remark }); + let call = RuntimeCall::System(frame_system::Call::remark { remark }); // When emergency shutdown toggle is on assert_eq!( EmergencyShutdown::disabled_pallets(pallet_idx.clone()), true ); assert_noop!( - call.clone().dispatch(Origin::signed(1)), + call.clone().dispatch(RuntimeOrigin::signed(1)), frame_system::Error::::CallFiltered, ); // When emergency shutdown toggle is off - assert_ok!(EmergencyShutdown::toggle_pallet(Origin::root(), pallet_idx)); + assert_ok!(EmergencyShutdown::toggle_pallet( + RuntimeOrigin::root(), + pallet_idx + )); - assert_ok!(call.dispatch(Origin::signed(1))); + assert_ok!(call.dispatch(RuntimeOrigin::signed(1))); }); } diff --git a/pallets/evm-signatures/Cargo.toml b/pallets/evm-signatures/Cargo.toml index c86120724..928736934 100644 --- a/pallets/evm-signatures/Cargo.toml +++ b/pallets/evm-signatures/Cargo.toml @@ -6,14 +6,14 @@ version = '1.9.2' [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } scale-info = { version = "2.1.0", default-features = false, features = ["derive"] } serde = { version = "1.0.140", features = ["derive"], optional = true } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } pallet-evm = { version = '6.0.0-dev', default-features = false } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } @@ -21,10 +21,10 @@ primitives = { package = 'parallel-primitives', path = '../../primitives', defau [dev-dependencies] hex-literal = "0.3.4" libsecp256k1 = "0.7.0" -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } [features] default = ["std"] diff --git a/pallets/evm-signatures/src/lib.rs b/pallets/evm-signatures/src/lib.rs index 02fcf372e..32d44a5df 100644 --- a/pallets/evm-signatures/src/lib.rs +++ b/pallets/evm-signatures/src/lib.rs @@ -27,6 +27,7 @@ mod tests; pub mod pallet { use super::*; use frame_support::{ + dispatch::GetDispatchInfo, pallet_prelude::*, traits::{ tokens::{ @@ -37,7 +38,6 @@ pub mod pallet { WithdrawReasons, }, transactional, - weights::GetDispatchInfo, }; use frame_system::{ensure_none, pallet_prelude::*}; use pallet_evm::{AddressMapping, EnsureAddressOrigin}; @@ -63,10 +63,12 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// A signable call. - type Call: Parameter + UnfilteredDispatchable + GetDispatchInfo; + type RuntimeCall: Parameter + + UnfilteredDispatchable + + GetDispatchInfo; /// User defined signature type. type Signature: Parameter + Verify + TryFrom>; @@ -97,7 +99,7 @@ pub mod pallet { type UnsignedPriority: Get; /// Allow the origin to withdraw on behalf of given address. - type WithdrawOrigin: EnsureAddressOrigin; + type WithdrawOrigin: EnsureAddressOrigin; /// Enable signature verify or not #[pallet::constant] @@ -144,11 +146,11 @@ pub mod pallet { /// # #[pallet::weight({ let dispatch_info = call.get_dispatch_info(); - (dispatch_info.weight.saturating_add(10_000_000), dispatch_info.class) + (Weight::from_ref_time(10_000_000).saturating_add(dispatch_info.weight), dispatch_info.class) })] pub fn call( origin: OriginFor, - call: Box<::Call>, + call: Box<::RuntimeCall>, signer: T::AccountId, signature: Vec, #[pallet::compact] nonce: T::Index, @@ -211,7 +213,7 @@ pub mod pallet { impl Pallet { /// Verify custom signature and returns `true` if correct. pub fn valid_signature( - call: &::Call, + call: &::RuntimeCall, signer: &T::AccountId, signature: &T::Signature, nonce: &T::Index, diff --git a/pallets/evm-signatures/src/tests.rs b/pallets/evm-signatures/src/tests.rs index 151bf19bf..e82f69af3 100644 --- a/pallets/evm-signatures/src/tests.rs +++ b/pallets/evm-signatures/src/tests.rs @@ -57,17 +57,17 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type BaseCallFilter = frame_support::traits::Everything; type Index = u32; type BlockNumber = BlockNumber; - type Call = Call; + type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -89,7 +89,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = frame_system::Pallet; @@ -109,7 +109,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -134,8 +134,8 @@ parameter_types! { } impl Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Signature = ethereum::EthereumSignature; type Signer = ::Signer; type CallMagicNumber = CallMagicNumber; @@ -203,7 +203,7 @@ fn invalid_signature() { let signature = Vec::from(&hex!["dd0992d40e5cdf99db76bed162808508ac65acd7ae2fdc8573594f03ed9c939773e813181788fc02c3c68f3fdc592759b35f6354484343e18cb5317d34dab6c61b"][..]); new_test_ext().execute_with(|| { assert_err!( - EVMSignatures::call(Origin::none(), Box::new(call), bob, signature, 0), + EVMSignatures::call(RuntimeOrigin::none(), Box::new(call), bob, signature, 0), Error::::InvalidSignature, ); }); @@ -218,7 +218,7 @@ fn balance_transfer() { let alice: ::AccountId = Keyring::Alice.into(); assert_eq!(System::account(alice.clone()).data.free, 0); - let call: Call = pallet_balances::Call::::transfer { + let call: RuntimeCall = pallet_balances::Call::::transfer { dest: alice.clone(), value: 1_000, } @@ -228,7 +228,7 @@ fn balance_transfer() { assert_eq!(System::account(account.clone()).nonce, 0); assert_ok!(EVMSignatures::call( - Origin::none(), + RuntimeOrigin::none(), Box::new(call.clone()), account.clone(), signature, @@ -241,7 +241,7 @@ fn balance_transfer() { let signature = eth_sign(&ECDSA_SEED, payload.encode().as_ref()).into(); assert_err!( EVMSignatures::call( - Origin::none(), + RuntimeOrigin::none(), Box::new(call.clone()), account.clone(), signature, @@ -254,7 +254,7 @@ fn balance_transfer() { let signature = eth_sign(&ECDSA_SEED, payload.encode().as_ref()).into(); assert_eq!(System::account(account.clone()).nonce, 1); assert_ok!(EVMSignatures::call( - Origin::none(), + RuntimeOrigin::none(), Box::new(call.clone()), account.clone(), signature, @@ -281,7 +281,7 @@ fn call_fixtures() { let dest = AccountId::from_ss58check("5GVwcV6EzxxYbXBm7H6dtxc9TCgL4oepMXtgqWYEc3VXJoaf").unwrap(); - let call: Call = pallet_balances::Call::::transfer { dest, value: 1000 }.into(); + let call: RuntimeCall = pallet_balances::Call::::transfer { dest, value: 1000 }.into(); assert_eq!( call.encode(), hex!["0000c4305fb88b6ccb43d6552dc11d18e7b0ee3185247adcc6e885eb284adf6c563da10f"], diff --git a/pallets/evm-signatures/src/weights.rs b/pallets/evm-signatures/src/weights.rs index 0a7ac13c3..a1d10bbcf 100644 --- a/pallets/evm-signatures/src/weights.rs +++ b/pallets/evm-signatures/src/weights.rs @@ -31,14 +31,14 @@ pub trait WeightInfo { pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn withdraw() -> Weight { - (92_361_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(92_361_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } } impl WeightInfo for () { fn withdraw() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } } diff --git a/pallets/farming/Cargo.toml b/pallets/farming/Cargo.toml index f4748ba48..a34453abf 100644 --- a/pallets/farming/Cargo.toml +++ b/pallets/farming/Cargo.toml @@ -9,23 +9,23 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', features = ['max-encoded-len'], default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } num-traits = { default-features = false, version = '0.2' } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } serde = { version = '1.0.136', features = ['derive'], optional = true } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [dev-dependencies] -pallet-balances = { branch = 'polkadot-v0.9.28', git = 'https://github.com/paritytech/substrate.git' } +pallet-balances = { branch = 'polkadot-v0.9.32', git = 'https://github.com/paritytech/substrate.git' } pallet-currency-adapter = { path = '../currency-adapter' } -sp-core = { branch = 'polkadot-v0.9.28', git = 'https://github.com/paritytech/substrate.git' } +sp-core = { branch = 'polkadot-v0.9.32', git = 'https://github.com/paritytech/substrate.git' } [features] default = ['std'] diff --git a/pallets/farming/src/benchmarking.rs b/pallets/farming/src/benchmarking.rs index 9ffcb02bc..785e6f487 100644 --- a/pallets/farming/src/benchmarking.rs +++ b/pallets/farming/src/benchmarking.rs @@ -20,7 +20,7 @@ const REWARD_AMOUNT: u128 = 2_000_000_000_000_000; const SHOULD_REWARD_AMOUNT: u128 = 200_000_000_000_000; const WITHDRAW_AMOUNT: u128 = 1_000_000_000_000_000; -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } diff --git a/pallets/farming/src/lib.rs b/pallets/farming/src/lib.rs index 6281ace51..5456e4b52 100644 --- a/pallets/farming/src/lib.rs +++ b/pallets/farming/src/lib.rs @@ -66,7 +66,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Currency type for deposit/withdraw assets to/from plm /// module @@ -85,7 +85,7 @@ pub mod pallet { type Decimal: DecimalProvider; /// The origin which can create new pools and add reward. - type UpdateOrigin: EnsureOrigin; + type UpdateOrigin: EnsureOrigin; /// Specifies max amount lock item for a user #[pallet::constant] diff --git a/pallets/farming/src/mock.rs b/pallets/farming/src/mock.rs index 5bb670574..bb19c2b5a 100644 --- a/pallets/farming/src/mock.rs +++ b/pallets/farming/src/mock.rs @@ -55,8 +55,8 @@ impl system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -64,7 +64,7 @@ impl system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -85,7 +85,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -104,7 +104,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -142,7 +142,7 @@ impl DecimalProvider for Decimal { impl pallet_farming::Config for Test { type UpdateOrigin = EnsureRoot; type WeightInfo = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = FarmingPalletId; type MaxUserLockItemsCount = MaxUserLockItemsCount; @@ -175,11 +175,25 @@ pub fn new_test_ext() -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { - Assets::force_create(Origin::root(), STAKE_TOKEN, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), REWARD_TOKEN, REWARD_TOKEN_PAYER, true, 1).unwrap(); - Assets::force_create(Origin::root(), BIG_DECIMAL_STAKE_TOKEN, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), STAKE_TOKEN, ALICE, true, 1).unwrap(); Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), + REWARD_TOKEN, + REWARD_TOKEN_PAYER, + true, + 1, + ) + .unwrap(); + Assets::force_create( + RuntimeOrigin::root(), + BIG_DECIMAL_STAKE_TOKEN, + ALICE, + true, + 1, + ) + .unwrap(); + Assets::force_create( + RuntimeOrigin::root(), BIG_DECIMAL_REWARD_TOKEN, REWARD_TOKEN_PAYER, true, @@ -187,31 +201,37 @@ pub fn new_test_ext() -> sp_io::TestExternalities { ) .unwrap(); - Assets::mint(Origin::signed(ALICE), STAKE_TOKEN, ALICE, 500_000_000).unwrap(); - Assets::mint(Origin::signed(ALICE), STAKE_TOKEN, BOB, 500_000_000).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + STAKE_TOKEN, + ALICE, + 500_000_000, + ) + .unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), STAKE_TOKEN, BOB, 500_000_000).unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), STAKE_TOKEN, CHARLIE, 1_100_000_000_000_000, ) .unwrap(); Assets::mint( - Origin::signed(REWARD_TOKEN_PAYER), + RuntimeOrigin::signed(REWARD_TOKEN_PAYER), REWARD_TOKEN, REWARD_TOKEN_PAYER, 3_000_000_000_000_000, ) .unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BIG_DECIMAL_STAKE_TOKEN, ALICE, 100_000_000_000_000_000_000_000_000, ) .unwrap(); Assets::mint( - Origin::signed(REWARD_TOKEN_PAYER), + RuntimeOrigin::signed(REWARD_TOKEN_PAYER), BIG_DECIMAL_REWARD_TOKEN, REWARD_TOKEN_PAYER, 11_000_000_000_000_000_000_000_000_000_000, @@ -219,7 +239,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities { .unwrap(); Farming::create( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -229,7 +249,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities { let pool_info = Farming::pools((STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION)).unwrap(); assert_eq!(pool_info.is_active, false); Farming::set_pool_status( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, diff --git a/pallets/farming/src/tests.rs b/pallets/farming/src/tests.rs index 98dbb24d1..41f10fea2 100644 --- a/pallets/farming/src/tests.rs +++ b/pallets/farming/src/tests.rs @@ -8,25 +8,37 @@ fn pool_create_work() { new_test_ext().execute_with(|| { // 1, create pool already exists assert_noop!( - Farming::create(Origin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, 50,), + Farming::create( + RuntimeOrigin::root(), + STAKE_TOKEN, + REWARD_TOKEN, + LOCK_DURATION, + 50, + ), Error::::PoolAlreadyExists, ); // 2, create pool with a invalid lock duration assert_noop!( - Farming::create(Origin::root(), EHKO, REWARD_TOKEN, 2628001, 50,), + Farming::create(RuntimeOrigin::root(), EHKO, REWARD_TOKEN, 2628001, 50,), Error::::ExcessMaxLockDuration, ); // 3, create pool with a invalid lock duration assert_noop!( - Farming::create(Origin::root(), EHKO, REWARD_TOKEN, LOCK_DURATION, 60000,), + Farming::create( + RuntimeOrigin::root(), + EHKO, + REWARD_TOKEN, + LOCK_DURATION, + 60000, + ), Error::::ExcessMaxCoolDownDuration, ); // 4, can create a pool with different staking token assert_ok!(Farming::create( - Origin::root(), + RuntimeOrigin::root(), EHKO, REWARD_TOKEN, LOCK_DURATION, @@ -35,7 +47,7 @@ fn pool_create_work() { // 5, can create a pool with different reward token assert_ok!(Farming::create( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, STAKE_TOKEN, LOCK_DURATION, @@ -44,7 +56,7 @@ fn pool_create_work() { // 6, can create a pool with different lock duration assert_ok!(Farming::create( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, 30, @@ -66,7 +78,7 @@ fn pool_status_work() { )); assert_ok!(Farming::set_pool_status( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -87,14 +99,20 @@ fn pool_status_work() { // 3, can not set status for a pool which not exists assert_noop!( - Farming::set_pool_status(Origin::root(), EHKO, REWARD_TOKEN, LOCK_DURATION, false,), + Farming::set_pool_status( + RuntimeOrigin::root(), + EHKO, + REWARD_TOKEN, + LOCK_DURATION, + false, + ), Error::::PoolDoesNotExist, ); // 4, can not set status with current status assert_noop!( Farming::set_pool_status( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -111,7 +129,7 @@ fn pool_cool_down_duration_work() { // 1, can not set cool down duration for a pool which not exists assert_noop!( Farming::set_pool_cool_down_duration( - Origin::root(), + RuntimeOrigin::root(), EHKO, REWARD_TOKEN, LOCK_DURATION, @@ -123,7 +141,7 @@ fn pool_cool_down_duration_work() { // 2, can not set cool down duration with current lock duration assert_noop!( Farming::set_pool_cool_down_duration( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -135,7 +153,7 @@ fn pool_cool_down_duration_work() { // 3, can not set cool down duration with a invalid cool down duration assert_noop!( Farming::set_pool_cool_down_duration( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -180,7 +198,7 @@ fn pool_cool_down_duration_work() { ); assert_ok!(Farming::set_pool_cool_down_duration( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -233,13 +251,18 @@ fn pool_lock_duration_work() { new_test_ext().execute_with(|| { // 1, can not set cool down duration for a pool which not exists assert_noop!( - Farming::reset_pool_unlock_height(Origin::root(), EHKO, REWARD_TOKEN, LOCK_DURATION,), + Farming::reset_pool_unlock_height( + RuntimeOrigin::root(), + EHKO, + REWARD_TOKEN, + LOCK_DURATION, + ), Error::::PoolDoesNotExist, ); run_to_block(10); assert_ok!(Farming::reset_pool_unlock_height( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -248,7 +271,7 @@ fn pool_lock_duration_work() { // 2, can not reset unlock height when pool is in lock assert_noop!( Farming::reset_pool_unlock_height( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -336,7 +359,7 @@ fn pool_deposit_work() { ); assert_ok!(Farming::set_pool_status( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -409,7 +432,7 @@ fn pool_withdraw_work() { run_to_block(10); assert_ok!(Farming::reset_pool_unlock_height( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -563,7 +586,7 @@ fn pool_dispatch_work() { // 1, can not dispatch reward for a pool which is not exists assert_noop!( Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), EHKO, REWARD_TOKEN, LOCK_DURATION, @@ -577,7 +600,7 @@ fn pool_dispatch_work() { // 2, can not dispatch reward for zero block assert_noop!( Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -590,7 +613,7 @@ fn pool_dispatch_work() { run_to_block(10); assert_ok!(Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -611,7 +634,7 @@ fn pool_dispatch_work() { run_to_block(60); assert_ok!(Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -665,7 +688,7 @@ fn pool_claim_work() { run_to_block(10); assert_ok!(Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -709,7 +732,7 @@ fn pool_claim_precision_work() { run_to_block(10); assert_ok!(Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -744,7 +767,7 @@ fn pool_complicated_scene0_work() { run_to_block(10); assert_ok!(Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -818,7 +841,7 @@ fn pool_complicated_scene0_work() { run_to_block(140); assert_ok!(Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -851,7 +874,7 @@ fn pool_complicated_scene0_work() { run_to_block(190); assert_ok!(Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -909,7 +932,7 @@ fn edge_case_reward_rate_too_low() { run_to_block(10); assert_ok!(Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), STAKE_TOKEN, REWARD_TOKEN, LOCK_DURATION, @@ -957,7 +980,7 @@ fn edge_case_reward_rate_too_low() { fn edge_case_reward_token_decimal_too_big() { new_test_ext().execute_with(|| { Farming::create( - Origin::root(), + RuntimeOrigin::root(), BIG_DECIMAL_STAKE_TOKEN, BIG_DECIMAL_REWARD_TOKEN, LOCK_DURATION, @@ -965,7 +988,7 @@ fn edge_case_reward_token_decimal_too_big() { ) .unwrap(); Farming::set_pool_status( - Origin::root(), + RuntimeOrigin::root(), BIG_DECIMAL_STAKE_TOKEN, BIG_DECIMAL_REWARD_TOKEN, LOCK_DURATION, @@ -983,7 +1006,7 @@ fn edge_case_reward_token_decimal_too_big() { run_to_block(10); assert_ok!(Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), BIG_DECIMAL_STAKE_TOKEN, BIG_DECIMAL_REWARD_TOKEN, LOCK_DURATION, @@ -998,7 +1021,7 @@ fn edge_case_reward_token_decimal_too_big() { // would overflow in function reward_per_share if do not deal calculation with BigUint run_to_block(15); assert_ok!(Farming::dispatch_reward( - Origin::root(), + RuntimeOrigin::root(), BIG_DECIMAL_STAKE_TOKEN, BIG_DECIMAL_REWARD_TOKEN, LOCK_DURATION, diff --git a/pallets/farming/src/weights.rs b/pallets/farming/src/weights.rs index 6c4039a46..2765c89ba 100644 --- a/pallets/farming/src/weights.rs +++ b/pallets/farming/src/weights.rs @@ -62,30 +62,30 @@ impl WeightInfo for SubstrateWeight { // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn create() -> Weight { - (51_977_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_977_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn set_pool_status() -> Weight { - (51_270_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_270_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn set_pool_cool_down_duration() -> Weight { - (51_054_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_054_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn reset_pool_unlock_height() -> Weight { - (52_596_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(52_596_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) @@ -94,17 +94,17 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn deposit() -> Weight { - (174_559_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(174_559_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) fn withdraw() -> Weight { - (108_759_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(108_759_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:0) @@ -112,9 +112,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn redeem() -> Weight { - (131_117_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(131_117_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) @@ -122,9 +122,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn claim() -> Weight { - (160_319_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(160_319_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) @@ -132,9 +132,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn dispatch_reward() -> Weight { - (147_363_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(147_363_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } } @@ -143,30 +143,30 @@ impl WeightInfo for () { // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn create() -> Weight { - (51_977_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_977_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn set_pool_status() -> Weight { - (51_270_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_270_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn set_pool_cool_down_duration() -> Weight { - (51_054_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_054_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn reset_pool_unlock_height() -> Weight { - (52_596_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(52_596_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) @@ -175,17 +175,17 @@ impl WeightInfo for () { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn deposit() -> Weight { - (174_559_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(174_559_000 as u64) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) fn withdraw() -> Weight { - (108_759_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(108_759_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:0) @@ -193,9 +193,9 @@ impl WeightInfo for () { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn redeem() -> Weight { - (131_117_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(131_117_000 as u64) + .saturating_add(RocksDbWeight::get().reads(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) @@ -203,9 +203,9 @@ impl WeightInfo for () { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn claim() -> Weight { - (160_319_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(160_319_000 as u64) + .saturating_add(RocksDbWeight::get().reads(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) @@ -213,8 +213,8 @@ impl WeightInfo for () { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn dispatch_reward() -> Weight { - (147_363_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(147_363_000 as u64) + .saturating_add(RocksDbWeight::get().reads(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } } diff --git a/pallets/liquid-staking/Cargo.toml b/pallets/liquid-staking/Cargo.toml index ce263cdcd..ccce8e3f5 100644 --- a/pallets/liquid-staking/Cargo.toml +++ b/pallets/liquid-staking/Cargo.toml @@ -9,47 +9,47 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', features = ['max-encoded-len'], default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } pallet-xcm-helper = { path = '../xcm-helper', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } # parallel pallets primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } [dev-dependencies] -pallet-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-staking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +pallet-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-staking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } serde = { version = '1.0.136' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-state-machine = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-state-machine = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } -kusama-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', features = ['runtime-benchmarks'] } -polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } +kusama-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', features = ['runtime-benchmarks'] } +polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } hex = '0.4.3' orml-traits = { version = '0.4.1-dev' } diff --git a/pallets/liquid-staking/src/benchmarking.rs b/pallets/liquid-staking/src/benchmarking.rs index f2bb21297..34be6ad3d 100644 --- a/pallets/liquid-staking/src/benchmarking.rs +++ b/pallets/liquid-staking/src/benchmarking.rs @@ -107,7 +107,7 @@ fn initial_set_up< ExchangeRate::::mutate(|b| *b = Rate::one()); } -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } @@ -115,7 +115,7 @@ benchmarks! { where_clause { where T: Config + pallet_assets::Config + pallet_xcm_helper::Config, - ::Origin: From + ::RuntimeOrigin: From } stake { diff --git a/pallets/liquid-staking/src/lib.rs b/pallets/liquid-staking/src/lib.rs index 64b831163..6a459ad94 100644 --- a/pallets/liquid-staking/src/lib.rs +++ b/pallets/liquid-staking/src/lib.rs @@ -112,12 +112,12 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + pallet_utility::Config + pallet_xcm::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; - type Origin: IsType<::Origin> - + Into::Origin>>; + type RuntimeOrigin: IsType<::RuntimeOrigin> + + Into::RuntimeOrigin>>; - type Call: IsType<::Call> + From>; + type RuntimeCall: IsType<::RuntimeCall> + From>; /// Assets for deposit/withdraw assets to/from pallet account type Assets: Transfer @@ -125,10 +125,10 @@ pub mod pallet { + InspectMetadata; /// The origin which can do operation on relaychain using parachain's sovereign account - type RelayOrigin: EnsureOrigin<::Origin>; + type RelayOrigin: EnsureOrigin<::RuntimeOrigin>; /// The origin which can update liquid currency, staking currency and other parameters - type UpdateOrigin: EnsureOrigin<::Origin>; + type UpdateOrigin: EnsureOrigin<::RuntimeOrigin>; /// Approved accouts which can call `withdraw_unbonded` and `settlement` type Members: SortedMembers; @@ -712,8 +712,8 @@ pub mod pallet { query_id: QueryId, response: Response, ) -> DispatchResultWithPostInfo { - let responder = - ensure_response(::Origin::from(origin.clone())).or_else(|_| { + let responder = ensure_response(::RuntimeOrigin::from(origin.clone())) + .or_else(|_| { T::UpdateOrigin::ensure_origin(origin).map(|_| MultiLocation::here()) })?; if let Response::ExecutionResult(res) = response { @@ -1922,8 +1922,8 @@ pub mod pallet { Ok(()) } - fn notify_placeholder() -> ::Call { - ::Call::from(Call::::notification_received { + fn notify_placeholder() -> ::RuntimeCall { + ::RuntimeCall::from(Call::::notification_received { query_id: Default::default(), response: Default::default(), }) @@ -1954,6 +1954,8 @@ pub mod pallet { &db, &relay_parent_storage_root, &key, + None, + None, ) { return result == value; } diff --git a/pallets/liquid-staking/src/mock.rs b/pallets/liquid-staking/src/mock.rs index 34f4b154b..8ce942ffd 100644 --- a/pallets/liquid-staking/src/mock.rs +++ b/pallets/liquid-staking/src/mock.rs @@ -50,12 +50,12 @@ use crate::{distribution::AverageDistribution, types::StakingLedger, BalanceOf}; pub use kusama_runtime; parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND / 4; - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND / 4; + pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); + pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = ParachainInfo; type DmpMessageHandler = DmpQueue; @@ -71,7 +71,7 @@ impl parachain_info::Config for Test {} parameter_types! { pub DotLocation: MultiLocation = MultiLocation::parent(); pub RelayNetwork: NetworkId = NetworkId::Kusama; - pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); } @@ -82,15 +82,15 @@ pub type LocationToAccountId = ( ); pub type XcmOriginToCallOrigin = ( - SovereignSignedViaLocation, - RelayChainAsNative, - SiblingParachainAsNative, - SignedAccountId32AsNative, - XcmPassthrough, + SovereignSignedViaLocation, + RelayChainAsNative, + SiblingParachainAsNative, + SignedAccountId32AsNative, + XcmPassthrough, ); parameter_types! { - pub const UnitWeightCost: Weight = 1; + pub const UnitWeightCost: u64 = 1; pub DotPerSecond: (AssetId, u128) = (AssetId::Concrete(MultiLocation::parent()), 1); } @@ -125,7 +125,7 @@ pub type Barrier = AllowUnpaidExecutionFrom; pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = XcmOriginToCallOrigin; @@ -133,7 +133,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = (); type SubscriptionService = PolkadotXcm; @@ -165,43 +165,43 @@ impl ConvertOrigin for SystemParachainAsSuperuser; type ExecuteOverweightOrigin = EnsureRoot; type ChannelInfo = ParachainSystem; type VersionWrapper = (); type ControllerOrigin = EnsureRoot; - type ControllerOriginConverter = SystemParachainAsSuperuser; + type ControllerOriginConverter = SystemParachainAsSuperuser; type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; } impl cumulus_pallet_dmp_queue::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRoot; } impl cumulus_pallet_xcm::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Test { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type Origin = Origin; - type Call = Call; - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } @@ -309,7 +309,7 @@ parameter_types! { } impl pallet_loans::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PriceFeeder = MockPriceFeeder; type PalletId = LoansPalletId; type ReserveOrigin = EnsureRoot; @@ -334,7 +334,7 @@ impl pallet_timestamp::Config for Test { parameter_types! { pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); - pub const BaseXcmWeight: Weight = 100_000_000; + pub const BaseXcmWeight: u64 = 100_000_000; pub const MaxInstructions: u32 = 100; pub const MaxAssetsForTransfer: usize = 2; } @@ -346,14 +346,14 @@ parameter_type_with_key! { } impl orml_xtokens::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; type AccountIdToMultiLocation = AccountIdToMultiLocation; type SelfLocation = SelfLocation; type XcmExecutor = XcmExecutor; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; @@ -378,8 +378,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -387,7 +387,7 @@ impl frame_system::Config for Test { type AccountId = AccountId; type Lookup = AccountIdLookup; type Header = generic::Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -408,7 +408,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -437,8 +437,8 @@ pub type UpdateOrigin = EitherOfDiverse, EnsureSignedBy>; impl pallet_utility::Config for Test { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = pallet_utility::weights::SubstrateWeight; } @@ -450,7 +450,7 @@ parameter_types! { } impl pallet_xcm_helper::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UpdateOrigin = UpdateOrigin; type Assets = Assets; type XcmSender = XcmRouter; @@ -548,9 +548,9 @@ parameter_types! { } impl crate::Config for Test { - type Event = Event; - type Origin = Origin; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type UpdateOrigin = UpdateOrigin; type PalletId = StakingPalletId; type LoansPalletId = LoansPalletId; @@ -590,7 +590,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -650,9 +650,9 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { - Assets::force_create(Origin::root(), KSM, Id(ALICE), true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), KSM, Id(ALICE), true, 1).unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), KSM, b"Kusama".to_vec(), b"KSM".to_vec(), @@ -660,9 +660,9 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { false, ) .unwrap(); - Assets::force_create(Origin::root(), SKSM, Id(ALICE), true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SKSM, Id(ALICE), true, 1).unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), SKSM, b"Parallel Kusama".to_vec(), b"sKSM".to_vec(), @@ -670,9 +670,9 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { false, ) .unwrap(); - Assets::force_create(Origin::root(), KSM_U, Id(ALICE), true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), KSM_U, Id(ALICE), true, 1).unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), KSM_U, b"Kusama Ubonding".to_vec(), b"KSM_U".to_vec(), @@ -681,23 +681,24 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { ) .unwrap(); - Assets::mint(Origin::signed(ALICE), KSM, Id(ALICE), ksm(100f64)).unwrap(); - Assets::mint(Origin::signed(ALICE), SKSM, Id(ALICE), ksm(100f64)).unwrap(); - Assets::mint(Origin::signed(ALICE), KSM, Id(BOB), ksm(20000f64)).unwrap(); - LiquidStaking::update_staking_ledger_cap(Origin::signed(BOB), ksm(10000f64)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), KSM, Id(ALICE), ksm(100f64)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), SKSM, Id(ALICE), ksm(100f64)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), KSM, Id(BOB), ksm(20000f64)).unwrap(); + LiquidStaking::update_staking_ledger_cap(RuntimeOrigin::signed(BOB), ksm(10000f64)) + .unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), KSM, Id(XcmHelper::account_id()), ksm(100f64), ) .unwrap(); - Loans::add_market(Origin::root(), KSM, market_mock(PKSM)).unwrap(); - Loans::activate_market(Origin::root(), KSM).unwrap(); - Loans::add_market(Origin::root(), KSM_U, market_mock(PKSM_U)).unwrap(); - Loans::activate_market(Origin::root(), KSM_U).unwrap(); + Loans::add_market(RuntimeOrigin::root(), KSM, market_mock(PKSM)).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), KSM).unwrap(); + Loans::add_market(RuntimeOrigin::root(), KSM_U, market_mock(PKSM_U)).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), KSM_U).unwrap(); System::set_block_number(1); Timestamp::set_timestamp(6000); @@ -738,7 +739,7 @@ pub type RelayBalances = pallet_balances::Pallet; pub type RelayStaking = pallet_staking::Pallet; pub type RelayStakingEvent = pallet_staking::Event; pub type RelaySystem = frame_system::Pallet; -pub type RelayEvent = kusama_runtime::Event; +pub type RelayEvent = kusama_runtime::RuntimeEvent; pub type ParaSystem = frame_system::Pallet; pub fn para_a_id() -> ParaId { @@ -770,9 +771,9 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { - Assets::force_create(Origin::root(), KSM, Id(ALICE), true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), KSM, Id(ALICE), true, 1).unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), KSM, b"Kusama".to_vec(), b"KSM".to_vec(), @@ -780,9 +781,9 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { false, ) .unwrap(); - Assets::force_create(Origin::root(), SKSM, Id(ALICE), true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SKSM, Id(ALICE), true, 1).unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), SKSM, b"Parallel Kusama".to_vec(), b"sKSM".to_vec(), @@ -790,9 +791,9 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { false, ) .unwrap(); - Assets::force_create(Origin::root(), KSM_U, Id(ALICE), true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), KSM_U, Id(ALICE), true, 1).unwrap(); Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), KSM_U, b"Kusama Ubonding".to_vec(), b"KSM_U".to_vec(), @@ -801,21 +802,22 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { ) .unwrap(); - Assets::mint(Origin::signed(ALICE), KSM, Id(ALICE), ksm(10000f64)).unwrap(); - Assets::mint(Origin::signed(ALICE), KSM, Id(BOB), ksm(20000f64)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), KSM, Id(ALICE), ksm(10000f64)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), KSM, Id(BOB), ksm(20000f64)).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), KSM, Id(XcmHelper::account_id()), ksm(30f64), ) .unwrap(); - Loans::add_market(Origin::root(), KSM, market_mock(PKSM)).unwrap(); - Loans::activate_market(Origin::root(), KSM).unwrap(); - Loans::add_market(Origin::root(), KSM_U, market_mock(PKSM_U)).unwrap(); - Loans::activate_market(Origin::root(), KSM_U).unwrap(); - LiquidStaking::update_staking_ledger_cap(Origin::signed(BOB), ksm(10000f64)).unwrap(); + Loans::add_market(RuntimeOrigin::root(), KSM, market_mock(PKSM)).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), KSM).unwrap(); + Loans::add_market(RuntimeOrigin::root(), KSM_U, market_mock(PKSM_U)).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), KSM_U).unwrap(); + LiquidStaking::update_staking_ledger_cap(RuntimeOrigin::signed(BOB), ksm(10000f64)) + .unwrap(); System::set_block_number(1); Timestamp::set_timestamp(6000); diff --git a/pallets/liquid-staking/src/tests.rs b/pallets/liquid-staking/src/tests.rs index d490188d6..af778a93b 100644 --- a/pallets/liquid-staking/src/tests.rs +++ b/pallets/liquid-staking/src/tests.rs @@ -29,7 +29,10 @@ use crate::{ #[test] fn stake_should_work() { new_test_ext().execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(10f64))); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(10f64) + )); // Check storage is correct assert_eq!(ExchangeRate::::get(), Rate::one()); assert_eq!( @@ -93,7 +96,10 @@ fn stake_should_work() { } ); - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(10f64))); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(10f64) + )); assert_ok!(with_transaction( || -> TransactionOutcome { @@ -130,9 +136,12 @@ fn stake_should_work() { #[test] fn unstake_should_work() { new_test_ext().execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(10f64))); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(10f64) + )); assert_ok!(LiquidStaking::unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), ksm(6f64), Default::default() )); @@ -197,7 +206,7 @@ fn unstake_should_work() { // Just make it 1 to calculate. ExchangeRate::::set(Rate::one()); assert_ok!(LiquidStaking::unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), ksm(3.95f64), Default::default() )); @@ -254,9 +263,12 @@ enum StakeOp { impl StakeOp { fn execute(self) { match self { - Self::Stake(amount) => LiquidStaking::stake(Origin::signed(ALICE), amount).unwrap(), + Self::Stake(amount) => { + LiquidStaking::stake(RuntimeOrigin::signed(ALICE), amount).unwrap() + } Self::Unstake(amount) => { - LiquidStaking::unstake(Origin::signed(ALICE), amount, Default::default()).unwrap() + LiquidStaking::unstake(RuntimeOrigin::signed(ALICE), amount, Default::default()) + .unwrap() } }; } @@ -313,15 +325,18 @@ fn test_transact_bond_work() { TestNet::reset(); let derivative_index = 0u16; ParaA::execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(2000f64),)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(2000f64), + )); assert_ok!(LiquidStaking::bond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, ksm(3f64), RewardDestination::Staked )); - ParaSystem::assert_has_event(mock::Event::LiquidStaking(crate::Event::Bonding( + ParaSystem::assert_has_event(mock::RuntimeEvent::LiquidStaking(crate::Event::Bonding( derivative_index, LiquidStaking::derivative_sovereign_account_id(derivative_index), ksm(3f64), @@ -330,10 +345,10 @@ fn test_transact_bond_work() { }); Relay::execute_with(|| { - RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Bonded( - LiquidStaking::derivative_sovereign_account_id(derivative_index), - ksm(3f64), - ))); + RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Bonded { + stash: LiquidStaking::derivative_sovereign_account_id(derivative_index), + amount: ksm(3f64), + })); let ledger = RelayStaking::ledger(LiquidStaking::derivative_sovereign_account_id( derivative_index, )) @@ -347,10 +362,13 @@ fn test_transact_bond_extra_work() { TestNet::reset(); let derivative_index = 0u16; ParaA::execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(4000f64),)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(4000f64), + )); let bond_amount = ksm(2f64); assert_ok!(LiquidStaking::bond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, bond_amount, RewardDestination::Staked @@ -362,7 +380,7 @@ fn test_transact_bond_extra_work() { )); assert_ok!(LiquidStaking::bond_extra( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, ksm(3f64) )); @@ -382,16 +400,19 @@ fn test_transact_unbond_work() { TestNet::reset(); let derivative_index = 0u16; ParaA::execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(6000f64),)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(6000f64), + )); assert_ok!(LiquidStaking::unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), ksm(1000f64), Default::default() )); let bond_amount = ksm(5f64); assert_ok!(LiquidStaking::bond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, bond_amount, RewardDestination::Staked @@ -403,21 +424,21 @@ fn test_transact_unbond_work() { Response::ExecutionResult(None), )); assert_ok!(LiquidStaking::unbond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, ksm(2f64) )); }); Relay::execute_with(|| { - RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Bonded( - LiquidStaking::derivative_sovereign_account_id(derivative_index), - ksm(5f64), - ))); - RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Unbonded( - LiquidStaking::derivative_sovereign_account_id(derivative_index), - ksm(2f64), - ))); + RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Bonded { + stash: LiquidStaking::derivative_sovereign_account_id(derivative_index), + amount: ksm(5f64), + })); + RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Unbonded { + stash: LiquidStaking::derivative_sovereign_account_id(derivative_index), + amount: ksm(2f64), + })); let ledger = RelayStaking::ledger(LiquidStaking::derivative_sovereign_account_id( derivative_index, )) @@ -432,16 +453,19 @@ fn test_transact_withdraw_unbonded_work() { TestNet::reset(); let derivative_index = 0u16; ParaA::execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(6000f64),)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(6000f64), + )); assert_ok!(LiquidStaking::unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), ksm(2000f64), Default::default() )); let bond_amount = ksm(5f64); let unbond_amount = ksm(2f64); assert_ok!(LiquidStaking::bond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, bond_amount, RewardDestination::Staked @@ -452,7 +476,7 @@ fn test_transact_withdraw_unbonded_work() { Response::ExecutionResult(None), )); assert_ok!(LiquidStaking::unbond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, unbond_amount )); @@ -472,14 +496,14 @@ fn test_transact_withdraw_unbonded_work() { assert_eq!(ledger.active, ksm(3f64)); assert_eq!(ledger.unlocking.len(), 1); - RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Bonded( - LiquidStaking::derivative_sovereign_account_id(derivative_index), - ksm(5f64), - ))); - RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Unbonded( - LiquidStaking::derivative_sovereign_account_id(derivative_index), - ksm(2f64), - ))); + RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Bonded { + stash: LiquidStaking::derivative_sovereign_account_id(derivative_index), + amount: ksm(5f64), + })); + RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Unbonded { + stash: LiquidStaking::derivative_sovereign_account_id(derivative_index), + amount: ksm(2f64), + })); pallet_staking::CurrentEra::::put( ::BondingDuration::get(), @@ -488,12 +512,12 @@ fn test_transact_withdraw_unbonded_work() { ParaA::execute_with(|| { assert_ok!(LiquidStaking::force_set_current_era( - Origin::root(), + RuntimeOrigin::root(), ::BondingDuration::get(), )); assert_ok!(LiquidStaking::withdraw_unbonded( - Origin::root(), + RuntimeOrigin::root(), derivative_index, 0 )); @@ -515,15 +539,18 @@ fn test_transact_rebond_work() { TestNet::reset(); let derivative_index = 0u16; ParaA::execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(6000f64),)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(6000f64), + )); assert_ok!(LiquidStaking::unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), ksm(1000f64), Default::default() )); let bond_amount = ksm(10f64); assert_ok!(LiquidStaking::bond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, bond_amount, RewardDestination::Staked @@ -535,30 +562,30 @@ fn test_transact_rebond_work() { Response::ExecutionResult(None), )); assert_ok!(LiquidStaking::unbond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, ksm(5f64) )); assert_ok!(LiquidStaking::rebond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, ksm(3f64) )); }); Relay::execute_with(|| { - RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Bonded( - LiquidStaking::derivative_sovereign_account_id(derivative_index), - ksm(10f64), - ))); - RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Unbonded( - LiquidStaking::derivative_sovereign_account_id(derivative_index), - ksm(5f64), - ))); - RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Bonded( - LiquidStaking::derivative_sovereign_account_id(derivative_index), - ksm(3f64), - ))); + RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Bonded { + stash: LiquidStaking::derivative_sovereign_account_id(derivative_index), + amount: ksm(10f64), + })); + RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Unbonded { + stash: LiquidStaking::derivative_sovereign_account_id(derivative_index), + amount: ksm(5f64), + })); + RelaySystem::assert_has_event(RelayEvent::Staking(RelayStakingEvent::Bonded { + stash: LiquidStaking::derivative_sovereign_account_id(derivative_index), + amount: ksm(3f64), + })); let ledger = RelayStaking::ledger(LiquidStaking::derivative_sovereign_account_id( derivative_index, )) @@ -573,10 +600,13 @@ fn test_transact_nominate_work() { TestNet::reset(); let derivative_index = 0u16; ParaA::execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(4000f64),)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(4000f64), + )); let bond_amount = ksm(10f64); assert_ok!(LiquidStaking::bond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, bond_amount, RewardDestination::Staked @@ -589,7 +619,7 @@ fn test_transact_nominate_work() { )); assert_ok!(LiquidStaking::nominate( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, vec![ALICE, BOB], )); @@ -615,9 +645,12 @@ fn test_transfer_bond() { let xcm_transfer_amount = ksm(10f64); let derivative_index = 0u16; ParaA::execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(2000f64),)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(2000f64), + )); assert_ok!(LiquidStaking::bond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, xcm_transfer_amount, RewardDestination::Staked @@ -650,7 +683,7 @@ fn test_transfer_bond() { fn update_staking_ledger_cap_should_not_work_if_with_invalid_param() { new_test_ext().execute_with(|| { assert_noop!( - LiquidStaking::update_staking_ledger_cap(Origin::root(), Zero::zero()), + LiquidStaking::update_staking_ledger_cap(RuntimeOrigin::root(), Zero::zero()), Error::::InvalidCap ); }) @@ -660,11 +693,11 @@ fn update_staking_ledger_cap_should_not_work_if_with_invalid_param() { fn update_reserve_factor_should_not_work_if_with_invalid_param() { new_test_ext().execute_with(|| { assert_noop!( - LiquidStaking::update_reserve_factor(Origin::root(), Ratio::zero()), + LiquidStaking::update_reserve_factor(RuntimeOrigin::root(), Ratio::zero()), Error::::InvalidFactor ); assert_noop!( - LiquidStaking::update_reserve_factor(Origin::root(), Ratio::one()), + LiquidStaking::update_reserve_factor(RuntimeOrigin::root(), Ratio::one()), Error::::InvalidFactor ); }) @@ -673,16 +706,19 @@ fn update_reserve_factor_should_not_work_if_with_invalid_param() { #[test] fn claim_for_should_work() { new_test_ext().execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(10f64))); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(10f64) + )); assert_eq!(::Assets::balance(KSM, &ALICE), ksm(90f64)); assert_ok!(LiquidStaking::unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), ksm(1f64), Default::default() )); assert_ok!(LiquidStaking::unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), ksm(3.95f64), Default::default() )); @@ -695,7 +731,7 @@ fn claim_for_should_work() { ); assert_noop!( - LiquidStaking::claim_for(Origin::signed(BOB), Id(ALICE)), + LiquidStaking::claim_for(RuntimeOrigin::signed(BOB), Id(ALICE)), Error::::NothingToClaim ); @@ -713,7 +749,7 @@ fn claim_for_should_work() { Response::ExecutionResult(None), )); assert_ok!(LiquidStaking::withdraw_unbonded( - Origin::root(), + RuntimeOrigin::root(), derivative_index, 0 )); @@ -723,7 +759,10 @@ fn claim_for_should_work() { Response::ExecutionResult(None), )); - assert_ok!(LiquidStaking::claim_for(Origin::signed(BOB), Id(ALICE))); + assert_ok!(LiquidStaking::claim_for( + RuntimeOrigin::signed(BOB), + Id(ALICE) + )); assert_eq!( ::Assets::balance(KSM, &ALICE), ksm(90f64) + ksm(4.95f64) @@ -742,7 +781,10 @@ fn test_on_initialize_work() { // 1.1 stake let bond_amount = ksm(10f64); - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), bond_amount)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + bond_amount + )); let total_stake_amount = bond_amount - xcm_fees - reserve_factor.mul_floor(bond_amount); // 1.2 on_initialize_bond @@ -796,7 +838,7 @@ fn test_set_staking_ledger_work() { ); assert_noop!( LiquidStaking::set_staking_ledger( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, staking_ledger.clone(), get_mock_proof_bytes() @@ -811,7 +853,7 @@ fn test_set_staking_ledger_work() { staking_ledger.bond_extra(bond_extra_amount); assert_noop!( LiquidStaking::set_staking_ledger( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, staking_ledger.clone(), get_mock_proof_bytes() @@ -820,7 +862,7 @@ fn test_set_staking_ledger_work() { ); LiquidStaking::on_finalize(1); assert_ok!(LiquidStaking::set_staking_ledger( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, get_mock_staking_ledger(derivative_index), get_mock_proof_bytes() @@ -828,7 +870,7 @@ fn test_set_staking_ledger_work() { assert_noop!( LiquidStaking::set_staking_ledger( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, staking_ledger.clone(), get_mock_proof_bytes() @@ -850,7 +892,10 @@ fn test_set_staking_ledger_work() { fn test_force_set_era_start_block_work() { new_test_ext().execute_with(|| { assert_eq!(EraStartBlock::::get(), 0); - assert_ok!(LiquidStaking::force_set_era_start_block(Origin::root(), 11)); + assert_ok!(LiquidStaking::force_set_era_start_block( + RuntimeOrigin::root(), + 11 + )); assert_eq!(EraStartBlock::::get(), 11); }) } @@ -859,7 +904,10 @@ fn test_force_set_era_start_block_work() { fn test_force_set_current_era_work() { new_test_ext().execute_with(|| { assert_eq!(CurrentEra::::get(), 0); - assert_ok!(LiquidStaking::force_set_current_era(Origin::root(), 12)); + assert_ok!(LiquidStaking::force_set_current_era( + RuntimeOrigin::root(), + 12 + )); assert_eq!(CurrentEra::::get(), 12); }) } @@ -869,10 +917,13 @@ fn test_force_notification_received_work() { new_test_ext().execute_with(|| { let derivative_index = 0u16; let bond_amount = ksm(10f64); - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(20f64),)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(20f64), + )); assert_ok!(LiquidStaking::bond( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, bond_amount, RewardDestination::Staked @@ -888,14 +939,14 @@ fn test_force_notification_received_work() { ); assert_noop!( LiquidStaking::notification_received( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), query_id, Response::ExecutionResult(None), ), BadOrigin ); assert_ok!(LiquidStaking::notification_received( - Origin::root(), + RuntimeOrigin::root(), query_id, Response::ExecutionResult(None), )); @@ -929,7 +980,7 @@ fn test_verify_trie_proof_work() { let value = hex::decode(MOCK_DATA).unwrap(); let relay_proof = StorageProof::new(get_mock_proof_bytes()); let db = relay_proof.into_memory_db(); - let result = sp_trie::read_trie_value::(&db, &relay_root, &key) + let result = sp_trie::read_trie_value::(&db, &relay_root, &key, None, None) .unwrap() .unwrap(); assert_eq!(result, value); @@ -957,11 +1008,14 @@ fn test_verify_merkle_proof_work() { fn reduce_reserves_works() { new_test_ext().execute_with(|| { // Stake 1000 KSM, 0.5% for reserves - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(100f64))); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(100f64) + )); assert_eq!(LiquidStaking::total_reserves(), ksm(0.5f64)); // Reduce 20 KSM reserves assert_ok!(LiquidStaking::reduce_reserves( - Origin::root(), + RuntimeOrigin::root(), Id(ALICE), ksm(0.2f64) )); @@ -969,7 +1023,7 @@ fn reduce_reserves_works() { // should failed if exceed the cap assert_noop!( - LiquidStaking::reduce_reserves(Origin::root(), Id(ALICE), ksm(0.31f64)), + LiquidStaking::reduce_reserves(RuntimeOrigin::root(), Id(ALICE), ksm(0.31f64)), Underflow ); }) @@ -978,9 +1032,12 @@ fn reduce_reserves_works() { #[test] fn cancel_unstake_works() { new_test_ext().execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(10f64))); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(10f64) + )); assert_ok!(LiquidStaking::unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), ksm(6f64), UnstakeProvider::MatchingPool )); @@ -1004,7 +1061,7 @@ fn cancel_unstake_works() { ); assert_ok!(LiquidStaking::cancel_unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), ksm(6f64) )); assert_eq!( @@ -1028,11 +1085,18 @@ fn cancel_unstake_works() { #[test] fn fast_unstake_works() { new_test_ext().execute_with(|| { - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(10f64))); - assert_ok!(Loans::mint(Origin::signed(BOB), KSM, ksm(100f64))); - assert_ok!(Loans::collateral_asset(Origin::signed(BOB), KSM, true)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + ksm(10f64) + )); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), KSM, ksm(100f64))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(BOB), + KSM, + true + )); assert_ok!(LiquidStaking::unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), ksm(6f64), UnstakeProvider::Loans )); @@ -1063,7 +1127,7 @@ fn fast_unstake_works() { Response::ExecutionResult(None), )); assert_ok!(LiquidStaking::withdraw_unbonded( - Origin::root(), + RuntimeOrigin::root(), derivative_index, 0 )); @@ -1074,7 +1138,7 @@ fn fast_unstake_works() { )); assert_ok!(LiquidStaking::claim_for( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), Id(LiquidStaking::loans_account_id()) )); assert_eq!( @@ -1095,7 +1159,7 @@ fn test_charge_commission_work() { ); StakingLedgers::::insert(derivative_index, staking_ledger.clone()); assert_ok!(LiquidStaking::update_commission_rate( - Origin::root(), + RuntimeOrigin::root(), Rate::from_rational(1, 100) )); LiquidStaking::on_finalize(1); @@ -1121,7 +1185,7 @@ fn test_charge_commission_work() { let inflate_liquid_amount = inflate_rate.saturating_mul_int(issurance); assert_ok!(LiquidStaking::set_staking_ledger( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), derivative_index, get_mock_staking_ledger(derivative_index), get_mock_proof_bytes() @@ -1147,17 +1211,20 @@ fn test_complete_fast_match_unstake_work() { let reserve_factor = LiquidStaking::reserve_factor(); let xcm_fees = XcmFees::get(); let bond_amount = ksm(10f64); - assert_ok!(LiquidStaking::stake(Origin::signed(BOB), bond_amount)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(BOB), + bond_amount + )); let total_stake_amount = bond_amount - xcm_fees - reserve_factor.mul_floor(bond_amount); let fast_unstake_amount = ksm(3f64); assert_ok!(LiquidStaking::unstake( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), fast_unstake_amount, UnstakeProvider::MatchingPool )); assert_ok!(LiquidStaking::fast_match_unstake( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), [BOB].to_vec(), )); @@ -1193,8 +1260,14 @@ fn test_partial_fast_match_unstake_work() { let reserve_factor = LiquidStaking::reserve_factor(); let xcm_fees = XcmFees::get(); let bond_amount = ksm(5f64); - assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), bond_amount)); - assert_ok!(LiquidStaking::stake(Origin::signed(BOB), bond_amount)); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(ALICE), + bond_amount + )); + assert_ok!(LiquidStaking::stake( + RuntimeOrigin::signed(BOB), + bond_amount + )); let alice_stake_amount = bond_amount - xcm_fees - reserve_factor.mul_floor(bond_amount); let bob_stake_amount = alice_stake_amount; @@ -1203,17 +1276,17 @@ fn test_partial_fast_match_unstake_work() { let alice_fast_unstake_amount = ksm(10f64); let bob_fast_unstake_amount = ksm(1f64); assert_ok!(LiquidStaking::unstake( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), alice_fast_unstake_amount, UnstakeProvider::MatchingPool )); assert_ok!(LiquidStaking::unstake( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), bob_fast_unstake_amount, UnstakeProvider::MatchingPool )); assert_ok!(LiquidStaking::fast_match_unstake( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), [BOB, ALICE].to_vec(), )); diff --git a/pallets/liquid-staking/src/weights.rs b/pallets/liquid-staking/src/weights.rs index a78fe34d2..605265858 100644 --- a/pallets/liquid-staking/src/weights.rs +++ b/pallets/liquid-staking/src/weights.rs @@ -84,9 +84,9 @@ impl WeightInfo for SubstrateWeight { // Storage: LiquidStaking MatchingPool (r:1 w:1) // Storage: LiquidStaking TotalReserves (r:1 w:1) fn stake() -> Weight { - (288_998_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(288_998_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking ExchangeRate (r:1 w:0) @@ -97,9 +97,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:1 w:1) // Storage: LiquidStaking MatchingPool (r:1 w:1) fn unstake() -> Weight { - (124_428_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(124_428_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -118,9 +118,9 @@ impl WeightInfo for SubstrateWeight { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn bond() -> Weight { - (204_060_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(204_060_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -137,9 +137,9 @@ impl WeightInfo for SubstrateWeight { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn nominate() -> Weight { - (187_662_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(187_662_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -158,18 +158,18 @@ impl WeightInfo for SubstrateWeight { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn bond_extra() -> Weight { - (209_641_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(209_641_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:1) // Storage: LiquidStaking IsUpdated (r:1 w:1) // Storage: LiquidStaking XcmRequests (r:1 w:0) fn force_set_staking_ledger() -> Weight { - (75_995_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(75_995_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -187,9 +187,9 @@ impl WeightInfo for SubstrateWeight { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn unbond() -> Weight { - (196_990_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(196_990_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -207,9 +207,9 @@ impl WeightInfo for SubstrateWeight { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn rebond() -> Weight { - (195_931_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(195_931_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:1 w:0) @@ -227,23 +227,23 @@ impl WeightInfo for SubstrateWeight { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn withdraw_unbonded() -> Weight { - (199_966_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(199_966_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking ReserveFactor (r:1 w:1) fn update_reserve_factor() -> Weight { - (40_612_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(40_612_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgerCap (r:1 w:1) fn update_staking_ledger_cap() -> Weight { - (39_767_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(39_767_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking XcmRequests (r:1 w:1) @@ -254,9 +254,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn notification_received() -> Weight { - (137_351_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(137_351_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:1 w:0) @@ -267,33 +267,33 @@ impl WeightInfo for SubstrateWeight { // Storage: LiquidStaking TotalReserves (r:1 w:0) // Storage: LiquidStaking MatchingPool (r:1 w:0) fn claim_for() -> Weight { - (157_173_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(157_173_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking EraStartBlock (r:0 w:1) fn force_set_era_start_block() -> Weight { - (12_342_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(12_342_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:0 w:1) // Storage: LiquidStaking IsMatched (r:0 w:1) fn force_set_current_era() -> Weight { - (14_154_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(14_154_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking IsMatched (r:1 w:0) // Storage: LiquidStaking EraStartBlock (r:1 w:0) fn on_initialize() -> Weight { - (21_084_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_084_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:3 w:0) @@ -318,9 +318,9 @@ impl WeightInfo for SubstrateWeight { // Storage: LiquidStaking XcmRequests (r:0 w:2) // Storage: PolkadotXcm Queries (r:0 w:2) fn force_advance_era() -> Weight { - (465_583_000 as Weight) - .saturating_add(T::DbWeight::get().reads(22 as Weight)) - .saturating_add(T::DbWeight::get().writes(15 as Weight)) + Weight::from_ref_time(465_583_000 as u64) + .saturating_add(T::DbWeight::get().reads(22 as u64)) + .saturating_add(T::DbWeight::get().writes(15 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:3 w:0) @@ -341,9 +341,9 @@ impl WeightInfo for SubstrateWeight { // Storage: LiquidStaking XcmRequests (r:0 w:2) // Storage: PolkadotXcm Queries (r:0 w:2) fn force_matching() -> Weight { - (391_066_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(391_066_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking TotalReserves (r:1 w:1) @@ -351,9 +351,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn reduce_reserves() -> Weight { - (125_618_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(125_618_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking Unlockings (r:1 w:1) @@ -364,23 +364,23 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn cancel_unstake() -> Weight { - (117_945_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(117_945_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } fn update_commission_rate() -> Weight { - (40_612_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(40_612_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn fast_match_unstake(n: u32, ) -> Weight { - (21_480_000 as Weight) + Weight::from_ref_time(21_480_000 as u64) // Standard Error: 38_000 - .saturating_add((82_727_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(n as Weight))) + .saturating_add(Weight::from_ref_time(82_727_000 as u64).saturating_mul(n as u64)) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(n as u64))) } } @@ -398,9 +398,9 @@ impl WeightInfo for () { // Storage: LiquidStaking MatchingPool (r:1 w:1) // Storage: LiquidStaking TotalReserves (r:1 w:1) fn stake() -> Weight { - (288_998_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(17 as Weight)) - .saturating_add(RocksDbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(288_998_000 as u64) + .saturating_add(RocksDbWeight::get().reads(17 as u64)) + .saturating_add(RocksDbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking ExchangeRate (r:1 w:0) @@ -411,9 +411,9 @@ impl WeightInfo for () { // Storage: Assets Account (r:1 w:1) // Storage: LiquidStaking MatchingPool (r:1 w:1) fn unstake() -> Weight { - (124_428_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(124_428_000 as u64) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -432,9 +432,9 @@ impl WeightInfo for () { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn bond() -> Weight { - (204_060_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(14 as Weight)) - .saturating_add(RocksDbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(204_060_000 as u64) + .saturating_add(RocksDbWeight::get().reads(14 as u64)) + .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -451,9 +451,9 @@ impl WeightInfo for () { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn nominate() -> Weight { - (187_662_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(12 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(187_662_000 as u64) + .saturating_add(RocksDbWeight::get().reads(12 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -472,18 +472,18 @@ impl WeightInfo for () { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn bond_extra() -> Weight { - (209_641_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(14 as Weight)) - .saturating_add(RocksDbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(209_641_000 as u64) + .saturating_add(RocksDbWeight::get().reads(14 as u64)) + .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:1) // Storage: LiquidStaking IsUpdated (r:1 w:1) // Storage: LiquidStaking XcmRequests (r:1 w:0) fn force_set_staking_ledger() -> Weight { - (75_995_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(75_995_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -501,9 +501,9 @@ impl WeightInfo for () { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn unbond() -> Weight { - (196_990_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(13 as Weight)) - .saturating_add(RocksDbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(196_990_000 as u64) + .saturating_add(RocksDbWeight::get().reads(13 as u64)) + .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -521,9 +521,9 @@ impl WeightInfo for () { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn rebond() -> Weight { - (195_931_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(13 as Weight)) - .saturating_add(RocksDbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(195_931_000 as u64) + .saturating_add(RocksDbWeight::get().reads(13 as u64)) + .saturating_add(RocksDbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:1 w:0) @@ -541,23 +541,23 @@ impl WeightInfo for () { // Storage: LiquidStaking XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn withdraw_unbonded() -> Weight { - (199_966_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(13 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(199_966_000 as u64) + .saturating_add(RocksDbWeight::get().reads(13 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking ReserveFactor (r:1 w:1) fn update_reserve_factor() -> Weight { - (40_612_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(40_612_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgerCap (r:1 w:1) fn update_staking_ledger_cap() -> Weight { - (39_767_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(39_767_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking XcmRequests (r:1 w:1) @@ -568,9 +568,9 @@ impl WeightInfo for () { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn notification_received() -> Weight { - (137_351_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(137_351_000 as u64) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:1 w:0) @@ -581,33 +581,33 @@ impl WeightInfo for () { // Storage: LiquidStaking TotalReserves (r:1 w:0) // Storage: LiquidStaking MatchingPool (r:1 w:0) fn claim_for() -> Weight { - (157_173_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(157_173_000 as u64) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking EraStartBlock (r:0 w:1) fn force_set_era_start_block() -> Weight { - (12_342_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(12_342_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:0 w:1) // Storage: LiquidStaking IsMatched (r:0 w:1) fn force_set_current_era() -> Weight { - (14_154_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(14_154_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking IsMatched (r:1 w:0) // Storage: LiquidStaking EraStartBlock (r:1 w:0) fn on_initialize() -> Weight { - (21_084_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(21_084_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:3 w:0) @@ -632,9 +632,9 @@ impl WeightInfo for () { // Storage: LiquidStaking XcmRequests (r:0 w:2) // Storage: PolkadotXcm Queries (r:0 w:2) fn force_advance_era() -> Weight { - (465_583_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(22 as Weight)) - .saturating_add(RocksDbWeight::get().writes(15 as Weight)) + Weight::from_ref_time(465_583_000 as u64) + .saturating_add(RocksDbWeight::get().reads(22 as u64)) + .saturating_add(RocksDbWeight::get().writes(15 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:3 w:0) @@ -655,9 +655,9 @@ impl WeightInfo for () { // Storage: LiquidStaking XcmRequests (r:0 w:2) // Storage: PolkadotXcm Queries (r:0 w:2) fn force_matching() -> Weight { - (391_066_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(18 as Weight)) - .saturating_add(RocksDbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(391_066_000 as u64) + .saturating_add(RocksDbWeight::get().reads(18 as u64)) + .saturating_add(RocksDbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking TotalReserves (r:1 w:1) @@ -665,9 +665,9 @@ impl WeightInfo for () { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn reduce_reserves() -> Weight { - (125_618_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(6 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(125_618_000 as u64) + .saturating_add(RocksDbWeight::get().reads(6 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking Unlockings (r:1 w:1) @@ -678,22 +678,22 @@ impl WeightInfo for () { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn cancel_unstake() -> Weight { - (117_945_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(117_945_000 as u64) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } fn update_commission_rate() -> Weight { - (40_612_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(40_612_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn fast_match_unstake(n: u32, ) -> Weight { - (21_480_000 as Weight) - .saturating_add((82_727_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(n as Weight))) + Weight::from_ref_time(21_480_000 as u64) + .saturating_add(Weight::from_ref_time(82_727_000 as u64).saturating_mul(n as u64)) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(n as u64))) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) + .saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(n as u64))) } } diff --git a/pallets/loans/Cargo.toml b/pallets/loans/Cargo.toml index c86ad3b2d..801862cf5 100644 --- a/pallets/loans/Cargo.toml +++ b/pallets/loans/Cargo.toml @@ -9,28 +9,28 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } num-traits = { default-features = false, version = '0.2' } orml-traits = { version = '0.4.1-dev', default-features = false } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-prices = { path = '../prices', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } serde = { version = '1.0.136', features = ['derive'], optional = true } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [dev-dependencies] orml-oracle = { version = '0.4.1-dev' } pallet-amm = { path = '../amm' } pallet-currency-adapter = { path = '../currency-adapter' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } [features] default = ['std'] diff --git a/pallets/loans/rpc/Cargo.toml b/pallets/loans/rpc/Cargo.toml index 6b96a98f9..36506f7ba 100644 --- a/pallets/loans/rpc/Cargo.toml +++ b/pallets/loans/rpc/Cargo.toml @@ -9,11 +9,11 @@ codec = { package = 'parity-scale-codec', version = '3.1.5' } jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } primitives = { package = 'parallel-primitives', path = '../../../primitives', default-features = false } serde = { version = '1.0.136', features = ['derive'] } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } pallet-loans-rpc-runtime-api = { path = 'runtime-api', default-features = false } diff --git a/pallets/loans/rpc/runtime-api/Cargo.toml b/pallets/loans/rpc/runtime-api/Cargo.toml index 10c55dd40..c31a86348 100644 --- a/pallets/loans/rpc/runtime-api/Cargo.toml +++ b/pallets/loans/rpc/runtime-api/Cargo.toml @@ -7,8 +7,8 @@ version = '1.9.4' [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', default-features = false, features = ['derive'] } primitives = { package = 'parallel-primitives', path = '../../../../primitives', default-features = false } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [features] default = ['std'] diff --git a/pallets/loans/src/benchmarking.rs b/pallets/loans/src/benchmarking.rs index 7e9ea937c..e2880a63b 100644 --- a/pallets/loans/src/benchmarking.rs +++ b/pallets/loans/src/benchmarking.rs @@ -183,7 +183,7 @@ fn set_account_borrows( T::Assets::burn_from(asset_id, &who, borrow_balance).unwrap(); } -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } diff --git a/pallets/loans/src/lib.rs b/pallets/loans/src/lib.rs index 5b16d73b3..98776d5c8 100644 --- a/pallets/loans/src/lib.rs +++ b/pallets/loans/src/lib.rs @@ -105,7 +105,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The oracle price feeder type PriceFeeder: PriceFeeder; @@ -115,11 +115,11 @@ pub mod pallet { type PalletId: Get; /// The origin which can add/reduce reserves. - type ReserveOrigin: EnsureOrigin; + type ReserveOrigin: EnsureOrigin; /// The origin which can update rate model, liquidate incentive and /// add/reduce reserves. Root can always do this. - type UpdateOrigin: EnsureOrigin; + type UpdateOrigin: EnsureOrigin; /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; diff --git a/pallets/loans/src/mock.rs b/pallets/loans/src/mock.rs index 66a742629..76477ecac 100644 --- a/pallets/loans/src/mock.rs +++ b/pallets/loans/src/mock.rs @@ -64,8 +64,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -73,7 +73,7 @@ impl frame_system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -114,7 +114,7 @@ parameter_types! { impl pallet_balances::Config for Test { type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = pallet_balances::weights::SubstrateWeight; @@ -240,7 +240,7 @@ impl SortedMembers for AliceCreatePoolOrigin { } impl pallet_amm::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = AMMPalletId; type LockAccountId = LockAccountId; @@ -254,7 +254,7 @@ impl pallet_amm::Config for Test { } impl pallet_prices::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Source = MockDataProvider; type FeederOrigin = EnsureRoot; type UpdateOrigin = EnsureRoot; @@ -315,7 +315,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -338,7 +338,7 @@ parameter_types! { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PriceFeeder = MockPriceFeeder; type PalletId = LoansPalletId; type ReserveOrigin = EnsureRoot; @@ -369,35 +369,35 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { // Init assets - Balances::set_balance(Origin::root(), DAVE, unit(1000), unit(0)).unwrap(); - Assets::force_create(Origin::root(), DOT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), KSM, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), USDT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), SDOT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), CDOT_6_13, ALICE, true, 1).unwrap(); - - Assets::mint(Origin::signed(ALICE), KSM, ALICE, unit(1000)).unwrap(); - Assets::mint(Origin::signed(ALICE), DOT, ALICE, unit(1000)).unwrap(); - Assets::mint(Origin::signed(ALICE), USDT, ALICE, unit(1000)).unwrap(); - Assets::mint(Origin::signed(ALICE), CDOT_6_13, ALICE, unit(1000)).unwrap(); - Assets::mint(Origin::signed(ALICE), KSM, BOB, unit(1000)).unwrap(); - Assets::mint(Origin::signed(ALICE), DOT, BOB, unit(1000)).unwrap(); - Assets::mint(Origin::signed(ALICE), DOT, DAVE, unit(1000)).unwrap(); - Assets::mint(Origin::signed(ALICE), USDT, DAVE, unit(1000)).unwrap(); + Balances::set_balance(RuntimeOrigin::root(), DAVE, unit(1000), unit(0)).unwrap(); + Assets::force_create(RuntimeOrigin::root(), DOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), KSM, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), USDT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SDOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), CDOT_6_13, ALICE, true, 1).unwrap(); + + Assets::mint(RuntimeOrigin::signed(ALICE), KSM, ALICE, unit(1000)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), DOT, ALICE, unit(1000)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), USDT, ALICE, unit(1000)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), CDOT_6_13, ALICE, unit(1000)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), KSM, BOB, unit(1000)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), DOT, BOB, unit(1000)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), DOT, DAVE, unit(1000)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), USDT, DAVE, unit(1000)).unwrap(); // Init Markets - Loans::add_market(Origin::root(), HKO, market_mock(PHKO)).unwrap(); - Loans::activate_market(Origin::root(), HKO).unwrap(); - Loans::add_market(Origin::root(), KSM, market_mock(PKSM)).unwrap(); - Loans::activate_market(Origin::root(), KSM).unwrap(); - Loans::add_market(Origin::root(), DOT, market_mock(PDOT)).unwrap(); - Loans::activate_market(Origin::root(), DOT).unwrap(); - Loans::add_market(Origin::root(), USDT, market_mock(PUSDT)).unwrap(); - Loans::activate_market(Origin::root(), USDT).unwrap(); - Loans::add_market(Origin::root(), CDOT_6_13, market_mock(PCDOT_6_13)).unwrap(); - Loans::activate_market(Origin::root(), CDOT_6_13).unwrap(); - - Loans::update_liquidation_free_collateral(Origin::root(), vec![CDOT_6_13]).unwrap(); + Loans::add_market(RuntimeOrigin::root(), HKO, market_mock(PHKO)).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), HKO).unwrap(); + Loans::add_market(RuntimeOrigin::root(), KSM, market_mock(PKSM)).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), KSM).unwrap(); + Loans::add_market(RuntimeOrigin::root(), DOT, market_mock(PDOT)).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), DOT).unwrap(); + Loans::add_market(RuntimeOrigin::root(), USDT, market_mock(PUSDT)).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), USDT).unwrap(); + Loans::add_market(RuntimeOrigin::root(), CDOT_6_13, market_mock(PCDOT_6_13)).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), CDOT_6_13).unwrap(); + + Loans::update_liquidation_free_collateral(RuntimeOrigin::root(), vec![CDOT_6_13]).unwrap(); System::set_block_number(0); TimestampPallet::set_timestamp(6000); diff --git a/pallets/loans/src/tests.rs b/pallets/loans/src/tests.rs index b9a8d7c37..461a27b74 100644 --- a/pallets/loans/src/tests.rs +++ b/pallets/loans/src/tests.rs @@ -75,7 +75,7 @@ fn loans_native_token_works() { ExchangeRate::::get(HKO), Rate::saturating_from_rational(2, 100) ); - assert_ok!(Loans::mint(Origin::signed(DAVE), HKO, unit(1000))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(DAVE), HKO, unit(1000))); // Redeem 1001 HKO should cause InsufficientDeposit assert_noop!( @@ -85,12 +85,20 @@ fn loans_native_token_works() { // Redeem 1000 HKO is ok assert_ok!(Loans::redeem_allowed(HKO, &DAVE, unit(50000),)); - assert_ok!(Loans::collateral_asset(Origin::signed(DAVE), HKO, true)); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(DAVE), + HKO, + true + )); // Borrow 500 HKO will reduce 500 HKO liquidity for collateral_factor is 50% - assert_ok!(Loans::borrow(Origin::signed(DAVE), HKO, unit(500))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(DAVE), HKO, unit(500))); // Repay 400 HKO - assert_ok!(Loans::repay_borrow(Origin::signed(DAVE), HKO, unit(400))); + assert_ok!(Loans::repay_borrow( + RuntimeOrigin::signed(DAVE), + HKO, + unit(400) + )); // HKO collateral: deposit = 1000 // HKO borrow balance: borrow - repay = 500 - 400 = 100 @@ -111,7 +119,7 @@ fn loans_native_token_works() { fn mint_works() { new_test_ext().execute_with(|| { // Deposit 100 DOT - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); // DOT collateral: deposit = 100 // DOT: cash - deposit = 1000 - 100 = 900 @@ -132,7 +140,7 @@ fn mint_works() { fn mint_must_return_err_when_overflows_occur() { new_test_ext().execute_with(|| { Loans::force_update_market( - Origin::root(), + RuntimeOrigin::root(), DOT, Market { supply_cap: u128::MAX, @@ -145,13 +153,13 @@ fn mint_must_return_err_when_overflows_occur() { // Verify token balance first assert_noop!( - Loans::mint(Origin::signed(CHARLIE), DOT, OVERFLOW_DEPOSIT), + Loans::mint(RuntimeOrigin::signed(CHARLIE), DOT, OVERFLOW_DEPOSIT), ArithmeticError::Underflow ); // Deposit OVERFLOW_DEPOSIT DOT for CHARLIE assert_ok!(Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), DOT, CHARLIE, OVERFLOW_DEPOSIT @@ -160,14 +168,14 @@ fn mint_must_return_err_when_overflows_occur() { // Amount is too large, OVERFLOW_DEPOSIT / 0.0X == Overflow // Underflow is used here redeem could also be 0 assert_noop!( - Loans::mint(Origin::signed(CHARLIE), DOT, OVERFLOW_DEPOSIT), + Loans::mint(RuntimeOrigin::signed(CHARLIE), DOT, OVERFLOW_DEPOSIT), ArithmeticError::Underflow ); // Exchange rate must ge greater than zero // ExchangeRate::::insert(DOT, Rate::zero()); // assert_noop!( - // Loans::mint(Origin::signed(CHARLIE), DOT, 100), + // Loans::mint(RuntimeOrigin::signed(CHARLIE), DOT, 100), // ArithmeticError::Underflow // ); }) @@ -177,10 +185,10 @@ fn mint_must_return_err_when_overflows_occur() { fn redeem_allowed_works() { new_test_ext().execute_with(|| { // Prepare: Bob Deposit 200 DOT - assert_ok!(Loans::mint(Origin::signed(BOB), DOT, 200)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), DOT, 200)); // Deposit 200 KSM as collateral - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, 200)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, 200)); // Redeem 201 KSM should cause InsufficientDeposit assert_noop!( Loans::redeem_allowed(KSM, &ALICE, 10050), @@ -194,9 +202,13 @@ fn redeem_allowed_works() { // Redeem 200 KSM is ok assert_ok!(Loans::redeem_allowed(KSM, &ALICE, 10000)); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), KSM, true)); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + KSM, + true + )); // Borrow 50 DOT will reduce 100 KSM liquidity for collateral_factor is 50% - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, 50)); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, 50)); // Redeem 101 KSM should cause InsufficientLiquidity assert_noop!( Loans::redeem_allowed(KSM, &ALICE, 5050), @@ -211,23 +223,23 @@ fn redeem_allowed_works() { fn lf_redeem_allowed_works() { new_test_ext().execute_with(|| { // Set CDOT as lf collateral - Loans::update_liquidation_free_collateral(Origin::root(), vec![CDOT_6_13]).unwrap(); - Loans::mint(Origin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); + Loans::update_liquidation_free_collateral(RuntimeOrigin::root(), vec![CDOT_6_13]).unwrap(); + Loans::mint(RuntimeOrigin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); - Loans::mint(Origin::signed(DAVE), USDT, unit(200)).unwrap(); - Loans::mint(Origin::signed(DAVE), DOT, unit(200)).unwrap(); + Loans::mint(RuntimeOrigin::signed(DAVE), USDT, unit(200)).unwrap(); + Loans::mint(RuntimeOrigin::signed(DAVE), DOT, unit(200)).unwrap(); // Lend $200 CDOT - Loans::collateral_asset(Origin::signed(ALICE), CDOT_6_13, true).unwrap(); + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), CDOT_6_13, true).unwrap(); - Loans::borrow(Origin::signed(ALICE), DOT, unit(50)).unwrap(); + Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(50)).unwrap(); // (200 - 100) * 50% >= 50 assert_ok!(Loans::redeem_allowed(CDOT_6_13, &ALICE, unit(100))); // Set KSM as collateral, and borrow USDT - Loans::mint(Origin::signed(ALICE), KSM, unit(200)).unwrap(); - Loans::collateral_asset(Origin::signed(ALICE), KSM, true).unwrap(); - Loans::borrow(Origin::signed(ALICE), USDT, unit(100)).unwrap(); + Loans::mint(RuntimeOrigin::signed(ALICE), KSM, unit(200)).unwrap(); + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), KSM, true).unwrap(); + Loans::borrow(RuntimeOrigin::signed(ALICE), USDT, unit(100)).unwrap(); assert_err!( Loans::redeem_allowed(KSM, &ALICE, unit(100)), @@ -237,7 +249,7 @@ fn lf_redeem_allowed_works() { assert_ok!(Loans::redeem_allowed(CDOT_6_13, &ALICE, unit(100))); // Remove CDOT from lf collateral - Loans::update_liquidation_free_collateral(Origin::root(), vec![]).unwrap(); + Loans::update_liquidation_free_collateral(RuntimeOrigin::root(), vec![]).unwrap(); // Then it can be redeemed assert_ok!(Loans::redeem_allowed(KSM, &ALICE, unit(100))); }) @@ -246,8 +258,8 @@ fn lf_redeem_allowed_works() { #[test] fn redeem_works() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::redeem(Origin::signed(ALICE), DOT, unit(20))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, unit(20))); // DOT collateral: deposit - redeem = 100 - 20 = 80 // DOT: cash - deposit + redeem = 1000 - 100 + 20 = 920 @@ -264,7 +276,7 @@ fn redeem_works() { fn redeem_fails() { new_test_ext().execute_with(|| { assert_noop!( - Loans::redeem(Origin::signed(ALICE), DOT, unit(0)), + Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, unit(0)), Error::::InvalidAmount ); }) @@ -274,17 +286,21 @@ fn redeem_fails() { fn redeem_fails_when_insufficient_liquidity() { new_test_ext().execute_with(|| { // Prepare: Bob Deposit 200 DOT - assert_ok!(Loans::mint(Origin::signed(BOB), DOT, 200)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), DOT, 200)); // Deposit 200 KSM as collateral - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, 200)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, 200)); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), KSM, true)); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + KSM, + true + )); // Borrow 50 DOT will reduce 100 KSM liquidity for collateral_factor is 50% - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, 50)); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, 50)); assert_noop!( - Loans::redeem(Origin::signed(BOB), DOT, 151), + Loans::redeem(RuntimeOrigin::signed(BOB), DOT, 151), Error::::InsufficientCash ); }) @@ -294,18 +310,22 @@ fn redeem_fails_when_insufficient_liquidity() { fn redeem_fails_when_would_use_reserved_balanace() { new_test_ext().execute_with(|| { // Prepare: Bob Deposit 200 DOT - assert_ok!(Loans::mint(Origin::signed(BOB), DOT, 200)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), DOT, 200)); // Deposit 200 KSM as collateral - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, 200)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, 200)); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), KSM, true)); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + KSM, + true + )); // Borrow 50 DOT will reduce 100 KSM liquidity for collateral_factor is 50% - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, 50)); - assert_ok!(Loans::add_reserves(Origin::root(), ALICE, DOT, 50)); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, 50)); + assert_ok!(Loans::add_reserves(RuntimeOrigin::root(), ALICE, DOT, 50)); assert_noop!( - Loans::redeem(Origin::signed(BOB), DOT, 151), + Loans::redeem(RuntimeOrigin::signed(BOB), DOT, 151), Error::::InsufficientCash ); }) @@ -317,14 +337,14 @@ fn redeem_must_return_err_when_overflows_occur() { // Amount is too large, max_value / 0.0X == Overflow // Underflow is used here redeem could also be 0 assert_noop!( - Loans::redeem(Origin::signed(ALICE), DOT, u128::MAX), + Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, u128::MAX), ArithmeticError::Underflow, ); // Exchange rate must ge greater than zero // ExchangeRate::::insert(DOT, Rate::zero()); // assert_noop!( - // Loans::redeem(Origin::signed(ALICE), DOT, 100), + // Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, 100), // ArithmeticError::Underflow // ); }) @@ -333,8 +353,8 @@ fn redeem_must_return_err_when_overflows_occur() { #[test] fn redeem_all_works() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::redeem_all(Origin::signed(ALICE), DOT)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::redeem_all(RuntimeOrigin::signed(ALICE), DOT)); // DOT: cash - deposit + redeem = 1000 - 100 + 100 = 1000 // DOT collateral: deposit - redeem = 100 - 100 = 0 @@ -352,9 +372,13 @@ fn redeem_all_works() { fn borrow_allowed_works() { new_test_ext().execute_with(|| { // Deposit 200 DOT as collateral - assert_ok!(Loans::mint(Origin::signed(BOB), DOT, 200)); - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, 200)); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), KSM, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), DOT, 200)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, 200)); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + KSM, + true + )); // Borrow 101 DOT should cause InsufficientLiquidity assert_noop!( Loans::borrow_allowed(DOT, &ALICE, 101), @@ -365,7 +389,7 @@ fn borrow_allowed_works() { // Set borrow limit to 10 assert_ok!(Loans::force_update_market( - Origin::root(), + RuntimeOrigin::root(), DOT, Market { borrow_cap: 10, @@ -386,7 +410,7 @@ fn borrow_allowed_works() { fn update_liquidation_free_collateral_works() { new_test_ext().execute_with(|| { assert_ok!(Loans::update_liquidation_free_collateral( - Origin::root(), + RuntimeOrigin::root(), vec![CDOT_6_13] )); assert_eq!(Loans::liquidation_free_collaterals(), vec![CDOT_6_13]); @@ -396,8 +420,8 @@ fn update_liquidation_free_collateral_works() { #[test] fn get_account_liquidity_works() { new_test_ext().execute_with(|| { - Loans::mint(Origin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); - Loans::collateral_asset(Origin::signed(ALICE), CDOT_6_13, true).unwrap(); + Loans::mint(RuntimeOrigin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), CDOT_6_13, true).unwrap(); let (liquidity, _, lf_liquidity, _) = Loans::get_account_liquidity(&ALICE).unwrap(); @@ -409,17 +433,17 @@ fn get_account_liquidity_works() { #[test] fn get_account_liquidation_threshold_liquidity_works() { new_test_ext().execute_with(|| { - Loans::mint(Origin::signed(BOB), DOT, unit(200)).unwrap(); - Loans::mint(Origin::signed(BOB), KSM, unit(200)).unwrap(); + Loans::mint(RuntimeOrigin::signed(BOB), DOT, unit(200)).unwrap(); + Loans::mint(RuntimeOrigin::signed(BOB), KSM, unit(200)).unwrap(); - Loans::mint(Origin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); - Loans::collateral_asset(Origin::signed(ALICE), CDOT_6_13, true).unwrap(); + Loans::mint(RuntimeOrigin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), CDOT_6_13, true).unwrap(); - Loans::mint(Origin::signed(ALICE), USDT, unit(200)).unwrap(); - Loans::collateral_asset(Origin::signed(ALICE), USDT, true).unwrap(); + Loans::mint(RuntimeOrigin::signed(ALICE), USDT, unit(200)).unwrap(); + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), USDT, true).unwrap(); - Loans::borrow(Origin::signed(ALICE), KSM, unit(100)).unwrap(); - Loans::borrow(Origin::signed(ALICE), DOT, unit(100)).unwrap(); + Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(100)).unwrap(); + Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(100)).unwrap(); let (liquidity, _, lf_liquidity, _) = Loans::get_account_liquidation_threshold_liquidity(&ALICE).unwrap(); @@ -440,11 +464,11 @@ fn get_account_liquidation_threshold_liquidity_works() { #[test] fn lf_borrow_allowed_works() { new_test_ext().execute_with(|| { - Loans::mint(Origin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); - Loans::mint(Origin::signed(DAVE), USDT, unit(200)).unwrap(); - Loans::mint(Origin::signed(DAVE), DOT, unit(200)).unwrap(); + Loans::mint(RuntimeOrigin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); + Loans::mint(RuntimeOrigin::signed(DAVE), USDT, unit(200)).unwrap(); + Loans::mint(RuntimeOrigin::signed(DAVE), DOT, unit(200)).unwrap(); // Lend $200 CDOT - Loans::collateral_asset(Origin::signed(ALICE), CDOT_6_13, true).unwrap(); + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), CDOT_6_13, true).unwrap(); assert_eq!( Loans::get_asset_value(DOT, unit(100)).unwrap(), @@ -463,10 +487,14 @@ fn lf_borrow_allowed_works() { fn borrow_works() { new_test_ext().execute_with(|| { // Deposit 200 DOT as collateral - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); // Borrow 100 DOT - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(100))); // DOT collateral: deposit = 200 // DOT borrow balance: borrow = 100 @@ -487,12 +515,12 @@ fn borrow_works() { fn lf_borrow_works() { new_test_ext().execute_with(|| { // Deposit 200 DOT as collateral - Loans::mint(Origin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); - Loans::mint(Origin::signed(DAVE), DOT, unit(200)).unwrap(); - Loans::collateral_asset(Origin::signed(ALICE), CDOT_6_13, true).unwrap(); + Loans::mint(RuntimeOrigin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); + Loans::mint(RuntimeOrigin::signed(DAVE), DOT, unit(200)).unwrap(); + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), CDOT_6_13, true).unwrap(); // Borrow 100 DOT - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(100))); // CDOT collateral: deposit = 200 // DOT borrow balance: borrow = 100 @@ -513,12 +541,20 @@ fn lf_borrow_works() { fn repay_borrow_works() { new_test_ext().execute_with(|| { // Deposit 200 DOT as collateral - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); // Borrow 100 DOT - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(100))); // Repay 30 DOT - assert_ok!(Loans::repay_borrow(Origin::signed(ALICE), DOT, unit(30))); + assert_ok!(Loans::repay_borrow( + RuntimeOrigin::signed(ALICE), + DOT, + unit(30) + )); // DOT collateral: deposit = 200 // DOT borrow balance: borrow - repay = 100 - 30 = 70 @@ -539,15 +575,19 @@ fn repay_borrow_works() { fn repay_borrow_all_works() { new_test_ext().execute_with(|| { // Bob deposits 200 KSM - assert_ok!(Loans::mint(Origin::signed(BOB), KSM, unit(200))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), KSM, unit(200))); // Alice deposit 200 DOT as collateral - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); // Alice borrow 50 KSM - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(50))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(50))); // Alice repay all borrow balance - assert_ok!(Loans::repay_borrow_all(Origin::signed(ALICE), KSM)); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(ALICE), KSM)); // DOT: cash - deposit + = 1000 - 200 = 800 // DOT collateral: deposit = 200 @@ -570,29 +610,37 @@ fn collateral_asset_works() { new_test_ext().execute_with(|| { // No collateral assets assert_noop!( - Loans::collateral_asset(Origin::signed(ALICE), DOT, true), + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), DOT, true), Error::::NoDeposit ); // Deposit 200 DOT as collateral - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, 200)); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, 200)); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); assert_eq!(Loans::account_deposits(DOT, ALICE).is_collateral, true); assert_noop!( - Loans::collateral_asset(Origin::signed(ALICE), DOT, true), + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), DOT, true), Error::::DuplicateOperation ); // Borrow 100 DOT base on the collateral of 200 DOT - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, 100)); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, 100)); assert_noop!( - Loans::collateral_asset(Origin::signed(ALICE), DOT, false), + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), DOT, false), Error::::InsufficientLiquidity ); // Repay all the borrows - assert_ok!(Loans::repay_borrow_all(Origin::signed(ALICE), DOT)); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, false)); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(ALICE), DOT)); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + false + )); assert_eq!(Loans::account_deposits(DOT, ALICE).is_collateral, false); assert_noop!( - Loans::collateral_asset(Origin::signed(ALICE), DOT, false), + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), DOT, false), Error::::DuplicateOperation ); }) @@ -603,11 +651,19 @@ fn total_collateral_value_works() { new_test_ext().execute_with(|| { // Mock the price for DOT = 1, KSM = 1 let collateral_factor = Rate::saturating_from_rational(50, 100); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, unit(200))); - assert_ok!(Loans::mint(Origin::signed(ALICE), USDT, unit(300))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), KSM, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, unit(200))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), USDT, unit(300))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + KSM, + true + )); assert_eq!( Loans::total_collateral_value(&ALICE).unwrap(), (collateral_factor.saturating_mul(FixedU128::from_inner(unit(100) + unit(200)))) @@ -619,7 +675,12 @@ fn total_collateral_value_works() { fn add_reserves_works() { new_test_ext().execute_with(|| { // Add 100 DOT reserves - assert_ok!(Loans::add_reserves(Origin::root(), ALICE, DOT, unit(100))); + assert_ok!(Loans::add_reserves( + RuntimeOrigin::root(), + ALICE, + DOT, + unit(100) + )); assert_eq!(Loans::total_reserves(DOT), unit(100)); assert_eq!( @@ -634,10 +695,20 @@ fn add_reserves_works() { fn reduce_reserves_works() { new_test_ext().execute_with(|| { // Add 100 DOT reserves - assert_ok!(Loans::add_reserves(Origin::root(), ALICE, DOT, unit(100))); + assert_ok!(Loans::add_reserves( + RuntimeOrigin::root(), + ALICE, + DOT, + unit(100) + )); // Reduce 20 DOT reserves - assert_ok!(Loans::reduce_reserves(Origin::root(), ALICE, DOT, unit(20))); + assert_ok!(Loans::reduce_reserves( + RuntimeOrigin::root(), + ALICE, + DOT, + unit(20) + )); assert_eq!(Loans::total_reserves(DOT), unit(80)); assert_eq!( @@ -651,9 +722,14 @@ fn reduce_reserves_works() { #[test] fn reduce_reserve_reduce_amount_must_be_less_than_total_reserves() { new_test_ext().execute_with(|| { - assert_ok!(Loans::add_reserves(Origin::root(), ALICE, DOT, unit(100))); + assert_ok!(Loans::add_reserves( + RuntimeOrigin::root(), + ALICE, + DOT, + unit(100) + )); assert_noop!( - Loans::reduce_reserves(Origin::root(), ALICE, DOT, unit(200)), + Loans::reduce_reserves(RuntimeOrigin::root(), ALICE, DOT, unit(200)), Error::::InsufficientReserves ); }) @@ -786,7 +862,7 @@ fn update_exchange_rate_works() { // exchange_rate = total_cash + total_borrows - total_reverse / total_supply // total_cash = 10, total_supply = 500 // exchange_rate = 10 + 5 - 1 / 500 - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(10))); TotalBorrows::::insert(DOT, unit(5)); TotalReserves::::insert(DOT, unit(1)); // assert_ok!(Loans::update_exchange_rate(DOT)); @@ -874,7 +950,7 @@ fn get_price_works() { fn ensure_enough_cash_works() { new_test_ext().execute_with(|| { assert_ok!(Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), KSM, Loans::account_id(), unit(1000) @@ -921,10 +997,10 @@ fn withdraw_missing_reward_works() { new_test_ext().execute_with(|| { assert_eq!(::Assets::balance(HKO, &DAVE), unit(1000)); - assert_ok!(Loans::add_reward(Origin::signed(DAVE), unit(100))); + assert_ok!(Loans::add_reward(RuntimeOrigin::signed(DAVE), unit(100))); assert_ok!(Loans::withdraw_missing_reward( - Origin::root(), + RuntimeOrigin::root(), ALICE, unit(40), )); @@ -947,7 +1023,7 @@ fn update_market_reward_speed_works() { assert_eq!(Loans::reward_borrow_speed(DOT), 0); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(unit(1)), Some(unit(2)), @@ -956,7 +1032,7 @@ fn update_market_reward_speed_works() { assert_eq!(Loans::reward_borrow_speed(DOT), unit(2)); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(unit(2)), Some(0), @@ -965,7 +1041,7 @@ fn update_market_reward_speed_works() { assert_eq!(Loans::reward_borrow_speed(DOT), unit(0)); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(0), Some(0) @@ -978,16 +1054,24 @@ fn update_market_reward_speed_works() { #[test] fn reward_calculation_one_palyer_in_multi_markets_works() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, unit(100))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), KSM, true)); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(10))); - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(10))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, unit(100))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + KSM, + true + )); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(10))); _run_to_block(10); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(unit(1)), Some(unit(2)), @@ -1007,9 +1091,9 @@ fn reward_calculation_one_palyer_in_multi_markets_works() { assert_eq!(Loans::reward_accrued(ALICE), 0); _run_to_block(20); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), KSM, Some(unit(1)), Some(unit(1)), @@ -1029,15 +1113,15 @@ fn reward_calculation_one_palyer_in_multi_markets_works() { _run_to_block(30); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(0), Some(0) )); - assert_ok!(Loans::redeem(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(10))); - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, unit(100))); - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(10))); + assert_ok!(Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(10))); let supply_state = Loans::reward_supply_state(DOT); assert_eq!(supply_state.block, 30); @@ -1051,15 +1135,15 @@ fn reward_calculation_one_palyer_in_multi_markets_works() { _run_to_block(40); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), KSM, Some(0), Some(0) )); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(10))); - assert_ok!(Loans::redeem(Origin::signed(ALICE), KSM, unit(100))); - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(10))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::redeem(RuntimeOrigin::signed(ALICE), KSM, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(10))); let supply_state = Loans::reward_supply_state(DOT); assert_eq!(supply_state.block, 40); @@ -1073,15 +1157,15 @@ fn reward_calculation_one_palyer_in_multi_markets_works() { _run_to_block(50); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(unit(1)), Some(unit(1)), )); - assert_ok!(Loans::redeem(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::repay_borrow_all(Origin::signed(ALICE), DOT)); - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, unit(100))); - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(10))); + assert_ok!(Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(ALICE), DOT)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(10))); let supply_state = Loans::reward_supply_state(DOT); assert_eq!(supply_state.block, 50); @@ -1095,14 +1179,14 @@ fn reward_calculation_one_palyer_in_multi_markets_works() { _run_to_block(60); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), KSM, Some(unit(1)), Some(unit(1)), )); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::redeem(Origin::signed(ALICE), KSM, unit(100))); - assert_ok!(Loans::repay_borrow_all(Origin::signed(ALICE), KSM)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::redeem(RuntimeOrigin::signed(ALICE), KSM, unit(100))); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(ALICE), KSM)); let supply_state = Loans::reward_supply_state(DOT); assert_eq!(supply_state.block, 60); @@ -1116,19 +1200,19 @@ fn reward_calculation_one_palyer_in_multi_markets_works() { _run_to_block(70); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(0), Some(0) )); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), KSM, Some(0), Some(0) )); - assert_ok!(Loans::redeem(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, unit(100))); + assert_ok!(Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, unit(100))); let supply_state = Loans::reward_supply_state(DOT); assert_eq!(supply_state.block, 70); @@ -1141,8 +1225,8 @@ fn reward_calculation_one_palyer_in_multi_markets_works() { assert_eq!(almost_equal(Loans::reward_accrued(ALICE), unit(130)), true); _run_to_block(80); - assert_ok!(Loans::add_reward(Origin::signed(DAVE), unit(200))); - assert_ok!(Loans::claim_reward(Origin::signed(ALICE))); + assert_ok!(Loans::add_reward(RuntimeOrigin::signed(DAVE), unit(200))); + assert_ok!(Loans::claim_reward(RuntimeOrigin::signed(ALICE))); assert_eq!(::Assets::balance(HKO, &DAVE), unit(800)); assert_eq!( almost_equal(::Assets::balance(HKO, &ALICE), unit(130)), @@ -1156,7 +1240,7 @@ fn reward_calculation_one_palyer_in_multi_markets_works() { true ); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(unit(1)), Some(0), @@ -1167,7 +1251,7 @@ fn reward_calculation_one_palyer_in_multi_markets_works() { // KSM supply:600 KSM supply reward: 30 // KSM borrow:0 KSM borrow reward: 20 _run_to_block(90); - assert_ok!(Loans::claim_reward(Origin::signed(ALICE))); + assert_ok!(Loans::claim_reward(RuntimeOrigin::signed(ALICE))); assert_eq!( almost_equal(::Assets::balance(HKO, &ALICE), unit(140)), true @@ -1178,14 +1262,22 @@ fn reward_calculation_one_palyer_in_multi_markets_works() { #[test] fn reward_calculation_multi_player_in_one_market_works() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(10))); - assert_ok!(Loans::mint(Origin::signed(BOB), DOT, unit(10))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::collateral_asset(Origin::signed(BOB), DOT, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), DOT, unit(10))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(BOB), + DOT, + true + )); _run_to_block(10); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(unit(1)), Some(unit(1)), @@ -1198,8 +1290,8 @@ fn reward_calculation_multi_player_in_one_market_works() { assert_eq!(Loans::reward_accrued(BOB), 0); _run_to_block(20); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(70))); - assert_ok!(Loans::mint(Origin::signed(BOB), DOT, unit(10))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(70))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), DOT, unit(10))); // Alice supply:80 supply reward: 5 // Alice borrow:0 borrow reward: 0 // BOB supply:20 supply reward: 5 @@ -1208,10 +1300,10 @@ fn reward_calculation_multi_player_in_one_market_works() { assert_eq!(Loans::reward_accrued(BOB), unit(5)); _run_to_block(30); - assert_ok!(Loans::redeem(Origin::signed(ALICE), DOT, unit(70))); - assert_ok!(Loans::redeem(Origin::signed(BOB), DOT, unit(10))); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(1))); - assert_ok!(Loans::borrow(Origin::signed(BOB), DOT, unit(1))); + assert_ok!(Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, unit(70))); + assert_ok!(Loans::redeem(RuntimeOrigin::signed(BOB), DOT, unit(10))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(1))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(BOB), DOT, unit(1))); // Alice supply:10 supply reward: 13 // Alice borrow:1 borrow reward: 0 // BOB supply:10 supply reward: 7 @@ -1220,10 +1312,10 @@ fn reward_calculation_multi_player_in_one_market_works() { assert_eq!(Loans::reward_accrued(BOB), unit(7)); _run_to_block(40); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(10))); - assert_ok!(Loans::mint(Origin::signed(BOB), DOT, unit(10))); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(1))); - assert_ok!(Loans::repay_borrow_all(Origin::signed(BOB), DOT)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), DOT, unit(10))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(1))); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(BOB), DOT)); // Alice supply:20 supply reward: 18 // Alice borrow:2 borrow reward: 5 // BOB supply:20 supply reward: 12 @@ -1232,10 +1324,10 @@ fn reward_calculation_multi_player_in_one_market_works() { assert_eq!(almost_equal(Loans::reward_accrued(BOB), unit(17)), true); _run_to_block(50); - assert_ok!(Loans::redeem(Origin::signed(ALICE), DOT, unit(10))); - assert_ok!(Loans::redeem_all(Origin::signed(BOB), DOT)); - assert_ok!(Loans::repay_borrow_all(Origin::signed(ALICE), DOT)); - assert_ok!(Loans::repay_borrow_all(Origin::signed(BOB), DOT)); + assert_ok!(Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::redeem_all(RuntimeOrigin::signed(BOB), DOT)); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(ALICE), DOT)); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(BOB), DOT)); // Alice supply:10 supply reward: 23 // Alice borrow:0 borrow reward: 15 // BOB supply:0 supply reward: 17 @@ -1244,10 +1336,10 @@ fn reward_calculation_multi_player_in_one_market_works() { assert_eq!(almost_equal(Loans::reward_accrued(BOB), unit(22)), true); _run_to_block(60); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(10))); - assert_ok!(Loans::redeem_all(Origin::signed(BOB), DOT)); - assert_ok!(Loans::repay_borrow_all(Origin::signed(ALICE), DOT)); - assert_ok!(Loans::repay_borrow_all(Origin::signed(BOB), DOT)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::redeem_all(RuntimeOrigin::signed(BOB), DOT)); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(ALICE), DOT)); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(BOB), DOT)); // Alice supply:10 supply reward: 33 // Alice borrow:0 borrow reward: 15 // BOB supply:0 supply reward: 17 @@ -1256,9 +1348,15 @@ fn reward_calculation_multi_player_in_one_market_works() { assert_eq!(almost_equal(Loans::reward_accrued(BOB), unit(22)), true); _run_to_block(70); - assert_ok!(Loans::add_reward(Origin::signed(DAVE), unit(200))); - assert_ok!(Loans::claim_reward_for_market(Origin::signed(ALICE), DOT)); - assert_ok!(Loans::claim_reward_for_market(Origin::signed(BOB), DOT)); + assert_ok!(Loans::add_reward(RuntimeOrigin::signed(DAVE), unit(200))); + assert_ok!(Loans::claim_reward_for_market( + RuntimeOrigin::signed(ALICE), + DOT + )); + assert_ok!(Loans::claim_reward_for_market( + RuntimeOrigin::signed(BOB), + DOT + )); assert_eq!(::Assets::balance(HKO, &DAVE), unit(800)); assert_eq!( almost_equal(::Assets::balance(HKO, &ALICE), unit(58)), @@ -1281,22 +1379,30 @@ fn reward_calculation_multi_player_in_one_market_works() { #[test] fn reward_calculation_after_liquidate_borrow_works() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::mint(Origin::signed(BOB), KSM, unit(500))); - assert_ok!(Loans::collateral_asset(Origin::signed(BOB), KSM, true)); - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(50))); - assert_ok!(Loans::borrow(Origin::signed(BOB), KSM, unit(75))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), KSM, unit(500))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(BOB), + KSM, + true + )); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(50))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(BOB), KSM, unit(75))); _run_to_block(10); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(unit(1)), Some(unit(1)), )); assert_ok!(Loans::update_market_reward_speed( - Origin::root(), + RuntimeOrigin::root(), KSM, Some(unit(1)), Some(unit(1)), @@ -1324,7 +1430,7 @@ fn reward_calculation_after_liquidate_borrow_works() { // since we set liquidate_threshold more than collateral_factor,with KSM price as 2 alice not shortfall yet. // so we can not liquidate_borrow here assert_noop!( - Loans::liquidate_borrow(Origin::signed(BOB), ALICE, KSM, unit(25), DOT), + Loans::liquidate_borrow(RuntimeOrigin::signed(BOB), ALICE, KSM, unit(25), DOT), Error::::InsufficientShortfall ); // then we change KSM price = 3 to make alice shortfall @@ -1337,7 +1443,7 @@ fn reward_calculation_after_liquidate_borrow_works() { // incentive_reward_account DOT Deposit: 75*0.03 = 2.25 MockPriceFeeder::set_price(KSM, 3.into()); assert_ok!(Loans::liquidate_borrow( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), ALICE, KSM, unit(25), diff --git a/pallets/loans/src/tests/edge_cases.rs b/pallets/loans/src/tests/edge_cases.rs index d5f054b11..671932058 100644 --- a/pallets/loans/src/tests/edge_cases.rs +++ b/pallets/loans/src/tests/edge_cases.rs @@ -7,18 +7,18 @@ use sp_runtime::FixedPointNumber; #[test] fn exceeded_supply_cap() { new_test_ext().execute_with(|| { - Assets::mint(Origin::signed(ALICE), DOT, ALICE, million_unit(1001)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), DOT, ALICE, million_unit(1001)).unwrap(); let amount = million_unit(501); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, amount)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, amount)); // Exceed upper bound. assert_err!( - Loans::mint(Origin::signed(ALICE), DOT, amount), + Loans::mint(RuntimeOrigin::signed(ALICE), DOT, amount), Error::::SupplyCapacityExceeded ); - Loans::redeem(Origin::signed(ALICE), DOT, amount).unwrap(); + Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, amount).unwrap(); // Here should work, cause we redeemed already. - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, amount)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, amount)); }) } @@ -26,11 +26,19 @@ fn exceeded_supply_cap() { fn repay_borrow_all_no_underflow() { new_test_ext().execute_with(|| { // Alice deposits 200 KSM as collateral - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), KSM, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + KSM, + true + )); // Alice borrow only 1/1e5 KSM which is hard to accrue total borrows interest in 100 seconds - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, 10_u128.pow(7))); + assert_ok!(Loans::borrow( + RuntimeOrigin::signed(ALICE), + KSM, + 10_u128.pow(7) + )); accrue_interest_per_block(KSM, 100, 9); @@ -41,7 +49,7 @@ fn repay_borrow_all_no_underflow() { assert_eq!(Loans::total_borrows(KSM), 10000000); // Alice repay all borrow balance. total_borrows = total_borrows.saturating_sub(10000005) = 0. - assert_ok!(Loans::repay_borrow_all(Origin::signed(ALICE), KSM)); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(ALICE), KSM)); assert_eq!(Assets::balance(KSM, &ALICE), unit(800) - 5); @@ -70,9 +78,13 @@ fn ensure_capacity_fails_when_market_not_existed() { #[test] fn redeem_all_should_be_accurate() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), KSM, true)); - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(50))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + KSM, + true + )); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(50))); // let exchange_rate greater than 0.02 accrue_interest_per_block(KSM, 6, 2); @@ -81,9 +93,9 @@ fn redeem_all_should_be_accurate() { Rate::from_inner(20000000036387000) ); - assert_ok!(Loans::repay_borrow_all(Origin::signed(ALICE), KSM)); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(ALICE), KSM)); // It failed with InsufficientLiquidity before #839 - assert_ok!(Loans::redeem_all(Origin::signed(ALICE), KSM)); + assert_ok!(Loans::redeem_all(RuntimeOrigin::signed(ALICE), KSM)); }) } @@ -99,7 +111,7 @@ fn prevent_the_exchange_rate_attack() { false )); // Eve deposits a small amount - assert_ok!(Loans::mint(Origin::signed(EVE), DOT, 1)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(EVE), DOT, 1)); // !!! Eve transfer a big amount to Loans::account_id assert_ok!(::Assets::transfer( DOT, @@ -128,7 +140,7 @@ fn prevent_the_exchange_rate_attack() { ); // Bob can not deposit 0.1 DOT because the voucher_balance can not be 0. assert_noop!( - Loans::mint(Origin::signed(BOB), DOT, 100000000000), + Loans::mint(RuntimeOrigin::signed(BOB), DOT, 100000000000), Error::::InvalidExchangeRate ); }) diff --git a/pallets/loans/src/tests/interest_rate.rs b/pallets/loans/src/tests/interest_rate.rs index d0c535062..d97510ff5 100644 --- a/pallets/loans/src/tests/interest_rate.rs +++ b/pallets/loans/src/tests/interest_rate.rs @@ -35,16 +35,28 @@ fn interest_rate_model_works() { new_test_ext().execute_with(|| { let rate_decimal: u128 = 1_000_000_000_000_000_000; Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), DOT, ALICE, million_unit(1000) - unit(1000), ) .unwrap(); // Deposit 200 DOT and borrow 100 DOT - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, million_unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, million_unit(100))); + assert_ok!(Loans::mint( + RuntimeOrigin::signed(ALICE), + DOT, + million_unit(200) + )); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::borrow( + RuntimeOrigin::signed(ALICE), + DOT, + million_unit(100) + )); let total_cash = million_unit(200) - million_unit(100); let total_supply = @@ -130,13 +142,17 @@ fn last_accrued_interest_time_should_be_update_correctly() { new_test_ext().execute_with(|| { assert_eq!(Loans::borrow_index(DOT), Rate::one()); assert_eq!(Loans::last_accrued_interest_time(DOT), 0); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); assert_eq!(Loans::last_accrued_interest_time(DOT), 6); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(100))); assert_eq!(Loans::borrow_index(DOT), Rate::one()); TimestampPallet::set_timestamp(12000); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); assert_eq!( Loans::borrow_index(DOT), Rate::from_inner(1000000013318112633), @@ -147,12 +163,16 @@ fn last_accrued_interest_time_should_be_update_correctly() { #[test] fn accrue_interest_works_after_mint() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(100))); assert_eq!(Loans::borrow_index(DOT), Rate::one()); TimestampPallet::set_timestamp(12000); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(100))); assert_eq!( Loans::borrow_index(DOT), Rate::from_inner(1000000013318112633), @@ -163,11 +183,15 @@ fn accrue_interest_works_after_mint() { #[test] fn accrue_interest_works_after_borrow() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); assert_eq!(Loans::borrow_index(DOT), Rate::one()); TimestampPallet::set_timestamp(12000); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(100))); assert_eq!( Loans::borrow_index(DOT), Rate::from_inner(1000000003805175038), @@ -178,12 +202,16 @@ fn accrue_interest_works_after_borrow() { #[test] fn accrue_interest_works_after_redeem() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(10))); assert_eq!(Loans::borrow_index(DOT), Rate::one()); TimestampPallet::set_timestamp(12000); - assert_ok!(Loans::redeem(Origin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::redeem(RuntimeOrigin::signed(ALICE), DOT, unit(10))); assert_eq!( Loans::borrow_index(DOT), Rate::from_inner(1000000004756468797), @@ -203,13 +231,17 @@ fn accrue_interest_works_after_redeem() { #[test] fn accrue_interest_works_after_redeem_all() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(BOB), DOT, unit(20))); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), DOT, unit(20))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(10))); assert_eq!(Loans::borrow_index(DOT), Rate::one()); TimestampPallet::set_timestamp(12000); - assert_ok!(Loans::redeem_all(Origin::signed(BOB), DOT)); + assert_ok!(Loans::redeem_all(RuntimeOrigin::signed(BOB), DOT)); assert_eq!( Loans::borrow_index(DOT), Rate::from_inner(1000000004669977168), @@ -230,12 +262,20 @@ fn accrue_interest_works_after_redeem_all() { #[test] fn accrue_interest_works_after_repay() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(20))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(20))); assert_eq!(Loans::borrow_index(DOT), Rate::one()); TimestampPallet::set_timestamp(12000); - assert_ok!(Loans::repay_borrow(Origin::signed(ALICE), DOT, unit(10))); + assert_ok!(Loans::repay_borrow( + RuntimeOrigin::signed(ALICE), + DOT, + unit(10) + )); assert_eq!( Loans::borrow_index(DOT), Rate::from_inner(1000000005707762557), @@ -246,13 +286,17 @@ fn accrue_interest_works_after_repay() { #[test] fn accrue_interest_works_after_repay_all() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(BOB), KSM, unit(200))); - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(50))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), KSM, unit(200))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(50))); assert_eq!(Loans::borrow_index(KSM), Rate::one()); TimestampPallet::set_timestamp(12000); - assert_ok!(Loans::repay_borrow_all(Origin::signed(ALICE), KSM)); + assert_ok!(Loans::repay_borrow_all(RuntimeOrigin::signed(ALICE), KSM)); assert_eq!( Loans::borrow_index(KSM), Rate::from_inner(1000000008561643835), @@ -271,13 +315,17 @@ fn accrue_interest_works_after_repay_all() { fn accrue_interest_works_after_liquidate_borrow() { new_test_ext().execute_with(|| { // Bob deposits 200 KSM - assert_ok!(Loans::mint(Origin::signed(BOB), KSM, unit(200))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), KSM, unit(200))); // Alice deposits 300 DOT as collateral - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(300))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(300))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); // Alice borrows 100 KSM and 50 DOT - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(100))); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(50))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(50))); assert_eq!(Loans::borrow_index(DOT), Rate::one()); assert_eq!(Loans::borrow_index(KSM), Rate::one()); TimestampPallet::set_timestamp(12000); @@ -285,7 +333,7 @@ fn accrue_interest_works_after_liquidate_borrow() { MockPriceFeeder::set_price(KSM, 2.into()); // BOB repay the KSM loan and get DOT callateral from ALICE assert_ok!(Loans::liquidate_borrow( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), ALICE, KSM, unit(50), @@ -305,15 +353,23 @@ fn accrue_interest_works_after_liquidate_borrow() { #[test] fn different_markets_can_accrue_interest_in_one_block() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::mint(Origin::signed(ALICE), KSM, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), KSM, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), KSM, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + KSM, + true + )); assert_eq!(Loans::borrow_index(DOT), Rate::one()); assert_eq!(Loans::borrow_index(KSM), Rate::one()); TimestampPallet::set_timestamp(12000); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(100))); assert_eq!( Loans::borrow_index(DOT), Rate::from_inner(1000000003805175038), @@ -328,14 +384,22 @@ fn different_markets_can_accrue_interest_in_one_block() { #[test] fn a_market_can_only_accrue_interest_once_in_a_block() { new_test_ext().execute_with(|| { - assert_ok!(Loans::mint(Origin::signed(ALICE), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), DOT, true)); - assert_ok!(Loans::mint(Origin::signed(BOB), DOT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(BOB), DOT, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), + DOT, + true + )); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), DOT, unit(200))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(BOB), + DOT, + true + )); assert_eq!(Loans::borrow_index(DOT), Rate::one()); TimestampPallet::set_timestamp(12000); - assert_ok!(Loans::borrow(Origin::signed(ALICE), DOT, unit(100))); - assert_ok!(Loans::borrow(Origin::signed(BOB), DOT, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(BOB), DOT, unit(100))); assert_eq!( Loans::borrow_index(DOT), Rate::from_inner(1000000003805175038), diff --git a/pallets/loans/src/tests/liquidate_borrow.rs b/pallets/loans/src/tests/liquidate_borrow.rs index e086c7779..5ee33e619 100644 --- a/pallets/loans/src/tests/liquidate_borrow.rs +++ b/pallets/loans/src/tests/liquidate_borrow.rs @@ -1,6 +1,7 @@ use crate::{ mock::{ - new_test_ext, Assets, Loans, MockPriceFeeder, Origin, Test, ALICE, BOB, DOT, KSM, USDT, + new_test_ext, Assets, Loans, MockPriceFeeder, RuntimeOrigin, Test, ALICE, BOB, DOT, KSM, + USDT, }, tests::unit, Error, MarketState, @@ -43,14 +44,14 @@ fn liquidate_borrow_allowed_works() { #[test] fn lf_liquidate_borrow_fails_due_to_lf_collateral() { new_test_ext().execute_with(|| { - Loans::update_liquidation_free_collateral(Origin::root(), vec![CDOT_6_13]).unwrap(); + Loans::update_liquidation_free_collateral(RuntimeOrigin::root(), vec![CDOT_6_13]).unwrap(); assert_err!( - Loans::liquidate_borrow(Origin::signed(ALICE), BOB, DOT, unit(100), CDOT_6_13), + Loans::liquidate_borrow(RuntimeOrigin::signed(ALICE), BOB, DOT, unit(100), CDOT_6_13), Error::::CollateralReserved ); assert_err!( - Loans::liquidate_borrow(Origin::signed(ALICE), BOB, DOT, unit(100), DOT_U), + Loans::liquidate_borrow(RuntimeOrigin::signed(ALICE), BOB, DOT, unit(100), DOT_U), Error::::CollateralReserved ); }) @@ -59,19 +60,19 @@ fn lf_liquidate_borrow_fails_due_to_lf_collateral() { #[test] fn lf_liquidate_borrow_allowed_works() { new_test_ext().execute_with(|| { - Loans::update_liquidation_free_collateral(Origin::root(), vec![CDOT_6_13]).unwrap(); + Loans::update_liquidation_free_collateral(RuntimeOrigin::root(), vec![CDOT_6_13]).unwrap(); // Bob deposits $200 DOT - Loans::mint(Origin::signed(BOB), DOT, unit(200)).unwrap(); - Loans::mint(Origin::signed(ALICE), USDT, unit(200)).unwrap(); - Loans::mint(Origin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); - Loans::collateral_asset(Origin::signed(ALICE), USDT, true).unwrap(); - Loans::collateral_asset(Origin::signed(ALICE), CDOT_6_13, true).unwrap(); + Loans::mint(RuntimeOrigin::signed(BOB), DOT, unit(200)).unwrap(); + Loans::mint(RuntimeOrigin::signed(ALICE), USDT, unit(200)).unwrap(); + Loans::mint(RuntimeOrigin::signed(ALICE), CDOT_6_13, unit(200)).unwrap(); + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), USDT, true).unwrap(); + Loans::collateral_asset(RuntimeOrigin::signed(ALICE), CDOT_6_13, true).unwrap(); // ALICE // Collateral Borrowed // USDT $100 DOT $200 // CDOT $100 - Loans::borrow(Origin::signed(ALICE), DOT, unit(200)).unwrap(); + Loans::borrow(RuntimeOrigin::signed(ALICE), DOT, unit(200)).unwrap(); // CDOT's price is highly relative to DOT's price in real runtime. Thus we must update them // at the same time. @@ -96,7 +97,7 @@ fn lf_liquidate_borrow_allowed_works() { )); // Remove CDOT from lf collateral - Loans::update_liquidation_free_collateral(Origin::root(), vec![]).unwrap(); + Loans::update_liquidation_free_collateral(RuntimeOrigin::root(), vec![]).unwrap(); // The max repay amount = 400 * 50 = $200 assert_ok!(Loans::liquidate_borrow_allowed( &ALICE, @@ -120,7 +121,7 @@ fn deposit_of_borrower_must_be_collateral() { Error::::TooMuchRepay ); assert_noop!( - Loans::liquidate_borrow(Origin::signed(BOB), ALICE, KSM, 10, DOT), + Loans::liquidate_borrow(RuntimeOrigin::signed(BOB), ALICE, KSM, 10, DOT), Error::::DepositsAreNotCollateral ); }) @@ -138,7 +139,7 @@ fn collateral_value_must_be_greater_than_liquidation_value() { }) .unwrap(); assert_noop!( - Loans::liquidate_borrow(Origin::signed(BOB), ALICE, KSM, unit(50), USDT), + Loans::liquidate_borrow(RuntimeOrigin::signed(BOB), ALICE, KSM, unit(50), USDT), Error::::InsufficientCollateral ); }) @@ -153,7 +154,7 @@ fn full_workflow_works_as_expected() { MockPriceFeeder::set_price(KSM, 2.into()); // BOB repay the KSM borrow balance and get DOT from ALICE assert_ok!(Loans::liquidate_borrow( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), ALICE, KSM, unit(50), @@ -197,7 +198,7 @@ fn full_workflow_works_as_expected() { assert_eq!(Assets::balance(USDT, &ALICE), unit(800),); // reduce 2 dollar from incentive reserve to alice account assert_ok!(Loans::reduce_incentive_reserves( - Origin::root(), + RuntimeOrigin::root(), ALICE, USDT, unit(2), @@ -226,7 +227,7 @@ fn liquidator_cannot_take_inactive_market_currency() { stored_market.clone() })); assert_noop!( - Loans::liquidate_borrow(Origin::signed(BOB), ALICE, KSM, unit(50), DOT), + Loans::liquidate_borrow(RuntimeOrigin::signed(BOB), ALICE, KSM, unit(50), DOT), Error::::MarketNotActivated ); }) @@ -239,7 +240,7 @@ fn liquidator_can_not_repay_more_than_the_close_factor_pct_multiplier() { alice_borrows_100_ksm(); MockPriceFeeder::set_price(KSM, 20.into()); assert_noop!( - Loans::liquidate_borrow(Origin::signed(BOB), ALICE, KSM, unit(51), DOT), + Loans::liquidate_borrow(RuntimeOrigin::signed(BOB), ALICE, KSM, unit(51), DOT), Error::::TooMuchRepay ); }) @@ -250,30 +251,38 @@ fn liquidator_must_not_be_borrower() { new_test_ext().execute_with(|| { initial_setup(); assert_noop!( - Loans::liquidate_borrow(Origin::signed(ALICE), ALICE, KSM, 0, DOT), + Loans::liquidate_borrow(RuntimeOrigin::signed(ALICE), ALICE, KSM, 0, DOT), Error::::LiquidatorIsBorrower ); }) } fn alice_borrows_100_ksm() { - assert_ok!(Loans::borrow(Origin::signed(ALICE), KSM, unit(100))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(ALICE), KSM, unit(100))); } fn initial_setup() { // Bob deposits 200 KSM - assert_ok!(Loans::mint(Origin::signed(BOB), KSM, unit(200))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(BOB), KSM, unit(200))); // Alice deposits 200 DOT as collateral - assert_ok!(Loans::mint(Origin::signed(ALICE), USDT, unit(200))); - assert_ok!(Loans::collateral_asset(Origin::signed(ALICE), USDT, true)); - assert_ok!(Loans::mint(Origin::signed(ALICE), CDOT_6_13, unit(200))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(ALICE), USDT, unit(200))); assert_ok!(Loans::collateral_asset( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + USDT, + true + )); + assert_ok!(Loans::mint( + RuntimeOrigin::signed(ALICE), + CDOT_6_13, + unit(200) + )); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(ALICE), CDOT_6_13, true )); assert_ok!(Loans::update_liquidation_free_collateral( - Origin::root(), + RuntimeOrigin::root(), vec![CDOT_6_13] )); } diff --git a/pallets/loans/src/tests/market.rs b/pallets/loans/src/tests/market.rs index ac5f70ea4..f1d3f7d4c 100644 --- a/pallets/loans/src/tests/market.rs +++ b/pallets/loans/src/tests/market.rs @@ -1,6 +1,6 @@ use crate::{ mock::{ - market_mock, new_test_ext, Loans, Origin, Test, ACTIVE_MARKET_MOCK, ALICE, DOT, + market_mock, new_test_ext, Loans, RuntimeOrigin, Test, ACTIVE_MARKET_MOCK, ALICE, DOT, MARKET_MOCK, PDOT, PUSDT, SDOT, }, Error, InterestRateModel, MarketState, @@ -14,7 +14,7 @@ macro_rules! rate_model_sanity_check { new_test_ext().execute_with(|| { // Invalid base_rate assert_noop!( - Loans::$call(Origin::root(), SDOT, { + Loans::$call(RuntimeOrigin::root(), SDOT, { let mut market = MARKET_MOCK; market.rate_model = InterestRateModel::new_jump_model( Rate::saturating_from_rational(36, 100), @@ -28,7 +28,7 @@ macro_rules! rate_model_sanity_check { ); // Invalid jump_rate assert_noop!( - Loans::$call(Origin::root(), SDOT, { + Loans::$call(RuntimeOrigin::root(), SDOT, { let mut market = MARKET_MOCK; market.rate_model = InterestRateModel::new_jump_model( Rate::saturating_from_rational(5, 100), @@ -42,7 +42,7 @@ macro_rules! rate_model_sanity_check { ); // Invalid full_rate assert_noop!( - Loans::$call(Origin::root(), SDOT, { + Loans::$call(RuntimeOrigin::root(), SDOT, { let mut market = MARKET_MOCK; market.rate_model = InterestRateModel::new_jump_model( Rate::saturating_from_rational(5, 100), @@ -56,7 +56,7 @@ macro_rules! rate_model_sanity_check { ); // base_rate greater than jump_rate assert_noop!( - Loans::$call(Origin::root(), SDOT, { + Loans::$call(RuntimeOrigin::root(), SDOT, { let mut market = MARKET_MOCK; market.rate_model = InterestRateModel::new_jump_model( Rate::saturating_from_rational(10, 100), @@ -70,7 +70,7 @@ macro_rules! rate_model_sanity_check { ); // jump_rate greater than full_rate assert_noop!( - Loans::$call(Origin::root(), SDOT, { + Loans::$call(RuntimeOrigin::root(), SDOT, { let mut market = MARKET_MOCK; market.rate_model = InterestRateModel::new_jump_model( Rate::saturating_from_rational(5, 100), @@ -89,9 +89,9 @@ macro_rules! rate_model_sanity_check { #[test] fn active_market_sets_state_to_active() { new_test_ext().execute_with(|| { - Loans::add_market(Origin::root(), SDOT, MARKET_MOCK).unwrap(); + Loans::add_market(RuntimeOrigin::root(), SDOT, MARKET_MOCK).unwrap(); assert_eq!(Loans::market(SDOT).unwrap().state, MarketState::Pending); - Loans::activate_market(Origin::root(), SDOT).unwrap(); + Loans::activate_market(RuntimeOrigin::root(), SDOT).unwrap(); assert_eq!(Loans::market(SDOT).unwrap().state, MarketState::Active); }) } @@ -100,7 +100,7 @@ fn active_market_sets_state_to_active() { fn active_market_does_not_modify_unknown_market_currencies() { new_test_ext().execute_with(|| { assert_noop!( - Loans::activate_market(Origin::root(), SDOT), + Loans::activate_market(RuntimeOrigin::root(), SDOT), Error::::MarketDoesNotExist ); }) @@ -110,7 +110,7 @@ fn active_market_does_not_modify_unknown_market_currencies() { fn add_market_can_only_be_used_by_root() { new_test_ext().execute_with(|| { assert_noop!( - Loans::add_market(Origin::signed(ALICE), DOT, MARKET_MOCK), + Loans::add_market(RuntimeOrigin::signed(ALICE), DOT, MARKET_MOCK), BadOrigin ); }) @@ -120,7 +120,7 @@ fn add_market_can_only_be_used_by_root() { fn add_market_ensures_that_market_state_must_be_pending() { new_test_ext().execute_with(|| { assert_noop!( - Loans::add_market(Origin::root(), SDOT, ACTIVE_MARKET_MOCK), + Loans::add_market(RuntimeOrigin::root(), SDOT, ACTIVE_MARKET_MOCK), Error::::NewMarketMustHavePendingState ); }) @@ -134,7 +134,7 @@ fn add_market_has_sanity_checks_for_rate_models() { #[test] fn add_market_successfully_stores_a_new_market() { new_test_ext().execute_with(|| { - Loans::add_market(Origin::root(), SDOT, MARKET_MOCK).unwrap(); + Loans::add_market(RuntimeOrigin::root(), SDOT, MARKET_MOCK).unwrap(); assert_eq!(Loans::market(SDOT).unwrap(), MARKET_MOCK); }) } @@ -142,9 +142,9 @@ fn add_market_successfully_stores_a_new_market() { #[test] fn add_market_ensures_that_market_does_not_exist() { new_test_ext().execute_with(|| { - assert_ok!(Loans::add_market(Origin::root(), SDOT, MARKET_MOCK)); + assert_ok!(Loans::add_market(RuntimeOrigin::root(), SDOT, MARKET_MOCK)); assert_noop!( - Loans::add_market(Origin::root(), SDOT, MARKET_MOCK), + Loans::add_market(RuntimeOrigin::root(), SDOT, MARKET_MOCK), Error::::MarketAlreadyExists ); }) @@ -154,7 +154,7 @@ fn add_market_ensures_that_market_does_not_exist() { fn force_update_market_can_only_be_used_by_root() { new_test_ext().execute_with(|| { assert_noop!( - Loans::force_update_market(Origin::signed(ALICE), DOT, MARKET_MOCK), + Loans::force_update_market(RuntimeOrigin::signed(ALICE), DOT, MARKET_MOCK), BadOrigin ); }) @@ -165,17 +165,17 @@ fn force_update_market_works() { new_test_ext().execute_with(|| { let mut new_market = market_mock(PDOT); new_market.state = MarketState::Active; - Loans::force_update_market(Origin::root(), DOT, new_market).unwrap(); + Loans::force_update_market(RuntimeOrigin::root(), DOT, new_market).unwrap(); assert_eq!(Loans::market(DOT).unwrap().state, MarketState::Active); assert_eq!(Loans::market(DOT).unwrap().ptoken_id, PDOT); // New ptoken_id must not be in use assert_noop!( - Loans::force_update_market(Origin::root(), DOT, market_mock(PUSDT)), + Loans::force_update_market(RuntimeOrigin::root(), DOT, market_mock(PUSDT)), Error::::InvalidPtokenId ); assert_ok!(Loans::force_update_market( - Origin::root(), + RuntimeOrigin::root(), DOT, market_mock(1234) )); @@ -187,7 +187,7 @@ fn force_update_market_works() { fn force_update_market_ensures_that_it_is_not_possible_to_modify_unknown_market_currencies() { new_test_ext().execute_with(|| { assert_noop!( - Loans::force_update_market(Origin::root(), SDOT, MARKET_MOCK), + Loans::force_update_market(RuntimeOrigin::root(), SDOT, MARKET_MOCK), Error::::MarketDoesNotExist ); }) @@ -203,7 +203,7 @@ fn update_market_ensures_that_it_is_not_possible_to_modify_unknown_market_curren new_test_ext().execute_with(|| { assert_noop!( Loans::update_market( - Origin::root(), + RuntimeOrigin::root(), SDOT, None, None, @@ -229,7 +229,7 @@ fn update_market_works() { let market = MARKET_MOCK; assert_ok!(Loans::update_market( - Origin::root(), + RuntimeOrigin::root(), DOT, None, None, @@ -256,7 +256,7 @@ fn update_market_should_not_work_if_with_invalid_params() { // check error code while collateral_factor is [0%, 100%) assert_ok!(Loans::update_market( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(Ratio::zero()), None, @@ -269,7 +269,7 @@ fn update_market_should_not_work_if_with_invalid_params() { )); assert_noop!( Loans::update_market( - Origin::root(), + RuntimeOrigin::root(), DOT, Some(Ratio::one()), None, @@ -285,7 +285,7 @@ fn update_market_should_not_work_if_with_invalid_params() { // check error code while reserve_factor is 0% or bigger than 100% assert_noop!( Loans::update_market( - Origin::root(), + RuntimeOrigin::root(), DOT, None, None, @@ -300,7 +300,7 @@ fn update_market_should_not_work_if_with_invalid_params() { ); assert_noop!( Loans::update_market( - Origin::root(), + RuntimeOrigin::root(), DOT, None, None, @@ -316,7 +316,7 @@ fn update_market_should_not_work_if_with_invalid_params() { // check error code while cap is zero assert_noop!( Loans::update_market( - Origin::root(), + RuntimeOrigin::root(), DOT, None, None, @@ -342,7 +342,7 @@ fn update_rate_model_works() { Ratio::from_percent(80), ); assert_ok!(Loans::update_rate_model( - Origin::root(), + RuntimeOrigin::root(), DOT, new_rate_model, )); @@ -351,7 +351,7 @@ fn update_rate_model_works() { // Invalid base_rate assert_noop!( Loans::update_rate_model( - Origin::root(), + RuntimeOrigin::root(), SDOT, InterestRateModel::new_jump_model( Rate::saturating_from_rational(36, 100), @@ -365,7 +365,7 @@ fn update_rate_model_works() { // Invalid jump_rate assert_noop!( Loans::update_rate_model( - Origin::root(), + RuntimeOrigin::root(), SDOT, InterestRateModel::new_jump_model( Rate::saturating_from_rational(5, 100), @@ -379,7 +379,7 @@ fn update_rate_model_works() { // Invalid full_rate assert_noop!( Loans::update_rate_model( - Origin::root(), + RuntimeOrigin::root(), SDOT, InterestRateModel::new_jump_model( Rate::saturating_from_rational(5, 100), @@ -393,7 +393,7 @@ fn update_rate_model_works() { // base_rate greater than jump_rate assert_noop!( Loans::update_rate_model( - Origin::root(), + RuntimeOrigin::root(), SDOT, InterestRateModel::new_jump_model( Rate::saturating_from_rational(10, 100), @@ -407,7 +407,7 @@ fn update_rate_model_works() { // jump_rate greater than full_rate assert_noop!( Loans::update_rate_model( - Origin::root(), + RuntimeOrigin::root(), SDOT, InterestRateModel::new_jump_model( Rate::saturating_from_rational(5, 100), diff --git a/pallets/loans/src/tests/ptokens.rs b/pallets/loans/src/tests/ptokens.rs index aa66e03e3..8fbc186ef 100644 --- a/pallets/loans/src/tests/ptokens.rs +++ b/pallets/loans/src/tests/ptokens.rs @@ -1,7 +1,7 @@ use crate::{ mock::{ - market_mock, new_test_ext, Loans, Origin, Test, ALICE, DAVE, HKO, KSM, PHKO, PKSM, PUSDT, - SDOT, USDT, + market_mock, new_test_ext, Loans, RuntimeOrigin, Test, ALICE, DAVE, HKO, KSM, PHKO, PKSM, + PUSDT, SDOT, USDT, }, tests::unit, Error, @@ -29,13 +29,17 @@ fn trait_inspect_methods_works() { assert_eq!(Loans::balance(PHKO, &DAVE), 0); // DAVE Deposit 100 HKO - assert_ok!(Loans::mint(Origin::signed(DAVE), HKO, unit(100))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(DAVE), HKO, unit(100))); assert_eq!(Loans::balance(PHKO, &DAVE), unit(100) * 50); assert_eq!(Loans::reducible_balance(PHKO, &DAVE, true), unit(100) * 50); - assert_ok!(Loans::collateral_asset(Origin::signed(DAVE), HKO, true)); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(DAVE), + HKO, + true + )); // Borrow 25 HKO will reduce 25 HKO liquidity for collateral_factor is 50% - assert_ok!(Loans::borrow(Origin::signed(DAVE), HKO, unit(25))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(DAVE), HKO, unit(25))); assert_eq!( Loans::exchange_rate(HKO) @@ -55,20 +59,24 @@ fn trait_inspect_methods_works() { // DAVE Deposit 100 HKO, 50 USDT, Borrow 25 HKO // Liquidity HKO = 25, USDT = 25 // ptokens = dollar(25 + 25) / 1 / 0.5 / 0.02 = dollar(50) * 100 - assert_ok!(Loans::mint(Origin::signed(DAVE), USDT, unit(50))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(DAVE), USDT, unit(50))); assert_eq!(Loans::balance(PUSDT, &DAVE), unit(50) * 50); assert_eq!( Loans::reducible_balance(PUSDT, &DAVE, true), unit(25) * 2 * 50 ); // enable USDT collateral - assert_ok!(Loans::collateral_asset(Origin::signed(DAVE), USDT, true)); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(DAVE), + USDT, + true + )); assert_eq!( Loans::reducible_balance(PHKO, &DAVE, true), unit(25 + 25) * 2 * 50 ); - assert_ok!(Loans::borrow(Origin::signed(DAVE), HKO, unit(50))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(DAVE), HKO, unit(50))); assert_eq!(Loans::reducible_balance(PHKO, &DAVE, true), 0); assert_eq!(Loans::total_issuance(PHKO), unit(100) * 50); @@ -82,13 +90,13 @@ fn ptoken_unique_works() { new_test_ext().execute_with(|| { // ptoken_id already exists in `UnderlyingAssetId` assert_noop!( - Loans::add_market(Origin::root(), SDOT, market_mock(PHKO)), + Loans::add_market(RuntimeOrigin::root(), SDOT, market_mock(PHKO)), Error::::InvalidPtokenId ); // ptoken_id cannot as the same as the asset id in `Markets` assert_noop!( - Loans::add_market(Origin::root(), SDOT, market_mock(KSM)), + Loans::add_market(RuntimeOrigin::root(), SDOT, market_mock(KSM)), Error::::InvalidPtokenId ); }) @@ -98,7 +106,7 @@ fn ptoken_unique_works() { fn transfer_ptoken_works() { new_test_ext().execute_with(|| { // DAVE Deposit 100 HKO - assert_ok!(Loans::mint(Origin::signed(DAVE), HKO, unit(100))); + assert_ok!(Loans::mint(RuntimeOrigin::signed(DAVE), HKO, unit(100))); // DAVE HKO collateral: deposit = 100 // HKO: cash - deposit = 1000 - 100 = 900 @@ -117,7 +125,7 @@ fn transfer_ptoken_works() { // Transfer ptokens from DAVE to ALICE Loans::transfer(PHKO, &DAVE, &ALICE, unit(50) * 50, true).unwrap(); - // Loans::transfer_ptokens(Origin::signed(DAVE), ALICE, HKO, dollar(50) * 50).unwrap(); + // Loans::transfer_ptokens(RuntimeOrigin::signed(DAVE), ALICE, HKO, dollar(50) * 50).unwrap(); // DAVE HKO collateral: deposit = 50 assert_eq!( @@ -146,13 +154,21 @@ fn transfer_ptoken_works() { fn transfer_ptokens_under_collateral_works() { new_test_ext().execute_with(|| { // DAVE Deposit 100 HKO - assert_ok!(Loans::mint(Origin::signed(DAVE), HKO, unit(100))); - assert_ok!(Loans::collateral_asset(Origin::signed(DAVE), HKO, true)); + assert_ok!(Loans::mint(RuntimeOrigin::signed(DAVE), HKO, unit(100))); + assert_ok!(Loans::collateral_asset( + RuntimeOrigin::signed(DAVE), + HKO, + true + )); // Borrow 50 HKO will reduce 50 HKO liquidity for collateral_factor is 50% - assert_ok!(Loans::borrow(Origin::signed(DAVE), HKO, unit(50))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(DAVE), HKO, unit(50))); // Repay 40 HKO - assert_ok!(Loans::repay_borrow(Origin::signed(DAVE), HKO, unit(40))); + assert_ok!(Loans::repay_borrow( + RuntimeOrigin::signed(DAVE), + HKO, + unit(40) + )); // Transfer 20 ptokens from DAVE to ALICE Loans::transfer(PHKO, &DAVE, &ALICE, unit(20) * 50, true).unwrap(); @@ -167,10 +183,10 @@ fn transfer_ptokens_under_collateral_works() { ); // DAVE Borrow 31 HKO should cause InsufficientLiquidity assert_noop!( - Loans::borrow(Origin::signed(DAVE), HKO, unit(31)), + Loans::borrow(RuntimeOrigin::signed(DAVE), HKO, unit(31)), Error::::InsufficientLiquidity ); - assert_ok!(Loans::borrow(Origin::signed(DAVE), HKO, unit(30))); + assert_ok!(Loans::borrow(RuntimeOrigin::signed(DAVE), HKO, unit(30))); // Assert ALICE Supply HKO 20 assert_eq!( diff --git a/pallets/loans/src/weights.rs b/pallets/loans/src/weights.rs index 30831de0d..2b3584fbd 100644 --- a/pallets/loans/src/weights.rs +++ b/pallets/loans/src/weights.rs @@ -77,52 +77,52 @@ impl WeightInfo for SubstrateWeight { // Storage: Loans ExchangeRate (r:0 w:1) // Storage: Loans BorrowIndex (r:0 w:1) fn add_market() -> Weight { - (61_518_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(61_518_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn activate_market() -> Weight { - (43_556_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(43_556_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn update_rate_model() -> Weight { - (45_600_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(45_600_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn update_market() -> Weight { - (45_777_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(45_777_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans UnderlyingAssetId (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn force_update_market() -> Weight { - (56_536_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(56_536_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: System Account (r:1 w:1) fn add_reward() -> Weight { - (98_928_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(98_928_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: System Account (r:1 w:1) fn withdraw_missing_reward() -> Weight { - (81_317_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(81_317_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -131,9 +131,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Loans RewardSupplyState (r:1 w:1) // Storage: Loans RewardBorrowState (r:1 w:1) fn update_market_reward_speed() -> Weight { - (86_330_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(86_330_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -151,9 +151,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward() -> Weight { - (234_251_000 as Weight) - .saturating_add(T::DbWeight::get().reads(16 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(234_251_000 as u64) + .saturating_add(T::DbWeight::get().reads(16 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans RewardSupplyState (r:1 w:1) @@ -170,9 +170,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward_for_market() -> Weight { - (214_273_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(214_273_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -191,9 +191,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Loans AccountEarned (r:1 w:1) // Storage: System Account (r:1 w:1) fn mint() -> Weight { - (250_616_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(250_616_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -215,9 +215,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Loans RewardAccured (r:1 w:1) // Storage: Loans BorrowIndex (r:1 w:0) fn borrow() -> Weight { - (356_136_000 as Weight) - .saturating_add(T::DbWeight::get().reads(24 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(356_136_000 as u64) + .saturating_add(T::DbWeight::get().reads(24 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -235,9 +235,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Loans RewardSupplierIndex (r:1 w:1) // Storage: Loans RewardAccured (r:1 w:1) fn redeem() -> Weight { - (259_224_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(259_224_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -256,9 +256,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Loans RewardAccured (r:1 w:1) // Storage: System Account (r:1 w:1) fn redeem_all() -> Weight { - (277_962_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(277_962_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -274,9 +274,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow() -> Weight { - (226_122_000 as Weight) - .saturating_add(T::DbWeight::get().reads(15 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(226_122_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -292,17 +292,17 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow_all() -> Weight { - (225_556_000 as Weight) - .saturating_add(T::DbWeight::get().reads(15 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(225_556_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) // Storage: Loans AccountDeposits (r:1 w:1) fn collateral_asset() -> Weight { - (73_911_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(73_911_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans LiquidationFreeCollaterals (r:1 w:0) @@ -327,9 +327,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Loans RewardSupplySpeed (r:1 w:0) // Storage: Loans RewardSupplierIndex (r:3 w:3) fn liquidate_borrow() -> Weight { - (637_956_000 as Weight) - .saturating_add(T::DbWeight::get().reads(40 as Weight)) - .saturating_add(T::DbWeight::get().writes(20 as Weight)) + Weight::from_ref_time(637_956_000 as u64) + .saturating_add(T::DbWeight::get().reads(40 as u64)) + .saturating_add(T::DbWeight::get().writes(20 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -338,9 +338,9 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: Loans TotalReserves (r:1 w:1) fn add_reserves() -> Weight { - (146_456_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(146_456_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -348,16 +348,16 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn reduce_reserves() -> Weight { - (131_943_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(131_943_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans LiquidationFreeCollaterals (r:1 w:1) fn update_liquidation_free_collateral() -> Weight { - (37_654_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_654_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } @@ -369,52 +369,52 @@ impl WeightInfo for () { // Storage: Loans ExchangeRate (r:0 w:1) // Storage: Loans BorrowIndex (r:0 w:1) fn add_market() -> Weight { - (61_518_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(61_518_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn activate_market() -> Weight { - (43_556_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(43_556_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn update_rate_model() -> Weight { - (45_600_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(45_600_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn update_market() -> Weight { - (45_777_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(45_777_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans UnderlyingAssetId (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn force_update_market() -> Weight { - (56_536_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(56_536_000 as u64) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: System Account (r:1 w:1) fn add_reward() -> Weight { - (98_928_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(98_928_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: System Account (r:1 w:1) fn withdraw_missing_reward() -> Weight { - (81_317_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(81_317_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -423,9 +423,9 @@ impl WeightInfo for () { // Storage: Loans RewardSupplyState (r:1 w:1) // Storage: Loans RewardBorrowState (r:1 w:1) fn update_market_reward_speed() -> Weight { - (86_330_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(86_330_000 as u64) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -443,9 +443,9 @@ impl WeightInfo for () { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward() -> Weight { - (234_251_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(16 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(234_251_000 as u64) + .saturating_add(RocksDbWeight::get().reads(16 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans RewardSupplyState (r:1 w:1) @@ -462,9 +462,9 @@ impl WeightInfo for () { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward_for_market() -> Weight { - (214_273_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(14 as Weight)) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(214_273_000 as u64) + .saturating_add(RocksDbWeight::get().reads(14 as u64)) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -483,9 +483,9 @@ impl WeightInfo for () { // Storage: Loans AccountEarned (r:1 w:1) // Storage: System Account (r:1 w:1) fn mint() -> Weight { - (250_616_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(18 as Weight)) - .saturating_add(RocksDbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(250_616_000 as u64) + .saturating_add(RocksDbWeight::get().reads(18 as u64)) + .saturating_add(RocksDbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -507,9 +507,9 @@ impl WeightInfo for () { // Storage: Loans RewardAccured (r:1 w:1) // Storage: Loans BorrowIndex (r:1 w:0) fn borrow() -> Weight { - (356_136_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(24 as Weight)) - .saturating_add(RocksDbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(356_136_000 as u64) + .saturating_add(RocksDbWeight::get().reads(24 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -527,9 +527,9 @@ impl WeightInfo for () { // Storage: Loans RewardSupplierIndex (r:1 w:1) // Storage: Loans RewardAccured (r:1 w:1) fn redeem() -> Weight { - (259_224_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(17 as Weight)) - .saturating_add(RocksDbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(259_224_000 as u64) + .saturating_add(RocksDbWeight::get().reads(17 as u64)) + .saturating_add(RocksDbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -548,9 +548,9 @@ impl WeightInfo for () { // Storage: Loans RewardAccured (r:1 w:1) // Storage: System Account (r:1 w:1) fn redeem_all() -> Weight { - (277_962_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(18 as Weight)) - .saturating_add(RocksDbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(277_962_000 as u64) + .saturating_add(RocksDbWeight::get().reads(18 as u64)) + .saturating_add(RocksDbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -566,9 +566,9 @@ impl WeightInfo for () { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow() -> Weight { - (226_122_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(15 as Weight)) - .saturating_add(RocksDbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(226_122_000 as u64) + .saturating_add(RocksDbWeight::get().reads(15 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -584,17 +584,17 @@ impl WeightInfo for () { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow_all() -> Weight { - (225_556_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(15 as Weight)) - .saturating_add(RocksDbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(225_556_000 as u64) + .saturating_add(RocksDbWeight::get().reads(15 as u64)) + .saturating_add(RocksDbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) // Storage: Loans AccountDeposits (r:1 w:1) fn collateral_asset() -> Weight { - (73_911_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(73_911_000 as u64) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans LiquidationFreeCollaterals (r:1 w:0) @@ -619,9 +619,9 @@ impl WeightInfo for () { // Storage: Loans RewardSupplySpeed (r:1 w:0) // Storage: Loans RewardSupplierIndex (r:3 w:3) fn liquidate_borrow() -> Weight { - (637_956_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(40 as Weight)) - .saturating_add(RocksDbWeight::get().writes(20 as Weight)) + Weight::from_ref_time(637_956_000 as u64) + .saturating_add(RocksDbWeight::get().reads(40 as u64)) + .saturating_add(RocksDbWeight::get().writes(20 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -630,9 +630,9 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: Loans TotalReserves (r:1 w:1) fn add_reserves() -> Weight { - (146_456_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(146_456_000 as u64) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -640,15 +640,15 @@ impl WeightInfo for () { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn reduce_reserves() -> Weight { - (131_943_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(131_943_000 as u64) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans LiquidationFreeCollaterals (r:1 w:1) fn update_liquidation_free_collateral() -> Weight { - (37_654_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_654_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } } diff --git a/pallets/prices/Cargo.toml b/pallets/prices/Cargo.toml index 4b73b27ac..8b719a272 100644 --- a/pallets/prices/Cargo.toml +++ b/pallets/prices/Cargo.toml @@ -6,11 +6,11 @@ version = '1.9.4' [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-amm = { path = '../amm', default-features = false } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } orml-oracle = { version = '0.4.1-dev', default-features = false } orml-traits = { version = '0.4.1-dev', default-features = false } pallet-traits = { path = '../traits', default-features = false } @@ -18,12 +18,12 @@ primitives = { package = 'parallel-primitives', path = '../../primitives', de scale-info = { version = '2.1', default-features = false, features = ['derive'] } serde = { version = '1.0.136', optional = true } num-traits = { default-features = false, version = '0.2' } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [dev-dependencies] -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } pallet-currency-adapter = { path = '../currency-adapter' } [features] diff --git a/pallets/prices/src/lib.rs b/pallets/prices/src/lib.rs index 3148e0173..2581ad3dd 100644 --- a/pallets/prices/src/lib.rs +++ b/pallets/prices/src/lib.rs @@ -23,7 +23,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use frame_support::{ - log, pallet_prelude::*, traits::fungibles::Inspect, transactional, weights::DispatchClass, + dispatch::DispatchClass, log, pallet_prelude::*, traits::fungibles::Inspect, transactional, }; use frame_system::pallet_prelude::*; use orml_traits::{DataFeeder, DataProvider, DataProviderExtended}; @@ -60,7 +60,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The data source, such as Oracle. type Source: DataProvider @@ -68,10 +68,10 @@ pub mod pallet { + DataFeeder; /// The origin which may set prices feed to system. - type FeederOrigin: EnsureOrigin; + type FeederOrigin: EnsureOrigin; /// The origin which can update prices link. - type UpdateOrigin: EnsureOrigin; + type UpdateOrigin: EnsureOrigin; /// Liquid currency & staking currency provider type LiquidStakingCurrenciesProvider: LiquidStakingCurrenciesProvider; diff --git a/pallets/prices/src/mock.rs b/pallets/prices/src/mock.rs index b161189ae..c591fd1a5 100644 --- a/pallets/prices/src/mock.rs +++ b/pallets/prices/src/mock.rs @@ -37,16 +37,16 @@ parameter_types! { } impl frame_system::Config for Test { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; type BlockNumber = BlockNumber; - type Call = Call; + type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = ::sp_runtime::traits::BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -195,7 +195,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -215,7 +215,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -250,7 +250,7 @@ impl SortedMembers for AliceCreatePoolOrigin { } impl pallet_amm::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = AMMPalletId; type LockAccountId = LockAccountId; @@ -264,7 +264,7 @@ impl pallet_amm::Config for Test { } impl crate::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Source = MockDataProvider; type FeederOrigin = EnsureSignedBy; type UpdateOrigin = EnsureSignedBy; @@ -311,22 +311,41 @@ pub fn new_test_ext() -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { - Assets::force_create(Origin::root(), tokens::DOT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::SDOT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::CDOT_7_14, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::LP_DOT_CDOT_7_14, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::DOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::SDOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::CDOT_7_14, ALICE, true, 1).unwrap(); + Assets::force_create( + RuntimeOrigin::root(), + tokens::LP_DOT_CDOT_7_14, + ALICE, + true, + 1, + ) + .unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::DOT, ALICE, 1000 * PRICE_ONE).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::SDOT, ALICE, 1000 * PRICE_ONE).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + tokens::DOT, + ALICE, + 1000 * PRICE_ONE, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::SDOT, + ALICE, + 1000 * PRICE_ONE, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), tokens::CDOT_7_14, ALICE, 1000 * PRICE_ONE, ) .unwrap(); - Prices::set_foreign_asset(Origin::signed(ALICE), tokens::LC_DOT, CDOT_7_14).unwrap(); + Prices::set_foreign_asset(RuntimeOrigin::signed(ALICE), tokens::LC_DOT, CDOT_7_14).unwrap(); }); ext diff --git a/pallets/prices/src/tests.rs b/pallets/prices/src/tests.rs index 56dcc9cd6..d7e798601 100644 --- a/pallets/prices/src/tests.rs +++ b/pallets/prices/src/tests.rs @@ -16,7 +16,7 @@ use super::*; use frame_support::{assert_noop, assert_ok}; -use mock::{Event, *}; +use mock::{RuntimeEvent, *}; use primitives::TimeStampedPrice; use sp_runtime::{ traits::{BadOrigin, Saturating}, @@ -46,7 +46,7 @@ fn set_price_work() { ); // set DOT price assert_ok!(Prices::set_price( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), DOT, Price::saturating_from_integer(99) )); @@ -55,7 +55,7 @@ fn set_price_work() { Some((Price::from_inner(9_900_000_000 * PRICE_ONE), 0)) ); assert_ok!(Prices::set_price( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), KSM, Price::saturating_from_integer(1) )); @@ -101,14 +101,14 @@ fn set_price_call_work() { ); assert_noop!( Prices::set_price( - Origin::signed(CHARLIE), + RuntimeOrigin::signed(CHARLIE), DOT, Price::saturating_from_integer(100), ), BadOrigin ); assert_ok!(Prices::set_price( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), DOT, Price::saturating_from_integer(90), )); @@ -118,7 +118,7 @@ fn set_price_call_work() { ); // check the event - let set_price_event = Event::Prices(crate::Event::SetPrice( + let set_price_event = RuntimeEvent::Prices(crate::Event::SetPrice( DOT, Price::saturating_from_integer(90), )); @@ -127,7 +127,7 @@ fn set_price_call_work() { .any(|record| record.event == set_price_event)); assert_eq!( Prices::set_price( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), DOT, Price::saturating_from_integer(90), ), @@ -147,7 +147,7 @@ fn reset_price_call_work() { Some((FixedU128::from_inner(10_000_000_000 * PRICE_ONE), 0)) ); assert_ok!(Prices::set_price( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), DOT, Price::saturating_from_integer(90), )); @@ -157,8 +157,11 @@ fn reset_price_call_work() { ); // try reset price - assert_noop!(Prices::reset_price(Origin::signed(CHARLIE), DOT), BadOrigin); - assert_ok!(Prices::reset_price(Origin::signed(ALICE), DOT)); + assert_noop!( + Prices::reset_price(RuntimeOrigin::signed(CHARLIE), DOT), + BadOrigin + ); + assert_ok!(Prices::reset_price(RuntimeOrigin::signed(ALICE), DOT)); // price need to be 100 after reset_price assert_eq!( @@ -167,12 +170,12 @@ fn reset_price_call_work() { ); // check the event - let reset_price_event = Event::Prices(crate::Event::ResetPrice(DOT)); + let reset_price_event = RuntimeEvent::Prices(crate::Event::ResetPrice(DOT)); assert!(System::events() .iter() .any(|record| record.event == reset_price_event)); assert_eq!( - Prices::reset_price(Origin::signed(ALICE), DOT), + Prices::reset_price(RuntimeOrigin::signed(ALICE), DOT), Ok(().into()) ); }); @@ -215,7 +218,7 @@ fn get_ctoken_price_work() { fn get_lp_ctoken_price_work() { new_test_ext().execute_with(|| { DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (CDOT_7_14, DOT), (300 * PRICE_ONE, 100 * PRICE_ONE), //3:1 ALICE, @@ -236,7 +239,7 @@ fn get_lp_ctoken_price_work() { fn get_lp_ctoken_price_with_different_exchange_rate_will_not_change() { new_test_ext().execute_with(|| { DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (CDOT_7_14, DOT), (200 * PRICE_ONE, 100 * PRICE_ONE), //2:1 ALICE, @@ -265,7 +268,7 @@ fn get_lp_ctoken_no_op_price_work() { ); DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (CDOT_7_14, DOT), (300 * PRICE_ONE, 100 * PRICE_ONE), ALICE, diff --git a/pallets/prices/src/weights.rs b/pallets/prices/src/weights.rs index 89020ce57..340d97d00 100644 --- a/pallets/prices/src/weights.rs +++ b/pallets/prices/src/weights.rs @@ -32,25 +32,25 @@ pub trait WeightInfo { pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn set_price() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn reset_price() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn set_foreign_asset() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } } // For backwards compatibility and tests impl WeightInfo for () { fn set_price() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn reset_price() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn set_foreign_asset() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } } diff --git a/pallets/router/Cargo.toml b/pallets/router/Cargo.toml index 43f3d67bf..11ce926ee 100644 --- a/pallets/router/Cargo.toml +++ b/pallets/router/Cargo.toml @@ -8,23 +8,23 @@ version = '1.9.4' targets = ['x86_64-unknown-linux-gnu'] [dependencies] -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-amm = { path = '../amm', default-features = false } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } parity-scale-codec = { version = '3.1.5', default-features = false, features = ['derive'] } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [dev-dependencies] -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } pallet-currency-adapter = { path = '../currency-adapter' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } [features] default = ['std'] @@ -41,6 +41,7 @@ std = [ 'scale-info/std', 'pallet-traits/std', ] +try-runtime = ['frame-support/try-runtime'] [lib] doctest = false diff --git a/pallets/router/rpc/Cargo.toml b/pallets/router/rpc/Cargo.toml index 03aabd2e0..6625e0fef 100644 --- a/pallets/router/rpc/Cargo.toml +++ b/pallets/router/rpc/Cargo.toml @@ -9,12 +9,12 @@ codec = { package = 'parity-scale-codec', version = '3.1.5' } jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } primitives = { package = 'parallel-primitives', path = '../../../primitives', default-features = false } serde = { version = '1.0.136', features = ['derive'] } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-router-rpc-runtime-api = { path = 'runtime-api', default-features = false } diff --git a/pallets/router/rpc/runtime-api/Cargo.toml b/pallets/router/rpc/runtime-api/Cargo.toml index 08fc8e86e..5ecde3187 100644 --- a/pallets/router/rpc/runtime-api/Cargo.toml +++ b/pallets/router/rpc/runtime-api/Cargo.toml @@ -7,9 +7,9 @@ version = '1.9.4' [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', default-features = false, features = ['derive'] } primitives = { package = 'parallel-primitives', path = '../../../../primitives', default-features = false } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [features] default = ['std'] diff --git a/pallets/router/src/benchmarking.rs b/pallets/router/src/benchmarking.rs index bb01aff5c..46694bbc9 100644 --- a/pallets/router/src/benchmarking.rs +++ b/pallets/router/src/benchmarking.rs @@ -29,7 +29,7 @@ const SDOT: CurrencyId = tokens::SDOT; const INITIAL_AMOUNT: u128 = 1_000_000_000_000_000; const ASSET_ID: u32 = 11; -fn assert_last_event, I: 'static>(generic_event: >::Event) { +fn assert_last_event, I: 'static>(generic_event: >::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } diff --git a/pallets/router/src/lib.rs b/pallets/router/src/lib.rs index 0222ade0a..51b3f1d8b 100644 --- a/pallets/router/src/lib.rs +++ b/pallets/router/src/lib.rs @@ -67,7 +67,8 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + + IsType<::RuntimeEvent>; /// Router pallet id #[pallet::constant] diff --git a/pallets/router/src/mock.rs b/pallets/router/src/mock.rs index 2bfeb01b3..9362cdb98 100644 --- a/pallets/router/src/mock.rs +++ b/pallets/router/src/mock.rs @@ -45,16 +45,16 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; type BlockNumber = BlockNumber; - type Call = Call; + type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = ::sp_runtime::traits::BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -80,7 +80,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -100,7 +100,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -135,7 +135,7 @@ impl SortedMembers for AliceCreatePoolOrigin { } impl pallet_amm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = AMMPalletId; type LockAccountId = LockAccountId; @@ -165,7 +165,7 @@ parameter_types! { } impl Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = RouterPalletId; type AMM = DefaultAMM; type AMMRouterWeightInfo = (); @@ -207,24 +207,48 @@ pub fn new_test_ext() -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { - Assets::force_create(Origin::root(), tokens::DOT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::SDOT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::KSM, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::USDT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::DOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::SDOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::KSM, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::USDT, ALICE, true, 1).unwrap(); // lp tokens - Assets::force_create(Origin::root(), SAMPLE_LP_TOKEN, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), SAMPLE_LP_TOKEN_2, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), SAMPLE_LP_TOKEN_3, ALICE, true, 1).unwrap(); - - Assets::mint(Origin::signed(ALICE), tokens::DOT, ALICE, 10_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::SDOT, ALICE, 10_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::KSM, ALICE, 10_000).unwrap(); - - Assets::mint(Origin::signed(ALICE), tokens::DOT, DAVE, 1000_000_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::KSM, DAVE, 1000_000_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::SDOT, DAVE, 1000_000_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::USDT, DAVE, 1000_000_000).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SAMPLE_LP_TOKEN, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SAMPLE_LP_TOKEN_2, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SAMPLE_LP_TOKEN_3, ALICE, true, 1).unwrap(); + + Assets::mint(RuntimeOrigin::signed(ALICE), tokens::DOT, ALICE, 10_000).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), tokens::SDOT, ALICE, 10_000).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), tokens::KSM, ALICE, 10_000).unwrap(); + + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::DOT, + DAVE, + 1000_000_000, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::KSM, + DAVE, + 1000_000_000, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::SDOT, + DAVE, + 1000_000_000, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::USDT, + DAVE, + 1000_000_000, + ) + .unwrap(); }); ext diff --git a/pallets/router/src/tests.rs b/pallets/router/src/tests.rs index 8d9726da8..0b69acd67 100644 --- a/pallets/router/src/tests.rs +++ b/pallets/router/src/tests.rs @@ -27,7 +27,7 @@ fn too_many_routes_should_not_work() { // User cannot input empty route. assert_noop!( - AMMRoute::swap_exact_tokens_for_tokens(Origin::signed(ALICE), routes_11, 1, 2), + AMMRoute::swap_exact_tokens_for_tokens(RuntimeOrigin::signed(ALICE), routes_11, 1, 2), Error::::ExceedMaxLengthRoute ); }); @@ -37,7 +37,7 @@ fn empty_routes_should_not_work() { new_test_ext().execute_with(|| { // User cannot input empty route. assert_noop!( - AMMRoute::swap_exact_tokens_for_tokens(Origin::signed(ALICE), Vec::new(), 1, 2), + AMMRoute::swap_exact_tokens_for_tokens(RuntimeOrigin::signed(ALICE), Vec::new(), 1, 2), Error::::EmptyRoute ); }); @@ -49,7 +49,7 @@ fn duplicated_routes_should_not_work() { let dup_routes = vec![DOT, SDOT, DOT]; assert_noop!( - AMMRoute::swap_exact_tokens_for_tokens(Origin::signed(ALICE), dup_routes, 1, 2), + AMMRoute::swap_exact_tokens_for_tokens(RuntimeOrigin::signed(ALICE), dup_routes, 1, 2), Error::::DuplicatedRoute ); }); @@ -60,7 +60,7 @@ fn too_low_balance_should_not_work() { new_test_ext().execute_with(|| { let route = vec![DOT, SDOT]; assert_noop!( - AMMRoute::swap_exact_tokens_for_tokens(Origin::signed(ALICE), route, 0, 0), + AMMRoute::swap_exact_tokens_for_tokens(RuntimeOrigin::signed(ALICE), route, 0, 0), Error::::ZeroBalance ); }); @@ -73,7 +73,7 @@ fn swap_exact_tokens_for_tokens_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 100_000_000), DAVE, @@ -87,7 +87,7 @@ fn swap_exact_tokens_for_tokens_should_work() { assert_eq!(Assets::balance(SDOT, trader), 10_000); AMMRoute::swap_exact_tokens_for_tokens( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), route, 1_000, // amount_in 900, // min_amount_out @@ -107,7 +107,7 @@ fn swap_tokens_for_exact_tokens_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 100_000_000), DAVE, @@ -121,7 +121,7 @@ fn swap_tokens_for_exact_tokens_should_work() { assert_eq!(Assets::balance(SDOT, trader), 10_000); AMMRoute::swap_tokens_for_exact_tokens( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), route, 1_000, // amount_out 1_010, // max_amount_in @@ -141,7 +141,7 @@ fn pool_as_bridge_swap_tokens_for_exact_tokens_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (USDT, SDOT), (40_000_000, 1_000_000), DAVE, @@ -151,7 +151,7 @@ fn pool_as_bridge_swap_tokens_for_exact_tokens_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (50_000_000, 50_000_000), DAVE, @@ -172,7 +172,7 @@ fn pool_as_bridge_swap_tokens_for_exact_tokens_should_work() { let max_input_token_willing_to_spend = 510; AMMRoute::swap_tokens_for_exact_tokens( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), route, exact_amount_we_want_out, // want 1_000 USDT max_input_token_willing_to_spend, // dont want to spend more than 4_000 DOT @@ -191,7 +191,7 @@ fn swap_exact_tokens_for_tokens_should_not_work_if_amount_less_than_min_amount_o new_test_ext().execute_with(|| { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 100_000_000), DAVE, @@ -214,7 +214,7 @@ fn swap_exact_tokens_for_tokens_should_not_work_if_amount_less_than_min_amount_o let routes = vec![DOT, SDOT]; assert_noop!( AMMRoute::swap_exact_tokens_for_tokens( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), routes, 1_000, min_amount_out @@ -229,7 +229,7 @@ fn swap_tokens_for_exact_tokens_should_not_work_if_amount_more_than_max_amount_i new_test_ext().execute_with(|| { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 100_000_000), DAVE, @@ -252,7 +252,7 @@ fn swap_tokens_for_exact_tokens_should_not_work_if_amount_more_than_max_amount_i let routes = vec![DOT, SDOT]; assert_noop!( AMMRoute::swap_tokens_for_exact_tokens( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), routes, 1_000, max_amount_in @@ -267,7 +267,7 @@ fn trade_should_work_more_than_one_route() { new_test_ext().execute_with(|| { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 100_000_000), DAVE, @@ -276,7 +276,7 @@ fn trade_should_work_more_than_one_route() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (SDOT, KSM), (100_000_000, 100_000_000), DAVE, @@ -285,7 +285,7 @@ fn trade_should_work_more_than_one_route() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (USDT, KSM), (100_000_000, 100_000_000), DAVE, @@ -340,7 +340,7 @@ fn trade_should_work_more_than_one_route() { // calculate amount out let routes = vec![DOT, SDOT, KSM, USDT]; assert_ok!(AMMRoute::swap_exact_tokens_for_tokens( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), routes, 1_000, 980 @@ -412,7 +412,7 @@ fn get_all_routes_should_work() { let input_amount = 1_000; // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 90_000_000), DAVE, @@ -421,7 +421,7 @@ fn get_all_routes_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (SDOT, KSM), (100_000_000, 100_000_000), DAVE, @@ -430,7 +430,7 @@ fn get_all_routes_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, KSM), (100_000_000, 70_000_000), DAVE, @@ -459,7 +459,7 @@ fn get_best_route_should_work() { let input_amount = 1_000; // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 90_000_000), DAVE, @@ -468,7 +468,7 @@ fn get_best_route_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (SDOT, KSM), (100_000_000, 100_000_000), DAVE, @@ -477,7 +477,7 @@ fn get_best_route_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, KSM), (100_000_000, 70_000_000), DAVE, @@ -503,7 +503,7 @@ fn get_route_for_tokens_not_in_graph_should_not_work() { let input_amount = 1_000; // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 90_000_000), DAVE, @@ -512,7 +512,7 @@ fn get_route_for_tokens_not_in_graph_should_not_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (SDOT, KSM), (100_000_000, 100_000_000), DAVE, @@ -521,7 +521,7 @@ fn get_route_for_tokens_not_in_graph_should_not_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, KSM), (100_000_000, 70_000_000), DAVE, @@ -546,7 +546,7 @@ fn get_route_for_tokens_not_possible_should_not_work() { let input_amount = 1_000; // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 90_000_000), DAVE, @@ -555,7 +555,7 @@ fn get_route_for_tokens_not_possible_should_not_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (KSM, USDT), (100_000_000, 70_000_000), DAVE, @@ -578,7 +578,7 @@ fn get_route_for_tokens_not_possible_should_not_work() { fn get_routes_for_non_existing_pair_should_not_work() { new_test_ext().execute_with(|| { assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, KSM), (100_000_000, 70_000_000), DAVE, @@ -602,7 +602,7 @@ fn get_best_route_same_tokens_should_work() { let input_amount = 1_000; // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 90_000_000), DAVE, @@ -611,7 +611,7 @@ fn get_best_route_same_tokens_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (SDOT, KSM), (100_000_000, 100_000_000), DAVE, @@ -620,7 +620,7 @@ fn get_best_route_same_tokens_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, KSM), (100_000_000, 70_000_000), DAVE, @@ -645,7 +645,7 @@ fn get_best_route_same_tokens_reversed_should_work() { let input_amount = 1_000; // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 90_000_000), DAVE, @@ -654,7 +654,7 @@ fn get_best_route_same_tokens_reversed_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (SDOT, KSM), (100_000_000, 100_000_000), DAVE, @@ -663,7 +663,7 @@ fn get_best_route_same_tokens_reversed_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, KSM), (100_000_000, 70_000_000), DAVE, @@ -688,7 +688,7 @@ fn get_all_routes_reversed_should_work() { let input_amount = 1_000; // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 90_000_000), DAVE, @@ -697,7 +697,7 @@ fn get_all_routes_reversed_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (SDOT, KSM), (100_000_000, 100_000_000), DAVE, @@ -706,7 +706,7 @@ fn get_all_routes_reversed_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, KSM), (100_000_000, 70_000_000), DAVE, @@ -735,7 +735,7 @@ fn get_best_route_reversed_should_work() { let input_amount = 1_000; // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, SDOT), (100_000_000, 90_000_000), DAVE, @@ -744,7 +744,7 @@ fn get_best_route_reversed_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (SDOT, KSM), (100_000_000, 100_000_000), DAVE, @@ -753,7 +753,7 @@ fn get_best_route_reversed_should_work() { // create pool and add liquidity assert_ok!(DefaultAMM::create_pool( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), (DOT, KSM), (100_000_000, 70_000_000), DAVE, diff --git a/pallets/router/src/weights.rs b/pallets/router/src/weights.rs index 8a7120ce5..5e1b78f59 100644 --- a/pallets/router/src/weights.rs +++ b/pallets/router/src/weights.rs @@ -57,18 +57,18 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:4 w:4) // Storage: AMM Pools (r:1 w:1) fn swap_exact_tokens_for_tokens() -> Weight { - (203_026_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(203_026_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) // Storage: Assets Account (r:4 w:4) // Storage: Assets Asset (r:2 w:2) fn swap_tokens_for_exact_tokens() -> Weight { - (200_532_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(200_532_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } } @@ -79,17 +79,17 @@ impl WeightInfo for () { // Storage: Assets Account (r:4 w:4) // Storage: AMM Pools (r:1 w:1) fn swap_exact_tokens_for_tokens() -> Weight { - (203_026_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(203_026_000 as u64) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) // Storage: Assets Account (r:4 w:4) // Storage: Assets Asset (r:2 w:2) fn swap_tokens_for_exact_tokens() -> Weight { - (200_532_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(200_532_000 as u64) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) } } diff --git a/pallets/stableswap/Cargo.toml b/pallets/stableswap/Cargo.toml index d1a397c6a..3e2ea9c77 100644 --- a/pallets/stableswap/Cargo.toml +++ b/pallets/stableswap/Cargo.toml @@ -9,24 +9,24 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', features = ['max-encoded-len'], default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } num-traits = { default-features = false, version = '0.2' } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } serde = { version = '1.0.136', features = ['derive'], optional = true } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [dev-dependencies] -pallet-balances = { branch = 'polkadot-v0.9.28', git = 'https://github.com/paritytech/substrate.git' } +pallet-balances = { branch = 'polkadot-v0.9.32', git = 'https://github.com/paritytech/substrate.git' } pallet-currency-adapter = { path = '../currency-adapter' } -sp-core = { branch = 'polkadot-v0.9.28', git = 'https://github.com/paritytech/substrate.git' } -sp-io = { branch = 'polkadot-v0.9.28', git = 'https://github.com/paritytech/substrate.git' } +sp-core = { branch = 'polkadot-v0.9.32', git = 'https://github.com/paritytech/substrate.git' } +sp-io = { branch = 'polkadot-v0.9.32', git = 'https://github.com/paritytech/substrate.git' } [features] default = ['std'] diff --git a/pallets/stableswap/src/lib.rs b/pallets/stableswap/src/lib.rs index 118835fa4..c7d26fbae 100644 --- a/pallets/stableswap/src/lib.rs +++ b/pallets/stableswap/src/lib.rs @@ -69,7 +69,8 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + + IsType<::RuntimeEvent>; type Assets: Transfer + Inspect @@ -108,7 +109,7 @@ pub mod pallet { type AmplificationCoefficient: Get; /// Specify which origin is allowed to create new pools. - type CreatePoolOrigin: EnsureOrigin; + type CreatePoolOrigin: EnsureOrigin; } #[pallet::error] diff --git a/pallets/stableswap/src/mock.rs b/pallets/stableswap/src/mock.rs index df20cd203..2147c2cfc 100644 --- a/pallets/stableswap/src/mock.rs +++ b/pallets/stableswap/src/mock.rs @@ -59,8 +59,8 @@ impl Config for Test { type BaseCallFilter = Everything; type BlockWeights = (); type BlockLength = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -68,7 +68,7 @@ impl Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); @@ -102,7 +102,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -123,7 +123,7 @@ parameter_types! { } impl pallet_stableswap::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type WeightInfo = (); type PalletId = StableSwapPalletId; @@ -149,7 +149,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -226,46 +226,82 @@ pub fn new_test_ext() -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { - Assets::force_create(Origin::root(), tokens::DOT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::SDOT, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), tokens::KSM, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), SAMPLE_LP_TOKEN, ALICE, true, 1).unwrap(); - Assets::force_create(Origin::root(), SAMPLE_LP_TOKEN_2, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::DOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::SDOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), tokens::KSM, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SAMPLE_LP_TOKEN, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SAMPLE_LP_TOKEN_2, ALICE, true, 1).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::DOT, ALICE, 100_000_000).unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::DOT, + ALICE, + 100_000_000, + ) + .unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), tokens::DOT, BOB, 100_000_000_000_000_000_000, ) .unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::DOT, CHARLIE, 1000_000_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::DOT, EVE, 1000_000_000).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + tokens::DOT, + CHARLIE, + 1000_000_000, + ) + .unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), tokens::DOT, EVE, 1000_000_000).unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), tokens::DOT, FRANK, 100_000_000_000_000_000_000, ) .unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::SDOT, ALICE, 100_000_000).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + tokens::SDOT, + ALICE, + 100_000_000, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), tokens::SDOT, BOB, 100_000_000_000_000_000_000, ) .unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::SDOT, CHARLIE, 1000_000_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::SDOT, EVE, 1000_000_000).unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::SDOT, + CHARLIE, + 1000_000_000, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + tokens::SDOT, + EVE, + 1000_000_000, + ) + .unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::KSM, ALICE, 100_000_000).unwrap(); - Assets::mint(Origin::signed(ALICE), tokens::KSM, BOB, 100_000_000).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + tokens::KSM, + ALICE, + 100_000_000, + ) + .unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), tokens::KSM, BOB, 100_000_000).unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), tokens::KSM, FRANK, 100_000_000_000_000_000_000, diff --git a/pallets/stableswap/src/weights.rs b/pallets/stableswap/src/weights.rs index f9ae8a3c2..76827db12 100644 --- a/pallets/stableswap/src/weights.rs +++ b/pallets/stableswap/src/weights.rs @@ -34,37 +34,37 @@ pub trait WeightInfo { pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { fn get_delta() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn get_alternative_var() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn add_liquidity() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn remove_liquidity() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn create_pool() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } } // For backwards compatibility and tests impl WeightInfo for () { fn get_delta() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn get_alternative_var() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn add_liquidity() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn remove_liquidity() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } fn create_pool() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000 as u64) } } diff --git a/pallets/streaming/Cargo.toml b/pallets/streaming/Cargo.toml index 09b78ba1f..77071c93e 100644 --- a/pallets/streaming/Cargo.toml +++ b/pallets/streaming/Cargo.toml @@ -9,25 +9,25 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } orml-traits = { version = '0.4.1-dev', default-features = false } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } serde = { version = '1.0.136', features = ['derive'], optional = true } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } [dev-dependencies] orml-oracle = { version = '0.4.1-dev' } pallet-currency-adapter = { path = '../currency-adapter' } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } [features] diff --git a/pallets/streaming/src/benchmarking.rs b/pallets/streaming/src/benchmarking.rs index d95fa0196..9b0c7148f 100644 --- a/pallets/streaming/src/benchmarking.rs +++ b/pallets/streaming/src/benchmarking.rs @@ -37,7 +37,7 @@ pub fn dollar(d: u128) -> u128 { d.saturating_mul(10_u128.pow(12)) } -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } diff --git a/pallets/streaming/src/lib.rs b/pallets/streaming/src/lib.rs index 9c3670075..47e722bb6 100644 --- a/pallets/streaming/src/lib.rs +++ b/pallets/streaming/src/lib.rs @@ -65,7 +65,7 @@ pub mod pallet { use weights::WeightInfo; #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Assets for deposit/withdraw collateral assets to/from loans module type Assets: Transfer @@ -96,7 +96,7 @@ pub mod pallet { type UnixTime: UnixTime; /// The origin which can update minimum_deposit - type UpdateOrigin: EnsureOrigin<::Origin>; + type UpdateOrigin: EnsureOrigin<::RuntimeOrigin>; /// Weight information type WeightInfo: WeightInfo; diff --git a/pallets/streaming/src/mock.rs b/pallets/streaming/src/mock.rs index d25119299..415aa29c2 100644 --- a/pallets/streaming/src/mock.rs +++ b/pallets/streaming/src/mock.rs @@ -50,8 +50,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -59,7 +59,7 @@ impl frame_system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -97,7 +97,7 @@ parameter_types! { impl pallet_balances::Config for Test { type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = pallet_balances::weights::SubstrateWeight; @@ -116,7 +116,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -150,7 +150,7 @@ parameter_types! { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = StreamPalletId; type MaxStreamsCount = MaxStreamsCount; type MaxFinishedStreamsCount = MaxFinishedStreamsCount; @@ -175,21 +175,21 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { // Init network tokens to execute extrinsic - Balances::set_balance(Origin::root(), ALICE, dollar(1000), dollar(0)).unwrap(); - Balances::set_balance(Origin::root(), BOB, dollar(1000), dollar(0)).unwrap(); - Balances::set_balance(Origin::root(), DAVE, dollar(1000), dollar(0)).unwrap(); + Balances::set_balance(RuntimeOrigin::root(), ALICE, dollar(1000), dollar(0)).unwrap(); + Balances::set_balance(RuntimeOrigin::root(), BOB, dollar(1000), dollar(0)).unwrap(); + Balances::set_balance(RuntimeOrigin::root(), DAVE, dollar(1000), dollar(0)).unwrap(); // Init DOT to alice with full access - Assets::force_create(Origin::root(), DOT, ALICE, true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), DOT, ALICE, true, 1).unwrap(); // Alice mints DOT - Assets::mint(Origin::signed(ALICE), DOT, ALICE, dollar(10000)).unwrap(); - Assets::mint(Origin::signed(ALICE), DOT, BOB, dollar(10000)).unwrap(); - Assets::mint(Origin::signed(ALICE), DOT, DAVE, dollar(10000)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), DOT, ALICE, dollar(10000)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), DOT, BOB, dollar(10000)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), DOT, DAVE, dollar(10000)).unwrap(); // Set block number and time System::set_block_number(0); TimestampPallet::set_timestamp(6000); // Set minimum deposit for DOT - Streaming::set_minimum_deposit(Origin::root(), DOT, dollar(0)).unwrap(); + Streaming::set_minimum_deposit(RuntimeOrigin::root(), DOT, dollar(0)).unwrap(); }); ext } diff --git a/pallets/streaming/src/tests.rs b/pallets/streaming/src/tests.rs index f50a97025..ab15030ea 100644 --- a/pallets/streaming/src/tests.rs +++ b/pallets/streaming/src/tests.rs @@ -24,7 +24,7 @@ fn create_works() { new_test_ext().execute_with(|| { // Alice creates stream 100 DOT to Bob assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(100), DOT, @@ -34,14 +34,14 @@ fn create_works() { )); // Dave cannot access assert_err!( - Streaming::withdraw(Origin::signed(DAVE), 0, 1), + Streaming::withdraw(RuntimeOrigin::signed(DAVE), 0, 1), Error::::NotTheRecipient ); // Alice creates stream 100 DOT to Bob assert_err!( Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(100), DOT, @@ -60,7 +60,7 @@ fn cancel_works_without_withdrawal() { // Alice creates stream 100 DOT to Bob let stream_id_0 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(101), DOT, @@ -79,7 +79,7 @@ fn cancel_works_without_withdrawal() { let before_bob = ::Assets::balance(DOT, &BOB); // Time passes for 1 seconds TimestampPallet::set_timestamp(7000); - assert_ok!(Streaming::cancel(Origin::signed(ALICE), stream_id_0)); + assert_ok!(Streaming::cancel(RuntimeOrigin::signed(ALICE), stream_id_0)); // Alice and Bob is received with 100 DOT and 0 DOT respectively as deposit == remaining_balance assert_eq!( ::Assets::balance(DOT, &ALICE) - before_alice, @@ -91,14 +91,14 @@ fn cancel_works_without_withdrawal() { ); // Bob cannot access to previous stream assert_err!( - Streaming::withdraw(Origin::signed(BOB), stream_id_0, 1), + Streaming::withdraw(RuntimeOrigin::signed(BOB), stream_id_0, 1), Error::::HasFinished ); // If steam is as collateral, it cannot be cancelled let stream_id_1 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(100), DOT, @@ -116,7 +116,7 @@ fn cancel_works_without_withdrawal() { }, ); assert_err!( - Streaming::cancel(Origin::signed(ALICE), stream_id_1), + Streaming::cancel(RuntimeOrigin::signed(ALICE), stream_id_1), Error::::CannotBeCancelled, ); }); @@ -128,7 +128,7 @@ fn withdraw_works() { let before_bob = ::Assets::balance(DOT, &BOB); // Alice creates stream 100 DOT to Bob assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(100), DOT, @@ -138,13 +138,13 @@ fn withdraw_works() { )); // Dave cannot access assert_err!( - Streaming::withdraw(Origin::signed(DAVE), 0, 1), + Streaming::withdraw(RuntimeOrigin::signed(DAVE), 0, 1), Error::::NotTheRecipient ); // Stream not started assert_err!( - Streaming::withdraw(Origin::signed(BOB), 0, 1), + Streaming::withdraw(RuntimeOrigin::signed(BOB), 0, 1), Error::::NotStarted ); // Time passes for 1 second @@ -155,7 +155,11 @@ fn withdraw_works() { let stream = Streams::::get(0).unwrap(); assert_eq!(stream.delta_of(), Ok(2)); // Bob withdraws some - assert_ok!(Streaming::withdraw(Origin::signed(BOB), 0, dollar(20))); + assert_ok!(Streaming::withdraw( + RuntimeOrigin::signed(BOB), + 0, + dollar(20) + )); // Bob is received with 20 dollars assert_eq!( ::Assets::balance(DOT, &BOB) - before_bob, @@ -168,7 +172,11 @@ fn withdraw_works() { ); TimestampPallet::set_timestamp(16000); - assert_ok!(Streaming::withdraw(Origin::signed(BOB), 0, dollar(80))); + assert_ok!(Streaming::withdraw( + RuntimeOrigin::signed(BOB), + 0, + dollar(80) + )); assert_eq!(Streams::::get(&0).unwrap().remaining_balance, 0); assert_eq!( Streams::::get(&0).unwrap().status, @@ -185,7 +193,7 @@ fn withdraw_with_slower_rate_works() { // Alice creates stream 101 dollars to Bob let stream_id_0 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(101), DOT, @@ -202,7 +210,7 @@ fn withdraw_with_slower_rate_works() { // Dave cannot access assert_err!( - Streaming::withdraw(Origin::signed(DAVE), 0, 1), + Streaming::withdraw(RuntimeOrigin::signed(DAVE), 0, 1), Error::::NotTheRecipient ); @@ -225,12 +233,16 @@ fn withdraw_with_slower_rate_works() { // Bob withdraw all available balance (93230769229759 + 1 + 1000 = 93230769230760) assert_ok!(Streaming::withdraw( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), stream_id_0, 93230769229759 )); // withdraw a small value should be ok - assert_ok!(Streaming::withdraw(Origin::signed(BOB), stream_id_0, 1001)); + assert_ok!(Streaming::withdraw( + RuntimeOrigin::signed(BOB), + stream_id_0, + 1001 + )); stream = Streams::::get(stream_id_0).unwrap(); assert_eq!(stream.sender_balance().unwrap(), 7769230769240); @@ -247,12 +259,16 @@ fn withdraw_with_slower_rate_works() { // Bob withdraw remaining_balance assert_ok!(Streaming::withdraw( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), stream_id_0, 7769230768239 )); - assert_ok!(Streaming::withdraw(Origin::signed(BOB), stream_id_0, 1001)); + assert_ok!(Streaming::withdraw( + RuntimeOrigin::signed(BOB), + stream_id_0, + 1001 + )); // Stream is removed as balance goes zero assert_eq!( @@ -266,7 +282,7 @@ fn withdraw_with_slower_rate_works() { fn withdraw_under_ed_works() { new_test_ext().execute_with(|| { assert_ok!(Streaming::set_minimum_deposit( - Origin::root(), + RuntimeOrigin::root(), HKO, dollar(10) )); @@ -275,7 +291,7 @@ fn withdraw_under_ed_works() { // Alice creates stream 101 dollars to Bob let stream_id_0 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(101), HKO, @@ -292,7 +308,7 @@ fn withdraw_under_ed_works() { // Dave cannot access assert_err!( - Streaming::withdraw(Origin::signed(DAVE), 0, 1), + Streaming::withdraw(RuntimeOrigin::signed(DAVE), 0, 1), Error::::NotTheRecipient ); @@ -316,7 +332,7 @@ fn withdraw_under_ed_works() { // Bob withdraw balance let ed = ::NativeExistentialDeposit::get(); assert_ok!(Streaming::withdraw( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), stream_id_0, 93230769230760 - ed )); @@ -336,7 +352,7 @@ fn withdraw_under_ed_works() { // Bob withdraw remaining_balance assert_ok!(Streaming::withdraw( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), stream_id_0, 7769230769240 + 1 )); @@ -353,14 +369,18 @@ fn withdraw_under_ed_works() { #[test] fn create_ed_and_withdraw_all_works() { new_test_ext().execute_with(|| { - assert_ok!(Streaming::set_minimum_deposit(Origin::root(), HKO, 0)); + assert_ok!(Streaming::set_minimum_deposit( + RuntimeOrigin::root(), + HKO, + 0 + )); let before_bob = ::Assets::balance(HKO, &BOB); assert_eq!(TimestampPallet::now(), 6000); let ed = ::NativeExistentialDeposit::get(); // Alice creates stream 101 dollars to Bob let stream_id_0 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, ed, HKO, @@ -373,7 +393,11 @@ fn create_ed_and_withdraw_all_works() { assert_eq!(stream, new_stream); TimestampPallet::set_timestamp(8000); // Bob withdraw balance - assert_ok!(Streaming::withdraw(Origin::signed(BOB), stream_id_0, 0)); + assert_ok!(Streaming::withdraw( + RuntimeOrigin::signed(BOB), + stream_id_0, + 0 + )); let stream = Streams::::get(stream_id_0).unwrap(); let mut new_stream = new_stream; @@ -397,7 +421,7 @@ fn cancel_works_with_withdrawal() { // Alice creates stream 101 dollars to Bob let stream_id_0 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(101), DOT, @@ -422,7 +446,7 @@ fn cancel_works_with_withdrawal() { assert_eq!(stream.delta_of(), Ok(11)); // Bob withdraws some assert_ok!(Streaming::withdraw( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), stream_id_0, dollar(20) )); @@ -441,10 +465,10 @@ fn cancel_works_with_withdrawal() { assert_eq!(stream.sender_balance().unwrap(), 7769230769240); assert_eq!(stream.recipient_balance().unwrap(), 73230769230760); - assert_ok!(Streaming::cancel(Origin::signed(ALICE), stream_id_0)); + assert_ok!(Streaming::cancel(RuntimeOrigin::signed(ALICE), stream_id_0)); // Cannot cancel multiple times assert_err!( - Streaming::cancel(Origin::signed(ALICE), stream_id_0), + Streaming::cancel(RuntimeOrigin::signed(ALICE), stream_id_0), Error::::HasFinished ); stream = Streams::::get(stream_id_0).unwrap(); @@ -463,7 +487,7 @@ fn cancel_works_with_withdrawal() { ); // Bob cannot access to previous stream assert_err!( - Streaming::withdraw(Origin::signed(BOB), 0, 1), + Streaming::withdraw(RuntimeOrigin::signed(BOB), 0, 1), Error::::HasFinished, ); }); @@ -474,7 +498,7 @@ fn streams_library_should_works() { new_test_ext().execute_with(|| { let stream_id = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(100), DOT, @@ -505,7 +529,7 @@ fn streams_library_should_works() { dollar(100), ); assert_ok!(Streaming::withdraw( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), stream_id, dollar(100) )); @@ -529,7 +553,7 @@ fn max_finished_streams_count_should_work() { new_test_ext().execute_with(|| { let stream_id_0 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(10), DOT, @@ -539,14 +563,14 @@ fn max_finished_streams_count_should_work() { )); TimestampPallet::set_timestamp(10000); assert_ok!(Streaming::withdraw( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), stream_id_0, dollar(10) )); let stream_id_1 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), DAVE, dollar(10), DOT, @@ -556,15 +580,15 @@ fn max_finished_streams_count_should_work() { )); TimestampPallet::set_timestamp(15000); assert_ok!(Streaming::withdraw( - Origin::signed(DAVE), + RuntimeOrigin::signed(DAVE), stream_id_1, dollar(2) )); - assert_ok!(Streaming::cancel(Origin::signed(ALICE), stream_id_1)); + assert_ok!(Streaming::cancel(RuntimeOrigin::signed(ALICE), stream_id_1)); // StreamLibrary should contains stream_id_1, stream_id_0 assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(10), DOT, @@ -634,7 +658,7 @@ fn max_finished_streams_count_should_work() { // Alice create many streams let stream_id_3 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(10), DOT, @@ -644,7 +668,7 @@ fn max_finished_streams_count_should_work() { )); let stream_id_4 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), BOB, dollar(10), DOT, @@ -652,7 +676,7 @@ fn max_finished_streams_count_should_work() { 30, true, )); - assert_ok!(Streaming::cancel(Origin::signed(ALICE), stream_id_3)); + assert_ok!(Streaming::cancel(RuntimeOrigin::signed(ALICE), stream_id_3)); assert_eq!( StreamLibrary::::get(ALICE, StreamKind::Finish) .unwrap() @@ -665,7 +689,7 @@ fn max_finished_streams_count_should_work() { .to_vec(), vec![4, 3, 2, 1] ); - assert_ok!(Streaming::cancel(Origin::signed(ALICE), stream_id_4)); + assert_ok!(Streaming::cancel(RuntimeOrigin::signed(ALICE), stream_id_4)); assert_eq!( StreamLibrary::::get(ALICE, StreamKind::Finish) .unwrap() @@ -681,7 +705,7 @@ fn max_finished_streams_count_should_work() { // BOB create some streams let stream_id_5 = NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), DAVE, dollar(3), DOT, @@ -691,7 +715,7 @@ fn max_finished_streams_count_should_work() { )); // let stream_id_6= NextStreamId::::get(); assert_ok!(Streaming::create( - Origin::signed(BOB), + RuntimeOrigin::signed(BOB), ALICE, dollar(3), DOT, @@ -699,8 +723,8 @@ fn max_finished_streams_count_should_work() { 30, true, )); - assert_ok!(Streaming::cancel(Origin::signed(BOB), stream_id_5)); - // assert_ok!(Streaming::cancel(Origin::signed(BOB), stream_id_6)); + assert_ok!(Streaming::cancel(RuntimeOrigin::signed(BOB), stream_id_5)); + // assert_ok!(Streaming::cancel(RuntimeOrigin::signed(BOB), stream_id_6)); // storage should be removed due to MaxFinishedStreamsCount = 2 assert_eq!( @@ -767,22 +791,38 @@ fn create_with_minimum_deposit_works() { new_test_ext().execute_with(|| { // Set minimum deposit for DOT assert_ok!(Streaming::set_minimum_deposit( - Origin::root(), + RuntimeOrigin::root(), DOT, dollar(100) )); // Alice creates stream 100 DOT to Bob, which is equal to minimum deposit assert_err!( - Streaming::create(Origin::signed(ALICE), BOB, dollar(99), DOT, 6, 10, true), + Streaming::create( + RuntimeOrigin::signed(ALICE), + BOB, + dollar(99), + DOT, + 6, + 10, + true + ), Error::::DepositLowerThanMinimum ); // Asset is not supported to create stream - Assets::force_create(Origin::root(), USDT, ALICE, true, 1).unwrap(); - Assets::mint(Origin::signed(ALICE), USDT, ALICE, dollar(10000)).unwrap(); + Assets::force_create(RuntimeOrigin::root(), USDT, ALICE, true, 1).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), USDT, ALICE, dollar(10000)).unwrap(); assert_err!( - Streaming::create(Origin::signed(ALICE), BOB, dollar(99), USDT, 6, 10, true), + Streaming::create( + RuntimeOrigin::signed(ALICE), + BOB, + dollar(99), + USDT, + 6, + 10, + true + ), Error::::InvalidAssetId ); }) @@ -793,13 +833,21 @@ fn create_with_lots_stream_works() { new_test_ext().execute_with(|| { // Set minimum deposit for DOT assert_ok!(Streaming::set_minimum_deposit( - Origin::root(), + RuntimeOrigin::root(), DOT, dollar(100) )); assert_err!( - Streaming::create(Origin::signed(ALICE), BOB, dollar(99), DOT, 6, 10, false), + Streaming::create( + RuntimeOrigin::signed(ALICE), + BOB, + dollar(99), + DOT, + 6, + 10, + false + ), Error::::DepositLowerThanMinimum ); @@ -809,7 +857,7 @@ fn create_with_lots_stream_works() { Balance, >>::create(ALICE, BOB, dollar(99), DOT, 6, 10, false)); - Assets::mint(Origin::signed(ALICE), DOT, ALICE, dollar(100 * 500)).unwrap(); + Assets::mint(RuntimeOrigin::signed(ALICE), DOT, ALICE, dollar(100 * 500)).unwrap(); let initial_stream_id = NextStreamId::::get(); let recipient_list = 100..500; let stream_amount = dollar(101); @@ -850,7 +898,7 @@ fn create_with_lots_stream_works() { assert_eq!(stream.recipient_balance().unwrap(), 93230769230760); assert_ok!(Streaming::withdraw( - Origin::signed(recipient), + RuntimeOrigin::signed(recipient), iter_stream_id, 93230769230760 )); @@ -872,7 +920,7 @@ fn create_with_lots_stream_works() { assert_eq!(stream.recipient_balance().unwrap(), 7769230769240); assert_ok!(Streaming::withdraw( - Origin::signed(recipient), + RuntimeOrigin::signed(recipient), iter_stream_id, 7769230769240 )); diff --git a/pallets/streaming/src/weights.rs b/pallets/streaming/src/weights.rs index 9abc897d9..f8d597dd9 100644 --- a/pallets/streaming/src/weights.rs +++ b/pallets/streaming/src/weights.rs @@ -64,9 +64,9 @@ impl WeightInfo for SubstrateWeight { // Storage: Streaming StreamLibrary (r:4 w:4) // Storage: Streaming Streams (r:0 w:1) fn create() -> Weight { - (171_886_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(171_886_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming Streams (r:1 w:1) @@ -76,9 +76,9 @@ impl WeightInfo for SubstrateWeight { // Storage: System Account (r:1 w:1) // Storage: Streaming StreamLibrary (r:2 w:2) fn cancel() -> Weight { - (180_108_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(180_108_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming Streams (r:1 w:1) @@ -87,16 +87,16 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn withdraw() -> Weight { - (137_084_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(137_084_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming MinimumDeposits (r:0 w:1) fn set_minimum_deposit() -> Weight { - (35_420_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(35_420_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } @@ -112,9 +112,9 @@ impl WeightInfo for () { // Storage: Streaming StreamLibrary (r:4 w:4) // Storage: Streaming Streams (r:0 w:1) fn create() -> Weight { - (171_886_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(12 as Weight)) - .saturating_add(RocksDbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(171_886_000 as u64) + .saturating_add(RocksDbWeight::get().reads(12 as u64)) + .saturating_add(RocksDbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming Streams (r:1 w:1) @@ -124,9 +124,9 @@ impl WeightInfo for () { // Storage: System Account (r:1 w:1) // Storage: Streaming StreamLibrary (r:2 w:2) fn cancel() -> Weight { - (180_108_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(9 as Weight)) - .saturating_add(RocksDbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(180_108_000 as u64) + .saturating_add(RocksDbWeight::get().reads(9 as u64)) + .saturating_add(RocksDbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming Streams (r:1 w:1) @@ -135,15 +135,15 @@ impl WeightInfo for () { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn withdraw() -> Weight { - (137_084_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(137_084_000 as u64) + .saturating_add(RocksDbWeight::get().reads(7 as u64)) + .saturating_add(RocksDbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming MinimumDeposits (r:0 w:1) fn set_minimum_deposit() -> Weight { - (35_420_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(35_420_000 as u64) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } } diff --git a/pallets/traits/Cargo.toml b/pallets/traits/Cargo.toml index e01154be8..5f666c736 100644 --- a/pallets/traits/Cargo.toml +++ b/pallets/traits/Cargo.toml @@ -10,23 +10,23 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] serde = { version = '1.0.136', features = ['derive'], optional = true } codec = { package = 'parity-scale-codec', version = '3.1.5', features = ['max-encoded-len'], default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } log = { version = "0.4", default-features = false } num-bigint = { default-features = false, version = '0.4' } num-traits = { default-features = false, version = '0.2' } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } [features] default = ['std'] diff --git a/pallets/traits/src/ump.rs b/pallets/traits/src/ump.rs index 47aaef04b..ad2b54ee9 100644 --- a/pallets/traits/src/ump.rs +++ b/pallets/traits/src/ump.rs @@ -296,10 +296,10 @@ pub struct XcmWeightFeeMisc { impl Default for XcmWeightFeeMisc { fn default() -> Self { - let default_weight = 10_000_000_000; + let default_weight = 10_000_000_000u64; let default_fee = 10_000_000_000; XcmWeightFeeMisc { - weight: default_weight, + weight: Weight::from_ref_time(default_weight), fee: default_fee, } } diff --git a/pallets/traits/src/xcm.rs b/pallets/traits/src/xcm.rs index 9f00022d8..93558d787 100644 --- a/pallets/traits/src/xcm.rs +++ b/pallets/traits/src/xcm.rs @@ -23,7 +23,7 @@ use frame_support::{ }, Get, }, - weights::{constants::WEIGHT_PER_SECOND, Weight}, + weights::constants::WEIGHT_PER_SECOND, }; use scale_info::TypeInfo; use sp_core::H256; @@ -31,7 +31,7 @@ use sp_runtime::traits::{BlakeTwo256, Convert, Hash as THash, SaturatedConversio use sp_std::{borrow::Borrow, marker::PhantomData, result}; use xcm::latest::{ prelude::*, AssetId as xcmAssetId, Error as XcmError, Fungibility, Junction::AccountId32, - MultiLocation, NetworkId, + MultiLocation, NetworkId, Weight, }; use xcm_builder::TakeRevenue; use xcm_executor::traits::{ @@ -138,8 +138,8 @@ impl< let units_per_second = AssetIdInfoGetter::get_units_per_second(asset_type) .ok_or(XcmError::TooExpensive)?; - let amount = - units_per_second.saturating_mul(weight as u128) / (WEIGHT_PER_SECOND as u128); + let amount = units_per_second.saturating_mul(weight as u128) + / (WEIGHT_PER_SECOND.ref_time() as u128); // We dont need to proceed if the amount is 0 // For cases (specially tests) where the asset is very cheap with respect @@ -201,7 +201,8 @@ impl< if let Some((id, prev_amount, units_per_second)) = self.1.clone() { let weight = weight.min(self.0); self.0 -= weight; - let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND as u128); + let amount = + units_per_second * (weight as u128) / (WEIGHT_PER_SECOND.ref_time() as u128); self.1 = Some(( id.clone(), prev_amount.saturating_sub(amount), diff --git a/pallets/xcm-helper/Cargo.toml b/pallets/xcm-helper/Cargo.toml index 15773ee12..4619d47a7 100644 --- a/pallets/xcm-helper/Cargo.toml +++ b/pallets/xcm-helper/Cargo.toml @@ -9,42 +9,42 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', features = ['max-encoded-len'], default-features = false } -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } pallet-traits = { path = '../traits', default-features = false } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } [dev-dependencies] -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -kusama-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', features = ['runtime-benchmarks'] } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +kusama-runtime = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', features = ['runtime-benchmarks'] } orml-xcm-support = { version = '0.4.1-dev' } -pallet-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28' } -polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } +pallet-babe = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32' } +polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } serde = { version = '1.0.136' } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } -xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28' } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } +xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32' } [features] default = ['std'] diff --git a/pallets/xcm-helper/src/benchmarking.rs b/pallets/xcm-helper/src/benchmarking.rs index 6359d9b61..b0aad34f9 100644 --- a/pallets/xcm-helper/src/benchmarking.rs +++ b/pallets/xcm-helper/src/benchmarking.rs @@ -6,18 +6,18 @@ use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; use frame_system::{self, RawOrigin as SystemOrigin}; const XCM_WEIGHT_FEE: XcmWeightFeeMisc = XcmWeightFeeMisc { - weight: 3_000_000_000, + weight: Weight::from_ref_time(3_000_000_000), fee: 50000000000u128, }; -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } benchmarks! { where_clause { where - ::Origin: From + ::RuntimeOrigin: From } update_xcm_weight_fee { diff --git a/pallets/xcm-helper/src/lib.rs b/pallets/xcm-helper/src/lib.rs index 54fdf54d4..7a79c94c0 100644 --- a/pallets/xcm-helper/src/lib.rs +++ b/pallets/xcm-helper/src/lib.rs @@ -45,7 +45,7 @@ mod tests; pub mod weights; pub use weights::WeightInfo; pub type AccountIdOf = ::AccountId; -pub type CallIdOf = ::Call; +pub type CallIdOf = ::RuntimeCall; pub type AssetIdOf = <::Assets as Inspect<::AccountId>>::AssetId; pub type BalanceOf = @@ -59,7 +59,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + pallet_xcm::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Assets for deposit/withdraw assets to/from crowdloan account type Assets: Transfer, AssetId = CurrencyId, Balance = Balance> @@ -92,7 +92,7 @@ pub mod pallet { type BlockNumberProvider: BlockNumberProvider>; /// The origin which can update reserve_factor, xcm_fees etc - type UpdateOrigin: EnsureOrigin<::Origin>; + type UpdateOrigin: EnsureOrigin<::RuntimeOrigin>; /// Weight information type WeightInfo: WeightInfo; @@ -174,21 +174,21 @@ pub trait XcmHelper { fn do_withdraw( para_id: ParaId, para_account_id: TAccountId, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; fn do_contribute( para_id: ParaId, amount: Balance, who: &TAccountId, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; fn do_proxy_contribute( para_id: ParaId, amount: Balance, who: &TAccountId, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; fn do_bond( @@ -196,53 +196,53 @@ pub trait XcmHelper { payee: RewardDestination, stash: TAccountId, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; fn do_bond_extra( value: Balance, stash: TAccountId, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; fn do_unbond( value: Balance, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; fn do_rebond( value: Balance, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; fn do_withdraw_unbonded( num_slashing_spans: u32, para_account_id: TAccountId, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; fn do_nominate( targets: Vec, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; fn do_add_proxy( delegate: AccountId, proxy_type: Option, delay: BlockNumber, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; fn do_remove_proxy( delegate: AccountId, proxy_type: Option, delay: BlockNumber, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result; } @@ -258,14 +258,14 @@ impl Pallet { pub fn report_outcome_notify( message: &mut Xcm<()>, responder: impl Into, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, timeout: BlockNumberFor, ) -> Result { let responder = responder.into(); let dest = ::LocationInverter::invert_location(&responder) .map_err(|()| Error::::MultiLocationNotInvertible)?; - let notify: ::Call = notify.into(); - let max_response_weight = notify.get_dispatch_info().weight; + let notify: ::RuntimeCall = notify.into(); + let max_response_weight = notify.get_dispatch_info().weight.ref_time(); let query_id = pallet_xcm::Pallet::::new_notify_query(responder, notify, timeout); let report_error = Xcm(vec![ReportError { dest, @@ -316,7 +316,7 @@ impl XcmHelper, AccountIdOf> for Pallet { }, Transact { origin_type: OriginKind::SovereignAccount, - require_weight_at_most: weight, + require_weight_at_most: weight.ref_time(), call, }, RefundSurplus, @@ -332,7 +332,7 @@ impl XcmHelper, AccountIdOf> for Pallet { delegate: AccountId, proxy_type: Option, delay: BlockNumber, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::AddProxy); Ok(switch_relay!({ @@ -369,7 +369,7 @@ impl XcmHelper, AccountIdOf> for Pallet { delegate: AccountId, proxy_type: Option, delay: BlockNumber, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::RemoveProxy); Ok(switch_relay!({ @@ -406,7 +406,7 @@ impl XcmHelper, AccountIdOf> for Pallet { fn do_withdraw( para_id: ParaId, para_account_id: AccountIdOf, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::Withdraw); Ok(switch_relay!({ @@ -442,7 +442,7 @@ impl XcmHelper, AccountIdOf> for Pallet { para_id: ParaId, amount: BalanceOf, _who: &AccountIdOf, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::Contribute); Ok(switch_relay!({ @@ -480,7 +480,7 @@ impl XcmHelper, AccountIdOf> for Pallet { para_id: ParaId, amount: BalanceOf, who: &AccountIdOf, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::Contribute); let real = @@ -537,7 +537,7 @@ impl XcmHelper, AccountIdOf> for Pallet { payee: RewardDestination>, stash: AccountIdOf, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let controller = stash.clone(); let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::Bond); @@ -592,7 +592,7 @@ impl XcmHelper, AccountIdOf> for Pallet { value: BalanceOf, stash: AccountIdOf, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::BondExtra); Ok(switch_relay!({ @@ -641,7 +641,7 @@ impl XcmHelper, AccountIdOf> for Pallet { fn do_unbond( value: BalanceOf, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::Unbond); Ok(switch_relay!({ @@ -679,7 +679,7 @@ impl XcmHelper, AccountIdOf> for Pallet { fn do_rebond( value: BalanceOf, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::Rebond); Ok(switch_relay!({ @@ -718,7 +718,7 @@ impl XcmHelper, AccountIdOf> for Pallet { num_slashing_spans: u32, para_account_id: AccountIdOf, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::WithdrawUnbonded); Ok(switch_relay!({ @@ -772,7 +772,7 @@ impl XcmHelper, AccountIdOf> for Pallet { fn do_nominate( targets: Vec>, index: u16, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, ) -> Result { let targets_source = targets.into_iter().map(T::Lookup::unlookup).collect(); let xcm_weight_fee_misc = Self::xcm_weight_fee(XcmCall::Nominate); diff --git a/pallets/xcm-helper/src/mock.rs b/pallets/xcm-helper/src/mock.rs index 622cadcc6..816a4c2cc 100644 --- a/pallets/xcm-helper/src/mock.rs +++ b/pallets/xcm-helper/src/mock.rs @@ -59,12 +59,12 @@ impl BlockNumberProvider } parameter_types! { - pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND / 4; - pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND / 4; + pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); + pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = ParachainInfo; type DmpMessageHandler = DmpQueue; @@ -80,7 +80,7 @@ impl parachain_info::Config for Test {} parameter_types! { pub RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayCurrency: CurrencyId = DOT; - pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); } @@ -91,15 +91,15 @@ pub type LocationToAccountId = ( ); pub type XcmOriginToCallOrigin = ( - SovereignSignedViaLocation, - RelayChainAsNative, - SiblingParachainAsNative, - SignedAccountId32AsNative, - XcmPassthrough, + SovereignSignedViaLocation, + RelayChainAsNative, + SiblingParachainAsNative, + SignedAccountId32AsNative, + XcmPassthrough, ); parameter_types! { - pub const UnitWeightCost: Weight = 1; + pub const UnitWeightCost: u64 = 1; pub DotPerSecond: (AssetId, u128) = (AssetId::Concrete(MultiLocation::parent()), 1); } @@ -134,7 +134,7 @@ pub type Barrier = AllowUnpaidExecutionFrom; pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = XcmOriginToCallOrigin; @@ -142,7 +142,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = (); type SubscriptionService = PolkadotXcm; @@ -174,44 +174,44 @@ impl ConvertOrigin for SystemParachainAsSuperuser; type ExecuteOverweightOrigin = EnsureRoot; type ChannelInfo = ParachainSystem; type VersionWrapper = (); type ControllerOrigin = EnsureRoot; - type ControllerOriginConverter = SystemParachainAsSuperuser; + type ControllerOriginConverter = SystemParachainAsSuperuser; type WeightInfo = cumulus_pallet_xcmp_queue::weights::SubstrateWeight; } impl cumulus_pallet_dmp_queue::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRoot; } impl cumulus_pallet_xcm::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Test { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type Origin = Origin; - type Call = Call; - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } @@ -280,7 +280,7 @@ impl Convert for AccountIdToMultiLocation { parameter_types! { pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); - pub const BaseXcmWeight: Weight = 100_000_000; + pub const BaseXcmWeight: u64 = 100_000_000; pub const MaxInstructions: u32 = 100; } @@ -300,8 +300,8 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; - type Call = Call; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type Index = Index; type BlockNumber = BlockNumber; type Hash = H256; @@ -309,7 +309,7 @@ impl frame_system::Config for Test { type AccountId = AccountId; type Lookup = AccountIdLookup; type Header = generic::Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -330,7 +330,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -364,7 +364,7 @@ parameter_types! { } impl crate::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRoot; type Assets = Assets; type XcmSender = XcmRouter; @@ -388,7 +388,7 @@ parameter_types! { } impl pallet_assets::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -432,25 +432,41 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities { .unwrap(); let xcm_weight_fee_misc = XcmWeightFeeMisc { - weight: 3_000_000_000, + weight: Weight::from_ref_time(3_000_000_000), fee: dot(10f64), }; let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { - Assets::force_create(Origin::root(), DOT, Id(ALICE), true, 1).unwrap(); - Assets::force_create(Origin::root(), SDOT, Id(ALICE), true, 1).unwrap(); - Assets::mint(Origin::signed(ALICE), DOT, Id(ALICE), 100 * DOT_DECIMAL).unwrap(); - Assets::mint(Origin::signed(ALICE), SDOT, Id(ALICE), 100 * DOT_DECIMAL).unwrap(); + Assets::force_create(RuntimeOrigin::root(), DOT, Id(ALICE), true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SDOT, Id(ALICE), true, 1).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + DOT, + Id(ALICE), + 100 * DOT_DECIMAL, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + SDOT, + Id(ALICE), + 100 * DOT_DECIMAL, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), DOT, Id(XcmHelpers::account_id()), dot(30f64), ) .unwrap(); - XcmHelpers::update_xcm_weight_fee(Origin::root(), XcmCall::AddMemo, xcm_weight_fee_misc) - .unwrap(); + XcmHelpers::update_xcm_weight_fee( + RuntimeOrigin::root(), + XcmCall::AddMemo, + xcm_weight_fee_misc, + ) + .unwrap(); }); ext @@ -493,7 +509,7 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { .unwrap(); let xcm_weight_fee_misc = XcmWeightFeeMisc { - weight: 3_000_000_000, + weight: Weight::from_ref_time(3_000_000_000), fee: dot(10f64), }; @@ -509,19 +525,35 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities { let mut ext = sp_io::TestExternalities::new(t); ext.execute_with(|| { System::set_block_number(1); - Assets::force_create(Origin::root(), DOT, Id(ALICE), true, 1).unwrap(); - Assets::force_create(Origin::root(), SDOT, Id(ALICE), true, 1).unwrap(); - Assets::mint(Origin::signed(ALICE), DOT, Id(ALICE), 100 * DOT_DECIMAL).unwrap(); - Assets::mint(Origin::signed(ALICE), SDOT, Id(ALICE), 100 * DOT_DECIMAL).unwrap(); + Assets::force_create(RuntimeOrigin::root(), DOT, Id(ALICE), true, 1).unwrap(); + Assets::force_create(RuntimeOrigin::root(), SDOT, Id(ALICE), true, 1).unwrap(); Assets::mint( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), + DOT, + Id(ALICE), + 100 * DOT_DECIMAL, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), + SDOT, + Id(ALICE), + 100 * DOT_DECIMAL, + ) + .unwrap(); + Assets::mint( + RuntimeOrigin::signed(ALICE), DOT, Id(XcmHelpers::account_id()), dot(30f64), ) .unwrap(); - XcmHelpers::update_xcm_weight_fee(Origin::root(), XcmCall::AddMemo, xcm_weight_fee_misc) - .unwrap(); + XcmHelpers::update_xcm_weight_fee( + RuntimeOrigin::root(), + XcmCall::AddMemo, + xcm_weight_fee_misc, + ) + .unwrap(); }); ext diff --git a/pallets/xcm-helper/src/tests.rs b/pallets/xcm-helper/src/tests.rs index e8d505ee7..93116d62b 100644 --- a/pallets/xcm-helper/src/tests.rs +++ b/pallets/xcm-helper/src/tests.rs @@ -13,7 +13,7 @@ fn update_xcm_fees_should_work() { frame_system::RawOrigin::Root.into(), // origin XcmCall::Bond, XcmWeightFeeMisc { - weight: One::one(), + weight: Weight::from_ref_time(One::one()), fee: Zero::zero() } ), diff --git a/pallets/xcm-helper/src/weights.rs b/pallets/xcm-helper/src/weights.rs index a3f3e71c5..f28bf4c40 100644 --- a/pallets/xcm-helper/src/weights.rs +++ b/pallets/xcm-helper/src/weights.rs @@ -54,9 +54,9 @@ impl WeightInfo for SubstrateWeight { // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: XcmHelper XcmWeightFee (r:1 w:1) fn update_xcm_weight_fee() -> Weight { - (37_853_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_853_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } @@ -65,8 +65,8 @@ impl WeightInfo for () { // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: XcmHelper XcmWeightFee (r:1 w:1) fn update_xcm_weight_fee() -> Weight { - (37_853_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_853_000 as u64) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } } diff --git a/precompiles/assets-erc20/Cargo.toml b/precompiles/assets-erc20/Cargo.toml index 9a4211207..f1db4f1c3 100644 --- a/precompiles/assets-erc20/Cargo.toml +++ b/precompiles/assets-erc20/Cargo.toml @@ -14,16 +14,16 @@ precompile-utils = { path = "../utils", default-features = false } # Substrate codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } scale-info = { version = "2.1.0", default-features = false, features = [ "derive" ] } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } # Frontier fp-evm = { version='3.0.0-dev', default-features = false } @@ -38,7 +38,7 @@ precompile-utils = { path = "../utils", features = ["testing"] } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["max-encoded-len"] } scale-info = { version = "2.1.0", default-features = false, features = ["derive"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = ["std"] diff --git a/precompiles/assets-erc20/src/eip2612.rs b/precompiles/assets-erc20/src/eip2612.rs index cdd015ecb..5e132c0ef 100644 --- a/precompiles/assets-erc20/src/eip2612.rs +++ b/precompiles/assets-erc20/src/eip2612.rs @@ -118,13 +118,13 @@ where + pallet_evm::Config + frame_system::Config + pallet_timestamp::Config, - Runtime::Call: Dispatchable + GetDispatchInfo, - Runtime::Call: From>, - ::Origin: From>, + Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, + Runtime::RuntimeCall: From>, + ::RuntimeOrigin: From>, BalanceOf: TryFrom + Into + EvmData, // Runtime: AccountIdAssetIdConversion>, Runtime: AddressToAssetId>, - <::Call as Dispatchable>::Origin: OriginTrait, + <::RuntimeCall as Dispatchable>::RuntimeOrigin: OriginTrait, ::Moment: Into, AssetIdOf: Display, { diff --git a/precompiles/assets-erc20/src/lib.rs b/precompiles/assets-erc20/src/lib.rs index 957565999..7fed3282a 100644 --- a/precompiles/assets-erc20/src/lib.rs +++ b/precompiles/assets-erc20/src/lib.rs @@ -118,12 +118,12 @@ impl PrecompileSet for Erc20AssetsPrecompileSet + pallet_evm::Config + frame_system::Config, - Runtime::Call: Dispatchable + GetDispatchInfo, - Runtime::Call: From>, - ::Origin: From>, + Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, + Runtime::RuntimeCall: From>, + ::RuntimeOrigin: From>, BalanceOf: TryFrom + Into + EvmData, Runtime: AddressToAssetId>, - <::Call as Dispatchable>::Origin: OriginTrait, + <::RuntimeCall as Dispatchable>::RuntimeOrigin: OriginTrait, ::Moment: Into, AssetIdOf: Display, { @@ -199,12 +199,12 @@ impl Erc20AssetsPrecompileSet where Instance: eip2612::InstanceToPrefix + 'static, Runtime: pallet_assets::Config + pallet_evm::Config + frame_system::Config, - Runtime::Call: Dispatchable + GetDispatchInfo, - Runtime::Call: From>, - ::Origin: From>, + Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, + Runtime::RuntimeCall: From>, + ::RuntimeOrigin: From>, BalanceOf: TryFrom + Into + EvmData, Runtime: AddressToAssetId>, - <::Call as Dispatchable>::Origin: OriginTrait, + <::RuntimeCall as Dispatchable>::RuntimeOrigin: OriginTrait, { fn total_supply( asset_id: AssetIdOf, diff --git a/precompiles/assets-erc20/src/mock.rs b/precompiles/assets-erc20/src/mock.rs index 4808b62bf..e2b1d6a27 100644 --- a/precompiles/assets-erc20/src/mock.rs +++ b/precompiles/assets-erc20/src/mock.rs @@ -142,16 +142,16 @@ parameter_types! { impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; type BlockNumber = BlockNumber; - type Call = Call; + type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -186,7 +186,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = (); type MaxLocks = (); type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -196,16 +196,17 @@ impl pallet_balances::Config for Runtime { parameter_types! { pub const PrecompilesValue: Erc20AssetsPrecompileSet = Erc20AssetsPrecompileSet(PhantomData); + pub WeightPerGas: u64 = 1; } impl pallet_evm::Config for Runtime { type FeeCalculator = (); - type GasWeightMapping = (); + type GasWeightMapping = pallet_evm::FixedGasWeightMapping; type CallOrigin = EnsureAddressRoot; type WithdrawOrigin = EnsureAddressNever; type AddressMapping = AccountId; type Currency = Balances; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Runner = pallet_evm::runner::stack::Runner; type PrecompilesType = Erc20AssetsPrecompileSet; type PrecompilesValue = PrecompilesValue; @@ -214,6 +215,7 @@ impl pallet_evm::Config for Runtime { type BlockGasLimit = (); type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; type FindAuthor = (); + type WeightPerGas = WeightPerGas; } // These parameters dont matter much as this will only be called by root with the forced arguments @@ -228,7 +230,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = AssetId; type Currency = Balances; diff --git a/precompiles/assets-erc20/src/tests.rs b/precompiles/assets-erc20/src/tests.rs index 74f2f3642..29ed59bdf 100644 --- a/precompiles/assets-erc20/src/tests.rs +++ b/precompiles/assets-erc20/src/tests.rs @@ -30,7 +30,7 @@ fn precompiles() -> Erc20AssetsPrecompileSet { fn selector_less_than_four_bytes() { ExtBuilder::default().build().execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, @@ -47,7 +47,7 @@ fn selector_less_than_four_bytes() { fn no_selector_exists_but_length_is_right() { ExtBuilder::default().build().execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, @@ -97,14 +97,14 @@ fn get_total_supply() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1000 @@ -129,14 +129,14 @@ fn get_balances_known_user() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1000 @@ -163,7 +163,7 @@ fn get_balances_unknown_user() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, @@ -191,14 +191,14 @@ fn approve() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1000 @@ -230,14 +230,14 @@ fn approve_saturating() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1000 @@ -282,14 +282,14 @@ fn check_allowance_existing() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1000 @@ -328,7 +328,7 @@ fn check_allowance_not_existing() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, @@ -357,14 +357,14 @@ fn transfer() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1000 @@ -420,14 +420,14 @@ fn transfer_not_enough_founds() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1 @@ -458,14 +458,14 @@ fn transfer_from() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1000 @@ -556,14 +556,14 @@ fn transfer_from_non_incremental_approval() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1000 @@ -636,14 +636,14 @@ fn transfer_from_above_allowance() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1000 @@ -687,14 +687,14 @@ fn transfer_from_self() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), 0u128, Account::Alice.into(), 1000 @@ -751,14 +751,14 @@ fn get_metadata() { .build() .execute_with(|| { assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, 1 )); assert_ok!(Assets::force_set_metadata( - Origin::root(), + RuntimeOrigin::root(), 0u128, b"TestToken".to_vec(), b"Test".to_vec(), @@ -807,7 +807,7 @@ fn minimum_balance_is_right() { ExtBuilder::default().build().execute_with(|| { let expected_min_balance = 19; assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), 0u128, Account::Alice.into(), true, @@ -831,7 +831,7 @@ fn mint_is_ok() { ExtBuilder::default().build().execute_with(|| { let asset_id = 0; assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, Account::Alice.into(), true, @@ -865,7 +865,7 @@ fn mint_non_admin_is_not_ok() { ExtBuilder::default().build().execute_with(|| { let asset_id = 0; assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, Account::Alice.into(), true, @@ -891,7 +891,7 @@ fn burn_is_ok() { ExtBuilder::default().build().execute_with(|| { let asset_id = 0; assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, Account::Alice.into(), true, @@ -901,7 +901,7 @@ fn burn_is_ok() { // Issue some initial assets for Bob let init_amount = 123; assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), asset_id, Account::Bob.into(), init_amount, @@ -935,14 +935,14 @@ fn burn_non_admin_is_not_ok() { ExtBuilder::default().build().execute_with(|| { let asset_id = 0; assert_ok!(Assets::force_create( - Origin::root(), + RuntimeOrigin::root(), asset_id, Account::Alice.into(), true, 1, )); assert_ok!(Assets::mint( - Origin::signed(Account::Alice), + RuntimeOrigin::signed(Account::Alice), asset_id, Account::Bob.into(), 1000000, diff --git a/precompiles/balances-erc20/Cargo.toml b/precompiles/balances-erc20/Cargo.toml index 0769983d7..f6b6d196a 100644 --- a/precompiles/balances-erc20/Cargo.toml +++ b/precompiles/balances-erc20/Cargo.toml @@ -16,13 +16,13 @@ precompile-utils = { path = "../utils", default-features = false } # Substrate codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ "max-encoded-len" ] } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } # Frontier fp-evm = { version='3.0.0-dev', default-features = false } @@ -38,9 +38,9 @@ sha3 = "0.8" # Moonbeam precompile-utils = { path = "../utils", features = [ "testing" ] } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } scale-info = { version = "2.0", default-features = false, features = [ "derive" ] } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32" } [features] default = [ "std" ] diff --git a/precompiles/balances-erc20/src/eip2612.rs b/precompiles/balances-erc20/src/eip2612.rs index a0671b974..26e8cea95 100644 --- a/precompiles/balances-erc20/src/eip2612.rs +++ b/precompiles/balances-erc20/src/eip2612.rs @@ -35,9 +35,9 @@ where Metadata: Erc20Metadata, Instance: InstanceToPrefix + 'static, Runtime: pallet_balances::Config + pallet_evm::Config + pallet_timestamp::Config, - Runtime::Call: Dispatchable + GetDispatchInfo, - Runtime::Call: From>, - ::Origin: From>, + Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, + Runtime::RuntimeCall: From>, + ::RuntimeOrigin: From>, BalanceOf: TryFrom + Into, ::Moment: Into, { diff --git a/precompiles/balances-erc20/src/lib.rs b/precompiles/balances-erc20/src/lib.rs index dce8d1d63..a06d8ad57 100644 --- a/precompiles/balances-erc20/src/lib.rs +++ b/precompiles/balances-erc20/src/lib.rs @@ -212,9 +212,9 @@ where Metadata: Erc20Metadata, Instance: InstanceToPrefix + 'static, Runtime: pallet_balances::Config + pallet_evm::Config + pallet_timestamp::Config, - Runtime::Call: Dispatchable + GetDispatchInfo, - Runtime::Call: From>, - ::Origin: From>, + Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, + Runtime::RuntimeCall: From>, + ::RuntimeOrigin: From>, BalanceOf: TryFrom + Into, ::Moment: Into, { @@ -229,9 +229,9 @@ where Metadata: Erc20Metadata, Instance: InstanceToPrefix + 'static, Runtime: pallet_balances::Config + pallet_evm::Config + pallet_timestamp::Config, - Runtime::Call: Dispatchable + GetDispatchInfo, - Runtime::Call: From>, - ::Origin: From>, + Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, + Runtime::RuntimeCall: From>, + ::RuntimeOrigin: From>, BalanceOf: TryFrom + Into, ::Moment: Into, { @@ -278,9 +278,9 @@ where Metadata: Erc20Metadata, Instance: InstanceToPrefix + 'static, Runtime: pallet_balances::Config + pallet_evm::Config + pallet_timestamp::Config, - Runtime::Call: Dispatchable + GetDispatchInfo, - Runtime::Call: From>, - ::Origin: From>, + Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, + Runtime::RuntimeCall: From>, + ::RuntimeOrigin: From>, BalanceOf: TryFrom + Into, ::Moment: Into, { diff --git a/precompiles/balances-erc20/src/mock.rs b/precompiles/balances-erc20/src/mock.rs index fe968671d..7967f725f 100644 --- a/precompiles/balances-erc20/src/mock.rs +++ b/precompiles/balances-erc20/src/mock.rs @@ -117,16 +117,16 @@ parameter_types! { impl frame_system::Config for Runtime { type BaseCallFilter = Everything; type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; type BlockNumber = BlockNumber; - type Call = Call; + type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -161,7 +161,7 @@ impl pallet_balances::Config for Runtime { type ReserveIdentifier = (); type MaxLocks = (); type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -171,16 +171,17 @@ impl pallet_balances::Config for Runtime { parameter_types! { pub BlockGasLimit: U256 = U256::max_value(); pub const PrecompilesValue: Precompiles = Precompiles(PhantomData); + pub WeightPerGas: u64 = 1; } impl pallet_evm::Config for Runtime { type FeeCalculator = (); - type GasWeightMapping = (); + type GasWeightMapping = pallet_evm::FixedGasWeightMapping; type CallOrigin = EnsureAddressRoot; type WithdrawOrigin = EnsureAddressNever; type AddressMapping = AccountId; type Currency = Balances; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Runner = pallet_evm::runner::stack::Runner; type PrecompilesType = Precompiles; type PrecompilesValue = PrecompilesValue; @@ -189,6 +190,7 @@ impl pallet_evm::Config for Runtime { type BlockGasLimit = BlockGasLimit; type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; type FindAuthor = (); + type WeightPerGas = WeightPerGas; } // Configure a mock runtime to test the pallet. @@ -291,7 +293,7 @@ impl ExtBuilder { } } -pub(crate) fn events() -> Vec { +pub(crate) fn events() -> Vec { System::events() .into_iter() .map(|r| r.event) diff --git a/precompiles/balances-erc20/src/tests.rs b/precompiles/balances-erc20/src/tests.rs index 090aaa70e..7ca73ac26 100644 --- a/precompiles/balances-erc20/src/tests.rs +++ b/precompiles/balances-erc20/src/tests.rs @@ -550,7 +550,7 @@ fn deposit(data: Vec) { // We need to call using EVM pallet so we can check the EVM correctly sends the amount // to the precompile. Evm::call( - Origin::root(), + RuntimeOrigin::root(), Account::Alice.into(), Account::Precompile.into(), data, @@ -566,34 +566,34 @@ fn deposit(data: Vec) { assert_eq!( events(), vec![ - Event::System(frame_system::Event::NewAccount { + RuntimeEvent::System(frame_system::Event::NewAccount { account: Account::Precompile }), - Event::Balances(pallet_balances::Event::Endowed { + RuntimeEvent::Balances(pallet_balances::Event::Endowed { account: Account::Precompile, free_balance: 500 }), // EVM make a transfer because some value is provided. - Event::Balances(pallet_balances::Event::Transfer { + RuntimeEvent::Balances(pallet_balances::Event::Transfer { from: Account::Alice, to: Account::Precompile, amount: 500 }), // Precompile send it back since deposit should be a no-op. - Event::Balances(pallet_balances::Event::Transfer { + RuntimeEvent::Balances(pallet_balances::Event::Transfer { from: Account::Precompile, to: Account::Alice, amount: 500 }), // Log is correctly emitted. - Event::Evm(pallet_evm::Event::Log { + RuntimeEvent::Evm(pallet_evm::Event::Log { log: LogsBuilder::new(Account::Precompile.into()).log2( SELECTOR_LOG_DEPOSIT, Account::Alice, EvmDataWriter::new().write(U256::from(500)).build(), ) }), - Event::Evm(pallet_evm::Event::Executed { + RuntimeEvent::Evm(pallet_evm::Event::Executed { address: Account::Precompile.into() }), ] @@ -665,7 +665,7 @@ fn deposit_zero() { // We need to call using EVM pallet so we can check the EVM correctly sends the amount // to the precompile. Evm::call( - Origin::root(), + RuntimeOrigin::root(), Account::Alice.into(), Account::Precompile.into(), EvmDataWriter::new_with_selector(Action::Deposit).build(), @@ -680,7 +680,7 @@ fn deposit_zero() { assert_eq!( events(), - vec![Event::Evm(pallet_evm::Event::ExecutedFailed { + vec![RuntimeEvent::Evm(pallet_evm::Event::ExecutedFailed { address: Account::Precompile.into() }),] ); diff --git a/precompiles/utils/Cargo.toml b/precompiles/utils/Cargo.toml index 36ed57661..6acf041c0 100644 --- a/precompiles/utils/Cargo.toml +++ b/precompiles/utils/Cargo.toml @@ -15,12 +15,12 @@ precompile-utils-macro = { path = "macro" } # Substrate codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.32", default-features = false } # Frontier evm = { git = "https://github.com/rust-blockchain/evm", rev = "01bcbd2205a212c34451d3b4fabc962793b057d3", default-features = false, features = ["with-codec"] } @@ -28,7 +28,7 @@ fp-evm = { version='3.0.0-dev', default-features = false } pallet-evm = { version='6.0.0-dev', default-features = false } # Polkadot / XCM -xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.32", default-features = false } [dev-dependencies] hex-literal = "0.3.1" diff --git a/precompiles/utils/src/lib.rs b/precompiles/utils/src/lib.rs index 860ddcdf5..d667db862 100644 --- a/precompiles/utils/src/lib.rs +++ b/precompiles/utils/src/lib.rs @@ -163,20 +163,20 @@ pub struct RuntimeHelper(PhantomData); impl RuntimeHelper where Runtime: pallet_evm::Config, - Runtime::Call: Dispatchable + GetDispatchInfo, + Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, { /// Try to dispatch a Substrate call. /// Return an error if there are not enough gas, or if the call fails. /// If successful returns the used gas using the Runtime GasWeightMapping. pub fn try_dispatch( handle: &mut impl PrecompileHandleExt, - origin: ::Origin, + origin: ::RuntimeOrigin, call: Call, ) -> EvmResult<()> where - Runtime::Call: From, + Runtime::RuntimeCall: From, { - let call = Runtime::Call::from(call); + let call = Runtime::RuntimeCall::from(call); let dispatch_info = call.get_dispatch_info(); // Make sure there is enough gas. @@ -214,14 +214,14 @@ where /// Cost of a Substrate DB write in gas. pub fn db_write_gas_cost() -> u64 { ::GasWeightMapping::weight_to_gas( - ::DbWeight::get().write, + ::DbWeight::get().writes(1), ) } /// Cost of a Substrate DB read in gas. pub fn db_read_gas_cost() -> u64 { ::GasWeightMapping::weight_to_gas( - ::DbWeight::get().read, + ::DbWeight::get().reads(1), ) } } diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index fc7548b62..06c3d7e63 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -6,18 +6,18 @@ version = '1.9.4' [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', default-features = false } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } log = { version = "0.4", default-features = false } orml-oracle = { version = '0.4.1-dev', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } serde = { version = '1.0.136', optional = true } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [features] default = ['std'] diff --git a/runtime/heiko/Cargo.toml b/runtime/heiko/Cargo.toml index 998010f9d..907182246 100644 --- a/runtime/heiko/Cargo.toml +++ b/runtime/heiko/Cargo.toml @@ -20,63 +20,63 @@ smallvec = '1.6.1' static_assertions = '1.1.0' # Substrate dependencies -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-try-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-collective = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-democracy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-identity = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-proxy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-scheduler = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-treasury = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-try-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-collective = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-democracy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-identity = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-proxy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-scheduler = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-treasury = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } # Cumulus dependencies -cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } +cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } # ORML dependencies orml-oracle = { version = '0.4.1-dev', default-features = false } @@ -107,11 +107,11 @@ pallet-xcm-helper = { path = '../../pallets/xcm-helper', default-fea primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } [build-dependencies.substrate-wasm-builder] -branch = 'polkadot-v0.9.28' +branch = 'polkadot-v0.9.32' git = 'https://github.com/paritytech/substrate.git' [dev-dependencies] -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [features] default = ['std'] @@ -119,7 +119,7 @@ runtime-benchmarks = [ 'sp-runtime/runtime-benchmarks', 'frame-benchmarking', 'frame-support/runtime-benchmarks', - 'frame-system-benchmarking', + 'frame-system-benchmarking/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'pallet-bridge/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', @@ -219,7 +219,6 @@ std = [ 'orml-xtokens/std', 'orml-xcm/std', 'orml-vesting/std', - 'frame-try-runtime/std', 'pallet-amm/std', 'pallet-router/std', 'pallet-emergency-shutdown/std', @@ -247,6 +246,21 @@ try-runtime = [ 'pallet-scheduler/try-runtime', 'pallet-preimage/try-runtime', 'polkadot-runtime-common/try-runtime', + 'pallet-proxy/try-runtime', + 'pallet-xcm/try-runtime', + 'parachain-info/try-runtime', + 'pallet-collator-selection/try-runtime', + 'cumulus-pallet-xcmp-queue/try-runtime', + 'cumulus-pallet-dmp-queue/try-runtime', + 'cumulus-pallet-xcm/try-runtime', + 'cumulus-pallet-aura-ext/try-runtime', + 'cumulus-pallet-parachain-system/try-runtime', + 'pallet-crowdloans/try-runtime', + 'pallet-amm/try-runtime', + 'pallet-router/try-runtime', + 'pallet-currency-adapter/try-runtime', + 'pallet-emergency-shutdown/try-runtime', + 'pallet-farming/try-runtime', 'pallet-session/try-runtime', 'pallet-assets/try-runtime', 'pallet-authorship/try-runtime', @@ -262,8 +276,3 @@ try-runtime = [ 'pallet-xcm-helper/try-runtime', 'pallet-asset-registry/try-runtime', ] - -[package.metadata.cargo-udeps.ignore] -normal = [ - 'frame-try-runtime', -] diff --git a/runtime/heiko/src/constants.rs b/runtime/heiko/src/constants.rs index 7b69f7710..33441478a 100644 --- a/runtime/heiko/src/constants.rs +++ b/runtime/heiko/src/constants.rs @@ -73,7 +73,7 @@ pub mod fee { fn polynomial() -> WeightToFeeCoefficients { // in heiko, extrinsic base weight (smallest non-zero weight) is mapped to 12 CENTS let p = super::currency::CENTS * 12; - let q = Balance::from(ExtrinsicBaseWeight::get()); + let q = Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, diff --git a/runtime/heiko/src/lib.rs b/runtime/heiko/src/lib.rs index b5b5e1ae2..a2dac1fe2 100644 --- a/runtime/heiko/src/lib.rs +++ b/runtime/heiko/src/lib.rs @@ -19,7 +19,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ construct_runtime, - dispatch::{DispatchResult, Weight}, + dispatch::{DispatchClass, DispatchResult, Weight}, log, match_types, parameter_types, traits::{ fungibles::{InspectMetadata, Mutate}, @@ -29,7 +29,7 @@ use frame_support::{ }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - ConstantMultiplier, DispatchClass, + ConstantMultiplier, }, PalletId, WeakBoundedVec, }; @@ -176,7 +176,9 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 500 ms of compute with parachain block. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) + .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! { pub const BlockHashCount: BlockNumber = 250; @@ -205,96 +207,96 @@ parameter_types! { } pub struct WhiteListFilter; -impl Contains for WhiteListFilter { - fn contains(call: &Call) -> bool { +impl Contains for WhiteListFilter { + fn contains(call: &RuntimeCall) -> bool { matches!( call, // System, Currencies - Call::System(_) | - Call::Timestamp(_) | - Call::Assets(pallet_assets::Call::force_create { .. }) | - Call::Assets(pallet_assets::Call::force_set_metadata { .. }) | - Call::Assets(pallet_assets::Call::force_asset_status { .. }) | + RuntimeCall::System(_) | + RuntimeCall::Timestamp(_) | + RuntimeCall::Assets(pallet_assets::Call::force_create { .. }) | + RuntimeCall::Assets(pallet_assets::Call::force_set_metadata { .. }) | + RuntimeCall::Assets(pallet_assets::Call::force_asset_status { .. }) | // Governance // Call::Sudo(_) | - Call::Democracy(_) | - Call::GeneralCouncil(_) | - Call::TechnicalCommittee(_) | - Call::Treasury(_) | - Call::Scheduler(_) | - Call::Preimage(_) | + RuntimeCall::Democracy(_) | + RuntimeCall::GeneralCouncil(_) | + RuntimeCall::TechnicalCommittee(_) | + RuntimeCall::Treasury(_) | + RuntimeCall::Scheduler(_) | + RuntimeCall::Preimage(_) | // Parachain - Call::ParachainSystem(_) | - Call::XcmpQueue(_) | - Call::DmpQueue(_) | - Call::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_default_xcm_version { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_subscribe_version_notify { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_unsubscribe_version_notify { .. }) | - Call::CumulusXcm(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::XcmpQueue(_) | + RuntimeCall::DmpQueue(_) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_default_xcm_version { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_subscribe_version_notify { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_unsubscribe_version_notify { .. }) | + RuntimeCall::CumulusXcm(_) | // Consensus - Call::Authorship(_) | - Call::Session(_) | + RuntimeCall::Authorship(_) | + RuntimeCall::Session(_) | // Call::CollatorSelection(_) | // Utility - Call::Utility(_) | - Call::Multisig(_) | - Call::Proxy(_) | - Call::Identity(_) | - Call::EmergencyShutdown(_) | - Call::XcmHelper(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Proxy(_) | + RuntimeCall::Identity(_) | + RuntimeCall::EmergencyShutdown(_) | + RuntimeCall::XcmHelper(_) | // Membership - Call::OracleMembership(_) | - Call::GeneralCouncilMembership(_) | - Call::TechnicalCommitteeMembership(_) | - Call::LiquidStakingAgentsMembership(_) | - Call::CrowdloansAutomatorsMembership(_) | - Call::BridgeMembership(_) + RuntimeCall::OracleMembership(_) | + RuntimeCall::GeneralCouncilMembership(_) | + RuntimeCall::TechnicalCommitteeMembership(_) | + RuntimeCall::LiquidStakingAgentsMembership(_) | + RuntimeCall::CrowdloansAutomatorsMembership(_) | + RuntimeCall::BridgeMembership(_) ) } } pub struct BaseCallFilter; -impl Contains for BaseCallFilter { - fn contains(call: &Call) -> bool { +impl Contains for BaseCallFilter { + fn contains(call: &RuntimeCall) -> bool { (WhiteListFilter::contains(call) || matches!( call, // System, Currencies - Call::Balances(_) | - Call::Assets(pallet_assets::Call::mint { .. }) | - Call::Assets(pallet_assets::Call::transfer { .. }) | - Call::Assets(pallet_assets::Call::transfer_keep_alive { .. }) | - Call::Assets(pallet_assets::Call::freeze { .. }) | - Call::Assets(pallet_assets::Call::thaw { .. }) | - Call::Assets(pallet_assets::Call::freeze_asset { .. }) | - Call::Assets(pallet_assets::Call::thaw_asset { .. }) | - Call::Assets(pallet_assets::Call::burn { .. }) | - Call::Assets(pallet_assets::Call::destroy { .. }) | - Call::CurrencyAdapter(_) | + RuntimeCall::Balances(_) | + RuntimeCall::Assets(pallet_assets::Call::mint { .. }) | + RuntimeCall::Assets(pallet_assets::Call::transfer { .. }) | + RuntimeCall::Assets(pallet_assets::Call::transfer_keep_alive { .. }) | + RuntimeCall::Assets(pallet_assets::Call::freeze { .. }) | + RuntimeCall::Assets(pallet_assets::Call::thaw { .. }) | + RuntimeCall::Assets(pallet_assets::Call::freeze_asset { .. }) | + RuntimeCall::Assets(pallet_assets::Call::thaw_asset { .. }) | + RuntimeCall::Assets(pallet_assets::Call::burn { .. }) | + RuntimeCall::Assets(pallet_assets::Call::destroy { .. }) | + RuntimeCall::CurrencyAdapter(_) | // 3rd Party - Call::Vesting(_) | - Call::Oracle(_) | - Call::XTokens(_) | - Call::OrmlXcm(_) | + RuntimeCall::Vesting(_) | + RuntimeCall::Oracle(_) | + RuntimeCall::XTokens(_) | + RuntimeCall::OrmlXcm(_) | // Loans - Call::Loans(_) | - Call::Prices(_) | + RuntimeCall::Loans(_) | + RuntimeCall::Prices(_) | // AMM - Call::AMM(_) | - Call::AMMRoute(_) | + RuntimeCall::AMM(_) | + RuntimeCall::AMMRoute(_) | // Crowdloans - Call::Crowdloans(_) | + RuntimeCall::Crowdloans(_) | // Liquid Staking - Call::LiquidStaking(_) | + RuntimeCall::LiquidStaking(_) | // Bridge - Call::Bridge(_) | + RuntimeCall::Bridge(_) | // Farming - Call::Farming(_) | + RuntimeCall::Farming(_) | // Streaming - Call::Streaming(_) | + RuntimeCall::Streaming(_) | // Asset Management - Call::AssetRegistry(_) + RuntimeCall::AssetRegistry(_) )) && EmergencyShutdown::contains(call) } @@ -310,7 +312,7 @@ impl frame_system::Config for Runtime { /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. - type Call = Call; + type RuntimeCall = RuntimeCall; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = AccountIdLookup; /// The index type for storing how many extrinsics an account has signed. @@ -324,9 +326,9 @@ impl frame_system::Config for Runtime { /// The header type. type Header = generic::Header; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; /// The weight of database operations that the runtime can invoke. @@ -357,7 +359,7 @@ parameter_types! { } impl orml_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SovereignOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; } @@ -367,7 +369,7 @@ parameter_types! { parameter_types! { pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); - pub const BaseXcmWeight: Weight = 150_000_000; + pub const BaseXcmWeight: u64 = 150_000_000; pub const MaxInstructions: u32 = 100; pub const MaxAssetsForTransfer: usize = 2; } @@ -385,14 +387,14 @@ parameter_type_with_key! { } impl orml_xtokens::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; type AccountIdToMultiLocation = AccountIdToMultiLocation; type SelfLocation = SelfLocation; type XcmExecutor = XcmExecutor; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; @@ -413,7 +415,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -435,7 +437,7 @@ parameter_types! { } impl pallet_loans::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = LoansPalletId; type PriceFeeder = Prices; type ReserveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -467,9 +469,9 @@ parameter_types! { } impl pallet_liquid_staking::Config for Runtime { - type Event = Event; - type Origin = Origin; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type PalletId = StakingPalletId; type LoansPalletId = LoansPalletId; type WeightInfo = weights::pallet_liquid_staking::WeightInfo; @@ -505,7 +507,7 @@ parameter_types! { type LiquidStakingAgentsMembershipInstance = pallet_membership::Instance5; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -523,7 +525,7 @@ parameter_types! { type CrowdloansAutomatorsMembershipInstance = pallet_membership::Instance7; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -537,15 +539,15 @@ impl pallet_membership::Config for Runti impl frame_system::offchain::CreateSignedTransaction for Runtime where - Call: From, + RuntimeCall: From, { fn create_transaction>( - call: Call, + call: RuntimeCall, public: ::Signer, account: AccountId, index: Index, ) -> Option<( - Call, + RuntimeCall, ::SignaturePayload, )> { let period = BlockHashCount::get() as u64; @@ -586,9 +588,9 @@ impl frame_system::offchain::SigningTypes for Runtime { impl frame_system::offchain::SendTransactionTypes for Runtime where - Call: From, + RuntimeCall: From, { - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; type Extrinsic = UncheckedExtrinsic; } @@ -621,7 +623,7 @@ parameter_types! { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. type ValidatorIdOf = pallet_collator_selection::IdentityCollator; @@ -643,7 +645,7 @@ parameter_types! { } impl pallet_collator_selection::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type PotId = PotId; @@ -680,7 +682,7 @@ impl pallet_balances::Config for Runtime { /// The type for recording an account's balance. type Balance = Balance; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = Treasury; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -700,7 +702,7 @@ impl pallet_transaction_payment::Config for Runtime { type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = OperationalFeeMultiplier; type LengthToFee = ConstantMultiplier; - type Event = Event; + type RuntimeEvent = RuntimeEvent; } #[derive( @@ -732,80 +734,86 @@ impl Default for ProxyType { } } -impl InstanceFilter for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl InstanceFilter for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, ProxyType::Loans => { matches!( c, - Call::Loans(pallet_loans::Call::mint { .. }) - | Call::Loans(pallet_loans::Call::redeem { .. }) - | Call::Loans(pallet_loans::Call::redeem_all { .. }) - | Call::Loans(pallet_loans::Call::borrow { .. }) - | Call::Loans(pallet_loans::Call::repay_borrow { .. }) - | Call::Loans(pallet_loans::Call::repay_borrow_all { .. }) - | Call::Loans(pallet_loans::Call::collateral_asset { .. }) - | Call::Loans(pallet_loans::Call::liquidate_borrow { .. }) - | Call::Loans(pallet_loans::Call::add_reward { .. }) - | Call::Loans(pallet_loans::Call::claim_reward { .. }) - | Call::Loans(pallet_loans::Call::claim_reward_for_market { .. }) + RuntimeCall::Loans(pallet_loans::Call::mint { .. }) + | RuntimeCall::Loans(pallet_loans::Call::redeem { .. }) + | RuntimeCall::Loans(pallet_loans::Call::redeem_all { .. }) + | RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::repay_borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::repay_borrow_all { .. }) + | RuntimeCall::Loans(pallet_loans::Call::collateral_asset { .. }) + | RuntimeCall::Loans(pallet_loans::Call::liquidate_borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::add_reward { .. }) + | RuntimeCall::Loans(pallet_loans::Call::claim_reward { .. }) + | RuntimeCall::Loans(pallet_loans::Call::claim_reward_for_market { .. }) ) } ProxyType::Staking => { matches!( c, - Call::LiquidStaking(pallet_liquid_staking::Call::stake { .. }) - | Call::LiquidStaking(pallet_liquid_staking::Call::unstake { .. }) - | Call::LiquidStaking(pallet_liquid_staking::Call::cancel_unstake { .. }) + RuntimeCall::LiquidStaking(pallet_liquid_staking::Call::stake { .. }) + | RuntimeCall::LiquidStaking(pallet_liquid_staking::Call::unstake { .. }) + | RuntimeCall::LiquidStaking( + pallet_liquid_staking::Call::cancel_unstake { .. } + ) ) } ProxyType::Crowdloans => { matches!( c, - Call::Crowdloans(pallet_crowdloans::Call::contribute { .. },) - | Call::Crowdloans(pallet_crowdloans::Call::claim { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::claim_for { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::withdraw { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::withdraw_for { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::redeem { .. }) + RuntimeCall::Crowdloans(pallet_crowdloans::Call::contribute { .. },) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::claim { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::claim_for { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::withdraw { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::withdraw_for { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::redeem { .. }) ) } ProxyType::Farming => { matches!( c, - Call::Farming(pallet_farming::Call::deposit { .. }) - | Call::Farming(pallet_farming::Call::claim { .. }) - | Call::Farming(pallet_farming::Call::withdraw { .. }) - | Call::Farming(pallet_farming::Call::redeem { .. }) + RuntimeCall::Farming(pallet_farming::Call::deposit { .. }) + | RuntimeCall::Farming(pallet_farming::Call::claim { .. }) + | RuntimeCall::Farming(pallet_farming::Call::withdraw { .. }) + | RuntimeCall::Farming(pallet_farming::Call::redeem { .. }) ) } ProxyType::Streaming => { matches!( c, - Call::Streaming(pallet_streaming::Call::create { .. }) - | Call::Streaming(pallet_streaming::Call::cancel { .. }) - | Call::Streaming(pallet_streaming::Call::withdraw { .. }) + RuntimeCall::Streaming(pallet_streaming::Call::create { .. }) + | RuntimeCall::Streaming(pallet_streaming::Call::cancel { .. }) + | RuntimeCall::Streaming(pallet_streaming::Call::withdraw { .. }) ) } ProxyType::Governance => { matches!( c, - Call::Democracy(..) - | Call::Preimage(..) - | Call::GeneralCouncil(..) - | Call::TechnicalCommittee(..) - | Call::Treasury(..) - | Call::Utility(..) + RuntimeCall::Democracy(..) + | RuntimeCall::Preimage(..) + | RuntimeCall::GeneralCouncil(..) + | RuntimeCall::TechnicalCommittee(..) + | RuntimeCall::Treasury(..) + | RuntimeCall::Utility(..) ) } ProxyType::AMM => { matches!( c, - Call::AMM(pallet_amm::Call::add_liquidity { .. }) - | Call::AMM(pallet_amm::Call::remove_liquidity { .. }) - | Call::AMMRoute(pallet_router::Call::swap_tokens_for_exact_tokens { .. }) - | Call::AMMRoute(pallet_router::Call::swap_exact_tokens_for_tokens { .. }) + RuntimeCall::AMM(pallet_amm::Call::add_liquidity { .. }) + | RuntimeCall::AMM(pallet_amm::Call::remove_liquidity { .. }) + | RuntimeCall::AMMRoute( + pallet_router::Call::swap_tokens_for_exact_tokens { .. } + ) + | RuntimeCall::AMMRoute( + pallet_router::Call::swap_exact_tokens_for_tokens { .. } + ) ) } } @@ -832,14 +840,14 @@ parameter_types! { } impl pallet_proxy::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ProxyType = ProxyType; type ProxyDepositBase = ProxyDepositBase; type ProxyDepositFactor = ProxyDepositFactor; type MaxProxies = MaxProxies; - type WeightInfo = weights::pallet_proxy::WeightInfo; + type WeightInfo = pallet_proxy::weights::SubstrateWeight; type MaxPending = MaxPending; type CallHasher = BlakeTwo256; type AnnouncementDepositBase = AnnouncementDepositBase; @@ -847,15 +855,15 @@ impl pallet_proxy::Config for Runtime { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = weights::pallet_utility::WeightInfo; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. However, we later /// block this via `ExecuteXcmOrigin`. -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; /// The means for routing XCM messages which are not for local execution into the right message /// queues. @@ -869,29 +877,29 @@ pub type XcmRouter = ( impl pallet_xcm::Config for Runtime { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type Origin = Origin; - type Call = Call; - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmReserveTransferFilter = Everything; type XcmExecutor = XcmExecutor; // Teleporting is disabled. type XcmTeleportFilter = Nothing; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl cumulus_pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_xcmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type ChannelInfo = ParachainSystem; @@ -902,18 +910,18 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = ParachainInfo; type DmpMessageHandler = DmpQueue; @@ -931,7 +939,7 @@ parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayCurrency: CurrencyId = KSM; pub HeikoNetwork: NetworkId = NetworkId::Named(WeakBoundedVec::>::force_from("heiko".into(), None)); - pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = MultiLocation::new(0, X1(Parachain(ParachainInfo::parachain_id().into()))); } @@ -1001,21 +1009,21 @@ pub type XcmOriginToTransactDispatchOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when // recognised. - RelayChainAsNative, + RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when // recognised. - SiblingParachainAsNative, + SiblingParachainAsNative, // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a // transaction from the Root origin. - ParentAsSuperuser, + ParentAsSuperuser, // Native signed account converter; this just converts an `AccountId32` origin into a normal // `Origin::Signed` origin of the same 32-byte value. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + XcmPassthrough, ); match_types! { @@ -1098,7 +1106,7 @@ pub type XcmFeesToAccount = pallet_traits::xcm::XcmFeesToAccount< pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; // How to withdraw and deposit an asset. type AssetTransactor = AssetTransactors; @@ -1108,7 +1116,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FirstAssetTrader; type ResponseHandler = PolkadotXcm; type SubscriptionService = PolkadotXcm; @@ -1117,7 +1125,7 @@ impl Config for XcmConfig { } impl pallet_asset_registry::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type AssetType = AssetType; @@ -1134,7 +1142,7 @@ parameter_types! { type ParallelDataProvider = orml_oracle::Instance1; impl orml_oracle::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnNewData = (); type CombineData = orml_oracle::DefaultCombineData; @@ -1189,7 +1197,7 @@ impl DecimalProvider for Decimal { } impl pallet_prices::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Source = AggregatedDataProvider; type FeederOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1214,13 +1222,13 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; type MaxSignatories = MaxSignatories; - type WeightInfo = weights::pallet_multisig::WeightInfo; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; } parameter_types! { @@ -1233,7 +1241,7 @@ parameter_types! { } impl pallet_identity::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BasicDeposit = BasicDeposit; type FieldDeposit = FieldDeposit; @@ -1270,8 +1278,7 @@ parameter_types! { } impl pallet_democracy::Config for Runtime { - type Proposal = Call; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EnactmentPeriod = EnactmentPeriod; type LaunchPeriod = LaunchPeriod; @@ -1306,16 +1313,16 @@ impl pallet_democracy::Config for Runtime { // only do it once and it lasts only for the cool-off period. type VetoOrigin = pallet_collective::EnsureMember; type CooloffPeriod = CooloffPeriod; - type PreimageByteDeposit = PreimageByteDeposit; - type OperationalPreimageOrigin = - pallet_collective::EnsureMember; type Slash = Treasury; type Scheduler = Scheduler; type PalletsOrigin = OriginCaller; type MaxVotes = MaxVotes; - type WeightInfo = weights::pallet_democracy::WeightInfo; + type WeightInfo = pallet_democracy::weights::SubstrateWeight; type MaxProposals = MaxProposals; type VoteLockingPeriod = EnactmentPeriod; + type Preimages = Preimage; + type MaxDeposits = ConstU32<100>; + type MaxBlacklisted = ConstU32<100>; } parameter_types! { @@ -1326,9 +1333,9 @@ parameter_types! { type GeneralCouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = GeneralCouncilMotionDuration; type MaxProposals = GeneralCouncilMaxProposals; type MaxMembers = GeneralCouncilMaxMembers; @@ -1338,7 +1345,7 @@ impl pallet_collective::Config for Runtime { type GeneralCouncilMembershipInstance = pallet_membership::Instance1; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1358,9 +1365,9 @@ parameter_types! { type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; type MaxProposals = TechnicalMaxProposals; type MaxMembers = TechnicalMaxMembers; @@ -1370,7 +1377,7 @@ impl pallet_collective::Config for Runtime { type TechnicalCommitteeMembershipInstance = pallet_membership::Instance2; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1383,17 +1390,15 @@ impl pallet_membership::Config for Runtime } parameter_types! { - pub const PreimageMaxSize: u32 = 4096 * 1024; pub const PreimageBaseDeposit: Balance = deposit(2, 64); pub const PreimageByteDeposit: Balance = deposit(0, 1); } impl pallet_preimage::Config for Runtime { type WeightInfo = weights::pallet_preimage::WeightInfo; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type MaxSize = PreimageMaxSize; type BaseDeposit = PreimageBaseDeposit; type ByteDeposit = PreimageByteDeposit; } @@ -1405,17 +1410,16 @@ parameter_types! { } impl pallet_scheduler::Config for Runtime { - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type MaxScheduledPerBlock = MaxScheduledPerBlock; type OriginPrivilegeCmp = EqualPrivilegeOnly; - type WeightInfo = weights::pallet_scheduler::WeightInfo; - type PreimageProvider = Preimage; - type NoPreimagePostponement = NoPreimagePostponement; + type WeightInfo = pallet_scheduler::weights::SubstrateWeight; + type Preimages = Preimage; } parameter_types! { @@ -1433,7 +1437,7 @@ impl pallet_treasury::Config for Runtime { type Currency = Balances; type ApproveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RejectOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = (); type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; @@ -1453,7 +1457,7 @@ parameter_types! { type OracleMembershipInstance = pallet_membership::Instance3; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1490,7 +1494,7 @@ impl ChangeMembers for ChangeBridgeMembers { type BridgeMembershipInstance = pallet_membership::Instance6; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1511,7 +1515,7 @@ parameter_types! { } impl pallet_bridge::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RelayMembers = BridgeMembership; type RootOperatorAccountId = OneAccount; type UpdateChainOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1535,7 +1539,7 @@ parameter_types! { } impl orml_vesting::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type MinVestedTransfer = MinVestedTransfer; type VestedTransferOrigin = frame_system::EnsureSigned; @@ -1553,7 +1557,7 @@ parameter_types! { } impl pallet_amm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = AMMPalletId; type LockAccountId = OneAccount; @@ -1600,9 +1604,9 @@ impl ValidationDataProvider } impl pallet_crowdloans::Config for Runtime { - type Event = Event; - type Origin = Origin; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type PalletId = CrowdloansPalletId; type SelfParaId = ParachainInfo; type Assets = Assets; @@ -1639,7 +1643,7 @@ parameter_types! { } impl pallet_streaming::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = StreamPalletId; type MaxStreamsCount = MaxStreamsCount; @@ -1657,7 +1661,7 @@ parameter_types! { } impl pallet_xcm_helper::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type Assets = Assets; type XcmSender = XcmRouter; @@ -1677,7 +1681,7 @@ parameter_types! { } impl pallet_router::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = RouterPalletId; type AMM = AMM; type AMMRouterWeightInfo = weights::pallet_router::WeightInfo; @@ -1701,7 +1705,7 @@ parameter_types! { } impl pallet_farming::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = FarmingPalletId; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1713,10 +1717,10 @@ impl pallet_farming::Config for Runtime { } impl pallet_emergency_shutdown::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Whitelist = WhiteListFilter; type ShutdownOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type Call = Call; + type RuntimeCall = RuntimeCall; } // Create the runtime by composing the FRAME pallets that were previously configured. @@ -1821,11 +1825,12 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; +pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1833,7 +1838,12 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - (), + ( + pallet_preimage::migration::v1::Migration, + pallet_scheduler::migration::v3::MigrateToV4, + pallet_democracy::migrations::v1::Migration, + pallet_multisig::migrations::v1::MigrateToV1, + ), >; impl_runtime_apis! { @@ -2099,8 +2109,19 @@ impl_runtime_apis! { (weight, RuntimeBlockWeights::get().max_block) } - fn execute_block_no_check(block: Block) -> Weight { - Executive::execute_block_no_check(block) + fn execute_block( + block: Block, + state_root_check: bool, + select: frame_try_runtime::TryStateSelect + ) -> Weight { + log::info!( + target: "runtime::heiko", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", + block.header.number, + block.header.hash(), + state_root_check, + select, + ); + Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed") } } } diff --git a/runtime/heiko/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/heiko/src/weights/cumulus_pallet_xcmp_queue.rs index e6ced2100..9e30fa107 100644 --- a/runtime/heiko/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/heiko/src/weights/cumulus_pallet_xcmp_queue.rs @@ -31,14 +31,14 @@ pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - (10_012_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(10_012_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - (10_079_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(10_079_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/heiko/src/weights/frame_system.rs b/runtime/heiko/src/weights/frame_system.rs index 4b19a5bc9..af7fb12b7 100644 --- a/runtime/heiko/src/weights/frame_system.rs +++ b/runtime/heiko/src/weights/frame_system.rs @@ -31,45 +31,45 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { - (3_703_000 as Weight) + Weight::from_ref_time(3_703_000 as u64) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (9_860_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(9_860_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 1_000 - .saturating_add((1_021_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(1_021_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 2_000 - .saturating_add((799_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(799_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 2_000 - .saturating_add((1_572_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(1_572_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/heiko/src/weights/mod.rs b/runtime/heiko/src/weights/mod.rs index f2a274fb6..34f30f52c 100644 --- a/runtime/heiko/src/weights/mod.rs +++ b/runtime/heiko/src/weights/mod.rs @@ -8,7 +8,6 @@ pub mod pallet_farming; pub mod pallet_liquid_staking; pub mod pallet_loans; pub mod pallet_membership; -pub mod pallet_multisig; pub mod pallet_router; pub mod pallet_streaming; pub mod pallet_timestamp; @@ -17,10 +16,7 @@ pub mod cumulus_pallet_xcmp_queue; pub mod orml_oracle; pub mod orml_vesting; pub mod pallet_assets; -pub mod pallet_democracy; pub mod pallet_identity; pub mod pallet_preimage; -pub mod pallet_proxy; -pub mod pallet_scheduler; pub mod pallet_treasury; pub mod pallet_utility; \ No newline at end of file diff --git a/runtime/heiko/src/weights/orml_oracle.rs b/runtime/heiko/src/weights/orml_oracle.rs index 5ad4276ab..6bc649e9b 100644 --- a/runtime/heiko/src/weights/orml_oracle.rs +++ b/runtime/heiko/src/weights/orml_oracle.rs @@ -54,17 +54,17 @@ impl orml_oracle::WeightInfo for WeightInfo { // Storage: ParallelOracle Values (r:1 w:0) // Storage: ParallelOracle RawValues (r:0 w:1) fn feed_values(c: u32, ) -> Weight { - (18_441_000 as Weight) + Weight::from_ref_time(18_441_000 as u64) // Standard Error: 88_000 - .saturating_add((6_603_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) + .saturating_add(Weight::from_ref_time(6_603_000 as u64).saturating_mul(c as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) } // Storage: ParallelOracle HasDispatched (r:0 w:1) fn on_finalize() -> Weight { - (3_578_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(3_578_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/heiko/src/weights/orml_vesting.rs b/runtime/heiko/src/weights/orml_vesting.rs index e39dad129..26f9ad96b 100644 --- a/runtime/heiko/src/weights/orml_vesting.rs +++ b/runtime/heiko/src/weights/orml_vesting.rs @@ -51,29 +51,29 @@ impl orml_vesting::WeightInfo for WeightInfo { // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: Vesting VestingSchedules (r:1 w:1) fn vested_transfer() -> Weight { - (21_960_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(21_960_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: Vesting VestingSchedules (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn claim(i: u32, ) -> Weight { - (32_915_000 as Weight) + Weight::from_ref_time(32_915_000 as u64) // Standard Error: 0 - .saturating_add((15_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(15_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: System Account (r:1 w:0) // Storage: Vesting VestingSchedules (r:0 w:1) fn update_vesting_schedules(i: u32, ) -> Weight { - (27_534_000 as Weight) + Weight::from_ref_time(27_534_000 as u64) // Standard Error: 0 - .saturating_add((60_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(60_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_amm.rs b/runtime/heiko/src/weights/pallet_amm.rs index 54d00e529..962f005cb 100644 --- a/runtime/heiko/src/weights/pallet_amm.rs +++ b/runtime/heiko/src/weights/pallet_amm.rs @@ -34,18 +34,18 @@ impl pallet_amm::WeightInfo for WeightInfo { // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn add_liquidity() -> Weight { - (161_720_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(161_720_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: AMM Pools (r:1 w:1) // Storage: AMM ProtocolFee (r:1 w:0) // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn remove_liquidity() -> Weight { - (174_864_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(174_864_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: AMM Pools (r:1 w:1) // Storage: Assets Asset (r:3 w:3) @@ -53,18 +53,18 @@ impl pallet_amm::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: AMM ProtocolFee (r:1 w:0) fn create_pool() -> Weight { - (217_145_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(217_145_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: AMM ProtocolFee (r:0 w:1) fn update_protocol_fee() -> Weight { - (22_954_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(22_954_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: AMM ProtocolFeeReceiver (r:0 w:1) fn update_protocol_fee_receiver() -> Weight { - (24_118_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(24_118_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_asset_registry.rs b/runtime/heiko/src/weights/pallet_asset_registry.rs index 5508148e1..b2aba27d9 100644 --- a/runtime/heiko/src/weights/pallet_asset_registry.rs +++ b/runtime/heiko/src/weights/pallet_asset_registry.rs @@ -32,41 +32,41 @@ impl pallet_asset_registry::WeightInfo for WeightInfo Weight { - (30_282_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(30_282_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry AssetTypeId (r:1 w:0) // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn update_asset_units_per_second() -> Weight { - (37_353_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_353_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:1 w:2) // Storage: AssetRegistry AssetTypeId (r:0 w:2) fn update_asset_type() -> Weight { - (51_300_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(51_300_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn remove_fee_payment_asset() -> Weight { - (31_517_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_517_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) // Storage: AssetRegistry AssetTypeId (r:0 w:1) fn deregister_asset() -> Weight { - (40_159_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(40_159_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_assets.rs b/runtime/heiko/src/weights/pallet_assets.rs index 32c2950ba..3bbd86d93 100644 --- a/runtime/heiko/src/weights/pallet_assets.rs +++ b/runtime/heiko/src/weights/pallet_assets.rs @@ -31,15 +31,15 @@ pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) fn create() -> Weight { - (48_044_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(48_044_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn force_create() -> Weight { - (27_833_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(27_833_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:5002 w:5001) @@ -50,171 +50,171 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 5000]`. /// The range of component `a` is `[0, 500]`. fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 60_000 - .saturating_add((29_399_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(29_399_000 as u64).saturating_mul(c as u64)) // Standard Error: 60_000 - .saturating_add((34_562_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(34_562_000 as u64).saturating_mul(s as u64)) // Standard Error: 602_000 - .saturating_add((32_294_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) + .saturating_add(Weight::from_ref_time(32_294_000 as u64).saturating_mul(a as u64)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(c as u64))) + .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(s as u64))) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(a as u64))) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(c as u64))) + .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(s as u64))) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(a as u64))) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint() -> Weight { - (53_471_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(53_471_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn burn() -> Weight { - (59_786_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(59_786_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (84_721_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(84_721_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (72_223_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(72_223_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (85_178_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(85_178_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn freeze() -> Weight { - (35_259_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(35_259_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn thaw() -> Weight { - (35_483_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(35_483_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn freeze_asset() -> Weight { - (29_481_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(29_481_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn thaw_asset() -> Weight { - (29_325_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(29_325_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) fn transfer_ownership() -> Weight { - (32_750_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(32_750_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn set_team() -> Weight { - (29_344_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(29_344_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn set_metadata(n: u32, s: u32, ) -> Weight { - (54_586_000 as Weight) + Weight::from_ref_time(54_586_000 as u64) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(n as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(n as u64)) // Standard Error: 0 - .saturating_add((4_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(4_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn clear_metadata() -> Weight { - (53_137_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(53_137_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn force_set_metadata(_n: u32, s: u32, ) -> Weight { - (32_282_000 as Weight) + Weight::from_ref_time(32_282_000 as u64) // Standard Error: 0 - .saturating_add((4_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(4_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn force_clear_metadata() -> Weight { - (52_843_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(52_843_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn force_asset_status() -> Weight { - (27_939_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(27_939_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn approve_transfer() -> Weight { - (60_170_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(60_170_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Assets Approvals (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_approved() -> Weight { - (107_157_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(107_157_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn cancel_approval() -> Weight { - (60_935_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(60_935_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn force_cancel_approval() -> Weight { - (62_977_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(62_977_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_balances.rs b/runtime/heiko/src/weights/pallet_balances.rs index 6325ab165..1f645fe0b 100644 --- a/runtime/heiko/src/weights/pallet_balances.rs +++ b/runtime/heiko/src/weights/pallet_balances.rs @@ -31,44 +31,44 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) fn transfer() -> Weight { - (91_591_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(91_591_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (57_740_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(57_740_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (37_341_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(37_341_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (43_604_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(43_604_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:3 w:3) fn force_transfer() -> Weight { - (90_279_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(90_279_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (68_116_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(68_116_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (33_796_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(33_796_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_bridge.rs b/runtime/heiko/src/weights/pallet_bridge.rs index 6a8abd02b..e6e965695 100644 --- a/runtime/heiko/src/weights/pallet_bridge.rs +++ b/runtime/heiko/src/weights/pallet_bridge.rs @@ -32,58 +32,58 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn register_chain() -> Weight { - (31_460_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_460_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn unregister_chain() -> Weight { - (32_072_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(32_072_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bridge BridgeTokens (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:1) fn register_bridge_token() -> Weight { - (35_590_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(35_590_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bridge AssetIds (r:1 w:1) // Storage: Bridge BridgeTokens (r:0 w:1) fn unregister_bridge_token() -> Weight { - (33_616_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(33_616_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_fee() -> Weight { - (37_685_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(37_685_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_status() -> Weight { - (37_364_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(37_364_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_cap() -> Weight { - (37_692_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(37_692_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn clean_cap_accumulated_value() -> Weight { - (37_048_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(37_048_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) @@ -92,9 +92,9 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn teleport() -> Weight { - (108_257_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(108_257_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Bridge ChainNonces (r:1 w:0) // Storage: Bridge BridgeRegistry (r:1 w:1) @@ -108,8 +108,8 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: Assets Metadata (r:1 w:0) // Storage: System Account (r:1 w:0) fn materialize() -> Weight { - (175_660_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(175_660_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_crowdloans.rs b/runtime/heiko/src/weights/pallet_crowdloans.rs index 243bba461..689959380 100644 --- a/runtime/heiko/src/weights/pallet_crowdloans.rs +++ b/runtime/heiko/src/weights/pallet_crowdloans.rs @@ -35,17 +35,17 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: Crowdloans NextTrieIndex (r:1 w:1) fn create_vault() -> Weight { - (61_559_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(61_559_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: ParachainSystem ValidationData (r:1 w:0) fn update_vault() -> Weight { - (49_252_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(49_252_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) @@ -66,52 +66,52 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: PolkadotXcm Queries (r:0 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - (209_123_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(209_123_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn open() -> Weight { - (46_234_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(46_234_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn close() -> Weight { - (45_752_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(45_752_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans IsVrf (r:0 w:1) fn set_vrf() -> Weight { - (23_717_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(23_717_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans ProxyAddress (r:0 w:1) fn update_proxy() -> Weight { - (24_793_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(24_793_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesBonus (r:0 w:1) fn update_leases_bonus() -> Weight { - (28_144_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(28_144_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn reopen() -> Weight { - (46_187_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(46_187_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn auction_succeeded() -> Weight { - (46_313_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(46_313_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) @@ -128,9 +128,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn auction_failed() -> Weight { - (142_661_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(142_661_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Crowdloans CTokensRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:0) @@ -140,27 +140,27 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Assets Metadata (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn claim() -> Weight { - (104_189_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(104_189_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn withdraw() -> Weight { - (87_188_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(87_188_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Crowdloans CTokensRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:2 w:2) fn redeem() -> Weight { - (122_049_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(122_049_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) @@ -177,9 +177,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn slot_expired() -> Weight { - (142_050_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(142_050_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) @@ -199,9 +199,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: unknown [0x] (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn migrate_pending() -> Weight { - (218_283_000 as Weight) - .saturating_add(T::DbWeight::get().reads(16 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(218_283_000 as u64) + .saturating_add(T::DbWeight::get().reads(16 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Crowdloans XcmRequests (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -210,9 +210,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn notification_received() -> Weight { - (128_540_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(128_540_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Assets Asset (r:1 w:1) @@ -220,17 +220,17 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: unknown [0x] (r:3 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn refund() -> Weight { - (170_916_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(170_916_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:1) // Storage: unknown [0x] (r:3 w:0) fn dissolve_vault() -> Weight { - (112_898_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(112_898_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Assets Asset (r:1 w:1) @@ -238,8 +238,8 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn refund_for() -> Weight { - (121_414_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(121_414_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_democracy.rs b/runtime/heiko/src/weights/pallet_democracy.rs deleted file mode 100644 index 5aea55c79..000000000 --- a/runtime/heiko/src/weights/pallet_democracy.rs +++ /dev/null @@ -1,284 +0,0 @@ - -//! Autogenerated weights for `pallet_democracy` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-88-3-164`, CPU: `Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("heiko-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/parallel -// benchmark -// pallet -// --chain=heiko-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_democracy -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --output=./runtime/heiko/src/weights/pallet_democracy.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_democracy`. -pub struct WeightInfo(PhantomData); -impl pallet_democracy::WeightInfo for WeightInfo { - // Storage: Democracy PublicPropCount (r:1 w:1) - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - // Storage: Democracy DepositOf (r:0 w:1) - fn propose() -> Weight { - (83_847_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy DepositOf (r:1 w:1) - /// The range of component `s` is `[0, 100]`. - fn second(s: u32, ) -> Weight { - (52_815_000 as Weight) - // Standard Error: 1_000 - .saturating_add((188_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn vote_new(r: u32, ) -> Weight { - (64_828_000 as Weight) - // Standard Error: 1_000 - .saturating_add((271_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn vote_existing(r: u32, ) -> Weight { - (66_227_000 as Weight) - // Standard Error: 3_000 - .saturating_add((213_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Cancellations (r:1 w:1) - fn emergency_cancel() -> Weight { - (33_669_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Blacklist (r:0 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:2 w:2) - /// The range of component `p` is `[1, 100]`. - fn blacklist(p: u32, ) -> Weight { - (96_823_000 as Weight) - // Standard Error: 12_000 - .saturating_add((420_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - /// The range of component `v` is `[1, 100]`. - fn external_propose(v: u32, ) -> Weight { - (18_171_000 as Weight) - // Standard Error: 0 - .saturating_add((25_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_majority() -> Weight { - (6_893_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_default() -> Weight { - (6_776_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn fast_track() -> Weight { - (33_448_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:1) - /// The range of component `v` is `[0, 100]`. - fn veto_external(v: u32, ) -> Weight { - (34_992_000 as Weight) - // Standard Error: 0 - .saturating_add((50_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:2 w:2) - /// The range of component `p` is `[1, 100]`. - fn cancel_proposal(p: u32, ) -> Weight { - (79_431_000 as Weight) - // Standard Error: 3_000 - .saturating_add((359_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn cancel_referendum() -> Weight { - (23_227_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn cancel_queued(r: u32, ) -> Weight { - (39_240_000 as Weight) - // Standard Error: 3_000 - .saturating_add((2_286_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - /// The range of component `r` is `[1, 99]`. - fn on_initialize_base(r: u32, ) -> Weight { - (4_274_000 as Weight) - // Standard Error: 6_000 - .saturating_add((5_319_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy LastTabledWasExternal (r:1 w:0) - // Storage: Democracy NextExternal (r:1 w:0) - // Storage: Democracy PublicProps (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - /// The range of component `r` is `[1, 99]`. - fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (12_208_000 as Weight) - // Standard Error: 6_000 - .saturating_add((5_340_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:3 w:3) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn delegate(r: u32, ) -> Weight { - (64_749_000 as Weight) - // Standard Error: 7_000 - .saturating_add((7_289_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy VotingOf (r:2 w:2) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn undelegate(r: u32, ) -> Weight { - (35_098_000 as Weight) - // Standard Error: 8_000 - .saturating_add((7_213_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy PublicProps (r:0 w:1) - fn clear_public_proposals() -> Weight { - (7_934_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - /// The range of component `b` is `[0, 16384]`. - fn note_preimage(b: u32, ) -> Weight { - (48_498_000 as Weight) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - /// The range of component `b` is `[0, 16384]`. - fn note_imminent_preimage(b: u32, ) -> Weight { - (34_079_000 as Weight) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - // Storage: System Account (r:1 w:0) - /// The range of component `b` is `[0, 16384]`. - fn reap_preimage(b: u32, ) -> Weight { - (47_730_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn unlock_remove(r: u32, ) -> Weight { - (43_462_000 as Weight) - // Standard Error: 2_000 - .saturating_add((94_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn unlock_set(r: u32, ) -> Weight { - (41_799_000 as Weight) - // Standard Error: 2_000 - .saturating_add((190_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn remove_vote(r: u32, ) -> Weight { - (26_582_000 as Weight) - // Standard Error: 2_000 - .saturating_add((171_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn remove_other_vote(r: u32, ) -> Weight { - (26_627_000 as Weight) - // Standard Error: 3_000 - .saturating_add((180_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } -} diff --git a/runtime/heiko/src/weights/pallet_farming.rs b/runtime/heiko/src/weights/pallet_farming.rs index 8d957a543..89d83f3db 100644 --- a/runtime/heiko/src/weights/pallet_farming.rs +++ b/runtime/heiko/src/weights/pallet_farming.rs @@ -31,64 +31,64 @@ pub struct WeightInfo(PhantomData); impl pallet_farming::WeightInfo for WeightInfo { // Storage: Farming Pools (r:1 w:1) fn create() -> Weight { - (35_722_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(35_722_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Farming Pools (r:1 w:1) fn set_pool_status() -> Weight { - (35_782_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(35_782_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Farming Pools (r:1 w:1) fn set_pool_cool_down_duration() -> Weight { - (35_637_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(35_637_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Farming Pools (r:1 w:1) fn reset_pool_unlock_height() -> Weight { - (36_801_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(36_801_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) // Storage: System Account (r:1 w:1) fn deposit() -> Weight { - (113_250_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(113_250_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) fn withdraw() -> Weight { - (77_258_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(77_258_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Farming Pools (r:1 w:0) // Storage: Farming Positions (r:1 w:1) // Storage: System Account (r:1 w:1) fn redeem() -> Weight { - (80_729_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(80_729_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) // Storage: System Account (r:1 w:1) fn claim() -> Weight { - (99_485_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(99_485_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Farming Pools (r:1 w:1) // Storage: System Account (r:1 w:1) fn dispatch_reward() -> Weight { - (96_386_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(96_386_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_identity.rs b/runtime/heiko/src/weights/pallet_identity.rs index 3ab758d3b..e5e2b75c2 100644 --- a/runtime/heiko/src/weights/pallet_identity.rs +++ b/runtime/heiko/src/weights/pallet_identity.rs @@ -32,48 +32,48 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - (28_581_000 as Weight) + Weight::from_ref_time(28_581_000 as u64) // Standard Error: 3_000 - .saturating_add((295_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(295_000 as u64).saturating_mul(r as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[1, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - (57_089_000 as Weight) + Weight::from_ref_time(57_089_000 as u64) // Standard Error: 13_000 - .saturating_add((328_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(328_000 as u64).saturating_mul(r as u64)) // Standard Error: 2_000 - .saturating_add((671_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(671_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity SuperOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn set_subs_new(s: u32, ) -> Weight { - (50_832_000 as Weight) + Weight::from_ref_time(50_832_000 as u64) // Standard Error: 4_000 - .saturating_add((6_070_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) + .saturating_add(Weight::from_ref_time(6_070_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:1) /// The range of component `p` is `[1, 100]`. fn set_subs_old(p: u32, ) -> Weight { - (50_113_000 as Weight) + Weight::from_ref_time(50_113_000 as u64) // Standard Error: 2_000 - .saturating_add((1_993_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(1_993_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity IdentityOf (r:1 w:1) @@ -82,81 +82,81 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `s` is `[1, 100]`. /// The range of component `x` is `[1, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (57_333_000 as Weight) + Weight::from_ref_time(57_333_000 as u64) // Standard Error: 13_000 - .saturating_add((276_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(276_000 as u64).saturating_mul(r as u64)) // Standard Error: 2_000 - .saturating_add((2_009_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(2_009_000 as u64).saturating_mul(s as u64)) // Standard Error: 2_000 - .saturating_add((361_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) + .saturating_add(Weight::from_ref_time(361_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[1, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - (60_956_000 as Weight) + Weight::from_ref_time(60_956_000 as u64) // Standard Error: 5_000 - .saturating_add((363_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(363_000 as u64).saturating_mul(r as u64)) // Standard Error: 1_000 - .saturating_add((683_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(683_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[1, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - (56_114_000 as Weight) + Weight::from_ref_time(56_114_000 as u64) // Standard Error: 5_000 - .saturating_add((264_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(264_000 as u64).saturating_mul(r as u64)) // Standard Error: 1_000 - .saturating_add((685_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(685_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - (13_526_000 as Weight) + Weight::from_ref_time(13_526_000 as u64) // Standard Error: 2_000 - .saturating_add((236_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(236_000 as u64).saturating_mul(r as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - (13_894_000 as Weight) + Weight::from_ref_time(13_894_000 as u64) // Standard Error: 2_000 - .saturating_add((225_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(225_000 as u64).saturating_mul(r as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - (13_696_000 as Weight) + Weight::from_ref_time(13_696_000 as u64) // Standard Error: 2_000 - .saturating_add((224_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(224_000 as u64).saturating_mul(r as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 19]`. /// The range of component `x` is `[1, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - (42_523_000 as Weight) + Weight::from_ref_time(42_523_000 as u64) // Standard Error: 6_000 - .saturating_add((270_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(270_000 as u64).saturating_mul(r as u64)) // Standard Error: 1_000 - .saturating_add((678_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(678_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity IdentityOf (r:1 w:1) @@ -166,55 +166,55 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `s` is `[1, 100]`. /// The range of component `x` is `[1, 100]`. fn kill_identity(r: u32, s: u32, _x: u32, ) -> Weight { - (85_189_000 as Weight) + Weight::from_ref_time(85_189_000 as u64) // Standard Error: 10_000 - .saturating_add((163_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(163_000 as u64).saturating_mul(r as u64)) // Standard Error: 2_000 - .saturating_add((2_008_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) + .saturating_add(Weight::from_ref_time(2_008_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) /// The range of component `s` is `[1, 99]`. fn add_sub(s: u32, ) -> Weight { - (64_056_000 as Weight) + Weight::from_ref_time(64_056_000 as u64) // Standard Error: 1_000 - .saturating_add((163_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(163_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - (23_525_000 as Weight) + Weight::from_ref_time(23_525_000 as u64) // Standard Error: 1_000 - .saturating_add((90_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(90_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - (64_858_000 as Weight) + Weight::from_ref_time(64_858_000 as u64) // Standard Error: 2_000 - .saturating_add((160_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(160_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) /// The range of component `s` is `[1, 99]`. fn quit_sub(s: u32, ) -> Weight { - (45_475_000 as Weight) + Weight::from_ref_time(45_475_000 as u64) // Standard Error: 1_000 - .saturating_add((153_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(153_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_liquid_staking.rs b/runtime/heiko/src/weights/pallet_liquid_staking.rs index d996b0fd6..9001f8f18 100644 --- a/runtime/heiko/src/weights/pallet_liquid_staking.rs +++ b/runtime/heiko/src/weights/pallet_liquid_staking.rs @@ -40,9 +40,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (191_939_000 as Weight) - .saturating_add(T::DbWeight::get().reads(16 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(191_939_000 as u64) + .saturating_add(T::DbWeight::get().reads(16 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: LiquidStaking ExchangeRate (r:1 w:0) // Storage: LiquidStaking Unlockings (r:1 w:1) @@ -52,9 +52,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (84_517_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(84_517_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:0) // Storage: LiquidStaking StakingLedgerCap (r:1 w:0) @@ -72,9 +72,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (137_884_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(137_884_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:0) // Storage: XcmHelper XcmWeightFee (r:1 w:0) @@ -90,9 +90,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (126_180_000 as Weight) - .saturating_add(T::DbWeight::get().reads(11 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(126_180_000 as u64) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:0) // Storage: LiquidStaking StakingLedgerCap (r:1 w:0) @@ -110,17 +110,17 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (140_667_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(140_667_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:1) // Storage: LiquidStaking IsUpdated (r:1 w:1) // Storage: LiquidStaking XcmRequests (r:1 w:0) fn force_set_staking_ledger() -> Weight { - (51_741_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_741_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:0) // Storage: LiquidStaking MatchingPool (r:1 w:1) @@ -137,9 +137,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (131_196_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(131_196_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:0) // Storage: LiquidStaking MatchingPool (r:1 w:1) @@ -156,9 +156,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (130_325_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(130_325_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: LiquidStaking CurrentEra (r:1 w:0) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -175,26 +175,26 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (132_311_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(132_311_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: LiquidStaking ReserveFactor (r:1 w:1) fn update_reserve_factor() -> Weight { - (26_745_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(26_745_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: LiquidStaking CommissionRate (r:0 w:1) fn update_commission_rate() -> Weight { - (23_681_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(23_681_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: LiquidStaking StakingLedgerCap (r:1 w:1) fn update_staking_ledger_cap() -> Weight { - (26_846_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(26_846_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: LiquidStaking XcmRequests (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:1) @@ -204,9 +204,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (94_750_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(94_750_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: LiquidStaking CurrentEra (r:1 w:0) // Storage: LiquidStaking Unlockings (r:1 w:1) @@ -216,27 +216,27 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (109_068_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(109_068_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: LiquidStaking EraStartBlock (r:0 w:1) fn force_set_era_start_block() -> Weight { - (8_488_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(8_488_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: LiquidStaking CurrentEra (r:0 w:1) // Storage: LiquidStaking IsMatched (r:0 w:1) fn force_set_current_era() -> Weight { - (9_685_000 as Weight) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(9_685_000 as u64) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: LiquidStaking IsMatched (r:1 w:0) // Storage: LiquidStaking EraStartBlock (r:1 w:0) fn on_initialize() -> Weight { - (12_624_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + Weight::from_ref_time(12_624_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) } // Storage: LiquidStaking StakingLedgers (r:10 w:0) // Storage: LiquidStaking MatchingPool (r:1 w:1) @@ -260,9 +260,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (358_801_000 as Weight) - .saturating_add(T::DbWeight::get().reads(28 as Weight)) - .saturating_add(T::DbWeight::get().writes(14 as Weight)) + Weight::from_ref_time(358_801_000 as u64) + .saturating_add(T::DbWeight::get().reads(28 as u64)) + .saturating_add(T::DbWeight::get().writes(14 as u64)) } // Storage: LiquidStaking StakingLedgers (r:10 w:0) // Storage: LiquidStaking MatchingPool (r:1 w:1) @@ -282,27 +282,27 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (304_997_000 as Weight) - .saturating_add(T::DbWeight::get().reads(24 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(304_997_000 as u64) + .saturating_add(T::DbWeight::get().reads(24 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: LiquidStaking TotalReserves (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn reduce_reserves() -> Weight { - (85_536_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(85_536_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: LiquidStaking FastUnstakeRequests (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:0) fn cancel_unstake() -> Weight { - (52_267_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(52_267_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: LiquidStaking FastUnstakeRequests (r:1 w:1) // Storage: Assets Metadata (r:2 w:0) @@ -313,12 +313,12 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (62_681_000 as Weight) + Weight::from_ref_time(62_681_000 as u64) // Standard Error: 40_000 - .saturating_add((128_519_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) - .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(n as Weight))) + .saturating_add(Weight::from_ref_time(128_519_000 as u64).saturating_mul(n as u64)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(n as u64))) } } diff --git a/runtime/heiko/src/weights/pallet_loans.rs b/runtime/heiko/src/weights/pallet_loans.rs index 011c57fea..d036e7c68 100644 --- a/runtime/heiko/src/weights/pallet_loans.rs +++ b/runtime/heiko/src/weights/pallet_loans.rs @@ -34,46 +34,46 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans ExchangeRate (r:0 w:1) // Storage: Loans BorrowIndex (r:0 w:1) fn add_market() -> Weight { - (44_067_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(44_067_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Loans Markets (r:1 w:1) fn activate_market() -> Weight { - (30_663_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(30_663_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Loans Markets (r:1 w:1) fn update_rate_model() -> Weight { - (32_021_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(32_021_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Loans Markets (r:1 w:1) fn update_market() -> Weight { - (34_256_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(34_256_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Loans UnderlyingAssetId (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn force_update_market() -> Weight { - (40_976_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(40_976_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn add_reward() -> Weight { - (71_608_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(71_608_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn withdraw_missing_reward() -> Weight { - (58_086_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(58_086_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Loans RewardSupplySpeed (r:1 w:1) @@ -81,9 +81,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplyState (r:1 w:1) // Storage: Loans RewardBorrowState (r:1 w:1) fn update_market_reward_speed() -> Weight { - (63_947_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(63_947_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Loans RewardSupplyState (r:1 w:1) @@ -100,9 +100,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward() -> Weight { - (172_270_000 as Weight) - .saturating_add(T::DbWeight::get().reads(15 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(172_270_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Loans RewardSupplyState (r:1 w:1) // Storage: Loans RewardSupplySpeed (r:1 w:0) @@ -118,9 +118,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward_for_market() -> Weight { - (158_486_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(158_486_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Assets Account (r:2 w:2) @@ -138,9 +138,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountEarned (r:1 w:1) // Storage: System Account (r:1 w:1) fn mint() -> Weight { - (187_169_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(187_169_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -161,9 +161,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardAccured (r:1 w:1) // Storage: Loans BorrowIndex (r:1 w:0) fn borrow() -> Weight { - (260_329_000 as Weight) - .saturating_add(T::DbWeight::get().reads(23 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(260_329_000 as u64) + .saturating_add(T::DbWeight::get().reads(23 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -180,9 +180,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplierIndex (r:1 w:1) // Storage: Loans RewardAccured (r:1 w:1) fn redeem() -> Weight { - (207_076_000 as Weight) - .saturating_add(T::DbWeight::get().reads(16 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(207_076_000 as u64) + .saturating_add(T::DbWeight::get().reads(16 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -200,9 +200,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardAccured (r:1 w:1) // Storage: System Account (r:1 w:1) fn redeem_all() -> Weight { - (221_542_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(221_542_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -217,9 +217,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow() -> Weight { - (167_155_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(167_155_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -234,16 +234,16 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow_all() -> Weight { - (182_907_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(182_907_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Loans AccountDeposits (r:1 w:1) fn collateral_asset() -> Weight { - (63_902_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(63_902_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Loans LiquidationFreeCollaterals (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -267,9 +267,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplySpeed (r:1 w:0) // Storage: Loans RewardSupplierIndex (r:3 w:3) fn liquidate_borrow() -> Weight { - (504_649_000 as Weight) - .saturating_add(T::DbWeight::get().reads(39 as Weight)) - .saturating_add(T::DbWeight::get().writes(19 as Weight)) + Weight::from_ref_time(504_649_000 as u64) + .saturating_add(T::DbWeight::get().reads(39 as u64)) + .saturating_add(T::DbWeight::get().writes(19 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Assets Asset (r:1 w:1) @@ -277,23 +277,23 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Loans TotalReserves (r:1 w:1) fn add_reserves() -> Weight { - (106_588_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(106_588_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Loans TotalReserves (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn reduce_reserves() -> Weight { - (93_709_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(93_709_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Loans LiquidationFreeCollaterals (r:1 w:1) fn update_liquidation_free_collateral() -> Weight { - (27_181_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(27_181_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_membership.rs b/runtime/heiko/src/weights/pallet_membership.rs index dc13f9394..133804606 100644 --- a/runtime/heiko/src/weights/pallet_membership.rs +++ b/runtime/heiko/src/weights/pallet_membership.rs @@ -35,11 +35,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - (33_604_000 as Weight) + Weight::from_ref_time(33_604_000 as u64) // Standard Error: 1_000 - .saturating_add((68_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(68_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -48,11 +48,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - (38_772_000 as Weight) + Weight::from_ref_time(38_772_000 as u64) // Standard Error: 0 - .saturating_add((67_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(67_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -61,11 +61,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - (38_880_000 as Weight) + Weight::from_ref_time(38_880_000 as u64) // Standard Error: 0 - .saturating_add((78_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(78_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -74,11 +74,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - (39_121_000 as Weight) + Weight::from_ref_time(39_121_000 as u64) // Standard Error: 1_000 - .saturating_add((218_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(218_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -87,30 +87,30 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - (40_470_000 as Weight) + Weight::from_ref_time(40_470_000 as u64) // Standard Error: 1_000 - .saturating_add((76_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + .saturating_add(Weight::from_ref_time(76_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:0) // Storage: TechnicalCommitteeMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - (13_000_000 as Weight) + Weight::from_ref_time(13_000_000 as u64) // Standard Error: 0 - .saturating_add((24_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(24_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: TechnicalCommitteeMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn clear_prime(m: u32, ) -> Weight { - (8_199_000 as Weight) + Weight::from_ref_time(8_199_000 as u64) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_multisig.rs b/runtime/heiko/src/weights/pallet_multisig.rs deleted file mode 100644 index 92cd7a3d5..000000000 --- a/runtime/heiko/src/weights/pallet_multisig.rs +++ /dev/null @@ -1,145 +0,0 @@ - -//! Autogenerated weights for `pallet_multisig` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-88-3-164`, CPU: `Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("heiko-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/parallel -// benchmark -// pallet -// --chain=heiko-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_multisig -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --output=./runtime/heiko/src/weights/pallet_multisig.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_multisig`. -pub struct WeightInfo(PhantomData); -impl pallet_multisig::WeightInfo for WeightInfo { - /// The range of component `z` is `[0, 10000]`. - fn as_multi_threshold_1(z: u32, ) -> Weight { - (31_051_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - /// The range of component `s` is `[2, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (63_397_000 as Weight) - // Standard Error: 1_000 - .saturating_add((171_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - /// The range of component `s` is `[2, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (68_276_000 as Weight) - // Standard Error: 1_000 - .saturating_add((174_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - /// The range of component `s` is `[3, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (41_885_000 as Weight) - // Standard Error: 2_000 - .saturating_add((139_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - /// The range of component `s` is `[3, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (67_006_000 as Weight) - // Standard Error: 2_000 - .saturating_add((147_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `s` is `[2, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (81_876_000 as Weight) - // Standard Error: 1_000 - .saturating_add((211_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - /// The range of component `s` is `[2, 100]`. - fn approve_as_multi_create(s: u32, ) -> Weight { - (58_111_000 as Weight) - // Standard Error: 2_000 - .saturating_add((187_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) - /// The range of component `s` is `[2, 100]`. - fn approve_as_multi_approve(s: u32, ) -> Weight { - (36_971_000 as Weight) - // Standard Error: 1_000 - .saturating_add((172_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `s` is `[2, 100]`. - fn approve_as_multi_complete(s: u32, ) -> Weight { - (99_743_000 as Weight) - // Standard Error: 2_000 - .saturating_add((244_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - /// The range of component `s` is `[2, 100]`. - fn cancel_as_multi(s: u32, ) -> Weight { - (81_669_000 as Weight) - // Standard Error: 1_000 - .saturating_add((187_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } -} diff --git a/runtime/heiko/src/weights/pallet_preimage.rs b/runtime/heiko/src/weights/pallet_preimage.rs index 6767f8047..7624ca155 100644 --- a/runtime/heiko/src/weights/pallet_preimage.rs +++ b/runtime/heiko/src/weights/pallet_preimage.rs @@ -33,88 +33,88 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage StatusFor (r:1 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - (89_270_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(89_270_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - (63_235_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(63_235_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - (88_370_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(88_370_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - (63_379_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(63_379_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - (37_837_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(37_837_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - (13_983_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(13_983_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - (66_589_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(66_589_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_unnoted_preimage() -> Weight { - (36_295_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_295_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - (14_152_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(14_152_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_proxy.rs b/runtime/heiko/src/weights/pallet_proxy.rs deleted file mode 100644 index 5bc6cf20d..000000000 --- a/runtime/heiko/src/weights/pallet_proxy.rs +++ /dev/null @@ -1,140 +0,0 @@ - -//! Autogenerated weights for `pallet_proxy` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-88-3-164`, CPU: `Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("heiko-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/parallel -// benchmark -// pallet -// --chain=heiko-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_proxy -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --output=./runtime/heiko/src/weights/pallet_proxy.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_proxy`. -pub struct WeightInfo(PhantomData); -impl pallet_proxy::WeightInfo for WeightInfo { - // Storage: Proxy Proxies (r:1 w:0) - /// The range of component `p` is `[1, 31]`. - fn proxy(p: u32, ) -> Weight { - (32_947_000 as Weight) - // Standard Error: 2_000 - .saturating_add((82_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:0) - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn proxy_announced(a: u32, p: u32, ) -> Weight { - (63_372_000 as Weight) - // Standard Error: 2_000 - .saturating_add((286_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 2_000 - .saturating_add((91_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { - (42_828_000 as Weight) - // Standard Error: 2_000 - .saturating_add((294_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 2_000 - .saturating_add((25_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn reject_announcement(a: u32, p: u32, ) -> Weight { - (42_805_000 as Weight) - // Standard Error: 2_000 - .saturating_add((290_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 2_000 - .saturating_add((27_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:0) - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn announce(a: u32, p: u32, ) -> Weight { - (57_609_000 as Weight) - // Standard Error: 3_000 - .saturating_add((259_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 3_000 - .saturating_add((68_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:1) - /// The range of component `p` is `[1, 31]`. - fn add_proxy(p: u32, ) -> Weight { - (47_536_000 as Weight) - // Standard Error: 2_000 - .saturating_add((150_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:1) - /// The range of component `p` is `[1, 31]`. - fn remove_proxy(p: u32, ) -> Weight { - (47_539_000 as Weight) - // Standard Error: 2_000 - .saturating_add((160_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:1) - /// The range of component `p` is `[1, 31]`. - fn remove_proxies(p: u32, ) -> Weight { - (39_876_000 as Weight) - // Standard Error: 2_000 - .saturating_add((98_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - // Storage: Proxy Proxies (r:1 w:1) - /// The range of component `p` is `[1, 31]`. - fn anonymous(p: u32, ) -> Weight { - (53_302_000 as Weight) - // Standard Error: 2_000 - .saturating_add((59_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:1) - /// The range of component `p` is `[0, 30]`. - fn kill_anonymous(p: u32, ) -> Weight { - (41_855_000 as Weight) - // Standard Error: 2_000 - .saturating_add((78_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } -} diff --git a/runtime/heiko/src/weights/pallet_router.rs b/runtime/heiko/src/weights/pallet_router.rs index 9fc37da46..30cfdd627 100644 --- a/runtime/heiko/src/weights/pallet_router.rs +++ b/runtime/heiko/src/weights/pallet_router.rs @@ -33,16 +33,16 @@ impl pallet_router::WeightInfo for WeightInfo { // Storage: Assets Account (r:4 w:4) // Storage: AMM Pools (r:1 w:1) fn swap_exact_tokens_for_tokens() -> Weight { - (154_439_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(154_439_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: AMM Pools (r:1 w:1) // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:4 w:4) fn swap_tokens_for_exact_tokens() -> Weight { - (154_500_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(154_500_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_scheduler.rs b/runtime/heiko/src/weights/pallet_scheduler.rs deleted file mode 100644 index f4d1bc5a1..000000000 --- a/runtime/heiko/src/weights/pallet_scheduler.rs +++ /dev/null @@ -1,192 +0,0 @@ - -//! Autogenerated weights for `pallet_scheduler` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-88-3-164`, CPU: `Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("heiko-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/parallel -// benchmark -// pallet -// --chain=heiko-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_scheduler -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --output=./runtime/heiko/src/weights/pallet_scheduler.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_scheduler`. -pub struct WeightInfo(PhantomData); -impl pallet_scheduler::WeightInfo for WeightInfo { - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (15_549_000 as Weight) - // Standard Error: 21_000 - .saturating_add((42_129_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_named_resolved(s: u32, ) -> Weight { - (12_273_000 as Weight) - // Standard Error: 19_000 - .saturating_add((33_608_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (13_307_000 as Weight) - // Standard Error: 26_000 - .saturating_add((36_582_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_resolved(s: u32, ) -> Weight { - (11_689_000 as Weight) - // Standard Error: 21_000 - .saturating_add((31_261_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_named_aborted(s: u32, ) -> Weight { - (9_356_000 as Weight) - // Standard Error: 14_000 - .saturating_add((13_964_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_aborted(s: u32, ) -> Weight { - (10_902_000 as Weight) - // Standard Error: 9_000 - .saturating_add((8_596_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic_named(s: u32, ) -> Weight { - (21_707_000 as Weight) - // Standard Error: 15_000 - .saturating_add((23_396_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic(s: u32, ) -> Weight { - (20_575_000 as Weight) - // Standard Error: 14_000 - .saturating_add((17_865_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_named(s: u32, ) -> Weight { - (21_662_000 as Weight) - // Standard Error: 10_000 - .saturating_add((14_918_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize(s: u32, ) -> Weight { - (21_021_000 as Weight) - // Standard Error: 10_000 - .saturating_add((12_646_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 50]`. - fn schedule(s: u32, ) -> Weight { - (32_942_000 as Weight) - // Standard Error: 2_000 - .saturating_add((154_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn cancel(s: u32, ) -> Weight { - (32_336_000 as Weight) - // Standard Error: 3_000 - .saturating_add((2_274_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 50]`. - fn schedule_named(s: u32, ) -> Weight { - (39_513_000 as Weight) - // Standard Error: 2_000 - .saturating_add((172_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn cancel_named(s: u32, ) -> Weight { - (34_440_000 as Weight) - // Standard Error: 4_000 - .saturating_add((2_309_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } -} diff --git a/runtime/heiko/src/weights/pallet_streaming.rs b/runtime/heiko/src/weights/pallet_streaming.rs index a998d5af6..bdeecf6f5 100644 --- a/runtime/heiko/src/weights/pallet_streaming.rs +++ b/runtime/heiko/src/weights/pallet_streaming.rs @@ -38,9 +38,9 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: Streaming StreamLibrary (r:4 w:4) // Storage: Streaming Streams (r:0 w:1) fn create() -> Weight { - (123_707_000 as Weight) - .saturating_add(T::DbWeight::get().reads(11 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(123_707_000 as u64) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Streaming Streams (r:1 w:1) // Storage: Timestamp Now (r:1 w:0) @@ -49,9 +49,9 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Streaming StreamLibrary (r:2 w:2) fn cancel() -> Weight { - (124_340_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(124_340_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: Streaming Streams (r:1 w:1) // Storage: Timestamp Now (r:1 w:0) @@ -59,13 +59,13 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn withdraw() -> Weight { - (99_552_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(99_552_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Streaming MinimumDeposits (r:0 w:1) fn set_minimum_deposit() -> Weight { - (25_143_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(25_143_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_timestamp.rs b/runtime/heiko/src/weights/pallet_timestamp.rs index f5aa458ec..087d80ce5 100644 --- a/runtime/heiko/src/weights/pallet_timestamp.rs +++ b/runtime/heiko/src/weights/pallet_timestamp.rs @@ -31,11 +31,11 @@ pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - (12_393_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(12_393_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (4_600_000 as Weight) + Weight::from_ref_time(4_600_000 as u64) } } diff --git a/runtime/heiko/src/weights/pallet_treasury.rs b/runtime/heiko/src/weights/pallet_treasury.rs index 828074229..8e564bc76 100644 --- a/runtime/heiko/src/weights/pallet_treasury.rs +++ b/runtime/heiko/src/weights/pallet_treasury.rs @@ -30,49 +30,49 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { fn spend() -> Weight { - (379_000 as Weight) + Weight::from_ref_time(379_000 as u64) } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (48_455_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(48_455_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:1 w:1) fn reject_proposal() -> Weight { - (52_385_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(52_385_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { - (19_081_000 as Weight) + Weight::from_ref_time(19_081_000 as u64) // Standard Error: 1_000 - .saturating_add((190_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(190_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) fn remove_approval() -> Weight { - (12_180_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(12_180_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) // Storage: Treasury Proposals (r:2 w:2) /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { - (38_361_000 as Weight) + Weight::from_ref_time(38_361_000 as u64) // Standard Error: 29_000 - .saturating_add((57_658_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(57_658_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(p as u64))) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/heiko/src/weights/pallet_utility.rs b/runtime/heiko/src/weights/pallet_utility.rs index 62535fc8a..0e680a6d1 100644 --- a/runtime/heiko/src/weights/pallet_utility.rs +++ b/runtime/heiko/src/weights/pallet_utility.rs @@ -31,26 +31,26 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (29_782_000 as Weight) + Weight::from_ref_time(29_782_000 as u64) // Standard Error: 2_000 - .saturating_add((8_355_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(8_355_000 as u64).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (11_295_000 as Weight) + Weight::from_ref_time(11_295_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (40_856_000 as Weight) + Weight::from_ref_time(40_856_000 as u64) // Standard Error: 3_000 - .saturating_add((8_678_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(8_678_000 as u64).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (24_597_000 as Weight) + Weight::from_ref_time(24_597_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (22_668_000 as Weight) + Weight::from_ref_time(22_668_000 as u64) // Standard Error: 2_000 - .saturating_add((8_364_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(8_364_000 as u64).saturating_mul(c as u64)) } } diff --git a/runtime/heiko/src/weights/pallet_xcm_helper.rs b/runtime/heiko/src/weights/pallet_xcm_helper.rs index 57743b993..1faa5580f 100644 --- a/runtime/heiko/src/weights/pallet_xcm_helper.rs +++ b/runtime/heiko/src/weights/pallet_xcm_helper.rs @@ -31,8 +31,8 @@ pub struct WeightInfo(PhantomData); impl pallet_xcm_helper::WeightInfo for WeightInfo { // Storage: XcmHelper XcmWeightFee (r:1 w:1) fn update_xcm_weight_fee() -> Weight { - (28_291_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(28_291_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/kerria/Cargo.toml b/runtime/kerria/Cargo.toml index 30d643d6f..67c41c00a 100644 --- a/runtime/kerria/Cargo.toml +++ b/runtime/kerria/Cargo.toml @@ -20,64 +20,64 @@ smallvec = '1.6.1' static_assertions = '1.1.0' # Substrate dependencies -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-try-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-collective = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-democracy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-identity = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-proxy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-scheduler = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-treasury = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-try-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-collective = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-democracy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-identity = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-proxy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-scheduler = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-treasury = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } # Cumulus dependencies -cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } +cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } # ORML dependencies orml-oracle = { version = '0.4.1-dev', default-features = false } @@ -125,11 +125,11 @@ primitives = { package = 'parallel-primitives', path = pallet-evm-signatures = { path = '../../pallets/evm-signatures', default-features = false } [build-dependencies.substrate-wasm-builder] -branch = 'polkadot-v0.9.28' +branch = 'polkadot-v0.9.32' git = 'https://github.com/paritytech/substrate.git' [dev-dependencies] -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [features] default = ['std'] @@ -137,7 +137,7 @@ runtime-benchmarks = [ 'sp-runtime/runtime-benchmarks', 'frame-benchmarking', 'frame-support/runtime-benchmarks', - 'frame-system-benchmarking', + 'frame-system-benchmarking/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', 'pallet-bridge/runtime-benchmarks', @@ -229,7 +229,6 @@ std = [ 'orml-vesting/std', 'pallet-amm/std', 'pallet-router/std', - 'frame-try-runtime/std', 'pallet-currency-adapter/std', 'pallet-crowdloans/std', 'pallet-emergency-shutdown/std', @@ -271,6 +270,21 @@ try-runtime = [ 'pallet-scheduler/try-runtime', 'pallet-preimage/try-runtime', 'polkadot-runtime-common/try-runtime', + 'pallet-proxy/try-runtime', + 'pallet-xcm/try-runtime', + 'parachain-info/try-runtime', + 'pallet-collator-selection/try-runtime', + 'cumulus-pallet-xcmp-queue/try-runtime', + 'cumulus-pallet-dmp-queue/try-runtime', + 'cumulus-pallet-xcm/try-runtime', + 'cumulus-pallet-aura-ext/try-runtime', + 'cumulus-pallet-parachain-system/try-runtime', + 'pallet-crowdloans/try-runtime', + 'pallet-amm/try-runtime', + 'pallet-router/try-runtime', + 'pallet-currency-adapter/try-runtime', + 'pallet-emergency-shutdown/try-runtime', + 'pallet-farming/try-runtime', 'pallet-session/try-runtime', 'pallet-assets/try-runtime', 'pallet-authorship/try-runtime', @@ -287,7 +301,7 @@ try-runtime = [ 'pallet-xcm-helper/try-runtime', 'pallet-asset-registry/try-runtime', 'pallet-ethereum/try-runtime', -] - -[package.metadata.cargo-udeps.ignore] -normal = ['frame-try-runtime'] + 'pallet-evm/try-runtime', + 'pallet-base-fee/try-runtime', + 'pallet-evm-signatures/try-runtime', +] \ No newline at end of file diff --git a/runtime/kerria/src/constants.rs b/runtime/kerria/src/constants.rs index 6a01833a5..abce932bb 100644 --- a/runtime/kerria/src/constants.rs +++ b/runtime/kerria/src/constants.rs @@ -73,7 +73,7 @@ pub mod fee { fn polynomial() -> WeightToFeeCoefficients { // in kerria, extrinsic base weight (smallest non-zero weight) is mapped to 12 CENTS let p = super::currency::CENTS * 12; - let q = Balance::from(ExtrinsicBaseWeight::get()); + let q = Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, diff --git a/runtime/kerria/src/lib.rs b/runtime/kerria/src/lib.rs index dcd1d8587..4088810c9 100644 --- a/runtime/kerria/src/lib.rs +++ b/runtime/kerria/src/lib.rs @@ -19,7 +19,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ construct_runtime, - dispatch::{DispatchResult, Weight}, + dispatch::{DispatchClass, DispatchResult, Weight}, log, match_types, parameter_types, traits::{ fungibles::{InspectMetadata, Mutate}, @@ -29,7 +29,7 @@ use frame_support::{ }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - ConstantMultiplier, DispatchClass, + ConstantMultiplier, }, ConsensusEngineId, PalletId, WeakBoundedVec, }; @@ -212,7 +212,9 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 500 ms of compute with parachain block. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) + .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! { pub const BlockHashCount: BlockNumber = 250; @@ -241,101 +243,101 @@ parameter_types! { } pub struct WhiteListFilter; -impl Contains for WhiteListFilter { - fn contains(call: &Call) -> bool { +impl Contains for WhiteListFilter { + fn contains(call: &RuntimeCall) -> bool { matches!( call, // System, Currencies - Call::System(_) | - Call::Timestamp(_) | - Call::Assets(pallet_assets::Call::force_create { .. }) | - Call::Assets(pallet_assets::Call::force_set_metadata { .. }) | - Call::Assets(pallet_assets::Call::force_asset_status { .. }) | + RuntimeCall::System(_) | + RuntimeCall::Timestamp(_) | + RuntimeCall::Assets(pallet_assets::Call::force_create { .. }) | + RuntimeCall::Assets(pallet_assets::Call::force_set_metadata { .. }) | + RuntimeCall::Assets(pallet_assets::Call::force_asset_status { .. }) | // Governance - Call::Sudo(_) | - Call::Democracy(_) | - Call::GeneralCouncil(_) | - Call::TechnicalCommittee(_) | - Call::Treasury(_) | - Call::Scheduler(_) | - Call::Preimage(_) | + RuntimeCall::Sudo(_) | + RuntimeCall::Democracy(_) | + RuntimeCall::GeneralCouncil(_) | + RuntimeCall::TechnicalCommittee(_) | + RuntimeCall::Treasury(_) | + RuntimeCall::Scheduler(_) | + RuntimeCall::Preimage(_) | // Parachain - Call::ParachainSystem(_) | - Call::XcmpQueue(_) | - Call::DmpQueue(_) | - Call::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_default_xcm_version { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_subscribe_version_notify { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_unsubscribe_version_notify { .. }) | - Call::CumulusXcm(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::XcmpQueue(_) | + RuntimeCall::DmpQueue(_) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_default_xcm_version { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_subscribe_version_notify { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_unsubscribe_version_notify { .. }) | + RuntimeCall::CumulusXcm(_) | // Consensus - Call::Authorship(_) | - Call::CollatorSelection(_) | - Call::Session(_) | + RuntimeCall::Authorship(_) | + RuntimeCall::CollatorSelection(_) | + RuntimeCall::Session(_) | // Utility - Call::Multisig(_) | - Call::Utility(_) | - Call::Proxy(_) | - Call::Identity(_) | - Call::EmergencyShutdown(_) | - Call::XcmHelper(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Proxy(_) | + RuntimeCall::Identity(_) | + RuntimeCall::EmergencyShutdown(_) | + RuntimeCall::XcmHelper(_) | // Membership - Call::GeneralCouncilMembership(_) | - Call::TechnicalCommitteeMembership(_) | - Call::OracleMembership(_) | - Call::BridgeMembership(_) | - Call::CrowdloansAutomatorsMembership(_) | - Call::LiquidStakingAgentsMembership(_) + RuntimeCall::GeneralCouncilMembership(_) | + RuntimeCall::TechnicalCommitteeMembership(_) | + RuntimeCall::OracleMembership(_) | + RuntimeCall::BridgeMembership(_) | + RuntimeCall::CrowdloansAutomatorsMembership(_) | + RuntimeCall::LiquidStakingAgentsMembership(_) ) } } pub struct BaseCallFilter; -impl Contains for BaseCallFilter { - fn contains(call: &Call) -> bool { +impl Contains for BaseCallFilter { + fn contains(call: &RuntimeCall) -> bool { (WhiteListFilter::contains(call) || matches!( call, // System, Currencies - Call::Balances(_) | - Call::Assets(pallet_assets::Call::mint { .. }) | - Call::Assets(pallet_assets::Call::transfer { .. }) | - Call::Assets(pallet_assets::Call::transfer_keep_alive { .. }) | - Call::Assets(pallet_assets::Call::freeze { .. }) | - Call::Assets(pallet_assets::Call::thaw { .. }) | - Call::Assets(pallet_assets::Call::freeze_asset { .. }) | - Call::Assets(pallet_assets::Call::thaw_asset { .. }) | - Call::Assets(pallet_assets::Call::burn { .. }) | - Call::Assets(pallet_assets::Call::destroy { .. }) | - Call::CurrencyAdapter(_) | + RuntimeCall::Balances(_) | + RuntimeCall::Assets(pallet_assets::Call::mint { .. }) | + RuntimeCall::Assets(pallet_assets::Call::transfer { .. }) | + RuntimeCall::Assets(pallet_assets::Call::transfer_keep_alive { .. }) | + RuntimeCall::Assets(pallet_assets::Call::freeze { .. }) | + RuntimeCall::Assets(pallet_assets::Call::thaw { .. }) | + RuntimeCall::Assets(pallet_assets::Call::freeze_asset { .. }) | + RuntimeCall::Assets(pallet_assets::Call::thaw_asset { .. }) | + RuntimeCall::Assets(pallet_assets::Call::burn { .. }) | + RuntimeCall::Assets(pallet_assets::Call::destroy { .. }) | + RuntimeCall::CurrencyAdapter(_) | // 3rd Party - Call::Oracle(_) | - Call::XTokens(_) | - Call::OrmlXcm(_) | - Call::Vesting(_) | + RuntimeCall::Oracle(_) | + RuntimeCall::XTokens(_) | + RuntimeCall::OrmlXcm(_) | + RuntimeCall::Vesting(_) | // Loans - Call::Loans(_) | - Call::Prices(_) | + RuntimeCall::Loans(_) | + RuntimeCall::Prices(_) | // LiquidStaking - Call::LiquidStaking(_) | + RuntimeCall::LiquidStaking(_) | // AMM - Call::AMM(_) | - Call::AMMRoute(_) | + RuntimeCall::AMM(_) | + RuntimeCall::AMMRoute(_) | // Crowdloans - Call::Crowdloans(_) | + RuntimeCall::Crowdloans(_) | // Bridge - Call::Bridge(_) | + RuntimeCall::Bridge(_) | // Farming - Call::Farming(_) | + RuntimeCall::Farming(_) | // Streaming - Call::Streaming(_) | + RuntimeCall::Streaming(_) | // Asset Management - Call::AssetRegistry(_) | + RuntimeCall::AssetRegistry(_) | // EVM - Call::EVM(_) | - Call::Ethereum(_) | - Call::BaseFee(_) | - Call::EVMSignatureCall(_) + RuntimeCall::EVM(_) | + RuntimeCall::Ethereum(_) | + RuntimeCall::BaseFee(_) | + RuntimeCall::EVMSignatureCall(_) )) && EmergencyShutdown::contains(call) } @@ -351,7 +353,7 @@ impl frame_system::Config for Runtime { /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. - type Call = Call; + type RuntimeCall = RuntimeCall; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = AccountIdLookup; /// The index type for storing how many extrinsics an account has signed. @@ -365,9 +367,9 @@ impl frame_system::Config for Runtime { /// The header type. type Header = generic::Header; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; /// The weight of database operations that the runtime can invoke. @@ -398,7 +400,7 @@ parameter_types! { } impl orml_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SovereignOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; } @@ -408,20 +410,20 @@ parameter_types! { parameter_types! { pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); - pub const BaseXcmWeight: Weight = 150_000_000; + pub const BaseXcmWeight: u64 = 150_000_000; pub const MaxInstructions: u32 = 100; pub const MaxAssetsForTransfer: usize = 2; } impl orml_xtokens::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; type AccountIdToMultiLocation = AccountIdToMultiLocation; type SelfLocation = SelfLocation; type XcmExecutor = XcmExecutor; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; @@ -462,7 +464,7 @@ impl AddressToAssetId for Runtime { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -484,7 +486,7 @@ parameter_types! { } impl pallet_loans::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = LoansPalletId; type PriceFeeder = Prices; type ReserveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -516,9 +518,9 @@ parameter_types! { } impl pallet_liquid_staking::Config for Runtime { - type Event = Event; - type Origin = Origin; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type PalletId = StakingPalletId; type LoansPalletId = LoansPalletId; type WeightInfo = weights::pallet_liquid_staking::WeightInfo; @@ -554,7 +556,7 @@ parameter_types! { type LiquidStakingAgentsMembershipInstance = pallet_membership::Instance5; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -572,7 +574,7 @@ parameter_types! { type CrowdloansAutomatorsMembershipInstance = pallet_membership::Instance7; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -586,15 +588,15 @@ impl pallet_membership::Config for Runti impl frame_system::offchain::CreateSignedTransaction for Runtime where - Call: From, + RuntimeCall: From, { fn create_transaction>( - call: Call, + call: RuntimeCall, public: ::Signer, account: AccountId, index: Index, ) -> Option<( - Call, + RuntimeCall, ::SignaturePayload, )> { let period = BlockHashCount::get() as u64; @@ -635,9 +637,9 @@ impl frame_system::offchain::SigningTypes for Runtime { impl frame_system::offchain::SendTransactionTypes for Runtime where - Call: From, + RuntimeCall: From, { - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; type Extrinsic = UncheckedExtrinsic; } @@ -670,7 +672,7 @@ parameter_types! { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. type ValidatorIdOf = pallet_collator_selection::IdentityCollator; @@ -692,7 +694,7 @@ parameter_types! { } impl pallet_collator_selection::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type PotId = PotId; @@ -729,7 +731,7 @@ impl pallet_balances::Config for Runtime { /// The type for recording an account's balance. type Balance = Balance; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = Treasury; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -749,7 +751,7 @@ impl pallet_transaction_payment::Config for Runtime { type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = OperationalFeeMultiplier; type LengthToFee = ConstantMultiplier; - type Event = Event; + type RuntimeEvent = RuntimeEvent; } parameter_types! { @@ -771,7 +773,7 @@ impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold { } impl pallet_base_fee::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Threshold = BaseFeeThreshold; type DefaultElasticity = DefaultElasticity; type DefaultBaseFeePerGas = DefaultBaseFeePerGas; @@ -785,18 +787,7 @@ pub const GAS_PER_SECOND: u64 = 40_000_000; /// Approximate ratio of the amount of Weight per Gas. /// u64 works for approximations because Weight is a very small unit compared to gas. -pub const WEIGHT_PER_GAS: u64 = WEIGHT_PER_SECOND / GAS_PER_SECOND; - -pub struct GasWeightMapping; -impl pallet_evm::GasWeightMapping for GasWeightMapping { - fn gas_to_weight(gas: u64) -> Weight { - gas.saturating_mul(WEIGHT_PER_GAS) - } - - fn weight_to_gas(weight: Weight) -> u64 { - weight.wrapping_div(WEIGHT_PER_GAS) - } -} +pub const WEIGHT_PER_GAS: u64 = WEIGHT_PER_SECOND.ref_time() / GAS_PER_SECOND; pub struct FindAuthorTruncated(sp_std::marker::PhantomData); impl> FindAuthor for FindAuthorTruncated { @@ -821,20 +812,21 @@ parameter_types! { pub CallMagicNumber: u16 = EVMChainId::get() as u16; /// EVM gas limit pub BlockGasLimit: U256 = U256::from( - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WEIGHT_PER_GAS + NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS ); pub ParallelPrecompilesValue: ParallelPrecompilesType = ParallelPrecompiles::::new(); + pub WeightPerGas: u64 = WEIGHT_PER_GAS; } impl pallet_evm::Config for Runtime { type FeeCalculator = BaseFee; - type GasWeightMapping = GasWeightMapping; + type GasWeightMapping = pallet_evm::FixedGasWeightMapping; type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; type CallOrigin = pallet_evm::EnsureAddressRoot; type WithdrawOrigin = pallet_evm::EnsureAddressTruncated; type AddressMapping = pallet_evm::HashedAddressMapping; type Currency = Balances; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Runner = pallet_evm::runner::stack::Runner; type PrecompilesType = ParallelPrecompilesType; type PrecompilesValue = ParallelPrecompilesValue; @@ -842,10 +834,11 @@ impl pallet_evm::Config for Runtime { type OnChargeTransaction = pallet_evm::EVMCurrencyAdapter; type BlockGasLimit = BlockGasLimit; type FindAuthor = FindAuthorTruncated; + type WeightPerGas = WeightPerGas; } impl pallet_ethereum::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type StateRoot = pallet_ethereum::IntermediateStateRoot; } @@ -856,8 +849,8 @@ parameter_types! { } impl pallet_evm_signatures::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Signature = pallet_evm_signatures::ethereum::EthereumSignature; type Signer = ::Signer; type CallMagicNumber = CallMagicNumber; @@ -874,8 +867,8 @@ impl pallet_evm_signatures::Config for Runtime { } impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } #[derive( @@ -908,88 +901,92 @@ impl Default for ProxyType { } } -impl InstanceFilter for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl InstanceFilter for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, ProxyType::Loans => { matches!( c, - Call::Loans(pallet_loans::Call::mint { .. }) - | Call::Loans(pallet_loans::Call::redeem { .. }) - | Call::Loans(pallet_loans::Call::redeem_all { .. }) - | Call::Loans(pallet_loans::Call::borrow { .. }) - | Call::Loans(pallet_loans::Call::repay_borrow { .. }) - | Call::Loans(pallet_loans::Call::repay_borrow_all { .. }) - | Call::Loans(pallet_loans::Call::collateral_asset { .. }) - | Call::Loans(pallet_loans::Call::liquidate_borrow { .. }) - | Call::Loans(pallet_loans::Call::claim_reward { .. }) - | Call::Loans(pallet_loans::Call::claim_reward_for_market { .. }) + RuntimeCall::Loans(pallet_loans::Call::mint { .. }) + | RuntimeCall::Loans(pallet_loans::Call::redeem { .. }) + | RuntimeCall::Loans(pallet_loans::Call::redeem_all { .. }) + | RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::repay_borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::repay_borrow_all { .. }) + | RuntimeCall::Loans(pallet_loans::Call::collateral_asset { .. }) + | RuntimeCall::Loans(pallet_loans::Call::liquidate_borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::claim_reward { .. }) + | RuntimeCall::Loans(pallet_loans::Call::claim_reward_for_market { .. }) ) } ProxyType::Staking => { matches!( c, - Call::LiquidStaking(pallet_liquid_staking::Call::stake { .. }) - | Call::LiquidStaking(pallet_liquid_staking::Call::unstake { .. }) + RuntimeCall::LiquidStaking(pallet_liquid_staking::Call::stake { .. }) + | RuntimeCall::LiquidStaking(pallet_liquid_staking::Call::unstake { .. }) ) } ProxyType::Crowdloans => { matches!( c, - Call::Crowdloans(pallet_crowdloans::Call::contribute { .. },) - | Call::Crowdloans(pallet_crowdloans::Call::withdraw { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::claim { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::redeem { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::withdraw_for { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::claim_for { .. }) + RuntimeCall::Crowdloans(pallet_crowdloans::Call::contribute { .. },) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::withdraw { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::claim { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::redeem { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::withdraw_for { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::claim_for { .. }) ) } ProxyType::Farming => { matches!( c, - Call::Farming(pallet_farming::Call::deposit { .. }) - | Call::Farming(pallet_farming::Call::claim { .. }) - | Call::Farming(pallet_farming::Call::withdraw { .. }) - | Call::Farming(pallet_farming::Call::redeem { .. }) + RuntimeCall::Farming(pallet_farming::Call::deposit { .. }) + | RuntimeCall::Farming(pallet_farming::Call::claim { .. }) + | RuntimeCall::Farming(pallet_farming::Call::withdraw { .. }) + | RuntimeCall::Farming(pallet_farming::Call::redeem { .. }) ) } ProxyType::Streaming => { matches!( c, - Call::Streaming(pallet_streaming::Call::create { .. }) - | Call::Streaming(pallet_streaming::Call::cancel { .. }) - | Call::Streaming(pallet_streaming::Call::withdraw { .. }) + RuntimeCall::Streaming(pallet_streaming::Call::create { .. }) + | RuntimeCall::Streaming(pallet_streaming::Call::cancel { .. }) + | RuntimeCall::Streaming(pallet_streaming::Call::withdraw { .. }) ) } ProxyType::Governance => { matches!( c, - Call::Democracy(..) - | Call::Preimage(..) - | Call::GeneralCouncil(..) - | Call::TechnicalCommittee(..) - | Call::Treasury(..) - | Call::Utility(..) + RuntimeCall::Democracy(..) + | RuntimeCall::Preimage(..) + | RuntimeCall::GeneralCouncil(..) + | RuntimeCall::TechnicalCommittee(..) + | RuntimeCall::Treasury(..) + | RuntimeCall::Utility(..) ) } ProxyType::AMM => { matches!( c, - Call::AMM(pallet_amm::Call::add_liquidity { .. }) - | Call::AMM(pallet_amm::Call::remove_liquidity { .. }) - | Call::AMMRoute(pallet_router::Call::swap_tokens_for_exact_tokens { .. }) - | Call::AMMRoute(pallet_router::Call::swap_exact_tokens_for_tokens { .. }) + RuntimeCall::AMM(pallet_amm::Call::add_liquidity { .. }) + | RuntimeCall::AMM(pallet_amm::Call::remove_liquidity { .. }) + | RuntimeCall::AMMRoute( + pallet_router::Call::swap_tokens_for_exact_tokens { .. } + ) + | RuntimeCall::AMMRoute( + pallet_router::Call::swap_exact_tokens_for_tokens { .. } + ) ) } // EVM ProxyType::EVM => { matches!( c, - Call::Ethereum(..) - | Call::EVM(_) - | Call::BaseFee(_) - | Call::EVMSignatureCall(_) + RuntimeCall::Ethereum(..) + | RuntimeCall::EVM(_) + | RuntimeCall::BaseFee(_) + | RuntimeCall::EVMSignatureCall(_) ) } } @@ -1016,8 +1013,8 @@ parameter_types! { } impl pallet_proxy::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ProxyType = ProxyType; type ProxyDepositBase = ProxyDepositBase; @@ -1031,15 +1028,15 @@ impl pallet_proxy::Config for Runtime { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = pallet_utility::weights::SubstrateWeight; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. However, we later /// block this via `ExecuteXcmOrigin`. -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; /// The means for routing XCM messages which are not for local execution into the right message /// queues. @@ -1053,29 +1050,29 @@ pub type XcmRouter = ( impl pallet_xcm::Config for Runtime { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type Origin = Origin; - type Call = Call; - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmReserveTransferFilter = Everything; type XcmExecutor = XcmExecutor; // Teleporting is disabled. type XcmTeleportFilter = Nothing; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl cumulus_pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_xcmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type ChannelInfo = ParachainSystem; @@ -1086,18 +1083,18 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = ParachainInfo; type DmpMessageHandler = DmpQueue; @@ -1115,7 +1112,7 @@ parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayCurrency: CurrencyId = DOT; pub KerriaNetwork: NetworkId = NetworkId::Named(WeakBoundedVec::>::force_from("kerria".into(), None)); - pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = MultiLocation::new(0, X1(Parachain(ParachainInfo::parachain_id().into()))); } @@ -1181,21 +1178,21 @@ pub type XcmOriginToTransactDispatchOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when // recognised. - RelayChainAsNative, + RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when // recognised. - SiblingParachainAsNative, + SiblingParachainAsNative, // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a // transaction from the Root origin. - ParentAsSuperuser, + ParentAsSuperuser, // Native signed account converter; this just converts an `AccountId32` origin into a normal // `Origin::Signed` origin of the same 32-byte value. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + XcmPassthrough, ); match_types! { @@ -1290,7 +1287,7 @@ pub type XcmFeesToAccount = pallet_traits::xcm::XcmFeesToAccount< pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; // How to withdraw and deposit an asset. type AssetTransactor = AssetTransactors; @@ -1300,7 +1297,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FirstAssetTrader; type ResponseHandler = PolkadotXcm; type SubscriptionService = PolkadotXcm; @@ -1309,7 +1306,7 @@ impl Config for XcmConfig { } impl pallet_asset_registry::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type AssetType = AssetType; @@ -1326,7 +1323,7 @@ parameter_types! { type ParallelDataProvider = orml_oracle::Instance1; impl orml_oracle::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnNewData = (); type CombineData = orml_oracle::DefaultCombineData; @@ -1381,7 +1378,7 @@ impl DecimalProvider for Decimal { } impl pallet_prices::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Source = AggregatedDataProvider; type FeederOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1406,13 +1403,13 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; type MaxSignatories = MaxSignatories; - type WeightInfo = weights::pallet_multisig::WeightInfo; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; } parameter_types! { @@ -1425,7 +1422,7 @@ parameter_types! { } impl pallet_identity::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BasicDeposit = BasicDeposit; type FieldDeposit = FieldDeposit; @@ -1462,8 +1459,7 @@ parameter_types! { } impl pallet_democracy::Config for Runtime { - type Proposal = Call; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EnactmentPeriod = EnactmentPeriod; type LaunchPeriod = LaunchPeriod; @@ -1498,9 +1494,6 @@ impl pallet_democracy::Config for Runtime { // only do it once and it lasts only for the cool-off period. type VetoOrigin = pallet_collective::EnsureMember; type CooloffPeriod = CooloffPeriod; - type PreimageByteDeposit = PreimageByteDeposit; - type OperationalPreimageOrigin = - pallet_collective::EnsureMember; type Slash = Treasury; type Scheduler = Scheduler; type PalletsOrigin = OriginCaller; @@ -1508,6 +1501,9 @@ impl pallet_democracy::Config for Runtime { type WeightInfo = pallet_democracy::weights::SubstrateWeight; type MaxProposals = MaxProposals; type VoteLockingPeriod = EnactmentPeriod; + type Preimages = Preimage; + type MaxDeposits = ConstU32<100>; + type MaxBlacklisted = ConstU32<100>; } parameter_types! { @@ -1518,9 +1514,9 @@ parameter_types! { type GeneralCouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = GeneralCouncilMotionDuration; type MaxProposals = GeneralCouncilMaxProposals; type MaxMembers = GeneralCouncilMaxMembers; @@ -1530,7 +1526,7 @@ impl pallet_collective::Config for Runtime { type GeneralCouncilMembershipInstance = pallet_membership::Instance1; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1550,9 +1546,9 @@ parameter_types! { type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; type MaxProposals = TechnicalMaxProposals; type MaxMembers = TechnicalMaxMembers; @@ -1562,7 +1558,7 @@ impl pallet_collective::Config for Runtime { type TechnicalCommitteeMembershipInstance = pallet_membership::Instance2; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1575,17 +1571,15 @@ impl pallet_membership::Config for Runtime } parameter_types! { - pub const PreimageMaxSize: u32 = 4096 * 1024; pub const PreimageBaseDeposit: Balance = deposit(2, 64); pub const PreimageByteDeposit: Balance = deposit(0, 1); } impl pallet_preimage::Config for Runtime { type WeightInfo = pallet_preimage::weights::SubstrateWeight; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type MaxSize = PreimageMaxSize; type BaseDeposit = PreimageBaseDeposit; type ByteDeposit = PreimageByteDeposit; } @@ -1598,17 +1592,16 @@ parameter_types! { } impl pallet_scheduler::Config for Runtime { - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type MaxScheduledPerBlock = MaxScheduledPerBlock; type OriginPrivilegeCmp = EqualPrivilegeOnly; type WeightInfo = pallet_scheduler::weights::SubstrateWeight; - type PreimageProvider = Preimage; - type NoPreimagePostponement = NoPreimagePostponement; + type Preimages = Preimage; } parameter_types! { @@ -1626,7 +1619,7 @@ impl pallet_treasury::Config for Runtime { type Currency = Balances; type ApproveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RejectOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = (); type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; @@ -1646,7 +1639,7 @@ parameter_types! { type OracleMembershipInstance = pallet_membership::Instance3; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1683,7 +1676,7 @@ impl ChangeMembers for ChangeBridgeMembers { type BridgeMembershipInstance = pallet_membership::Instance6; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1704,7 +1697,7 @@ parameter_types! { } impl pallet_bridge::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RelayMembers = BridgeMembership; type RootOperatorAccountId = OneAccount; type UpdateChainOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1728,7 +1721,7 @@ parameter_types! { } impl orml_vesting::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type MinVestedTransfer = MinVestedTransfer; type VestedTransferOrigin = frame_system::EnsureSigned; @@ -1746,7 +1739,7 @@ parameter_types! { } impl pallet_amm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = AMMPalletId; type LockAccountId = OneAccount; @@ -1794,9 +1787,9 @@ impl ValidationDataProvider } impl pallet_crowdloans::Config for Runtime { - type Event = Event; - type Origin = Origin; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type PalletId = CrowdloansPalletId; type SelfParaId = ParachainInfo; type Assets = Assets; @@ -1833,7 +1826,7 @@ parameter_types! { } impl pallet_streaming::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = StreamPalletId; type MaxStreamsCount = MaxStreamsCount; @@ -1851,7 +1844,7 @@ parameter_types! { } impl pallet_xcm_helper::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type Assets = Assets; type XcmSender = XcmRouter; @@ -1871,7 +1864,7 @@ parameter_types! { } impl pallet_router::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = RouterPalletId; type AMM = AMM; type AMMRouterWeightInfo = weights::pallet_router::WeightInfo; @@ -1896,7 +1889,7 @@ parameter_types! { } impl pallet_farming::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = FarmingPalletId; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1908,10 +1901,10 @@ impl pallet_farming::Config for Runtime { } impl pallet_emergency_shutdown::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Whitelist = WhiteListFilter; type ShutdownOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type Call = Call; + type RuntimeCall = RuntimeCall; } // Create the runtime by composing the FRAME pallets that were previously configured. @@ -2024,11 +2017,12 @@ pub type SignedExtra = ( ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = - fp_self_contained::UncheckedExtrinsic; + fp_self_contained::UncheckedExtrinsic; /// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = fp_self_contained::CheckedExtrinsic; +pub type CheckedExtrinsic = + fp_self_contained::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -2039,19 +2033,19 @@ pub type Executive = frame_executive::Executive< (), >; -impl fp_self_contained::SelfContainedCall for Call { +impl fp_self_contained::SelfContainedCall for RuntimeCall { type SignedInfo = H160; fn is_self_contained(&self) -> bool { match self { - Call::Ethereum(call) => call.is_self_contained(), + RuntimeCall::Ethereum(call) => call.is_self_contained(), _ => false, } } fn check_self_contained(&self) -> Option> { match self { - Call::Ethereum(call) => call.check_self_contained(), + RuntimeCall::Ethereum(call) => call.check_self_contained(), _ => None, } } @@ -2059,11 +2053,11 @@ impl fp_self_contained::SelfContainedCall for Call { fn validate_self_contained( &self, info: &Self::SignedInfo, - dispatch_info: &DispatchInfoOf, + dispatch_info: &DispatchInfoOf, len: usize, ) -> Option { match self { - Call::Ethereum(call) => call.validate_self_contained(info, dispatch_info, len), + RuntimeCall::Ethereum(call) => call.validate_self_contained(info, dispatch_info, len), _ => None, } } @@ -2071,11 +2065,13 @@ impl fp_self_contained::SelfContainedCall for Call { fn pre_dispatch_self_contained( &self, info: &Self::SignedInfo, - dispatch_info: &DispatchInfoOf, + dispatch_info: &DispatchInfoOf, len: usize, ) -> Option> { match self { - Call::Ethereum(call) => call.pre_dispatch_self_contained(info, dispatch_info, len), + RuntimeCall::Ethereum(call) => { + call.pre_dispatch_self_contained(info, dispatch_info, len) + } _ => None, } } @@ -2085,9 +2081,11 @@ impl fp_self_contained::SelfContainedCall for Call { info: Self::SignedInfo, ) -> Option>> { match self { - call @ Call::Ethereum(pallet_ethereum::Call::transact { .. }) => Some(call.dispatch( - Origin::from(pallet_ethereum::RawOrigin::EthereumTransaction(info)), - )), + call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => { + Some(call.dispatch(RuntimeOrigin::from( + pallet_ethereum::RawOrigin::EthereumTransaction(info), + ))) + } _ => None, } } @@ -2378,7 +2376,7 @@ impl_runtime_apis! { xts: Vec<::Extrinsic>, ) -> Vec { xts.into_iter().filter_map(|xt| match xt.0.function { - Call::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction), + RuntimeCall::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction), _ => None }).collect::>() } @@ -2492,8 +2490,19 @@ impl_runtime_apis! { (weight, RuntimeBlockWeights::get().max_block) } - fn execute_block_no_check(block: Block) -> Weight { - Executive::execute_block_no_check(block) + fn execute_block( + block: Block, + state_root_check: bool, + select: frame_try_runtime::TryStateSelect + ) -> Weight { + log::info!( + target: "runtime::kerria", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", + block.header.number, + block.header.hash(), + state_root_check, + select, + ); + Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed") } } } diff --git a/runtime/kerria/src/precompiles.rs b/runtime/kerria/src/precompiles.rs index be7e34556..686deba1e 100644 --- a/runtime/kerria/src/precompiles.rs +++ b/runtime/kerria/src/precompiles.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use frame_support::weights::GetDispatchInfo; -use frame_support::weights::PostDispatchInfo; +use frame_support::dispatch::GetDispatchInfo; +use frame_support::dispatch::PostDispatchInfo; use pallet_evm::{ ExitRevert, Precompile, PrecompileFailure, PrecompileHandle, PrecompileResult, PrecompileSet, }; @@ -64,9 +64,9 @@ where + AddressToAssetId<::AssetId> + pallet_assets::Config + pallet_balances::Config, - R::Call: Dispatchable + GetDispatchInfo, - ::Call: From>, - <::Call as Dispatchable>::Origin: + R::RuntimeCall: Dispatchable + GetDispatchInfo, + ::RuntimeCall: From>, + <::RuntimeCall as Dispatchable>::RuntimeOrigin: From::AccountId>>, ::Balance: TryFrom, ::Balance: Into, diff --git a/runtime/kerria/src/weights/frame_system.rs b/runtime/kerria/src/weights/frame_system.rs index 3de53df57..c6b477ffa 100644 --- a/runtime/kerria/src/weights/frame_system.rs +++ b/runtime/kerria/src/weights/frame_system.rs @@ -29,39 +29,39 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { fn remark(_b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) } fn remark_with_event(b: u32, ) -> Weight { - (13_176_000 as Weight) + Weight::from_ref_time(13_176_000 as u64) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (9_294_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(9_294_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) fn set_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 1_000 - .saturating_add((1_048_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(1_048_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 1_000 - .saturating_add((757_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(757_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 1_000 - .saturating_add((1_505_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(1_505_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/kerria/src/weights/mod.rs b/runtime/kerria/src/weights/mod.rs index 1f2992a9e..a0cd58966 100644 --- a/runtime/kerria/src/weights/mod.rs +++ b/runtime/kerria/src/weights/mod.rs @@ -8,7 +8,6 @@ pub mod pallet_farming; pub mod pallet_liquid_staking; pub mod pallet_loans; pub mod pallet_membership; -pub mod pallet_multisig; pub mod pallet_router; pub mod pallet_streaming; pub mod pallet_timestamp; diff --git a/runtime/kerria/src/weights/pallet_amm.rs b/runtime/kerria/src/weights/pallet_amm.rs index 4ea8c9488..c1707997d 100644 --- a/runtime/kerria/src/weights/pallet_amm.rs +++ b/runtime/kerria/src/weights/pallet_amm.rs @@ -33,18 +33,18 @@ impl pallet_amm::WeightInfo for WeightInfo { // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn add_liquidity() -> Weight { - (214_746_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(214_746_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn remove_liquidity() -> Weight { - (233_479_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(233_479_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) @@ -52,16 +52,16 @@ impl pallet_amm::WeightInfo for WeightInfo { // Storage: Assets Account (r:6 w:6) // Storage: System Account (r:2 w:2) fn create_pool() -> Weight { - (286_985_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) + Weight::from_ref_time(286_985_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(13 as u64)) } // Storage: AMM ProtocolFee (r:0 w:1) fn update_protocol_fee() -> Weight { - (4_067_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(4_067_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: AMM ProtocolFeeReceiver (r:0 w:1) fn update_protocol_fee_receiver() -> Weight { - (4_114_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(4_114_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/kerria/src/weights/pallet_asset_registry.rs b/runtime/kerria/src/weights/pallet_asset_registry.rs index 723edefc3..949d88b1f 100644 --- a/runtime/kerria/src/weights/pallet_asset_registry.rs +++ b/runtime/kerria/src/weights/pallet_asset_registry.rs @@ -31,41 +31,41 @@ impl pallet_asset_registry::WeightInfo for WeightInfo Weight { - (36_239_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_239_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry AssetTypeId (r:1 w:0) // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn update_asset_units_per_second() -> Weight { - (45_174_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(45_174_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:1 w:2) // Storage: AssetRegistry AssetTypeId (r:0 w:2) fn update_asset_type() -> Weight { - (61_733_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(61_733_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn remove_fee_payment_asset() -> Weight { - (38_339_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(38_339_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) // Storage: AssetRegistry AssetTypeId (r:0 w:1) fn deregister_asset() -> Weight { - (48_719_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(48_719_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } } diff --git a/runtime/kerria/src/weights/pallet_balances.rs b/runtime/kerria/src/weights/pallet_balances.rs index ab48c5642..0d545210d 100644 --- a/runtime/kerria/src/weights/pallet_balances.rs +++ b/runtime/kerria/src/weights/pallet_balances.rs @@ -30,44 +30,44 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (90_315_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(90_315_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (69_776_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(69_776_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (43_658_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(43_658_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (50_944_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(50_944_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (89_639_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(89_639_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (82_166_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(82_166_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (39_551_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(39_551_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/kerria/src/weights/pallet_bridge.rs b/runtime/kerria/src/weights/pallet_bridge.rs index 666ac67c4..933444210 100644 --- a/runtime/kerria/src/weights/pallet_bridge.rs +++ b/runtime/kerria/src/weights/pallet_bridge.rs @@ -32,65 +32,65 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn register_chain() -> Weight { - (44_238_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(44_238_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn unregister_chain() -> Weight { - (43_179_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(43_179_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge BridgeTokens (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:1) fn register_bridge_token() -> Weight { - (49_245_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(49_245_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:1) // Storage: Bridge BridgeTokens (r:0 w:1) fn unregister_bridge_token() -> Weight { - (46_367_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(46_367_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_fee() -> Weight { - (52_603_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(52_603_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_status() -> Weight { - (51_621_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_621_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_cap() -> Weight { - (52_616_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(52_616_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn clean_cap_accumulated_value() -> Weight { - (51_728_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_728_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:1) @@ -98,9 +98,9 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: Bridge BridgeTokens (r:1 w:1) // Storage: System Account (r:1 w:1) fn teleport() -> Weight { - (130_108_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(130_108_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:0) @@ -113,8 +113,8 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:1) // Storage: Assets Metadata (r:1 w:0) fn materialize() -> Weight { - (211_212_000 as Weight) - .saturating_add(T::DbWeight::get().reads(11 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(211_212_000 as u64) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } } diff --git a/runtime/kerria/src/weights/pallet_crowdloans.rs b/runtime/kerria/src/weights/pallet_crowdloans.rs index 19e6a19b4..1b9c14aa7 100644 --- a/runtime/kerria/src/weights/pallet_crowdloans.rs +++ b/runtime/kerria/src/weights/pallet_crowdloans.rs @@ -36,18 +36,18 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: Crowdloans NextTrieIndex (r:1 w:1) fn create_vault() -> Weight { - (89_273_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(89_273_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: ParachainSystem ValidationData (r:1 w:0) fn update_vault() -> Weight { - (72_633_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(72_633_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -69,48 +69,48 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: PolkadotXcm Queries (r:0 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - (304_733_000 as Weight) - .saturating_add(T::DbWeight::get().reads(19 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) + Weight::from_ref_time(304_733_000 as u64) + .saturating_add(T::DbWeight::get().reads(19 as u64)) + .saturating_add(T::DbWeight::get().writes(13 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn open() -> Weight { - (68_797_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(68_797_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn close() -> Weight { - (67_529_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(67_529_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans IsVrf (r:0 w:1) fn set_vrf() -> Weight { - (36_038_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_038_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn reopen() -> Weight { - (68_065_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(68_065_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn auction_succeeded() -> Weight { - (68_213_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(68_213_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -128,9 +128,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn auction_failed() -> Weight { - (208_673_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(208_673_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans CTokensRegistry (r:1 w:0) @@ -139,9 +139,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Assets Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn claim() -> Weight { - (135_952_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(135_952_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -149,9 +149,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Assets Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn withdraw() -> Weight { - (124_233_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(124_233_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans CTokensRegistry (r:1 w:0) @@ -159,9 +159,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:2 w:2) fn redeem() -> Weight { - (171_022_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(171_022_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -179,9 +179,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn slot_expired() -> Weight { - (208_146_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(208_146_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -202,9 +202,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: unknown [0x] (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn migrate_pending() -> Weight { - (313_139_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(313_139_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans XcmRequests (r:1 w:1) @@ -214,9 +214,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn notification_received() -> Weight { - (184_909_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(184_909_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -225,18 +225,18 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: unknown [0x] (r:3 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn refund() -> Weight { - (242_770_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(242_770_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:1) // Storage: unknown [0x] (r:3 w:0) fn dissolve_vault() -> Weight { - (155_160_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(155_160_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -245,20 +245,20 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn refund_for() -> Weight { - (169_339_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(169_339_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } fn update_proxy() -> Weight { - (31_127_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_127_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn update_leases_bonus() -> Weight { - (31_127_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_127_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/kerria/src/weights/pallet_farming.rs b/runtime/kerria/src/weights/pallet_farming.rs index db8b2a7b5..05ac1b0f6 100644 --- a/runtime/kerria/src/weights/pallet_farming.rs +++ b/runtime/kerria/src/weights/pallet_farming.rs @@ -31,30 +31,30 @@ impl pallet_farming::WeightInfo for WeightInfo { // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn create() -> Weight { - (47_715_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(47_715_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn set_pool_status() -> Weight { - (48_556_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(48_556_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn set_pool_cool_down_duration() -> Weight { - (48_944_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(48_944_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn reset_pool_unlock_height() -> Weight { - (50_448_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(50_448_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) @@ -63,17 +63,17 @@ impl pallet_farming::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn deposit() -> Weight { - (171_378_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(171_378_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) fn withdraw() -> Weight { - (107_683_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(107_683_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:0) @@ -81,9 +81,9 @@ impl pallet_farming::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn redeem() -> Weight { - (128_415_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(128_415_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) @@ -91,9 +91,9 @@ impl pallet_farming::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn claim() -> Weight { - (157_608_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(157_608_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) @@ -101,8 +101,8 @@ impl pallet_farming::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn dispatch_reward() -> Weight { - (144_337_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(144_337_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } } diff --git a/runtime/kerria/src/weights/pallet_liquid_staking.rs b/runtime/kerria/src/weights/pallet_liquid_staking.rs index 239ff2297..1963fb0eb 100644 --- a/runtime/kerria/src/weights/pallet_liquid_staking.rs +++ b/runtime/kerria/src/weights/pallet_liquid_staking.rs @@ -40,9 +40,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (263_966_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(263_966_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking ExchangeRate (r:1 w:0) @@ -53,9 +53,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (116_043_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(116_043_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -74,9 +74,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (191_015_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(191_015_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -93,9 +93,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (174_652_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(174_652_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -114,18 +114,18 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (192_979_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(192_979_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:1) // Storage: LiquidStaking IsUpdated (r:1 w:1) // Storage: LiquidStaking XcmRequests (r:1 w:0) fn force_set_staking_ledger() -> Weight { - (70_741_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(70_741_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -143,9 +143,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (183_113_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(183_113_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -163,9 +163,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (179_752_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(179_752_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:1 w:0) @@ -183,23 +183,23 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (184_199_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(184_199_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking ReserveFactor (r:1 w:1) fn update_reserve_factor() -> Weight { - (37_115_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_115_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgerCap (r:1 w:1) fn update_staking_ledger_cap() -> Weight { - (36_387_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_387_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking XcmRequests (r:1 w:1) @@ -210,9 +210,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (128_865_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(128_865_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:1 w:0) @@ -223,33 +223,33 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (147_691_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(147_691_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking EraStartBlock (r:0 w:1) fn force_set_era_start_block() -> Weight { - (11_484_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(11_484_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:0 w:1) // Storage: LiquidStaking IsMatched (r:0 w:1) fn force_set_current_era() -> Weight { - (13_328_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(13_328_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking IsMatched (r:1 w:0) // Storage: LiquidStaking EraStartBlock (r:1 w:0) fn on_initialize() -> Weight { - (18_562_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_562_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:3 w:0) @@ -274,9 +274,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (426_868_000 as Weight) - .saturating_add(T::DbWeight::get().reads(22 as Weight)) - .saturating_add(T::DbWeight::get().writes(15 as Weight)) + Weight::from_ref_time(426_868_000 as u64) + .saturating_add(T::DbWeight::get().reads(22 as u64)) + .saturating_add(T::DbWeight::get().writes(15 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:3 w:0) @@ -297,9 +297,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (358_694_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(358_694_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking TotalReserves (r:1 w:1) @@ -307,9 +307,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (120_292_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(120_292_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking Unlockings (r:1 w:1) @@ -320,23 +320,23 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (109_728_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(109_728_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } fn update_commission_rate() -> Weight { - (39_392_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(39_392_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn fast_match_unstake(n: u32, ) -> Weight { - (21_480_000 as Weight) + Weight::from_ref_time(21_480_000 as u64) // Standard Error: 38_000 - .saturating_add((82_727_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(n as Weight))) + .saturating_add(Weight::from_ref_time(82_727_000 as u64).saturating_mul(n as u64)) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(n as u64))) } } diff --git a/runtime/kerria/src/weights/pallet_loans.rs b/runtime/kerria/src/weights/pallet_loans.rs index 5aad071a5..959356c09 100644 --- a/runtime/kerria/src/weights/pallet_loans.rs +++ b/runtime/kerria/src/weights/pallet_loans.rs @@ -34,52 +34,52 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans ExchangeRate (r:0 w:1) // Storage: Loans BorrowIndex (r:0 w:1) fn add_market() -> Weight { - (59_698_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(59_698_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn activate_market() -> Weight { - (42_270_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(42_270_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn update_rate_model() -> Weight { - (43_240_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(43_240_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn update_market() -> Weight { - (44_499_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(44_499_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans UnderlyingAssetId (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn force_update_market() -> Weight { - (55_755_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(55_755_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: System Account (r:1 w:1) fn add_reward() -> Weight { - (98_504_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(98_504_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: System Account (r:1 w:1) fn withdraw_missing_reward() -> Weight { - (79_763_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(79_763_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -88,9 +88,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplyState (r:1 w:1) // Storage: Loans RewardBorrowState (r:1 w:1) fn update_market_reward_speed() -> Weight { - (86_340_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(86_340_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -108,9 +108,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward() -> Weight { - (229_202_000 as Weight) - .saturating_add(T::DbWeight::get().reads(16 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(229_202_000 as u64) + .saturating_add(T::DbWeight::get().reads(16 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans RewardSupplyState (r:1 w:1) @@ -127,9 +127,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward_for_market() -> Weight { - (211_484_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(211_484_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -148,9 +148,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountEarned (r:1 w:1) // Storage: System Account (r:1 w:1) fn mint() -> Weight { - (244_041_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(244_041_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -172,9 +172,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardAccured (r:1 w:1) // Storage: Loans BorrowIndex (r:1 w:0) fn borrow() -> Weight { - (341_042_000 as Weight) - .saturating_add(T::DbWeight::get().reads(24 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(341_042_000 as u64) + .saturating_add(T::DbWeight::get().reads(24 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -192,9 +192,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplierIndex (r:1 w:1) // Storage: Loans RewardAccured (r:1 w:1) fn redeem() -> Weight { - (253_173_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(253_173_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -213,9 +213,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardAccured (r:1 w:1) // Storage: System Account (r:1 w:1) fn redeem_all() -> Weight { - (272_126_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(272_126_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -231,9 +231,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow() -> Weight { - (222_396_000 as Weight) - .saturating_add(T::DbWeight::get().reads(15 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(222_396_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -249,17 +249,17 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow_all() -> Weight { - (218_486_000 as Weight) - .saturating_add(T::DbWeight::get().reads(15 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(218_486_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) // Storage: Loans AccountDeposits (r:1 w:1) fn collateral_asset() -> Weight { - (72_119_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(72_119_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans LiquidationFreeCollaterals (r:1 w:0) @@ -284,9 +284,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplySpeed (r:1 w:0) // Storage: Loans RewardSupplierIndex (r:3 w:3) fn liquidate_borrow() -> Weight { - (631_581_000 as Weight) - .saturating_add(T::DbWeight::get().reads(40 as Weight)) - .saturating_add(T::DbWeight::get().writes(20 as Weight)) + Weight::from_ref_time(631_581_000 as u64) + .saturating_add(T::DbWeight::get().reads(40 as u64)) + .saturating_add(T::DbWeight::get().writes(20 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -295,9 +295,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Loans TotalReserves (r:1 w:1) fn add_reserves() -> Weight { - (140_000_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(140_000_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -305,15 +305,15 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn reduce_reserves() -> Weight { - (126_542_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(126_542_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans LiquidationFreeCollaterals (r:1 w:1) fn update_liquidation_free_collateral() -> Weight { - (37_414_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_414_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/kerria/src/weights/pallet_membership.rs b/runtime/kerria/src/weights/pallet_membership.rs index 4c475f916..1ecfa08ff 100644 --- a/runtime/kerria/src/weights/pallet_membership.rs +++ b/runtime/kerria/src/weights/pallet_membership.rs @@ -33,11 +33,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn add_member(m: u32, ) -> Weight { - (37_876_000 as Weight) + Weight::from_ref_time(37_876_000 as u64) // Standard Error: 5_000 - .saturating_add((124_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(124_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -45,11 +45,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn remove_member(m: u32, ) -> Weight { - (44_833_000 as Weight) + Weight::from_ref_time(44_833_000 as u64) // Standard Error: 0 - .saturating_add((101_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(101_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -57,11 +57,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn swap_member(m: u32, ) -> Weight { - (45_766_000 as Weight) + Weight::from_ref_time(45_766_000 as u64) // Standard Error: 1_000 - .saturating_add((114_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -69,11 +69,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn reset_member(m: u32, ) -> Weight { - (46_196_000 as Weight) + Weight::from_ref_time(46_196_000 as u64) // Standard Error: 1_000 - .saturating_add((306_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(306_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -81,28 +81,28 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn change_key(m: u32, ) -> Weight { - (47_513_000 as Weight) + Weight::from_ref_time(47_513_000 as u64) // Standard Error: 1_000 - .saturating_add((115_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + .saturating_add(Weight::from_ref_time(115_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:0) // Storage: TechnicalCommitteeMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn set_prime(m: u32, ) -> Weight { - (13_784_000 as Weight) + Weight::from_ref_time(13_784_000 as u64) // Standard Error: 0 - .saturating_add((45_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(45_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: TechnicalCommitteeMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn clear_prime(m: u32, ) -> Weight { - (5_401_000 as Weight) + Weight::from_ref_time(5_401_000 as u64) // Standard Error: 0 - .saturating_add((5_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(5_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/kerria/src/weights/pallet_multisig.rs b/runtime/kerria/src/weights/pallet_multisig.rs deleted file mode 100644 index 089b5fda3..000000000 --- a/runtime/kerria/src/weights/pallet_multisig.rs +++ /dev/null @@ -1,129 +0,0 @@ - -//! Autogenerated weights for `pallet_multisig` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kerria-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/parallel -// benchmark -// pallet -// --chain=kerria-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_multisig -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --output=./runtime/kerria/src/weights/pallet_multisig.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_multisig`. -pub struct WeightInfo(PhantomData); -impl pallet_multisig::WeightInfo for WeightInfo { - fn as_multi_threshold_1(z: u32, ) -> Weight { - (27_419_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (77_807_000 as Weight) - // Standard Error: 1_000 - .saturating_add((201_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (85_260_000 as Weight) - // Standard Error: 2_000 - .saturating_add((186_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (52_840_000 as Weight) - // Standard Error: 1_000 - .saturating_add((168_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (83_231_000 as Weight) - // Standard Error: 2_000 - .saturating_add((162_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (101_200_000 as Weight) - // Standard Error: 2_000 - .saturating_add((259_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn approve_as_multi_create(s: u32, ) -> Weight { - (72_163_000 as Weight) - // Standard Error: 1_000 - .saturating_add((224_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) - fn approve_as_multi_approve(s: u32, ) -> Weight { - (45_545_000 as Weight) - // Standard Error: 1_000 - .saturating_add((211_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn approve_as_multi_complete(s: u32, ) -> Weight { - (135_875_000 as Weight) - // Standard Error: 2_000 - .saturating_add((273_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn cancel_as_multi(s: u32, ) -> Weight { - (111_602_000 as Weight) - // Standard Error: 2_000 - .saturating_add((223_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } -} diff --git a/runtime/kerria/src/weights/pallet_router.rs b/runtime/kerria/src/weights/pallet_router.rs index 0bb0eed1b..58355ad92 100644 --- a/runtime/kerria/src/weights/pallet_router.rs +++ b/runtime/kerria/src/weights/pallet_router.rs @@ -33,17 +33,17 @@ impl pallet_router::WeightInfo for WeightInfo { // Storage: Assets Account (r:4 w:4) // Storage: AMM Pools (r:1 w:1) fn swap_exact_tokens_for_tokens() -> Weight { - (204_503_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(204_503_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) // Storage: Assets Account (r:4 w:4) // Storage: Assets Asset (r:2 w:2) fn swap_tokens_for_exact_tokens() -> Weight { - (202_029_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(202_029_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } } diff --git a/runtime/kerria/src/weights/pallet_streaming.rs b/runtime/kerria/src/weights/pallet_streaming.rs index b4572d515..bf4e47e94 100644 --- a/runtime/kerria/src/weights/pallet_streaming.rs +++ b/runtime/kerria/src/weights/pallet_streaming.rs @@ -38,9 +38,9 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: Streaming StreamLibrary (r:4 w:4) // Storage: Streaming Streams (r:0 w:1) fn create() -> Weight { - (165_768_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(165_768_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming Streams (r:1 w:1) @@ -50,9 +50,9 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Streaming StreamLibrary (r:2 w:2) fn cancel() -> Weight { - (173_111_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(173_111_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming Streams (r:1 w:1) @@ -61,15 +61,15 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn withdraw() -> Weight { - (131_966_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(131_966_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming MinimumDeposits (r:0 w:1) fn set_minimum_deposit() -> Weight { - (33_429_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(33_429_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/kerria/src/weights/pallet_timestamp.rs b/runtime/kerria/src/weights/pallet_timestamp.rs index 48bda7933..aa79ccc0c 100644 --- a/runtime/kerria/src/weights/pallet_timestamp.rs +++ b/runtime/kerria/src/weights/pallet_timestamp.rs @@ -30,11 +30,11 @@ pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - (12_928_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(12_928_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (8_360_000 as Weight) + Weight::from_ref_time(8_360_000 as u64) } } diff --git a/runtime/kerria/src/weights/pallet_xcm_helper.rs b/runtime/kerria/src/weights/pallet_xcm_helper.rs index 812ff0a40..f3c7573b7 100644 --- a/runtime/kerria/src/weights/pallet_xcm_helper.rs +++ b/runtime/kerria/src/weights/pallet_xcm_helper.rs @@ -31,8 +31,8 @@ impl pallet_xcm_helper::WeightInfo for WeightInfo { // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: XcmHelper XcmWeightFee (r:1 w:1) fn update_xcm_weight_fee() -> Weight { - (37_674_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_674_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/parallel/Cargo.toml b/runtime/parallel/Cargo.toml index d5d5156ea..08c4e488b 100644 --- a/runtime/parallel/Cargo.toml +++ b/runtime/parallel/Cargo.toml @@ -20,63 +20,63 @@ smallvec = '1.6.1' static_assertions = '1.1.0' # Substrate dependencies -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-try-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-collective = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-democracy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-identity = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-proxy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-scheduler = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-treasury = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-try-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-collective = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-democracy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-identity = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-proxy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-scheduler = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-treasury = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } # Cumulus dependencies -cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } +cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } # ORML dependencies orml-oracle = { version = '0.4.1-dev', default-features = false } @@ -107,11 +107,11 @@ pallet-xcm-helper = { path = '../../pallets/xcm-helper', default-fea primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } [build-dependencies.substrate-wasm-builder] -branch = 'polkadot-v0.9.28' +branch = 'polkadot-v0.9.32' git = 'https://github.com/paritytech/substrate.git' [dev-dependencies] -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [features] default = ['std'] @@ -119,7 +119,7 @@ runtime-benchmarks = [ 'sp-runtime/runtime-benchmarks', 'frame-benchmarking', 'frame-support/runtime-benchmarks', - 'frame-system-benchmarking', + 'frame-system-benchmarking/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', 'pallet-bridge/runtime-benchmarks', @@ -221,7 +221,6 @@ std = [ 'orml-vesting/std', 'pallet-amm/std', 'pallet-router/std', - 'frame-try-runtime/std', 'pallet-currency-adapter/std', 'pallet-crowdloans/std', 'pallet-emergency-shutdown/std', @@ -248,6 +247,21 @@ try-runtime = [ 'pallet-scheduler/try-runtime', 'pallet-preimage/try-runtime', 'polkadot-runtime-common/try-runtime', + 'pallet-proxy/try-runtime', + 'pallet-xcm/try-runtime', + 'parachain-info/try-runtime', + 'pallet-collator-selection/try-runtime', + 'cumulus-pallet-xcmp-queue/try-runtime', + 'cumulus-pallet-dmp-queue/try-runtime', + 'cumulus-pallet-xcm/try-runtime', + 'cumulus-pallet-aura-ext/try-runtime', + 'cumulus-pallet-parachain-system/try-runtime', + 'pallet-crowdloans/try-runtime', + 'pallet-amm/try-runtime', + 'pallet-router/try-runtime', + 'pallet-currency-adapter/try-runtime', + 'pallet-emergency-shutdown/try-runtime', + 'pallet-farming/try-runtime', 'pallet-session/try-runtime', 'pallet-assets/try-runtime', 'pallet-authorship/try-runtime', @@ -264,8 +278,3 @@ try-runtime = [ 'pallet-xcm-helper/try-runtime', 'pallet-asset-registry/try-runtime', ] - -[package.metadata.cargo-udeps.ignore] -normal = [ - 'frame-try-runtime', -] diff --git a/runtime/parallel/src/constants.rs b/runtime/parallel/src/constants.rs index 98bb90795..7682d1742 100644 --- a/runtime/parallel/src/constants.rs +++ b/runtime/parallel/src/constants.rs @@ -73,7 +73,7 @@ pub mod fee { fn polynomial() -> WeightToFeeCoefficients { // in parallel, extrinsic base weight (smallest non-zero weight) is mapped to 12 CENTS let p = super::currency::CENTS * 12; - let q = Balance::from(ExtrinsicBaseWeight::get()); + let q = Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, diff --git a/runtime/parallel/src/lib.rs b/runtime/parallel/src/lib.rs index 3347da1a4..929ef382f 100644 --- a/runtime/parallel/src/lib.rs +++ b/runtime/parallel/src/lib.rs @@ -20,7 +20,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ construct_runtime, - dispatch::{DispatchResult, Weight}, + dispatch::{DispatchClass, DispatchResult, Weight}, log, match_types, parameter_types, traits::{ fungibles::{InspectMetadata, Mutate}, @@ -30,7 +30,7 @@ use frame_support::{ }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - ConstantMultiplier, DispatchClass, + ConstantMultiplier, }, PalletId, WeakBoundedVec, }; @@ -180,7 +180,9 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 500 ms of compute with parachain block. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) + .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! { pub const BlockHashCount: BlockNumber = 250; @@ -209,96 +211,96 @@ parameter_types! { } pub struct WhiteListFilter; -impl Contains for WhiteListFilter { - fn contains(call: &Call) -> bool { +impl Contains for WhiteListFilter { + fn contains(call: &RuntimeCall) -> bool { matches!( call, // System, Currencies - Call::System(_) | - Call::Timestamp(_) | - Call::Assets(pallet_assets::Call::force_create { .. }) | - Call::Assets(pallet_assets::Call::force_set_metadata { .. }) | - Call::Assets(pallet_assets::Call::force_asset_status { .. }) | + RuntimeCall::System(_) | + RuntimeCall::Timestamp(_) | + RuntimeCall::Assets(pallet_assets::Call::force_create { .. }) | + RuntimeCall::Assets(pallet_assets::Call::force_set_metadata { .. }) | + RuntimeCall::Assets(pallet_assets::Call::force_asset_status { .. }) | // Governance - // Call::Sudo(_) | - Call::Democracy(_) | - Call::GeneralCouncil(_) | - Call::TechnicalCommittee(_) | - Call::Treasury(_) | - Call::Scheduler(_) | - Call::Preimage(_) | + // RuntimeCall::Sudo(_) | + RuntimeCall::Democracy(_) | + RuntimeCall::GeneralCouncil(_) | + RuntimeCall::TechnicalCommittee(_) | + RuntimeCall::Treasury(_) | + RuntimeCall::Scheduler(_) | + RuntimeCall::Preimage(_) | // Parachain - Call::ParachainSystem(_) | - Call::XcmpQueue(_) | - Call::DmpQueue(_) | - Call::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_default_xcm_version { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_subscribe_version_notify { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_unsubscribe_version_notify { .. }) | - Call::CumulusXcm(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::XcmpQueue(_) | + RuntimeCall::DmpQueue(_) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_default_xcm_version { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_subscribe_version_notify { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_unsubscribe_version_notify { .. }) | + RuntimeCall::CumulusXcm(_) | // Consensus - Call::Authorship(_) | - Call::Session(_) | - // Call::CollatorSelection(_) | + RuntimeCall::Authorship(_) | + RuntimeCall::Session(_) | + // RuntimeCall::CollatorSelection(_) | // Utility - Call::Utility(_) | - Call::Multisig(_) | - Call::Proxy(_) | - Call::Identity(_) | - Call::EmergencyShutdown(_) | - Call::XcmHelper(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Proxy(_) | + RuntimeCall::Identity(_) | + RuntimeCall::EmergencyShutdown(_) | + RuntimeCall::XcmHelper(_) | // Membership - Call::OracleMembership(_) | - Call::GeneralCouncilMembership(_) | - Call::TechnicalCommitteeMembership(_) | - Call::LiquidStakingAgentsMembership(_) | - Call::CrowdloansAutomatorsMembership(_) | - Call::BridgeMembership(_) + RuntimeCall::OracleMembership(_) | + RuntimeCall::GeneralCouncilMembership(_) | + RuntimeCall::TechnicalCommitteeMembership(_) | + RuntimeCall::LiquidStakingAgentsMembership(_) | + RuntimeCall::CrowdloansAutomatorsMembership(_) | + RuntimeCall::BridgeMembership(_) ) } } pub struct BaseCallFilter; -impl Contains for BaseCallFilter { - fn contains(call: &Call) -> bool { +impl Contains for BaseCallFilter { + fn contains(call: &RuntimeCall) -> bool { (WhiteListFilter::contains(call) || matches!( call, // System, Currencies - Call::Balances(_) | - Call::Assets(pallet_assets::Call::mint { .. }) | - Call::Assets(pallet_assets::Call::transfer { .. }) | - Call::Assets(pallet_assets::Call::transfer_keep_alive { .. }) | - Call::Assets(pallet_assets::Call::freeze { .. }) | - Call::Assets(pallet_assets::Call::thaw { .. }) | - Call::Assets(pallet_assets::Call::freeze_asset { .. }) | - Call::Assets(pallet_assets::Call::thaw_asset { .. }) | - Call::Assets(pallet_assets::Call::burn { .. }) | - Call::Assets(pallet_assets::Call::destroy { .. }) | - Call::CurrencyAdapter(_) | + RuntimeCall::Balances(_) | + RuntimeCall::Assets(pallet_assets::Call::mint { .. }) | + RuntimeCall::Assets(pallet_assets::Call::transfer { .. }) | + RuntimeCall::Assets(pallet_assets::Call::transfer_keep_alive { .. }) | + RuntimeCall::Assets(pallet_assets::Call::freeze { .. }) | + RuntimeCall::Assets(pallet_assets::Call::thaw { .. }) | + RuntimeCall::Assets(pallet_assets::Call::freeze_asset { .. }) | + RuntimeCall::Assets(pallet_assets::Call::thaw_asset { .. }) | + RuntimeCall::Assets(pallet_assets::Call::burn { .. }) | + RuntimeCall::Assets(pallet_assets::Call::destroy { .. }) | + RuntimeCall::CurrencyAdapter(_) | // 3rd Party - Call::Vesting(_) | - Call::Oracle(_) | - Call::XTokens(_) | - Call::OrmlXcm(_) | + RuntimeCall::Vesting(_) | + RuntimeCall::Oracle(_) | + RuntimeCall::XTokens(_) | + RuntimeCall::OrmlXcm(_) | // Loans - Call::Loans(_) | - Call::Prices(_) | + RuntimeCall::Loans(_) | + RuntimeCall::Prices(_) | // AMM - Call::AMM(_) | - Call::AMMRoute(_) | + RuntimeCall::AMM(_) | + RuntimeCall::AMMRoute(_) | // Crowdloans - Call::Crowdloans(_) | + RuntimeCall::Crowdloans(_) | // LiquidStaking - Call::LiquidStaking(_) | + RuntimeCall::LiquidStaking(_) | // Bridge - Call::Bridge(_) | + RuntimeCall::Bridge(_) | // Farming - Call::Farming(_) | + RuntimeCall::Farming(_) | // Streaming - Call::Streaming(_) | + RuntimeCall::Streaming(_) | // Asset Management - Call::AssetRegistry(_) + RuntimeCall::AssetRegistry(_) )) && EmergencyShutdown::contains(call) } @@ -314,7 +316,7 @@ impl frame_system::Config for Runtime { /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. - type Call = Call; + type RuntimeCall = RuntimeCall; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = AccountIdLookup; /// The index type for storing how many extrinsics an account has signed. @@ -328,9 +330,9 @@ impl frame_system::Config for Runtime { /// The header type. type Header = generic::Header; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; /// The weight of database operations that the runtime can invoke. @@ -361,7 +363,7 @@ parameter_types! { } impl orml_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SovereignOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; } @@ -371,7 +373,7 @@ parameter_types! { parameter_types! { pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); - pub const BaseXcmWeight: Weight = 150_000_000; + pub const BaseXcmWeight: u64 = 150_000_000; pub const MaxInstructions: u32 = 100; pub const MaxAssetsForTransfer: usize = 2; } @@ -389,14 +391,14 @@ parameter_type_with_key! { } impl orml_xtokens::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; type AccountIdToMultiLocation = AccountIdToMultiLocation; type SelfLocation = SelfLocation; type XcmExecutor = XcmExecutor; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; @@ -417,7 +419,7 @@ parameter_types! { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -439,7 +441,7 @@ parameter_types! { } impl pallet_loans::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = LoansPalletId; type PriceFeeder = Prices; type ReserveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -471,9 +473,9 @@ parameter_types! { } impl pallet_liquid_staking::Config for Runtime { - type Event = Event; - type Origin = Origin; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type PalletId = StakingPalletId; type LoansPalletId = LoansPalletId; type WeightInfo = weights::pallet_liquid_staking::WeightInfo; @@ -509,7 +511,7 @@ parameter_types! { type LiquidStakingAgentsMembershipInstance = pallet_membership::Instance5; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -527,7 +529,7 @@ parameter_types! { type CrowdloansAutomatorsMembershipInstance = pallet_membership::Instance7; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -541,15 +543,15 @@ impl pallet_membership::Config for Runti impl frame_system::offchain::CreateSignedTransaction for Runtime where - Call: From, + RuntimeCall: From, { fn create_transaction>( - call: Call, + call: RuntimeCall, public: ::Signer, account: AccountId, index: Index, ) -> Option<( - Call, + RuntimeCall, ::SignaturePayload, )> { let period = BlockHashCount::get() as u64; @@ -590,9 +592,9 @@ impl frame_system::offchain::SigningTypes for Runtime { impl frame_system::offchain::SendTransactionTypes for Runtime where - Call: From, + RuntimeCall: From, { - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; type Extrinsic = UncheckedExtrinsic; } @@ -625,7 +627,7 @@ parameter_types! { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. type ValidatorIdOf = pallet_collator_selection::IdentityCollator; @@ -647,7 +649,7 @@ parameter_types! { } impl pallet_collator_selection::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type PotId = PotId; @@ -684,7 +686,7 @@ impl pallet_balances::Config for Runtime { /// The type for recording an account's balance. type Balance = Balance; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = Treasury; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -704,7 +706,7 @@ impl pallet_transaction_payment::Config for Runtime { type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = OperationalFeeMultiplier; type LengthToFee = ConstantMultiplier; - type Event = Event; + type RuntimeEvent = RuntimeEvent; } #[derive( @@ -736,80 +738,86 @@ impl Default for ProxyType { } } -impl InstanceFilter for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl InstanceFilter for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, ProxyType::Loans => { matches!( c, - Call::Loans(pallet_loans::Call::mint { .. }) - | Call::Loans(pallet_loans::Call::redeem { .. }) - | Call::Loans(pallet_loans::Call::redeem_all { .. }) - | Call::Loans(pallet_loans::Call::borrow { .. }) - | Call::Loans(pallet_loans::Call::repay_borrow { .. }) - | Call::Loans(pallet_loans::Call::repay_borrow_all { .. }) - | Call::Loans(pallet_loans::Call::collateral_asset { .. }) - | Call::Loans(pallet_loans::Call::liquidate_borrow { .. }) - | Call::Loans(pallet_loans::Call::add_reward { .. }) - | Call::Loans(pallet_loans::Call::claim_reward { .. }) - | Call::Loans(pallet_loans::Call::claim_reward_for_market { .. }) + RuntimeCall::Loans(pallet_loans::Call::mint { .. }) + | RuntimeCall::Loans(pallet_loans::Call::redeem { .. }) + | RuntimeCall::Loans(pallet_loans::Call::redeem_all { .. }) + | RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::repay_borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::repay_borrow_all { .. }) + | RuntimeCall::Loans(pallet_loans::Call::collateral_asset { .. }) + | RuntimeCall::Loans(pallet_loans::Call::liquidate_borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::add_reward { .. }) + | RuntimeCall::Loans(pallet_loans::Call::claim_reward { .. }) + | RuntimeCall::Loans(pallet_loans::Call::claim_reward_for_market { .. }) ) } ProxyType::Staking => { matches!( c, - Call::LiquidStaking(pallet_liquid_staking::Call::stake { .. }) - | Call::LiquidStaking(pallet_liquid_staking::Call::unstake { .. }) - | Call::LiquidStaking(pallet_liquid_staking::Call::cancel_unstake { .. }) + RuntimeCall::LiquidStaking(pallet_liquid_staking::Call::stake { .. }) + | RuntimeCall::LiquidStaking(pallet_liquid_staking::Call::unstake { .. }) + | RuntimeCall::LiquidStaking( + pallet_liquid_staking::Call::cancel_unstake { .. } + ) ) } ProxyType::Crowdloans => { matches!( c, - Call::Crowdloans(pallet_crowdloans::Call::contribute { .. },) - | Call::Crowdloans(pallet_crowdloans::Call::claim { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::claim_for { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::withdraw { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::withdraw_for { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::redeem { .. }) + RuntimeCall::Crowdloans(pallet_crowdloans::Call::contribute { .. },) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::claim { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::claim_for { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::withdraw { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::withdraw_for { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::redeem { .. }) ) } ProxyType::Farming => { matches!( c, - Call::Farming(pallet_farming::Call::deposit { .. }) - | Call::Farming(pallet_farming::Call::claim { .. }) - | Call::Farming(pallet_farming::Call::withdraw { .. }) - | Call::Farming(pallet_farming::Call::redeem { .. }) + RuntimeCall::Farming(pallet_farming::Call::deposit { .. }) + | RuntimeCall::Farming(pallet_farming::Call::claim { .. }) + | RuntimeCall::Farming(pallet_farming::Call::withdraw { .. }) + | RuntimeCall::Farming(pallet_farming::Call::redeem { .. }) ) } ProxyType::Streaming => { matches!( c, - Call::Streaming(pallet_streaming::Call::create { .. }) - | Call::Streaming(pallet_streaming::Call::cancel { .. }) - | Call::Streaming(pallet_streaming::Call::withdraw { .. }) + RuntimeCall::Streaming(pallet_streaming::Call::create { .. }) + | RuntimeCall::Streaming(pallet_streaming::Call::cancel { .. }) + | RuntimeCall::Streaming(pallet_streaming::Call::withdraw { .. }) ) } ProxyType::Governance => { matches!( c, - Call::Democracy(..) - | Call::Preimage(..) - | Call::GeneralCouncil(..) - | Call::TechnicalCommittee(..) - | Call::Treasury(..) - | Call::Utility(..) + RuntimeCall::Democracy(..) + | RuntimeCall::Preimage(..) + | RuntimeCall::GeneralCouncil(..) + | RuntimeCall::TechnicalCommittee(..) + | RuntimeCall::Treasury(..) + | RuntimeCall::Utility(..) ) } ProxyType::AMM => { matches!( c, - Call::AMM(pallet_amm::Call::add_liquidity { .. }) - | Call::AMM(pallet_amm::Call::remove_liquidity { .. }) - | Call::AMMRoute(pallet_router::Call::swap_tokens_for_exact_tokens { .. }) - | Call::AMMRoute(pallet_router::Call::swap_exact_tokens_for_tokens { .. }) + RuntimeCall::AMM(pallet_amm::Call::add_liquidity { .. }) + | RuntimeCall::AMM(pallet_amm::Call::remove_liquidity { .. }) + | RuntimeCall::AMMRoute( + pallet_router::Call::swap_tokens_for_exact_tokens { .. } + ) + | RuntimeCall::AMMRoute( + pallet_router::Call::swap_exact_tokens_for_tokens { .. } + ) ) } } @@ -836,14 +844,14 @@ parameter_types! { } impl pallet_proxy::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ProxyType = ProxyType; type ProxyDepositBase = ProxyDepositBase; type ProxyDepositFactor = ProxyDepositFactor; type MaxProxies = MaxProxies; - type WeightInfo = weights::pallet_proxy::WeightInfo; + type WeightInfo = pallet_proxy::weights::SubstrateWeight; type MaxPending = MaxPending; type CallHasher = BlakeTwo256; type AnnouncementDepositBase = AnnouncementDepositBase; @@ -851,15 +859,15 @@ impl pallet_proxy::Config for Runtime { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = weights::pallet_utility::WeightInfo; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. However, we later /// block this via `ExecuteXcmOrigin`. -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; /// The means for routing XCM messages which are not for local execution into the right message /// queues. @@ -873,29 +881,29 @@ pub type XcmRouter = ( impl pallet_xcm::Config for Runtime { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type Origin = Origin; - type Call = Call; - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmReserveTransferFilter = Everything; type XcmExecutor = XcmExecutor; // Teleporting is disabled. type XcmTeleportFilter = Nothing; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl cumulus_pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_xcmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type ChannelInfo = ParachainSystem; @@ -906,18 +914,18 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = ParachainInfo; type DmpMessageHandler = DmpQueue; @@ -935,7 +943,7 @@ parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Polkadot; pub RelayCurrency: CurrencyId = DOT; pub ParallelNetwork: NetworkId = NetworkId::Named(WeakBoundedVec::>::force_from("parallel".into(), None)); - pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = MultiLocation::new(0, X1(Parachain(ParachainInfo::parachain_id().into()))); } @@ -1001,21 +1009,21 @@ pub type XcmOriginToTransactDispatchOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when // recognised. - RelayChainAsNative, + RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when // recognised. - SiblingParachainAsNative, + SiblingParachainAsNative, // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a // transaction from the Root origin. - ParentAsSuperuser, + ParentAsSuperuser, // Native signed account converter; this just converts an `AccountId32` origin into a normal // `Origin::Signed` origin of the same 32-byte value. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + XcmPassthrough, ); match_types! { @@ -1098,7 +1106,7 @@ pub type XcmFeesToAccount = pallet_traits::xcm::XcmFeesToAccount< pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; // How to withdraw and deposit an asset. type AssetTransactor = AssetTransactors; @@ -1108,7 +1116,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FirstAssetTrader; type ResponseHandler = PolkadotXcm; type SubscriptionService = PolkadotXcm; @@ -1117,7 +1125,7 @@ impl Config for XcmConfig { } impl pallet_asset_registry::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type AssetType = AssetType; @@ -1134,7 +1142,7 @@ parameter_types! { type ParallelDataProvider = orml_oracle::Instance1; impl orml_oracle::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnNewData = (); type CombineData = orml_oracle::DefaultCombineData; @@ -1189,7 +1197,7 @@ impl DecimalProvider for Decimal { } impl pallet_prices::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Source = AggregatedDataProvider; type FeederOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1214,13 +1222,13 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; type MaxSignatories = MaxSignatories; - type WeightInfo = weights::pallet_multisig::WeightInfo; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; } parameter_types! { @@ -1233,7 +1241,7 @@ parameter_types! { } impl pallet_identity::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BasicDeposit = BasicDeposit; type FieldDeposit = FieldDeposit; @@ -1270,8 +1278,7 @@ parameter_types! { } impl pallet_democracy::Config for Runtime { - type Proposal = Call; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EnactmentPeriod = EnactmentPeriod; type LaunchPeriod = LaunchPeriod; @@ -1306,16 +1313,16 @@ impl pallet_democracy::Config for Runtime { // only do it once and it lasts only for the cool-off period. type VetoOrigin = pallet_collective::EnsureMember; type CooloffPeriod = CooloffPeriod; - type PreimageByteDeposit = PreimageByteDeposit; - type OperationalPreimageOrigin = - pallet_collective::EnsureMember; type Slash = Treasury; type Scheduler = Scheduler; type PalletsOrigin = OriginCaller; type MaxVotes = MaxVotes; - type WeightInfo = weights::pallet_democracy::WeightInfo; + type WeightInfo = pallet_democracy::weights::SubstrateWeight; type MaxProposals = MaxProposals; type VoteLockingPeriod = EnactmentPeriod; + type Preimages = Preimage; + type MaxDeposits = ConstU32<100>; + type MaxBlacklisted = ConstU32<100>; } parameter_types! { @@ -1326,9 +1333,9 @@ parameter_types! { type GeneralCouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = GeneralCouncilMotionDuration; type MaxProposals = GeneralCouncilMaxProposals; type MaxMembers = GeneralCouncilMaxMembers; @@ -1338,7 +1345,7 @@ impl pallet_collective::Config for Runtime { type GeneralCouncilMembershipInstance = pallet_membership::Instance1; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1358,9 +1365,9 @@ parameter_types! { type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; type MaxProposals = TechnicalMaxProposals; type MaxMembers = TechnicalMaxMembers; @@ -1370,7 +1377,7 @@ impl pallet_collective::Config for Runtime { type TechnicalCommitteeMembershipInstance = pallet_membership::Instance2; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1383,17 +1390,15 @@ impl pallet_membership::Config for Runtime } parameter_types! { - pub const PreimageMaxSize: u32 = 4096 * 1024; pub const PreimageBaseDeposit: Balance = deposit(2, 64); pub const PreimageByteDeposit: Balance = deposit(0, 1); } impl pallet_preimage::Config for Runtime { type WeightInfo = weights::pallet_preimage::WeightInfo; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type MaxSize = PreimageMaxSize; type BaseDeposit = PreimageBaseDeposit; type ByteDeposit = PreimageByteDeposit; } @@ -1406,17 +1411,16 @@ parameter_types! { } impl pallet_scheduler::Config for Runtime { - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type MaxScheduledPerBlock = MaxScheduledPerBlock; type OriginPrivilegeCmp = EqualPrivilegeOnly; - type WeightInfo = weights::pallet_scheduler::WeightInfo; - type PreimageProvider = Preimage; - type NoPreimagePostponement = NoPreimagePostponement; + type WeightInfo = pallet_scheduler::weights::SubstrateWeight; + type Preimages = Preimage; } parameter_types! { @@ -1434,7 +1438,7 @@ impl pallet_treasury::Config for Runtime { type Currency = Balances; type ApproveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RejectOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = (); type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; @@ -1454,7 +1458,7 @@ parameter_types! { type OracleMembershipInstance = pallet_membership::Instance3; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1491,7 +1495,7 @@ impl ChangeMembers for ChangeBridgeMembers { type BridgeMembershipInstance = pallet_membership::Instance6; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1512,7 +1516,7 @@ parameter_types! { } impl pallet_bridge::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RelayMembers = BridgeMembership; type RootOperatorAccountId = OneAccount; type UpdateChainOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1536,7 +1540,7 @@ parameter_types! { } impl orml_vesting::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type MinVestedTransfer = MinVestedTransfer; type VestedTransferOrigin = frame_system::EnsureSigned; @@ -1554,7 +1558,7 @@ parameter_types! { } impl pallet_amm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = AMMPalletId; type LockAccountId = OneAccount; @@ -1603,9 +1607,9 @@ impl ValidationDataProvider } impl pallet_crowdloans::Config for Runtime { - type Event = Event; - type Origin = Origin; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type PalletId = CrowdloansPalletId; type SelfParaId = ParachainInfo; type Assets = Assets; @@ -1642,7 +1646,7 @@ parameter_types! { } impl pallet_streaming::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = StreamPalletId; type MaxStreamsCount = MaxStreamsCount; @@ -1660,7 +1664,7 @@ parameter_types! { } impl pallet_xcm_helper::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type Assets = Assets; type XcmSender = XcmRouter; @@ -1680,7 +1684,7 @@ parameter_types! { } impl pallet_router::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = RouterPalletId; type AMM = AMM; type AMMRouterWeightInfo = weights::pallet_router::WeightInfo; @@ -1704,7 +1708,7 @@ parameter_types! { } impl pallet_farming::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = FarmingPalletId; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1716,10 +1720,10 @@ impl pallet_farming::Config for Runtime { } impl pallet_emergency_shutdown::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Whitelist = WhiteListFilter; type ShutdownOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type Call = Call; + type RuntimeCall = RuntimeCall; } // Create the runtime by composing the FRAME pallets that were previously configured. @@ -1824,11 +1828,12 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = generic::CheckedExtrinsic; +pub type CheckedExtrinsic = generic::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1836,7 +1841,12 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - (), + ( + pallet_preimage::migration::v1::Migration, + pallet_scheduler::migration::v3::MigrateToV4, + pallet_democracy::migrations::v1::Migration, + pallet_multisig::migrations::v1::MigrateToV1, + ), >; impl_runtime_apis! { @@ -2102,8 +2112,19 @@ impl_runtime_apis! { (weight, RuntimeBlockWeights::get().max_block) } - fn execute_block_no_check(block: Block) -> Weight { - Executive::execute_block_no_check(block) + fn execute_block( + block: Block, + state_root_check: bool, + select: frame_try_runtime::TryStateSelect + ) -> Weight { + log::info!( + target: "runtime::parallel", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", + block.header.number, + block.header.hash(), + state_root_check, + select, + ); + Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed") } } } diff --git a/runtime/parallel/src/weights/cumulus_pallet_xcmp_queue.rs b/runtime/parallel/src/weights/cumulus_pallet_xcmp_queue.rs index 05dbee0ab..f2948fd18 100644 --- a/runtime/parallel/src/weights/cumulus_pallet_xcmp_queue.rs +++ b/runtime/parallel/src/weights/cumulus_pallet_xcmp_queue.rs @@ -31,14 +31,14 @@ pub struct WeightInfo(PhantomData); impl cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo { // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_u32() -> Weight { - (10_467_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(10_467_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: XcmpQueue QueueConfig (r:1 w:1) fn set_config_with_weight() -> Weight { - (10_354_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(10_354_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/parallel/src/weights/frame_system.rs b/runtime/parallel/src/weights/frame_system.rs index af5f64ab9..8cca802e6 100644 --- a/runtime/parallel/src/weights/frame_system.rs +++ b/runtime/parallel/src/weights/frame_system.rs @@ -31,45 +31,45 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(b: u32, ) -> Weight { - (6_300_000 as Weight) + Weight::from_ref_time(6_300_000 as u64) // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64)) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (10_223_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(10_223_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn set_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 1_000 - .saturating_add((1_024_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(1_024_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `i` is `[1, 1000]`. fn kill_storage(i: u32, ) -> Weight { - (2_166_000 as Weight) + Weight::from_ref_time(2_166_000 as u64) // Standard Error: 2_000 - .saturating_add((816_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(816_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) /// The range of component `p` is `[1, 1000]`. fn kill_prefix(p: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 2_000 - .saturating_add((1_581_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(1_581_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/parallel/src/weights/mod.rs b/runtime/parallel/src/weights/mod.rs index f2a274fb6..34f30f52c 100644 --- a/runtime/parallel/src/weights/mod.rs +++ b/runtime/parallel/src/weights/mod.rs @@ -8,7 +8,6 @@ pub mod pallet_farming; pub mod pallet_liquid_staking; pub mod pallet_loans; pub mod pallet_membership; -pub mod pallet_multisig; pub mod pallet_router; pub mod pallet_streaming; pub mod pallet_timestamp; @@ -17,10 +16,7 @@ pub mod cumulus_pallet_xcmp_queue; pub mod orml_oracle; pub mod orml_vesting; pub mod pallet_assets; -pub mod pallet_democracy; pub mod pallet_identity; pub mod pallet_preimage; -pub mod pallet_proxy; -pub mod pallet_scheduler; pub mod pallet_treasury; pub mod pallet_utility; \ No newline at end of file diff --git a/runtime/parallel/src/weights/orml_oracle.rs b/runtime/parallel/src/weights/orml_oracle.rs index 5ad4276ab..6bc649e9b 100644 --- a/runtime/parallel/src/weights/orml_oracle.rs +++ b/runtime/parallel/src/weights/orml_oracle.rs @@ -54,17 +54,17 @@ impl orml_oracle::WeightInfo for WeightInfo { // Storage: ParallelOracle Values (r:1 w:0) // Storage: ParallelOracle RawValues (r:0 w:1) fn feed_values(c: u32, ) -> Weight { - (18_441_000 as Weight) + Weight::from_ref_time(18_441_000 as u64) // Standard Error: 88_000 - .saturating_add((6_603_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(c as Weight))) + .saturating_add(Weight::from_ref_time(6_603_000 as u64).saturating_mul(c as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(c as u64))) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) } // Storage: ParallelOracle HasDispatched (r:0 w:1) fn on_finalize() -> Weight { - (3_578_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(3_578_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/parallel/src/weights/orml_vesting.rs b/runtime/parallel/src/weights/orml_vesting.rs index e39dad129..26f9ad96b 100644 --- a/runtime/parallel/src/weights/orml_vesting.rs +++ b/runtime/parallel/src/weights/orml_vesting.rs @@ -51,29 +51,29 @@ impl orml_vesting::WeightInfo for WeightInfo { // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: Vesting VestingSchedules (r:1 w:1) fn vested_transfer() -> Weight { - (21_960_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(21_960_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: Vesting VestingSchedules (r:1 w:1) // Storage: Balances Locks (r:1 w:1) fn claim(i: u32, ) -> Weight { - (32_915_000 as Weight) + Weight::from_ref_time(32_915_000 as u64) // Standard Error: 0 - .saturating_add((15_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(15_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: System Account (r:1 w:0) // Storage: Vesting VestingSchedules (r:0 w:1) fn update_vesting_schedules(i: u32, ) -> Weight { - (27_534_000 as Weight) + Weight::from_ref_time(27_534_000 as u64) // Standard Error: 0 - .saturating_add((60_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(60_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_amm.rs b/runtime/parallel/src/weights/pallet_amm.rs index 0373b07a1..eb7518e29 100644 --- a/runtime/parallel/src/weights/pallet_amm.rs +++ b/runtime/parallel/src/weights/pallet_amm.rs @@ -34,18 +34,18 @@ impl pallet_amm::WeightInfo for WeightInfo { // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn add_liquidity() -> Weight { - (164_668_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(164_668_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: AMM Pools (r:1 w:1) // Storage: AMM ProtocolFee (r:1 w:0) // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn remove_liquidity() -> Weight { - (175_266_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(175_266_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: AMM Pools (r:1 w:1) // Storage: Assets Asset (r:3 w:3) @@ -53,18 +53,18 @@ impl pallet_amm::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) // Storage: AMM ProtocolFee (r:1 w:0) fn create_pool() -> Weight { - (220_380_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(220_380_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: AMM ProtocolFee (r:0 w:1) fn update_protocol_fee() -> Weight { - (23_679_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(23_679_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: AMM ProtocolFeeReceiver (r:0 w:1) fn update_protocol_fee_receiver() -> Weight { - (25_003_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(25_003_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_asset_registry.rs b/runtime/parallel/src/weights/pallet_asset_registry.rs index ebeb4f97c..6b18ecb2f 100644 --- a/runtime/parallel/src/weights/pallet_asset_registry.rs +++ b/runtime/parallel/src/weights/pallet_asset_registry.rs @@ -32,41 +32,41 @@ impl pallet_asset_registry::WeightInfo for WeightInfo Weight { - (30_002_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(30_002_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry AssetTypeId (r:1 w:0) // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn update_asset_units_per_second() -> Weight { - (36_715_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_715_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:1 w:2) // Storage: AssetRegistry AssetTypeId (r:0 w:2) fn update_asset_type() -> Weight { - (50_182_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(50_182_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn remove_fee_payment_asset() -> Weight { - (31_283_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_283_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) // Storage: AssetRegistry AssetTypeId (r:0 w:1) fn deregister_asset() -> Weight { - (39_260_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(39_260_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_assets.rs b/runtime/parallel/src/weights/pallet_assets.rs index ce0e55d9c..f62e74c4d 100644 --- a/runtime/parallel/src/weights/pallet_assets.rs +++ b/runtime/parallel/src/weights/pallet_assets.rs @@ -31,15 +31,15 @@ pub struct WeightInfo(PhantomData); impl pallet_assets::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) fn create() -> Weight { - (47_941_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(47_941_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn force_create() -> Weight { - (27_844_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(27_844_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:5002 w:5001) @@ -50,169 +50,169 @@ impl pallet_assets::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 5000]`. /// The range of component `a` is `[0, 500]`. fn destroy(c: u32, s: u32, a: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 56_000 - .saturating_add((29_286_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(29_286_000 as u64).saturating_mul(c as u64)) // Standard Error: 56_000 - .saturating_add((34_681_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(34_681_000 as u64).saturating_mul(s as u64)) // Standard Error: 561_000 - .saturating_add((34_914_000 as Weight).saturating_mul(a as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(a as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(a as Weight))) + .saturating_add(Weight::from_ref_time(34_914_000 as u64).saturating_mul(a as u64)) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(c as u64))) + .saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(s as u64))) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(a as u64))) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(c as u64))) + .saturating_add(T::DbWeight::get().writes((2 as u64).saturating_mul(s as u64))) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(a as u64))) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn mint() -> Weight { - (53_304_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(53_304_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) fn burn() -> Weight { - (58_872_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(58_872_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (83_380_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(83_380_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (71_336_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(71_336_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn force_transfer() -> Weight { - (83_729_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(83_729_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn freeze() -> Weight { - (34_673_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(34_673_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:1) fn thaw() -> Weight { - (34_591_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(34_591_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn freeze_asset() -> Weight { - (28_550_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(28_550_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn thaw_asset() -> Weight { - (29_057_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(29_057_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) fn transfer_ownership() -> Weight { - (32_362_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(32_362_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn set_team() -> Weight { - (28_690_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(28_690_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn set_metadata(_n: u32, s: u32, ) -> Weight { - (54_619_000 as Weight) + Weight::from_ref_time(54_619_000 as u64) // Standard Error: 0 - .saturating_add((4_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(4_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn clear_metadata() -> Weight { - (54_043_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(54_043_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) /// The range of component `n` is `[0, 50]`. /// The range of component `s` is `[0, 50]`. fn force_set_metadata(_n: u32, s: u32, ) -> Weight { - (32_021_000 as Weight) + Weight::from_ref_time(32_021_000 as u64) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:0) // Storage: Assets Metadata (r:1 w:1) fn force_clear_metadata() -> Weight { - (53_880_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(53_880_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) fn force_asset_status() -> Weight { - (27_559_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(27_559_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn approve_transfer() -> Weight { - (59_704_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(59_704_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Assets Approvals (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn transfer_approved() -> Weight { - (107_330_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(107_330_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn cancel_approval() -> Weight { - (61_322_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(61_322_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Assets Asset (r:1 w:1) // Storage: Assets Approvals (r:1 w:1) fn force_cancel_approval() -> Weight { - (63_054_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(63_054_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_balances.rs b/runtime/parallel/src/weights/pallet_balances.rs index 6a5a1f189..38a008562 100644 --- a/runtime/parallel/src/weights/pallet_balances.rs +++ b/runtime/parallel/src/weights/pallet_balances.rs @@ -31,44 +31,44 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:2) fn transfer() -> Weight { - (93_334_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(93_334_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (58_544_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(58_544_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (38_050_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(38_050_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (44_255_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(44_255_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:3 w:3) fn force_transfer() -> Weight { - (92_762_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(92_762_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (69_845_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(69_845_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (34_769_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(34_769_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_bridge.rs b/runtime/parallel/src/weights/pallet_bridge.rs index 6acb2dc75..14e05ddfb 100644 --- a/runtime/parallel/src/weights/pallet_bridge.rs +++ b/runtime/parallel/src/weights/pallet_bridge.rs @@ -32,67 +32,67 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn register_chain() -> Weight { - (32_915_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(32_915_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn unregister_chain() -> Weight { - (32_213_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(32_213_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bridge BridgeTokens (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:1) fn register_bridge_token() -> Weight { - (36_661_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_661_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bridge AssetIds (r:1 w:1) // Storage: Bridge BridgeTokens (r:0 w:1) fn unregister_bridge_token() -> Weight { - (34_383_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(34_383_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_fee() -> Weight { - (39_103_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(39_103_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_status() -> Weight { - (38_088_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(38_088_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_cap() -> Weight { - (38_428_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(38_428_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn clean_cap_accumulated_value() -> Weight { - (38_176_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(38_176_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) // Storage: System Account (r:1 w:1) fn teleport() -> Weight { - (100_605_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(100_605_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Bridge ChainNonces (r:1 w:0) // Storage: Bridge BridgeRegistry (r:1 w:1) @@ -104,8 +104,8 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: System Account (r:2 w:1) // Storage: Assets Metadata (r:1 w:0) fn materialize() -> Weight { - (161_366_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(161_366_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_crowdloans.rs b/runtime/parallel/src/weights/pallet_crowdloans.rs index ba8dcf27e..fabf7203a 100644 --- a/runtime/parallel/src/weights/pallet_crowdloans.rs +++ b/runtime/parallel/src/weights/pallet_crowdloans.rs @@ -35,17 +35,17 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: Crowdloans NextTrieIndex (r:1 w:1) fn create_vault() -> Weight { - (61_017_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(61_017_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: ParachainSystem ValidationData (r:1 w:0) fn update_vault() -> Weight { - (49_011_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(49_011_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) @@ -66,52 +66,52 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: PolkadotXcm Queries (r:0 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - (211_135_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(211_135_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn open() -> Weight { - (46_258_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(46_258_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn close() -> Weight { - (46_173_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(46_173_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans IsVrf (r:0 w:1) fn set_vrf() -> Weight { - (24_057_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(24_057_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans ProxyAddress (r:0 w:1) fn update_proxy() -> Weight { - (25_325_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(25_325_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesBonus (r:0 w:1) fn update_leases_bonus() -> Weight { - (28_426_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(28_426_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn reopen() -> Weight { - (46_601_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(46_601_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn auction_succeeded() -> Weight { - (46_541_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(46_541_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) @@ -128,9 +128,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn auction_failed() -> Weight { - (143_462_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(143_462_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Crowdloans CTokensRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:0) @@ -140,27 +140,27 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Assets Metadata (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn claim() -> Weight { - (103_245_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(103_245_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn withdraw() -> Weight { - (86_342_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(86_342_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Crowdloans CTokensRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:2 w:2) fn redeem() -> Weight { - (121_438_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(121_438_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) @@ -177,9 +177,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn slot_expired() -> Weight { - (143_350_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(143_350_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) @@ -199,9 +199,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: unknown [0x] (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn migrate_pending() -> Weight { - (221_947_000 as Weight) - .saturating_add(T::DbWeight::get().reads(16 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(221_947_000 as u64) + .saturating_add(T::DbWeight::get().reads(16 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Crowdloans XcmRequests (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -210,9 +210,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn notification_received() -> Weight { - (130_032_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(130_032_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Assets Asset (r:1 w:1) @@ -220,17 +220,17 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: unknown [0x] (r:3 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn refund() -> Weight { - (169_835_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(169_835_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:1) // Storage: unknown [0x] (r:3 w:0) fn dissolve_vault() -> Weight { - (111_735_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(111_735_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Assets Asset (r:1 w:1) @@ -238,8 +238,8 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn refund_for() -> Weight { - (122_452_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(122_452_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_democracy.rs b/runtime/parallel/src/weights/pallet_democracy.rs deleted file mode 100644 index 9980760d7..000000000 --- a/runtime/parallel/src/weights/pallet_democracy.rs +++ /dev/null @@ -1,284 +0,0 @@ - -//! Autogenerated weights for `pallet_democracy` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-88-3-164`, CPU: `Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("parallel-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/parallel -// benchmark -// pallet -// --chain=parallel-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_democracy -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --output=./runtime/parallel/src/weights/pallet_democracy.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_democracy`. -pub struct WeightInfo(PhantomData); -impl pallet_democracy::WeightInfo for WeightInfo { - // Storage: Democracy PublicPropCount (r:1 w:1) - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - // Storage: Democracy DepositOf (r:0 w:1) - fn propose() -> Weight { - (87_200_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy DepositOf (r:1 w:1) - /// The range of component `s` is `[0, 100]`. - fn second(s: u32, ) -> Weight { - (53_942_000 as Weight) - // Standard Error: 1_000 - .saturating_add((181_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn vote_new(r: u32, ) -> Weight { - (65_548_000 as Weight) - // Standard Error: 1_000 - .saturating_add((280_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn vote_existing(r: u32, ) -> Weight { - (66_053_000 as Weight) - // Standard Error: 2_000 - .saturating_add((248_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Cancellations (r:1 w:1) - fn emergency_cancel() -> Weight { - (34_410_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy Blacklist (r:0 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:2 w:2) - /// The range of component `p` is `[1, 100]`. - fn blacklist(p: u32, ) -> Weight { - (98_033_000 as Weight) - // Standard Error: 12_000 - .saturating_add((426_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:0) - /// The range of component `v` is `[1, 100]`. - fn external_propose(v: u32, ) -> Weight { - (18_808_000 as Weight) - // Standard Error: 0 - .saturating_add((26_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_majority() -> Weight { - (7_362_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:0 w:1) - fn external_propose_default() -> Weight { - (7_345_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:1) - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn fast_track() -> Weight { - (34_628_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy NextExternal (r:1 w:1) - // Storage: Democracy Blacklist (r:1 w:1) - /// The range of component `v` is `[0, 100]`. - fn veto_external(v: u32, ) -> Weight { - (35_713_000 as Weight) - // Standard Error: 0 - .saturating_add((58_000 as Weight).saturating_mul(v as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy PublicProps (r:1 w:1) - // Storage: Democracy DepositOf (r:1 w:1) - // Storage: System Account (r:2 w:2) - /// The range of component `p` is `[1, 100]`. - fn cancel_proposal(p: u32, ) -> Weight { - (79_913_000 as Weight) - // Standard Error: 3_000 - .saturating_add((373_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:0 w:1) - fn cancel_referendum() -> Weight { - (23_871_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn cancel_queued(r: u32, ) -> Weight { - (40_425_000 as Weight) - // Standard Error: 4_000 - .saturating_add((2_845_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - /// The range of component `r` is `[1, 99]`. - fn on_initialize_base(r: u32, ) -> Weight { - (5_063_000 as Weight) - // Standard Error: 6_000 - .saturating_add((5_460_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy LowestUnbaked (r:1 w:1) - // Storage: Democracy ReferendumCount (r:1 w:0) - // Storage: Democracy LastTabledWasExternal (r:1 w:0) - // Storage: Democracy NextExternal (r:1 w:0) - // Storage: Democracy PublicProps (r:1 w:0) - // Storage: Democracy ReferendumInfoOf (r:1 w:0) - /// The range of component `r` is `[1, 99]`. - fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - (12_785_000 as Weight) - // Standard Error: 6_000 - .saturating_add((5_493_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:3 w:3) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn delegate(r: u32, ) -> Weight { - (64_946_000 as Weight) - // Standard Error: 7_000 - .saturating_add((7_486_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy VotingOf (r:2 w:2) - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn undelegate(r: u32, ) -> Weight { - (33_838_000 as Weight) - // Standard Error: 7_000 - .saturating_add((7_479_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(r as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(r as Weight))) - } - // Storage: Democracy PublicProps (r:0 w:1) - fn clear_public_proposals() -> Weight { - (8_306_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - /// The range of component `b` is `[0, 16384]`. - fn note_preimage(b: u32, ) -> Weight { - (49_752_000 as Weight) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - /// The range of component `b` is `[0, 16384]`. - fn note_imminent_preimage(b: u32, ) -> Weight { - (35_435_000 as Weight) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy Preimages (r:1 w:1) - // Storage: System Account (r:1 w:0) - /// The range of component `b` is `[0, 16384]`. - fn reap_preimage(b: u32, ) -> Weight { - (48_356_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(b as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn unlock_remove(r: u32, ) -> Weight { - (44_068_000 as Weight) - // Standard Error: 2_000 - .saturating_add((97_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy VotingOf (r:1 w:1) - // Storage: Balances Locks (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn unlock_set(r: u32, ) -> Weight { - (42_576_000 as Weight) - // Standard Error: 2_000 - .saturating_add((188_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn remove_vote(r: u32, ) -> Weight { - (27_087_000 as Weight) - // Standard Error: 3_000 - .saturating_add((179_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Democracy ReferendumInfoOf (r:1 w:1) - // Storage: Democracy VotingOf (r:1 w:1) - /// The range of component `r` is `[1, 99]`. - fn remove_other_vote(r: u32, ) -> Weight { - (26_644_000 as Weight) - // Standard Error: 2_000 - .saturating_add((189_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } -} diff --git a/runtime/parallel/src/weights/pallet_farming.rs b/runtime/parallel/src/weights/pallet_farming.rs index a9d26fcbb..f6886e24a 100644 --- a/runtime/parallel/src/weights/pallet_farming.rs +++ b/runtime/parallel/src/weights/pallet_farming.rs @@ -31,27 +31,27 @@ pub struct WeightInfo(PhantomData); impl pallet_farming::WeightInfo for WeightInfo { // Storage: Farming Pools (r:1 w:1) fn create() -> Weight { - (36_558_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(36_558_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Farming Pools (r:1 w:1) fn set_pool_status() -> Weight { - (36_132_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(36_132_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Farming Pools (r:1 w:1) fn set_pool_cool_down_duration() -> Weight { - (36_106_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(36_106_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Farming Pools (r:1 w:1) fn reset_pool_unlock_height() -> Weight { - (37_044_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(37_044_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) @@ -59,42 +59,42 @@ impl pallet_farming::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn deposit() -> Weight { - (124_253_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(124_253_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) fn withdraw() -> Weight { - (76_477_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(76_477_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Farming Pools (r:1 w:0) // Storage: Farming Positions (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn redeem() -> Weight { - (93_230_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(93_230_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn claim() -> Weight { - (112_411_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(112_411_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Farming Pools (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn dispatch_reward() -> Weight { - (105_775_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(105_775_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_identity.rs b/runtime/parallel/src/weights/pallet_identity.rs index cf46fe8f3..d91b39f21 100644 --- a/runtime/parallel/src/weights/pallet_identity.rs +++ b/runtime/parallel/src/weights/pallet_identity.rs @@ -32,48 +32,48 @@ impl pallet_identity::WeightInfo for WeightInfo { // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn add_registrar(r: u32, ) -> Weight { - (29_000_000 as Weight) + Weight::from_ref_time(29_000_000 as u64) // Standard Error: 3_000 - .saturating_add((312_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(312_000 as u64).saturating_mul(r as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[1, 100]`. fn set_identity(r: u32, x: u32, ) -> Weight { - (56_100_000 as Weight) + Weight::from_ref_time(56_100_000 as u64) // Standard Error: 13_000 - .saturating_add((330_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(330_000 as u64).saturating_mul(r as u64)) // Standard Error: 2_000 - .saturating_add((697_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(697_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity SuperOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn set_subs_new(s: u32, ) -> Weight { - (50_537_000 as Weight) + Weight::from_ref_time(50_537_000 as u64) // Standard Error: 4_000 - .saturating_add((6_277_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) + .saturating_add(Weight::from_ref_time(6_277_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity SuperOf (r:0 w:1) /// The range of component `p` is `[1, 100]`. fn set_subs_old(p: u32, ) -> Weight { - (50_994_000 as Weight) + Weight::from_ref_time(50_994_000 as u64) // Standard Error: 2_000 - .saturating_add((2_097_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(2_097_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity IdentityOf (r:1 w:1) @@ -82,81 +82,81 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `s` is `[1, 100]`. /// The range of component `x` is `[1, 100]`. fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { - (60_045_000 as Weight) + Weight::from_ref_time(60_045_000 as u64) // Standard Error: 11_000 - .saturating_add((226_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(226_000 as u64).saturating_mul(r as u64)) // Standard Error: 2_000 - .saturating_add((2_122_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(2_122_000 as u64).saturating_mul(s as u64)) // Standard Error: 2_000 - .saturating_add((351_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) + .saturating_add(Weight::from_ref_time(351_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[1, 100]`. fn request_judgement(r: u32, x: u32, ) -> Weight { - (60_566_000 as Weight) + Weight::from_ref_time(60_566_000 as u64) // Standard Error: 4_000 - .saturating_add((352_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(352_000 as u64).saturating_mul(r as u64)) // Standard Error: 0 - .saturating_add((704_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(704_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[1, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { - (56_352_000 as Weight) + Weight::from_ref_time(56_352_000 as u64) // Standard Error: 4_000 - .saturating_add((241_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(241_000 as u64).saturating_mul(r as u64)) // Standard Error: 0 - .saturating_add((705_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(705_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fee(r: u32, ) -> Weight { - (13_783_000 as Weight) + Weight::from_ref_time(13_783_000 as u64) // Standard Error: 2_000 - .saturating_add((247_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(247_000 as u64).saturating_mul(r as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_account_id(r: u32, ) -> Weight { - (14_045_000 as Weight) + Weight::from_ref_time(14_045_000 as u64) // Standard Error: 2_000 - .saturating_add((238_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(238_000 as u64).saturating_mul(r as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:1) /// The range of component `r` is `[1, 19]`. fn set_fields(r: u32, ) -> Weight { - (13_970_000 as Weight) + Weight::from_ref_time(13_970_000 as u64) // Standard Error: 2_000 - .saturating_add((238_000 as Weight).saturating_mul(r as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(238_000 as u64).saturating_mul(r as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity Registrars (r:1 w:0) // Storage: Identity IdentityOf (r:1 w:1) /// The range of component `r` is `[1, 19]`. /// The range of component `x` is `[1, 100]`. fn provide_judgement(r: u32, x: u32, ) -> Weight { - (42_057_000 as Weight) + Weight::from_ref_time(42_057_000 as u64) // Standard Error: 4_000 - .saturating_add((287_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(287_000 as u64).saturating_mul(r as u64)) // Standard Error: 0 - .saturating_add((696_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(696_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity SubsOf (r:1 w:1) // Storage: Identity IdentityOf (r:1 w:1) @@ -166,57 +166,57 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `s` is `[1, 100]`. /// The range of component `x` is `[1, 100]`. fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { - (83_554_000 as Weight) + Weight::from_ref_time(83_554_000 as u64) // Standard Error: 11_000 - .saturating_add((156_000 as Weight).saturating_mul(r as Weight)) + .saturating_add(Weight::from_ref_time(156_000 as u64).saturating_mul(r as u64)) // Standard Error: 2_000 - .saturating_add((2_112_000 as Weight).saturating_mul(s as Weight)) + .saturating_add(Weight::from_ref_time(2_112_000 as u64).saturating_mul(s as u64)) // Standard Error: 2_000 - .saturating_add((6_000 as Weight).saturating_mul(x as Weight)) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) + .saturating_add(Weight::from_ref_time(6_000 as u64).saturating_mul(x as u64)) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(s as u64))) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) /// The range of component `s` is `[1, 99]`. fn add_sub(s: u32, ) -> Weight { - (63_668_000 as Weight) + Weight::from_ref_time(63_668_000 as u64) // Standard Error: 2_000 - .saturating_add((180_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(180_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { - (23_740_000 as Weight) + Weight::from_ref_time(23_740_000 as u64) // Standard Error: 1_000 - .saturating_add((80_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(80_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Identity IdentityOf (r:1 w:0) // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { - (64_843_000 as Weight) + Weight::from_ref_time(64_843_000 as u64) // Standard Error: 1_000 - .saturating_add((170_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(170_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Identity SuperOf (r:1 w:1) // Storage: Identity SubsOf (r:1 w:1) /// The range of component `s` is `[1, 99]`. fn quit_sub(s: u32, ) -> Weight { - (45_375_000 as Weight) + Weight::from_ref_time(45_375_000 as u64) // Standard Error: 1_000 - .saturating_add((157_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(157_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_liquid_staking.rs b/runtime/parallel/src/weights/pallet_liquid_staking.rs index 324e4ede5..1851500b4 100644 --- a/runtime/parallel/src/weights/pallet_liquid_staking.rs +++ b/runtime/parallel/src/weights/pallet_liquid_staking.rs @@ -40,9 +40,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (193_284_000 as Weight) - .saturating_add(T::DbWeight::get().reads(16 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(193_284_000 as u64) + .saturating_add(T::DbWeight::get().reads(16 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: LiquidStaking ExchangeRate (r:1 w:0) // Storage: LiquidStaking Unlockings (r:1 w:1) @@ -52,9 +52,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (84_314_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(84_314_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:0) // Storage: LiquidStaking StakingLedgerCap (r:1 w:0) @@ -72,9 +72,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (138_777_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(138_777_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:0) // Storage: XcmHelper XcmWeightFee (r:1 w:0) @@ -90,9 +90,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (126_868_000 as Weight) - .saturating_add(T::DbWeight::get().reads(11 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(126_868_000 as u64) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:0) // Storage: LiquidStaking StakingLedgerCap (r:1 w:0) @@ -110,17 +110,17 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (140_629_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(140_629_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:1) // Storage: LiquidStaking IsUpdated (r:1 w:1) // Storage: LiquidStaking XcmRequests (r:1 w:0) fn force_set_staking_ledger() -> Weight { - (52_105_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(52_105_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:0) // Storage: LiquidStaking MatchingPool (r:1 w:1) @@ -137,9 +137,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (133_487_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(133_487_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: LiquidStaking StakingLedgers (r:1 w:0) // Storage: LiquidStaking MatchingPool (r:1 w:1) @@ -156,9 +156,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (132_868_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(132_868_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: LiquidStaking CurrentEra (r:1 w:0) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -175,26 +175,26 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (135_770_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(135_770_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: LiquidStaking ReserveFactor (r:1 w:1) fn update_reserve_factor() -> Weight { - (27_628_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(27_628_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: LiquidStaking CommissionRate (r:0 w:1) fn update_commission_rate() -> Weight { - (24_057_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(24_057_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: LiquidStaking StakingLedgerCap (r:1 w:1) fn update_staking_ledger_cap() -> Weight { - (27_313_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(27_313_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: LiquidStaking XcmRequests (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:1) @@ -204,9 +204,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (95_915_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(95_915_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: LiquidStaking CurrentEra (r:1 w:0) // Storage: LiquidStaking Unlockings (r:1 w:1) @@ -216,27 +216,27 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (109_948_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(109_948_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: LiquidStaking EraStartBlock (r:0 w:1) fn force_set_era_start_block() -> Weight { - (8_767_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(8_767_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: LiquidStaking CurrentEra (r:0 w:1) // Storage: LiquidStaking IsMatched (r:0 w:1) fn force_set_current_era() -> Weight { - (10_220_000 as Weight) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(10_220_000 as u64) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: LiquidStaking IsMatched (r:1 w:0) // Storage: LiquidStaking EraStartBlock (r:1 w:0) fn on_initialize() -> Weight { - (12_855_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) + Weight::from_ref_time(12_855_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) } // Storage: LiquidStaking StakingLedgers (r:7 w:0) // Storage: LiquidStaking MatchingPool (r:1 w:1) @@ -260,9 +260,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (341_121_000 as Weight) - .saturating_add(T::DbWeight::get().reads(25 as Weight)) - .saturating_add(T::DbWeight::get().writes(14 as Weight)) + Weight::from_ref_time(341_121_000 as u64) + .saturating_add(T::DbWeight::get().reads(25 as u64)) + .saturating_add(T::DbWeight::get().writes(14 as u64)) } // Storage: LiquidStaking StakingLedgers (r:7 w:0) // Storage: LiquidStaking MatchingPool (r:1 w:1) @@ -282,27 +282,27 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (288_269_000 as Weight) - .saturating_add(T::DbWeight::get().reads(21 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(288_269_000 as u64) + .saturating_add(T::DbWeight::get().reads(21 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: LiquidStaking TotalReserves (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn reduce_reserves() -> Weight { - (86_375_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(86_375_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: LiquidStaking FastUnstakeRequests (r:1 w:1) // Storage: Assets Metadata (r:1 w:0) // Storage: Assets Asset (r:1 w:0) // Storage: Assets Account (r:1 w:0) fn cancel_unstake() -> Weight { - (52_318_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(52_318_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: LiquidStaking FastUnstakeRequests (r:1 w:1) // Storage: Assets Metadata (r:2 w:0) @@ -313,12 +313,12 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (59_217_000 as Weight) + Weight::from_ref_time(59_217_000 as u64) // Standard Error: 53_000 - .saturating_add((129_142_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) - .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(n as Weight))) + .saturating_add(Weight::from_ref_time(129_142_000 as u64).saturating_mul(n as u64)) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().writes(6 as u64)) + .saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(n as u64))) } } diff --git a/runtime/parallel/src/weights/pallet_loans.rs b/runtime/parallel/src/weights/pallet_loans.rs index 6adb2abd9..2cbd7bb37 100644 --- a/runtime/parallel/src/weights/pallet_loans.rs +++ b/runtime/parallel/src/weights/pallet_loans.rs @@ -34,46 +34,46 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans ExchangeRate (r:0 w:1) // Storage: Loans BorrowIndex (r:0 w:1) fn add_market() -> Weight { - (45_400_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(45_400_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Loans Markets (r:1 w:1) fn activate_market() -> Weight { - (31_577_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_577_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Loans Markets (r:1 w:1) fn update_rate_model() -> Weight { - (32_396_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(32_396_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Loans Markets (r:1 w:1) fn update_market() -> Weight { - (34_702_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(34_702_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Loans UnderlyingAssetId (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn force_update_market() -> Weight { - (40_868_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(40_868_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn add_reward() -> Weight { - (73_116_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(73_116_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn withdraw_missing_reward() -> Weight { - (58_778_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(58_778_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Loans RewardSupplySpeed (r:1 w:1) @@ -81,9 +81,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplyState (r:1 w:1) // Storage: Loans RewardBorrowState (r:1 w:1) fn update_market_reward_speed() -> Weight { - (63_448_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(63_448_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Loans RewardSupplyState (r:1 w:1) @@ -100,9 +100,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward() -> Weight { - (174_691_000 as Weight) - .saturating_add(T::DbWeight::get().reads(15 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(174_691_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Loans RewardSupplyState (r:1 w:1) // Storage: Loans RewardSupplySpeed (r:1 w:0) @@ -118,9 +118,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward_for_market() -> Weight { - (159_725_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(159_725_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Assets Account (r:2 w:2) @@ -138,9 +138,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountEarned (r:1 w:1) // Storage: System Account (r:1 w:1) fn mint() -> Weight { - (186_065_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(186_065_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -161,9 +161,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardAccured (r:1 w:1) // Storage: Loans BorrowIndex (r:1 w:0) fn borrow() -> Weight { - (262_684_000 as Weight) - .saturating_add(T::DbWeight::get().reads(23 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(262_684_000 as u64) + .saturating_add(T::DbWeight::get().reads(23 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -180,9 +180,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplierIndex (r:1 w:1) // Storage: Loans RewardAccured (r:1 w:1) fn redeem() -> Weight { - (206_621_000 as Weight) - .saturating_add(T::DbWeight::get().reads(16 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(206_621_000 as u64) + .saturating_add(T::DbWeight::get().reads(16 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -200,9 +200,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardAccured (r:1 w:1) // Storage: System Account (r:1 w:1) fn redeem_all() -> Weight { - (220_747_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(220_747_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -217,9 +217,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow() -> Weight { - (166_815_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(166_815_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -234,16 +234,16 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow_all() -> Weight { - (182_978_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(182_978_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Loans AccountDeposits (r:1 w:1) fn collateral_asset() -> Weight { - (65_091_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(65_091_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Loans LiquidationFreeCollaterals (r:1 w:0) // Storage: Timestamp Now (r:1 w:0) @@ -267,9 +267,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplySpeed (r:1 w:0) // Storage: Loans RewardSupplierIndex (r:3 w:3) fn liquidate_borrow() -> Weight { - (491_170_000 as Weight) - .saturating_add(T::DbWeight::get().reads(42 as Weight)) - .saturating_add(T::DbWeight::get().writes(19 as Weight)) + Weight::from_ref_time(491_170_000 as u64) + .saturating_add(T::DbWeight::get().reads(42 as u64)) + .saturating_add(T::DbWeight::get().writes(19 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Assets Asset (r:1 w:1) @@ -277,23 +277,23 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Loans TotalReserves (r:1 w:1) fn add_reserves() -> Weight { - (106_926_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(106_926_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Loans Markets (r:2 w:0) // Storage: Loans TotalReserves (r:1 w:1) // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn reduce_reserves() -> Weight { - (95_062_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(95_062_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Loans LiquidationFreeCollaterals (r:1 w:1) fn update_liquidation_free_collateral() -> Weight { - (27_986_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(27_986_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_membership.rs b/runtime/parallel/src/weights/pallet_membership.rs index f90e1ebc9..d8c757fb3 100644 --- a/runtime/parallel/src/weights/pallet_membership.rs +++ b/runtime/parallel/src/weights/pallet_membership.rs @@ -35,11 +35,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { - (34_232_000 as Weight) + Weight::from_ref_time(34_232_000 as u64) // Standard Error: 1_000 - .saturating_add((72_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(72_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -48,11 +48,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { - (39_073_000 as Weight) + Weight::from_ref_time(39_073_000 as u64) // Standard Error: 0 - .saturating_add((62_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(62_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -61,11 +61,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { - (39_273_000 as Weight) + Weight::from_ref_time(39_273_000 as u64) // Standard Error: 0 - .saturating_add((80_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(80_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -74,11 +74,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { - (39_125_000 as Weight) + Weight::from_ref_time(39_125_000 as u64) // Standard Error: 1_000 - .saturating_add((231_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(231_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -87,30 +87,30 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { - (40_740_000 as Weight) + Weight::from_ref_time(40_740_000 as u64) // Standard Error: 1_000 - .saturating_add((76_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + .saturating_add(Weight::from_ref_time(76_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:0) // Storage: TechnicalCommitteeMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { - (13_220_000 as Weight) + Weight::from_ref_time(13_220_000 as u64) // Standard Error: 0 - .saturating_add((23_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(23_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: TechnicalCommitteeMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) /// The range of component `m` is `[1, 100]`. fn clear_prime(m: u32, ) -> Weight { - (8_382_000 as Weight) + Weight::from_ref_time(8_382_000 as u64) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_multisig.rs b/runtime/parallel/src/weights/pallet_multisig.rs deleted file mode 100644 index 8efe6a5be..000000000 --- a/runtime/parallel/src/weights/pallet_multisig.rs +++ /dev/null @@ -1,145 +0,0 @@ - -//! Autogenerated weights for `pallet_multisig` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-88-3-164`, CPU: `Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("parallel-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/parallel -// benchmark -// pallet -// --chain=parallel-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_multisig -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --output=./runtime/parallel/src/weights/pallet_multisig.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_multisig`. -pub struct WeightInfo(PhantomData); -impl pallet_multisig::WeightInfo for WeightInfo { - /// The range of component `z` is `[0, 10000]`. - fn as_multi_threshold_1(z: u32, ) -> Weight { - (31_651_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - /// The range of component `s` is `[2, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (62_322_000 as Weight) - // Standard Error: 1_000 - .saturating_add((189_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - /// The range of component `s` is `[2, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (69_770_000 as Weight) - // Standard Error: 2_000 - .saturating_add((176_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - /// The range of component `s` is `[3, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (42_106_000 as Weight) - // Standard Error: 1_000 - .saturating_add((154_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - /// The range of component `s` is `[3, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (66_683_000 as Weight) - // Standard Error: 2_000 - .saturating_add((173_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `s` is `[2, 100]`. - /// The range of component `z` is `[0, 10000]`. - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (83_608_000 as Weight) - // Standard Error: 1_000 - .saturating_add((220_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - /// The range of component `s` is `[2, 100]`. - fn approve_as_multi_create(s: u32, ) -> Weight { - (58_915_000 as Weight) - // Standard Error: 2_000 - .saturating_add((193_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) - /// The range of component `s` is `[2, 100]`. - fn approve_as_multi_approve(s: u32, ) -> Weight { - (37_822_000 as Weight) - // Standard Error: 1_000 - .saturating_add((181_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `s` is `[2, 100]`. - fn approve_as_multi_complete(s: u32, ) -> Weight { - (105_264_000 as Weight) - // Standard Error: 2_000 - .saturating_add((229_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - /// The range of component `s` is `[2, 100]`. - fn cancel_as_multi(s: u32, ) -> Weight { - (82_816_000 as Weight) - // Standard Error: 1_000 - .saturating_add((190_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } -} diff --git a/runtime/parallel/src/weights/pallet_preimage.rs b/runtime/parallel/src/weights/pallet_preimage.rs index 6c6ed548a..beb598ab0 100644 --- a/runtime/parallel/src/weights/pallet_preimage.rs +++ b/runtime/parallel/src/weights/pallet_preimage.rs @@ -33,88 +33,88 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Storage: Preimage StatusFor (r:1 w:1) /// The range of component `s` is `[0, 4194304]`. fn note_preimage(s: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) /// The range of component `s` is `[0, 4194304]`. fn note_requested_preimage(s: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage PreimageFor (r:1 w:1) // Storage: Preimage StatusFor (r:1 w:0) /// The range of component `s` is `[0, 4194304]`. fn note_no_deposit_preimage(s: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(3_000 as u64).saturating_mul(s as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_preimage() -> Weight { - (93_901_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(93_901_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unnote_no_deposit_preimage() -> Weight { - (64_822_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(64_822_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_preimage() -> Weight { - (85_377_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(85_377_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_no_deposit_preimage() -> Weight { - (59_246_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(59_246_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_unnoted_preimage() -> Weight { - (36_162_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(36_162_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn request_requested_preimage() -> Weight { - (13_853_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(13_853_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_preimage() -> Weight { - (54_647_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(54_647_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) // Storage: Preimage PreimageFor (r:0 w:1) fn unrequest_unnoted_preimage() -> Weight { - (33_353_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(33_353_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Preimage StatusFor (r:1 w:1) fn unrequest_multi_referenced_preimage() -> Weight { - (13_312_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(13_312_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_proxy.rs b/runtime/parallel/src/weights/pallet_proxy.rs deleted file mode 100644 index 22c20b8be..000000000 --- a/runtime/parallel/src/weights/pallet_proxy.rs +++ /dev/null @@ -1,140 +0,0 @@ - -//! Autogenerated weights for `pallet_proxy` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-88-3-164`, CPU: `Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("parallel-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/parallel -// benchmark -// pallet -// --chain=parallel-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_proxy -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --output=./runtime/parallel/src/weights/pallet_proxy.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_proxy`. -pub struct WeightInfo(PhantomData); -impl pallet_proxy::WeightInfo for WeightInfo { - // Storage: Proxy Proxies (r:1 w:0) - /// The range of component `p` is `[1, 31]`. - fn proxy(p: u32, ) -> Weight { - (33_863_000 as Weight) - // Standard Error: 2_000 - .saturating_add((91_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:0) - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn proxy_announced(a: u32, p: u32, ) -> Weight { - (64_741_000 as Weight) - // Standard Error: 2_000 - .saturating_add((303_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 2_000 - .saturating_add((96_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { - (43_446_000 as Weight) - // Standard Error: 2_000 - .saturating_add((305_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 2_000 - .saturating_add((33_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn reject_announcement(a: u32, p: u32, ) -> Weight { - (43_487_000 as Weight) - // Standard Error: 2_000 - .saturating_add((301_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 2_000 - .saturating_add((32_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:0) - // Storage: Proxy Announcements (r:1 w:1) - // Storage: System Account (r:1 w:1) - /// The range of component `a` is `[0, 31]`. - /// The range of component `p` is `[1, 31]`. - fn announce(a: u32, p: u32, ) -> Weight { - (58_498_000 as Weight) - // Standard Error: 2_000 - .saturating_add((277_000 as Weight).saturating_mul(a as Weight)) - // Standard Error: 2_000 - .saturating_add((93_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:1) - /// The range of component `p` is `[1, 31]`. - fn add_proxy(p: u32, ) -> Weight { - (49_478_000 as Weight) - // Standard Error: 2_000 - .saturating_add((133_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:1) - /// The range of component `p` is `[1, 31]`. - fn remove_proxy(p: u32, ) -> Weight { - (48_989_000 as Weight) - // Standard Error: 3_000 - .saturating_add((151_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:1) - /// The range of component `p` is `[1, 31]`. - fn remove_proxies(p: u32, ) -> Weight { - (41_068_000 as Weight) - // Standard Error: 2_000 - .saturating_add((90_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - // Storage: Proxy Proxies (r:1 w:1) - /// The range of component `p` is `[1, 31]`. - fn anonymous(p: u32, ) -> Weight { - (54_803_000 as Weight) - // Standard Error: 2_000 - .saturating_add((41_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Proxy Proxies (r:1 w:1) - /// The range of component `p` is `[0, 30]`. - fn kill_anonymous(p: u32, ) -> Weight { - (42_501_000 as Weight) - // Standard Error: 2_000 - .saturating_add((106_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } -} diff --git a/runtime/parallel/src/weights/pallet_router.rs b/runtime/parallel/src/weights/pallet_router.rs index 6a0501fb0..76d565c2d 100644 --- a/runtime/parallel/src/weights/pallet_router.rs +++ b/runtime/parallel/src/weights/pallet_router.rs @@ -33,16 +33,16 @@ impl pallet_router::WeightInfo for WeightInfo { // Storage: Assets Account (r:4 w:4) // Storage: AMM Pools (r:1 w:1) fn swap_exact_tokens_for_tokens() -> Weight { - (154_252_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(154_252_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: AMM Pools (r:1 w:1) // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:4 w:4) fn swap_tokens_for_exact_tokens() -> Weight { - (154_703_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(154_703_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_scheduler.rs b/runtime/parallel/src/weights/pallet_scheduler.rs deleted file mode 100644 index bc83c2030..000000000 --- a/runtime/parallel/src/weights/pallet_scheduler.rs +++ /dev/null @@ -1,192 +0,0 @@ - -//! Autogenerated weights for `pallet_scheduler` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-10-20, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! HOSTNAME: `ip-172-88-3-164`, CPU: `Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("parallel-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/parallel -// benchmark -// pallet -// --chain=parallel-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_scheduler -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --output=./runtime/parallel/src/weights/pallet_scheduler.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_scheduler`. -pub struct WeightInfo(PhantomData); -impl pallet_scheduler::WeightInfo for WeightInfo { - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic_named_resolved(s: u32, ) -> Weight { - (16_051_000 as Weight) - // Standard Error: 22_000 - .saturating_add((44_027_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_named_resolved(s: u32, ) -> Weight { - (13_256_000 as Weight) - // Standard Error: 21_000 - .saturating_add((35_049_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic_resolved(s: u32, ) -> Weight { - (13_373_000 as Weight) - // Standard Error: 26_000 - .saturating_add((38_365_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Preimage PreimageFor (r:1 w:1) - // Storage: Preimage StatusFor (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_resolved(s: u32, ) -> Weight { - (11_967_000 as Weight) - // Standard Error: 20_000 - .saturating_add((32_769_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_named_aborted(s: u32, ) -> Weight { - (9_145_000 as Weight) - // Standard Error: 13_000 - .saturating_add((15_021_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Preimage PreimageFor (r:1 w:0) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_aborted(s: u32, ) -> Weight { - (9_852_000 as Weight) - // Standard Error: 12_000 - .saturating_add((9_819_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Agenda (r:2 w:2) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic_named(s: u32, ) -> Weight { - (22_423_000 as Weight) - // Standard Error: 17_000 - .saturating_add((25_226_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:2 w:2) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_periodic(s: u32, ) -> Weight { - (20_333_000 as Weight) - // Standard Error: 15_000 - .saturating_add((19_645_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(s as Weight))) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize_named(s: u32, ) -> Weight { - (20_591_000 as Weight) - // Standard Error: 12_000 - .saturating_add((16_547_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(s as Weight))) - } - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn on_initialize(s: u32, ) -> Weight { - (20_513_000 as Weight) - // Standard Error: 12_000 - .saturating_add((14_219_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 50]`. - fn schedule(s: u32, ) -> Weight { - (33_655_000 as Weight) - // Standard Error: 2_000 - .saturating_add((158_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Scheduler Agenda (r:1 w:1) - // Storage: Scheduler Lookup (r:0 w:1) - /// The range of component `s` is `[1, 50]`. - fn cancel(s: u32, ) -> Weight { - (32_714_000 as Weight) - // Standard Error: 5_000 - .saturating_add((2_791_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[0, 50]`. - fn schedule_named(s: u32, ) -> Weight { - (39_792_000 as Weight) - // Standard Error: 2_000 - .saturating_add((184_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Scheduler Lookup (r:1 w:1) - // Storage: Scheduler Agenda (r:1 w:1) - /// The range of component `s` is `[1, 50]`. - fn cancel_named(s: u32, ) -> Weight { - (34_763_000 as Weight) - // Standard Error: 5_000 - .saturating_add((2_808_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } -} diff --git a/runtime/parallel/src/weights/pallet_streaming.rs b/runtime/parallel/src/weights/pallet_streaming.rs index 4d33f5d46..1a438752d 100644 --- a/runtime/parallel/src/weights/pallet_streaming.rs +++ b/runtime/parallel/src/weights/pallet_streaming.rs @@ -38,9 +38,9 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: Streaming StreamLibrary (r:4 w:4) // Storage: Streaming Streams (r:0 w:1) fn create() -> Weight { - (125_839_000 as Weight) - .saturating_add(T::DbWeight::get().reads(11 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(125_839_000 as u64) + .saturating_add(T::DbWeight::get().reads(11 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: Streaming Streams (r:1 w:1) // Storage: Timestamp Now (r:1 w:0) @@ -49,9 +49,9 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Streaming StreamLibrary (r:2 w:2) fn cancel() -> Weight { - (124_784_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(124_784_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: Streaming Streams (r:1 w:1) // Storage: Timestamp Now (r:1 w:0) @@ -59,13 +59,13 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn withdraw() -> Weight { - (100_181_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(100_181_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: Streaming MinimumDeposits (r:0 w:1) fn set_minimum_deposit() -> Weight { - (25_529_000 as Weight) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(25_529_000 as u64) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_timestamp.rs b/runtime/parallel/src/weights/pallet_timestamp.rs index 65ccfa70e..89c4ad082 100644 --- a/runtime/parallel/src/weights/pallet_timestamp.rs +++ b/runtime/parallel/src/weights/pallet_timestamp.rs @@ -31,11 +31,11 @@ pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - (12_648_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(12_648_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (4_694_000 as Weight) + Weight::from_ref_time(4_694_000 as u64) } } diff --git a/runtime/parallel/src/weights/pallet_treasury.rs b/runtime/parallel/src/weights/pallet_treasury.rs index adbf43b6b..842113425 100644 --- a/runtime/parallel/src/weights/pallet_treasury.rs +++ b/runtime/parallel/src/weights/pallet_treasury.rs @@ -30,49 +30,49 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_treasury::WeightInfo for WeightInfo { fn spend() -> Weight { - (394_000 as Weight) + Weight::from_ref_time(394_000 as u64) } // Storage: Treasury ProposalCount (r:1 w:1) // Storage: Treasury Proposals (r:0 w:1) fn propose_spend() -> Weight { - (48_428_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(48_428_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Treasury Proposals (r:1 w:1) // Storage: System Account (r:1 w:1) fn reject_proposal() -> Weight { - (53_189_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(53_189_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Treasury Proposals (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { - (19_177_000 as Weight) + Weight::from_ref_time(19_177_000 as u64) // Standard Error: 1_000 - .saturating_add((188_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + .saturating_add(Weight::from_ref_time(188_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Treasury Approvals (r:1 w:1) fn remove_approval() -> Weight { - (12_280_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(12_280_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:0) // Storage: Treasury Approvals (r:1 w:1) // Storage: Treasury Proposals (r:2 w:2) /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { - (39_439_000 as Weight) + Weight::from_ref_time(39_439_000 as u64) // Standard Error: 19_000 - .saturating_add((57_799_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(p as Weight))) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - .saturating_add(T::DbWeight::get().writes((3 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(57_799_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().reads((3 as u64).saturating_mul(p as u64))) + .saturating_add(T::DbWeight::get().writes(2 as u64)) + .saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/parallel/src/weights/pallet_utility.rs b/runtime/parallel/src/weights/pallet_utility.rs index d902720ca..225654bd5 100644 --- a/runtime/parallel/src/weights/pallet_utility.rs +++ b/runtime/parallel/src/weights/pallet_utility.rs @@ -31,26 +31,26 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(c: u32, ) -> Weight { - (31_614_000 as Weight) + Weight::from_ref_time(31_614_000 as u64) // Standard Error: 3_000 - .saturating_add((8_819_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(8_819_000 as u64).saturating_mul(c as u64)) } fn as_derivative() -> Weight { - (11_701_000 as Weight) + Weight::from_ref_time(11_701_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn batch_all(c: u32, ) -> Weight { - (30_824_000 as Weight) + Weight::from_ref_time(30_824_000 as u64) // Standard Error: 2_000 - .saturating_add((9_227_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(9_227_000 as u64).saturating_mul(c as u64)) } fn dispatch_as() -> Weight { - (25_158_000 as Weight) + Weight::from_ref_time(25_158_000 as u64) } /// The range of component `c` is `[0, 1000]`. fn force_batch(c: u32, ) -> Weight { - (26_969_000 as Weight) + Weight::from_ref_time(26_969_000 as u64) // Standard Error: 2_000 - .saturating_add((8_786_000 as Weight).saturating_mul(c as Weight)) + .saturating_add(Weight::from_ref_time(8_786_000 as u64).saturating_mul(c as u64)) } } diff --git a/runtime/parallel/src/weights/pallet_xcm_helper.rs b/runtime/parallel/src/weights/pallet_xcm_helper.rs index f880a0498..c3c462f9b 100644 --- a/runtime/parallel/src/weights/pallet_xcm_helper.rs +++ b/runtime/parallel/src/weights/pallet_xcm_helper.rs @@ -31,8 +31,8 @@ pub struct WeightInfo(PhantomData); impl pallet_xcm_helper::WeightInfo for WeightInfo { // Storage: XcmHelper XcmWeightFee (r:1 w:1) fn update_xcm_weight_fee() -> Weight { - (28_547_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(28_547_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/vanilla/Cargo.toml b/runtime/vanilla/Cargo.toml index cf3b8a017..8528c8ad8 100644 --- a/runtime/vanilla/Cargo.toml +++ b/runtime/vanilla/Cargo.toml @@ -20,64 +20,64 @@ smallvec = '1.6.1' static_assertions = '1.1.0' # Substrate dependencies -frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-executive = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -frame-try-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false, optional = true } -pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-collective = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-democracy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-identity = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-proxy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-scheduler = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-treasury = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-executive = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +frame-try-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false, optional = true } +pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-collective = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-democracy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-identity = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-membership = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-multisig = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-preimage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-proxy = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-scheduler = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-treasury = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } scale-info = { version = '2.1', default-features = false, features = ['derive'] } -sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-version = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } # Polkadot dependencies -pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.28', default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.32', default-features = false } # Cumulus dependencies -cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } -parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.28', default-features = false } +cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } +parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.32', default-features = false } # ORML dependencies orml-oracle = { version = '0.4.1-dev', default-features = false } @@ -126,11 +126,11 @@ pallet-xcm-helper = { path = '../../pallets/xcm-helper', defa primitives = { package = 'parallel-primitives', path = '../../primitives', default-features = false } [build-dependencies.substrate-wasm-builder] -branch = 'polkadot-v0.9.28' +branch = 'polkadot-v0.9.32' git = 'https://github.com/paritytech/substrate.git' [dev-dependencies] -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } [features] default = ['std'] @@ -138,7 +138,7 @@ runtime-benchmarks = [ 'sp-runtime/runtime-benchmarks', 'frame-benchmarking', 'frame-support/runtime-benchmarks', - 'frame-system-benchmarking', + 'frame-system-benchmarking/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'pallet-ethereum/runtime-benchmarks', 'pallet-bridge/runtime-benchmarks', @@ -245,7 +245,6 @@ std = [ 'pallet-amm/std', 'pallet-crowdloans/std', 'pallet-router/std', - 'frame-try-runtime/std', 'pallet-currency-adapter/std', 'pallet-farming/std', 'pallet-crowdloans/std', @@ -277,6 +276,21 @@ try-runtime = [ 'pallet-scheduler/try-runtime', 'pallet-preimage/try-runtime', 'polkadot-runtime-common/try-runtime', + 'pallet-proxy/try-runtime', + 'pallet-xcm/try-runtime', + 'parachain-info/try-runtime', + 'pallet-collator-selection/try-runtime', + 'cumulus-pallet-xcmp-queue/try-runtime', + 'cumulus-pallet-dmp-queue/try-runtime', + 'cumulus-pallet-xcm/try-runtime', + 'cumulus-pallet-aura-ext/try-runtime', + 'cumulus-pallet-parachain-system/try-runtime', + 'pallet-crowdloans/try-runtime', + 'pallet-amm/try-runtime', + 'pallet-router/try-runtime', + 'pallet-currency-adapter/try-runtime', + 'pallet-emergency-shutdown/try-runtime', + 'pallet-farming/try-runtime', 'pallet-session/try-runtime', 'pallet-assets/try-runtime', 'pallet-authorship/try-runtime', @@ -291,9 +305,10 @@ try-runtime = [ 'pallet-prices/try-runtime', 'pallet-crowdloans/try-runtime', 'pallet-xcm-helper/try-runtime', + 'pallet-stableswap/try-runtime', 'pallet-asset-registry/try-runtime', 'pallet-ethereum/try-runtime', + 'pallet-evm/try-runtime', + 'pallet-base-fee/try-runtime', + 'pallet-evm-signatures/try-runtime', ] - -[package.metadata.cargo-udeps.ignore] -normal = ['frame-try-runtime'] diff --git a/runtime/vanilla/src/constants.rs b/runtime/vanilla/src/constants.rs index 8815e345c..b5a4b54f0 100644 --- a/runtime/vanilla/src/constants.rs +++ b/runtime/vanilla/src/constants.rs @@ -73,7 +73,7 @@ pub mod fee { fn polynomial() -> WeightToFeeCoefficients { // in vanilla, extrinsic base weight (smallest non-zero weight) is mapped to 12 CENTS let p = super::currency::CENTS * 12; - let q = Balance::from(ExtrinsicBaseWeight::get()); + let q = Balance::from(ExtrinsicBaseWeight::get().ref_time()); smallvec![WeightToFeeCoefficient { degree: 1, negative: false, diff --git a/runtime/vanilla/src/lib.rs b/runtime/vanilla/src/lib.rs index afa1e6caa..9e84299f8 100644 --- a/runtime/vanilla/src/lib.rs +++ b/runtime/vanilla/src/lib.rs @@ -19,7 +19,7 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::{ construct_runtime, - dispatch::{DispatchResult, Weight}, + dispatch::{DispatchClass, DispatchResult, Weight}, log, match_types, parameter_types, traits::{ fungibles::{InspectMetadata, Mutate}, @@ -29,7 +29,7 @@ use frame_support::{ }, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - ConstantMultiplier, DispatchClass, + ConstantMultiplier, }, ConsensusEngineId, PalletId, WeakBoundedVec, }; @@ -212,7 +212,9 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 500 ms of compute with parachain block. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2; +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) + .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! { pub const BlockHashCount: BlockNumber = 250; @@ -241,101 +243,101 @@ parameter_types! { } pub struct WhiteListFilter; -impl Contains for WhiteListFilter { - fn contains(call: &Call) -> bool { +impl Contains for WhiteListFilter { + fn contains(call: &RuntimeCall) -> bool { matches!( call, // System, Currencies - Call::System(_) | - Call::Timestamp(_) | - Call::Assets(pallet_assets::Call::force_create { .. }) | - Call::Assets(pallet_assets::Call::force_set_metadata { .. }) | - Call::Assets(pallet_assets::Call::force_asset_status { .. }) | + RuntimeCall::System(_) | + RuntimeCall::Timestamp(_) | + RuntimeCall::Assets(pallet_assets::Call::force_create { .. }) | + RuntimeCall::Assets(pallet_assets::Call::force_set_metadata { .. }) | + RuntimeCall::Assets(pallet_assets::Call::force_asset_status { .. }) | // Governance - Call::Sudo(_) | - Call::Democracy(_) | - Call::GeneralCouncil(_) | - Call::TechnicalCommittee(_) | - Call::Treasury(_) | - Call::Scheduler(_) | - Call::Preimage(_) | + RuntimeCall::Sudo(_) | + RuntimeCall::Democracy(_) | + RuntimeCall::GeneralCouncil(_) | + RuntimeCall::TechnicalCommittee(_) | + RuntimeCall::Treasury(_) | + RuntimeCall::Scheduler(_) | + RuntimeCall::Preimage(_) | // Parachain - Call::ParachainSystem(_) | - Call::XcmpQueue(_) | - Call::DmpQueue(_) | - Call::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_default_xcm_version { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_subscribe_version_notify { .. }) | - Call::PolkadotXcm(pallet_xcm::Call::force_unsubscribe_version_notify { .. }) | - Call::CumulusXcm(_) | + RuntimeCall::ParachainSystem(_) | + RuntimeCall::XcmpQueue(_) | + RuntimeCall::DmpQueue(_) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_xcm_version { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_default_xcm_version { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_subscribe_version_notify { .. }) | + RuntimeCall::PolkadotXcm(pallet_xcm::Call::force_unsubscribe_version_notify { .. }) | + RuntimeCall::CumulusXcm(_) | // Consensus - Call::Authorship(_) | - Call::CollatorSelection(_) | - Call::Session(_) | + RuntimeCall::Authorship(_) | + RuntimeCall::CollatorSelection(_) | + RuntimeCall::Session(_) | // Utility - Call::Multisig(_) | - Call::Utility(_) | - Call::Proxy(_) | - Call::Identity(_) | - Call::EmergencyShutdown(_) | - Call::XcmHelper(_) | + RuntimeCall::Multisig(_) | + RuntimeCall::Utility(_) | + RuntimeCall::Proxy(_) | + RuntimeCall::Identity(_) | + RuntimeCall::EmergencyShutdown(_) | + RuntimeCall::XcmHelper(_) | // Membership - Call::GeneralCouncilMembership(_) | - Call::TechnicalCommitteeMembership(_) | - Call::OracleMembership(_) | - Call::BridgeMembership(_) | - Call::CrowdloansAutomatorsMembership(_) | - Call::LiquidStakingAgentsMembership(_) + RuntimeCall::GeneralCouncilMembership(_) | + RuntimeCall::TechnicalCommitteeMembership(_) | + RuntimeCall::OracleMembership(_) | + RuntimeCall::BridgeMembership(_) | + RuntimeCall::CrowdloansAutomatorsMembership(_) | + RuntimeCall::LiquidStakingAgentsMembership(_) ) } } pub struct BaseCallFilter; -impl Contains for BaseCallFilter { - fn contains(call: &Call) -> bool { +impl Contains for BaseCallFilter { + fn contains(call: &RuntimeCall) -> bool { (WhiteListFilter::contains(call) || matches!( call, // System, Currencies - Call::Balances(_) | - Call::Assets(pallet_assets::Call::mint { .. }) | - Call::Assets(pallet_assets::Call::transfer { .. }) | - Call::Assets(pallet_assets::Call::transfer_keep_alive { .. }) | - Call::Assets(pallet_assets::Call::freeze { .. }) | - Call::Assets(pallet_assets::Call::thaw { .. }) | - Call::Assets(pallet_assets::Call::freeze_asset { .. }) | - Call::Assets(pallet_assets::Call::thaw_asset { .. }) | - Call::Assets(pallet_assets::Call::burn { .. }) | - Call::Assets(pallet_assets::Call::destroy { .. }) | - Call::CurrencyAdapter(_) | + RuntimeCall::Balances(_) | + RuntimeCall::Assets(pallet_assets::Call::mint { .. }) | + RuntimeCall::Assets(pallet_assets::Call::transfer { .. }) | + RuntimeCall::Assets(pallet_assets::Call::transfer_keep_alive { .. }) | + RuntimeCall::Assets(pallet_assets::Call::freeze { .. }) | + RuntimeCall::Assets(pallet_assets::Call::thaw { .. }) | + RuntimeCall::Assets(pallet_assets::Call::freeze_asset { .. }) | + RuntimeCall::Assets(pallet_assets::Call::thaw_asset { .. }) | + RuntimeCall::Assets(pallet_assets::Call::burn { .. }) | + RuntimeCall::Assets(pallet_assets::Call::destroy { .. }) | + RuntimeCall::CurrencyAdapter(_) | // 3rd Party - Call::Oracle(_) | - Call::XTokens(_) | - Call::OrmlXcm(_) | - Call::Vesting(_) | + RuntimeCall::Oracle(_) | + RuntimeCall::XTokens(_) | + RuntimeCall::OrmlXcm(_) | + RuntimeCall::Vesting(_) | // Loans - Call::Loans(_) | - Call::Prices(_) | + RuntimeCall::Loans(_) | + RuntimeCall::Prices(_) | // LiquidStaking - Call::LiquidStaking(_) | + RuntimeCall::LiquidStaking(_) | // AMM - Call::AMM(_) | - Call::AMMRoute(_) | + RuntimeCall::AMM(_) | + RuntimeCall::AMMRoute(_) | // Crowdloans - Call::Crowdloans(_) | + RuntimeCall::Crowdloans(_) | // Bridge - Call::Bridge(_) | + RuntimeCall::Bridge(_) | // Farming - Call::Farming(_) | + RuntimeCall::Farming(_) | // Streaming - Call::Streaming(_) | + RuntimeCall::Streaming(_) | // Asset Management - Call::AssetRegistry(_) | + RuntimeCall::AssetRegistry(_) | // EVM - Call::EVM(_) | - Call::Ethereum(_) | - Call::BaseFee(_) | - Call::EVMSignatureCall(_) + RuntimeCall::EVM(_) | + RuntimeCall::Ethereum(_) | + RuntimeCall::BaseFee(_) | + RuntimeCall::EVMSignatureCall(_) )) && EmergencyShutdown::contains(call) } @@ -351,7 +353,7 @@ impl frame_system::Config for Runtime { /// The identifier used to distinguish between accounts. type AccountId = AccountId; /// The aggregated dispatch type that is available for extrinsics. - type Call = Call; + type RuntimeCall = RuntimeCall; /// The lookup mechanism to get account ID from whatever is passed in dispatchers. type Lookup = AccountIdLookup; /// The index type for storing how many extrinsics an account has signed. @@ -365,9 +367,9 @@ impl frame_system::Config for Runtime { /// The header type. type Header = generic::Header; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; /// The ubiquitous origin type. - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; /// The weight of database operations that the runtime can invoke. @@ -398,7 +400,7 @@ parameter_types! { } impl orml_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SovereignOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; } @@ -408,20 +410,20 @@ parameter_types! { parameter_types! { pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into()))); - pub const BaseXcmWeight: Weight = 150_000_000; + pub const BaseXcmWeight: u64 = 150_000_000; pub const MaxInstructions: u32 = 100; pub const MaxAssetsForTransfer: usize = 2; } impl orml_xtokens::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type CurrencyId = CurrencyId; type CurrencyIdConvert = CurrencyIdConvert; type AccountIdToMultiLocation = AccountIdToMultiLocation; type SelfLocation = SelfLocation; type XcmExecutor = XcmExecutor; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type BaseXcmWeight = BaseXcmWeight; type LocationInverter = LocationInverter; type MaxAssetsForTransfer = MaxAssetsForTransfer; @@ -462,7 +464,7 @@ impl AddressToAssetId for Runtime { } impl pallet_assets::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type Currency = Balances; @@ -484,7 +486,7 @@ parameter_types! { } impl pallet_loans::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = LoansPalletId; type PriceFeeder = Prices; type ReserveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -516,9 +518,9 @@ parameter_types! { } impl pallet_liquid_staking::Config for Runtime { - type Event = Event; - type Origin = Origin; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type PalletId = StakingPalletId; type LoansPalletId = LoansPalletId; type RelayOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -554,7 +556,7 @@ parameter_types! { type LiquidStakingAgentsMembershipInstance = pallet_membership::Instance5; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -572,7 +574,7 @@ parameter_types! { type CrowdloansAutomatorsMembershipInstance = pallet_membership::Instance7; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -586,15 +588,15 @@ impl pallet_membership::Config for Runti impl frame_system::offchain::CreateSignedTransaction for Runtime where - Call: From, + RuntimeCall: From, { fn create_transaction>( - call: Call, + call: RuntimeCall, public: ::Signer, account: AccountId, index: Index, ) -> Option<( - Call, + RuntimeCall, ::SignaturePayload, )> { let period = BlockHashCount::get() as u64; @@ -635,9 +637,9 @@ impl frame_system::offchain::SigningTypes for Runtime { impl frame_system::offchain::SendTransactionTypes for Runtime where - Call: From, + RuntimeCall: From, { - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; type Extrinsic = UncheckedExtrinsic; } @@ -670,7 +672,7 @@ parameter_types! { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. type ValidatorIdOf = pallet_collator_selection::IdentityCollator; @@ -692,7 +694,7 @@ parameter_types! { } impl pallet_collator_selection::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type PotId = PotId; @@ -729,7 +731,7 @@ impl pallet_balances::Config for Runtime { /// The type for recording an account's balance. type Balance = Balance; /// The ubiquitous event type. - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = Treasury; type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -749,7 +751,7 @@ impl pallet_transaction_payment::Config for Runtime { type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; type OperationalFeeMultiplier = OperationalFeeMultiplier; type LengthToFee = ConstantMultiplier; - type Event = Event; + type RuntimeEvent = RuntimeEvent; } parameter_types! { @@ -771,7 +773,7 @@ impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold { } impl pallet_base_fee::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Threshold = BaseFeeThreshold; type DefaultElasticity = DefaultElasticity; type DefaultBaseFeePerGas = DefaultBaseFeePerGas; @@ -785,18 +787,7 @@ pub const GAS_PER_SECOND: u64 = 40_000_000; /// Approximate ratio of the amount of Weight per Gas. /// u64 works for approximations because Weight is a very small unit compared to gas. -pub const WEIGHT_PER_GAS: u64 = WEIGHT_PER_SECOND / GAS_PER_SECOND; - -pub struct GasWeightMapping; -impl pallet_evm::GasWeightMapping for GasWeightMapping { - fn gas_to_weight(gas: u64) -> Weight { - gas.saturating_mul(WEIGHT_PER_GAS) - } - - fn weight_to_gas(weight: Weight) -> u64 { - weight.wrapping_div(WEIGHT_PER_GAS) - } -} +pub const WEIGHT_PER_GAS: u64 = WEIGHT_PER_SECOND.ref_time() / GAS_PER_SECOND; pub struct FindAuthorTruncated(sp_std::marker::PhantomData); impl> FindAuthor for FindAuthorTruncated { @@ -822,20 +813,21 @@ parameter_types! { pub CallMagicNumber: u16 = EVMChainId::get() as u16; /// EVM gas limit pub BlockGasLimit: U256 = U256::from( - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT / WEIGHT_PER_GAS + NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time() / WEIGHT_PER_GAS ); pub ParallelPrecompilesValue: ParallelPrecompilesType = ParallelPrecompiles::::new(); + pub WeightPerGas: u64 = WEIGHT_PER_GAS; } impl pallet_evm::Config for Runtime { type FeeCalculator = BaseFee; - type GasWeightMapping = GasWeightMapping; + type GasWeightMapping = pallet_evm::FixedGasWeightMapping; type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping; type CallOrigin = pallet_evm::EnsureAddressRoot; type WithdrawOrigin = pallet_evm::EnsureAddressTruncated; type AddressMapping = pallet_evm::HashedAddressMapping; type Currency = Balances; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Runner = pallet_evm::runner::stack::Runner; type PrecompilesType = ParallelPrecompilesType; type PrecompilesValue = ParallelPrecompilesValue; @@ -843,10 +835,11 @@ impl pallet_evm::Config for Runtime { type OnChargeTransaction = pallet_evm::EVMCurrencyAdapter; type BlockGasLimit = BlockGasLimit; type FindAuthor = FindAuthorTruncated; + type WeightPerGas = WeightPerGas; } impl pallet_ethereum::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type StateRoot = pallet_ethereum::IntermediateStateRoot; } @@ -857,8 +850,8 @@ parameter_types! { } impl pallet_evm_signatures::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Signature = pallet_evm_signatures::ethereum::EthereumSignature; type Signer = ::Signer; type CallMagicNumber = CallMagicNumber; @@ -875,8 +868,8 @@ impl pallet_evm_signatures::Config for Runtime { } impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } #[derive( @@ -909,89 +902,95 @@ impl Default for ProxyType { } } -impl InstanceFilter for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl InstanceFilter for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, ProxyType::Loans => { matches!( c, - Call::Loans(pallet_loans::Call::mint { .. }) - | Call::Loans(pallet_loans::Call::redeem { .. }) - | Call::Loans(pallet_loans::Call::redeem_all { .. }) - | Call::Loans(pallet_loans::Call::borrow { .. }) - | Call::Loans(pallet_loans::Call::repay_borrow { .. }) - | Call::Loans(pallet_loans::Call::repay_borrow_all { .. }) - | Call::Loans(pallet_loans::Call::collateral_asset { .. }) - | Call::Loans(pallet_loans::Call::liquidate_borrow { .. }) - | Call::Loans(pallet_loans::Call::add_reward { .. }) - | Call::Loans(pallet_loans::Call::claim_reward { .. }) - | Call::Loans(pallet_loans::Call::claim_reward_for_market { .. }) + RuntimeCall::Loans(pallet_loans::Call::mint { .. }) + | RuntimeCall::Loans(pallet_loans::Call::redeem { .. }) + | RuntimeCall::Loans(pallet_loans::Call::redeem_all { .. }) + | RuntimeCall::Loans(pallet_loans::Call::borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::repay_borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::repay_borrow_all { .. }) + | RuntimeCall::Loans(pallet_loans::Call::collateral_asset { .. }) + | RuntimeCall::Loans(pallet_loans::Call::liquidate_borrow { .. }) + | RuntimeCall::Loans(pallet_loans::Call::add_reward { .. }) + | RuntimeCall::Loans(pallet_loans::Call::claim_reward { .. }) + | RuntimeCall::Loans(pallet_loans::Call::claim_reward_for_market { .. }) ) } ProxyType::Staking => { matches!( c, - Call::LiquidStaking(pallet_liquid_staking::Call::stake { .. }) - | Call::LiquidStaking(pallet_liquid_staking::Call::unstake { .. }) - | Call::LiquidStaking(pallet_liquid_staking::Call::cancel_unstake { .. }) + RuntimeCall::LiquidStaking(pallet_liquid_staking::Call::stake { .. }) + | RuntimeCall::LiquidStaking(pallet_liquid_staking::Call::unstake { .. }) + | RuntimeCall::LiquidStaking( + pallet_liquid_staking::Call::cancel_unstake { .. } + ) ) } ProxyType::Crowdloans => { matches!( c, - Call::Crowdloans(pallet_crowdloans::Call::contribute { .. },) - | Call::Crowdloans(pallet_crowdloans::Call::claim { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::claim_for { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::withdraw { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::withdraw_for { .. }) - | Call::Crowdloans(pallet_crowdloans::Call::redeem { .. }) + RuntimeCall::Crowdloans(pallet_crowdloans::Call::contribute { .. },) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::claim { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::claim_for { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::withdraw { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::withdraw_for { .. }) + | RuntimeCall::Crowdloans(pallet_crowdloans::Call::redeem { .. }) ) } ProxyType::Farming => { matches!( c, - Call::Farming(pallet_farming::Call::deposit { .. }) - | Call::Farming(pallet_farming::Call::claim { .. }) - | Call::Farming(pallet_farming::Call::withdraw { .. }) - | Call::Farming(pallet_farming::Call::redeem { .. }) + RuntimeCall::Farming(pallet_farming::Call::deposit { .. }) + | RuntimeCall::Farming(pallet_farming::Call::claim { .. }) + | RuntimeCall::Farming(pallet_farming::Call::withdraw { .. }) + | RuntimeCall::Farming(pallet_farming::Call::redeem { .. }) ) } ProxyType::Streaming => { matches!( c, - Call::Streaming(pallet_streaming::Call::create { .. }) - | Call::Streaming(pallet_streaming::Call::cancel { .. }) - | Call::Streaming(pallet_streaming::Call::withdraw { .. }) + RuntimeCall::Streaming(pallet_streaming::Call::create { .. }) + | RuntimeCall::Streaming(pallet_streaming::Call::cancel { .. }) + | RuntimeCall::Streaming(pallet_streaming::Call::withdraw { .. }) ) } ProxyType::Governance => { matches!( c, - Call::Democracy(..) - | Call::Preimage(..) - | Call::GeneralCouncil(..) - | Call::TechnicalCommittee(..) - | Call::Treasury(..) - | Call::Utility(..) + RuntimeCall::Democracy(..) + | RuntimeCall::Preimage(..) + | RuntimeCall::GeneralCouncil(..) + | RuntimeCall::TechnicalCommittee(..) + | RuntimeCall::Treasury(..) + | RuntimeCall::Utility(..) ) } ProxyType::AMM => { matches!( c, - Call::AMM(pallet_amm::Call::add_liquidity { .. }) - | Call::AMM(pallet_amm::Call::remove_liquidity { .. }) - | Call::AMMRoute(pallet_router::Call::swap_tokens_for_exact_tokens { .. }) - | Call::AMMRoute(pallet_router::Call::swap_exact_tokens_for_tokens { .. }) + RuntimeCall::AMM(pallet_amm::Call::add_liquidity { .. }) + | RuntimeCall::AMM(pallet_amm::Call::remove_liquidity { .. }) + | RuntimeCall::AMMRoute( + pallet_router::Call::swap_tokens_for_exact_tokens { .. } + ) + | RuntimeCall::AMMRoute( + pallet_router::Call::swap_exact_tokens_for_tokens { .. } + ) ) } ProxyType::EVM => { matches!( c, - Call::Ethereum(..) - | Call::EVM(_) - | Call::BaseFee(_) - | Call::EVMSignatureCall(_) + RuntimeCall::Ethereum(..) + | RuntimeCall::EVM(_) + | RuntimeCall::BaseFee(_) + | RuntimeCall::EVMSignatureCall(_) ) } } @@ -1018,8 +1017,8 @@ parameter_types! { } impl pallet_proxy::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ProxyType = ProxyType; type ProxyDepositBase = ProxyDepositBase; @@ -1033,15 +1032,15 @@ impl pallet_proxy::Config for Runtime { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = pallet_utility::weights::SubstrateWeight; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. However, we later /// block this via `ExecuteXcmOrigin`. -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; /// The means for routing XCM messages which are not for local execution into the right message /// queues. @@ -1055,29 +1054,29 @@ pub type XcmRouter = ( impl pallet_xcm::Config for Runtime { const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type Origin = Origin; - type Call = Call; - type Event = Event; - type SendXcmOrigin = EnsureXcmOrigin; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmReserveTransferFilter = Everything; type XcmExecutor = XcmExecutor; // Teleporting is disabled. type XcmTeleportFilter = Nothing; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl cumulus_pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } impl cumulus_pallet_xcmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type ChannelInfo = ParachainSystem; @@ -1088,18 +1087,18 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { } impl cumulus_pallet_dmp_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; type ExecuteOverweightOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; } parameter_types! { - pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; - pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 4; + pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); + pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); } impl cumulus_pallet_parachain_system::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSystemEvent = (); type SelfParaId = ParachainInfo; type DmpMessageHandler = DmpQueue; @@ -1117,7 +1116,7 @@ parameter_types! { pub RelayNetwork: NetworkId = NetworkId::Kusama; pub RelayCurrency: CurrencyId = KSM; pub VanillaNetwork: NetworkId = NetworkId::Named(WeakBoundedVec::>::force_from("vanilla".into(), None)); - pub RelayChainOrigin: Origin = cumulus_pallet_xcm::Origin::Relay.into(); + pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = MultiLocation::new(0, X1(Parachain(ParachainInfo::parachain_id().into()))); } @@ -1187,21 +1186,21 @@ pub type XcmOriginToTransactDispatchOrigin = ( // Sovereign account converter; this attempts to derive an `AccountId` from the origin location // using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for // foreign chains who want to have a local sovereign account on this chain which they control. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // Native converter for Relay-chain (Parent) location; will converts to a `Relay` origin when // recognised. - RelayChainAsNative, + RelayChainAsNative, // Native converter for sibling Parachains; will convert to a `SiblingPara` origin when // recognised. - SiblingParachainAsNative, + SiblingParachainAsNative, // Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a // transaction from the Root origin. - ParentAsSuperuser, + ParentAsSuperuser, // Native signed account converter; this just converts an `AccountId32` origin into a normal // `Origin::Signed` origin of the same 32-byte value. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // Xcm origins can be represented natively under the Xcm pallet's Xcm origin. - XcmPassthrough, + XcmPassthrough, ); match_types! { @@ -1296,7 +1295,7 @@ pub type XcmFeesToAccount = pallet_traits::xcm::XcmFeesToAccount< pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; // How to withdraw and deposit an asset. type AssetTransactor = AssetTransactors; @@ -1306,7 +1305,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FirstAssetTrader; type ResponseHandler = PolkadotXcm; type SubscriptionService = PolkadotXcm; @@ -1315,7 +1314,7 @@ impl Config for XcmConfig { } impl pallet_asset_registry::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Balance = Balance; type AssetId = CurrencyId; type AssetType = AssetType; @@ -1332,7 +1331,7 @@ parameter_types! { type ParallelDataProvider = orml_oracle::Instance1; impl orml_oracle::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnNewData = (); type CombineData = orml_oracle::DefaultCombineData; @@ -1353,7 +1352,7 @@ parameter_types! { } impl pallet_stableswap::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type WeightInfo = pallet_stableswap::weights::SubstrateWeight; type PalletId = StableSwapPalletId; @@ -1410,7 +1409,7 @@ impl DecimalProvider for Decimal { } impl pallet_prices::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Source = AggregatedDataProvider; type FeederOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1435,13 +1434,13 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; type MaxSignatories = MaxSignatories; - type WeightInfo = weights::pallet_multisig::WeightInfo; + type WeightInfo = pallet_multisig::weights::SubstrateWeight; } parameter_types! { @@ -1454,7 +1453,7 @@ parameter_types! { } impl pallet_identity::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BasicDeposit = BasicDeposit; type FieldDeposit = FieldDeposit; @@ -1491,8 +1490,7 @@ parameter_types! { } impl pallet_democracy::Config for Runtime { - type Proposal = Call; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EnactmentPeriod = EnactmentPeriod; type LaunchPeriod = LaunchPeriod; @@ -1527,9 +1525,6 @@ impl pallet_democracy::Config for Runtime { // only do it once and it lasts only for the cool-off period. type VetoOrigin = pallet_collective::EnsureMember; type CooloffPeriod = CooloffPeriod; - type PreimageByteDeposit = PreimageByteDeposit; - type OperationalPreimageOrigin = - pallet_collective::EnsureMember; type Slash = Treasury; type Scheduler = Scheduler; type PalletsOrigin = OriginCaller; @@ -1537,6 +1532,9 @@ impl pallet_democracy::Config for Runtime { type WeightInfo = pallet_democracy::weights::SubstrateWeight; type MaxProposals = MaxProposals; type VoteLockingPeriod = EnactmentPeriod; + type Preimages = Preimage; + type MaxDeposits = ConstU32<100>; + type MaxBlacklisted = ConstU32<100>; } parameter_types! { @@ -1547,9 +1545,9 @@ parameter_types! { type GeneralCouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = GeneralCouncilMotionDuration; type MaxProposals = GeneralCouncilMaxProposals; type MaxMembers = GeneralCouncilMaxMembers; @@ -1559,7 +1557,7 @@ impl pallet_collective::Config for Runtime { type GeneralCouncilMembershipInstance = pallet_membership::Instance1; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1579,9 +1577,9 @@ parameter_types! { type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { - type Origin = Origin; - type Proposal = Call; - type Event = Event; + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; type MaxProposals = TechnicalMaxProposals; type MaxMembers = TechnicalMaxMembers; @@ -1591,7 +1589,7 @@ impl pallet_collective::Config for Runtime { type TechnicalCommitteeMembershipInstance = pallet_membership::Instance2; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1604,17 +1602,15 @@ impl pallet_membership::Config for Runtime } parameter_types! { - pub const PreimageMaxSize: u32 = 4096 * 1024; pub const PreimageBaseDeposit: Balance = deposit(2, 64); pub const PreimageByteDeposit: Balance = deposit(0, 1); } impl pallet_preimage::Config for Runtime { type WeightInfo = pallet_preimage::weights::SubstrateWeight; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type MaxSize = PreimageMaxSize; type BaseDeposit = PreimageBaseDeposit; type ByteDeposit = PreimageByteDeposit; } @@ -1627,17 +1623,16 @@ parameter_types! { } impl pallet_scheduler::Config for Runtime { - type Event = Event; - type Origin = Origin; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type MaxScheduledPerBlock = MaxScheduledPerBlock; type OriginPrivilegeCmp = EqualPrivilegeOnly; type WeightInfo = pallet_scheduler::weights::SubstrateWeight; - type PreimageProvider = Preimage; - type NoPreimagePostponement = NoPreimagePostponement; + type Preimages = Preimage; } parameter_types! { @@ -1655,7 +1650,7 @@ impl pallet_treasury::Config for Runtime { type Currency = Balances; type ApproveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RejectOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = (); type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; @@ -1675,7 +1670,7 @@ parameter_types! { type OracleMembershipInstance = pallet_membership::Instance3; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1712,7 +1707,7 @@ impl ChangeMembers for ChangeBridgeMembers { type BridgeMembershipInstance = pallet_membership::Instance6; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type RemoveOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type SwapOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1733,7 +1728,7 @@ parameter_types! { } impl pallet_bridge::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RelayMembers = BridgeMembership; type RootOperatorAccountId = OneAccount; type UpdateChainOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1757,7 +1752,7 @@ parameter_types! { } impl orml_vesting::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type MinVestedTransfer = MinVestedTransfer; type VestedTransferOrigin = EnsureSigned; @@ -1775,7 +1770,7 @@ parameter_types! { } impl pallet_amm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = AMMPalletId; type LockAccountId = OneAccount; @@ -1822,9 +1817,9 @@ impl ValidationDataProvider } impl pallet_crowdloans::Config for Runtime { - type Event = Event; - type Origin = Origin; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; type PalletId = CrowdloansPalletId; type SelfParaId = ParachainInfo; type Assets = Assets; @@ -1861,7 +1856,7 @@ parameter_types! { } impl pallet_streaming::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = StreamPalletId; type MaxStreamsCount = MaxStreamsCount; @@ -1879,7 +1874,7 @@ parameter_types! { } impl pallet_xcm_helper::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; type Assets = Assets; type XcmSender = XcmRouter; @@ -1899,7 +1894,7 @@ parameter_types! { } impl pallet_router::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = RouterPalletId; type AMM = AMM; type AMMRouterWeightInfo = weights::pallet_router::WeightInfo; @@ -1923,7 +1918,7 @@ parameter_types! { } impl pallet_farming::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Assets = CurrencyAdapter; type PalletId = FarmingPalletId; type UpdateOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; @@ -1935,10 +1930,10 @@ impl pallet_farming::Config for Runtime { } impl pallet_emergency_shutdown::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Whitelist = WhiteListFilter; type ShutdownOrigin = EnsureRootOrMoreThanHalfGeneralCouncil; - type Call = Call; + type RuntimeCall = RuntimeCall; } // Create the runtime by composing the FRAME pallets that were previously configured. @@ -2052,11 +2047,12 @@ pub type SignedExtra = ( ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = - fp_self_contained::UncheckedExtrinsic; + fp_self_contained::UncheckedExtrinsic; /// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; /// Extrinsic type that has already been checked. -pub type CheckedExtrinsic = fp_self_contained::CheckedExtrinsic; +pub type CheckedExtrinsic = + fp_self_contained::CheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -2067,19 +2063,19 @@ pub type Executive = frame_executive::Executive< (), >; -impl fp_self_contained::SelfContainedCall for Call { +impl fp_self_contained::SelfContainedCall for RuntimeCall { type SignedInfo = H160; fn is_self_contained(&self) -> bool { match self { - Call::Ethereum(call) => call.is_self_contained(), + RuntimeCall::Ethereum(call) => call.is_self_contained(), _ => false, } } fn check_self_contained(&self) -> Option> { match self { - Call::Ethereum(call) => call.check_self_contained(), + RuntimeCall::Ethereum(call) => call.check_self_contained(), _ => None, } } @@ -2087,11 +2083,11 @@ impl fp_self_contained::SelfContainedCall for Call { fn validate_self_contained( &self, info: &Self::SignedInfo, - dispatch_info: &DispatchInfoOf, + dispatch_info: &DispatchInfoOf, len: usize, ) -> Option { match self { - Call::Ethereum(call) => call.validate_self_contained(info, dispatch_info, len), + RuntimeCall::Ethereum(call) => call.validate_self_contained(info, dispatch_info, len), _ => None, } } @@ -2099,11 +2095,13 @@ impl fp_self_contained::SelfContainedCall for Call { fn pre_dispatch_self_contained( &self, info: &Self::SignedInfo, - dispatch_info: &DispatchInfoOf, + dispatch_info: &DispatchInfoOf, len: usize, ) -> Option> { match self { - Call::Ethereum(call) => call.pre_dispatch_self_contained(info, dispatch_info, len), + RuntimeCall::Ethereum(call) => { + call.pre_dispatch_self_contained(info, dispatch_info, len) + } _ => None, } } @@ -2113,9 +2111,11 @@ impl fp_self_contained::SelfContainedCall for Call { info: Self::SignedInfo, ) -> Option>> { match self { - call @ Call::Ethereum(pallet_ethereum::Call::transact { .. }) => Some(call.dispatch( - Origin::from(pallet_ethereum::RawOrigin::EthereumTransaction(info)), - )), + call @ RuntimeCall::Ethereum(pallet_ethereum::Call::transact { .. }) => { + Some(call.dispatch(RuntimeOrigin::from( + pallet_ethereum::RawOrigin::EthereumTransaction(info), + ))) + } _ => None, } } @@ -2406,7 +2406,7 @@ impl_runtime_apis! { xts: Vec<::Extrinsic>, ) -> Vec { xts.into_iter().filter_map(|xt| match xt.0.function { - Call::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction), + RuntimeCall::Ethereum(pallet_ethereum::Call::transact { transaction }) => Some(transaction), _ => None }).collect::>() } @@ -2520,8 +2520,19 @@ impl_runtime_apis! { (weight, RuntimeBlockWeights::get().max_block) } - fn execute_block_no_check(block: Block) -> Weight { - Executive::execute_block_no_check(block) + fn execute_block( + block: Block, + state_root_check: bool, + select: frame_try_runtime::TryStateSelect + ) -> Weight { + log::info!( + target: "runtime::vanilla", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}", + block.header.number, + block.header.hash(), + state_root_check, + select, + ); + Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed") } } } diff --git a/runtime/vanilla/src/precompiles.rs b/runtime/vanilla/src/precompiles.rs index be7e34556..686deba1e 100644 --- a/runtime/vanilla/src/precompiles.rs +++ b/runtime/vanilla/src/precompiles.rs @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -use frame_support::weights::GetDispatchInfo; -use frame_support::weights::PostDispatchInfo; +use frame_support::dispatch::GetDispatchInfo; +use frame_support::dispatch::PostDispatchInfo; use pallet_evm::{ ExitRevert, Precompile, PrecompileFailure, PrecompileHandle, PrecompileResult, PrecompileSet, }; @@ -64,9 +64,9 @@ where + AddressToAssetId<::AssetId> + pallet_assets::Config + pallet_balances::Config, - R::Call: Dispatchable + GetDispatchInfo, - ::Call: From>, - <::Call as Dispatchable>::Origin: + R::RuntimeCall: Dispatchable + GetDispatchInfo, + ::RuntimeCall: From>, + <::RuntimeCall as Dispatchable>::RuntimeOrigin: From::AccountId>>, ::Balance: TryFrom, ::Balance: Into, diff --git a/runtime/vanilla/src/weights/frame_system.rs b/runtime/vanilla/src/weights/frame_system.rs index 6f8db0793..c6b477ffa 100644 --- a/runtime/vanilla/src/weights/frame_system.rs +++ b/runtime/vanilla/src/weights/frame_system.rs @@ -3,20 +3,20 @@ //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2022-05-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("vanilla-dev"), DB CACHE: 1024 +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kerria-dev"), DB CACHE: 1024 // Executed Command: // ./target/release/parallel // benchmark // pallet -// --chain=vanilla-dev +// --chain=kerria-dev // --execution=wasm // --wasm-execution=compiled // --pallet=frame_system // --extrinsic=* // --steps=50 // --repeat=20 -// --output=./runtime/vanilla/src/weights/frame_system.rs +// --output=./runtime/kerria/src/weights/frame_system.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -29,39 +29,39 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { fn remark(_b: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) } fn remark_with_event(b: u32, ) -> Weight { - (17_860_000 as Weight) + Weight::from_ref_time(13_176_000 as u64) // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(b as Weight)) + .saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64)) } // Storage: System Digest (r:1 w:1) // Storage: unknown [0x3a686561707061676573] (r:0 w:1) fn set_heap_pages() -> Weight { - (9_241_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(9_294_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Skipped Metadata (r:0 w:0) fn set_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 1_000 - .saturating_add((1_058_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(1_048_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_storage(i: u32, ) -> Weight { - (0 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 1_000 - .saturating_add((752_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(i as Weight))) + .saturating_add(Weight::from_ref_time(757_000 as u64).saturating_mul(i as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64))) } // Storage: Skipped Metadata (r:0 w:0) fn kill_prefix(p: u32, ) -> Weight { - (1_225_000 as Weight) + Weight::from_ref_time(0 as u64) // Standard Error: 1_000 - .saturating_add((1_483_000 as Weight).saturating_mul(p as Weight)) - .saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(p as Weight))) + .saturating_add(Weight::from_ref_time(1_505_000 as u64).saturating_mul(p as u64)) + .saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64))) } } diff --git a/runtime/vanilla/src/weights/mod.rs b/runtime/vanilla/src/weights/mod.rs index 1f2992a9e..a0cd58966 100644 --- a/runtime/vanilla/src/weights/mod.rs +++ b/runtime/vanilla/src/weights/mod.rs @@ -8,7 +8,6 @@ pub mod pallet_farming; pub mod pallet_liquid_staking; pub mod pallet_loans; pub mod pallet_membership; -pub mod pallet_multisig; pub mod pallet_router; pub mod pallet_streaming; pub mod pallet_timestamp; diff --git a/runtime/vanilla/src/weights/pallet_amm.rs b/runtime/vanilla/src/weights/pallet_amm.rs index e79823c26..c1707997d 100644 --- a/runtime/vanilla/src/weights/pallet_amm.rs +++ b/runtime/vanilla/src/weights/pallet_amm.rs @@ -3,20 +3,20 @@ //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2022-05-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("vanilla-dev"), DB CACHE: 1024 +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kerria-dev"), DB CACHE: 1024 // Executed Command: // ./target/release/parallel // benchmark // pallet -// --chain=vanilla-dev +// --chain=kerria-dev // --execution=wasm // --wasm-execution=compiled // --pallet=pallet_amm // --extrinsic=* // --steps=50 // --repeat=20 -// --output=./runtime/vanilla/src/weights/pallet_amm.rs +// --output=./runtime/kerria/src/weights/pallet_amm.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -33,18 +33,18 @@ impl pallet_amm::WeightInfo for WeightInfo { // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn add_liquidity() -> Weight { - (209_348_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(214_746_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) // Storage: Assets Asset (r:3 w:3) // Storage: Assets Account (r:5 w:5) fn remove_liquidity() -> Weight { - (226_453_000 as Weight) - .saturating_add(T::DbWeight::get().reads(10 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(233_479_000 as u64) + .saturating_add(T::DbWeight::get().reads(10 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) @@ -52,16 +52,16 @@ impl pallet_amm::WeightInfo for WeightInfo { // Storage: Assets Account (r:6 w:6) // Storage: System Account (r:2 w:2) fn create_pool() -> Weight { - (278_326_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) + Weight::from_ref_time(286_985_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(13 as u64)) } // Storage: AMM ProtocolFee (r:0 w:1) fn update_protocol_fee() -> Weight { - (4_067_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(4_067_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: AMM ProtocolFeeReceiver (r:0 w:1) fn update_protocol_fee_receiver() -> Weight { - (4_114_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(4_114_000 as u64).saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/vanilla/src/weights/pallet_asset_registry.rs b/runtime/vanilla/src/weights/pallet_asset_registry.rs index 26300a3ea..cdb32eec3 100644 --- a/runtime/vanilla/src/weights/pallet_asset_registry.rs +++ b/runtime/vanilla/src/weights/pallet_asset_registry.rs @@ -31,41 +31,41 @@ impl pallet_asset_registry::WeightInfo for WeightInfo Weight { - (35_517_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(35_517_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry AssetTypeId (r:1 w:0) // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn update_asset_units_per_second() -> Weight { - (45_432_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(45_432_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:1 w:2) // Storage: AssetRegistry AssetTypeId (r:0 w:2) fn update_asset_type() -> Weight { - (60_684_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(60_684_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) fn remove_fee_payment_asset() -> Weight { - (37_895_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_895_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: AssetRegistry SupportedFeePaymentAssets (r:1 w:1) // Storage: AssetRegistry AssetIdType (r:1 w:1) // Storage: AssetRegistry AssetTypeUnitsPerSecond (r:0 w:1) // Storage: AssetRegistry AssetTypeId (r:0 w:1) fn deregister_asset() -> Weight { - (47_531_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(47_531_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } } diff --git a/runtime/vanilla/src/weights/pallet_balances.rs b/runtime/vanilla/src/weights/pallet_balances.rs index f669ded9c..92c80feb8 100644 --- a/runtime/vanilla/src/weights/pallet_balances.rs +++ b/runtime/vanilla/src/weights/pallet_balances.rs @@ -30,44 +30,44 @@ pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) fn transfer() -> Weight { - (92_025_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(92_025_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_keep_alive() -> Weight { - (70_511_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(70_511_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_creating() -> Weight { - (44_304_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(44_304_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn set_balance_killing() -> Weight { - (51_794_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(51_794_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:2 w:2) fn force_transfer() -> Weight { - (90_299_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(90_299_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: System Account (r:1 w:1) fn transfer_all() -> Weight { - (82_886_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(82_886_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: System Account (r:1 w:1) fn force_unreserve() -> Weight { - (40_569_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(40_569_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } diff --git a/runtime/vanilla/src/weights/pallet_bridge.rs b/runtime/vanilla/src/weights/pallet_bridge.rs index 45b33a3d3..f9b633f90 100644 --- a/runtime/vanilla/src/weights/pallet_bridge.rs +++ b/runtime/vanilla/src/weights/pallet_bridge.rs @@ -32,65 +32,65 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn register_chain() -> Weight { - (42_365_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(42_365_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:1) // Storage: Bridge BridgeRegistry (r:0 w:1) fn unregister_chain() -> Weight { - (43_435_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(43_435_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge BridgeTokens (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:1) fn register_bridge_token() -> Weight { - (48_730_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(48_730_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:1) // Storage: Bridge BridgeTokens (r:0 w:1) fn unregister_bridge_token() -> Weight { - (45_312_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(45_312_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_fee() -> Weight { - (52_213_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(52_213_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_status() -> Weight { - (51_876_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(51_876_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn set_bridge_token_cap() -> Weight { - (52_031_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(52_031_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge AssetIds (r:1 w:0) // Storage: Bridge BridgeTokens (r:1 w:1) fn clean_cap_accumulated_value() -> Weight { - (52_355_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(52_355_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:1) @@ -100,9 +100,9 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn teleport() -> Weight { - (150_289_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(150_289_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Bridge ChainNonces (r:1 w:0) @@ -117,8 +117,8 @@ impl pallet_bridge::WeightInfo for WeightInfo { // Storage: Assets Metadata (r:1 w:0) // Storage: System Account (r:1 w:0) fn materialize() -> Weight { - (243_984_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(243_984_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } } diff --git a/runtime/vanilla/src/weights/pallet_crowdloans.rs b/runtime/vanilla/src/weights/pallet_crowdloans.rs index 19e6a19b4..1b9c14aa7 100644 --- a/runtime/vanilla/src/weights/pallet_crowdloans.rs +++ b/runtime/vanilla/src/weights/pallet_crowdloans.rs @@ -36,18 +36,18 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: Crowdloans NextTrieIndex (r:1 w:1) fn create_vault() -> Weight { - (89_273_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(89_273_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: ParachainSystem ValidationData (r:1 w:0) fn update_vault() -> Weight { - (72_633_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(72_633_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -69,48 +69,48 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: PolkadotXcm Queries (r:0 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn contribute() -> Weight { - (304_733_000 as Weight) - .saturating_add(T::DbWeight::get().reads(19 as Weight)) - .saturating_add(T::DbWeight::get().writes(13 as Weight)) + Weight::from_ref_time(304_733_000 as u64) + .saturating_add(T::DbWeight::get().reads(19 as u64)) + .saturating_add(T::DbWeight::get().writes(13 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn open() -> Weight { - (68_797_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(68_797_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn close() -> Weight { - (67_529_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(67_529_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans IsVrf (r:0 w:1) fn set_vrf() -> Weight { - (36_038_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_038_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn reopen() -> Weight { - (68_065_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(68_065_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) // Storage: Crowdloans Vaults (r:1 w:1) fn auction_succeeded() -> Weight { - (68_213_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(68_213_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -128,9 +128,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn auction_failed() -> Weight { - (208_673_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(208_673_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans CTokensRegistry (r:1 w:0) @@ -139,9 +139,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Assets Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn claim() -> Weight { - (135_952_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(135_952_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -149,9 +149,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Assets Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn withdraw() -> Weight { - (124_233_000 as Weight) - .saturating_add(T::DbWeight::get().reads(5 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(124_233_000 as u64) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans CTokensRegistry (r:1 w:0) @@ -159,9 +159,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Assets Asset (r:2 w:2) // Storage: Assets Account (r:2 w:2) fn redeem() -> Weight { - (171_022_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(171_022_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -179,9 +179,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: Crowdloans XcmRequests (r:0 w:1) // Storage: PolkadotXcm Queries (r:0 w:1) fn slot_expired() -> Weight { - (208_146_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(208_146_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:0) @@ -202,9 +202,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: unknown [0x] (r:1 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn migrate_pending() -> Weight { - (313_139_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(313_139_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans XcmRequests (r:1 w:1) @@ -214,9 +214,9 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:2 w:2) fn notification_received() -> Weight { - (184_909_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(184_909_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -225,18 +225,18 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: unknown [0x] (r:3 w:0) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn refund() -> Weight { - (242_770_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(242_770_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) // Storage: Crowdloans LeasesRegistry (r:1 w:1) // Storage: unknown [0x] (r:3 w:0) fn dissolve_vault() -> Weight { - (155_160_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(155_160_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Crowdloans Vaults (r:1 w:1) @@ -245,20 +245,20 @@ impl pallet_crowdloans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: unknown [0xd861ea1ebf4800d4b89f4ff787ad79ee96d9a708c85b57da7eb8f9ddeda61291] (r:1 w:1) fn refund_for() -> Weight { - (169_339_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(169_339_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } fn update_proxy() -> Weight { - (31_127_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_127_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } fn update_leases_bonus() -> Weight { - (31_127_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(31_127_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/vanilla/src/weights/pallet_farming.rs b/runtime/vanilla/src/weights/pallet_farming.rs index c861b3ab3..2d7b91d61 100644 --- a/runtime/vanilla/src/weights/pallet_farming.rs +++ b/runtime/vanilla/src/weights/pallet_farming.rs @@ -31,72 +31,72 @@ impl pallet_farming::WeightInfo for WeightInfo { // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn create() -> Weight { - (49_535_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(49_535_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn set_pool_status() -> Weight { - (49_949_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(49_949_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn set_pool_cool_down_duration() -> Weight { - (50_322_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(50_322_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) fn reset_pool_unlock_height() -> Weight { - (52_072_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(52_072_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) // Storage: System Account (r:1 w:1) fn deposit() -> Weight { - (152_428_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(152_428_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) fn withdraw() -> Weight { - (106_657_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(106_657_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:0) // Storage: Farming Positions (r:1 w:1) // Storage: System Account (r:1 w:1) fn redeem() -> Weight { - (110_753_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(110_753_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) // Storage: Farming Positions (r:1 w:1) // Storage: System Account (r:1 w:1) fn claim() -> Weight { - (136_628_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(136_628_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Farming Pools (r:1 w:1) // Storage: System Account (r:1 w:1) fn dispatch_reward() -> Weight { - (129_003_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(129_003_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } } diff --git a/runtime/vanilla/src/weights/pallet_liquid_staking.rs b/runtime/vanilla/src/weights/pallet_liquid_staking.rs index 664ea94d0..1963fb0eb 100644 --- a/runtime/vanilla/src/weights/pallet_liquid_staking.rs +++ b/runtime/vanilla/src/weights/pallet_liquid_staking.rs @@ -3,20 +3,20 @@ //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2022-05-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("vanilla-dev"), DB CACHE: 1024 +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kerria-dev"), DB CACHE: 1024 // Executed Command: // ./target/release/parallel // benchmark // pallet -// --chain=vanilla-dev +// --chain=kerria-dev // --execution=wasm // --wasm-execution=compiled // --pallet=pallet_liquid_staking // --extrinsic=* // --steps=50 // --repeat=20 -// --output=./runtime/vanilla/src/weights/pallet_liquid_staking.rs +// --output=./runtime/kerria/src/weights/pallet_liquid_staking.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -40,9 +40,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (255_230_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(263_966_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking ExchangeRate (r:1 w:0) @@ -53,9 +53,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (113_116_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(116_043_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -74,9 +74,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (185_924_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(191_015_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -93,9 +93,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (171_810_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(174_652_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -114,18 +114,18 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (190_442_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(192_979_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:1) // Storage: LiquidStaking IsUpdated (r:1 w:1) // Storage: LiquidStaking XcmRequests (r:1 w:0) fn force_set_staking_ledger() -> Weight { - (70_417_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(70_741_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -143,9 +143,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (180_378_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(183_113_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:1 w:0) @@ -163,9 +163,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (178_826_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(179_752_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(9 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:1 w:0) @@ -183,23 +183,23 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (184_703_000 as Weight) - .saturating_add(T::DbWeight::get().reads(13 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(184_199_000 as u64) + .saturating_add(T::DbWeight::get().reads(13 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking ReserveFactor (r:1 w:1) fn update_reserve_factor() -> Weight { - (35_456_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_115_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgerCap (r:1 w:1) fn update_staking_ledger_cap() -> Weight { - (35_101_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(36_387_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking XcmRequests (r:1 w:1) @@ -210,9 +210,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (126_898_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(128_865_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:1 w:0) @@ -223,33 +223,33 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (145_723_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(147_691_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking EraStartBlock (r:0 w:1) fn force_set_era_start_block() -> Weight { - (11_481_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(11_484_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking CurrentEra (r:0 w:1) // Storage: LiquidStaking IsMatched (r:0 w:1) fn force_set_current_era() -> Weight { - (12_985_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(13_328_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: ParachainSystem ValidationData (r:1 w:0) // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking IsMatched (r:1 w:0) // Storage: LiquidStaking EraStartBlock (r:1 w:0) fn on_initialize() -> Weight { - (18_550_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(18_562_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:3 w:0) @@ -274,9 +274,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (430_626_000 as Weight) - .saturating_add(T::DbWeight::get().reads(22 as Weight)) - .saturating_add(T::DbWeight::get().writes(15 as Weight)) + Weight::from_ref_time(426_868_000 as u64) + .saturating_add(T::DbWeight::get().reads(22 as u64)) + .saturating_add(T::DbWeight::get().writes(15 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking StakingLedgers (r:3 w:0) @@ -297,9 +297,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (362_397_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(358_694_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking TotalReserves (r:1 w:1) @@ -307,9 +307,9 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (114_960_000 as Weight) - .saturating_add(T::DbWeight::get().reads(6 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(120_292_000 as u64) + .saturating_add(T::DbWeight::get().reads(6 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: LiquidStaking Unlockings (r:1 w:1) @@ -320,24 +320,23 @@ impl pallet_liquid_staking::WeightInfo for WeightInfo Weight { - (108_382_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(109_728_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } fn update_commission_rate() -> Weight { - (39_392_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(39_392_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } - fn fast_match_unstake(n: u32, ) -> Weight { - (21_480_000 as Weight) + Weight::from_ref_time(21_480_000 as u64) // Standard Error: 38_000 - .saturating_add((82_727_000 as Weight).saturating_mul(n as Weight)) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(n as Weight))) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) - .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(n as Weight))) + .saturating_add(Weight::from_ref_time(82_727_000 as u64).saturating_mul(n as u64)) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) + .saturating_add(T::DbWeight::get().writes(4 as u64)) + .saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(n as u64))) } } diff --git a/runtime/vanilla/src/weights/pallet_loans.rs b/runtime/vanilla/src/weights/pallet_loans.rs index c6d24d377..56c54536e 100644 --- a/runtime/vanilla/src/weights/pallet_loans.rs +++ b/runtime/vanilla/src/weights/pallet_loans.rs @@ -34,52 +34,52 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans ExchangeRate (r:0 w:1) // Storage: Loans BorrowIndex (r:0 w:1) fn add_market() -> Weight { - (58_085_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(58_085_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn activate_market() -> Weight { - (41_608_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(41_608_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn update_rate_model() -> Weight { - (43_131_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(43_131_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn update_market() -> Weight { - (44_331_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(44_331_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans UnderlyingAssetId (r:1 w:1) // Storage: Loans Markets (r:1 w:1) fn force_update_market() -> Weight { - (53_841_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(53_841_000 as u64) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: System Account (r:1 w:1) fn add_reward() -> Weight { - (96_816_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(96_816_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: System Account (r:1 w:1) fn withdraw_missing_reward() -> Weight { - (79_923_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(79_923_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -88,9 +88,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplyState (r:1 w:1) // Storage: Loans RewardBorrowState (r:1 w:1) fn update_market_reward_speed() -> Weight { - (84_212_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(84_212_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -108,9 +108,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward() -> Weight { - (234_056_000 as Weight) - .saturating_add(T::DbWeight::get().reads(16 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(234_056_000 as u64) + .saturating_add(T::DbWeight::get().reads(16 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans RewardSupplyState (r:1 w:1) @@ -127,9 +127,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountBorrows (r:1 w:0) // Storage: System Account (r:1 w:1) fn claim_reward_for_market() -> Weight { - (210_486_000 as Weight) - .saturating_add(T::DbWeight::get().reads(14 as Weight)) - .saturating_add(T::DbWeight::get().writes(7 as Weight)) + Weight::from_ref_time(210_486_000 as u64) + .saturating_add(T::DbWeight::get().reads(14 as u64)) + .saturating_add(T::DbWeight::get().writes(7 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -148,9 +148,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans AccountEarned (r:1 w:1) // Storage: System Account (r:1 w:1) fn mint() -> Weight { - (245_750_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(245_750_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -172,9 +172,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardAccured (r:1 w:1) // Storage: Loans BorrowIndex (r:1 w:0) fn borrow() -> Weight { - (349_397_000 as Weight) - .saturating_add(T::DbWeight::get().reads(24 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(349_397_000 as u64) + .saturating_add(T::DbWeight::get().reads(24 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -192,9 +192,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplierIndex (r:1 w:1) // Storage: Loans RewardAccured (r:1 w:1) fn redeem() -> Weight { - (254_901_000 as Weight) - .saturating_add(T::DbWeight::get().reads(17 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(254_901_000 as u64) + .saturating_add(T::DbWeight::get().reads(17 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -213,9 +213,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardAccured (r:1 w:1) // Storage: System Account (r:1 w:1) fn redeem_all() -> Weight { - (274_975_000 as Weight) - .saturating_add(T::DbWeight::get().reads(18 as Weight)) - .saturating_add(T::DbWeight::get().writes(12 as Weight)) + Weight::from_ref_time(274_975_000 as u64) + .saturating_add(T::DbWeight::get().reads(18 as u64)) + .saturating_add(T::DbWeight::get().writes(12 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -231,9 +231,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow() -> Weight { - (223_263_000 as Weight) - .saturating_add(T::DbWeight::get().reads(15 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(223_263_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -249,17 +249,17 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: Loans TotalBorrows (r:1 w:1) fn repay_borrow_all() -> Weight { - (223_289_000 as Weight) - .saturating_add(T::DbWeight::get().reads(15 as Weight)) - .saturating_add(T::DbWeight::get().writes(10 as Weight)) + Weight::from_ref_time(223_289_000 as u64) + .saturating_add(T::DbWeight::get().reads(15 as u64)) + .saturating_add(T::DbWeight::get().writes(10 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) // Storage: Loans AccountDeposits (r:1 w:1) fn collateral_asset() -> Weight { - (71_290_000 as Weight) - .saturating_add(T::DbWeight::get().reads(4 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(71_290_000 as u64) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans LiquidationFreeCollaterals (r:1 w:0) @@ -284,9 +284,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Loans RewardSupplySpeed (r:1 w:0) // Storage: Loans RewardSupplierIndex (r:3 w:3) fn liquidate_borrow() -> Weight { - (628_566_000 as Weight) - .saturating_add(T::DbWeight::get().reads(40 as Weight)) - .saturating_add(T::DbWeight::get().writes(20 as Weight)) + Weight::from_ref_time(628_566_000 as u64) + .saturating_add(T::DbWeight::get().reads(40 as u64)) + .saturating_add(T::DbWeight::get().writes(20 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -295,9 +295,9 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Loans TotalReserves (r:1 w:1) fn add_reserves() -> Weight { - (141_330_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(141_330_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans Markets (r:2 w:0) @@ -305,15 +305,15 @@ impl pallet_loans::WeightInfo for WeightInfo { // Storage: Assets Asset (r:1 w:1) // Storage: Assets Account (r:2 w:2) fn reduce_reserves() -> Weight { - (127_121_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(127_121_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(5 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Loans LiquidationFreeCollaterals (r:1 w:1) fn update_liquidation_free_collateral() -> Weight { - (34_686_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(34_686_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/vanilla/src/weights/pallet_membership.rs b/runtime/vanilla/src/weights/pallet_membership.rs index 41b9a5bda..1ecfa08ff 100644 --- a/runtime/vanilla/src/weights/pallet_membership.rs +++ b/runtime/vanilla/src/weights/pallet_membership.rs @@ -3,20 +3,20 @@ //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev //! DATE: 2022-05-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("vanilla-dev"), DB CACHE: 1024 +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("kerria-dev"), DB CACHE: 1024 // Executed Command: // ./target/release/parallel // benchmark // pallet -// --chain=vanilla-dev +// --chain=kerria-dev // --execution=wasm // --wasm-execution=compiled // --pallet=pallet_membership // --extrinsic=* // --steps=50 // --repeat=20 -// --output=./runtime/vanilla/src/weights/pallet_membership.rs +// --output=./runtime/kerria/src/weights/pallet_membership.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -33,11 +33,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn add_member(m: u32, ) -> Weight { - (39_514_000 as Weight) + Weight::from_ref_time(37_876_000 as u64) // Standard Error: 5_000 - .saturating_add((109_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(124_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -45,11 +45,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn remove_member(m: u32, ) -> Weight { - (47_023_000 as Weight) + Weight::from_ref_time(44_833_000 as u64) // Standard Error: 0 - .saturating_add((88_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(101_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -57,11 +57,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn swap_member(m: u32, ) -> Weight { - (46_951_000 as Weight) - // Standard Error: 0 - .saturating_add((110_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(45_766_000 as u64) + // Standard Error: 1_000 + .saturating_add(Weight::from_ref_time(114_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -69,11 +69,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn reset_member(m: u32, ) -> Weight { - (48_481_000 as Weight) + Weight::from_ref_time(46_196_000 as u64) // Standard Error: 1_000 - .saturating_add((288_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(306_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:1) // Storage: TechnicalCommittee Proposals (r:1 w:0) @@ -81,28 +81,28 @@ impl pallet_membership::WeightInfo for WeightInfo { // Storage: TechnicalCommittee Members (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn change_key(m: u32, ) -> Weight { - (48_553_000 as Weight) + Weight::from_ref_time(47_513_000 as u64) // Standard Error: 1_000 - .saturating_add((114_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(4 as Weight)) + .saturating_add(Weight::from_ref_time(115_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: TechnicalCommitteeMembership Members (r:1 w:0) // Storage: TechnicalCommitteeMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn set_prime(m: u32, ) -> Weight { - (14_085_000 as Weight) + Weight::from_ref_time(13_784_000 as u64) // Standard Error: 0 - .saturating_add((51_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(45_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: TechnicalCommitteeMembership Prime (r:0 w:1) // Storage: TechnicalCommittee Prime (r:0 w:1) fn clear_prime(m: u32, ) -> Weight { - (5_637_000 as Weight) + Weight::from_ref_time(5_401_000 as u64) // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(m as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(5_000 as u64).saturating_mul(m as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/vanilla/src/weights/pallet_multisig.rs b/runtime/vanilla/src/weights/pallet_multisig.rs deleted file mode 100644 index 16c70160d..000000000 --- a/runtime/vanilla/src/weights/pallet_multisig.rs +++ /dev/null @@ -1,129 +0,0 @@ - -//! Autogenerated weights for `pallet_multisig` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2022-05-30, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("vanilla-dev"), DB CACHE: 1024 - -// Executed Command: -// ./target/release/parallel -// benchmark -// pallet -// --chain=vanilla-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=pallet_multisig -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --output=./runtime/vanilla/src/weights/pallet_multisig.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `pallet_multisig`. -pub struct WeightInfo(PhantomData); -impl pallet_multisig::WeightInfo for WeightInfo { - fn as_multi_threshold_1(z: u32, ) -> Weight { - (28_055_000 as Weight) - // Standard Error: 0 - .saturating_add((1_000 as Weight).saturating_mul(z as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create(s: u32, z: u32, ) -> Weight { - (78_087_000 as Weight) - // Standard Error: 2_000 - .saturating_add((194_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn as_multi_create_store(s: u32, z: u32, ) -> Weight { - (87_534_000 as Weight) - // Standard Error: 2_000 - .saturating_add((197_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - fn as_multi_approve(s: u32, z: u32, ) -> Weight { - (54_589_000 as Weight) - // Standard Error: 1_000 - .saturating_add((166_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((2_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn as_multi_approve_store(s: u32, z: u32, ) -> Weight { - (85_040_000 as Weight) - // Standard Error: 2_000 - .saturating_add((181_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((3_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn as_multi_complete(s: u32, z: u32, ) -> Weight { - (103_990_000 as Weight) - // Standard Error: 2_000 - .saturating_add((267_000 as Weight).saturating_mul(s as Weight)) - // Standard Error: 0 - .saturating_add((4_000 as Weight).saturating_mul(z as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: unknown [0x3a65787472696e7369635f696e646578] (r:1 w:0) - fn approve_as_multi_create(s: u32, ) -> Weight { - (73_919_000 as Weight) - // Standard Error: 1_000 - .saturating_add((214_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:0) - fn approve_as_multi_approve(s: u32, ) -> Weight { - (47_336_000 as Weight) - // Standard Error: 1_000 - .saturating_add((213_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - // Storage: System Account (r:1 w:1) - fn approve_as_multi_complete(s: u32, ) -> Weight { - (137_004_000 as Weight) - // Standard Error: 3_000 - .saturating_add((325_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(3 as Weight)) - } - // Storage: Multisig Multisigs (r:1 w:1) - // Storage: Multisig Calls (r:1 w:1) - fn cancel_as_multi(s: u32, ) -> Weight { - (109_697_000 as Weight) - // Standard Error: 2_000 - .saturating_add((242_000 as Weight).saturating_mul(s as Weight)) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) - } -} diff --git a/runtime/vanilla/src/weights/pallet_router.rs b/runtime/vanilla/src/weights/pallet_router.rs index 7d1ff4690..8a6ea2669 100644 --- a/runtime/vanilla/src/weights/pallet_router.rs +++ b/runtime/vanilla/src/weights/pallet_router.rs @@ -33,17 +33,17 @@ impl pallet_router::WeightInfo for WeightInfo { // Storage: Assets Account (r:4 w:4) // Storage: AMM Pools (r:1 w:1) fn swap_exact_tokens_for_tokens() -> Weight { - (201_255_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(201_255_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: AMM Pools (r:1 w:1) // Storage: Assets Account (r:4 w:4) // Storage: Assets Asset (r:2 w:2) fn swap_tokens_for_exact_tokens() -> Weight { - (196_427_000 as Weight) - .saturating_add(T::DbWeight::get().reads(8 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(196_427_000 as u64) + .saturating_add(T::DbWeight::get().reads(8 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } } diff --git a/runtime/vanilla/src/weights/pallet_streaming.rs b/runtime/vanilla/src/weights/pallet_streaming.rs index 7f61befb5..c189c5b72 100644 --- a/runtime/vanilla/src/weights/pallet_streaming.rs +++ b/runtime/vanilla/src/weights/pallet_streaming.rs @@ -38,9 +38,9 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: Streaming StreamLibrary (r:4 w:4) // Storage: Streaming Streams (r:0 w:1) fn create() -> Weight { - (167_116_000 as Weight) - .saturating_add(T::DbWeight::get().reads(12 as Weight)) - .saturating_add(T::DbWeight::get().writes(11 as Weight)) + Weight::from_ref_time(167_116_000 as u64) + .saturating_add(T::DbWeight::get().reads(12 as u64)) + .saturating_add(T::DbWeight::get().writes(11 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming Streams (r:1 w:1) @@ -50,9 +50,9 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: System Account (r:1 w:1) // Storage: Streaming StreamLibrary (r:2 w:2) fn cancel() -> Weight { - (175_095_000 as Weight) - .saturating_add(T::DbWeight::get().reads(9 as Weight)) - .saturating_add(T::DbWeight::get().writes(8 as Weight)) + Weight::from_ref_time(175_095_000 as u64) + .saturating_add(T::DbWeight::get().reads(9 as u64)) + .saturating_add(T::DbWeight::get().writes(8 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming Streams (r:1 w:1) @@ -61,15 +61,15 @@ impl pallet_streaming::WeightInfo for WeightInfo { // Storage: Assets Account (r:2 w:2) // Storage: System Account (r:1 w:1) fn withdraw() -> Weight { - (133_003_000 as Weight) - .saturating_add(T::DbWeight::get().reads(7 as Weight)) - .saturating_add(T::DbWeight::get().writes(6 as Weight)) + Weight::from_ref_time(133_003_000 as u64) + .saturating_add(T::DbWeight::get().reads(7 as u64)) + .saturating_add(T::DbWeight::get().writes(6 as u64)) } // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: Streaming MinimumDeposits (r:0 w:1) fn set_minimum_deposit() -> Weight { - (35_267_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(35_267_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/runtime/vanilla/src/weights/pallet_timestamp.rs b/runtime/vanilla/src/weights/pallet_timestamp.rs index 11f0a6071..476ee5eb8 100644 --- a/runtime/vanilla/src/weights/pallet_timestamp.rs +++ b/runtime/vanilla/src/weights/pallet_timestamp.rs @@ -30,11 +30,11 @@ pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { // Storage: Timestamp Now (r:1 w:1) fn set() -> Weight { - (12_673_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(12_673_000 as u64) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } fn on_finalize() -> Weight { - (8_620_000 as Weight) + Weight::from_ref_time(8_620_000 as u64) } } diff --git a/runtime/vanilla/src/weights/pallet_xcm_helper.rs b/runtime/vanilla/src/weights/pallet_xcm_helper.rs index 4865118b6..1c554d5dc 100644 --- a/runtime/vanilla/src/weights/pallet_xcm_helper.rs +++ b/runtime/vanilla/src/weights/pallet_xcm_helper.rs @@ -31,8 +31,8 @@ impl pallet_xcm_helper::WeightInfo for WeightInfo { // Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1) // Storage: XcmHelper XcmWeightFee (r:1 w:1) fn update_xcm_weight_fee() -> Weight { - (38_001_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(38_001_000 as u64) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } } diff --git a/support/Cargo.toml b/support/Cargo.toml index c5278dd79..43167ce58 100644 --- a/support/Cargo.toml +++ b/support/Cargo.toml @@ -9,20 +9,20 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] codec = { package = 'parity-scale-codec', version = '3.1.5', features = ['max-encoded-len'], default-features = false } -frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +frame-support = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } log = { version = '0.4', default-features = false } num-bigint = { default-features = false, version = '0.4' } num-traits = { default-features = false, version = '0.2' } scale-info = { version = '2.1', default-features = false, features = ['derive'] } serde = { version = '1.0.136', features = ['derive'], optional = true } -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28', default-features = false } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32', default-features = false } substrate-fixed = { git = 'https://github.com/encointer/substrate-fixed.git', default-features = false } [dev-dependencies] -sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.28' } +sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.32' } [features] default = ['std']