diff --git a/Cargo.lock b/Cargo.lock index f03aa617b0f681a990089d21cc59bfb1c40c1523..c1d7c71a5423d5bbd93a6d39c766bfbb7cb738d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1297,7 +1297,6 @@ dependencies = [ "sp-membership", "sp-runtime", "sp-staking", - "sp-std", "sp-weights", ] @@ -2585,8 +2584,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" dependencies = [ "bit-set", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -3271,7 +3270,6 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", "sp-transaction-pool", "sp-version", "sp-weights", @@ -3349,7 +3347,6 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", "sp-transaction-pool", "sp-version", "sp-weights", @@ -3496,8 +3493,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -3679,7 +3676,6 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", "sp-transaction-pool", "sp-version", "sp-weights", @@ -4179,7 +4175,7 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.7", + "regex-automata 0.4.8", "same-file", "walkdir", "winapi-util", @@ -5253,7 +5249,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall 0.5.6", + "redox_syscall 0.5.7", ] [[package]] @@ -6278,9 +6274,12 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "82881c4be219ab5faaf2ad5e5e5ecdff8c66bd7402ca3160975c93b24961afd1" +dependencies = [ + "portable-atomic", +] [[package]] name = "opaque-debug" @@ -6407,7 +6406,6 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", ] [[package]] @@ -6476,7 +6474,6 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std", ] [[package]] @@ -6516,7 +6513,6 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std", ] [[package]] @@ -6538,7 +6534,6 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", ] [[package]] @@ -6555,7 +6550,6 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", ] [[package]] @@ -6585,7 +6579,6 @@ dependencies = [ "sp-membership", "sp-runtime", "sp-state-machine", - "sp-std", ] [[package]] @@ -6626,7 +6619,6 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", ] [[package]] @@ -6663,7 +6655,6 @@ dependencies = [ "sp-io", "sp-membership", "sp-runtime", - "sp-std", ] [[package]] @@ -6694,7 +6685,6 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", ] [[package]] @@ -6712,7 +6702,6 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", ] [[package]] @@ -6744,7 +6733,6 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", ] [[package]] @@ -6775,7 +6763,6 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", ] [[package]] @@ -6824,8 +6811,8 @@ dependencies = [ "frame-system", "pallet-session", "parity-scale-codec", + "scale-info", "sp-runtime", - "sp-std", ] [[package]] @@ -6845,7 +6832,6 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", ] [[package]] @@ -6960,7 +6946,6 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", ] [[package]] @@ -6976,7 +6961,6 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", ] [[package]] @@ -7110,7 +7094,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.6", + "redox_syscall 0.5.7", "smallvec", "windows-targets 0.52.6", ] @@ -8091,9 +8075,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355ae415ccd3a04315d3f8246e86d67689ea74d88d915576e1589a351062a13b" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] @@ -8156,14 +8140,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -8177,13 +8161,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -8200,9 +8184,9 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -10847,7 +10831,6 @@ dependencies = [ "serde", "sp-inherents", "sp-runtime", - "sp-std", "thiserror", ] @@ -10951,7 +10934,6 @@ dependencies = [ "scale-info", "serde", "sp-runtime", - "sp-std", ] [[package]] @@ -11782,9 +11764,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", @@ -12372,9 +12354,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "uint" diff --git a/Cargo.toml b/Cargo.toml index f014f81de21512dd8909320b5e6f165e062157e3..8dafdaef0d90764edac8c1d7337156a78ce71423 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -181,7 +181,6 @@ sp-inherents = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch sp-offchain = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.16.0', default-features = false } sp-runtime = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.16.0', default-features = false } sp-session = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.16.0', default-features = false } -sp-std = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.16.0', default-features = false } sp-staking = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.16.0', default-features = false } sp-weights = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.16.0', default-features = false } sp-transaction-pool = { git = 'https://github.com/duniter/duniter-polkadot-sdk', branch = 'duniter-substrate-v1.16.0', default-features = false } diff --git a/docs/api/runtime-calls.md b/docs/api/runtime-calls.md index 501d7456a6e52f2753a2d86fa6b0231bb9ffaff5..3ab03a9326b6db1555a061be6a0dc5cd63c3f172 100644 --- a/docs/api/runtime-calls.md +++ b/docs/api/runtime-calls.md @@ -21,7 +21,7 @@ There are **86** user calls from **21** pallets. <details><summary><code>unlink_identity()</code></summary> -Taking 0.0115 % of a block. +Taking 0.0111 % of a block. ```rust ``` @@ -36,7 +36,7 @@ Unlink the identity associated with the account. <details><summary><code>schedule(when, maybe_periodic, priority, call)</code></summary> -Taking 0.0126 % of a block. +Taking 0.0122 % of a block. ```rust when: BlockNumberFor<T> @@ -53,7 +53,7 @@ Anonymously schedule a task. <details><summary><code>cancel(when, index)</code></summary> -Taking 0.0246 % of a block. +Taking 0.0236 % of a block. ```rust when: BlockNumberFor<T> @@ -68,7 +68,7 @@ Cancel an anonymously scheduled task. <details><summary><code>schedule_named(id, when, maybe_periodic, priority, call)</code></summary> -Taking 0.0195 % of a block. +Taking 0.0189 % of a block. ```rust id: TaskName @@ -86,7 +86,7 @@ Schedule a named task. <details><summary><code>cancel_named(id)</code></summary> -Taking 0.0257 % of a block. +Taking 0.0248 % of a block. ```rust id: TaskName @@ -135,7 +135,7 @@ Schedule a named task after a delay. <details><summary><code>set_retry(task, retries, period)</code></summary> -Taking 0.0124 % of a block. +Taking 0.012 % of a block. ```rust task: TaskAddress<BlockNumberFor<T>> @@ -162,7 +162,7 @@ original `total_retries`. <details><summary><code>set_retry_named(id, retries, period)</code></summary> -Taking 0.0135 % of a block. +Taking 0.0132 % of a block. ```rust id: TaskName @@ -189,7 +189,7 @@ original `total_retries`. <details><summary><code>cancel_retry(task)</code></summary> -Taking 0.0124 % of a block. +Taking 0.012 % of a block. ```rust task: TaskAddress<BlockNumberFor<T>> @@ -203,7 +203,7 @@ Removes the retry configuration of a task. <details><summary><code>cancel_retry_named(id)</code></summary> -Taking 0.0135 % of a block. +Taking 0.0132 % of a block. ```rust id: TaskName @@ -239,7 +239,7 @@ be reported. <details><summary><code>transfer_allow_death(dest, value)</code></summary> -Taking 0.0202 % of a block. +Taking 0.0199 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -260,7 +260,7 @@ The dispatch origin for this call must be `Signed` by the transactor. <details><summary><code>transfer_keep_alive(dest, value)</code></summary> -Taking 0.0128 % of a block. +Taking 0.0125 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -280,7 +280,7 @@ kill the origin account. <details><summary><code>transfer_all(dest, keep_alive)</code></summary> -Taking 0.0131 % of a block. +Taking 0.0129 % of a block. ```rust dest: AccountIdLookupOf<T> @@ -334,7 +334,7 @@ The dispatch origin for this call is `root`. <details><summary><code>force_adjust_total_issuance(direction, delta)</code></summary> -Taking 0.005 % of a block. +Taking 0.0048 % of a block. ```rust direction: AdjustmentDirection @@ -376,7 +376,7 @@ this `burn` operation will reduce total issuance by the amount _burned_. <details><summary><code>create_oneshot_account(dest, value)</code></summary> -Taking 0.0123 % of a block. +Taking 0.012 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -396,7 +396,7 @@ Origin account is kept alive. <details><summary><code>consume_oneshot_account(block_height, dest)</code></summary> -Taking 0.0202 % of a block. +Taking 0.0197 % of a block. ```rust block_height: BlockNumberFor<T> @@ -415,7 +415,7 @@ Consume a oneshot account and transfer its balance to an account <details><summary><code>consume_oneshot_account_with_remaining(block_height, dest, remaining_to, balance)</code></summary> -Taking 0.0274 % of a block. +Taking 0.0268 % of a block. ```rust block_height: BlockNumberFor<T> @@ -443,7 +443,7 @@ and the remaining amount to another account. <details><summary><code>invite_smith(receiver)</code></summary> -Taking 0.0237 % of a block. +Taking 0.0235 % of a block. ```rust receiver: T::IdtyIndex @@ -457,7 +457,7 @@ Invite a member of the Web of Trust to attempt becoming a Smith. <details><summary><code>accept_invitation()</code></summary> -Taking 0.0129 % of a block. +Taking 0.0127 % of a block. ```rust ``` @@ -470,7 +470,7 @@ Accept an invitation to become a Smith (must have been invited first). <details><summary><code>certify_smith(receiver)</code></summary> -Taking 0.0283 % of a block. +Taking 0.0279 % of a block. ```rust receiver: T::IdtyIndex @@ -499,7 +499,7 @@ Request to leave the set of validators two sessions later. <details><summary><code>go_online()</code></summary> -Taking 0.0187 % of a block. +Taking 0.0189 % of a block. ```rust ``` @@ -526,7 +526,7 @@ Declare new session keys to replace current ones. <details><summary><code>remove_member_from_blacklist(member_id)</code></summary> -Taking 0.0117 % of a block. +Taking 0.0114 % of a block. ```rust member_id: T::MemberId @@ -584,7 +584,7 @@ The weight of this call is defined by the caller. <details><summary><code>note_preimage(bytes)</code></summary> -Taking 0.3146 % of a block. +Taking 0.2947 % of a block. ```rust bytes: Vec<u8> @@ -601,7 +601,7 @@ the preimage. Otherwise, a deposit is taken proportional to the size of the prei <details><summary><code>unnote_preimage(hash)</code></summary> -Taking 0.0193 % of a block. +Taking 0.0184 % of a block. ```rust hash: T::Hash @@ -620,7 +620,7 @@ If `len` is provided, then it will be a much cheaper operation. <details><summary><code>request_preimage(hash)</code></summary> -Taking 0.0135 % of a block. +Taking 0.0129 % of a block. ```rust hash: T::Hash @@ -637,7 +637,7 @@ a user may have paid, and take the control of the preimage out of their hands. <details><summary><code>unrequest_preimage(hash)</code></summary> -Taking 0.0191 % of a block. +Taking 0.0184 % of a block. ```rust hash: T::Hash @@ -653,7 +653,7 @@ NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. <details><summary><code>ensure_updated(hashes)</code></summary> -Taking 20.0151 % of a block. +Taking 19.3634 % of a block. ```rust hashes: Vec<T::Hash> @@ -671,7 +671,7 @@ The caller pays no fee if at least 90% of pre-images were successfully updated. <details><summary><code>execute(proposal, length_bound)</code></summary> -Taking 0.0062 % of a block. +Taking 0.0061 % of a block. ```rust proposal: Box<<T as Config<I>>::Proposal> @@ -723,7 +723,7 @@ or put up for voting. <details><summary><code>vote(proposal, index, approve)</code></summary> -Taking 0.0131 % of a block. +Taking 0.0129 % of a block. ```rust proposal: T::Hash @@ -789,7 +789,7 @@ proposal. <details><summary><code>claim_uds()</code></summary> -Taking 0.022 % of a block. +Taking 0.0218 % of a block. ```rust ``` @@ -802,7 +802,7 @@ Claim Universal Dividends. <details><summary><code>transfer_ud(dest, value)</code></summary> -Taking 0.0213 % of a block. +Taking 0.021 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -817,7 +817,7 @@ Transfer some liquid free balance to another account, in milliUD. <details><summary><code>transfer_ud_keep_alive(dest, value)</code></summary> -Taking 0.0138 % of a block. +Taking 0.0135 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -834,7 +834,7 @@ Transfer some liquid free balance to another account in milliUD and keep the acc <details><summary><code>create_identity(owner_key)</code></summary> -Taking 0.0878 % of a block. +Taking 0.0856 % of a block. ```rust owner_key: T::AccountId @@ -852,7 +852,7 @@ The origin must be allowed to create an identity. <details><summary><code>confirm_identity(idty_name)</code></summary> -Taking 0.0334 % of a block. +Taking 0.0327 % of a block. ```rust idty_name: IdtyName @@ -870,7 +870,7 @@ The identity must have been created using `create_identity` before it can be con <details><summary><code>change_owner_key(new_key, new_key_sig)</code></summary> -Taking 0.0422 % of a block. +Taking 0.0424 % of a block. ```rust new_key: T::AccountId @@ -891,7 +891,7 @@ The origin should be the old identity owner key. <details><summary><code>revoke_identity(idty_index, revocation_key, revocation_sig)</code></summary> -Taking 0.0408 % of a block. +Taking 0.0399 % of a block. ```rust idty_index: T::IdtyIndex @@ -914,7 +914,7 @@ Any signed origin can execute this call. <details><summary><code>fix_sufficients(owner_key, inc)</code></summary> -Taking 0.0117 % of a block. +Taking 0.0113 % of a block. ```rust owner_key: T::AccountId @@ -937,7 +937,7 @@ reference count associated with a specified owner key. <details><summary><code>link_account(account_id, payload_sig)</code></summary> -Taking 0.0156 % of a block. +Taking 0.0155 % of a block. ```rust account_id: T::AccountId @@ -961,7 +961,7 @@ identity to sign the operation. <details><summary><code>add_cert(receiver)</code></summary> -Taking 0.0362 % of a block. +Taking 0.0356 % of a block. ```rust receiver: T::IdtyIndex @@ -975,7 +975,7 @@ Add a new certification. <details><summary><code>renew_cert(receiver)</code></summary> -Taking 0.0296 % of a block. +Taking 0.0292 % of a block. ```rust receiver: T::IdtyIndex @@ -989,7 +989,7 @@ Renew an existing certification. <details><summary><code>del_cert(issuer, receiver)</code></summary> -Taking 0.0262 % of a block. +Taking 0.0257 % of a block. ```rust issuer: T::IdtyIndex @@ -1006,7 +1006,7 @@ Remove one certification given the issuer and the receiver. <details><summary><code>remove_all_certs_received_by(idty_index)</code></summary> -Taking 7.0144 % of a block. +Taking 6.846 % of a block. ```rust idty_index: T::IdtyIndex @@ -1024,7 +1024,7 @@ Remove all certifications received by an identity. <details><summary><code>request_distance_evaluation()</code></summary> -Taking 0.0393 % of a block. +Taking 0.0389 % of a block. ```rust ``` @@ -1041,7 +1041,7 @@ evaluation will result in slashing for the caller. <details><summary><code>request_distance_evaluation_for(target)</code></summary> -Taking 0.0403 % of a block. +Taking 0.0399 % of a block. ```rust target: T::IdtyIndex @@ -1058,7 +1058,7 @@ This action is only permitted for unvalidated identities. <details><summary><code>update_evaluation(computation_result)</code></summary> -Taking 0.0349 % of a block. +Taking 0.0341 % of a block. ```rust computation_result: ComputationResult @@ -1075,7 +1075,7 @@ to the evaluation pool. <details><summary><code>force_update_evaluation(evaluator, computation_result)</code></summary> -Taking 0.0194 % of a block. +Taking 0.0192 % of a block. ```rust evaluator: <T as frame_system::Config>::AccountId @@ -1094,7 +1094,7 @@ It is primarily used for testing purposes. <details><summary><code>force_valid_distance_status(identity)</code></summary> -Taking 0.0275 % of a block. +Taking 0.027 % of a block. ```rust identity: <T as pallet_identity::Config>::IdtyIndex @@ -1185,7 +1185,7 @@ The dispatch origin for this call must be _Signed_. <details><summary><code>as_multi_threshold_1(other_signatories, call)</code></summary> -Taking 0.0052 % of a block. +Taking 0.005 % of a block. ```rust other_signatories: Vec<T::AccountId> @@ -1314,7 +1314,7 @@ NOTE: If this is the final approval, you will want to use `as_multi` instead. <details><summary><code>cancel_as_multi(threshold, other_signatories, timepoint, call_hash)</code></summary> -Taking 0.0126 % of a block. +Taking 0.0123 % of a block. ```rust threshold: u16 @@ -1353,7 +1353,7 @@ transaction for this dispatch. <details><summary><code>request(randomness_type, salt)</code></summary> -Taking 0.0413 % of a block. +Taking 0.0404 % of a block. ```rust randomness_type: RandomnessType @@ -1370,7 +1370,7 @@ Request randomness. <details><summary><code>proxy(real, force_proxy_type, call)</code></summary> -Taking 0.0063 % of a block. +Taking 0.0062 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1394,7 +1394,7 @@ Parameters: <details><summary><code>add_proxy(delegate, proxy_type, delay)</code></summary> -Taking 0.0124 % of a block. +Taking 0.0121 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1418,7 +1418,7 @@ zero. <details><summary><code>remove_proxy(delegate, proxy_type, delay)</code></summary> -Taking 0.0124 % of a block. +Taking 0.0121 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1440,7 +1440,7 @@ Parameters: <details><summary><code>remove_proxies()</code></summary> -Taking 0.0123 % of a block. +Taking 0.012 % of a block. ```rust ``` @@ -1458,7 +1458,7 @@ the unreserved fees will be inaccessible. **All access to this account will be l <details><summary><code>create_pure(proxy_type, delay, index)</code></summary> -Taking 0.0124 % of a block. +Taking 0.0121 % of a block. ```rust proxy_type: T::ProxyType @@ -1491,7 +1491,7 @@ Fails if there are insufficient funds to pay for deposit. <details><summary><code>kill_pure(spawner, proxy_type, index, height, ext_index)</code></summary> -Taking 0.0123 % of a block. +Taking 0.012 % of a block. ```rust spawner: AccountIdLookupOf<T> @@ -1524,7 +1524,7 @@ account whose `pure` call has corresponding parameters. <details><summary><code>announce(real, call_hash)</code></summary> -Taking 0.0204 % of a block. +Taking 0.0199 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1553,7 +1553,7 @@ Parameters: <details><summary><code>remove_announcement(real, call_hash)</code></summary> -Taking 0.0192 % of a block. +Taking 0.0186 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1577,7 +1577,7 @@ Parameters: <details><summary><code>reject_announcement(delegate, call_hash)</code></summary> -Taking 0.0191 % of a block. +Taking 0.0186 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1601,7 +1601,7 @@ Parameters: <details><summary><code>proxy_announced(delegate, real, force_proxy_type, call)</code></summary> -Taking 0.0205 % of a block. +Taking 0.02 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1630,7 +1630,7 @@ Parameters: <details><summary><code>batch(calls)</code></summary> -Taking 0.1113 % of a block. +Taking 0.1149 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1661,7 +1661,7 @@ event is deposited. <details><summary><code>as_derivative(index, call)</code></summary> -Taking 0.0049 % of a block. +Taking 0.0047 % of a block. ```rust index: u16 @@ -1688,7 +1688,7 @@ The dispatch origin for this call must be _Signed_. <details><summary><code>batch_all(calls)</code></summary> -Taking 0.1269 % of a block. +Taking 0.1241 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1714,7 +1714,7 @@ includes bypassing `frame_system::Config::BaseCallFilter`). <details><summary><code>force_batch(calls)</code></summary> -Taking 0.1163 % of a block. +Taking 0.1155 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1762,7 +1762,7 @@ The dispatch origin for this call must be _Root_. <details><summary><code>spend_local(amount, beneficiary)</code></summary> -Taking 0.0048 % of a block. +Taking 0.0045 % of a block. ```rust amount: BalanceOf<T, I> @@ -1793,7 +1793,7 @@ Emits [`Event::SpendApproved`] if successful. <details><summary><code>remove_approval(proposal_id)</code></summary> -Taking 0.0048 % of a block. +Taking 0.0056 % of a block. ```rust proposal_id: ProposalIndex @@ -1827,7 +1827,7 @@ The original deposit will no longer be returned. <details><summary><code>spend(asset_kind, amount, beneficiary, valid_from)</code></summary> -Taking 0.0048 % of a block. +Taking 0.0045 % of a block. ```rust asset_kind: Box<T::AssetKind> @@ -1869,7 +1869,7 @@ Emits [`Event::AssetSpendApproved`] if successful. <details><summary><code>payout(index)</code></summary> -Taking 0.0265 % of a block. +Taking 0.0057 % of a block. ```rust index: SpendIndex @@ -1901,7 +1901,7 @@ Emits [`Event::Paid`] if successful. <details><summary><code>check_status(index)</code></summary> -Taking 0.0118 % of a block. +Taking 0.0057 % of a block. ```rust index: SpendIndex @@ -1933,7 +1933,7 @@ Emits [`Event::SpendProcessed`] if the spend payout has succeed. <details><summary><code>void_spend(index)</code></summary> -Taking 0.0118 % of a block. +Taking 0.0057 % of a block. ```rust index: SpendIndex @@ -1970,7 +1970,7 @@ There are **18** root calls from **8** pallets. <details><summary><code>set_heap_pages(pages)</code></summary> -Taking 0.0172 % of a block. +Taking 0.0165 % of a block. ```rust pages: u64 @@ -1984,7 +1984,7 @@ Set the number of pages in the WebAssembly environment's heap. <details><summary><code>set_code(code)</code></summary> -Taking 4.3548 % of a block. +Taking 3.9234 % of a block. ```rust code: Vec<u8> @@ -2015,7 +2015,7 @@ version! <details><summary><code>set_storage(items)</code></summary> -Taking 5.7291 % of a block. +Taking 5.4867 % of a block. ```rust items: Vec<KeyValue> @@ -2029,7 +2029,7 @@ Set some items of storage. <details><summary><code>kill_storage(keys)</code></summary> -Taking 5.723 % of a block. +Taking 5.4797 % of a block. ```rust keys: Vec<Key> @@ -2043,7 +2043,7 @@ Kill some items from storage. <details><summary><code>kill_prefix(prefix, subkeys)</code></summary> -Taking 6.6205 % of a block. +Taking 6.4024 % of a block. ```rust prefix: Key @@ -2061,7 +2061,7 @@ the prefix we are removing to accurately calculate the weight of this function. <details><summary><code>authorize_upgrade(code_hash)</code></summary> -Taking 0.011 % of a block. +Taking 0.0105 % of a block. ```rust code_hash: T::Hash @@ -2099,7 +2099,7 @@ This call requires Root origin. <details><summary><code>apply_authorized_upgrade(code)</code></summary> -Taking 4.2186 % of a block. +Taking 4.1629 % of a block. ```rust code: Vec<u8> @@ -2142,7 +2142,7 @@ not been enacted yet. <details><summary><code>force_transfer(source, dest, value)</code></summary> -Taking 0.0269 % of a block. +Taking 0.0262 % of a block. ```rust source: AccountIdLookupOf<T> @@ -2159,7 +2159,7 @@ may be specified. <details><summary><code>force_unreserve(who, amount)</code></summary> -Taking 0.012 % of a block. +Taking 0.0117 % of a block. ```rust who: AccountIdLookupOf<T> @@ -2178,7 +2178,7 @@ Can only be called by ROOT. <details><summary><code>remove_member(member_id)</code></summary> -Taking 0.0686 % of a block. +Taking 0.0665 % of a block. ```rust member_id: T::MemberId @@ -2222,7 +2222,7 @@ Only callable by root. <details><summary><code>set_members(new_members, prime, old_count)</code></summary> -Taking 0.1595 % of a block. +Taking 0.1558 % of a block. ```rust new_members: Vec<T::AccountId> @@ -2261,7 +2261,7 @@ with other logic managing the member set. <details><summary><code>disapprove_proposal(proposal_hash)</code></summary> -Taking 0.0234 % of a block. +Taking 0.0226 % of a block. ```rust proposal_hash: T::Hash @@ -2286,7 +2286,7 @@ O(P) where P is the number of max proposals <details><summary><code>prune_item_identities_names(names)</code></summary> -Taking 5.7658 % of a block. +Taking 5.524 % of a block. ```rust names: Vec<IdtyName> @@ -2308,7 +2308,7 @@ in bulk. <details><summary><code>dispatch_as(as_origin, call)</code></summary> -Taking 0.005 % of a block. +Taking 0.0048 % of a block. ```rust as_origin: Box<T::PalletsOrigin> @@ -2339,7 +2339,7 @@ There are **4** disabled calls from **2** pallets. <details><summary><code>remark(remark)</code></summary> -Taking 0.0589 % of a block. +Taking 0.0546 % of a block. ```rust remark: Vec<u8> @@ -2355,7 +2355,7 @@ Can be executed by every `origin`. <details><summary><code>remark_with_event(remark)</code></summary> -Taking 0.2176 % of a block. +Taking 0.2093 % of a block. ```rust remark: Vec<u8> @@ -2371,7 +2371,7 @@ Make some on-chain remark and emit event. <details><summary><code>set_keys(keys, proof)</code></summary> -Taking 0.0388 % of a block. +Taking 0.0378 % of a block. ```rust keys: T::Keys @@ -2394,7 +2394,7 @@ The dispatch origin of this function must be signed. <details><summary><code>purge_keys()</code></summary> -Taking 0.0349 % of a block. +Taking 0.0336 % of a block. ```rust ``` diff --git a/docs/api/runtime-errors.md b/docs/api/runtime-errors.md index 4c0738b464bcabff6ecebbf014a063a16efce4e7..ac6528e906befc2b6d5b7f9068867f929903bfd3 100644 --- a/docs/api/runtime-errors.md +++ b/docs/api/runtime-errors.md @@ -1,6 +1,6 @@ # Runtime errors -There are **191** errors from **35** pallets. +There are **190** errors from **35** pallets. <ul> <li>System - 0 @@ -697,13 +697,6 @@ More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at Too few hashes were requested to be upgraded (i.e. zero). </details> </li> -<li> -<details> -<summary> -<code>NoCost</code> - 8</summary> -No ticket with a cost was returned by [`Config::Consideration`] to store the preimage. -</details> -</li> </ul> </li> <li>TechnicalCommittee - 23 diff --git a/docs/api/runtime-errors.po b/docs/api/runtime-errors.po index ff5647eaeb5c2b408f67d5f86429a51324d9884a..6be74ca09b7c1987f058632f6fcac7f59162b97c 100644 --- a/docs/api/runtime-errors.po +++ b/docs/api/runtime-errors.po @@ -176,8 +176,6 @@ msgid "Preimage.TooMany" msgstr "More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at once." msgid "Preimage.TooFew" msgstr "Too few hashes were requested to be upgraded (i.e. zero)." -msgid "Preimage.NoCost" -msgstr "No ticket with a cost was returned by [`Config::Consideration`] to store the preimage." msgid "TechnicalCommittee.NotMember" msgstr "Account is not a member" msgid "TechnicalCommittee.DuplicateProposal" diff --git a/pallets/authority-members/Cargo.toml b/pallets/authority-members/Cargo.toml index f5f21574af41bef616de061f5c4835fa7a59047e..36885c3bab0c77110fe3a75f38058e2242cb0ab8 100644 --- a/pallets/authority-members/Cargo.toml +++ b/pallets/authority-members/Cargo.toml @@ -33,7 +33,6 @@ std = [ "sp-runtime/std", "sp-staking/std", "sp-state-machine/std", - "sp-std/std", ] try-runtime = [ "frame-support/try-runtime", @@ -59,7 +58,6 @@ serde = { workspace = true, features = ["derive"] } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-staking = { workspace = true } -sp-std = { workspace = true } [dev-dependencies] sp-io = { workspace = true, default-features = true } diff --git a/pallets/authority-members/src/lib.rs b/pallets/authority-members/src/lib.rs index 7520d02e4dff90af47e247b8809dd2215da301e2..587e82aa343c51fbc62bf36d61d3755a68d536f4 100644 --- a/pallets/authority-members/src/lib.rs +++ b/pallets/authority-members/src/lib.rs @@ -63,9 +63,10 @@ pub use traits::*; pub use types::*; pub use weights::WeightInfo; +use codec::alloc::borrow::ToOwned; use frame_support::traits::Get; -use sp_runtime::traits::Convert; -use sp_std::prelude::*; +use scale_info::prelude::{collections::BTreeMap, vec, vec::Vec}; +use sp_runtime::traits::{Convert, IsMember}; #[frame_support::pallet] pub mod pallet { @@ -75,8 +76,6 @@ pub mod pallet { traits::{StorageVersion, UnfilteredDispatchable, ValidatorRegistration}, }; use frame_system::pallet_prelude::*; - use sp_runtime::traits::{Convert, IsMember}; - use sp_std::{collections::btree_map::BTreeMap, vec}; /// The current storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); @@ -661,7 +660,7 @@ impl<T: Config> pallet_session::historical::SessionManager<T::ValidatorId, T::Fu { fn new_session( new_index: SessionIndex, - ) -> Option<sp_std::vec::Vec<(T::ValidatorId, T::FullIdentification)>> { + ) -> Option<Vec<(T::ValidatorId, T::FullIdentification)>> { <Self as pallet_session::SessionManager<_>>::new_session(new_index).map(|validators_ids| { validators_ids .into_iter() @@ -672,7 +671,7 @@ impl<T: Config> pallet_session::historical::SessionManager<T::ValidatorId, T::Fu fn new_session_genesis( new_index: SessionIndex, - ) -> Option<sp_std::vec::Vec<(T::ValidatorId, T::FullIdentification)>> { + ) -> Option<Vec<(T::ValidatorId, T::FullIdentification)>> { <Self as pallet_session::SessionManager<_>>::new_session_genesis(new_index).map( |validators_ids| { validators_ids diff --git a/pallets/certification/Cargo.toml b/pallets/certification/Cargo.toml index fb661f28c5c556ede0083bda2b80de8cde50022f..da66e2a7ec65c2bb562a72b0747871ba462631c5 100644 --- a/pallets/certification/Cargo.toml +++ b/pallets/certification/Cargo.toml @@ -27,7 +27,6 @@ std = [ "sp-io/std", "sp-keystore/std", "sp-runtime/std", - "sp-std/std", ] try-runtime = [ "duniter-primitives/try-runtime", @@ -49,7 +48,6 @@ frame-system = { workspace = true } scale-info = { workspace = true, features = ["derive"] } sp-core = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } [dev-dependencies] maplit = { workspace = true, default-features = true } diff --git a/pallets/certification/src/lib.rs b/pallets/certification/src/lib.rs index caeaab9f3854c30f4cace8c476b4d893fffe18f7..08aa992f71627b50bc57fb8bf059eeb8b3dabc72 100644 --- a/pallets/certification/src/lib.rs +++ b/pallets/certification/src/lib.rs @@ -46,15 +46,14 @@ use crate::traits::*; use codec::Codec; use duniter_primitives::Idty; use frame_support::{pallet_prelude::*, traits::StorageVersion}; +use scale_info::prelude::{collections::BTreeMap, fmt::Debug, vec::Vec}; use sp_runtime::traits::AtLeast32BitUnsigned; -use sp_std::{fmt::Debug, vec::Vec}; #[frame_support::pallet] pub mod pallet { use super::*; use frame_system::pallet_prelude::*; use sp_runtime::traits::Saturating; - use sp_std::collections::btree_map::BTreeMap; /// The current storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); diff --git a/pallets/certification/src/tests.rs b/pallets/certification/src/tests.rs index fc8d4fb65db791fcaa9190615a4d4538c2330484..bc5a570734f89c5ad2738b4f86ce47052120038c 100644 --- a/pallets/certification/src/tests.rs +++ b/pallets/certification/src/tests.rs @@ -17,7 +17,7 @@ use crate::{mock::*, Error, Event}; use frame_support::{assert_noop, assert_ok}; use maplit::btreemap; -use sp_std::collections::btree_map::BTreeMap; +use scale_info::prelude::{collections::BTreeMap, vec}; #[test] fn test_must_receive_cert_before_can_issue() { diff --git a/pallets/distance/Cargo.toml b/pallets/distance/Cargo.toml index 8b8395e761d043fd1abe9ab1ba0ea2caabe83adf..f2aa02319eb4d9107072f8816345951b5b6ca709 100644 --- a/pallets/distance/Cargo.toml +++ b/pallets/distance/Cargo.toml @@ -37,7 +37,6 @@ std = [ "sp-io/std", "sp-keystore/std", "sp-runtime/std", - "sp-std/std", ] try-runtime = [ "frame-support/try-runtime", @@ -71,7 +70,6 @@ sp-core = { workspace = true } sp-distance = { workspace = true } sp-inherents = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } [dev-dependencies] sp-io = { workspace = true, default-features = true } diff --git a/pallets/distance/src/benchmarking.rs b/pallets/distance/src/benchmarking.rs index 363387437448096facb6d7bddc09f41056988d6c..bd44e676948414b4c674baa3e09b2bd87b33b196 100644 --- a/pallets/distance/src/benchmarking.rs +++ b/pallets/distance/src/benchmarking.rs @@ -23,6 +23,7 @@ use codec::Encode; use frame_benchmarking::v2::*; use frame_support::traits::{Get, OnFinalize, OnInitialize}; use frame_system::{pallet_prelude::BlockNumberFor, RawOrigin}; +use scale_info::prelude::vec; use sp_runtime::Perbill; use crate::Pallet; diff --git a/pallets/distance/src/lib.rs b/pallets/distance/src/lib.rs index ba5e800861a04cb357951b2ae2b41d06c2e86eb1..f63a8d613025bca059d2490319a72e5c23d8fbd5 100644 --- a/pallets/distance/src/lib.rs +++ b/pallets/distance/src/lib.rs @@ -92,7 +92,6 @@ use sp_runtime::{ traits::{One, Zero}, Saturating, }; -use sp_std::{convert::TryInto, prelude::*}; type IdtyIndex = u32; diff --git a/pallets/distance/src/median.rs b/pallets/distance/src/median.rs index 5569d6f26984e09b292b081071cb7378ab5ab12e..647109308b407a1bfb9ee87c362a53c828d98338 100644 --- a/pallets/distance/src/median.rs +++ b/pallets/distance/src/median.rs @@ -15,7 +15,7 @@ // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. use frame_support::pallet_prelude::*; -use sp_std::cmp::Ordering; +use scale_info::prelude::cmp::Ordering; /// Represents a median accumulator. #[derive(Clone, Debug, Decode, Default, Encode, TypeInfo)] diff --git a/pallets/distance/src/mock.rs b/pallets/distance/src/mock.rs index fa963500b2201913cccdbeac6bd039db0b7e07e2..5198424e0f7f4970210adef99c0355edf93bda3a 100644 --- a/pallets/distance/src/mock.rs +++ b/pallets/distance/src/mock.rs @@ -14,7 +14,6 @@ // You should have received a copy of the GNU Affero General Public License // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>. -use super::*; use crate::{self as pallet_distance}; use core::marker::PhantomData; use frame_support::{ diff --git a/pallets/duniter-account/Cargo.toml b/pallets/duniter-account/Cargo.toml index d09510ebca0b89865b1a21f6376fed6a134653e9..6f5d79aff488c6f3244065502027c639fdd92aff 100644 --- a/pallets/duniter-account/Cargo.toml +++ b/pallets/duniter-account/Cargo.toml @@ -36,7 +36,6 @@ std = [ "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-std/std", ] try-runtime = [ "frame-support/try-runtime", @@ -67,7 +66,6 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } -sp-std = { workspace = true } sp-runtime = { workspace = true } serde = { workspace = true, features = ["derive"] } pallet-transaction-payment = { workspace = true } diff --git a/pallets/duniter-account/src/lib.rs b/pallets/duniter-account/src/lib.rs index 1d824d0b0fcd00ff3984f32e429409ad3b3d61af..ddd56e0addf284638668be629f5a1b5e7e077374 100644 --- a/pallets/duniter-account/src/lib.rs +++ b/pallets/duniter-account/src/lib.rs @@ -55,8 +55,11 @@ use frame_support::{ use frame_system::pallet_prelude::*; use pallet_quota::traits::RefundFee; use pallet_transaction_payment::OnChargeTransaction; +use scale_info::prelude::{ + collections::{BTreeMap, BTreeSet}, + fmt::Debug, +}; use sp_runtime::traits::{DispatchInfoOf, PostDispatchInfoOf, Saturating}; -use sp_std::fmt::Debug; #[frame_support::pallet] pub mod pallet { @@ -101,10 +104,7 @@ pub mod pallet { #[pallet::genesis_config] pub struct GenesisConfig<T: Config> { - pub accounts: sp_std::collections::btree_map::BTreeMap< - T::AccountId, - GenesisAccountData<T::Balance, IdtyIdOf<T>>, - >, + pub accounts: BTreeMap<T::AccountId, GenesisAccountData<T::Balance, IdtyIdOf<T>>>, pub treasury_balance: T::Balance, } @@ -130,11 +130,7 @@ pub mod pallet { ); // ensure no duplicate - let endowed_accounts = self - .accounts - .keys() - .cloned() - .collect::<sp_std::collections::btree_set::BTreeSet<_>>(); + let endowed_accounts = self.accounts.keys().cloned().collect::<BTreeSet<_>>(); assert!( endowed_accounts.len() == self.accounts.len(), diff --git a/pallets/duniter-test-parameters/Cargo.toml b/pallets/duniter-test-parameters/Cargo.toml index 735c973357204e65c0b1e327412f5c8a49360306..7e58faf1a3287ac8631cd40b1dd131895e035738 100644 --- a/pallets/duniter-test-parameters/Cargo.toml +++ b/pallets/duniter-test-parameters/Cargo.toml @@ -26,7 +26,6 @@ std = [ "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-std/std", ] try-runtime = [ "frame-support/try-runtime", @@ -49,4 +48,3 @@ serde = { workspace = true, features = ["derive"] } sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } diff --git a/pallets/duniter-wot/Cargo.toml b/pallets/duniter-wot/Cargo.toml index 60cebeba82a3f9f621639df0d9ff88b4d7163e96..68e2dda4488de1e483037ad29561f4895256df0c 100644 --- a/pallets/duniter-wot/Cargo.toml +++ b/pallets/duniter-wot/Cargo.toml @@ -35,7 +35,6 @@ std = [ "sp-membership/std", "sp-runtime/std", "sp-state-machine/std", - "sp-std/std", ] try-runtime = [ "frame-support/try-runtime", @@ -66,7 +65,6 @@ sp-core = { workspace = true } sp-io = { workspace = true } sp-membership = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } [dev-dependencies] sp-state-machine = { workspace = true, default-features = true } diff --git a/pallets/duniter-wot/src/lib.rs b/pallets/duniter-wot/src/lib.rs index ef8d51f1f0f98b9fee6b2db9449db8f444a2115a..1a560bdf699808f4c7ee7d1da2f4c7189ec600e2 100644 --- a/pallets/duniter-wot/src/lib.rs +++ b/pallets/duniter-wot/src/lib.rs @@ -272,9 +272,8 @@ impl<T: Config> pallet_identity::traits::OnNewIdty<T> for Pallet<T> { if let Err(e) = <pallet_certification::Pallet<T>>::do_add_cert_checked(*creator, *idty_index, true) { - sp_std::if_std! { - println!("fail to force add cert: {:?}", e) - } + #[cfg(feature = "std")] + println!("fail to force add cert: {:?}", e) } } } @@ -392,9 +391,11 @@ impl<T: Config + pallet_distance::Config> pallet_distance::traits::OnValidDistan } else { // identity was removed before distance status was found // so it's ok to do nothing - sp_std::if_std! { - println!("identity was removed before distance status was found: {:?}", idty_index); - } + #[cfg(feature = "std")] + println!( + "identity was removed before distance status was found: {:?}", + idty_index + ); } } } diff --git a/pallets/identity/Cargo.toml b/pallets/identity/Cargo.toml index 66fde4ab4d1b65086d5b9eeb5b010bd676fef44d..7e163e2ab298f42ee421f0429d1eee12e79feab6 100644 --- a/pallets/identity/Cargo.toml +++ b/pallets/identity/Cargo.toml @@ -29,7 +29,6 @@ std = [ "sp-keystore/std", "sp-runtime/std", "sp-state-machine/std", - "sp-std/std", ] try-runtime = [ "duniter-primitives/try-runtime", @@ -53,7 +52,6 @@ serde = { workspace = true, features = ["derive"] } sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } [dev-dependencies] sp-keystore = { workspace = true, default-features = true } diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs index f09c2d31c59354158094edd155d75ba4676f6c89..981a029bab39cad33777bbc92f8210712189a37e 100644 --- a/pallets/identity/src/lib.rs +++ b/pallets/identity/src/lib.rs @@ -73,8 +73,8 @@ pub use weights::WeightInfo; use crate::traits::*; use codec::Codec; use frame_support::pallet_prelude::Weight; +use scale_info::prelude::{collections::BTreeSet, fmt::Debug, vec::Vec}; use sp_runtime::traits::{AtLeast32BitUnsigned, IdentifyAccount, One, Saturating, Verify, Zero}; -use sp_std::{fmt::Debug, prelude::*}; // icok = identity change owner key pub const NEW_OWNER_KEY_PAYLOAD_PREFIX: [u8; 4] = [b'i', b'c', b'o', b'k']; @@ -206,7 +206,7 @@ pub mod pallet { #[pallet::genesis_build] impl<T: Config> BuildGenesisConfig for GenesisConfig<T> { fn build(&self) { - let mut names = sp_std::collections::btree_set::BTreeSet::new(); + let mut names = BTreeSet::new(); for idty in &self.identities { assert!( !names.contains(&idty.name), diff --git a/pallets/identity/src/types.rs b/pallets/identity/src/types.rs index bb841489a16979c4ab21e64059f7e164c5ffed36..60d92bbb676fb34301dcc1a9ba80a99eca2cbf9c 100644 --- a/pallets/identity/src/types.rs +++ b/pallets/identity/src/types.rs @@ -18,7 +18,7 @@ use codec::{Decode, Encode}; use frame_support::pallet_prelude::*; -use scale_info::TypeInfo; +use scale_info::{prelude::vec::Vec, TypeInfo}; use serde::{Deserialize, Serialize}; /// Internal events related to identity. @@ -83,7 +83,7 @@ pub enum RemovalReason { Deserialize, TypeInfo, )] -pub struct IdtyName(pub sp_std::vec::Vec<u8>); +pub struct IdtyName(pub Vec<u8>); impl From<&str> for IdtyName { fn from(s: &str) -> Self { diff --git a/pallets/membership/Cargo.toml b/pallets/membership/Cargo.toml index 390acda8ed6063c7639979f1278878e874f6c4f6..f5cfa34a179623869b7f5c6a721af1fa95c28e97 100644 --- a/pallets/membership/Cargo.toml +++ b/pallets/membership/Cargo.toml @@ -26,7 +26,6 @@ std = [ "sp-io/std", "sp-membership/std", "sp-runtime/std", - "sp-std/std", ] try-runtime = [ "frame-support/try-runtime", @@ -49,7 +48,6 @@ sp-core = { workspace = true } sp-io = { workspace = true } sp-membership = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } [dev-dependencies] maplit = { workspace = true, default-features = true } diff --git a/pallets/membership/src/lib.rs b/pallets/membership/src/lib.rs index 683e5fe1cc0de36b23e69d76de7755c35ab5f66f..0a096b0a309bbcd093bf5caaac3c3ddfa82e7987 100644 --- a/pallets/membership/src/lib.rs +++ b/pallets/membership/src/lib.rs @@ -39,9 +39,9 @@ pub use pallet::*; pub use weights::WeightInfo; use frame_support::pallet_prelude::{Weight, *}; +use scale_info::prelude::{collections::BTreeMap, vec::Vec}; use sp_membership::{traits::*, MembershipData}; use sp_runtime::traits::Zero; -use sp_std::{collections::btree_map::BTreeMap, prelude::*}; #[cfg(feature = "runtime-benchmarks")] pub trait SetupBenchmark<IdtyId, AccountId> { diff --git a/pallets/offences/Cargo.toml b/pallets/offences/Cargo.toml index ecbda445539b281e775ba9efb8263d1dc791153a..5c8f387124e44acbc396cffcc8da3b3ac416618e 100644 --- a/pallets/offences/Cargo.toml +++ b/pallets/offences/Cargo.toml @@ -19,7 +19,6 @@ frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } sp-staking = { workspace = true } -sp-std = { workspace = true } [features] default = ["std"] @@ -33,7 +32,6 @@ std = [ "sp-io/std", "sp-runtime/std", "sp-staking/std", - "sp-std/std", ] runtime-benchmarks = [ "frame-support/runtime-benchmarks", diff --git a/pallets/offences/src/lib.rs b/pallets/offences/src/lib.rs index 66ee776938a46221898fe00fc1bf67e2729c8dc9..8b2d32cc4ef802160ec069dfcfe4a8a182248d2b 100644 --- a/pallets/offences/src/lib.rs +++ b/pallets/offences/src/lib.rs @@ -45,9 +45,9 @@ use core::marker::PhantomData; use codec::Encode; use frame_support::weights::Weight; +use scale_info::prelude::vec::Vec; use sp_runtime::traits::Hash; use sp_staking::offence::{Kind, Offence, OffenceDetails, OffenceError, ReportOffence}; -use sp_std::prelude::*; pub use pallet::*; diff --git a/pallets/oneshot-account/Cargo.toml b/pallets/oneshot-account/Cargo.toml index 6062608da310f87424086bf2686426902b96dadc..b0e9dda3671e62905ecd063ef737684daa3985f1 100644 --- a/pallets/oneshot-account/Cargo.toml +++ b/pallets/oneshot-account/Cargo.toml @@ -37,7 +37,6 @@ std = [ "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-std/std", ] [package.metadata.docs.rs] @@ -56,7 +55,6 @@ scale-info = { workspace = true, features = ["derive"] } sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } [dev-dependencies] pallet-balances = { workspace = true, default-features = true } diff --git a/pallets/oneshot-account/src/check_nonce.rs b/pallets/oneshot-account/src/check_nonce.rs index 0f1a2fccfb0aade09db2606065a82120aa8cbc5d..3d792e53b130a94d77800ad806b6d6fa2dc35e77 100644 --- a/pallets/oneshot-account/src/check_nonce.rs +++ b/pallets/oneshot-account/src/check_nonce.rs @@ -19,7 +19,10 @@ use crate::Config; use codec::{Decode, Encode}; use frame_support::{dispatch::DispatchInfo, traits::IsSubType}; //use frame_system::Config; -use scale_info::TypeInfo; +use scale_info::{ + prelude::fmt::{Debug, Formatter}, + TypeInfo, +}; use sp_runtime::{ traits::{DispatchInfoOf, Dispatchable, SignedExtension}, transaction_validity::{TransactionValidity, TransactionValidityError}, @@ -36,14 +39,14 @@ impl<T: Config> From<frame_system::CheckNonce<T>> for CheckNonce<T> { } } -impl<T: Config> sp_std::fmt::Debug for CheckNonce<T> { +impl<T: Config> Debug for CheckNonce<T> { #[cfg(feature = "std")] - fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + fn fmt(&self, f: &mut Formatter) -> scale_info::prelude::fmt::Result { write!(f, "CheckNonce({})", self.0 .0) } #[cfg(not(feature = "std"))] - fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + fn fmt(&self, _: &mut Formatter) -> scale_info::prelude::fmt::Result { Ok(()) } } @@ -59,7 +62,7 @@ where const IDENTIFIER: &'static str = "CheckNonce"; - fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> { + fn additional_signed(&self) -> Result<(), TransactionValidityError> { self.0.additional_signed() } diff --git a/pallets/oneshot-account/src/lib.rs b/pallets/oneshot-account/src/lib.rs index 3bef8281a38bd21d1acdfb96c39b15f07d99da7b..42adac55a8fce9bd6cb629c506c2b6424c2d6980 100644 --- a/pallets/oneshot-account/src/lib.rs +++ b/pallets/oneshot-account/src/lib.rs @@ -44,7 +44,6 @@ use frame_support::{ use frame_system::pallet_prelude::*; use pallet_transaction_payment::OnChargeTransaction; use sp_runtime::traits::{DispatchInfoOf, PostDispatchInfoOf, Saturating, StaticLookup, Zero}; -use sp_std::convert::TryInto; type AccountIdOf<T> = <T as frame_system::Config>::AccountId; type BalanceOf<T> = <<T as Config>::Currency as fungible::Inspect<AccountIdOf<T>>>::Balance; diff --git a/pallets/provide-randomness/Cargo.toml b/pallets/provide-randomness/Cargo.toml index c16ed1399689885cc69be3f0eabebceb2b1e2be9..a5a104c34583c85e389c35412deedd5b8593e340 100644 --- a/pallets/provide-randomness/Cargo.toml +++ b/pallets/provide-randomness/Cargo.toml @@ -33,7 +33,6 @@ std = [ "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-std/std", ] [dependencies] @@ -43,7 +42,6 @@ frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } pallet-balances = { workspace = true } diff --git a/pallets/provide-randomness/src/lib.rs b/pallets/provide-randomness/src/lib.rs index af35e6703a0a316fb7301964ad90209c701597e4..20dcfa91bd1b8a06a31f1df75c6b2d0499283ad2 100644 --- a/pallets/provide-randomness/src/lib.rs +++ b/pallets/provide-randomness/src/lib.rs @@ -35,8 +35,8 @@ use frame_support::{ tokens::{Fortitude, Precision, Preservation}, }, }; +use scale_info::prelude::vec::Vec; use sp_core::H256; -use sp_std::prelude::*; pub use pallet::*; pub use types::*; diff --git a/pallets/quota/Cargo.toml b/pallets/quota/Cargo.toml index 1cd80e27b8c72f0ddfb87569e49ad6133f958543..9df99355f7735a97d06dc783a59d6852a444e01c 100644 --- a/pallets/quota/Cargo.toml +++ b/pallets/quota/Cargo.toml @@ -38,7 +38,6 @@ std = [ "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-std/std", ] [package.metadata.docs.rs] @@ -54,7 +53,6 @@ pallet-identity = { workspace = true } scale-info = { workspace = true, features = ["derive"] } sp-core = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } [dev-dependencies] sp-io = { workspace = true, default-features = true } diff --git a/pallets/quota/src/lib.rs b/pallets/quota/src/lib.rs index 2281ebaeb3e622f1648f27d38fc202fc69ec52fd..67340ef670a1d12c7294dbde1f93111e4bffa3e1 100644 --- a/pallets/quota/src/lib.rs +++ b/pallets/quota/src/lib.rs @@ -55,8 +55,8 @@ use frame_support::{ }; use frame_system::pallet_prelude::*; pub use pallet::*; +use scale_info::prelude::vec::Vec; use sp_runtime::traits::Zero; -use sp_std::{fmt::Debug, vec::Vec}; pub use weights::WeightInfo; #[frame_support::pallet] diff --git a/pallets/session-benchmarking/Cargo.toml b/pallets/session-benchmarking/Cargo.toml index 0ce08a13dbd7189c5a1290fe05633316fe95f3a8..d7ab97ff0bc4468435106c792ff1a49eaa607fb8 100644 --- a/pallets/session-benchmarking/Cargo.toml +++ b/pallets/session-benchmarking/Cargo.toml @@ -12,12 +12,12 @@ version.workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] +codec = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-system = { workspace = true } pallet-session = { workspace = true } -sp-std = { workspace = true } +scale-info = { workspace = true, features = ["derive"] } sp-runtime = { workspace = true } -codec = { workspace = true } [features] default = ["std"] @@ -27,7 +27,6 @@ std = [ "frame-system/std", "pallet-session/std", "sp-runtime/std", - "sp-std/std", ] try-runtime = [ "frame-system/try-runtime", diff --git a/pallets/session-benchmarking/src/lib.rs b/pallets/session-benchmarking/src/lib.rs index d38e9d933d1b5b3aa6255d02eb16ae0c55fa541c..8ce793b54ae3085f713d94f271b70f81552e49ae 100644 --- a/pallets/session-benchmarking/src/lib.rs +++ b/pallets/session-benchmarking/src/lib.rs @@ -25,11 +25,11 @@ #![cfg_attr(not(feature = "std"), no_std)] #![cfg(feature = "runtime-benchmarks")] use codec::Decode; -use sp_std::{prelude::*, vec}; use frame_benchmarking::{benchmarks, whitelisted_caller}; use frame_system::RawOrigin; use pallet_session::*; +use scale_info::prelude::{vec, vec::Vec}; pub struct Pallet<T: Config>(pallet_session::Pallet<T>); pub trait Config: pallet_session::Config {} diff --git a/pallets/smith-members/Cargo.toml b/pallets/smith-members/Cargo.toml index 2406e3697b896d2d30d465ba0484614aaeff542d..4d1cb68cefc2cb6b585e292a232c24d984073556 100644 --- a/pallets/smith-members/Cargo.toml +++ b/pallets/smith-members/Cargo.toml @@ -22,7 +22,6 @@ pallet-authority-members = { workspace = true } scale-info = { workspace = true, features = ["derive"] } sp-runtime = { workspace = true } sp-staking = { workspace = true } -sp-std = { workspace = true } [features] default = ["std"] @@ -38,7 +37,6 @@ std = [ "sp-io/std", "sp-runtime/std", "sp-staking/std", - "sp-std/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/pallets/smith-members/src/lib.rs b/pallets/smith-members/src/lib.rs index c76d123265ee47557c76fbb0fe4161e93c3c228e..35918f55a00283378fd80f27686c8ecf7c6e0845 100644 --- a/pallets/smith-members/src/lib.rs +++ b/pallets/smith-members/src/lib.rs @@ -60,9 +60,11 @@ use frame_support::{ pallet_prelude::{Get, RuntimeDebug, Weight}, }; use frame_system::{ensure_signed, pallet_prelude::OriginFor}; -use scale_info::TypeInfo; +use scale_info::{ + prelude::{collections::BTreeMap, fmt::Debug, vec, vec::Vec}, + TypeInfo, +}; use sp_runtime::traits::{AtLeast32BitUnsigned, IsMember}; -use sp_std::{fmt::Debug, prelude::*}; use crate::traits::OnSmithDelete; pub use crate::weights::WeightInfo; @@ -100,7 +102,6 @@ pub mod pallet { use frame_support::{pallet_prelude::*, traits::StorageVersion}; use pallet_authority_members::SessionIndex; use sp_runtime::traits::{Convert, IsMember}; - use sp_std::{collections::btree_map::BTreeMap, vec, vec::Vec}; const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); diff --git a/pallets/smith-members/src/types.rs b/pallets/smith-members/src/types.rs index 48761f3d5ab342672b6cab22f8eb5e756347b897..8399226517f42337ebc36b031d07d76c39dbdd0f 100644 --- a/pallets/smith-members/src/types.rs +++ b/pallets/smith-members/src/types.rs @@ -19,7 +19,7 @@ use crate::SmithStatus; use codec::{Decode, Encode}; use frame_support::pallet_prelude::*; -use scale_info::TypeInfo; +use scale_info::{prelude::vec::Vec, TypeInfo}; use sp_staking::SessionIndex; /// Represents a certification metadata attached to a Smith identity. @@ -30,9 +30,9 @@ pub struct SmithMeta<IdtyIndex> { /// The session at which the Smith will expire (for lack of validation activity). pub expires_on: Option<SessionIndex>, /// Certifications issued to other Smiths. - pub issued_certs: sp_std::vec::Vec<IdtyIndex>, + pub issued_certs: Vec<IdtyIndex>, /// Certifications received from other Smiths. - pub received_certs: sp_std::vec::Vec<IdtyIndex>, + pub received_certs: Vec<IdtyIndex>, } /// By default, a smith has the least possible privileges @@ -41,8 +41,8 @@ impl<IdtyIndex> Default for SmithMeta<IdtyIndex> { Self { status: SmithStatus::Excluded, expires_on: None, - issued_certs: sp_std::vec::Vec::<IdtyIndex>::new(), - received_certs: sp_std::vec::Vec::<IdtyIndex>::new(), + issued_certs: Vec::<IdtyIndex>::new(), + received_certs: Vec::<IdtyIndex>::new(), } } } diff --git a/pallets/universal-dividend/Cargo.toml b/pallets/universal-dividend/Cargo.toml index c0f5b52c9f3f6dd42575ddcca549a82e9bdfc6b2..8b03f528a6453ba7984506953ef627dde5fe91f4 100644 --- a/pallets/universal-dividend/Cargo.toml +++ b/pallets/universal-dividend/Cargo.toml @@ -40,7 +40,6 @@ std = [ "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-std/std", ] ### DOC ### @@ -62,7 +61,6 @@ sp-arithmetic = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } [dev-dependencies] sp-core = { workspace = true, default-features = true } diff --git a/pallets/universal-dividend/src/types.rs b/pallets/universal-dividend/src/types.rs index bcebf1bd781e81c6a14903b532da1788d383f441..bc5bcd7214fbd2a8514064b6a0d66d83670e168b 100644 --- a/pallets/universal-dividend/src/types.rs +++ b/pallets/universal-dividend/src/types.rs @@ -16,6 +16,7 @@ use codec::{Decode, Encode, Error, Input, MaxEncodedLen, Output}; use core::num::NonZeroU16; +use scale_info::prelude::vec::Vec; use sp_runtime::RuntimeDebug; pub type UdIndex = u16; @@ -53,7 +54,7 @@ impl Encode for FirstEligibleUd { self.as_u16().encode_to(dest) } - fn encode(&self) -> sp_std::vec::Vec<u8> { + fn encode(&self) -> Vec<u8> { self.as_u16().encode() } diff --git a/pallets/upgrade-origin/Cargo.toml b/pallets/upgrade-origin/Cargo.toml index b1f08f0bced4e8a5baac966d5b1a5677cb41dd15..65646fcf2a210f21f79f4002778e798bfae69fe2 100644 --- a/pallets/upgrade-origin/Cargo.toml +++ b/pallets/upgrade-origin/Cargo.toml @@ -32,7 +32,6 @@ std = [ "sp-io/std", "sp-runtime/std", "sp-staking/std", - "sp-std/std", ] [package.metadata.docs.rs] @@ -49,4 +48,3 @@ sp-core = { workspace = true } sp-io = { workspace = true } sp-runtime = { workspace = true } sp-staking = { workspace = true } -sp-std = { workspace = true } diff --git a/pallets/upgrade-origin/src/benchmarking.rs b/pallets/upgrade-origin/src/benchmarking.rs index 33821436d4bf96c90e6b9602e5e731c093d2ce70..6a273f28a1197a0c77c97def61b1da5225ffd2c1 100644 --- a/pallets/upgrade-origin/src/benchmarking.rs +++ b/pallets/upgrade-origin/src/benchmarking.rs @@ -21,6 +21,7 @@ use super::*; use crate::Pallet; use frame_benchmarking::v2::*; use frame_support::traits::Get; +use scale_info::prelude::vec; #[benchmarks] mod benchmarks { diff --git a/pallets/upgrade-origin/src/lib.rs b/pallets/upgrade-origin/src/lib.rs index cf108ff25c0efa448f5311086c0e2b9b94e234be..d98c21f84b3f2870ff4ecff6f91d84c923881a3f 100644 --- a/pallets/upgrade-origin/src/lib.rs +++ b/pallets/upgrade-origin/src/lib.rs @@ -27,8 +27,8 @@ use frame_support::{ dispatch::{GetDispatchInfo, PostDispatchInfo}, traits::{IsSubType, UnfilteredDispatchable}, }; +use scale_info::prelude::boxed::Box; use sp_runtime::traits::Dispatchable; -use sp_std::prelude::*; #[frame_support::pallet] pub mod pallet { diff --git a/primitives/distance/Cargo.toml b/primitives/distance/Cargo.toml index 9c035c38be1091c0d33dbbea6069c0ec0860756c..843ef11b794f2826c94c53b4ccfb7cb1332e2249 100644 --- a/primitives/distance/Cargo.toml +++ b/primitives/distance/Cargo.toml @@ -23,7 +23,6 @@ std = [ "serde/std", "sp-inherents/std", "sp-runtime/std", - "sp-std/std", "thiserror", ] try-runtime = ["frame-support/try-runtime", "sp-runtime/try-runtime"] @@ -37,5 +36,4 @@ scale-info = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] } sp-inherents = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } thiserror = { workspace = true, optional = true } diff --git a/primitives/distance/src/lib.rs b/primitives/distance/src/lib.rs index 9e67b72f8ba6b6b4dacba77b9dfb31871e2453a9..acaf53c381bfe586b6dc48980875e1ab2f597faa 100644 --- a/primitives/distance/src/lib.rs +++ b/primitives/distance/src/lib.rs @@ -32,7 +32,7 @@ pub const INHERENT_IDENTIFIER: InherentIdentifier = *b"distanc0"; /// Represents the result of a distance computation. #[derive(Clone, Decode, Encode, PartialEq, RuntimeDebug, TypeInfo)] pub struct ComputationResult { - pub distances: sp_std::vec::Vec<Perbill>, + pub distances: scale_info::prelude::vec::Vec<Perbill>, } #[derive(Encode, sp_runtime::RuntimeDebug)] diff --git a/primitives/membership/Cargo.toml b/primitives/membership/Cargo.toml index d7ac4600f38fe68121c1cb488fb66f1a9c004b08..88c35eb41428a2387fae0f36aca2bac19a0ea16c 100644 --- a/primitives/membership/Cargo.toml +++ b/primitives/membership/Cargo.toml @@ -21,16 +21,13 @@ std = [ "scale-info/std", "serde/std", "sp-runtime/std", - "sp-std/std", ] try-runtime = ["frame-support/try-runtime", "sp-runtime/try-runtime"] runtime-benchmarks = [] [dependencies] - codec = { workspace = true, features = ["derive"] } frame-support = { workspace = true } scale-info = { workspace = true, features = ["derive"] } serde = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } diff --git a/resources/metadata.scale b/resources/metadata.scale index 123bcbc087bd327adc18d551ca768876f26e2e18..945a23e9cc05e24d7f4eced0da1216cf5843b4db 100644 Binary files a/resources/metadata.scale and b/resources/metadata.scale differ diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 8b401fb4e5bcadd5a32963e4c05aa5cf436993f5..028f83930f847e246b9677c5584c2fb9ece77dc0 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -93,7 +93,6 @@ std = [ "sp-membership/std", "sp-runtime/std", "sp-staking/std", - "sp-std/std", "sp-weights/std", ] try-runtime = [ @@ -182,5 +181,4 @@ sp-core = { workspace = true } sp-membership = { workspace = true } sp-runtime = { workspace = true } sp-staking = { workspace = true } -sp-std = { workspace = true } sp-weights = { workspace = true } diff --git a/runtime/common/src/apis.rs b/runtime/common/src/apis.rs index 7347a6ab6d73d1340838de421925ea33e69c3e36..77ed9caec2e507cce00ccd178b249e170f7dfc29 100644 --- a/runtime/common/src/apis.rs +++ b/runtime/common/src/apis.rs @@ -101,7 +101,7 @@ macro_rules! runtime_apis { fn metadata_at_version(version: u32) -> Option<OpaqueMetadata> { Runtime::metadata_at_version(version) } - fn metadata_versions() -> sp_std::vec::Vec<u32> { + fn metadata_versions() -> Vec<u32> { Runtime::metadata_versions() } } diff --git a/runtime/common/src/fees.rs b/runtime/common/src/fees.rs index 818601166c0ce57f17012a75fa14f4c46cfa8ef9..2ec9a7087e755056072e990af4a78f09389f92eb 100644 --- a/runtime/common/src/fees.rs +++ b/runtime/common/src/fees.rs @@ -36,6 +36,7 @@ /// and can be activated with the #[cfg(feature = "constant-fees")] feature. pub use frame_support::weights::{Weight, WeightToFee}; use pallet_transaction_payment::{Multiplier, MultiplierUpdate}; +use scale_info::prelude::marker::PhantomData; use sp_arithmetic::traits::{BaseArithmetic, Unsigned}; use sp_core::Get; use sp_runtime::{traits::Convert, Perquintill}; @@ -58,9 +59,9 @@ use { /// - `Runtime`: The system configuration type, providing access to block weights. /// - `Target`: A type providing the target block fullness. pub struct LengthToFeeImpl<Balance, Runtime, Target>( - sp_std::marker::PhantomData<Balance>, - sp_std::marker::PhantomData<Runtime>, - sp_std::marker::PhantomData<Target>, + PhantomData<Balance>, + PhantomData<Runtime>, + PhantomData<Target>, ); /// Trait implementation for converting transaction length to fee. @@ -126,9 +127,9 @@ where /// - `Runtime`: The system configuration type, providing access to block weights. /// - `Target`: A type providing the target block fullness. pub struct WeightToFeeImpl<Balance, Runtime, Target>( - sp_std::marker::PhantomData<Balance>, - sp_std::marker::PhantomData<Runtime>, - sp_std::marker::PhantomData<Target>, + PhantomData<Balance>, + PhantomData<Runtime>, + PhantomData<Target>, ); /// Trait implementation for converting transaction weight to fee. @@ -210,9 +211,9 @@ where /// - `Target`: A type providing the target block fullness. /// - `MaxMultiplier`: A type providing the maximum multiplier value. pub struct FeeMultiplier<Runtime, Target, MaxMultiplier>( - sp_std::marker::PhantomData<Runtime>, - sp_std::marker::PhantomData<Target>, - sp_std::marker::PhantomData<MaxMultiplier>, + PhantomData<Runtime>, + PhantomData<Target>, + PhantomData<MaxMultiplier>, ); /// Trait implementation for updating the fee multiplier. diff --git a/runtime/common/src/handlers.rs b/runtime/common/src/handlers.rs index cb8a819bb6fa7800498965d4bf0d7c885c8821b7..197e3574378589bc969d502d1d81976033de72d8 100644 --- a/runtime/common/src/handlers.rs +++ b/runtime/common/src/handlers.rs @@ -159,9 +159,8 @@ where member_id: idty_index, }; if let Err(e) = call.dispatch_bypass_filter(frame_system::Origin::<Runtime>::Root.into()) { - sp_std::if_std! { - println!("faid to remove member: {:?}", e) - } + #[cfg(feature = "std")] + println!("faid to remove member: {:?}", e) } } } diff --git a/runtime/g1/Cargo.toml b/runtime/g1/Cargo.toml index a33d3a13485f0c8aff00dbb186f83ccaa081fe2f..61b21bbb3c7808acc997dadb625ac4345ca79bb7 100644 --- a/runtime/g1/Cargo.toml +++ b/runtime/g1/Cargo.toml @@ -115,7 +115,6 @@ std = [ "sp-runtime/std", "sp-session/std", "sp-staking/std", - "sp-std/std", "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", @@ -233,7 +232,6 @@ sp-membership = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } -sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } node-primitives = { workspace = true } diff --git a/runtime/g1/src/lib.rs b/runtime/g1/src/lib.rs index ce21fbb331d071b467b750093bab21a9fdc43765..c2b192a2403bec3e99bacba4861cb9b39973d2ce 100644 --- a/runtime/g1/src/lib.rs +++ b/runtime/g1/src/lib.rs @@ -53,6 +53,7 @@ use pallet_session::historical as session_historical; pub use pallet_timestamp::Call as TimestampCall; use pallet_transaction_payment::FungibleAdapter; pub use pallet_universal_dividend; +use scale_info::prelude::{vec, vec::Vec}; use sp_api::impl_runtime_apis; use sp_core::OpaqueMetadata; #[cfg(any(feature = "std", test))] @@ -64,7 +65,6 @@ use sp_runtime::{ ApplyExtrinsicResult, Perquintill, }; pub use sp_runtime::{KeyTypeId, Perbill, Permill}; -use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; diff --git a/runtime/g1/src/weights/pallet_babe.rs b/runtime/g1/src/weights/pallet_babe.rs index caa37df090cc508af9b16853df12c04eefcff5c2..86185992a9c13eb63302b1206cf37cb05b47f576 100644 --- a/runtime/g1/src/weights/pallet_babe.rs +++ b/runtime/g1/src/weights/pallet_babe.rs @@ -24,7 +24,7 @@ use frame_support::{ Weight, }, }; -use sp_std::marker::PhantomData; +use scale_info::prelude::marker::PhantomData; /// Weight functions for `pallet_babe`. pub struct WeightInfo<T>(PhantomData<T>); diff --git a/runtime/g1/src/weights/pallet_grandpa.rs b/runtime/g1/src/weights/pallet_grandpa.rs index 3c6528f7ff9e2b8abdcedde415ad299aec208a0f..6dae5b20f670e3859762926b0168234d44dc0d27 100644 --- a/runtime/g1/src/weights/pallet_grandpa.rs +++ b/runtime/g1/src/weights/pallet_grandpa.rs @@ -24,7 +24,7 @@ use frame_support::{ Weight, }, }; -use sp_std::marker::PhantomData; +use scale_info::prelude::marker::PhantomData; /// Weight functions for `pallet_grandpa`. pub struct WeightInfo<T>(PhantomData<T>); diff --git a/runtime/gdev/Cargo.toml b/runtime/gdev/Cargo.toml index 4ed92bd07a90f1a17825b47ac577788234368ea1..3299b812d1622b27fc3fea94ee79aa01471c580d 100644 --- a/runtime/gdev/Cargo.toml +++ b/runtime/gdev/Cargo.toml @@ -117,7 +117,6 @@ std = [ "sp-runtime/std", "sp-session/std", "sp-staking/std", - "sp-std/std", "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", @@ -241,7 +240,6 @@ sp-membership = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } -sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } sp-weights = { workspace = true } diff --git a/runtime/gdev/src/lib.rs b/runtime/gdev/src/lib.rs index fd34a3880d27f6ce0a346395582c55882b7a55a3..a2b0ec5d808f29c4e7c9bee0aa3932ac5f112c28 100644 --- a/runtime/gdev/src/lib.rs +++ b/runtime/gdev/src/lib.rs @@ -53,6 +53,7 @@ use pallet_session::historical as session_historical; pub use pallet_timestamp::Call as TimestampCall; use pallet_transaction_payment::FungibleAdapter; pub use pallet_universal_dividend; +use scale_info::prelude::{vec, vec::Vec}; use sp_api::impl_runtime_apis; use sp_core::OpaqueMetadata; #[cfg(any(feature = "std", test))] @@ -64,7 +65,6 @@ use sp_runtime::{ ApplyExtrinsicResult, Perquintill, }; pub use sp_runtime::{KeyTypeId, Perbill, Permill}; -use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; diff --git a/runtime/gdev/src/weights/pallet_babe.rs b/runtime/gdev/src/weights/pallet_babe.rs index caa37df090cc508af9b16853df12c04eefcff5c2..86185992a9c13eb63302b1206cf37cb05b47f576 100644 --- a/runtime/gdev/src/weights/pallet_babe.rs +++ b/runtime/gdev/src/weights/pallet_babe.rs @@ -24,7 +24,7 @@ use frame_support::{ Weight, }, }; -use sp_std::marker::PhantomData; +use scale_info::prelude::marker::PhantomData; /// Weight functions for `pallet_babe`. pub struct WeightInfo<T>(PhantomData<T>); diff --git a/runtime/gdev/src/weights/pallet_grandpa.rs b/runtime/gdev/src/weights/pallet_grandpa.rs index 3c6528f7ff9e2b8abdcedde415ad299aec208a0f..6dae5b20f670e3859762926b0168234d44dc0d27 100644 --- a/runtime/gdev/src/weights/pallet_grandpa.rs +++ b/runtime/gdev/src/weights/pallet_grandpa.rs @@ -24,7 +24,7 @@ use frame_support::{ Weight, }, }; -use sp_std::marker::PhantomData; +use scale_info::prelude::marker::PhantomData; /// Weight functions for `pallet_grandpa`. pub struct WeightInfo<T>(PhantomData<T>); diff --git a/runtime/gdev/tests/integration_tests.rs b/runtime/gdev/tests/integration_tests.rs index 892894e5b2cde2ea3f0af9643e3d42e4f18ef68a..2d6b5d1577cc7b043c775cc5ca179e4e9e8f856b 100644 --- a/runtime/gdev/tests/integration_tests.rs +++ b/runtime/gdev/tests/integration_tests.rs @@ -26,6 +26,7 @@ use gdev_runtime::*; use pallet_identity::{RevocationPayload, REVOCATION_PAYLOAD_PREFIX}; use pallet_membership::MembershipRemovalReason; use pallet_smith_members::{SmithMeta, SmithStatus}; +use scale_info::prelude::num::NonZeroU16; use sp_core::{Encode, Pair}; use sp_keyring::AccountKeyring; use sp_runtime::MultiAddress; @@ -502,7 +503,7 @@ fn test_identity_creation_workflow() { Some(pallet_identity::IdtyValue { data: IdtyData { first_eligible_ud: pallet_universal_dividend::FirstEligibleUd(Some( - sp_std::num::NonZeroU16::new(first_eligible).unwrap() + NonZeroU16::new(first_eligible).unwrap() )) }, next_creatable_identity_on: 0u32, diff --git a/runtime/gtest/Cargo.toml b/runtime/gtest/Cargo.toml index 945a1dee8dbf9bb75e61f0400ba66e3017a61549..1b09c9ca1d9dea331c3f9bcf2923ca163cb25c55 100644 --- a/runtime/gtest/Cargo.toml +++ b/runtime/gtest/Cargo.toml @@ -114,7 +114,6 @@ std = [ "sp-runtime/std", "sp-session/std", "sp-staking/std", - "sp-std/std", "sp-transaction-pool/std", "sp-version/std", "substrate-wasm-builder", @@ -231,7 +230,6 @@ sp-membership = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } -sp-std = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } sp-genesis-builder = { workspace = true } diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs index 8d1972f55298f6033bfa79454f51164322197fcb..6be12db81e88fed8c40bef5608b14f70d5e58d1b 100644 --- a/runtime/gtest/src/lib.rs +++ b/runtime/gtest/src/lib.rs @@ -52,6 +52,7 @@ use pallet_session::historical as session_historical; pub use pallet_timestamp::Call as TimestampCall; use pallet_transaction_payment::FungibleAdapter; pub use pallet_universal_dividend; +use scale_info::prelude::{vec, vec::Vec}; use sp_api::impl_runtime_apis; use sp_core::OpaqueMetadata; #[cfg(any(feature = "std", test))] @@ -63,7 +64,6 @@ use sp_runtime::{ ApplyExtrinsicResult, Perquintill, }; pub use sp_runtime::{KeyTypeId, Perbill, Permill}; -use sp_std::prelude::*; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; diff --git a/runtime/gtest/src/weights/pallet_babe.rs b/runtime/gtest/src/weights/pallet_babe.rs index caa37df090cc508af9b16853df12c04eefcff5c2..86185992a9c13eb63302b1206cf37cb05b47f576 100644 --- a/runtime/gtest/src/weights/pallet_babe.rs +++ b/runtime/gtest/src/weights/pallet_babe.rs @@ -24,7 +24,7 @@ use frame_support::{ Weight, }, }; -use sp_std::marker::PhantomData; +use scale_info::prelude::marker::PhantomData; /// Weight functions for `pallet_babe`. pub struct WeightInfo<T>(PhantomData<T>); diff --git a/runtime/gtest/src/weights/pallet_grandpa.rs b/runtime/gtest/src/weights/pallet_grandpa.rs index 3c6528f7ff9e2b8abdcedde415ad299aec208a0f..6dae5b20f670e3859762926b0168234d44dc0d27 100644 --- a/runtime/gtest/src/weights/pallet_grandpa.rs +++ b/runtime/gtest/src/weights/pallet_grandpa.rs @@ -24,7 +24,7 @@ use frame_support::{ Weight, }, }; -use sp_std::marker::PhantomData; +use scale_info::prelude::marker::PhantomData; /// Weight functions for `pallet_grandpa`. pub struct WeightInfo<T>(PhantomData<T>);