diff --git a/docs/api/runtime-calls.md b/docs/api/runtime-calls.md index 29106b2b22bbb41e82ceb127d2a3efc1d1ae41ce..a6d81afb86f875d27b814f9fa0fec90d6e316fad 100644 --- a/docs/api/runtime-calls.md +++ b/docs/api/runtime-calls.md @@ -29,6 +29,7 @@ call: Box<CallOrHashOf<T>> ``` </details> + Anonymously schedule a task. #### cancel - 1 @@ -41,6 +42,7 @@ index: u32 ``` </details> + Cancel an anonymously scheduled task. #### schedule_named - 2 @@ -56,6 +58,7 @@ call: Box<CallOrHashOf<T>> ``` </details> + Schedule a named task. #### cancel_named - 3 @@ -67,6 +70,7 @@ id: Vec<u8> ``` </details> + Cancel a named scheduled task. #### schedule_after - 4 @@ -81,6 +85,7 @@ call: Box<CallOrHashOf<T>> ``` </details> + Anonymously schedule a task after a delay. @@ -97,6 +102,7 @@ call: Box<CallOrHashOf<T>> ``` </details> + Schedule a named task after a delay. @@ -112,6 +118,7 @@ key_owner_proof: T::KeyOwnerProof ``` </details> + Report authority equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence will @@ -129,6 +136,7 @@ value: T::Balance ``` </details> + Transfer some liquid free balance to another account. `transfer` will set the `FreeBalance` of the sender and receiver. @@ -148,6 +156,7 @@ value: T::Balance ``` </details> + Same as the [`transfer`] call, but with a check that the transfer will not kill the origin account. @@ -165,6 +174,7 @@ keep_alive: bool ``` </details> + Transfer the entire transferable balance from the caller account. NOTE: This function only attempts to transfer _transferable_ balances. This means that @@ -195,6 +205,7 @@ value: <T::Currency as Currency<T::AccountId>>::Balance ``` </details> + Create an account that can only be consumed once - `dest`: The oneshot account to be created. @@ -212,6 +223,7 @@ dest: Account<<T::Lookup as StaticLookup>::Source> ``` </details> + Consume a oneshot account and transfer its balance to an account - `block_height`: Must be a recent block number. The limit is `BlockHashCount` in the past. (this is to prevent replay attacks) @@ -230,6 +242,7 @@ balance: <T::Currency as Currency<T::AccountId>>::Balance ``` </details> + Consume a oneshot account then transfer some amount to an account, and the remaining amount to another account. @@ -253,6 +266,7 @@ and the remaining amount to another account. + #### go_online - 1 <details><summary><code>go_online()</code></summary> @@ -263,6 +277,7 @@ and the remaining amount to another account. + #### set_session_keys - 2 <details><summary><code>set_session_keys(keys)</code></summary> @@ -274,6 +289,7 @@ keys: T::KeysWrapper + ### Grandpa - 15 #### report_equivocation - 0 @@ -286,6 +302,7 @@ key_owner_proof: T::KeyOwnerProof ``` </details> + Report voter equivocation/misbehavior. This method will verify the equivocation proof and validate the given key ownership proof against the extracted offender. If both are valid, the offence @@ -303,6 +320,7 @@ weight: Weight ``` </details> + Dispatches a function call from root origin. This function does not check the weight of the call, and instead allows the caller to specify the weight of the call. @@ -320,6 +338,7 @@ bytes: Vec<u8> ``` </details> + Register a preimage on-chain. If the preimage was previously requested, no fees or deposits are taken for providing @@ -334,6 +353,7 @@ hash: T::Hash ``` </details> + Clear an unrequested preimage from the runtime storage. #### request_preimage - 2 @@ -345,6 +365,7 @@ hash: T::Hash ``` </details> + Request a preimage be uploaded to the chain without paying any fees or deposits. If the preimage requests has already been provided on-chain, we unreserve any deposit @@ -359,6 +380,7 @@ hash: T::Hash ``` </details> + Clear a previously made request for a preimage. NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. @@ -375,6 +397,7 @@ length_bound: u32 ``` </details> + Dispatch a proposal from a member using the `Member` origin. Origin must be a member of the collective. @@ -391,6 +414,7 @@ length_bound: u32 ``` </details> + Add a new proposal to either be voted on or executed directly. Requires the sender to be member. @@ -410,6 +434,7 @@ approve: bool ``` </details> + Add an aye or nay vote for the sender to the given proposal. Requires the sender to be a member. @@ -430,6 +455,7 @@ length_bound: u32 ``` </details> + Close a vote that is either approved, disapproved or whose voting period has ended. May be called by any signed account in order to finish voting and close the proposal. @@ -459,6 +485,7 @@ proposal. ``` </details> + Claim Universal Dividends #### transfer_ud - 1 @@ -471,6 +498,7 @@ value: BalanceOf<T> ``` </details> + Transfer some liquid free balance to another account, in milliUD. #### transfer_ud_keep_alive - 2 @@ -483,6 +511,7 @@ value: BalanceOf<T> ``` </details> + Transfer some liquid free balance to another account, in milliUD. #### force_set_first_eligible_ud - 3 @@ -497,6 +526,7 @@ first_eligible_ud: FirstEligibleUd + ### Identity - 41 #### create_identity - 0 @@ -508,6 +538,7 @@ owner_key: T::AccountId ``` </details> + Create an identity for an existing account - `owner_key`: the public key corresponding to the identity to be created @@ -523,6 +554,7 @@ idty_name: IdtyName ``` </details> + Confirm the creation of an identity and give it a name - `idty_name`: the name uniquely associated to this identity. Must match the validation rules defined by the runtime. @@ -540,6 +572,7 @@ idty_index: T::IdtyIndex + #### change_owner_key - 3 <details><summary><code>change_owner_key(new_key, new_key_sig)</code></summary> @@ -550,6 +583,7 @@ new_key_sig: T::NewOwnerKeySignature ``` </details> + Change identity owner key. - `new_key`: the new owner key. @@ -569,6 +603,7 @@ revocation_sig: T::RevocationSignature ``` </details> + Revoke an identity using a revocation signature - `idty_index`: the index of the identity to be revoked. @@ -590,6 +625,7 @@ inc: bool + ### Membership - 42 #### request_membership - 1 @@ -603,6 +639,7 @@ metadata: T::MetaData + #### renew_membership - 3 <details><summary><code>renew_membership(maybe_idty_id)</code></summary> @@ -614,6 +651,7 @@ maybe_idty_id: Option<T::IdtyId> + ### Cert - 43 #### add_cert - 1 @@ -626,6 +664,7 @@ receiver: T::IdtyIndex ``` </details> + Add a new certification or renew an existing one - `receiver`: the account receiving the certification from the origin @@ -645,6 +684,7 @@ metadata: T::MetaData + #### renew_membership - 3 <details><summary><code>renew_membership(maybe_idty_id)</code></summary> @@ -656,6 +696,7 @@ maybe_idty_id: Option<T::IdtyId> + #### revoke_membership - 4 <details><summary><code>revoke_membership(maybe_idty_id)</code></summary> @@ -667,6 +708,7 @@ maybe_idty_id: Option<T::IdtyId> + ### SmithsCert - 53 #### add_cert - 1 @@ -679,6 +721,7 @@ receiver: T::IdtyIndex ``` </details> + Add a new certification or renew an existing one - `receiver`: the account receiving the certification from the origin @@ -699,6 +742,7 @@ duration: T::BlockNumber ``` </details> + Register a new atomic swap, declaring an intention to send funds from origin to target on the current blockchain. The target can claim the fund using the revealed proof. If the fund is not claimed after `duration` blocks, then the sender can cancel the swap. @@ -722,6 +766,7 @@ action: T::SwapAction ``` </details> + Claim an atomic swap. The dispatch origin for this call must be _Signed_. @@ -740,6 +785,7 @@ hashed_proof: HashedProof ``` </details> + Cancel an atomic swap. Only possible after the originally set duration has passed. The dispatch origin for this call must be _Signed_. @@ -759,6 +805,7 @@ call: Box<<T as Config>::Call> ``` </details> + Immediately dispatch a multi-signature call using a single approval from the caller. The dispatch origin for this call must be _Signed_. @@ -784,6 +831,7 @@ max_weight: Weight ``` </details> + Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. @@ -824,6 +872,7 @@ max_weight: Weight ``` </details> + Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. @@ -856,6 +905,7 @@ call_hash: [u8; 32] ``` </details> + Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously for this operation will be unreserved on success. @@ -881,6 +931,7 @@ salt: H256 ``` </details> + Request a randomness ### Proxy - 63 @@ -896,6 +947,7 @@ call: Box<<T as Config>::Call> ``` </details> + Dispatch the given `call` from an account that the sender is authorised for through `add_proxy`. @@ -920,6 +972,7 @@ delay: T::BlockNumber ``` </details> + Register a proxy account for the sender that is able to make calls on its behalf. The dispatch origin for this call must be _Signed_. @@ -942,6 +995,7 @@ delay: T::BlockNumber ``` </details> + Unregister a proxy account for the sender. The dispatch origin for this call must be _Signed_. @@ -959,6 +1013,7 @@ Parameters: ``` </details> + Unregister all proxy accounts for the sender. The dispatch origin for this call must be _Signed_. @@ -978,6 +1033,7 @@ index: u16 ``` </details> + Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and initialize it with a proxy of `proxy_type` for `origin` sender. @@ -1011,6 +1067,7 @@ ext_index: u32 ``` </details> + Removes a previously spawned anonymous proxy. WARNING: **All access to this account will be lost.** Any funds held in it will be @@ -1039,6 +1096,7 @@ call_hash: CallHashOf<T> ``` </details> + Publish the hash of a proxy-call that will be made in the future. This must be called some number of blocks before the corresponding `proxy` is attempted @@ -1066,6 +1124,7 @@ call_hash: CallHashOf<T> ``` </details> + Remove a given announcement. May be called by a proxy account to remove a call they previously announced and return @@ -1088,6 +1147,7 @@ call_hash: CallHashOf<T> ``` </details> + Remove the given announcement of a delegate. May be called by a target (proxied) account to remove a call that one of their delegates @@ -1112,6 +1172,7 @@ call: Box<<T as Config>::Call> ``` </details> + Dispatch the given `call` from an account that the sender is authorized for through `add_proxy`. @@ -1136,6 +1197,7 @@ calls: Vec<<T as Config>::Call> ``` </details> + Send a batch of dispatch calls. May be called from any origin. @@ -1157,6 +1219,7 @@ call: Box<<T as Config>::Call> ``` </details> + Send a call through an indexed pseudonym of the sender. Filter from origin are passed along. The call will be dispatched with an origin which @@ -1180,6 +1243,7 @@ calls: Vec<<T as Config>::Call> ``` </details> + Send a batch of dispatch calls and atomically execute them. The whole transaction will rollback and fail if any of the calls failed. @@ -1201,6 +1265,7 @@ calls: Vec<<T as Config>::Call> ``` </details> + Send a batch of dispatch calls. Unlike `batch`, it allows errors and won't interrupt. @@ -1225,6 +1290,7 @@ beneficiary: <T::Lookup as StaticLookup>::Source ``` </details> + Put forward a suggestion for spending. A deposit proportional to the value is reserved and slashed if the proposal is rejected. It is returned once the proposal is awarded. @@ -1240,6 +1306,7 @@ beneficiary: <T::Lookup as StaticLookup>::Source ``` </details> + Propose and approve a spend of treasury funds. - `origin`: Must be `SpendOrigin` with the `Success` value being at least `amount`. @@ -1258,6 +1325,7 @@ proposal_id: ProposalIndex ``` </details> + Force a previously approved proposal to be removed from the approval queue. The original deposit will no longer be returned. @@ -1282,6 +1350,7 @@ ratio: Perbill ``` </details> + A dispatch that will fill the block weight up to the given ratio. #### set_heap_pages - 2 @@ -1293,6 +1362,7 @@ pages: u64 ``` </details> + Set the number of pages in the WebAssembly environment's heap. #### set_code - 3 @@ -1304,6 +1374,7 @@ code: Vec<u8> ``` </details> + Set the new runtime code. @@ -1316,6 +1387,7 @@ code: Vec<u8> ``` </details> + Set the new runtime code without doing any checks of the given `code`. @@ -1328,6 +1400,7 @@ items: Vec<KeyValue> ``` </details> + Set some items of storage. #### kill_storage - 6 @@ -1339,6 +1412,7 @@ keys: Vec<Key> ``` </details> + Kill some items from storage. #### kill_prefix - 7 @@ -1351,6 +1425,7 @@ subkeys: u32 ``` </details> + Kill all storage items with a key that starts with the given prefix. **NOTE:** We rely on the Root origin to provide us the number of subkeys under @@ -1367,6 +1442,7 @@ config: NextConfigDescriptor ``` </details> + Plan an epoch config change. The epoch config change is recorded and will be enacted on the next call to `enact_epoch_change`. The config will be activated one epoch after. Multiple calls to this method will replace any existing planned config change that had @@ -1385,6 +1461,7 @@ new_reserved: T::Balance ``` </details> + Set the balances of a given account. This will alter `FreeBalance` and `ReservedBalance` in storage. it will @@ -1405,6 +1482,7 @@ value: T::Balance ``` </details> + Exactly as `transfer`, except the origin must be root and the source account may be specified. @@ -1418,6 +1496,7 @@ amount: T::Balance ``` </details> + Unreserve some balance from a user by force. Can only be called by ROOT. @@ -1435,6 +1514,7 @@ member_id: T::MemberId + ### Grandpa - 15 #### note_stalled - 2 @@ -1447,6 +1527,7 @@ best_finalized_block_number: T::BlockNumber ``` </details> + Note that the current authority set of the GRANDPA finality gadget has stalled. This will trigger a forced authority set change at the beginning of the next session, to @@ -1473,6 +1554,7 @@ old_count: MemberCount ``` </details> + Set the collective's membership. - `new_members`: The new member list. Be nice to the chain and provide it sorted. @@ -1485,7 +1567,7 @@ Requires root origin. NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but the weight estimations rely on it to estimate dispatchable weight. -# WARNING: +WARNING: The `pallet-collective` can also be managed by logic outside of the pallet through the implementation of the trait [`ChangeMembers`]. @@ -1502,6 +1584,7 @@ proposal_hash: T::Hash ``` </details> + Disapprove a proposal, close, and remove it from the system, regardless of its current state. @@ -1525,6 +1608,7 @@ idty_name: Option<IdtyName> + #### prune_item_identities_names - 6 <details><summary><code>prune_item_identities_names(names)</code></summary> @@ -1536,6 +1620,7 @@ names: Vec<IdtyName> + ### Membership - 42 #### force_request_membership - 0 @@ -1550,6 +1635,7 @@ metadata: T::MetaData + ### Cert - 43 #### force_add_cert - 0 @@ -1565,6 +1651,7 @@ verify_rules: bool + #### del_cert - 2 <details><summary><code>del_cert(issuer, receiver)</code></summary> @@ -1577,6 +1664,7 @@ receiver: T::IdtyIndex + #### remove_all_certs_received_by - 3 <details><summary><code>remove_all_certs_received_by(idty_index)</code></summary> @@ -1588,6 +1676,7 @@ idty_index: T::IdtyIndex + ### SmithsMembership - 52 #### force_request_membership - 0 @@ -1602,6 +1691,7 @@ metadata: T::MetaData + ### SmithsCert - 53 #### force_add_cert - 0 @@ -1617,6 +1707,7 @@ verify_rules: bool + #### del_cert - 2 <details><summary><code>del_cert(issuer, receiver)</code></summary> @@ -1629,6 +1720,7 @@ receiver: T::IdtyIndex + #### remove_all_certs_received_by - 3 <details><summary><code>remove_all_certs_received_by(idty_index)</code></summary> @@ -1640,6 +1732,7 @@ idty_index: T::IdtyIndex + ### Utility - 64 #### dispatch_as - 3 @@ -1652,6 +1745,7 @@ call: Box<<T as Config>::Call> ``` </details> + Dispatches a function call with a provided origin. The dispatch origin for this call must be _Root_. @@ -1677,6 +1771,7 @@ remark: Vec<u8> ``` </details> + Make some on-chain remark. @@ -1689,6 +1784,7 @@ remark: Vec<u8> ``` </details> + Make some on-chain remark and emit event. ### Session - 14 @@ -1703,6 +1799,7 @@ proof: Vec<u8> ``` </details> + Sets the session key(s) of the function caller to `keys`. Allows an account to set its session key prior to becoming a validator. This doesn't take effect until the next session. @@ -1718,6 +1815,7 @@ The dispatch origin of this function must be signed. ``` </details> + Removes any session key(s) of the function caller. This doesn't take effect until the next session. @@ -1741,6 +1839,7 @@ maybe_idty_id: Option<T::IdtyId> + #### revoke_membership - 4 <details><summary><code>revoke_membership(maybe_idty_id)</code></summary> @@ -1752,6 +1851,7 @@ maybe_idty_id: Option<T::IdtyId> + ### SmithsMembership - 52 #### claim_membership - 2 @@ -1765,3 +1865,4 @@ maybe_idty_id: Option<T::IdtyId> + diff --git a/xtask/res/templates/runtime-calls-category.md b/xtask/res/templates/runtime-calls-category.md index 2553bfb355d4981a29d4db5a6ce04048a221e4b7..d65ca060e4b9e6416631fb0bfd1768e16fc8bd3c 100644 --- a/xtask/res/templates/runtime-calls-category.md +++ b/xtask/res/templates/runtime-calls-category.md @@ -19,7 +19,8 @@ There are **{{ calls_counter }}** {{ category_name }} calls from **{{ pallets | ``` </details> -{{ call.documentation }} +{# replace markdown sytax in documentation breaking the final result #} +{{ call.documentation | replace(from="# WARNING:", to="WARNING:") }} {% endfor -%} {% endfor -%}