From 2caeb6621a59cbf37829d6a80bc2b89195959d45 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Tue, 27 Sep 2022 15:06:41 +0000 Subject: [PATCH] build: upgrade to polkadot-v0.9.29 --- Cargo.dev.toml | 130 +++++++++--------- asset-registry/Cargo.toml | 38 ++--- asset-registry/src/impls.rs | 18 +-- asset-registry/src/mock/para.rs | 8 +- asset-registry/src/weights.rs | 6 +- auction/Cargo.toml | 12 +- auction/src/weights.rs | 18 +-- authority/Cargo.toml | 16 +-- authority/src/mock.rs | 2 +- authority/src/tests.rs | 2 +- authority/src/weights.rs | 48 +++---- bencher/Cargo.toml | 24 ++-- bencher/test/Cargo.toml | 12 +- benchmarking/Cargo.toml | 18 +-- currencies/Cargo.toml | 14 +- currencies/src/default_weight.rs | 18 +-- currencies/src/weights.rs | 30 ++-- gradually-update/Cargo.toml | 12 +- gradually-update/src/default_weight.rs | 20 +-- gradually-update/src/lib.rs | 2 +- nft/Cargo.toml | 12 +- oracle/Cargo.toml | 14 +- oracle/rpc/Cargo.toml | 6 +- oracle/rpc/runtime-api/Cargo.toml | 4 +- oracle/src/weights.rs | 14 +- payments/Cargo.toml | 12 +- payments/src/lib.rs | 3 +- payments/src/mock.rs | 2 +- payments/src/weights.rs | 108 +++++++-------- rewards/Cargo.toml | 14 +- tokens/Cargo.toml | 16 +-- tokens/rpc/Cargo.toml | 12 +- tokens/rpc/runtime-api/Cargo.toml | 6 +- tokens/src/weights.rs | 30 ++-- traits/Cargo.toml | 10 +- traits/src/xcm_transfer.rs | 3 +- unknown-tokens/Cargo.toml | 14 +- utilities/Cargo.toml | 10 +- vesting/Cargo.toml | 14 +- vesting/src/default_weight.rs | 22 +-- vesting/src/weights.rs | 22 +-- weight-meter/Cargo.toml | 14 +- weight-meter/src/meter_no_std.rs | 2 +- weight-meter/src/meter_std.rs | 2 +- weight-meter/src/mock.rs | 2 +- weight-meter/src/tests.rs | 16 +-- .../weight-meter-procedural/src/lib.rs | 4 +- xcm-support/Cargo.toml | 10 +- xcm/Cargo.toml | 12 +- xtokens/Cargo.toml | 40 +++--- xtokens/src/lib.rs | 2 +- xtokens/src/mock/para.rs | 8 +- xtokens/src/mock/para_relative_view.rs | 8 +- xtokens/src/mock/para_teleport.rs | 8 +- 54 files changed, 463 insertions(+), 461 deletions(-) diff --git a/Cargo.dev.toml b/Cargo.dev.toml index 6628b5d54..ae0b53161 100644 --- a/Cargo.dev.toml +++ b/Cargo.dev.toml @@ -32,72 +32,72 @@ resolver = "2" split-debuginfo = "unpacked" [patch.'https://github.com/paritytech/substrate'] -frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -frame-support = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -frame-system = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-session = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sc-executor = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sc-utils = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-api = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-authorship = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-core = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-io = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-session = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-staking = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-std = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-storage = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-tasks = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-trie = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-version = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "34a0621761c4a333cb2074ff720f7acbfb92dbb8" } +frame-benchmarking = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +frame-support = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +frame-system = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-authorship = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-babe = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-balances = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-elections-phragmen = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-scheduler = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-session = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-staking = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-timestamp = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-treasury = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-vesting = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +pallet-transaction-payment = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sc-client-api = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sc-client-db = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sc-executor = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sc-executor-common = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sc-executor-wasmi = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sc-utils = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-api = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-application-crypto = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-arithmetic = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-authority-discovery = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-authorship = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-blockchain = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-consensus = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-consensus-slots = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-core = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-debug-derive = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-externalities = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-inherents = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-io = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-keystore = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-npos-elections = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-panic-handler = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-runtime = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-runtime-interface = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-session = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-staking = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-state-machine = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-std = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-storage = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-tasks = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-timestamp = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-trie = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-version = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-wasm-interface = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-tracing = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech//substrate", rev = "7c4ac358c29c9748c6e8ed4e05910504cd01a3b9" } [patch.'https://github.com/paritytech/cumulus'] -cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "15f48687e545e4b171a0af1065cec59002bc7145" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "15f48687e545e4b171a0af1065cec59002bc7145" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "15f48687e545e4b171a0af1065cec59002bc7145" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "15f48687e545e4b171a0af1065cec59002bc7145" } -parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "15f48687e545e4b171a0af1065cec59002bc7145" } +cumulus-primitives-core = { git = "https://github.com/paritytech//cumulus", rev = "2fa95572487cfcf8dbe6941bf93545c39d47f784" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "2fa95572487cfcf8dbe6941bf93545c39d47f784" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech//cumulus", rev = "2fa95572487cfcf8dbe6941bf93545c39d47f784" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech//cumulus", rev = "2fa95572487cfcf8dbe6941bf93545c39d47f784" } +parachain-info = { git = "https://github.com/paritytech//cumulus", rev = "2fa95572487cfcf8dbe6941bf93545c39d47f784" } [patch.'https://github.com/paritytech/polkadot'] -pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "314298c32ac6df996ea8f3fe23fa5d3768340066" } -polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "314298c32ac6df996ea8f3fe23fa5d3768340066" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "314298c32ac6df996ea8f3fe23fa5d3768340066" } -polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "314298c32ac6df996ea8f3fe23fa5d3768340066" } -polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "314298c32ac6df996ea8f3fe23fa5d3768340066" } -xcm = { git = "https://github.com/paritytech//polkadot", rev = "314298c32ac6df996ea8f3fe23fa5d3768340066" } -xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "314298c32ac6df996ea8f3fe23fa5d3768340066" } -xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "314298c32ac6df996ea8f3fe23fa5d3768340066" } -xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "314298c32ac6df996ea8f3fe23fa5d3768340066" } +pallet-xcm = { git = "https://github.com/paritytech//polkadot", rev = "94078b44fb6c9767bf60ffcaaa3be40681be5a76" } +polkadot-core-primitives = { git = "https://github.com/paritytech//polkadot", rev = "94078b44fb6c9767bf60ffcaaa3be40681be5a76" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech//polkadot", rev = "94078b44fb6c9767bf60ffcaaa3be40681be5a76" } +polkadot-parachain = { git = "https://github.com/paritytech//polkadot", rev = "94078b44fb6c9767bf60ffcaaa3be40681be5a76" } +polkadot-primitives = { git = "https://github.com/paritytech//polkadot", rev = "94078b44fb6c9767bf60ffcaaa3be40681be5a76" } +xcm = { git = "https://github.com/paritytech//polkadot", rev = "94078b44fb6c9767bf60ffcaaa3be40681be5a76" } +xcm-executor = { git = "https://github.com/paritytech//polkadot", rev = "94078b44fb6c9767bf60ffcaaa3be40681be5a76" } +xcm-builder = { git = "https://github.com/paritytech//polkadot", rev = "94078b44fb6c9767bf60ffcaaa3be40681be5a76" } +xcm-simulator = { git = "https://github.com/paritytech//polkadot", rev = "94078b44fb6c9767bf60ffcaaa3be40681be5a76" } diff --git a/asset-registry/Cargo.toml b/asset-registry/Cargo.toml index a71262564..0d069e18c 100644 --- a/asset-registry/Cargo.toml +++ b/asset-registry/Cargo.toml @@ -13,37 +13,37 @@ serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } # substrate -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } # polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } # orml orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] # substrate -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" } # polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" } # orml orml-tokens = { path = "../tokens" } diff --git a/asset-registry/src/impls.rs b/asset-registry/src/impls.rs index 1703ebea8..6dc50b8f1 100644 --- a/asset-registry/src/impls.rs +++ b/asset-registry/src/impls.rs @@ -12,7 +12,7 @@ use sp_runtime::{ ArithmeticError, FixedU128, }; use sp_std::prelude::*; -use xcm::latest::prelude::*; +use xcm::latest::{prelude::*, Weight as XcmWeight}; use xcm::VersionedMultiLocation; use xcm_builder::TakeRevenue; use xcm_executor::{traits::WeightTrader, Assets}; @@ -55,7 +55,7 @@ pub struct FixedRateAssetRegistryTrader(PhantomD impl WeightToFeeConverter for FixedRateAssetRegistryTrader

