diff --git a/docs/api/runtime-calls.md b/docs/api/runtime-calls.md index efdbb573ccd4698ecbff097f7f1f7fe11acb4e49..116b518d45e6b256dfbc4cb34ccce6037000c961 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.0107 % 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.0117 % 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.0241 % of a block. +Taking 0.0232 % 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.0189 % of a block. +Taking 0.0186 % of a block. ```rust id: TaskName @@ -86,7 +86,7 @@ Schedule a named task. <details><summary><code>cancel_named(id)</code></summary> -Taking 0.0253 % of a block. +Taking 0.0243 % 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.0115 % of a block. +Taking 0.0119 % 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.0127 % 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.0115 % 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.0127 % of a block. +Taking 0.0131 % of a block. ```rust id: TaskName @@ -239,7 +239,7 @@ be reported. <details><summary><code>transfer_allow_death(dest, value)</code></summary> -Taking 0.0196 % of a block. +Taking 0.0193 % 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.012 % of a block. +Taking 0.0123 % 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.0123 % of a block. +Taking 0.0127 % 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.0038 % of a block. +Taking 0.005 % of a block. ```rust direction: AdjustmentDirection @@ -349,13 +349,34 @@ Can only be called by root and always needs a positive `delta`. # Example +#### burn - 10 + +<details><summary><code>burn(value, keep_alive)</code></summary> + +No weight available. + +```rust +value: T::Balance +keep_alive: bool +``` +</details> + + +Burn the specified liquid free balance from the origin account. + +If the origin's account ends up below the existential deposit as a result +of the burn and `keep_alive` is false, the account will be reaped. + +Unlike sending funds to a _burn_ address, which merely makes the funds inaccessible, +this `burn` operation will reduce total issuance by the amount _burned_. + ### OneshotAccount - 7 #### create_oneshot_account - 0 <details><summary><code>create_oneshot_account(dest, value)</code></summary> -Taking 0.0113 % of a block. +Taking 0.0119 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -375,7 +396,7 @@ Origin account is kept alive. <details><summary><code>consume_oneshot_account(block_height, dest)</code></summary> -Taking 0.0196 % of a block. +Taking 0.0192 % of a block. ```rust block_height: BlockNumberFor<T> @@ -394,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.0269 % of a block. +Taking 0.026 % of a block. ```rust block_height: BlockNumberFor<T> @@ -422,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.0228 % of a block. ```rust receiver: T::IdtyIndex @@ -436,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.0122 % of a block. +Taking 0.0125 % of a block. ```rust ``` @@ -449,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.0286 % of a block. +Taking 0.0271 % of a block. ```rust receiver: T::IdtyIndex @@ -465,7 +486,7 @@ Certify an invited Smith, which can lead the certified to become a Smith. <details><summary><code>go_offline()</code></summary> -Taking 0.0165 % of a block. +Taking 0.0163 % of a block. ```rust ``` @@ -478,7 +499,7 @@ Request to leave the set of validators two sessions later. <details><summary><code>go_online()</code></summary> -Taking 0.0188 % of a block. +Taking 0.0183 % of a block. ```rust ``` @@ -491,7 +512,7 @@ Request to join the set of validators two sessions later. <details><summary><code>set_session_keys(keys)</code></summary> -Taking 0.0251 % of a block. +Taking 0.024 % of a block. ```rust keys: T::Keys @@ -505,7 +526,7 @@ Declare new session keys to replace current ones. <details><summary><code>remove_member_from_blacklist(member_id)</code></summary> -Taking 0.0109 % of a block. +Taking 0.0113 % of a block. ```rust member_id: T::MemberId @@ -563,7 +584,7 @@ The weight of this call is defined by the caller. <details><summary><code>note_preimage(bytes)</code></summary> -Taking 0.2953 % of a block. +Taking 0.2969 % of a block. ```rust bytes: Vec<u8> @@ -580,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.0186 % of a block. +Taking 0.0183 % of a block. ```rust hash: T::Hash @@ -599,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.0126 % of a block. +Taking 0.013 % of a block. ```rust hash: T::Hash @@ -616,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.0186 % of a block. +Taking 0.0182 % of a block. ```rust hash: T::Hash @@ -632,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 21.073 % of a block. +Taking 18.57 % of a block. ```rust hashes: Vec<T::Hash> @@ -650,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.0051 % of a block. +Taking 0.0063 % of a block. ```rust proposal: Box<<T as Config<I>>::Proposal> @@ -702,7 +723,7 @@ or put up for voting. <details><summary><code>vote(proposal, index, approve)</code></summary> -Taking 0.0124 % of a block. +Taking 0.0127 % of a block. ```rust proposal: T::Hash @@ -768,7 +789,7 @@ proposal. <details><summary><code>claim_uds()</code></summary> -Taking 0.0218 % of a block. +Taking 0.0211 % of a block. ```rust ``` @@ -781,7 +802,7 @@ Claim Universal Dividends. <details><summary><code>transfer_ud(dest, value)</code></summary> -Taking 0.0208 % of a block. +Taking 0.0204 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -796,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.0131 % of a block. +Taking 0.0133 % of a block. ```rust dest: <T::Lookup as StaticLookup>::Source @@ -813,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.0914 % of a block. +Taking 0.0823 % of a block. ```rust owner_key: T::AccountId @@ -831,7 +852,7 @@ The origin must be allowed to create an identity. <details><summary><code>confirm_identity(idty_name)</code></summary> -Taking 0.0339 % of a block. +Taking 0.0316 % of a block. ```rust idty_name: IdtyName @@ -849,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.0431 % of a block. +Taking 0.04 % of a block. ```rust new_key: T::AccountId @@ -870,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.0417 % of a block. +Taking 0.0386 % of a block. ```rust idty_index: T::IdtyIndex @@ -893,7 +914,7 @@ Any signed origin can execute this call. <details><summary><code>fix_sufficients(owner_key, inc)</code></summary> -Taking 0.0108 % of a block. +Taking 0.0113 % of a block. ```rust owner_key: T::AccountId @@ -916,7 +937,7 @@ reference count associated with a specified owner key. <details><summary><code>link_account(account_id, payload_sig)</code></summary> -Taking 0.0151 % of a block. +Taking 0.0153 % of a block. ```rust account_id: T::AccountId @@ -940,7 +961,7 @@ identity to sign the operation. <details><summary><code>add_cert(receiver)</code></summary> -Taking 0.037 % of a block. +Taking 0.0343 % of a block. ```rust receiver: T::IdtyIndex @@ -954,7 +975,7 @@ Add a new certification. <details><summary><code>renew_cert(receiver)</code></summary> -Taking 0.0299 % of a block. +Taking 0.0282 % of a block. ```rust receiver: T::IdtyIndex @@ -968,7 +989,7 @@ Renew an existing certification. <details><summary><code>del_cert(issuer, receiver)</code></summary> -Taking 0.0263 % of a block. +Taking 0.0248 % of a block. ```rust issuer: T::IdtyIndex @@ -985,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.395 % of a block. +Taking 6.5528 % of a block. ```rust idty_index: T::IdtyIndex @@ -1003,7 +1024,7 @@ Remove all certifications received by an identity. <details><summary><code>request_distance_evaluation()</code></summary> -Taking 0.0325 % of a block. +Taking 0.0373 % of a block. ```rust ``` @@ -1020,7 +1041,7 @@ evaluation will result in slashing for the caller. <details><summary><code>request_distance_evaluation_for(target)</code></summary> -Taking 0.0336 % of a block. +Taking 0.0383 % of a block. ```rust target: T::IdtyIndex @@ -1037,7 +1058,7 @@ This action is only permitted for unvalidated identities. <details><summary><code>update_evaluation(computation_result)</code></summary> -Taking 0.0346 % of a block. +Taking 0.0332 % of a block. ```rust computation_result: ComputationResult @@ -1054,7 +1075,7 @@ to the evaluation pool. <details><summary><code>force_update_evaluation(evaluator, computation_result)</code></summary> -Taking 0.0183 % of a block. +Taking 0.0188 % of a block. ```rust evaluator: <T as frame_system::Config>::AccountId @@ -1073,7 +1094,7 @@ It is primarily used for testing purposes. <details><summary><code>force_valid_distance_status(identity)</code></summary> -Taking 0.0277 % of a block. +Taking 0.0262 % of a block. ```rust identity: <T as pallet_identity::Config>::IdtyIndex @@ -1164,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.004 % of a block. +Taking 0.0052 % of a block. ```rust other_signatories: Vec<T::AccountId> @@ -1293,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.0117 % of a block. +Taking 0.0122 % of a block. ```rust threshold: u16 @@ -1332,7 +1353,7 @@ transaction for this dispatch. <details><summary><code>request(randomness_type, salt)</code></summary> -Taking 0.042 % of a block. +Taking 0.039 % of a block. ```rust randomness_type: RandomnessType @@ -1349,7 +1370,7 @@ Request randomness. <details><summary><code>proxy(real, force_proxy_type, call)</code></summary> -Taking 0.0052 % of a block. +Taking 0.0063 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1373,7 +1394,7 @@ Parameters: <details><summary><code>add_proxy(delegate, proxy_type, delay)</code></summary> -Taking 0.0114 % of a block. +Taking 0.0119 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1397,7 +1418,7 @@ zero. <details><summary><code>remove_proxy(delegate, proxy_type, delay)</code></summary> -Taking 0.0115 % of a block. +Taking 0.0119 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1419,7 +1440,7 @@ Parameters: <details><summary><code>remove_proxies()</code></summary> -Taking 0.0114 % of a block. +Taking 0.0118 % of a block. ```rust ``` @@ -1437,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.0115 % of a block. +Taking 0.0119 % of a block. ```rust proxy_type: T::ProxyType @@ -1470,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.0114 % of a block. +Taking 0.0119 % of a block. ```rust spawner: AccountIdLookupOf<T> @@ -1503,7 +1524,7 @@ account whose `pure` call has corresponding parameters. <details><summary><code>announce(real, call_hash)</code></summary> -Taking 0.0199 % of a block. +Taking 0.0194 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1532,7 +1553,7 @@ Parameters: <details><summary><code>remove_announcement(real, call_hash)</code></summary> -Taking 0.0186 % of a block. +Taking 0.0182 % of a block. ```rust real: AccountIdLookupOf<T> @@ -1556,7 +1577,7 @@ Parameters: <details><summary><code>reject_announcement(delegate, call_hash)</code></summary> -Taking 0.0186 % of a block. +Taking 0.0182 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1580,7 +1601,7 @@ Parameters: <details><summary><code>proxy_announced(delegate, real, force_proxy_type, call)</code></summary> -Taking 0.02 % of a block. +Taking 0.0196 % of a block. ```rust delegate: AccountIdLookupOf<T> @@ -1609,7 +1630,7 @@ Parameters: <details><summary><code>batch(calls)</code></summary> -Taking 0.1039 % of a block. +Taking 0.1072 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1640,7 +1661,7 @@ event is deposited. <details><summary><code>as_derivative(index, call)</code></summary> -Taking 0.0037 % of a block. +Taking 0.005 % of a block. ```rust index: u16 @@ -1667,7 +1688,7 @@ The dispatch origin for this call must be _Signed_. <details><summary><code>batch_all(calls)</code></summary> -Taking 0.1131 % of a block. +Taking 0.1159 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1693,7 +1714,7 @@ includes bypassing `frame_system::Config::BaseCallFilter`). <details><summary><code>force_batch(calls)</code></summary> -Taking 0.104 % of a block. +Taking 0.1072 % of a block. ```rust calls: Vec<<T as Config>::RuntimeCall> @@ -1737,41 +1758,11 @@ The dispatch origin for this call must be _Root_. ### Treasury - 55 -#### propose_spend - 0 - -<details><summary><code>propose_spend(value, beneficiary)</code></summary> - -Taking 0.0174 % of a block. - -```rust -value: BalanceOf<T, I> -beneficiary: AccountIdLookupOf<T> -``` -</details> - - -Put forward a suggestion for spending. - -## Dispatch Origin - -Must be signed. - -## Details -A deposit proportional to the value is reserved and slashed if the proposal is rejected. -It is returned once the proposal is awarded. - -#**Complexity** -- O(1) - -## Events - -Emits [`Event::Proposed`] if successful. - #### spend_local - 3 <details><summary><code>spend_local(amount, beneficiary)</code></summary> -Taking 0.0035 % of a block. +Taking 0.0048 % of a block. ```rust amount: BalanceOf<T, I> @@ -1802,7 +1793,7 @@ Emits [`Event::SpendApproved`] if successful. <details><summary><code>remove_approval(proposal_id)</code></summary> -Taking 0.0107 % of a block. +Taking 0.0048 % of a block. ```rust proposal_id: ProposalIndex @@ -1836,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.0035 % of a block. +Taking 0.0048 % of a block. ```rust asset_kind: Box<T::AssetKind> @@ -1878,7 +1869,7 @@ Emits [`Event::AssetSpendApproved`] if successful. <details><summary><code>payout(index)</code></summary> -Taking 0.0265 % of a block. +Taking 0.0252 % of a block. ```rust index: SpendIndex @@ -1890,7 +1881,7 @@ Claim a spend. ## Dispatch Origin -Must be signed. +Must be signed ## Details @@ -1910,7 +1901,7 @@ Emits [`Event::Paid`] if successful. <details><summary><code>check_status(index)</code></summary> -Taking 0.011 % of a block. +Taking 0.0114 % of a block. ```rust index: SpendIndex @@ -1942,7 +1933,7 @@ Emits [`Event::SpendProcessed`] if the spend payout has succeed. <details><summary><code>void_spend(index)</code></summary> -Taking 0.0109 % of a block. +Taking 0.0113 % of a block. ```rust index: SpendIndex @@ -1979,7 +1970,7 @@ There are **18** root calls from **8** pallets. <details><summary><code>set_heap_pages(pages)</code></summary> -Taking 0.0166 % of a block. +Taking 0.0163 % of a block. ```rust pages: u64 @@ -1993,7 +1984,7 @@ Set the number of pages in the WebAssembly environment's heap. <details><summary><code>set_code(code)</code></summary> -Taking 3.2097 % of a block. +Taking 3.9928 % of a block. ```rust code: Vec<u8> @@ -2024,7 +2015,7 @@ version! <details><summary><code>set_storage(items)</code></summary> -Taking 6.0054 % of a block. +Taking 5.2685 % of a block. ```rust items: Vec<KeyValue> @@ -2038,7 +2029,7 @@ Set some items of storage. <details><summary><code>kill_storage(keys)</code></summary> -Taking 5.9992 % of a block. +Taking 5.2627 % of a block. ```rust keys: Vec<Key> @@ -2052,7 +2043,7 @@ Kill some items from storage. <details><summary><code>kill_prefix(prefix, subkeys)</code></summary> -Taking 7.0112 % of a block. +Taking 6.1565 % of a block. ```rust prefix: Key @@ -2070,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.01 % of a block. +Taking 0.0105 % of a block. ```rust code_hash: T::Hash @@ -2108,7 +2099,7 @@ This call requires Root origin. <details><summary><code>apply_authorized_upgrade(code)</code></summary> -Taking 3.461 % of a block. +Taking 4.1912 % of a block. ```rust code: Vec<u8> @@ -2151,7 +2142,7 @@ not been enacted yet. <details><summary><code>force_transfer(source, dest, value)</code></summary> -Taking 0.0266 % of a block. +Taking 0.0255 % of a block. ```rust source: AccountIdLookupOf<T> @@ -2168,7 +2159,7 @@ may be specified. <details><summary><code>force_unreserve(who, amount)</code></summary> -Taking 0.0111 % of a block. +Taking 0.0115 % of a block. ```rust who: AccountIdLookupOf<T> @@ -2187,7 +2178,7 @@ Can only be called by ROOT. <details><summary><code>remove_member(member_id)</code></summary> -Taking 0.0709 % of a block. +Taking 0.0641 % of a block. ```rust member_id: T::MemberId @@ -2231,7 +2222,7 @@ Only callable by root. <details><summary><code>set_members(new_members, prime, old_count)</code></summary> -Taking 0.1668 % of a block. +Taking 0.1493 % of a block. ```rust new_members: Vec<T::AccountId> @@ -2270,7 +2261,7 @@ with other logic managing the member set. <details><summary><code>disapprove_proposal(proposal_hash)</code></summary> -Taking 0.0231 % of a block. +Taking 0.0221 % of a block. ```rust proposal_hash: T::Hash @@ -2295,7 +2286,7 @@ O(P) where P is the number of max proposals <details><summary><code>prune_item_identities_names(names)</code></summary> -Taking 6.0424 % of a block. +Taking 5.3061 % of a block. ```rust names: Vec<IdtyName> @@ -2317,7 +2308,7 @@ in bulk. <details><summary><code>dispatch_as(as_origin, call)</code></summary> -Taking 0.0038 % of a block. +Taking 0.0051 % of a block. ```rust as_origin: Box<T::PalletsOrigin> @@ -2348,7 +2339,7 @@ There are **4** disabled calls from **2** pallets. <details><summary><code>remark(remark)</code></summary> -Taking 0.054 % of a block. +Taking 0.0539 % of a block. ```rust remark: Vec<u8> @@ -2364,7 +2355,7 @@ Can be executed by every `origin`. <details><summary><code>remark_with_event(remark)</code></summary> -Taking 0.2151 % of a block. +Taking 0.2107 % of a block. ```rust remark: Vec<u8> @@ -2380,7 +2371,7 @@ Make some on-chain remark and emit event. <details><summary><code>set_keys(keys, proof)</code></summary> -Taking 0.0395 % of a block. +Taking 0.0365 % of a block. ```rust keys: T::Keys @@ -2403,7 +2394,7 @@ The dispatch origin of this function must be signed. <details><summary><code>purge_keys()</code></summary> -Taking 0.0351 % of a block. +Taking 0.0326 % of a block. ```rust ``` diff --git a/docs/api/runtime-errors.md b/docs/api/runtime-errors.md index 48bc9f68cd283b12f69b94f32606a3cff83a6d2f..c93247cae1a218d65150b4ef9a0ed0edbdc952cd 100644 --- a/docs/api/runtime-errors.md +++ b/docs/api/runtime-errors.md @@ -697,6 +697,13 @@ 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 @@ -1396,28 +1403,21 @@ Too many calls batched. <li> <details> <summary> -<code>InsufficientProposersBalance</code> - 0</summary> -Proposer's balance is too low. -</details> -</li> -<li> -<details> -<summary> -<code>InvalidIndex</code> - 1</summary> +<code>InvalidIndex</code> - 0</summary> No proposal, bounty or spend at that index. </details> </li> <li> <details> <summary> -<code>TooManyApprovals</code> - 2</summary> +<code>TooManyApprovals</code> - 1</summary> Too many approvals in the queue. </details> </li> <li> <details> <summary> -<code>InsufficientPermission</code> - 3</summary> +<code>InsufficientPermission</code> - 2</summary> The spend origin is valid but the amount it is allowed to spend is lower than the amount to be spent. </details> @@ -1425,56 +1425,56 @@ amount to be spent. <li> <details> <summary> -<code>ProposalNotApproved</code> - 4</summary> +<code>ProposalNotApproved</code> - 3</summary> Proposal has not been approved. </details> </li> <li> <details> <summary> -<code>FailedToConvertBalance</code> - 5</summary> +<code>FailedToConvertBalance</code> - 4</summary> The balance of the asset kind is not convertible to the balance of the native asset. </details> </li> <li> <details> <summary> -<code>SpendExpired</code> - 6</summary> +<code>SpendExpired</code> - 5</summary> The spend has expired and cannot be claimed. </details> </li> <li> <details> <summary> -<code>EarlyPayout</code> - 7</summary> +<code>EarlyPayout</code> - 6</summary> The spend is not yet eligible for payout. </details> </li> <li> <details> <summary> -<code>AlreadyAttempted</code> - 8</summary> +<code>AlreadyAttempted</code> - 7</summary> The payment has already been attempted. </details> </li> <li> <details> <summary> -<code>PayoutError</code> - 9</summary> +<code>PayoutError</code> - 8</summary> There was some issue with the mechanism of payment. </details> </li> <li> <details> <summary> -<code>NotAttempted</code> - 10</summary> +<code>NotAttempted</code> - 9</summary> The payout was not yet attempted/claimed. </details> </li> <li> <details> <summary> -<code>Inconclusive</code> - 11</summary> +<code>Inconclusive</code> - 10</summary> The payment has neither failed nor succeeded yet. </details> </li> diff --git a/docs/api/runtime-errors.po b/docs/api/runtime-errors.po new file mode 100644 index 0000000000000000000000000000000000000000..5117a4d8d0c06d146f9375ea7bedbc6e48921ca6 --- /dev/null +++ b/docs/api/runtime-errors.po @@ -0,0 +1,387 @@ +msgid "System.InvalidSpecName" +msgstr "The name of specification does not match between the current runtime +and the new runtime." +msgid "System.SpecVersionNeedsToIncrease" +msgstr "The specification version is not allowed to decrease between the current runtime +and the new runtime." +msgid "System.FailedToExtractRuntimeVersion" +msgstr "Failed to extract the runtime version from the new runtime. + +Either calling `Core_version` or decoding `RuntimeVersion` failed." +msgid "System.NonDefaultComposite" +msgstr "Suicide called when the account has non-default composite data." +msgid "System.NonZeroRefCount" +msgstr "There is a non-zero reference count preventing the account from being purged." +msgid "System.CallFiltered" +msgstr "The origin filter prevent the call to be dispatched." +msgid "System.MultiBlockMigrationsOngoing" +msgstr "A multi-block migration is ongoing and prevents the current code from being replaced." +msgid "System.NothingAuthorized" +msgstr "No upgrade authorized." +msgid "System.Unauthorized" +msgstr "The submitted code is not authorized." +msgid "Scheduler.FailedToSchedule" +msgstr "Failed to schedule a call" +msgid "Scheduler.NotFound" +msgstr "Cannot find the scheduled call." +msgid "Scheduler.TargetBlockNumberInPast" +msgstr "Given target block number is in the past." +msgid "Scheduler.RescheduleNoChange" +msgstr "Reschedule failed because it does not change scheduled time." +msgid "Scheduler.Named" +msgstr "Attempt to use a non-named function on a named task." +msgid "Babe.InvalidEquivocationProof" +msgstr "An equivocation proof provided as part of an equivocation report is invalid." +msgid "Babe.InvalidKeyOwnershipProof" +msgstr "A key ownership proof provided as part of an equivocation report is invalid." +msgid "Babe.DuplicateOffenceReport" +msgstr "A given equivocation report is valid but already previously reported." +msgid "Babe.InvalidConfiguration" +msgstr "Submitted configuration is invalid." +msgid "Balances.VestingBalance" +msgstr "Vesting balance too high to send value." +msgid "Balances.LiquidityRestrictions" +msgstr "Account liquidity restrictions prevent withdrawal." +msgid "Balances.InsufficientBalance" +msgstr "Balance too low to send value." +msgid "Balances.ExistentialDeposit" +msgstr "Value too low to create account due to existential deposit." +msgid "Balances.Expendability" +msgstr "Transfer/payment would kill account." +msgid "Balances.ExistingVestingSchedule" +msgstr "A vesting schedule already exists for this account." +msgid "Balances.DeadAccount" +msgstr "Beneficiary account must pre-exist." +msgid "Balances.TooManyReserves" +msgstr "Number of named reserves exceed `MaxReserves`." +msgid "Balances.TooManyHolds" +msgstr "Number of holds exceed `VariantCountOf<T::RuntimeHoldReason>`." +msgid "Balances.TooManyFreezes" +msgstr "Number of freezes exceed `MaxFreezes`." +msgid "Balances.IssuanceDeactivated" +msgstr "The issuance cannot be modified since it is already deactivated." +msgid "Balances.DeltaZero" +msgstr "The delta cannot be zero." +msgid "OneshotAccount.BlockHeightInFuture" +msgstr "Block height is in the future." +msgid "OneshotAccount.BlockHeightTooOld" +msgstr "Block height is too old." +msgid "OneshotAccount.DestAccountNotExist" +msgstr "Destination account does not exist." +msgid "OneshotAccount.ExistentialDeposit" +msgstr "Destination account has a balance less than the existential deposit." +msgid "OneshotAccount.InsufficientBalance" +msgstr "Source account has insufficient balance." +msgid "OneshotAccount.OneshotAccountAlreadyCreated" +msgstr "Destination oneshot account already exists." +msgid "OneshotAccount.OneshotAccountNotExist" +msgstr "Source oneshot account does not exist." +msgid "SmithMembers.OriginMustHaveAnIdentity" +msgstr "Issuer of anything (invitation, acceptance, certification) must have an identity ID" +msgid "SmithMembers.OriginHasNeverBeenInvited" +msgstr "Issuer must be known as a potential smith" +msgid "SmithMembers.InvitationIsASmithPrivilege" +msgstr "Invitation is reseverd to smiths" +msgid "SmithMembers.InvitationIsAOnlineSmithPrivilege" +msgstr "Invitation is reseverd to online smiths" +msgid "SmithMembers.InvitationAlreadyAccepted" +msgstr "Invitation must not have been accepted yet" +msgid "SmithMembers.InvitationOfExistingNonExcluded" +msgstr "Invitation of an already known smith is forbidden except if it has been excluded" +msgid "SmithMembers.InvitationOfNonMember" +msgstr "Invitation of a non-member (of the WoT) is forbidden" +msgid "SmithMembers.CertificationMustBeAgreed" +msgstr "Certification cannot be made on someone who has not accepted an invitation" +msgid "SmithMembers.CertificationOnExcludedIsForbidden" +msgstr "Certification cannot be made on excluded" +msgid "SmithMembers.CertificationIsASmithPrivilege" +msgstr "Issuer must be a smith" +msgid "SmithMembers.CertificationIsAOnlineSmithPrivilege" +msgstr "Only online smiths can certify" +msgid "SmithMembers.CertificationOfSelfIsForbidden" +msgstr "Smith cannot certify itself" +msgid "SmithMembers.CertificationReceiverMustHaveBeenInvited" +msgstr "Receiver must be invited by another smith" +msgid "SmithMembers.CertificationAlreadyExists" +msgstr "Receiver must not already have this certification" +msgid "SmithMembers.CertificationStockFullyConsumed" +msgstr "A smith has a limited stock of certifications" +msgid "AuthorityMembers.AlreadyIncoming" +msgstr "Member already incoming." +msgid "AuthorityMembers.AlreadyOnline" +msgstr "Member already online." +msgid "AuthorityMembers.AlreadyOutgoing" +msgstr "Member already outgoing." +msgid "AuthorityMembers.MemberIdNotFound" +msgstr "Owner key is invalid as a member." +msgid "AuthorityMembers.MemberBlacklisted" +msgstr "Member is blacklisted." +msgid "AuthorityMembers.MemberNotBlacklisted" +msgstr "Member is not blacklisted." +msgid "AuthorityMembers.MemberNotFound" +msgstr "Member not found." +msgid "AuthorityMembers.NotOnlineNorIncoming" +msgstr "Neither online nor scheduled." +msgid "AuthorityMembers.NotMember" +msgstr "Not member." +msgid "AuthorityMembers.SessionKeysNotProvided" +msgstr "Session keys not provided." +msgid "AuthorityMembers.TooManyAuthorities" +msgstr "Too many authorities." +msgid "Session.InvalidProof" +msgstr "Invalid ownership proof." +msgid "Session.NoAssociatedValidatorId" +msgstr "No associated validator ID for account." +msgid "Session.DuplicatedKey" +msgstr "Registered duplicate key." +msgid "Session.NoKeys" +msgstr "No keys are associated with this account." +msgid "Session.NoAccount" +msgstr "Key setting account is not live, so it's impossible to associate keys." +msgid "Grandpa.PauseFailed" +msgstr "Attempt to signal GRANDPA pause when the authority set isn't live +(either paused or already pending pause)." +msgid "Grandpa.ResumeFailed" +msgstr "Attempt to signal GRANDPA resume when the authority set isn't paused +(either live or already pending resume)." +msgid "Grandpa.ChangePending" +msgstr "Attempt to signal GRANDPA change with one already pending." +msgid "Grandpa.TooSoon" +msgstr "Cannot signal forced change so soon after last." +msgid "Grandpa.InvalidKeyOwnershipProof" +msgstr "A key ownership proof provided as part of an equivocation report is invalid." +msgid "Grandpa.InvalidEquivocationProof" +msgstr "An equivocation proof provided as part of an equivocation report is invalid." +msgid "Grandpa.DuplicateOffenceReport" +msgstr "A given equivocation report is valid but already previously reported." +msgid "ImOnline.InvalidKey" +msgstr "Non existent public key." +msgid "ImOnline.DuplicatedHeartbeat" +msgstr "Duplicated heartbeat." +msgid "Sudo.RequireSudo" +msgstr "Sender must be the Sudo account." +msgid "Preimage.TooBig" +msgstr "Preimage is too large to store on-chain." +msgid "Preimage.AlreadyNoted" +msgstr "Preimage has already been noted on-chain." +msgid "Preimage.NotAuthorized" +msgstr "The user is not authorized to perform this action." +msgid "Preimage.NotNoted" +msgstr "The preimage cannot be removed since it has not yet been noted." +msgid "Preimage.Requested" +msgstr "A preimage may not be removed when there are outstanding requests." +msgid "Preimage.NotRequested" +msgstr "The preimage request cannot be removed since no outstanding requests exist." +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" +msgstr "Duplicate proposals not allowed" +msgid "TechnicalCommittee.ProposalMissing" +msgstr "Proposal must exist" +msgid "TechnicalCommittee.WrongIndex" +msgstr "Mismatched index" +msgid "TechnicalCommittee.DuplicateVote" +msgstr "Duplicate vote ignored" +msgid "TechnicalCommittee.AlreadyInitialized" +msgstr "Members are already initialized!" +msgid "TechnicalCommittee.TooEarly" +msgstr "The close call was made too early, before the end of the voting." +msgid "TechnicalCommittee.TooManyProposals" +msgstr "There can only be a maximum of `MaxProposals` active proposals." +msgid "TechnicalCommittee.WrongProposalWeight" +msgstr "The given weight bound for the proposal was too low." +msgid "TechnicalCommittee.WrongProposalLength" +msgstr "The given length bound for the proposal was too low." +msgid "TechnicalCommittee.PrimeAccountNotMember" +msgstr "Prime account is not a member" +msgid "UniversalDividend.AccountNotAllowedToClaimUds" +msgstr "This account is not allowed to claim UDs." +msgid "Wot.NotEnoughCerts" +msgstr "Insufficient certifications received." +msgid "Wot.TargetStatusInvalid" +msgstr "Target status is incompatible with this operation." +msgid "Wot.IdtyCreationPeriodNotRespected" +msgstr "Identity creation period not respected." +msgid "Wot.NotEnoughReceivedCertsToCreateIdty" +msgstr "Insufficient received certifications to create identity." +msgid "Wot.MaxEmittedCertsReached" +msgstr "Maximum number of emitted certifications reached." +msgid "Wot.IssuerNotMember" +msgstr "Issuer cannot emit a certification because it is not member." +msgid "Wot.IdtyNotFound" +msgstr "Issuer or receiver not found." +msgid "Wot.MembershipRenewalPeriodNotRespected" +msgstr "Membership can only be renewed after an antispam delay." +msgid "Identity.IdtyAlreadyConfirmed" +msgstr "Identity already confirmed." +msgid "Identity.IdtyAlreadyCreated" +msgstr "Identity already created." +msgid "Identity.IdtyIndexNotFound" +msgstr "Identity index not found." +msgid "Identity.IdtyNameAlreadyExist" +msgstr "Identity name already exists." +msgid "Identity.IdtyNameInvalid" +msgstr "Invalid identity name." +msgid "Identity.IdtyNotFound" +msgstr "Identity not found." +msgid "Identity.InvalidSignature" +msgstr "Invalid payload signature." +msgid "Identity.InvalidRevocationKey" +msgstr "Invalid revocation key." +msgid "Identity.IssuerNotMember" +msgstr "Issuer is not member and can not perform this action." +msgid "Identity.NotRespectIdtyCreationPeriod" +msgstr "Identity creation period is not respected." +msgid "Identity.OwnerKeyAlreadyRecentlyChanged" +msgstr "Owner key already changed recently." +msgid "Identity.OwnerKeyAlreadyUsed" +msgstr "Owner key already used." +msgid "Identity.ProhibitedToRevertToAnOldKey" +msgstr "Reverting to an old key is prohibited." +msgid "Identity.AlreadyRevoked" +msgstr "Already revoked." +msgid "Identity.CanNotRevokeUnconfirmed" +msgstr "Can not revoke identity that never was member." +msgid "Identity.CanNotRevokeUnvalidated" +msgstr "Can not revoke identity that never was member." +msgid "Identity.AccountNotExist" +msgstr "Cannot link to an inexisting account." +msgid "Identity.InsufficientBalance" +msgstr "Insufficient balance to create an identity." +msgid "Membership.MembershipNotFound" +msgstr "Membership not found, can not renew." +msgid "Membership.AlreadyMember" +msgstr "Already member, can not add membership." +msgid "Certification.OriginMustHaveAnIdentity" +msgstr "Issuer of a certification must have an identity" +msgid "Certification.CannotCertifySelf" +msgstr "Identity cannot certify itself." +msgid "Certification.IssuedTooManyCert" +msgstr "Identity has already issued the maximum number of certifications." +msgid "Certification.NotEnoughCertReceived" +msgstr "Insufficient certifications received." +msgid "Certification.NotRespectCertPeriod" +msgstr "Identity has issued a certification too recently." +msgid "Certification.CertAlreadyExists" +msgstr "Can not add an already-existing cert" +msgid "Certification.CertDoesNotExist" +msgstr "Can not renew a non-existing cert" +msgid "Distance.AlreadyInEvaluation" +msgstr "Distance is already under evaluation." +msgid "Distance.TooManyEvaluationsByAuthor" +msgstr "Too many evaluations requested by author." +msgid "Distance.TooManyEvaluationsInBlock" +msgstr "Too many evaluations for this block." +msgid "Distance.NoAuthor" +msgstr "No author for this block." +msgid "Distance.CallerHasNoIdentity" +msgstr "Caller has no identity." +msgid "Distance.CallerIdentityNotFound" +msgstr "Caller identity not found." +msgid "Distance.CallerNotMember" +msgstr "Caller not member." +msgid "Distance.CallerStatusInvalid" +msgstr "" +msgid "Distance.TargetIdentityNotFound" +msgstr "Target identity not found." +msgid "Distance.QueueFull" +msgstr "Evaluation queue is full." +msgid "Distance.TooManyEvaluators" +msgstr "Too many evaluators in the current evaluation pool." +msgid "Distance.WrongResultLength" +msgstr "Evaluation result has a wrong length." +msgid "Distance.TargetMustBeUnvalidated" +msgstr "Targeted distance evaluation request is only possible for an unvalidated identity." +msgid "AtomicSwap.AlreadyExist" +msgstr "Swap already exists." +msgid "AtomicSwap.InvalidProof" +msgstr "Swap proof is invalid." +msgid "AtomicSwap.ProofTooLarge" +msgstr "Proof is too large." +msgid "AtomicSwap.SourceMismatch" +msgstr "Source does not match." +msgid "AtomicSwap.AlreadyClaimed" +msgstr "Swap has already been claimed." +msgid "AtomicSwap.NotExist" +msgstr "Swap does not exist." +msgid "AtomicSwap.ClaimActionMismatch" +msgstr "Claim action mismatch." +msgid "AtomicSwap.DurationNotPassed" +msgstr "Duration has not yet passed for the swap to be cancelled." +msgid "Multisig.MinimumThreshold" +msgstr "Threshold must be 2 or greater." +msgid "Multisig.AlreadyApproved" +msgstr "Call is already approved by this signatory." +msgid "Multisig.NoApprovalsNeeded" +msgstr "Call doesn't need any (more) approvals." +msgid "Multisig.TooFewSignatories" +msgstr "There are too few signatories in the list." +msgid "Multisig.TooManySignatories" +msgstr "There are too many signatories in the list." +msgid "Multisig.SignatoriesOutOfOrder" +msgstr "The signatories were provided out of order; they should be ordered." +msgid "Multisig.SenderInSignatories" +msgstr "The sender was contained in the other signatories; it shouldn't be." +msgid "Multisig.NotFound" +msgstr "Multisig operation not found when attempting to cancel." +msgid "Multisig.NotOwner" +msgstr "Only the account that originally created the multisig is able to cancel it." +msgid "Multisig.NoTimepoint" +msgstr "No timepoint was given, yet the multisig operation is already underway." +msgid "Multisig.WrongTimepoint" +msgstr "A different timepoint was given to the multisig operation that is underway." +msgid "Multisig.UnexpectedTimepoint" +msgstr "A timepoint was given, yet no multisig operation is underway." +msgid "Multisig.MaxWeightTooLow" +msgstr "The maximum weight information provided was too low." +msgid "Multisig.AlreadyStored" +msgstr "The data to be stored is already stored." +msgid "ProvideRandomness.QueueFull" +msgstr "Request randomness queue is full." +msgid "Proxy.TooMany" +msgstr "There are too many proxies registered or too many announcements pending." +msgid "Proxy.NotFound" +msgstr "Proxy registration not found." +msgid "Proxy.NotProxy" +msgstr "Sender is not a proxy of the account to be proxied." +msgid "Proxy.Unproxyable" +msgstr "A call which is incompatible with the proxy type's filter was attempted." +msgid "Proxy.Duplicate" +msgstr "Account is already a proxy." +msgid "Proxy.NoPermission" +msgstr "Call may not be made by proxy because it may escalate its privileges." +msgid "Proxy.Unannounced" +msgstr "Announcement, if made at all, was made too recently." +msgid "Proxy.NoSelfProxy" +msgstr "Cannot add self as proxy." +msgid "Utility.TooManyCalls" +msgstr "Too many calls batched." +msgid "Treasury.InvalidIndex" +msgstr "No proposal, bounty or spend at that index." +msgid "Treasury.TooManyApprovals" +msgstr "Too many approvals in the queue." +msgid "Treasury.InsufficientPermission" +msgstr "The spend origin is valid but the amount it is allowed to spend is lower than the +amount to be spent." +msgid "Treasury.ProposalNotApproved" +msgstr "Proposal has not been approved." +msgid "Treasury.FailedToConvertBalance" +msgstr "The balance of the asset kind is not convertible to the balance of the native asset." +msgid "Treasury.SpendExpired" +msgstr "The spend has expired and cannot be claimed." +msgid "Treasury.EarlyPayout" +msgstr "The spend is not yet eligible for payout." +msgid "Treasury.AlreadyAttempted" +msgstr "The payment has already been attempted." +msgid "Treasury.PayoutError" +msgstr "There was some issue with the mechanism of payment." +msgid "Treasury.NotAttempted" +msgstr "The payout was not yet attempted/claimed." +msgid "Treasury.Inconclusive" +msgstr "The payment has neither failed nor succeeded yet." diff --git a/docs/api/runtime-events.md b/docs/api/runtime-events.md index bde9aa35a192f1f363ea2f35092cd4520ce56585..f843ea5eb6e87ef3595de8da477dbeff6ae1920c 100644 --- a/docs/api/runtime-events.md +++ b/docs/api/runtime-events.md @@ -1,6 +1,6 @@ # Runtime events -There are **138** events from **35** pallets. +There are **136** events from **35** pallets. <ul> <li>System - 0 @@ -1763,19 +1763,7 @@ result: DispatchResult <li> <details> <summary> -<code>Proposed(proposal_index)</code> - 0</summary> -New proposal. - -```rust -proposal_index: ProposalIndex -``` - -</details> -</li> -<li> -<details> -<summary> -<code>Spending(budget_remaining)</code> - 1</summary> +<code>Spending(budget_remaining)</code> - 0</summary> We have ended a spend period and will now allocate funds. ```rust @@ -1787,7 +1775,7 @@ budget_remaining: BalanceOf<T, I> <li> <details> <summary> -<code>Awarded(proposal_index, award, account)</code> - 2</summary> +<code>Awarded(proposal_index, award, account)</code> - 1</summary> Some funds have been allocated. ```rust @@ -1801,20 +1789,7 @@ account: T::AccountId <li> <details> <summary> -<code>Rejected(proposal_index, slashed)</code> - 3</summary> -A proposal was rejected; funds were slashed. - -```rust -proposal_index: ProposalIndex -slashed: BalanceOf<T, I> -``` - -</details> -</li> -<li> -<details> -<summary> -<code>Burnt(burnt_funds)</code> - 4</summary> +<code>Burnt(burnt_funds)</code> - 2</summary> Some of our funds have been burnt. ```rust @@ -1826,7 +1801,7 @@ burnt_funds: BalanceOf<T, I> <li> <details> <summary> -<code>Rollover(rollover_balance)</code> - 5</summary> +<code>Rollover(rollover_balance)</code> - 3</summary> Spending has finished; this is the amount that rolls over until next spend. ```rust @@ -1838,7 +1813,7 @@ rollover_balance: BalanceOf<T, I> <li> <details> <summary> -<code>Deposit(value)</code> - 6</summary> +<code>Deposit(value)</code> - 4</summary> Some funds have been deposited. ```rust @@ -1850,7 +1825,7 @@ value: BalanceOf<T, I> <li> <details> <summary> -<code>SpendApproved(proposal_index, amount, beneficiary)</code> - 7</summary> +<code>SpendApproved(proposal_index, amount, beneficiary)</code> - 5</summary> A new spend proposal has been approved. ```rust @@ -1864,7 +1839,7 @@ beneficiary: T::AccountId <li> <details> <summary> -<code>UpdatedInactive(reactivated, deactivated)</code> - 8</summary> +<code>UpdatedInactive(reactivated, deactivated)</code> - 6</summary> The inactive funds of the pallet have been updated. ```rust @@ -1877,7 +1852,7 @@ deactivated: BalanceOf<T, I> <li> <details> <summary> -<code>AssetSpendApproved(index, asset_kind, amount, beneficiary, valid_from, expire_at)</code> - 9</summary> +<code>AssetSpendApproved(index, asset_kind, amount, beneficiary, valid_from, expire_at)</code> - 7</summary> A new asset spend proposal has been approved. ```rust @@ -1894,7 +1869,7 @@ expire_at: BlockNumberFor<T> <li> <details> <summary> -<code>AssetSpendVoided(index)</code> - 10</summary> +<code>AssetSpendVoided(index)</code> - 8</summary> An approved spend was voided. ```rust @@ -1906,7 +1881,7 @@ index: SpendIndex <li> <details> <summary> -<code>Paid(index, payment_id)</code> - 11</summary> +<code>Paid(index, payment_id)</code> - 9</summary> A payment happened. ```rust @@ -1919,7 +1894,7 @@ payment_id: <T::Paymaster as Pay>::Id <li> <details> <summary> -<code>PaymentFailed(index, payment_id)</code> - 12</summary> +<code>PaymentFailed(index, payment_id)</code> - 10</summary> A payment failed and can be retried. ```rust @@ -1932,7 +1907,7 @@ payment_id: <T::Paymaster as Pay>::Id <li> <details> <summary> -<code>SpendProcessed(index)</code> - 13</summary> +<code>SpendProcessed(index)</code> - 11</summary> A spend was processed and removed from the storage. It might have been successfully paid or it may have expired. diff --git a/xtask/README.md b/xtask/README.md index f9ee2d8980e7a608e5545c22b9a82011085c6864..c0f5fd5a895fc8d8f3524cb3c35750be7f9c3579 100644 --- a/xtask/README.md +++ b/xtask/README.md @@ -15,9 +15,11 @@ Usage: xtask <COMMAND> Commands: build Build duniter binary - gen-calls-doc Generate calls documentation + gen-doc Generate documentation (calls and events) inject-runtime-code Inject runtime code in raw specs release-runtime Release a new runtime + update-raw-specs Update raw specs locally with the files published on a Release + create-asset-link Create asset in a release test Execute unit tests and integration tests End2tests are skipped help Print this message or the help of the given subcommand(s) diff --git a/xtask/res/templates/runtime-errors.po b/xtask/res/templates/runtime-errors.po new file mode 100644 index 0000000000000000000000000000000000000000..b35e80ad382b1bec62aaf1744a1d9b83c5de83e1 --- /dev/null +++ b/xtask/res/templates/runtime-errors.po @@ -0,0 +1,7 @@ +{% for pallet in pallets -%} +{% for error in pallet.errors -%} + +msgid "{{ pallet.name }}.{{ error.name }}" +msgstr "{{ error.documentation }}" +{% endfor -%} +{% endfor -%} diff --git a/xtask/src/gen_doc.rs b/xtask/src/gen_doc.rs index 3ea49c74206a1afda8ce09597c5505e356f5cb95..9e4adf51bf7166cdfa8081a4f68281edc2002479 100644 --- a/xtask/src/gen_doc.rs +++ b/xtask/src/gen_doc.rs @@ -43,7 +43,8 @@ where const CALLS_DOC_FILEPATH: &str = "docs/api/runtime-calls.md"; const EVENTS_DOC_FILEPATH: &str = "docs/api/runtime-events.md"; const ERRORS_DOC_FILEPATH: &str = "docs/api/runtime-errors.md"; -const TEMPLATES_GLOB: &str = "xtask/res/templates/*.md"; +const ERRORS_PO_FILEPATH: &str = "docs/api/runtime-errors.po"; +const TEMPLATES_GLOB: &str = "xtask/res/templates/*.{md,po}"; const WEIGHT_FILEPATH: &str = "runtime/gdev/src/weights/"; // define structs and implementations @@ -306,7 +307,7 @@ pub(super) fn gen_doc() -> Result<()> { }) }); - let (call_doc, event_doc, error_doc) = print_runtime(runtime); + let (call_doc, event_doc, error_doc, error_po) = print_runtime(runtime); // Generate docs from rust code Command::new("cargo") @@ -348,6 +349,10 @@ pub(super) fn gen_doc() -> Result<()> { .with_context(|| format!("Failed to create file '{}'", ERRORS_DOC_FILEPATH))?; file.write_all(error_doc.as_bytes()) .with_context(|| format!("Failed to write to file '{}'", ERRORS_DOC_FILEPATH))?; + let mut file = File::create(ERRORS_PO_FILEPATH) + .with_context(|| format!("Failed to create file '{}'", ERRORS_PO_FILEPATH))?; + file.write_all(error_po.as_bytes()) + .with_context(|| format!("Failed to write to file '{}'", ERRORS_PO_FILEPATH))?; Ok(()) } @@ -469,7 +474,7 @@ fn get_weights(max_weight: u128) -> Result<HashMap<String, HashMap<String, Weigh } /// use template to render markdown file with runtime calls documentation -fn print_runtime(pallets: RuntimePallets) -> (String, String, String) { +fn print_runtime(pallets: RuntimePallets) -> (String, String, String, String) { // init variables let mut user_calls_counter = 0; let user_calls_pallets: RuntimePallets = pallets @@ -568,5 +573,9 @@ fn print_runtime(pallets: RuntimePallets) -> (String, String, String) { .render("runtime-errors.md", &context) .expect("template error"); - (call_doc, event_doc, error_doc) + let error_po = tera + .render("runtime-errors.po", &context) + .expect("template error"); + + (call_doc, event_doc, error_doc, error_po) }