{ fn convert_weight_to_fee(location: &MultiLocation, weight: Weight) -> Option { let fee_per_second = P::get_fee_per_second(location)?; - let weight_ratio = FixedU128::saturating_from_rational(weight as u128, WEIGHT_PER_SECOND as u128); + let weight_ratio = FixedU128::saturating_from_rational(weight.ref_time(), WEIGHT_PER_SECOND.ref_time() as u128); let amount = weight_ratio.saturating_mul_int(fee_per_second); Some(amount) } @@ -89,7 +89,7 @@ impl WeightTrader for AssetRegistryTrad } } - fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result { + fn buy_weight(&mut self, weight: XcmWeight, payment: Assets) -> Result { log::trace!( target: "xcm::weight", "AssetRegistryTrader::buy_weight weight: {:?}, payment: {:?}", @@ -104,7 +104,7 @@ impl WeightTrader for AssetRegistryTrad continue; } - if let Some(fee_increase) = W::convert_weight_to_fee(location, weight) { + if let Some(fee_increase) = W::convert_weight_to_fee(location, Weight::from_ref_time(weight)) { if fee_increase == 0 { // if the fee is set very low it could lead to zero fees, in which case // constructing the fee asset item to subtract from payment would fail. @@ -115,12 +115,14 @@ impl WeightTrader for AssetRegistryTrad if let Ok(unused) = payment.clone().checked_sub((asset.clone(), fee_increase).into()) { let (existing_weight, existing_fee) = match self.bought_weight { Some(ref x) => (x.weight, x.amount), - None => (0, 0), + None => (Weight::zero(), 0), }; self.bought_weight = Some(BoughtWeight { amount: existing_fee.checked_add(fee_increase).ok_or(XcmError::Overflow)?, - weight: existing_weight.checked_add(weight).ok_or(XcmError::Overflow)?, + weight: existing_weight + .checked_add(&Weight::from_ref_time(weight)) + .ok_or(XcmError::Overflow)?, asset_location: location.clone(), }); return Ok(unused); @@ -131,12 +133,12 @@ impl WeightTrader for AssetRegistryTrad Err(XcmError::TooExpensive) } - fn refund_weight(&mut self, weight: Weight) -> Option { + fn refund_weight(&mut self, weight: XcmWeight) -> Option { log::trace!(target: "xcm::weight", "AssetRegistryTrader::refund_weight weight: {:?}", weight); match self.bought_weight { Some(ref mut bought) => { - let new_weight = bought.weight.saturating_sub(weight); + let new_weight = bought.weight.saturating_sub(Weight::from_ref_time(weight)); let new_amount = W::convert_weight_to_fee(&bought.asset_location, new_weight)?; let refunded_amount = bought.amount.saturating_sub(new_amount); diff --git a/asset-registry/src/mock/para.rs b/asset-registry/src/mock/para.rs index 3d22880e6..5911c7eeb 100644 --- a/asset-registry/src/mock/para.rs +++ b/asset-registry/src/mock/para.rs @@ -8,7 +8,7 @@ use frame_support::traits::{EnsureOrigin, EnsureOriginWithArg}; use frame_support::{ construct_runtime, match_types, ord_parameter_types, parameter_types, traits::{ConstU128, ConstU32, ConstU64, Everything, Nothing}, - weights::{constants::WEIGHT_PER_SECOND, Weight}, + weights::constants::WEIGHT_PER_SECOND, PalletId, }; use frame_system::{EnsureRoot, EnsureSignedBy}; @@ -26,7 +26,7 @@ use sp_runtime::{ traits::{AccountIdConversion, Convert, IdentityLookup}, AccountId32, }; -use xcm::latest::prelude::*; +use xcm::latest::{prelude::*, Weight}; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedWeightBounds, LocationInverter, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, @@ -145,8 +145,8 @@ impl orml_asset_registry::Config for 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.ref_time() / 4; + pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; } impl parachain_info::Config for Runtime {} diff --git a/asset-registry/src/weights.rs b/asset-registry/src/weights.rs index 9f4a3d596..4f3f673d5 100644 --- a/asset-registry/src/weights.rs +++ b/asset-registry/src/weights.rs @@ -18,12 +18,12 @@ pub trait WeightInfo { /// Default weights. impl WeightInfo for () { fn register_asset() -> Weight { - 0 + Weight::zero() } fn update_asset() -> Weight { - 0 + Weight::zero() } fn set_asset_location() -> Weight { - 0 + Weight::zero() } } diff --git a/auction/Cargo.toml b/auction/Cargo.toml index 2970f29cc..5600f4e36 100644 --- a/auction/Cargo.toml +++ b/auction/Cargo.toml @@ -12,16 +12,16 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/auction/src/weights.rs b/auction/src/weights.rs index 9dcb4f32d..96fa19293 100644 --- a/auction/src/weights.rs +++ b/auction/src/weights.rs @@ -37,17 +37,17 @@ pub trait WeightInfo { /// Default weights. impl WeightInfo for () { fn bid_collateral_auction() -> Weight { - (108_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(8 as Weight)) - .saturating_add(RocksDbWeight::get().writes(9 as Weight)) + Weight::from_ref_time(108_000_000) + .saturating_add(RocksDbWeight::get().reads(8 as u64)) + .saturating_add(RocksDbWeight::get().writes(9 as u64)) } fn on_finalize(c: u32, ) -> Weight { - (9_779_000 as Weight) + Weight::from_ref_time(9_779_000) // Standard Error: 13_000 - .saturating_add((57_962_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(10 as Weight)) - .saturating_add(RocksDbWeight::get().reads((3 as Weight).saturating_mul(c as Weight))) - .saturating_add(RocksDbWeight::get().writes(7 as Weight)) - .saturating_add(RocksDbWeight::get().writes((3 as Weight).saturating_mul(c as Weight))) + .saturating_add(Weight::from_ref_time(57_962_000).saturating_mul(c as u64)) + .saturating_add(RocksDbWeight::get().reads(10 as u64)) + .saturating_add(RocksDbWeight::get().reads((3 as u64).saturating_mul(c as u64))) + .saturating_add(RocksDbWeight::get().writes(7 as u64)) + .saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(c as u64))) } } diff --git a/authority/Cargo.toml b/authority/Cargo.toml index 7250d190a..8613da1f9 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -12,16 +12,16 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/authority/src/mock.rs b/authority/src/mock.rs index 1335f0447..c34890c26 100644 --- a/authority/src/mock.rs +++ b/authority/src/mock.rs @@ -24,7 +24,7 @@ pub type BlockNumber = u64; parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(2_000_000_000_000); + frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(2_000_000_000_000)); } impl frame_system::Config for Runtime { diff --git a/authority/src/tests.rs b/authority/src/tests.rs index 2f0ddc470..3d64f889e 100644 --- a/authority/src/tests.rs +++ b/authority/src/tests.rs @@ -456,7 +456,7 @@ fn trigger_call_works() { // wrong call weight bound assert_noop!( - Authority::trigger_call(Origin::signed(1), hash, call_weight_bound - 1), + Authority::trigger_call(Origin::signed(1), hash, call_weight_bound - Weight::from_ref_time(1)), Error::::WrongCallWeightBound ); diff --git a/authority/src/weights.rs b/authority/src/weights.rs index 8d595441e..cc4dd2db5 100644 --- a/authority/src/weights.rs +++ b/authority/src/weights.rs @@ -43,45 +43,45 @@ pub trait WeightInfo { /// Default weights. impl WeightInfo for () { fn dispatch_as() -> Weight { - (12_000_000 as Weight) + Weight::from_ref_time(12_000_000) } fn schedule_dispatch_without_delay() -> Weight { - (30_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(30_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } fn schedule_dispatch_with_delay() -> Weight { - (32_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(32_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } fn fast_track_scheduled_dispatch() -> Weight { - (42_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(42_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } fn delay_scheduled_dispatch() -> Weight { - (42_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(42_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } fn cancel_scheduled_dispatch() -> Weight { - (29_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(29_000_000) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn authorize_call() -> Weight { - (14_000_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(14_000_000) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn remove_authorized_call() -> Weight { - (16_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(16_000_000) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn trigger_call() -> Weight { - (29_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(29_000_000) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/bencher/Cargo.toml b/bencher/Cargo.toml index 62909c3e1..a1b190413 100644 --- a/bencher/Cargo.toml +++ b/bencher/Cargo.toml @@ -26,18 +26,18 @@ hash-db = { version = "0.15.2", default-features = false, optional = true } bencher-procedural = { path = "bencher-procedural", default-features = false } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.28" } -sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.28" } -sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.28" } -sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.28" } -sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.28" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.28" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.29" } +sc-executor = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["wasmtime"], optional = true , branch = "polkadot-v0.9.29" } +sc-executor-common = { git = "https://github.com/paritytech/substrate", optional = true , branch = "polkadot-v0.9.29" } +sc-client-db = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["rocksdb"], optional = true , branch = "polkadot-v0.9.29" } +sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.29" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true , branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/bencher/test/Cargo.toml b/bencher/test/Cargo.toml index f091f126d..f67c2fc60 100644 --- a/bencher/test/Cargo.toml +++ b/bencher/test/Cargo.toml @@ -15,16 +15,16 @@ required-features = ["bench"] serde = { version = "1.0.136", optional = true } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } orml-bencher = { path = "..", default-features = false } orml-weight-meter = { path = "../../weight-meter", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/benchmarking/Cargo.toml b/benchmarking/Cargo.toml index b0b9b5b33..392930608 100644 --- a/benchmarking/Cargo.toml +++ b/benchmarking/Cargo.toml @@ -14,19 +14,19 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } log = { version = "0.4.17", default-features = false } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime-interface = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-storage = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } [dev-dependencies] hex-literal = "0.3.4" -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = [ "std" ] diff --git a/currencies/Cargo.toml b/currencies/Cargo.toml index 5d07d3fc6..48c78ad9f 100644 --- a/currencies/Cargo.toml +++ b/currencies/Cargo.toml @@ -12,18 +12,18 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -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.29" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.4.1-dev" } diff --git a/currencies/src/default_weight.rs b/currencies/src/default_weight.rs index 079c8ced4..2054fd152 100644 --- a/currencies/src/default_weight.rs +++ b/currencies/src/default_weight.rs @@ -8,22 +8,22 @@ use frame_support::weights::{constants::RocksDbWeight as DbWeight, Weight}; impl crate::WeightInfo for () { fn transfer_non_native_currency() -> Weight { - (172_011_000 as Weight) - .saturating_add(DbWeight::get().reads(5 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(172_011_000) + .saturating_add(DbWeight::get().reads(5 as u64)) + .saturating_add(DbWeight::get().writes(2 as u64)) } fn transfer_native_currency() -> Weight { - (43_023_000 as Weight) + Weight::from_ref_time(43_023_000) } fn update_balance_non_native_currency() -> Weight { - (137_440_000 as Weight) - .saturating_add(DbWeight::get().reads(5 as Weight)) - .saturating_add(DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(137_440_000) + .saturating_add(DbWeight::get().reads(5 as u64)) + .saturating_add(DbWeight::get().writes(2 as u64)) } fn update_balance_native_currency_creating() -> Weight { - (64_432_000 as Weight) + Weight::from_ref_time(64_432_000) } fn update_balance_native_currency_killing() -> Weight { - (62_595_000 as Weight) + Weight::from_ref_time(62_595_000) } } diff --git a/currencies/src/weights.rs b/currencies/src/weights.rs index a75ebb239..619190ddb 100644 --- a/currencies/src/weights.rs +++ b/currencies/src/weights.rs @@ -40,28 +40,28 @@ pub trait WeightInfo { /// Default weights. impl WeightInfo for () { fn transfer_non_native_currency() -> Weight { - (60_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(60_000_000) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) } fn transfer_native_currency() -> Weight { - (60_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(60_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn update_balance_non_native_currency() -> Weight { - (29_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(29_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } fn update_balance_native_currency_creating() -> Weight { - (31_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(31_000_000) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } fn update_balance_native_currency_killing() -> Weight { - (37_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(37_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } } diff --git a/gradually-update/Cargo.toml b/gradually-update/Cargo.toml index 190e95770..3d0c54430 100644 --- a/gradually-update/Cargo.toml +++ b/gradually-update/Cargo.toml @@ -12,12 +12,12 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/gradually-update/src/default_weight.rs b/gradually-update/src/default_weight.rs index 8ceb09e8f..995666607 100644 --- a/gradually-update/src/default_weight.rs +++ b/gradually-update/src/default_weight.rs @@ -8,19 +8,19 @@ use frame_support::weights::{constants::RocksDbWeight as DbWeight, Weight}; impl crate::WeightInfo for () { fn gradually_update() -> Weight { - (57_922_000 as Weight) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(57_922_000) + .saturating_add(DbWeight::get().reads(2 as u64)) + .saturating_add(DbWeight::get().writes(1 as u64)) } fn cancel_gradually_update() -> Weight { - (66_687_000 as Weight) - .saturating_add(DbWeight::get().reads(1 as Weight)) - .saturating_add(DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(66_687_000) + .saturating_add(DbWeight::get().reads(1 as u64)) + .saturating_add(DbWeight::get().writes(1 as u64)) } fn on_finalize(u: u32) -> Weight { - (37_067_000 as Weight) - .saturating_add((20_890_000 as Weight).saturating_mul(u as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(37_067_000) + .saturating_add(Weight::from_ref_time(20_890_000).saturating_mul(u as u64)) + .saturating_add(DbWeight::get().reads(3 as u64)) + .saturating_add(DbWeight::get().writes(3 as u64)) } } diff --git a/gradually-update/src/lib.rs b/gradually-update/src/lib.rs index 240ffac88..14a5d08f0 100644 --- a/gradually-update/src/lib.rs +++ b/gradually-update/src/lib.rs @@ -146,7 +146,7 @@ pub mod module { if Self::_need_update(now) { T::WeightInfo::on_finalize(GraduallyUpdates::::get().len() as u32) } else { - 0 + Weight::zero() } } diff --git a/nft/Cargo.toml b/nft/Cargo.toml index 93ccc7f51..97c4aeebc 100644 --- a/nft/Cargo.toml +++ b/nft/Cargo.toml @@ -12,14 +12,14 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } [dev-dependencies] -sp-io = { 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-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/oracle/Cargo.toml b/oracle/Cargo.toml index 0555e0df0..a9d912101 100644 --- a/oracle/Cargo.toml +++ b/oracle/Cargo.toml @@ -12,18 +12,18 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/oracle/rpc/Cargo.toml b/oracle/rpc/Cargo.toml index f800d9bec..538241617 100644 --- a/oracle/rpc/Cargo.toml +++ b/oracle/rpc/Cargo.toml @@ -12,8 +12,8 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } orml-oracle-rpc-runtime-api = { path = "runtime-api", version = "0.4.1-dev" } diff --git a/oracle/rpc/runtime-api/Cargo.toml b/oracle/rpc/runtime-api/Cargo.toml index a8b65ab13..8f68b233b 100644 --- a/oracle/rpc/runtime-api/Cargo.toml +++ b/oracle/rpc/runtime-api/Cargo.toml @@ -8,8 +8,8 @@ description = "Runtime API module for orml-oracle-rpc." [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/oracle/src/weights.rs b/oracle/src/weights.rs index 36447bdd5..b1458bb3c 100644 --- a/oracle/src/weights.rs +++ b/oracle/src/weights.rs @@ -37,15 +37,15 @@ pub trait WeightInfo { /// Default weights. impl WeightInfo for () { fn feed_values(c: u32, ) -> Weight { - (16_800_000 as Weight) + Weight::from_ref_time(16_800_000) // Standard Error: 84_000 - .saturating_add((3_600_000 as Weight).saturating_mul(c as Weight)) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(c as Weight))) + .saturating_add(Weight::from_ref_time(3_600_000).saturating_mul(c as u64)) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) + .saturating_add(RocksDbWeight::get().writes((2 as u64).saturating_mul(c as u64))) } fn on_finalize() -> Weight { - (3_000_000 as Weight) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(3_000_000) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } diff --git a/payments/Cargo.toml b/payments/Cargo.toml index 0f64d8aaa..265c76428 100644 --- a/payments/Cargo.toml +++ b/payments/Cargo.toml @@ -14,18 +14,18 @@ parity-scale-codec = { version = "3.1.5", default-features = false, features = [ log = { version = "0.4.17", default-features = false } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } orml-traits = {path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] serde = { version = "1.0.136" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } orml-tokens = { path = "../tokens", version = "0.4.1-dev", default-features = false } diff --git a/payments/src/lib.rs b/payments/src/lib.rs index 4112a9caf..0a4158fc5 100644 --- a/payments/src/lib.rs +++ b/payments/src/lib.rs @@ -222,7 +222,8 @@ pub mod pallet { // calculate count of tasks that can be processed with remaining weight let possible_task_count: usize = remaining_weight - .saturating_div(cancel_weight) + .ref_time() + .saturating_div(cancel_weight.ref_time()) .try_into() .unwrap_or(MAX_TASKS_TO_PROCESS); diff --git a/payments/src/mock.rs b/payments/src/mock.rs index b31c9283e..18dd7cc2d 100644 --- a/payments/src/mock.rs +++ b/payments/src/mock.rs @@ -185,7 +185,7 @@ pub fn run_n_blocks(n: u64) -> u64 { }; // ensure the on_idle is executed >::register_extra_weight_unchecked( - Payment::on_idle(block_number, idle_weight), + Payment::on_idle(block_number, frame_support::weights::Weight::from_ref_time(idle_weight)), DispatchClass::Mandatory, ); diff --git a/payments/src/weights.rs b/payments/src/weights.rs index 941293c60..857953482 100644 --- a/payments/src/weights.rs +++ b/payments/src/weights.rs @@ -51,66 +51,66 @@ impl WeightInfo for SubstrateWeight { // Storage: Assets Accounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn pay(_x: u32, ) -> Weight { - (55_900_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(55_900_000) + .saturating_add(T::DbWeight::get().reads(5 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Assets Accounts (r:2 w:2) fn release() -> Weight { - (36_000_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(36_000_000) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Assets Accounts (r:2 w:2) // Storage: System Account (r:1 w:0) fn cancel() -> Weight { - (48_000_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(48_000_000) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Assets Accounts (r:2 w:2) fn resolve_payment() -> Weight { - (35_000_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(35_000_000) + .saturating_add(T::DbWeight::get().reads(3 as u64)) + .saturating_add(T::DbWeight::get().writes(3 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Payment ScheduledTasks (r:1 w:1) fn request_refund() -> Weight { - (20_000_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(20_000_000) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Payment ScheduledTasks (r:1 w:1) fn dispute_refund() -> Weight { - (21_000_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(21_000_000) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(2 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Sudo Key (r:1 w:0) fn request_payment() -> Weight { - (17_000_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(17_000_000) + .saturating_add(T::DbWeight::get().reads(2 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Assets Accounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn accept_and_pay() -> Weight { - (58_000_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(58_000_000) + .saturating_add(T::DbWeight::get().reads(4 as u64)) + .saturating_add(T::DbWeight::get().writes(4 as u64)) } // Storage: Payment ScheduledTasks (r:1 w:1) fn remove_task() -> Weight { - (4_000_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(4_000_000) + .saturating_add(T::DbWeight::get().reads(1 as u64)) + .saturating_add(T::DbWeight::get().writes(1 as u64)) } } @@ -121,65 +121,65 @@ impl WeightInfo for () { // Storage: Assets Accounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn pay(_x: u32, ) -> Weight { - (55_900_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(55_900_000) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Assets Accounts (r:2 w:2) fn release() -> Weight { - (36_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(36_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Assets Accounts (r:2 w:2) // Storage: System Account (r:1 w:0) fn cancel() -> Weight { - (48_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(48_000_000) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Assets Accounts (r:2 w:2) fn resolve_payment() -> Weight { - (35_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(35_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Payment ScheduledTasks (r:1 w:1) fn request_refund() -> Weight { - (20_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(20_000_000) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Payment ScheduledTasks (r:1 w:1) fn dispute_refund() -> Weight { - (21_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(21_000_000) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Sudo Key (r:1 w:0) fn request_payment() -> Weight { - (17_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(17_000_000) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } // Storage: Payment Payment (r:1 w:1) // Storage: Assets Accounts (r:2 w:2) // Storage: System Account (r:1 w:1) fn accept_and_pay() -> Weight { - (58_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(58_000_000) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) } // Storage: Payment ScheduledTasks (r:1 w:1) fn remove_task() -> Weight { - (4_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(4_000_000) + .saturating_add(RocksDbWeight::get().reads(1 as u64)) + .saturating_add(RocksDbWeight::get().writes(1 as u64)) } } \ No newline at end of file diff --git a/rewards/Cargo.toml b/rewards/Cargo.toml index 372184643..cbdc866a3 100644 --- a/rewards/Cargo.toml +++ b/rewards/Cargo.toml @@ -12,17 +12,17 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index c6ec45625..b0260f5cf 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -12,18 +12,18 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } [dev-dependencies] -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +pallet-elections-phragmen = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/tokens/rpc/Cargo.toml b/tokens/rpc/Cargo.toml index eb628a8ed..3431997be 100644 --- a/tokens/rpc/Cargo.toml +++ b/tokens/rpc/Cargo.toml @@ -12,11 +12,11 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } tracing = { version = "0.1.29" } tracing-core = { version = "0.1.28" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-blockchain = { 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-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } orml-tokens-rpc-runtime-api = { version = "0.4.1-dev", path = "./runtime-api" } diff --git a/tokens/rpc/runtime-api/Cargo.toml b/tokens/rpc/runtime-api/Cargo.toml index 198861b77..be03b4c10 100644 --- a/tokens/rpc/runtime-api/Cargo.toml +++ b/tokens/rpc/runtime-api/Cargo.toml @@ -8,9 +8,9 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } orml-tokens = { default-features = false, path = "../../../tokens" } [features] diff --git a/tokens/src/weights.rs b/tokens/src/weights.rs index 1f269425a..22c7867e3 100644 --- a/tokens/src/weights.rs +++ b/tokens/src/weights.rs @@ -39,28 +39,28 @@ pub trait WeightInfo { /// Default weights. impl WeightInfo for () { fn transfer() -> Weight { - (69_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(69_000_000) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) } fn transfer_all() -> Weight { - (69_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(5 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(69_000_000) + .saturating_add(RocksDbWeight::get().reads(5 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) } fn transfer_keep_alive() -> Weight { - (38_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(38_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } fn force_transfer() -> Weight { - (45_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(45_000_000) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } fn set_balance() -> Weight { - (34_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(34_000_000) + .saturating_add(RocksDbWeight::get().reads(3 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } } diff --git a/traits/Cargo.toml b/traits/Cargo.toml index 9b357a5d2..7a898947d 100644 --- a/traits/Cargo.toml +++ b/traits/Cargo.toml @@ -14,12 +14,12 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = num-traits = { version = "0.2.14", default-features = false } impl-trait-for-tuples = "0.2.2" -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false } diff --git a/traits/src/xcm_transfer.rs b/traits/src/xcm_transfer.rs index 18913cb00..797f2c50d 100644 --- a/traits/src/xcm_transfer.rs +++ b/traits/src/xcm_transfer.rs @@ -1,6 +1,5 @@ use frame_support::dispatch::DispatchResult; -use frame_support::weights::Weight; -use xcm::latest::prelude::*; +use xcm::latest::{prelude::*, Weight}; /// Abstraction over cross-chain token transfers. pub trait XcmTransfer { diff --git a/unknown-tokens/Cargo.toml b/unknown-tokens/Cargo.toml index 21c661bef..61c824d2b 100644 --- a/unknown-tokens/Cargo.toml +++ b/unknown-tokens/Cargo.toml @@ -12,18 +12,18 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } orml-xcm-support = { path = "../xcm-support", default-features = false } [dev-dependencies] -sp-io = { 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-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/utilities/Cargo.toml b/utilities/Cargo.toml index eb49daab0..bc755928f 100644 --- a/utilities/Cargo.toml +++ b/utilities/Cargo.toml @@ -12,15 +12,15 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true, features = ["derive"] } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } [dev-dependencies] serde_json = "1.0.64" -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml index 6f85b5225..b295f50a8 100644 --- a/vesting/Cargo.toml +++ b/vesting/Cargo.toml @@ -12,15 +12,15 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive" serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } [dev-dependencies] -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -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.29" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/vesting/src/default_weight.rs b/vesting/src/default_weight.rs index 9a4008031..d716ab759 100644 --- a/vesting/src/default_weight.rs +++ b/vesting/src/default_weight.rs @@ -8,20 +8,20 @@ use frame_support::weights::{constants::RocksDbWeight as DbWeight, Weight}; impl crate::WeightInfo for () { fn vested_transfer() -> Weight { - (310_862_000 as Weight) - .saturating_add(DbWeight::get().reads(4 as Weight)) - .saturating_add(DbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(310_862_000) + .saturating_add(DbWeight::get().reads(4 as u64)) + .saturating_add(DbWeight::get().writes(4 as u64)) } fn claim(i: u32) -> Weight { - (158_614_000 as Weight) - .saturating_add((958_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(DbWeight::get().reads(3 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(158_614_000) + .saturating_add(Weight::from_ref_time(958_000).saturating_mul(i as u64)) + .saturating_add(DbWeight::get().reads(3 as u64)) + .saturating_add(DbWeight::get().writes(3 as u64)) } fn update_vesting_schedules(i: u32) -> Weight { - (119_811_000 as Weight) - .saturating_add((2_320_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(DbWeight::get().reads(2 as Weight)) - .saturating_add(DbWeight::get().writes(3 as Weight)) + Weight::from_ref_time(119_811_000) + .saturating_add(Weight::from_ref_time(2_320_000).saturating_mul(i as u64)) + .saturating_add(DbWeight::get().reads(2 as u64)) + .saturating_add(DbWeight::get().writes(3 as u64)) } } diff --git a/vesting/src/weights.rs b/vesting/src/weights.rs index 0efb3bb8b..49c11e2ed 100644 --- a/vesting/src/weights.rs +++ b/vesting/src/weights.rs @@ -38,22 +38,22 @@ pub trait WeightInfo { /// Default weights. impl WeightInfo for () { fn vested_transfer() -> Weight { - (69_000_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(4 as Weight)) - .saturating_add(RocksDbWeight::get().writes(4 as Weight)) + Weight::from_ref_time(69_000_000) + .saturating_add(RocksDbWeight::get().reads(4 as u64)) + .saturating_add(RocksDbWeight::get().writes(4 as u64)) } fn claim(i: u32, ) -> Weight { - (31_747_000 as Weight) + Weight::from_ref_time(31_747_000) // Standard Error: 4_000 - .saturating_add((63_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + .saturating_add(Weight::from_ref_time(63_000).saturating_mul(i as u64)) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(2 as u64)) } fn update_vesting_schedules(i: u32, ) -> Weight { - (29_457_000 as Weight) + Weight::from_ref_time(29_457_000) // Standard Error: 4_000 - .saturating_add((117_000 as Weight).saturating_mul(i as Weight)) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(3 as Weight)) + .saturating_add(Weight::from_ref_time(117_000).saturating_mul(i as u64)) + .saturating_add(RocksDbWeight::get().reads(2 as u64)) + .saturating_add(RocksDbWeight::get().writes(3 as u64)) } } diff --git a/weight-meter/Cargo.toml b/weight-meter/Cargo.toml index f02bce5ed..51e4d589b 100644 --- a/weight-meter/Cargo.toml +++ b/weight-meter/Cargo.toml @@ -10,19 +10,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } weight-meter-procedural = { path = "weight-meter-procedural", default-features = false } [dev-dependencies] serde = { version = "1.0.136" } codec = { package = "parity-scale-codec", version = "3.0.0" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/weight-meter/src/meter_no_std.rs b/weight-meter/src/meter_no_std.rs index 60492fa6c..952d2239b 100644 --- a/weight-meter/src/meter_no_std.rs +++ b/weight-meter/src/meter_no_std.rs @@ -4,7 +4,7 @@ use super::{Meter, Weight}; static mut METER: Meter = Meter { - used_weight: 0, + used_weight: Weight::zero(), depth: 0, }; diff --git a/weight-meter/src/meter_std.rs b/weight-meter/src/meter_std.rs index 79b8693c7..7acbb8805 100644 --- a/weight-meter/src/meter_std.rs +++ b/weight-meter/src/meter_std.rs @@ -6,7 +6,7 @@ use std::cell::RefCell; thread_local! { static METER: RefCell = RefCell::new(Meter { - used_weight: 0, + used_weight: Weight::zero(), depth: 0, }); } diff --git a/weight-meter/src/mock.rs b/weight-meter/src/mock.rs index ee3e40a95..b7ad79eeb 100644 --- a/weight-meter/src/mock.rs +++ b/weight-meter/src/mock.rs @@ -124,7 +124,7 @@ pub mod test_module { Self::put_100(); } - #[orml_weight_meter::weight(Weight::MAX)] + #[orml_weight_meter::weight(Weight::MAX.ref_time())] fn max_weight() {} } } diff --git a/weight-meter/src/tests.rs b/weight-meter/src/tests.rs index 8d4c1bae3..2bc294c04 100644 --- a/weight-meter/src/tests.rs +++ b/weight-meter/src/tests.rs @@ -1,17 +1,17 @@ use crate::mock::*; -use frame_support::weights::PostDispatchInfo; +use frame_support::weights::{PostDispatchInfo, Weight}; #[test] fn used_weight_works() { new_test_ext().execute_with(|| { let result: PostDispatchInfo = TestModule::expect_100(Origin::signed(100)).unwrap(); // Check used weight is correct - assert_eq!(Some(100), result.actual_weight); + assert_eq!(Some(Weight::from_ref_time(100)), result.actual_weight); // Check that the method ran correctly assert_eq!(Some(100), TestModule::something()); let result: PostDispatchInfo = TestModule::expect_500(Origin::signed(100)).unwrap(); - assert_eq!(Some(500), result.actual_weight); + assert_eq!(Some(Weight::from_ref_time(500)), result.actual_weight); assert_eq!(Some(600), TestModule::something()); }); } @@ -21,13 +21,13 @@ fn used_weight_branch_works() { new_test_ext().execute_with(|| { let result: PostDispatchInfo = TestModule::expect_100_or_200(Origin::signed(100), false).unwrap(); // Check used weight is correct - assert_eq!(Some(100), result.actual_weight); + assert_eq!(Some(Weight::from_ref_time(100)), result.actual_weight); // Check that the method ran correctly assert_eq!(Some(100), TestModule::something()); let result: PostDispatchInfo = TestModule::expect_100_or_200(Origin::signed(100), true).unwrap(); // Check used weight is correct - assert_eq!(Some(200), result.actual_weight); + assert_eq!(Some(Weight::from_ref_time(200)), result.actual_weight); // Check that the method ran correctly assert_eq!(Some(300), TestModule::something()); }); @@ -38,7 +38,7 @@ fn used_weight_nested_calls_works() { new_test_ext().execute_with(|| { let result: PostDispatchInfo = TestModule::nested_inner_methods(Origin::signed(100)).unwrap(); // Check used weight is correct - assert_eq!(Some(300), result.actual_weight); + assert_eq!(Some(Weight::from_ref_time(300)), result.actual_weight); }); } @@ -47,7 +47,7 @@ fn exceed_max_weight_works() { new_test_ext().execute_with(|| { let result: PostDispatchInfo = TestModule::expect_max_weight(Origin::signed(100)).unwrap(); // Check used weight is correct - assert_eq!(Some(u64::MAX), result.actual_weight); + assert_eq!(Some(Weight::MAX), result.actual_weight); }); } @@ -55,6 +55,6 @@ fn exceed_max_weight_works() { fn nested_module_calls_works() { new_test_ext().execute_with(|| { let result = TestModule::nested_extrinsic(Origin::signed(0)).unwrap(); - assert_eq!(result.actual_weight, Some(700)); + assert_eq!(result.actual_weight, Some(Weight::from_ref_time(700))); }); } diff --git a/weight-meter/weight-meter-procedural/src/lib.rs b/weight-meter/weight-meter-procedural/src/lib.rs index 40abdf1e8..a2abf3671 100644 --- a/weight-meter/weight-meter-procedural/src/lib.rs +++ b/weight-meter/weight-meter-procedural/src/lib.rs @@ -14,7 +14,7 @@ pub fn start(attr: TokenStream, item: TokenStream) -> TokenStream { #(#attrs)* #[cfg_attr(feature = "bench", ::orml_bencher::benchmarkable)] #vis #sig { - ::orml_weight_meter::start(#weight); + ::orml_weight_meter::start(frame_support::weights::Weight::from_ref_time(#weight)); let result = #block; ::orml_weight_meter::finish(); result @@ -31,7 +31,7 @@ pub fn weight(attr: TokenStream, item: TokenStream) -> TokenStream { #(#attrs)* #[cfg_attr(feature = "bench", ::orml_bencher::benchmarkable)] #vis #sig { - ::orml_weight_meter::using(#weight); + ::orml_weight_meter::using(frame_support::weights::Weight::from_ref_time(#weight)); #block } }) diff --git a/xcm-support/Cargo.toml b/xcm-support/Cargo.toml index e3aff4251..db178fcbb 100644 --- a/xcm-support/Cargo.toml +++ b/xcm-support/Cargo.toml @@ -10,12 +10,12 @@ edition = "2021" [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false } diff --git a/xcm/Cargo.toml b/xcm/Cargo.toml index 60e5afce0..51d7586d6 100644 --- a/xcm/Cargo.toml +++ b/xcm/Cargo.toml @@ -11,15 +11,15 @@ edition = "2021" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } scale-info = { version = "2.1.2", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } [dev-dependencies] -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" } [features] default = ["std"] diff --git a/xtokens/Cargo.toml b/xtokens/Cargo.toml index 4d4705a75..371e364d5 100644 --- a/xtokens/Cargo.toml +++ b/xtokens/Cargo.toml @@ -13,19 +13,19 @@ serde = { version = "1.0.136", optional = true } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } # substrate -sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } -frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.28" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.29" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.28" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", default-features = false , branch = "polkadot-v0.9.29" } # polkadot -pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } -xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } -xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.28" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.29" } # orml orml-xcm-support = { path = "../xcm-support", default-features = false } @@ -33,21 +33,21 @@ orml-traits = { path = "../traits", default-features = false} [dev-dependencies] # substrate -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -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.29" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } # cumulus -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.29" } # polkadot -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } -xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" } +xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.29" } # orml orml-tokens = { path = "../tokens" } diff --git a/xtokens/src/lib.rs b/xtokens/src/lib.rs index 5853a7ecf..bfe5a7337 100644 --- a/xtokens/src/lib.rs +++ b/xtokens/src/lib.rs @@ -38,7 +38,7 @@ use sp_runtime::{ }; use sp_std::{prelude::*, result::Result}; -use xcm::prelude::*; +use xcm::{latest::Weight, prelude::*}; use xcm_executor::traits::{InvertLocation, WeightBounds}; pub use module::*; diff --git a/xtokens/src/mock/para.rs b/xtokens/src/mock/para.rs index 850d7eca6..ddad194b8 100644 --- a/xtokens/src/mock/para.rs +++ b/xtokens/src/mock/para.rs @@ -4,7 +4,7 @@ use crate as orml_xtokens; use frame_support::{ construct_runtime, match_types, parameter_types, traits::{ConstU128, ConstU32, ConstU64, Everything, Get, Nothing}, - weights::{constants::WEIGHT_PER_SECOND, Weight}, + weights::constants::WEIGHT_PER_SECOND, }; use frame_system::EnsureRoot; use sp_core::H256; @@ -17,7 +17,7 @@ use sp_runtime::{ use cumulus_primitives_core::{ChannelStatus, GetChannelInfo, ParaId}; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; -use xcm::latest::prelude::*; +use xcm::latest::{prelude::*, Weight}; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedWeightBounds, LocationInverter, NativeAsset, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, @@ -93,8 +93,8 @@ impl orml_tokens::Config for 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.ref_time() / 4; + pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; } impl parachain_info::Config for Runtime {} diff --git a/xtokens/src/mock/para_relative_view.rs b/xtokens/src/mock/para_relative_view.rs index 275f46b62..3da9c9885 100644 --- a/xtokens/src/mock/para_relative_view.rs +++ b/xtokens/src/mock/para_relative_view.rs @@ -4,7 +4,7 @@ use crate as orml_xtokens; use frame_support::{ construct_runtime, match_types, parameter_types, traits::{ConstU128, ConstU32, ConstU64, Everything, Nothing}, - weights::{constants::WEIGHT_PER_SECOND, Weight}, + weights::constants::WEIGHT_PER_SECOND, }; use frame_system::EnsureRoot; use sp_core::H256; @@ -17,7 +17,7 @@ use sp_runtime::{ use cumulus_primitives_core::{ChannelStatus, GetChannelInfo, ParaId}; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; -use xcm::latest::prelude::*; +use xcm::latest::{prelude::*, Weight}; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedWeightBounds, LocationInverter, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, @@ -96,8 +96,8 @@ impl orml_tokens::Config for 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.ref_time() / 4; + pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; } impl parachain_info::Config for Runtime {} diff --git a/xtokens/src/mock/para_teleport.rs b/xtokens/src/mock/para_teleport.rs index 6b320ca31..7dc8e5013 100644 --- a/xtokens/src/mock/para_teleport.rs +++ b/xtokens/src/mock/para_teleport.rs @@ -4,7 +4,7 @@ use crate as orml_xtokens; use frame_support::{ construct_runtime, match_types, parameter_types, traits::{ConstU128, ConstU32, ConstU64, Everything, Get, Nothing}, - weights::{constants::WEIGHT_PER_SECOND, Weight}, + weights::constants::WEIGHT_PER_SECOND, }; use frame_system::EnsureRoot; use sp_core::H256; @@ -17,7 +17,7 @@ use sp_runtime::{ use cumulus_primitives_core::{ChannelStatus, GetChannelInfo, ParaId}; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; -use xcm::latest::prelude::*; +use xcm::latest::{prelude::*, Weight}; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedWeightBounds, LocationInverter, NativeAsset, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, @@ -94,8 +94,8 @@ impl orml_tokens::Config for 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.ref_time() / 4; + pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.ref_time() / 4; } impl parachain_info::Config for Runtime {}