diff --git a/docs/asset-hub-kusama/constants.md b/docs/asset-hub-kusama/constants.md index a82981150..550a3ca92 100644 --- a/docs/asset-hub-kusama/constants.md +++ b/docs/asset-hub-kusama/constants.md @@ -14,18 +14,38 @@ The following sections contain the module constants, also known as parameter typ - **[balances](#balances)** +- **[bounties](#bounties)** + +- **[childBounties](#childbounties)** + +- **[claims](#claims)** + - **[collatorSelection](#collatorselection)** +- **[convictionVoting](#convictionvoting)** + +- **[delegatedStaking](#delegatedstaking)** + - **[foreignAssets](#foreignassets)** +- **[indices](#indices)** + - **[messageQueue](#messagequeue)** +- **[multiBlockElection](#multiblockelection)** + +- **[multiBlockElectionVerifier](#multiblockelectionverifier)** + +- **[multiBlockMigrations](#multiblockmigrations)** + - **[multisig](#multisig)** - **[nftFractionalization](#nftfractionalization)** - **[nfts](#nfts)** +- **[nominationPools](#nominationpools)** + - **[parachainSystem](#parachainsystem)** - **[polkadotXcm](#polkadotxcm)** @@ -34,8 +54,20 @@ The following sections contain the module constants, also known as parameter typ - **[proxy](#proxy)** +- **[recovery](#recovery)** + +- **[referenda](#referenda)** + - **[revive](#revive)** +- **[scheduler](#scheduler)** + +- **[session](#session)** + +- **[society](#society)** + +- **[staking](#staking)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** @@ -44,12 +76,16 @@ The following sections contain the module constants, also known as parameter typ - **[transactionPayment](#transactionpayment)** +- **[treasury](#treasury)** + - **[uniques](#uniques)** - **[utility](#utility)** - **[vesting](#vesting)** +- **[voterList](#voterlist)** + - **[xcmpQueue](#xcmpqueue)** @@ -82,7 +118,7 @@ ___ - **interface**: `api.consts.assetConversion.poolSetupFee` - **summary**: A one-time fee to setup the pool. -### poolSetupFeeAsset: `StagingXcmV4Location` +### poolSetupFeeAsset: `StagingXcmV5Location` - **interface**: `api.consts.assetConversion.poolSetupFeeAsset` - **summary**: Asset class from [`Config::Assets`] used to pay the [`Config::PoolSetupFee`]. @@ -164,6 +200,74 @@ ___ ___ +## bounties + +### bountyDepositBase: `u128` +- **interface**: `api.consts.bounties.bountyDepositBase` +- **summary**: The amount held on deposit for placing a bounty proposal. + +### bountyDepositPayoutDelay: `u32` +- **interface**: `api.consts.bounties.bountyDepositPayoutDelay` +- **summary**: The delay period for which a bounty beneficiary need to wait before claim the payout. + +### bountyUpdatePeriod: `u32` +- **interface**: `api.consts.bounties.bountyUpdatePeriod` +- **summary**: The time limit for a curator to act before a bounty expires. + + The period that starts when a curator is approved, during which they must execute or update the bounty via `extend_bounty_expiry`. If missed, the bounty expires, and the curator may be slashed. If `BlockNumberFor::MAX`, bounties stay active indefinitely, removing the need for `extend_bounty_expiry`. + +### bountyValueMinimum: `u128` +- **interface**: `api.consts.bounties.bountyValueMinimum` +- **summary**: Minimum value for a bounty. + +### curatorDepositMax: `Option` +- **interface**: `api.consts.bounties.curatorDepositMax` +- **summary**: Maximum amount of funds that should be placed in a deposit for making a proposal. + +### curatorDepositMin: `Option` +- **interface**: `api.consts.bounties.curatorDepositMin` +- **summary**: Minimum amount of funds that should be placed in a deposit for making a proposal. + +### curatorDepositMultiplier: `Permill` +- **interface**: `api.consts.bounties.curatorDepositMultiplier` +- **summary**: The curator deposit is calculated as a percentage of the curator fee. + + This deposit has optional upper and lower bounds with `CuratorDepositMax` and `CuratorDepositMin`. + +### dataDepositPerByte: `u128` +- **interface**: `api.consts.bounties.dataDepositPerByte` +- **summary**: The amount held on deposit per byte within the tip report reason or bounty description. + +### maximumReasonLength: `u32` +- **interface**: `api.consts.bounties.maximumReasonLength` +- **summary**: Maximum acceptable reason length. + + Benchmarks depend on this value, be sure to update weights file when changing this value + +___ + + +## childBounties + +### childBountyValueMinimum: `u128` +- **interface**: `api.consts.childBounties.childBountyValueMinimum` +- **summary**: Minimum value for a child-bounty. + +### maxActiveChildBountyCount: `u32` +- **interface**: `api.consts.childBounties.maxActiveChildBountyCount` +- **summary**: Maximum number of child bounties that can be added to a parent bounty. + +___ + + +## claims + +### prefix: `Bytes` +- **interface**: `api.consts.claims.prefix` + +___ + + ## collatorSelection ### kickThreshold: `u32` @@ -194,6 +298,36 @@ ___ ___ +## convictionVoting + +### maxVotes: `u32` +- **interface**: `api.consts.convictionVoting.maxVotes` +- **summary**: The maximum number of concurrent votes an account may have. + + Also used to compute weight, an overly large value can lead to extrinsics with large weight estimation: see `delegate` for instance. + +### voteLockingPeriod: `u32` +- **interface**: `api.consts.convictionVoting.voteLockingPeriod` +- **summary**: The minimum period of vote locking. + + It should be no shorter than enactment period to ensure that in the case of an approval, those successful voters are locked into the consequences that their votes entail. + +___ + + +## delegatedStaking + +### palletId: `FrameSupportPalletId` +- **interface**: `api.consts.delegatedStaking.palletId` +- **summary**: Injected identifier for the pallet. + +### slashRewardFraction: `Perbill` +- **interface**: `api.consts.delegatedStaking.slashRewardFraction` +- **summary**: Fraction of the slash that is rewarded to the caller of pending slash to the agent. + +___ + + ## foreignAssets ### approvalDeposit: `u128` @@ -229,6 +363,15 @@ ___ ___ +## indices + +### deposit: `u128` +- **interface**: `api.consts.indices.deposit` +- **summary**: The deposit needed for reserving an index. + +___ + + ## messageQueue ### heapSize: `u32` @@ -256,6 +399,83 @@ ___ ___ +## multiBlockElection + +### pages: `u32` +- **interface**: `api.consts.multiBlockElection.pages` +- **summary**: The number of pages. + + The snapshot is created with this many keys in the storage map. + + The solutions may contain at MOST this many pages, but less pages are acceptable as well. + +### signedPhase: `u32` +- **interface**: `api.consts.multiBlockElection.signedPhase` +- **summary**: Duration of the signed phase. + +### signedValidationPhase: `u32` +- **interface**: `api.consts.multiBlockElection.signedValidationPhase` +- **summary**: Duration of the singed validation phase. + + The duration of this should not be less than `T::Pages`, and there is no point in it being more than `SignedPhase::MaxSubmission::get() * T::Pages`. TODO: integrity test for it. + +### targetSnapshotPerBlock: `u32` +- **interface**: `api.consts.multiBlockElection.targetSnapshotPerBlock` +- **summary**: The number of snapshot targets to fetch per block. + +### unsignedPhase: `u32` +- **interface**: `api.consts.multiBlockElection.unsignedPhase` +- **summary**: Duration of the unsigned phase. + +### voterSnapshotPerBlock: `u32` +- **interface**: `api.consts.multiBlockElection.voterSnapshotPerBlock` +- **summary**: The number of snapshot voters to fetch per block. + +___ + + +## multiBlockElectionVerifier + +### maxBackersPerWinner: `u32` +- **interface**: `api.consts.multiBlockElectionVerifier.maxBackersPerWinner` +- **summary**: Maximum number of backers, per winner, per page. + +### maxBackersPerWinnerFinal: `u32` +- **interface**: `api.consts.multiBlockElectionVerifier.maxBackersPerWinnerFinal` +- **summary**: Maximum number of backers, per winner, among all pages of an election. + + This can only be checked at the very final step of verification. + + NOTE: at the moment, we don't check this, and it is in place for future compatibility. + +### maxWinnersPerPage: `u32` +- **interface**: `api.consts.multiBlockElectionVerifier.maxWinnersPerPage` +- **summary**: Maximum number of supports (aka. winners/validators/targets) that can be represented in a page of results. + +### solutionImprovementThreshold: `Perbill` +- **interface**: `api.consts.multiBlockElectionVerifier.solutionImprovementThreshold` +- **summary**: The minimum amount of improvement to the solution score that defines a solution as "better". + +___ + + +## multiBlockMigrations + +### cursorMaxLen: `u32` +- **interface**: `api.consts.multiBlockMigrations.cursorMaxLen` +- **summary**: The maximal length of an encoded cursor. + + A good default needs to selected such that no migration will ever have a cursor with MEL above this limit. This is statically checked in `integrity_test`. + +### identifierMaxLen: `u32` +- **interface**: `api.consts.multiBlockMigrations.identifierMaxLen` +- **summary**: The maximal length of an encoded identifier. + + A good default needs to selected such that no migration will ever have an identifier with MEL above this limit. This is statically checked in `integrity_test`. + +___ + + ## multisig ### depositBase: `u128` @@ -363,6 +583,29 @@ ___ ___ +## nominationPools + +### maxPointsToBalance: `u8` +- **interface**: `api.consts.nominationPools.maxPointsToBalance` +- **summary**: The maximum pool points-to-balance ratio that an `open` pool can have. + + This is important in the event slashing takes place and the pool's points-to-balance ratio becomes disproportional. + + Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations are a function of number of points, and by setting this value to e.g. 10, you ensure that the total number of points in the system are at most 10 times the total_issuance of the chain, in the absolute worse case. + + For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1. Such a scenario would also be the equivalent of the pool being 90% slashed. + +### maxUnbonding: `u32` +- **interface**: `api.consts.nominationPools.maxUnbonding` +- **summary**: The maximum number of simultaneous unbonding chunks that can exist per member. + +### palletId: `FrameSupportPalletId` +- **interface**: `api.consts.nominationPools.palletId` +- **summary**: The nomination pool's pallet id. + +___ + + ## parachainSystem ### selfParaId: `u32` @@ -377,6 +620,18 @@ ___ ### advertisedXcmVersion: `u32` - **interface**: `api.consts.polkadotXcm.advertisedXcmVersion` - **summary**: The latest supported version that we advertise. Generally just set it to `pallet_xcm::CurrentXcmVersion`. + +### maxLockers: `u32` +- **interface**: `api.consts.polkadotXcm.maxLockers` +- **summary**: The maximum number of local XCM locks that a single account may have. + +### maxRemoteLockConsumers: `u32` +- **interface**: `api.consts.polkadotXcm.maxRemoteLockConsumers` +- **summary**: The maximum number of consumers a single remote lock may have. + +### universalLocation: `StagingXcmV5Junctions` +- **interface**: `api.consts.polkadotXcm.universalLocation` +- **summary**: This chain's Universal Location. ___ @@ -453,6 +708,62 @@ ___ ___ +## recovery + +### configDepositBase: `u128` +- **interface**: `api.consts.recovery.configDepositBase` +- **summary**: The base amount of currency needed to reserve for creating a recovery configuration. + + This is held for an additional storage item whose value size is `2 + sizeof(BlockNumber, Balance)` bytes. + +### friendDepositFactor: `u128` +- **interface**: `api.consts.recovery.friendDepositFactor` +- **summary**: The amount of currency needed per additional user when creating a recovery configuration. + + This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage value. + +### maxFriends: `u32` +- **interface**: `api.consts.recovery.maxFriends` +- **summary**: The maximum amount of friends allowed in a recovery configuration. + + NOTE: The threshold programmed in this Pallet uses u16, so it does not really make sense to have a limit here greater than u16::MAX. But also, that is a lot more than you should probably set this value to anyway... + +### recoveryDeposit: `u128` +- **interface**: `api.consts.recovery.recoveryDeposit` +- **summary**: The base amount of currency needed to reserve for starting a recovery. + + This is primarily held for deterring malicious recovery attempts, and should have a value large enough that a bad actor would choose not to place this deposit. It also acts to fund additional storage item whose value size is `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable threshold. + +___ + + +## referenda + +### alarmInterval: `u32` +- **interface**: `api.consts.referenda.alarmInterval` +- **summary**: Quantization level for the referendum wakeup scheduler. A higher number will result in fewer storage reads/writes needed for smaller voters, but also result in delays to the automatic referendum status changes. Explicit servicing instructions are unaffected. + +### maxQueued: `u32` +- **interface**: `api.consts.referenda.maxQueued` +- **summary**: Maximum size of the referendum queue for a single track. + +### submissionDeposit: `u128` +- **interface**: `api.consts.referenda.submissionDeposit` +- **summary**: The minimum amount to be used as a deposit for a public referendum proposal. + +### tracks: `Vec<(u16,PalletReferendaTrackDetails)>` +- **interface**: `api.consts.referenda.tracks` +- **summary**: A list of tracks. + + Note: if the tracks are dynamic, the value in the static metadata might be inaccurate. + +### undecidingTimeout: `u32` +- **interface**: `api.consts.referenda.undecidingTimeout` +- **summary**: The number of blocks after submission that a referendum must begin being decided by. Once this passes, then anyone may cancel the referendum. + +___ + + ## revive ### chainId: `u64` @@ -498,6 +809,154 @@ ___ ___ +## scheduler + +### maximumWeight: `SpWeightsWeightV2Weight` +- **interface**: `api.consts.scheduler.maximumWeight` +- **summary**: The maximum weight that may be scheduled per block for any dispatchables. + +### maxScheduledPerBlock: `u32` +- **interface**: `api.consts.scheduler.maxScheduledPerBlock` +- **summary**: The maximum number of scheduled calls in the queue for a single block. + + NOTE: + Dependent pallets' benchmarks might require a higher limit for the setting. Set a higher limit under `runtime-benchmarks` feature. + +___ + + +## session + +### keyDeposit: `u128` +- **interface**: `api.consts.session.keyDeposit` +- **summary**: The amount to be held when setting keys. + +___ + + +## society + +### challengePeriod: `u32` +- **interface**: `api.consts.society.challengePeriod` +- **summary**: The number of [Config::BlockNumberProvider] blocks between membership challenges. + +### claimPeriod: `u32` +- **interface**: `api.consts.society.claimPeriod` +- **summary**: The number of [Config::BlockNumberProvider] blocks on which new candidates can claim their membership and be the named head. + +### graceStrikes: `u32` +- **interface**: `api.consts.society.graceStrikes` +- **summary**: The maximum number of strikes before a member gets funds slashed. + +### maxBids: `u32` +- **interface**: `api.consts.society.maxBids` +- **summary**: The maximum number of bids at once. + +### maxLockDuration: `u32` +- **interface**: `api.consts.society.maxLockDuration` +- **summary**: The maximum duration of the payout lock. + +### maxPayouts: `u32` +- **interface**: `api.consts.society.maxPayouts` +- **summary**: The maximum number of payouts a member may have waiting unclaimed. + +### palletId: `FrameSupportPalletId` +- **interface**: `api.consts.society.palletId` +- **summary**: The societies's pallet id + +### periodSpend: `u128` +- **interface**: `api.consts.society.periodSpend` +- **summary**: The amount of incentive paid within each period. Doesn't include VoterTip. + +### votingPeriod: `u32` +- **interface**: `api.consts.society.votingPeriod` +- **summary**: The number of [Config::BlockNumberProvider] blocks on which new candidates should be voted on. Together with `ClaimPeriod`, this sums to the number of blocks between candidate intake periods. + +___ + + +## staking + +### bondingDuration: `u32` +- **interface**: `api.consts.staking.bondingDuration` +- **summary**: Number of eras that staked funds must remain bonded for. + +### historyDepth: `u32` +- **interface**: `api.consts.staking.historyDepth` +- **summary**: Number of eras to keep in history. + + Following information is kept for eras in `[current_era - HistoryDepth, current_era]`: `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`, `ErasTotalStake`, `ClaimedRewards`, `ErasStakersPaged`, `ErasStakersOverview`. + + Must be more than the number of eras delayed by session. I.e. active era must always be in history. I.e. `active_era > current_era - history_depth` must be guaranteed. + + If migrating an existing pallet from storage value to config value, this should be set to same value or greater as in storage. + +### maxEraDuration: `u64` +- **interface**: `api.consts.staking.maxEraDuration` +- **summary**: Maximum allowed era duration in milliseconds. + + This provides a defensive upper bound to cap the effective era duration, preventing excessively long eras from causing runaway inflation (e.g., due to bugs). If the actual era duration exceeds this value, it will be clamped to this maximum. + + Example: For an ideal era duration of 24 hours (86,400,000 ms), this can be set to 604,800,000 ms (7 days). + +### maxExposurePageSize: `u32` +- **interface**: `api.consts.staking.maxExposurePageSize` +- **summary**: The maximum size of each `T::ExposurePage`. + + An `ExposurePage` is weakly bounded to a maximum of `MaxExposurePageSize` nominators. + + For older non-paged exposure, a reward payout was restricted to the top `MaxExposurePageSize` nominators. This is to limit the i/o cost for the nominator payout. + + Note: `MaxExposurePageSize` is used to bound `ClaimedRewards` and is unsafe to reduce without handling it in a migration. + +### maxInvulnerables: `u32` +- **interface**: `api.consts.staking.maxInvulnerables` +- **summary**: Maximum number of invulnerable validators. + +### maxPruningItems: `u32` +- **interface**: `api.consts.staking.maxPruningItems` +- **summary**: Maximum number of storage items that can be pruned in a single call. + + This controls how many storage items can be deleted in each call to `prune_era_step`. This should be set to a conservative value (e.g., 100-500 items) to ensure pruning doesn't consume too much block space. The actual weight is determined by benchmarks. + +### maxUnlockingChunks: `u32` +- **interface**: `api.consts.staking.maxUnlockingChunks` +- **summary**: The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively determines how many unique eras a staker may be unbonding in. + + Note: `MaxUnlockingChunks` is used as the upper bound for the `BoundedVec` item `StakingLedger.unlocking`. Setting this value lower than the existing value can lead to inconsistencies in the `StakingLedger` and will need to be handled properly in a runtime migration. The test `reducing_max_unlocking_chunks_abrupt` shows this effect. + +### maxValidatorSet: `u32` +- **interface**: `api.consts.staking.maxValidatorSet` +- **summary**: The absolute maximum of winner validators this pallet should return. + + As this pallet supports multi-block election, the set of winner validators *per election* is bounded by this type. + +### planningEraOffset: `u32` +- **interface**: `api.consts.staking.planningEraOffset` +- **summary**: Number of sessions before the end of an era when the election for the next era will start. + + - This determines how many sessions **before** the last session of the era the staking election process should begin. + + - The value is bounded between **1** (election starts at the beginning of the last session) and `SessionsPerEra` (election starts at the beginning of the first session of the era). + + #### Example: + + - If `SessionsPerEra = 6` and `PlanningEraOffset = 1`, the election starts at the beginning of session `6 - 1 = 5`. + + - If `PlanningEraOffset = 6`, the election starts at the beginning of session `6 - 6 = 0`, meaning it starts at the very beginning of the era. + +### sessionsPerEra: `u32` +- **interface**: `api.consts.staking.sessionsPerEra` +- **summary**: Number of sessions per era, as per the preferences of the **relay chain**. + +### slashDeferDuration: `u32` +- **interface**: `api.consts.staking.slashDeferDuration` +- **summary**: Number of eras that slashes are deferred by, after computation. + + This should be less than the bonding duration. Set to 0 if slashes should be applied immediately, without opportunity for intervention. + +___ + + ## stateTrieMigration ### maxKeyLen: `u32` @@ -582,6 +1041,39 @@ ___ ___ +## treasury + +### burn: `Permill` +- **interface**: `api.consts.treasury.burn` +- **summary**: Percentage of spare funds (if any) that are burnt per spend period. + +### maxApprovals: `u32` +- **interface**: `api.consts.treasury.maxApprovals` +- **summary**: DEPRECATED: associated with `spend_local` call and will be removed in May 2025. Refer to for migration to `spend`. + + The maximum number of approvals that can wait in the spending queue. + + NOTE: This parameter is also used within the Bounties Pallet extension if enabled. + +### palletId: `FrameSupportPalletId` +- **interface**: `api.consts.treasury.palletId` +- **summary**: The treasury's pallet id, used for deriving its sovereign account ID. + +### payoutPeriod: `u32` +- **interface**: `api.consts.treasury.payoutPeriod` +- **summary**: The period during which an approved treasury spend has to be claimed. + +### potAccount: `AccountId32` +- **interface**: `api.consts.treasury.potAccount` +- **summary**: Gets this pallet's derived pot account. + +### spendPeriod: `u32` +- **interface**: `api.consts.treasury.spendPeriod` +- **summary**: Period between successive spends. + +___ + + ## uniques ### attributeDepositBase: `u128` @@ -640,6 +1132,51 @@ ___ ___ +## voterList + +### bagThresholds: `Vec` +- **interface**: `api.consts.voterList.bagThresholds` +- **summary**: The list of thresholds separating the various bags. + + Ids are separated into unsorted bags according to their score. This specifies the thresholds separating the bags. An id's bag is the largest bag for which the id's score is less than or equal to its upper threshold. + + When ids are iterated, higher bags are iterated completely before lower bags. This means that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower score, but peer ids within a particular bag are sorted in insertion order. + + #### Expressing the constant + + This constant must be sorted in strictly increasing order. Duplicate items are not permitted. + + There is an implied upper limit of `Score::MAX`; that value does not need to be specified within the bag. For any two threshold lists, if one ends with `Score::MAX`, the other one does not, and they are otherwise equal, the two lists will behave identically. + + #### Calculation + + It is recommended to generate the set of thresholds in a geometric series, such that there exists some constant ratio such that `threshold[k + 1] == (threshold[k] * constant_ratio).max(threshold[k] + 1)` for all `k`. + + The helpers in the `/utils/frame/generate-bags` module can simplify this calculation. + + #### Examples + + - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and iteration is strictly in insertion order. + + - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to the procedure given above, then the constant ratio is equal to 2. + + - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to the procedure given above, then the constant ratio is approximately equal to 1.248. + + - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall into bag 0, an id with score 2 will fall into bag 1, etc. + + #### Migration + + In the event that this list ever changes, a copy of the old bags list must be retained. With that `List::migrate` can be called, which will perform the appropriate migration. + +### maxAutoRebagPerBlock: `u32` +- **interface**: `api.consts.voterList.maxAutoRebagPerBlock` +- **summary**: Maximum number of accounts that may be re-bagged automatically in `on_idle`. + + A value of `0` (obtained by configuring `type MaxAutoRebagPerBlock = ();`) disables the feature. + +___ + + ## xcmpQueue ### maxActiveOutboundChannels: `u32` diff --git a/docs/asset-hub-kusama/errors.md b/docs/asset-hub-kusama/errors.md index 3d678e594..486c1a4c3 100644 --- a/docs/asset-hub-kusama/errors.md +++ b/docs/asset-hub-kusama/errors.md @@ -6,54 +6,228 @@ This page lists the errors that can be encountered in the different modules. (NOTE: These were generated from a static/snapshot view of a recent default asset-hub-kusama runtime. Some items may not be available in older nodes, or in any customized implementations.) +- **[ahMigrator](#ahmigrator)** + +- **[ahOps](#ahops)** + - **[assetConversion](#assetconversion)** +- **[assetRate](#assetrate)** + - **[assets](#assets)** - **[balances](#balances)** +- **[bounties](#bounties)** + +- **[childBounties](#childbounties)** + +- **[claims](#claims)** + - **[collatorSelection](#collatorselection)** +- **[convictionVoting](#convictionvoting)** + +- **[delegatedStaking](#delegatedstaking)** + - **[foreignAssets](#foreignassets)** +- **[indices](#indices)** + - **[messageQueue](#messagequeue)** +- **[multiBlockElection](#multiblockelection)** + +- **[multiBlockElectionSigned](#multiblockelectionsigned)** + +- **[multiBlockMigrations](#multiblockmigrations)** + - **[multisig](#multisig)** - **[nftFractionalization](#nftfractionalization)** - **[nfts](#nfts)** +- **[nominationPools](#nominationpools)** + - **[parachainSystem](#parachainsystem)** - **[polkadotXcm](#polkadotxcm)** - **[poolAssets](#poolassets)** +- **[preimage](#preimage)** + - **[proxy](#proxy)** +- **[recovery](#recovery)** + +- **[referenda](#referenda)** + - **[remoteProxyRelayChain](#remoteproxyrelaychain)** - **[revive](#revive)** +- **[scheduler](#scheduler)** + - **[session](#session)** +- **[society](#society)** + +- **[staking](#staking)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** +- **[treasury](#treasury)** + - **[uniques](#uniques)** - **[utility](#utility)** - **[vesting](#vesting)** +- **[voterList](#voterlist)** + +- **[whitelist](#whitelist)** + - **[xcmpQueue](#xcmpqueue)** ___ +## ahMigrator + +### BadXcmVersion +- **interface**: `api.errors.ahMigrator.BadXcmVersion.is` +- **summary**: The XCM version is invalid. + +### DmpQueuePriorityAlreadySet +- **interface**: `api.errors.ahMigrator.DmpQueuePriorityAlreadySet.is` +- **summary**: The DMP queue priority is already set to the same value. + +### FailedToBoundCall +- **interface**: `api.errors.ahMigrator.FailedToBoundCall.is` +- **summary**: Failed to bound a call. + +### FailedToBoundVector +- **interface**: `api.errors.ahMigrator.FailedToBoundVector.is` +- **summary**: Vector did not fit into its compile-time bound. + +### FailedToCalculateCheckingAccount +- **interface**: `api.errors.ahMigrator.FailedToCalculateCheckingAccount.is` +- **summary**: Checking account overflow or underflow. + +### FailedToConvertCall +- **interface**: `api.errors.ahMigrator.FailedToConvertCall.is` +- **summary**: Failed to convert RC call to AH call. + +### FailedToConvertType +- **interface**: `api.errors.ahMigrator.FailedToConvertType.is` +- **summary**: Failed to convert RC type to AH type. + +### FailedToIntegrateVestingSchedule +- **interface**: `api.errors.ahMigrator.FailedToIntegrateVestingSchedule.is` +- **summary**: Failed to integrate a vesting schedule. + +### FailedToProcessAccount +- **interface**: `api.errors.ahMigrator.FailedToProcessAccount.is` +- **summary**: Failed to process an account data from RC. + +### FailedToUnreserveDeposit +- **interface**: `api.errors.ahMigrator.FailedToUnreserveDeposit.is` +- **summary**: Failed to unreserve deposit. + +### InsertConflict +- **interface**: `api.errors.ahMigrator.InsertConflict.is` +- **summary**: Some item could not be inserted because it already exists. + +### InvalidOrigin +- **interface**: `api.errors.ahMigrator.InvalidOrigin.is` +- **summary**: The origin is invalid. + +### InvalidParameter +- **interface**: `api.errors.ahMigrator.InvalidParameter.is` +- **summary**: Invalid parameter. + +### PreimageChunkMissing +- **interface**: `api.errors.ahMigrator.PreimageChunkMissing.is` +- **summary**: Preimage chunk missing. + +### PreimageMissing +- **interface**: `api.errors.ahMigrator.PreimageMissing.is` +- **summary**: Preimage missing. + +### PreimageNotFound +- **interface**: `api.errors.ahMigrator.PreimageNotFound.is` +- **summary**: Failed to fetch preimage. + +### PreimageStatusInvalid +- **interface**: `api.errors.ahMigrator.PreimageStatusInvalid.is` +- **summary**: Preimage status invalid. + +### PreimageTooBig +- **interface**: `api.errors.ahMigrator.PreimageTooBig.is` +- **summary**: Preimage too big. + +### XcmError +- **interface**: `api.errors.ahMigrator.XcmError.is` +- **summary**: Failed to send XCM message. + +___ + + +## ahOps + +### ContributionsRemaining +- **interface**: `api.errors.ahOps.ContributionsRemaining.is` +- **summary**: Not all contributions are withdrawn. + +### FailedToWithdrawCrowdloanContribution +- **interface**: `api.errors.ahOps.FailedToWithdrawCrowdloanContribution.is` +- **summary**: Failed to withdraw crowdloan contribution. + +### InternalError +- **interface**: `api.errors.ahOps.InternalError.is` +- **summary**: Internal error, please bug report. + +### MigrationNotCompleted +- **interface**: `api.errors.ahOps.MigrationNotCompleted.is` +- **summary**: The Asset Hub migration is not completed. + +### NoCrowdloanContribution +- **interface**: `api.errors.ahOps.NoCrowdloanContribution.is` +- **summary**: Either no crowdloan contribution or already withdrawn. + +### NoCrowdloanReserve +- **interface**: `api.errors.ahOps.NoCrowdloanReserve.is` +- **summary**: Either no crowdloan reserve or already unreserved. + +### NoLeaseReserve +- **interface**: `api.errors.ahOps.NoLeaseReserve.is` +- **summary**: Either no lease deposit or already unreserved. + +### NotSovereign +- **interface**: `api.errors.ahOps.NotSovereign.is` +- **summary**: Account cannot be migrated since it is not a sovereign parachain account. + +### NotYet +- **interface**: `api.errors.ahOps.NotYet.is` +- **summary**: Block number is not yet reached. + +### WrongDerivedTranslation +- **interface**: `api.errors.ahOps.WrongDerivedTranslation.is` +- **summary**: The account is not a derived account. + +### ZeroBalance +- **interface**: `api.errors.ahOps.ZeroBalance.is` +- **summary**: The balance is zero. + +___ + + ## assetConversion ### AmountOneLessThanMinimal @@ -151,6 +325,23 @@ ___ ___ +## assetRate + +### AlreadyExists +- **interface**: `api.errors.assetRate.AlreadyExists.is` +- **summary**: The given asset ID already has an assigned conversion rate and cannot be re-created. + +### Overflow +- **interface**: `api.errors.assetRate.Overflow.is` +- **summary**: Overflow ocurred when calculating the inverse rate. + +### UnknownAssetKind +- **interface**: `api.errors.assetRate.UnknownAssetKind.is` +- **summary**: The given asset ID is unknown. + +___ + + ## assets ### AlreadyExists @@ -301,6 +492,105 @@ ___ ___ +## bounties + +### HasActiveChildBounty +- **interface**: `api.errors.bounties.HasActiveChildBounty.is` +- **summary**: The bounty cannot be closed because it has active child bounties. + +### InsufficientProposersBalance +- **interface**: `api.errors.bounties.InsufficientProposersBalance.is` +- **summary**: Proposer's balance is too low. + +### InvalidFee +- **interface**: `api.errors.bounties.InvalidFee.is` +- **summary**: Invalid bounty fee. + +### InvalidIndex +- **interface**: `api.errors.bounties.InvalidIndex.is` +- **summary**: No proposal or bounty at that index. + +### InvalidValue +- **interface**: `api.errors.bounties.InvalidValue.is` +- **summary**: Invalid bounty value. + +### NotProposer +- **interface**: `api.errors.bounties.NotProposer.is` +- **summary**: User is not the proposer of the bounty. + +### PendingPayout +- **interface**: `api.errors.bounties.PendingPayout.is` +- **summary**: A bounty payout is pending. To cancel the bounty, you must unassign and slash the curator. + +### Premature +- **interface**: `api.errors.bounties.Premature.is` +- **summary**: The bounties cannot be claimed/closed because it's still in the countdown period. + +### ReasonTooBig +- **interface**: `api.errors.bounties.ReasonTooBig.is` +- **summary**: The reason given is just too big. + +### RequireCurator +- **interface**: `api.errors.bounties.RequireCurator.is` +- **summary**: Require bounty curator. + +### TooManyQueued +- **interface**: `api.errors.bounties.TooManyQueued.is` +- **summary**: Too many approvals are already queued. + +### UnexpectedStatus +- **interface**: `api.errors.bounties.UnexpectedStatus.is` +- **summary**: The bounty status is unexpected. + +___ + + +## childBounties + +### InsufficientBountyBalance +- **interface**: `api.errors.childBounties.InsufficientBountyBalance.is` +- **summary**: The bounty balance is not enough to add new child-bounty. + +### ParentBountyNotActive +- **interface**: `api.errors.childBounties.ParentBountyNotActive.is` +- **summary**: The parent bounty is not in active state. + +### TooManyChildBounties +- **interface**: `api.errors.childBounties.TooManyChildBounties.is` +- **summary**: Number of child bounties exceeds limit `MaxActiveChildBountyCount`. + +___ + + +## claims + +### InvalidEthereumSignature +- **interface**: `api.errors.claims.InvalidEthereumSignature.is` +- **summary**: Invalid Ethereum signature. + +### InvalidStatement +- **interface**: `api.errors.claims.InvalidStatement.is` +- **summary**: A needed statement was not included. + +### PotUnderflow +- **interface**: `api.errors.claims.PotUnderflow.is` +- **summary**: There's not enough in the pot to pay out some unvested amount. Generally implies a logic error. + +### SenderHasNoClaim +- **interface**: `api.errors.claims.SenderHasNoClaim.is` +- **summary**: Account ID sending transaction has no claim. + +### SignerHasNoClaim +- **interface**: `api.errors.claims.SignerHasNoClaim.is` +- **summary**: Ethereum address has no claim. + +### VestedBalanceExists +- **interface**: `api.errors.claims.VestedBalanceExists.is` +- **summary**: The account already has a vested balance. + +___ + + ## collatorSelection ### AlreadyCandidate @@ -374,6 +664,114 @@ ___ ___ +## convictionVoting + +### AlreadyDelegating +- **interface**: `api.errors.convictionVoting.AlreadyDelegating.is` +- **summary**: The account is already delegating. + +### AlreadyVoting +- **interface**: `api.errors.convictionVoting.AlreadyVoting.is` +- **summary**: The account currently has votes attached to it and the operation cannot succeed until these are removed through `remove_vote`. + +### BadClass +- **interface**: `api.errors.convictionVoting.BadClass.is` +- **summary**: The class ID supplied is invalid. + +### ClassNeeded +- **interface**: `api.errors.convictionVoting.ClassNeeded.is` +- **summary**: The class must be supplied since it is not easily determinable from the state. + +### InsufficientFunds +- **interface**: `api.errors.convictionVoting.InsufficientFunds.is` +- **summary**: Too high a balance was provided that the account cannot afford. + +### MaxVotesReached +- **interface**: `api.errors.convictionVoting.MaxVotesReached.is` +- **summary**: Maximum number of votes reached. + +### Nonsense +- **interface**: `api.errors.convictionVoting.Nonsense.is` +- **summary**: Delegation to oneself makes no sense. + +### NoPermission +- **interface**: `api.errors.convictionVoting.NoPermission.is` +- **summary**: The actor has no permission to conduct the action. + +### NoPermissionYet +- **interface**: `api.errors.convictionVoting.NoPermissionYet.is` +- **summary**: The actor has no permission to conduct the action right now but will do in the future. + +### NotDelegating +- **interface**: `api.errors.convictionVoting.NotDelegating.is` +- **summary**: The account is not currently delegating. + +### NotOngoing +- **interface**: `api.errors.convictionVoting.NotOngoing.is` +- **summary**: Poll is not ongoing. + +### NotVoter +- **interface**: `api.errors.convictionVoting.NotVoter.is` +- **summary**: The given account did not vote on the poll. + +___ + + +## delegatedStaking + +### AlreadyStaking +- **interface**: `api.errors.delegatedStaking.AlreadyStaking.is` +- **summary**: An existing staker cannot perform this action. + +### BadState +- **interface**: `api.errors.delegatedStaking.BadState.is` +- **summary**: Some corruption in internal state. + +### InvalidDelegation +- **interface**: `api.errors.delegatedStaking.InvalidDelegation.is` +- **summary**: Delegation conditions are not met. + + Possible issues are 1) Cannot delegate to self, 2) Cannot delegate to multiple delegates. + +### InvalidRewardDestination +- **interface**: `api.errors.delegatedStaking.InvalidRewardDestination.is` +- **summary**: Reward Destination cannot be same as `Agent` account. + +### NotAgent +- **interface**: `api.errors.delegatedStaking.NotAgent.is` +- **summary**: Not an existing `Agent` account. + +### NotAllowed +- **interface**: `api.errors.delegatedStaking.NotAllowed.is` +- **summary**: The account cannot perform this operation. + +### NotDelegator +- **interface**: `api.errors.delegatedStaking.NotDelegator.is` +- **summary**: Not a Delegator account. + +### NotEnoughFunds +- **interface**: `api.errors.delegatedStaking.NotEnoughFunds.is` +- **summary**: The account does not have enough funds to perform the operation. + +### NothingToSlash +- **interface**: `api.errors.delegatedStaking.NothingToSlash.is` +- **summary**: `Agent` has no pending slash to be applied. + +### NotSupported +- **interface**: `api.errors.delegatedStaking.NotSupported.is` +- **summary**: Operation not supported by this pallet. + +### UnappliedSlash +- **interface**: `api.errors.delegatedStaking.UnappliedSlash.is` +- **summary**: Unapplied pending slash restricts operation on `Agent`. + +### WithdrawFailed +- **interface**: `api.errors.delegatedStaking.WithdrawFailed.is` +- **summary**: Failed to withdraw amount from Core Staking. + +___ + + ## foreignAssets ### AlreadyExists @@ -471,6 +869,31 @@ ___ ___ +## indices + +### InUse +- **interface**: `api.errors.indices.InUse.is` +- **summary**: The index was not available. + +### NotAssigned +- **interface**: `api.errors.indices.NotAssigned.is` +- **summary**: The index was not already assigned. + +### NotOwner +- **interface**: `api.errors.indices.NotOwner.is` +- **summary**: The index is assigned to another account. + +### NotTransfer +- **interface**: `api.errors.indices.NotTransfer.is` +- **summary**: The source and destination accounts are identical. + +### Permanent +- **interface**: `api.errors.indices.Permanent.is` +- **summary**: The index is permanent and may not be freed/changed. + +___ + + ## messageQueue ### AlreadyProcessed @@ -516,6 +939,73 @@ ___ ___ +## multiBlockElection + +### Fallback +- **interface**: `api.errors.multiBlockElection.Fallback.is` +- **summary**: Triggering the `Fallback` failed. + +### Snapshot +- **interface**: `api.errors.multiBlockElection.Snapshot.is` +- **summary**: Snapshot was unavailable. + +### UnexpectedPhase +- **interface**: `api.errors.multiBlockElection.UnexpectedPhase.is` +- **summary**: Unexpected phase + +___ + + +## multiBlockElectionSigned + +### BadPageIndex +- **interface**: `api.errors.multiBlockElectionSigned.BadPageIndex.is` +- **summary**: The page index is out of bounds. + +### BadWitnessData +- **interface**: `api.errors.multiBlockElectionSigned.BadWitnessData.is` +- **summary**: Bad witness data provided. + +### Duplicate +- **interface**: `api.errors.multiBlockElectionSigned.Duplicate.is` +- **summary**: The submission is a duplicate. + +### NoSubmission +- **interface**: `api.errors.multiBlockElectionSigned.NoSubmission.is` +- **summary**: No submission found. + +### NotRegistered +- **interface**: `api.errors.multiBlockElectionSigned.NotRegistered.is` +- **summary**: The account is not registered. + +### PhaseNotSigned +- **interface**: `api.errors.multiBlockElectionSigned.PhaseNotSigned.is` +- **summary**: The phase is not signed. + +### QueueFull +- **interface**: `api.errors.multiBlockElectionSigned.QueueFull.is` +- **summary**: The queue is full. + +### RoundNotOver +- **interface**: `api.errors.multiBlockElectionSigned.RoundNotOver.is` +- **summary**: Round is not yet over. + +### TooManyInvulnerables +- **interface**: `api.errors.multiBlockElectionSigned.TooManyInvulnerables.is` +- **summary**: Too many invulnerable accounts are provided, + +___ + + +## multiBlockMigrations + +### Ongoing +- **interface**: `api.errors.multiBlockMigrations.Ongoing.is` +- **summary**: The operation cannot complete since some MBMs are ongoing. + +___ + + ## multisig ### AlreadyApproved @@ -783,6 +1273,165 @@ ___ ___ +## nominationPools + +### AccountBelongsToOtherPool +- **interface**: `api.errors.nominationPools.AccountBelongsToOtherPool.is` +- **summary**: An account is already delegating in another pool. An account may only belong to one pool at a time. + +### AlreadyMigrated +- **interface**: `api.errors.nominationPools.AlreadyMigrated.is` +- **summary**: The pool or member delegation has already migrated to delegate stake. + +### BondExtraRestricted +- **interface**: `api.errors.nominationPools.BondExtraRestricted.is` +- **summary**: Bonding extra is restricted to the exact pending reward amount. + +### CanNotChangeState +- **interface**: `api.errors.nominationPools.CanNotChangeState.is` +- **summary**: The pools state cannot be changed. + +### CannotWithdrawAny +- **interface**: `api.errors.nominationPools.CannotWithdrawAny.is` +- **summary**: None of the funds can be withdrawn yet because the bonding duration has not passed. + +### CommissionChangeRateNotAllowed +- **interface**: `api.errors.nominationPools.CommissionChangeRateNotAllowed.is` +- **summary**: The submitted changes to commission change rate are not allowed. + +### CommissionChangeThrottled +- **interface**: `api.errors.nominationPools.CommissionChangeThrottled.is` +- **summary**: Not enough blocks have surpassed since the last commission update. + +### CommissionExceedsGlobalMaximum +- **interface**: `api.errors.nominationPools.CommissionExceedsGlobalMaximum.is` +- **summary**: The supplied commission exceeds global maximum commission. + +### CommissionExceedsMaximum +- **interface**: `api.errors.nominationPools.CommissionExceedsMaximum.is` +- **summary**: The supplied commission exceeds the max allowed commission. + +### Defensive +- **interface**: `api.errors.nominationPools.Defensive.is` +- **summary**: Some error occurred that should never happen. This should be reported to the maintainers. + +### DoesNotHavePermission +- **interface**: `api.errors.nominationPools.DoesNotHavePermission.is` +- **summary**: The caller does not have adequate permissions. + +### FullyUnbonding +- **interface**: `api.errors.nominationPools.FullyUnbonding.is` +- **summary**: The member is fully unbonded (and thus cannot access the bonded and reward pool anymore to, for example, collect rewards). + +### InvalidPoolId +- **interface**: `api.errors.nominationPools.InvalidPoolId.is` +- **summary**: Pool id provided is not correct/usable. + +### MaxCommissionRestricted +- **interface**: `api.errors.nominationPools.MaxCommissionRestricted.is` +- **summary**: The pool's max commission cannot be set higher than the existing value. + +### MaxPoolMembers +- **interface**: `api.errors.nominationPools.MaxPoolMembers.is` +- **summary**: Too many members in the pool or system. + +### MaxPools +- **interface**: `api.errors.nominationPools.MaxPools.is` +- **summary**: The system is maxed out on pools. + +### MaxUnbondingLimit +- **interface**: `api.errors.nominationPools.MaxUnbondingLimit.is` +- **summary**: The member cannot unbond further chunks due to reaching the limit. + +### MetadataExceedsMaxLen +- **interface**: `api.errors.nominationPools.MetadataExceedsMaxLen.is` +- **summary**: Metadata exceeds [`Config::MaxMetadataLen`] + +### MinimumBondNotMet +- **interface**: `api.errors.nominationPools.MinimumBondNotMet.is` +- **summary**: The amount does not meet the minimum bond to either join or create a pool. + + The depositor can never unbond to a value less than `Pallet::depositor_min_bond`. The caller does not have nominating permissions for the pool. Members can never unbond to a value below `MinJoinBond`. + +### NoCommissionCurrentSet +- **interface**: `api.errors.nominationPools.NoCommissionCurrentSet.is` +- **summary**: No commission current has been set. + +### NoPendingCommission +- **interface**: `api.errors.nominationPools.NoPendingCommission.is` +- **summary**: There is no pending commission to claim. + +### NotDestroying +- **interface**: `api.errors.nominationPools.NotDestroying.is` +- **summary**: A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for other members to be permissionlessly unbonded. + +### NothingToAdjust +- **interface**: `api.errors.nominationPools.NothingToAdjust.is` +- **summary**: No imbalance in the ED deposit for the pool. + +### NothingToSlash +- **interface**: `api.errors.nominationPools.NothingToSlash.is` +- **summary**: No slash pending that can be applied to the member. + +### NotKickerOrDestroying +- **interface**: `api.errors.nominationPools.NotKickerOrDestroying.is` +- **summary**: Either a) the caller cannot make a valid kick or b) the pool is not destroying. + +### NotMigrated +- **interface**: `api.errors.nominationPools.NotMigrated.is` +- **summary**: The pool or member delegation has not migrated yet to delegate stake. + +### NotNominator +- **interface**: `api.errors.nominationPools.NotNominator.is` +- **summary**: The caller does not have nominating permissions for the pool. + +### NotOpen +- **interface**: `api.errors.nominationPools.NotOpen.is` +- **summary**: The pool is not open to join + +### NotSupported +- **interface**: `api.errors.nominationPools.NotSupported.is` +- **summary**: This call is not allowed in the current state of the pallet. + +### OverflowRisk +- **interface**: `api.errors.nominationPools.OverflowRisk.is` +- **summary**: The transaction could not be executed due to overflow risk for the pool. + +### PartialUnbondNotAllowedPermissionlessly +- **interface**: `api.errors.nominationPools.PartialUnbondNotAllowedPermissionlessly.is` +- **summary**: Partial unbonding now allowed permissionlessly. + +### PoolIdInUse +- **interface**: `api.errors.nominationPools.PoolIdInUse.is` +- **summary**: Pool id currently in use. + +### PoolMemberNotFound +- **interface**: `api.errors.nominationPools.PoolMemberNotFound.is` +- **summary**: An account is not a member. + +### PoolNotFound +- **interface**: `api.errors.nominationPools.PoolNotFound.is` +- **summary**: A (bonded) pool id does not exist. + +### Restricted +- **interface**: `api.errors.nominationPools.Restricted.is` +- **summary**: Account is restricted from participation in pools. This may happen if the account is staking in another way already. + +### RewardPoolNotFound +- **interface**: `api.errors.nominationPools.RewardPoolNotFound.is` +- **summary**: A reward pool does not exist. In all cases this is a system logic error. + +### SlashTooLow +- **interface**: `api.errors.nominationPools.SlashTooLow.is` +- **summary**: The slash amount is too low to be applied. + +### SubPoolsNotFound +- **interface**: `api.errors.nominationPools.SubPoolsNotFound.is` +- **summary**: A sub pool does not exist. + +___ + + ## parachainSystem ### HostConfigurationNotAvailable @@ -882,6 +1531,10 @@ ___ - **interface**: `api.errors.polkadotXcm.LocalExecutionIncomplete.is` - **summary**: Local XCM execution incomplete. +### LocalExecutionIncompleteWithError +- **interface**: `api.errors.polkadotXcm.LocalExecutionIncompleteWithError.is` +- **summary**: Local XCM execution incomplete with the actual XCM error and the index of the instruction that caused the error. + ### LockNotFound - **interface**: `api.errors.polkadotXcm.LockNotFound.is` - **summary**: A remote lock with the corresponding data could not be found. @@ -1022,6 +1675,43 @@ ___ ___ +## preimage + +### AlreadyNoted +- **interface**: `api.errors.preimage.AlreadyNoted.is` +- **summary**: Preimage has already been noted on-chain. + +### NotAuthorized +- **interface**: `api.errors.preimage.NotAuthorized.is` +- **summary**: The user is not authorized to perform this action. + +### NotNoted +- **interface**: `api.errors.preimage.NotNoted.is` +- **summary**: The preimage cannot be removed since it has not yet been noted. + +### NotRequested +- **interface**: `api.errors.preimage.NotRequested.is` +- **summary**: The preimage request cannot be removed since no outstanding requests exist. + +### Requested +- **interface**: `api.errors.preimage.Requested.is` +- **summary**: A preimage may not be removed when there are outstanding requests. + +### TooBig +- **interface**: `api.errors.preimage.TooBig.is` +- **summary**: Preimage is too large to store on-chain. + +### TooFew +- **interface**: `api.errors.preimage.TooFew.is` +- **summary**: Too few hashes were requested to be upgraded (i.e. zero). + +### TooMany +- **interface**: `api.errors.preimage.TooMany.is` +- **summary**: More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at once. + +___ + + ## proxy ### Duplicate @@ -1059,6 +1749,136 @@ ___ ___ +## recovery + +### AlreadyProxy +- **interface**: `api.errors.recovery.AlreadyProxy.is` +- **summary**: This account is already set up for recovery + +### AlreadyRecoverable +- **interface**: `api.errors.recovery.AlreadyRecoverable.is` +- **summary**: This account is already set up for recovery + +### AlreadyStarted +- **interface**: `api.errors.recovery.AlreadyStarted.is` +- **summary**: A recovery process has already started for this account + +### AlreadyVouched +- **interface**: `api.errors.recovery.AlreadyVouched.is` +- **summary**: This user has already vouched for this recovery + +### BadState +- **interface**: `api.errors.recovery.BadState.is` +- **summary**: Some internal state is broken. + +### DelayPeriod +- **interface**: `api.errors.recovery.DelayPeriod.is` +- **summary**: The friend must wait until the delay period to vouch for this recovery + +### MaxFriends +- **interface**: `api.errors.recovery.MaxFriends.is` +- **summary**: Friends list must be less than max friends + +### NotAllowed +- **interface**: `api.errors.recovery.NotAllowed.is` +- **summary**: User is not allowed to make a call on behalf of this account + +### NotEnoughFriends +- **interface**: `api.errors.recovery.NotEnoughFriends.is` +- **summary**: Friends list must be greater than zero and threshold + +### NotFriend +- **interface**: `api.errors.recovery.NotFriend.is` +- **summary**: This account is not a friend who can vouch + +### NotRecoverable +- **interface**: `api.errors.recovery.NotRecoverable.is` +- **summary**: This account is not set up for recovery + +### NotSorted +- **interface**: `api.errors.recovery.NotSorted.is` +- **summary**: Friends list must be sorted and free of duplicates + +### NotStarted +- **interface**: `api.errors.recovery.NotStarted.is` +- **summary**: A recovery process has not started for this rescuer + +### StillActive +- **interface**: `api.errors.recovery.StillActive.is` +- **summary**: There are still active recovery attempts that need to be closed + +### Threshold +- **interface**: `api.errors.recovery.Threshold.is` +- **summary**: The threshold for recovering this account has not been met + +### ZeroThreshold +- **interface**: `api.errors.recovery.ZeroThreshold.is` +- **summary**: Threshold must be greater than zero + +___ + + +## referenda + +### BadReferendum +- **interface**: `api.errors.referenda.BadReferendum.is` +- **summary**: The referendum index provided is invalid in this context. + +### BadStatus +- **interface**: `api.errors.referenda.BadStatus.is` +- **summary**: The referendum status is invalid for this operation. + +### BadTrack +- **interface**: `api.errors.referenda.BadTrack.is` +- **summary**: The track identifier given was invalid. + +### Full +- **interface**: `api.errors.referenda.Full.is` +- **summary**: There are already a full complement of referenda in progress for this track. + +### HasDeposit +- **interface**: `api.errors.referenda.HasDeposit.is` +- **summary**: Referendum's decision deposit is already paid. + +### NoDeposit +- **interface**: `api.errors.referenda.NoDeposit.is` +- **summary**: The deposit cannot be refunded since none was made. + +### NoPermission +- **interface**: `api.errors.referenda.NoPermission.is` +- **summary**: The deposit refunder is not the depositor. + +### NothingToDo +- **interface**: `api.errors.referenda.NothingToDo.is` +- **summary**: There was nothing to do in the advancement. + +### NotOngoing +- **interface**: `api.errors.referenda.NotOngoing.is` +- **summary**: Referendum is not ongoing. + +### NoTrack +- **interface**: `api.errors.referenda.NoTrack.is` +- **summary**: No track exists for the proposal origin. + +### PreimageNotExist +- **interface**: `api.errors.referenda.PreimageNotExist.is` +- **summary**: The preimage does not exist. + +### PreimageStoredWithDifferentLength +- **interface**: `api.errors.referenda.PreimageStoredWithDifferentLength.is` +- **summary**: The preimage is stored with a different length than the one provided. + +### QueueEmpty +- **interface**: `api.errors.referenda.QueueEmpty.is` +- **summary**: The queue of the track is empty. + +### Unfinished +- **interface**: `api.errors.referenda.Unfinished.is` +- **summary**: Any deposit cannot be refunded until after the decision is over. + +___ + + ## remoteProxyRelayChain ### CouldNotConvertLocalToRemoteAccountId @@ -1116,6 +1936,10 @@ ___ - **interface**: `api.errors.revive.BlobTooLarge.is` - **summary**: The code blob supplied is larger than [`limits::code::BLOB_BYTES`]. +### CallDataTooLarge +- **interface**: `api.errors.revive.CallDataTooLarge.is` +- **summary**: The calldata exceeds [`limits::CALLDATA_BYTES`]. + ### CannotAddSelfAsDelegateDependency - **interface**: `api.errors.revive.CannotAddSelfAsDelegateDependency.is` - **summary**: Can not add a delegate dependency to the code hash of the contract itself. @@ -1150,10 +1974,6 @@ ___ - **interface**: `api.errors.revive.ContractTrapped.is` - **summary**: Contract trapped during execution. -### DecimalPrecisionLoss -- **interface**: `api.errors.revive.DecimalPrecisionLoss.is` -- **summary**: Failed to convert an EVM balance to a native balance. - ### DecodingFailed - **interface**: `api.errors.revive.DecodingFailed.is` - **summary**: Input passed to a contract API function failed to decode as expected type. @@ -1214,10 +2034,6 @@ ___ - **interface**: `api.errors.revive.MaxDelegateDependenciesReached.is` - **summary**: The contract has reached its maximum number of delegate dependencies. -### NoChainExtension -- **interface**: `api.errors.revive.NoChainExtension.is` -- **summary**: The chain does not provide a chain extension. Calling the chain extension results in this error. Note that this usually shouldn't happen as deploying such contracts is rejected. - ### OutOfBounds - **interface**: `api.errors.revive.OutOfBounds.is` - **summary**: A buffer outside of sandbox memory was passed to a contract API function. @@ -1230,10 +2046,6 @@ ___ - **interface**: `api.errors.revive.OutOfTransientStorage.is` - **summary**: Can not add more data to transient storage. -### PrecompileFailure -- **interface**: `api.errors.revive.PrecompileFailure.is` -- **summary**: Precompile Error - ### ReenteredPallet - **interface**: `api.errors.revive.ReenteredPallet.is` - **summary**: A contract called into the runtime which then called back into this pallet. @@ -1246,13 +2058,17 @@ ___ - **interface**: `api.errors.revive.RefcountOverOrUnderflow.is` - **summary**: The refcount of a code either over or underflowed. +### ReturnDataTooLarge +- **interface**: `api.errors.revive.ReturnDataTooLarge.is` +- **summary**: The return data exceeds [`limits::CALLDATA_BYTES`]. + ### StateChangeDenied - **interface**: `api.errors.revive.StateChangeDenied.is` - **summary**: A contract attempted to invoke a state modifying API while being in read-only mode. ### StaticMemoryTooLarge - **interface**: `api.errors.revive.StaticMemoryTooLarge.is` -- **summary**: The static memory consumption of the blob will be larger than [`limits::code::STATIC_MEMORY_BYTES`]. +- **summary**: The contract declares too much memory (ro + rw + stack). ### StorageDepositLimitExhausted - **interface**: `api.errors.revive.StorageDepositLimitExhausted.is` @@ -1282,15 +2098,36 @@ ___ ### UnsupportedPrecompileAddress - **interface**: `api.errors.revive.UnsupportedPrecompileAddress.is` -- **summary**: Unsupported precompile address +- **summary**: Unsupported precompile address. ### ValueTooLarge - **interface**: `api.errors.revive.ValueTooLarge.is` -- **summary**: The size defined in `T::MaxValueSize` was exceeded. +- **summary**: Event body or storage item exceeds [`limits::PAYLOAD_BYTES`]. + +___ + + +## scheduler + +### FailedToSchedule +- **interface**: `api.errors.scheduler.FailedToSchedule.is` +- **summary**: Failed to schedule a call + +### Named +- **interface**: `api.errors.scheduler.Named.is` +- **summary**: Attempt to use a non-named function on a named task. + +### NotFound +- **interface**: `api.errors.scheduler.NotFound.is` +- **summary**: Cannot find the scheduled call. + +### RescheduleNoChange +- **interface**: `api.errors.scheduler.RescheduleNoChange.is` +- **summary**: Reschedule failed because it does not change scheduled time. -### XCMDecodeFailed -- **interface**: `api.errors.revive.XCMDecodeFailed.is` -- **summary**: Failed to decode the XCM program. +### TargetBlockNumberInPast +- **interface**: `api.errors.scheduler.TargetBlockNumberInPast.is` +- **summary**: Given target block number is in the past. ___ @@ -1320,6 +2157,292 @@ ___ ___ +## society + +### AlreadyBid +- **interface**: `api.errors.society.AlreadyBid.is` +- **summary**: User has already made a bid. + +### AlreadyCandidate +- **interface**: `api.errors.society.AlreadyCandidate.is` +- **summary**: User is already a candidate. + +### AlreadyElevated +- **interface**: `api.errors.society.AlreadyElevated.is` +- **summary**: The member is already elevated to this rank. + +### AlreadyFounded +- **interface**: `api.errors.society.AlreadyFounded.is` +- **summary**: Society already founded. + +### AlreadyMember +- **interface**: `api.errors.society.AlreadyMember.is` +- **summary**: User is already a member. + +### AlreadyPunished +- **interface**: `api.errors.society.AlreadyPunished.is` +- **summary**: The skeptic has already been punished for this offence. + +### AlreadyVouching +- **interface**: `api.errors.society.AlreadyVouching.is` +- **summary**: Member is already vouching or banned from vouching again. + +### Approved +- **interface**: `api.errors.society.Approved.is` +- **summary**: The candidacy cannot be dropped as the candidate was clearly approved. + +### Expired +- **interface**: `api.errors.society.Expired.is` +- **summary**: The skeptic need not vote on candidates from expired rounds. + +### Founder +- **interface**: `api.errors.society.Founder.is` +- **summary**: Cannot remove the founder. + +### Head +- **interface**: `api.errors.society.Head.is` +- **summary**: Cannot remove the head of the chain. + +### InProgress +- **interface**: `api.errors.society.InProgress.is` +- **summary**: The candidacy cannot be concluded as the voting is still in progress. + +### InsufficientFunds +- **interface**: `api.errors.society.InsufficientFunds.is` +- **summary**: Funds are insufficient to pay off society debts. + +### InsufficientPot +- **interface**: `api.errors.society.InsufficientPot.is` +- **summary**: Not enough in pot to accept candidate. + +### MaxMembers +- **interface**: `api.errors.society.MaxMembers.is` +- **summary**: Too many members in the society. + +### NoDefender +- **interface**: `api.errors.society.NoDefender.is` +- **summary**: There is no defender currently. + +### NoDeposit +- **interface**: `api.errors.society.NoDeposit.is` +- **summary**: There is no deposit associated with a bid. + +### NoPayout +- **interface**: `api.errors.society.NoPayout.is` +- **summary**: Nothing to payout. + +### NotApproved +- **interface**: `api.errors.society.NotApproved.is` +- **summary**: The membership cannot be claimed as the candidate was not clearly approved. + +### NotBidder +- **interface**: `api.errors.society.NotBidder.is` +- **summary**: User is not a bidder. + +### NotCandidate +- **interface**: `api.errors.society.NotCandidate.is` +- **summary**: User is not a candidate. + +### NotFounder +- **interface**: `api.errors.society.NotFounder.is` +- **summary**: The caller is not the founder. + +### NotGroup +- **interface**: `api.errors.society.NotGroup.is` +- **summary**: Group doesn't exist. + +### NotHead +- **interface**: `api.errors.society.NotHead.is` +- **summary**: The caller is not the head. + +### NotMember +- **interface**: `api.errors.society.NotMember.is` +- **summary**: User is not a member. + +### NotRejected +- **interface**: `api.errors.society.NotRejected.is` +- **summary**: The candidate cannot be kicked as the candidate was not clearly rejected. + +### NotSuspended +- **interface**: `api.errors.society.NotSuspended.is` +- **summary**: User is not suspended. + +### NotVouchingOnBidder +- **interface**: `api.errors.society.NotVouchingOnBidder.is` +- **summary**: Member is not vouching. + +### NoVotes +- **interface**: `api.errors.society.NoVotes.is` +- **summary**: The candidate/defender has no stale votes to remove. + +### Rejected +- **interface**: `api.errors.society.Rejected.is` +- **summary**: The candidacy cannot be bestowed as the candidate was clearly rejected. + +### Suspended +- **interface**: `api.errors.society.Suspended.is` +- **summary**: User is suspended. + +### TooEarly +- **interface**: `api.errors.society.TooEarly.is` +- **summary**: The candidacy cannot be pruned until a full additional intake period has passed. + +### Voted +- **interface**: `api.errors.society.Voted.is` +- **summary**: The skeptic already voted. + +___ + + +## staking + +### AlreadyBonded +- **interface**: `api.errors.staking.AlreadyBonded.is` +- **summary**: Stash is already bonded. + +### AlreadyClaimed +- **interface**: `api.errors.staking.AlreadyClaimed.is` +- **summary**: Rewards for this era have already been claimed for this validator. + +### AlreadyMigrated +- **interface**: `api.errors.staking.AlreadyMigrated.is` +- **summary**: The stake of this account is already migrated to `Fungible` holds. + +### AlreadyPaired +- **interface**: `api.errors.staking.AlreadyPaired.is` +- **summary**: Controller is already paired. + +### BadState +- **interface**: `api.errors.staking.BadState.is` +- **summary**: Internal state has become somehow corrupted and the operation cannot continue. + +### BadTarget +- **interface**: `api.errors.staking.BadTarget.is` +- **summary**: A nomination target was supplied that was blocked or otherwise not a validator. + +### BoundNotMet +- **interface**: `api.errors.staking.BoundNotMet.is` +- **summary**: Some bound is not met. + +### CancelledSlash +- **interface**: `api.errors.staking.CancelledSlash.is` +- **summary**: The slash has been cancelled and cannot be applied. + +### CannotChillOther +- **interface**: `api.errors.staking.CannotChillOther.is` +- **summary**: The user has enough bond and thus cannot be chilled forcefully by an external person. + +### CannotReapStash +- **interface**: `api.errors.staking.CannotReapStash.is` +- **summary**: Stash could not be reaped as other pallet might depend on it. + +### CannotRestoreLedger +- **interface**: `api.errors.staking.CannotRestoreLedger.is` +- **summary**: Cannot reset a ledger. + +### CommissionTooLow +- **interface**: `api.errors.staking.CommissionTooLow.is` +- **summary**: Commission is too low. Must be at least `MinCommission`. + +### ControllerDeprecated +- **interface**: `api.errors.staking.ControllerDeprecated.is` +- **summary**: Used when attempting to use deprecated controller account logic. + +### DuplicateIndex +- **interface**: `api.errors.staking.DuplicateIndex.is` +- **summary**: Duplicate index. + +### EmptyTargets +- **interface**: `api.errors.staking.EmptyTargets.is` +- **summary**: Targets cannot be empty. + +### EraNotPrunable +- **interface**: `api.errors.staking.EraNotPrunable.is` +- **summary**: The era is not eligible for pruning. + +### EraNotStarted +- **interface**: `api.errors.staking.EraNotStarted.is` +- **summary**: Era not yet started. + +### FundedTarget +- **interface**: `api.errors.staking.FundedTarget.is` +- **summary**: Attempting to target a stash that still has funds. + +### IncorrectHistoryDepth +- **interface**: `api.errors.staking.IncorrectHistoryDepth.is` +- **summary**: Incorrect previous history depth input provided. + +### InsufficientBond +- **interface**: `api.errors.staking.InsufficientBond.is` +- **summary**: Cannot bond, nominate or validate with value less than the minimum defined by governance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the intention, `chill` first to remove one's role as validator/nominator. + +### InvalidEraToReward +- **interface**: `api.errors.staking.InvalidEraToReward.is` +- **summary**: Invalid era to reward. + +### InvalidNumberOfNominations +- **interface**: `api.errors.staking.InvalidNumberOfNominations.is` +- **summary**: Invalid number of nominations. + +### InvalidPage +- **interface**: `api.errors.staking.InvalidPage.is` +- **summary**: No nominators exist on this page. + +### InvalidSlashRecord +- **interface**: `api.errors.staking.InvalidSlashRecord.is` +- **summary**: Slash record not found. + +### NoMoreChunks +- **interface**: `api.errors.staking.NoMoreChunks.is` +- **summary**: Can not schedule more unlock chunks. + +### NotController +- **interface**: `api.errors.staking.NotController.is` +- **summary**: Not a controller account. + +### NotEnoughFunds +- **interface**: `api.errors.staking.NotEnoughFunds.is` +- **summary**: Not enough funds available to withdraw. + +### NotStash +- **interface**: `api.errors.staking.NotStash.is` +- **summary**: Not a stash account. + +### NoUnlockChunk +- **interface**: `api.errors.staking.NoUnlockChunk.is` +- **summary**: Can not rebond without unlocking chunks. + +### Restricted +- **interface**: `api.errors.staking.Restricted.is` +- **summary**: Account is restricted from participation in staking. This may happen if the account is staking in another way already, such as via pool. + +### RewardDestinationRestricted +- **interface**: `api.errors.staking.RewardDestinationRestricted.is` +- **summary**: Provided reward destination is not allowed. + +### TooManyNominators +- **interface**: `api.errors.staking.TooManyNominators.is` +- **summary**: There are too many nominators in the system. Governance needs to adjust the staking settings to keep things safe for the runtime. + +### TooManyTargets +- **interface**: `api.errors.staking.TooManyTargets.is` +- **summary**: Too many nomination targets supplied. + +### TooManyValidators +- **interface**: `api.errors.staking.TooManyValidators.is` +- **summary**: There are too many validator candidates in the system. Governance needs to adjust the staking settings to keep things safe for the runtime. + +### UnappliedSlashesInPreviousEra +- **interface**: `api.errors.staking.UnappliedSlashesInPreviousEra.is` +- **summary**: Unapplied slashes in the recently concluded era is blocking this operation. See `Call::apply_slash` to apply them. + +### VirtualStakerNotAllowed +- **interface**: `api.errors.staking.VirtualStakerNotAllowed.is` +- **summary**: Operation not allowed for virtual stakers. + +___ + + ## stateTrieMigration ### BadChildRoot @@ -1357,6 +2480,10 @@ ___ - **interface**: `api.errors.system.CallFiltered.is` - **summary**: The origin filter prevent the call to be dispatched. +### FailedTask +- **interface**: `api.errors.system.FailedTask.is` +- **summary**: The specified [`Task`] failed during execution. + ### FailedToExtractRuntimeVersion - **interface**: `api.errors.system.FailedToExtractRuntimeVersion.is` - **summary**: Failed to extract the runtime version from the new runtime. @@ -1367,6 +2494,10 @@ ___ - **interface**: `api.errors.system.InvalidSpecName.is` - **summary**: The name of specification does not match between the current runtime and the new runtime. +### InvalidTask +- **interface**: `api.errors.system.InvalidTask.is` +- **summary**: The specified [`Task`] is not valid. + ### MultiBlockMigrationsOngoing - **interface**: `api.errors.system.MultiBlockMigrationsOngoing.is` - **summary**: A multi-block migration is ongoing and prevents the current code from being replaced. @@ -1394,12 +2525,65 @@ ___ ___ +## treasury + +### AlreadyAttempted +- **interface**: `api.errors.treasury.AlreadyAttempted.is` +- **summary**: The payment has already been attempted. + +### EarlyPayout +- **interface**: `api.errors.treasury.EarlyPayout.is` +- **summary**: The spend is not yet eligible for payout. + +### FailedToConvertBalance +- **interface**: `api.errors.treasury.FailedToConvertBalance.is` +- **summary**: The balance of the asset kind is not convertible to the balance of the native asset. + +### Inconclusive +- **interface**: `api.errors.treasury.Inconclusive.is` +- **summary**: The payment has neither failed nor succeeded yet. + +### InsufficientPermission +- **interface**: `api.errors.treasury.InsufficientPermission.is` +- **summary**: The spend origin is valid but the amount it is allowed to spend is lower than the amount to be spent. + +### InvalidIndex +- **interface**: `api.errors.treasury.InvalidIndex.is` +- **summary**: No proposal, bounty or spend at that index. + +### NotAttempted +- **interface**: `api.errors.treasury.NotAttempted.is` +- **summary**: The payout was not yet attempted/claimed. + +### PayoutError +- **interface**: `api.errors.treasury.PayoutError.is` +- **summary**: There was some issue with the mechanism of payment. + +### ProposalNotApproved +- **interface**: `api.errors.treasury.ProposalNotApproved.is` +- **summary**: Proposal has not been approved. + +### SpendExpired +- **interface**: `api.errors.treasury.SpendExpired.is` +- **summary**: The spend has expired and cannot be claimed. + +### TooManyApprovals +- **interface**: `api.errors.treasury.TooManyApprovals.is` +- **summary**: Too many approvals in the queue. + +___ + + ## uniques ### AlreadyExists - **interface**: `api.errors.uniques.AlreadyExists.is` - **summary**: The item ID has already been used for an item. +### AttributeNotFound +- **interface**: `api.errors.uniques.AttributeNotFound.is` +- **summary**: An attribute is not found. + ### BadWitness - **interface**: `api.errors.uniques.BadWitness.is` - **summary**: Invalid witness data given. @@ -1436,6 +2620,10 @@ ___ - **interface**: `api.errors.uniques.NoDelegate.is` - **summary**: There is no delegate approved. +### NoMetadata +- **interface**: `api.errors.uniques.NoMetadata.is` +- **summary**: No metadata is found. + ### NoPermission - **interface**: `api.errors.uniques.NoPermission.is` - **summary**: The signing account has no permission to do the operation. @@ -1460,10 +2648,18 @@ ___ - **interface**: `api.errors.uniques.UnknownItem.is` - **summary**: The given item ID is unknown. +### WrongAttribute +- **interface**: `api.errors.uniques.WrongAttribute.is` +- **summary**: Wrong attribute key/value bytes supplied. + ### WrongDelegate - **interface**: `api.errors.uniques.WrongDelegate.is` - **summary**: The delegate turned out to be different to what was expected. +### WrongMetadata +- **interface**: `api.errors.uniques.WrongMetadata.is` +- **summary**: Wrong metadata key/value bytes supplied. + ### WrongOwner - **interface**: `api.errors.uniques.WrongOwner.is` - **summary**: The owner turned out to be different to what was expected. @@ -1505,6 +2701,44 @@ ___ ___ +## voterList + +### List +- **interface**: `api.errors.voterList.List.is` +- **summary**: A error in the list interface implementation. + +### Locked +- **interface**: `api.errors.voterList.Locked.is` +- **summary**: Could not update a node, because the pallet is locked. + +___ + + +## whitelist + +### CallAlreadyWhitelisted +- **interface**: `api.errors.whitelist.CallAlreadyWhitelisted.is` +- **summary**: The call was already whitelisted; No-Op. + +### CallIsNotWhitelisted +- **interface**: `api.errors.whitelist.CallIsNotWhitelisted.is` +- **summary**: The call was not whitelisted. + +### InvalidCallWeightWitness +- **interface**: `api.errors.whitelist.InvalidCallWeightWitness.is` +- **summary**: The weight of the decoded call was higher than the witness. + +### UnavailablePreImage +- **interface**: `api.errors.whitelist.UnavailablePreImage.is` +- **summary**: The preimage of the call hash could not be loaded. + +### UndecodableCall +- **interface**: `api.errors.whitelist.UndecodableCall.is` +- **summary**: The call could not be decoded. + +___ + + ## xcmpQueue ### AlreadyResumed diff --git a/docs/asset-hub-kusama/events.md b/docs/asset-hub-kusama/events.md index 977a092f1..31e83c481 100644 --- a/docs/asset-hub-kusama/events.md +++ b/docs/asset-hub-kusama/events.md @@ -6,40 +6,84 @@ Events are emitted for certain operations on the runtime. The following sections (NOTE: These were generated from a static/snapshot view of a recent default asset-hub-kusama runtime. Some items may not be available in older nodes, or in any customized implementations.) +- **[ahMigrator](#ahmigrator)** + +- **[ahOps](#ahops)** + - **[assetConversion](#assetconversion)** +- **[assetRate](#assetrate)** + - **[assets](#assets)** - **[assetTxPayment](#assettxpayment)** - **[balances](#balances)** +- **[bounties](#bounties)** + +- **[childBounties](#childbounties)** + +- **[claims](#claims)** + - **[collatorSelection](#collatorselection)** +- **[convictionVoting](#convictionvoting)** + - **[cumulusXcm](#cumulusxcm)** +- **[delegatedStaking](#delegatedstaking)** + - **[foreignAssets](#foreignassets)** +- **[indices](#indices)** + - **[messageQueue](#messagequeue)** +- **[multiBlockElection](#multiblockelection)** + +- **[multiBlockElectionSigned](#multiblockelectionsigned)** + +- **[multiBlockElectionVerifier](#multiblockelectionverifier)** + +- **[multiBlockMigrations](#multiblockmigrations)** + - **[multisig](#multisig)** - **[nftFractionalization](#nftfractionalization)** - **[nfts](#nfts)** +- **[nominationPools](#nominationpools)** + - **[parachainSystem](#parachainsystem)** +- **[parameters](#parameters)** + - **[polkadotXcm](#polkadotxcm)** - **[poolAssets](#poolassets)** +- **[preimage](#preimage)** + - **[proxy](#proxy)** +- **[recovery](#recovery)** + +- **[referenda](#referenda)** + - **[revive](#revive)** +- **[scheduler](#scheduler)** + - **[session](#session)** +- **[society](#society)** + +- **[staking](#staking)** + +- **[stakingRcClient](#stakingrcclient)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** @@ -48,47 +92,147 @@ Events are emitted for certain operations on the runtime. The following sections - **[transactionPayment](#transactionpayment)** +- **[treasury](#treasury)** + - **[uniques](#uniques)** - **[utility](#utility)** - **[vesting](#vesting)** +- **[voterList](#voterlist)** + +- **[whitelist](#whitelist)** + - **[xcmpQueue](#xcmpqueue)** ___ +## ahMigrator + +### AccountTranslatedParachainSovereign(`AccountId32`, `AccountId32`) +- **interface**: `api.events.ahMigrator.AccountTranslatedParachainSovereign.is` + +### AccountTranslatedParachainSovereignDerived(`AccountId32`, `AccountId32`, `u16`) +- **interface**: `api.events.ahMigrator.AccountTranslatedParachainSovereignDerived.is` + +### AssetHubMigrationFinished() +- **interface**: `api.events.ahMigrator.AssetHubMigrationFinished.is` +- **summary**: The Asset Hub Migration finished. + + This event is equivalent to `StageTransition { new: MigrationDone, .. }` but is easier to understand. The finishing is immediate and affects all events happening afterwards. + +### AssetHubMigrationStarted() +- **interface**: `api.events.ahMigrator.AssetHubMigrationStarted.is` +- **summary**: The Asset Hub Migration started and is active until `AssetHubMigrationFinished` is emitted. + + This event is equivalent to `StageTransition { new: DataMigrationOngoing, .. }` but is easier to understand. The activation is immediate and affects all events happening afterwards. + +### BalancesBeforeRecordConsumed(`u128`, `u128`) +- **interface**: `api.events.ahMigrator.BalancesBeforeRecordConsumed.is` +- **summary**: The balances before the migration were consumed. + +### BalancesBeforeRecordSet(`u128`, `u128`) +- **interface**: `api.events.ahMigrator.BalancesBeforeRecordSet.is` +- **summary**: The balances before the migration were recorded. + +### BatchProcessed(`PalletAhMigratorPalletEventName`, `u32`, `u32`) +- **interface**: `api.events.ahMigrator.BatchProcessed.is` +- **summary**: We processed a batch of messages for this pallet. + +### BatchReceived(`PalletAhMigratorPalletEventName`, `u32`) +- **interface**: `api.events.ahMigrator.BatchReceived.is` +- **summary**: We received a batch of messages that will be integrated into a pallet. + +### DmpQueuePriorityConfigSet(`PalletRcMigratorQueuePriority`, `PalletRcMigratorQueuePriority`) +- **interface**: `api.events.ahMigrator.DmpQueuePriorityConfigSet.is` +- **summary**: The DMP queue priority config was set. + +### DmpQueuePrioritySet(`bool`, `u32`, `u32`) +- **interface**: `api.events.ahMigrator.DmpQueuePrioritySet.is` +- **summary**: Whether the DMP queue was prioritized for the next block. + +### ManagerSet(`Option`, `Option`) +- **interface**: `api.events.ahMigrator.ManagerSet.is` +- **summary**: The manager account id was set. + +### ReferendumCanceled(`u32`) +- **interface**: `api.events.ahMigrator.ReferendumCanceled.is` +- **summary**: A referendum was cancelled because it could not be mapped. + +### StageTransition(`PalletAhMigratorMigrationStage`, `PalletAhMigratorMigrationStage`) +- **interface**: `api.events.ahMigrator.StageTransition.is` +- **summary**: A stage transition has occurred. + +### XcmSent(`StagingXcmV5Location`, `StagingXcmV5Location`, `StagingXcmV5Xcm`, `[u8;32]`) +- **interface**: `api.events.ahMigrator.XcmSent.is` +- **summary**: An XCM message was sent. + +___ + + +## ahOps + +### CrowdloanUnreserveRemaining(`AccountId32`, `u32`, `u128`) +- **interface**: `api.events.ahOps.CrowdloanUnreserveRemaining.is` +- **summary**: Some amount for a crowdloan reserve could not be unreserved and needs manual cleanup. + +### LeaseUnreserveRemaining(`AccountId32`, `u32`, `u128`) +- **interface**: `api.events.ahOps.LeaseUnreserveRemaining.is` +- **summary**: Some lease reserve could not be unreserved and needs manual cleanup. + +### SovereignMigrated(`u32`, `AccountId32`, `AccountId32`, `Option`) +- **interface**: `api.events.ahOps.SovereignMigrated.is` +- **summary**: A sovereign parachain account has been migrated from its child to sibling representation. + +___ + + ## assetConversion -### LiquidityAdded(`AccountId32`, `AccountId32`, `(StagingXcmV4Location,StagingXcmV4Location)`, `u128`, `u128`, `u32`, `u128`) +### LiquidityAdded(`AccountId32`, `AccountId32`, `(StagingXcmV5Location,StagingXcmV5Location)`, `u128`, `u128`, `u32`, `u128`) - **interface**: `api.events.assetConversion.LiquidityAdded.is` - **summary**: A successful call of the `AddLiquidity` extrinsic will create this event. -### LiquidityRemoved(`AccountId32`, `AccountId32`, `(StagingXcmV4Location,StagingXcmV4Location)`, `u128`, `u128`, `u32`, `u128`, `Permill`) +### LiquidityRemoved(`AccountId32`, `AccountId32`, `(StagingXcmV5Location,StagingXcmV5Location)`, `u128`, `u128`, `u32`, `u128`, `Permill`) - **interface**: `api.events.assetConversion.LiquidityRemoved.is` - **summary**: A successful call of the `RemoveLiquidity` extrinsic will create this event. -### PoolCreated(`AccountId32`, `(StagingXcmV4Location,StagingXcmV4Location)`, `AccountId32`, `u32`) +### PoolCreated(`AccountId32`, `(StagingXcmV5Location,StagingXcmV5Location)`, `AccountId32`, `u32`) - **interface**: `api.events.assetConversion.PoolCreated.is` - **summary**: A successful call of the `CreatePool` extrinsic will create this event. -### SwapCreditExecuted(`u128`, `u128`, `Vec<(StagingXcmV4Location,u128)>`) +### SwapCreditExecuted(`u128`, `u128`, `Vec<(StagingXcmV5Location,u128)>`) - **interface**: `api.events.assetConversion.SwapCreditExecuted.is` - **summary**: Assets have been converted from one to another. -### SwapExecuted(`AccountId32`, `AccountId32`, `u128`, `u128`, `Vec<(StagingXcmV4Location,u128)>`) +### SwapExecuted(`AccountId32`, `AccountId32`, `u128`, `u128`, `Vec<(StagingXcmV5Location,u128)>`) - **interface**: `api.events.assetConversion.SwapExecuted.is` - **summary**: Assets have been converted from one to another. Both `SwapExactTokenForToken` and `SwapTokenForExactToken` will generate this event. -### Touched(`(StagingXcmV4Location,StagingXcmV4Location)`, `AccountId32`) +### Touched(`(StagingXcmV5Location,StagingXcmV5Location)`, `AccountId32`) - **interface**: `api.events.assetConversion.Touched.is` - **summary**: Pool has been touched in order to fulfill operational requirements. ___ +## assetRate + +### AssetRateCreated(`PolkadotRuntimeCommonImplsVersionedLocatableAsset`, `u128`) +- **interface**: `api.events.assetRate.AssetRateCreated.is` + +### AssetRateRemoved(`PolkadotRuntimeCommonImplsVersionedLocatableAsset`) +- **interface**: `api.events.assetRate.AssetRateRemoved.is` + +### AssetRateUpdated(`PolkadotRuntimeCommonImplsVersionedLocatableAsset`, `u128`, `u128`) +- **interface**: `api.events.assetRate.AssetRateUpdated.is` + +___ + + ## assets ### AccountsDestroyed(`u32`, `u32`, `u32`) @@ -204,7 +348,7 @@ ___ - **interface**: `api.events.assetTxPayment.AssetRefundFailed.is` - **summary**: A swap of the refund in native currency back to asset failed. -### AssetTxFeePaid(`AccountId32`, `u128`, `u128`, `StagingXcmV4Location`) +### AssetTxFeePaid(`AccountId32`, `u128`, `u128`, `StagingXcmV5Location`) - **interface**: `api.events.assetTxPayment.AssetTxFeePaid.is` - **summary**: A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee, has been paid by `who` in an asset `asset_id`. @@ -285,6 +429,10 @@ ___ - **interface**: `api.events.balances.Transfer.is` - **summary**: Transfer succeeded. +### Unexpected(`PalletBalancesUnexpectedKind`) +- **interface**: `api.events.balances.Unexpected.is` +- **summary**: An unexpected/defensive event was triggered. + ### Unlocked(`AccountId32`, `u128`) - **interface**: `api.events.balances.Unlocked.is` - **summary**: Some balance was unlocked. @@ -304,6 +452,89 @@ ___ ___ +## bounties + +### BountyApproved(`u32`) +- **interface**: `api.events.bounties.BountyApproved.is` +- **summary**: A bounty is approved. + +### BountyAwarded(`u32`, `AccountId32`) +- **interface**: `api.events.bounties.BountyAwarded.is` +- **summary**: A bounty is awarded to a beneficiary. + +### BountyBecameActive(`u32`) +- **interface**: `api.events.bounties.BountyBecameActive.is` +- **summary**: A bounty proposal is funded and became active. + +### BountyCanceled(`u32`) +- **interface**: `api.events.bounties.BountyCanceled.is` +- **summary**: A bounty is cancelled. + +### BountyClaimed(`u32`, `u128`, `AccountId32`) +- **interface**: `api.events.bounties.BountyClaimed.is` +- **summary**: A bounty is claimed by beneficiary. + +### BountyExtended(`u32`) +- **interface**: `api.events.bounties.BountyExtended.is` +- **summary**: A bounty expiry is extended. + +### BountyProposed(`u32`) +- **interface**: `api.events.bounties.BountyProposed.is` +- **summary**: New bounty proposal. + +### BountyRejected(`u32`, `u128`) +- **interface**: `api.events.bounties.BountyRejected.is` +- **summary**: A bounty proposal was rejected; funds were slashed. + +### CuratorAccepted(`u32`, `AccountId32`) +- **interface**: `api.events.bounties.CuratorAccepted.is` +- **summary**: A bounty curator is accepted. + +### CuratorProposed(`u32`, `AccountId32`) +- **interface**: `api.events.bounties.CuratorProposed.is` +- **summary**: A bounty curator is proposed. + +### CuratorUnassigned(`u32`) +- **interface**: `api.events.bounties.CuratorUnassigned.is` +- **summary**: A bounty curator is unassigned. + +### DepositPoked(`u32`, `AccountId32`, `u128`, `u128`) +- **interface**: `api.events.bounties.DepositPoked.is` +- **summary**: A bounty deposit has been poked. + +___ + + +## childBounties + +### Added(`u32`, `u32`) +- **interface**: `api.events.childBounties.Added.is` +- **summary**: A child-bounty is added. + +### Awarded(`u32`, `u32`, `AccountId32`) +- **interface**: `api.events.childBounties.Awarded.is` +- **summary**: A child-bounty is awarded to a beneficiary. + +### Canceled(`u32`, `u32`) +- **interface**: `api.events.childBounties.Canceled.is` +- **summary**: A child-bounty is cancelled. + +### Claimed(`u32`, `u32`, `u128`, `AccountId32`) +- **interface**: `api.events.childBounties.Claimed.is` +- **summary**: A child-bounty is claimed by beneficiary. + +___ + + +## claims + +### Claimed(`AccountId32`, `EthereumAddress`, `u128`) +- **interface**: `api.events.claims.Claimed.is` +- **summary**: Someone claimed some DOTs. + +___ + + ## collatorSelection ### CandidateAdded(`AccountId32`, `u128`) @@ -349,6 +580,31 @@ ___ ___ +## convictionVoting + +### Delegated(`AccountId32`, `AccountId32`) +- **interface**: `api.events.convictionVoting.Delegated.is` +- **summary**: An account has delegated their vote to another account. \[who, target\] + +### Undelegated(`AccountId32`) +- **interface**: `api.events.convictionVoting.Undelegated.is` +- **summary**: An \[account\] has cancelled a previous delegation operation. + +### Voted(`AccountId32`, `PalletConvictionVotingVoteAccountVote`) +- **interface**: `api.events.convictionVoting.Voted.is` +- **summary**: An account has voted + +### VoteRemoved(`AccountId32`, `PalletConvictionVotingVoteAccountVote`) +- **interface**: `api.events.convictionVoting.VoteRemoved.is` +- **summary**: A vote has been removed + +### VoteUnlocked(`AccountId32`, `u16`) +- **interface**: `api.events.convictionVoting.VoteUnlocked.is` +- **summary**: The lockup period of a conviction vote expired, and the funds have been unlocked. + +___ + + ## cumulusXcm ### ExecutedDownward(`[u8;32]`, `StagingXcmV5TraitsOutcome`) @@ -366,115 +622,157 @@ ___ ___ +## delegatedStaking + +### Delegated(`AccountId32`, `AccountId32`, `u128`) +- **interface**: `api.events.delegatedStaking.Delegated.is` +- **summary**: Funds delegated by a delegator. + +### MigratedDelegation(`AccountId32`, `AccountId32`, `u128`) +- **interface**: `api.events.delegatedStaking.MigratedDelegation.is` +- **summary**: Unclaimed delegation funds migrated to delegator. + +### Released(`AccountId32`, `AccountId32`, `u128`) +- **interface**: `api.events.delegatedStaking.Released.is` +- **summary**: Funds released to a delegator. + +### Slashed(`AccountId32`, `AccountId32`, `u128`) +- **interface**: `api.events.delegatedStaking.Slashed.is` +- **summary**: Funds slashed from a delegator. + +___ + + ## foreignAssets -### AccountsDestroyed(`StagingXcmV4Location`, `u32`, `u32`) +### AccountsDestroyed(`StagingXcmV5Location`, `u32`, `u32`) - **interface**: `api.events.foreignAssets.AccountsDestroyed.is` - **summary**: Accounts were destroyed for given asset. -### ApprovalCancelled(`StagingXcmV4Location`, `AccountId32`, `AccountId32`) +### ApprovalCancelled(`StagingXcmV5Location`, `AccountId32`, `AccountId32`) - **interface**: `api.events.foreignAssets.ApprovalCancelled.is` - **summary**: An approval for account `delegate` was cancelled by `owner`. -### ApprovalsDestroyed(`StagingXcmV4Location`, `u32`, `u32`) +### ApprovalsDestroyed(`StagingXcmV5Location`, `u32`, `u32`) - **interface**: `api.events.foreignAssets.ApprovalsDestroyed.is` - **summary**: Approvals were destroyed for given asset. -### ApprovedTransfer(`StagingXcmV4Location`, `AccountId32`, `AccountId32`, `u128`) +### ApprovedTransfer(`StagingXcmV5Location`, `AccountId32`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.ApprovedTransfer.is` - **summary**: (Additional) funds have been approved for transfer to a destination account. -### AssetFrozen(`StagingXcmV4Location`) +### AssetFrozen(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.AssetFrozen.is` - **summary**: Some asset `asset_id` was frozen. -### AssetMinBalanceChanged(`StagingXcmV4Location`, `u128`) +### AssetMinBalanceChanged(`StagingXcmV5Location`, `u128`) - **interface**: `api.events.foreignAssets.AssetMinBalanceChanged.is` - **summary**: The min_balance of an asset has been updated by the asset owner. -### AssetStatusChanged(`StagingXcmV4Location`) +### AssetStatusChanged(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.AssetStatusChanged.is` - **summary**: An asset has had its attributes changed by the `Force` origin. -### AssetThawed(`StagingXcmV4Location`) +### AssetThawed(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.AssetThawed.is` - **summary**: Some asset `asset_id` was thawed. -### Blocked(`StagingXcmV4Location`, `AccountId32`) +### Blocked(`StagingXcmV5Location`, `AccountId32`) - **interface**: `api.events.foreignAssets.Blocked.is` - **summary**: Some account `who` was blocked. -### Burned(`StagingXcmV4Location`, `AccountId32`, `u128`) +### Burned(`StagingXcmV5Location`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.Burned.is` - **summary**: Some assets were destroyed. -### Created(`StagingXcmV4Location`, `AccountId32`, `AccountId32`) +### Created(`StagingXcmV5Location`, `AccountId32`, `AccountId32`) - **interface**: `api.events.foreignAssets.Created.is` - **summary**: Some asset class was created. -### Deposited(`StagingXcmV4Location`, `AccountId32`, `u128`) +### Deposited(`StagingXcmV5Location`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.Deposited.is` - **summary**: Some assets were deposited (e.g. for transaction fees). -### Destroyed(`StagingXcmV4Location`) +### Destroyed(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.Destroyed.is` - **summary**: An asset class was destroyed. -### DestructionStarted(`StagingXcmV4Location`) +### DestructionStarted(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.DestructionStarted.is` - **summary**: An asset class is in the process of being destroyed. -### ForceCreated(`StagingXcmV4Location`, `AccountId32`) +### ForceCreated(`StagingXcmV5Location`, `AccountId32`) - **interface**: `api.events.foreignAssets.ForceCreated.is` - **summary**: Some asset class was force-created. -### Frozen(`StagingXcmV4Location`, `AccountId32`) +### Frozen(`StagingXcmV5Location`, `AccountId32`) - **interface**: `api.events.foreignAssets.Frozen.is` - **summary**: Some account `who` was frozen. -### Issued(`StagingXcmV4Location`, `AccountId32`, `u128`) +### Issued(`StagingXcmV5Location`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.Issued.is` - **summary**: Some assets were issued. -### MetadataCleared(`StagingXcmV4Location`) +### MetadataCleared(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.MetadataCleared.is` - **summary**: Metadata has been cleared for an asset. -### MetadataSet(`StagingXcmV4Location`, `Bytes`, `Bytes`, `u8`, `bool`) +### MetadataSet(`StagingXcmV5Location`, `Bytes`, `Bytes`, `u8`, `bool`) - **interface**: `api.events.foreignAssets.MetadataSet.is` - **summary**: New metadata has been set for an asset. -### OwnerChanged(`StagingXcmV4Location`, `AccountId32`) +### OwnerChanged(`StagingXcmV5Location`, `AccountId32`) - **interface**: `api.events.foreignAssets.OwnerChanged.is` - **summary**: The owner changed. -### TeamChanged(`StagingXcmV4Location`, `AccountId32`, `AccountId32`, `AccountId32`) +### TeamChanged(`StagingXcmV5Location`, `AccountId32`, `AccountId32`, `AccountId32`) - **interface**: `api.events.foreignAssets.TeamChanged.is` - **summary**: The management team changed. -### Thawed(`StagingXcmV4Location`, `AccountId32`) +### Thawed(`StagingXcmV5Location`, `AccountId32`) - **interface**: `api.events.foreignAssets.Thawed.is` - **summary**: Some account `who` was thawed. -### Touched(`StagingXcmV4Location`, `AccountId32`, `AccountId32`) +### Touched(`StagingXcmV5Location`, `AccountId32`, `AccountId32`) - **interface**: `api.events.foreignAssets.Touched.is` - **summary**: Some account `who` was created with a deposit from `depositor`. -### Transferred(`StagingXcmV4Location`, `AccountId32`, `AccountId32`, `u128`) +### Transferred(`StagingXcmV5Location`, `AccountId32`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.Transferred.is` - **summary**: Some assets were transferred. -### TransferredApproved(`StagingXcmV4Location`, `AccountId32`, `AccountId32`, `AccountId32`, `u128`) +### TransferredApproved(`StagingXcmV5Location`, `AccountId32`, `AccountId32`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.TransferredApproved.is` - **summary**: An `amount` was transferred in its entirety from `owner` to `destination` by the approved `delegate`. -### Withdrawn(`StagingXcmV4Location`, `AccountId32`, `u128`) +### Withdrawn(`StagingXcmV5Location`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.Withdrawn.is` - **summary**: Some assets were withdrawn from the account (e.g. for transaction fees). ___ +## indices + +### DepositPoked(`AccountId32`, `u32`, `u128`, `u128`) +- **interface**: `api.events.indices.DepositPoked.is` +- **summary**: A deposit to reserve an index has been poked/reconsidered. + +### IndexAssigned(`AccountId32`, `u32`) +- **interface**: `api.events.indices.IndexAssigned.is` +- **summary**: A account index was assigned. + +### IndexFreed(`u32`) +- **interface**: `api.events.indices.IndexFreed.is` +- **summary**: A account index has been freed up (unassigned). + +### IndexFrozen(`u32`, `AccountId32`) +- **interface**: `api.events.indices.IndexFrozen.is` +- **summary**: A account index has been frozen to its current account ID. + +___ + + ## messageQueue ### OverweightEnqueued(`[u8;32]`, `CumulusPrimitivesCoreAggregateMessageOrigin`, `u32`, `u32`) @@ -496,6 +794,120 @@ ___ ___ +## multiBlockElection + +### PhaseTransitioned(`PalletElectionProviderMultiBlockPhase`, `PalletElectionProviderMultiBlockPhase`) +- **interface**: `api.events.multiBlockElection.PhaseTransitioned.is` +- **summary**: A phase transition happened. Only checks major changes in the variants, not minor inner values. + +### UnexpectedTargetSnapshotFailed() +- **interface**: `api.events.multiBlockElection.UnexpectedTargetSnapshotFailed.is` +- **summary**: Target snapshot creation failed + +### UnexpectedVoterSnapshotFailed() +- **interface**: `api.events.multiBlockElection.UnexpectedVoterSnapshotFailed.is` +- **summary**: Voter snapshot creation failed + +___ + + +## multiBlockElectionSigned + +### Bailed(`u32`, `AccountId32`) +- **interface**: `api.events.multiBlockElectionSigned.Bailed.is` +- **summary**: The given account has bailed. + +### Discarded(`u32`, `AccountId32`) +- **interface**: `api.events.multiBlockElectionSigned.Discarded.is` +- **summary**: The given account has been discarded. + +### Ejected(`u32`, `AccountId32`) +- **interface**: `api.events.multiBlockElectionSigned.Ejected.is` +- **summary**: The given solution, for the given round, was ejected. + +### Registered(`u32`, `AccountId32`, `SpNposElectionsElectionScore`) +- **interface**: `api.events.multiBlockElectionSigned.Registered.is` +- **summary**: Upcoming submission has been registered for the given account, with the given score. + +### Rewarded(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.multiBlockElectionSigned.Rewarded.is` +- **summary**: The given account has been rewarded with the given amount. + +### Slashed(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.multiBlockElectionSigned.Slashed.is` +- **summary**: The given account has been slashed with the given amount. + +### Stored(`u32`, `AccountId32`, `u32`) +- **interface**: `api.events.multiBlockElectionSigned.Stored.is` +- **summary**: A page of solution solution with the given index has been stored for the given account. + +___ + + +## multiBlockElectionVerifier + +### Queued(`SpNposElectionsElectionScore`, `Option`) +- **interface**: `api.events.multiBlockElectionVerifier.Queued.is` +- **summary**: A solution with the given score has replaced our current best solution. + +### VerificationFailed(`u32`, `PalletElectionProviderMultiBlockVerifierFeasibilityError`) +- **interface**: `api.events.multiBlockElectionVerifier.VerificationFailed.is` +- **summary**: A verification failed at the given page. + + NOTE: if the index is 0, then this could mean either the feasibility of the last page was wrong, or the final checks of `finalize_verification` failed. + +### Verified(`u32`, `u32`) +- **interface**: `api.events.multiBlockElectionVerifier.Verified.is` +- **summary**: The given page of a solution has been verified, with the given number of winners being found in it. + +___ + + +## multiBlockMigrations + +### HistoricCleared(`Option`) +- **interface**: `api.events.multiBlockMigrations.HistoricCleared.is` +- **summary**: The set of historical migrations has been cleared. + +### MigrationAdvanced(`u32`, `u32`) +- **interface**: `api.events.multiBlockMigrations.MigrationAdvanced.is` +- **summary**: A migration progressed. + +### MigrationCompleted(`u32`, `u32`) +- **interface**: `api.events.multiBlockMigrations.MigrationCompleted.is` +- **summary**: A Migration completed. + +### MigrationFailed(`u32`, `u32`) +- **interface**: `api.events.multiBlockMigrations.MigrationFailed.is` +- **summary**: A Migration failed. + + This implies that the whole upgrade failed and governance intervention is required. + +### MigrationSkipped(`u32`) +- **interface**: `api.events.multiBlockMigrations.MigrationSkipped.is` +- **summary**: A migration was skipped since it was already executed in the past. + +### UpgradeCompleted() +- **interface**: `api.events.multiBlockMigrations.UpgradeCompleted.is` +- **summary**: The current runtime upgrade completed. + + This implies that all of its migrations completed successfully as well. + +### UpgradeFailed() +- **interface**: `api.events.multiBlockMigrations.UpgradeFailed.is` +- **summary**: Runtime upgrade failed. + + This is very bad and will require governance intervention. + +### UpgradeStarted(`u32`) +- **interface**: `api.events.multiBlockMigrations.UpgradeStarted.is` +- **summary**: A Runtime upgrade started. + + Its end is indicated by `UpgradeCompleted` or `UpgradeFailed`. + +___ + + ## multisig ### DepositPoked(`AccountId32`, `[u8;32]`, `u128`, `u128`) @@ -691,6 +1103,115 @@ ___ ___ +## nominationPools + +### Bonded(`AccountId32`, `u32`, `u128`, `bool`) +- **interface**: `api.events.nominationPools.Bonded.is` +- **summary**: A member has became bonded in a pool. + +### Created(`AccountId32`, `u32`) +- **interface**: `api.events.nominationPools.Created.is` +- **summary**: A pool has been created. + +### Destroyed(`u32`) +- **interface**: `api.events.nominationPools.Destroyed.is` +- **summary**: A pool has been destroyed. + +### GlobalParamsUpdated(`u128`, `u128`, `Option`, `Option`, `Option`, `Option`) +- **interface**: `api.events.nominationPools.GlobalParamsUpdated.is` +- **summary**: Global parameters regulating nomination pools have been updated. + +### MemberClaimPermissionUpdated(`AccountId32`, `PalletNominationPoolsClaimPermission`) +- **interface**: `api.events.nominationPools.MemberClaimPermissionUpdated.is` +- **summary**: A pool member's claim permission has been updated. + +### MemberRemoved(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.nominationPools.MemberRemoved.is` +- **summary**: A member has been removed from a pool. + + The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked). Any funds that are still delegated (i.e. dangling delegation) are released and are represented by `released_balance`. + +### MetadataUpdated(`u32`, `AccountId32`) +- **interface**: `api.events.nominationPools.MetadataUpdated.is` +- **summary**: A pool's metadata was updated. + +### MinBalanceDeficitAdjusted(`u32`, `u128`) +- **interface**: `api.events.nominationPools.MinBalanceDeficitAdjusted.is` +- **summary**: Topped up deficit in frozen ED of the reward pool. + +### MinBalanceExcessAdjusted(`u32`, `u128`) +- **interface**: `api.events.nominationPools.MinBalanceExcessAdjusted.is` +- **summary**: Claimed excess frozen ED of af the reward pool. + +### PaidOut(`AccountId32`, `u32`, `u128`) +- **interface**: `api.events.nominationPools.PaidOut.is` +- **summary**: A payout has been made to a member. + +### PoolCommissionChangeRateUpdated(`u32`, `PalletNominationPoolsCommissionChangeRate`) +- **interface**: `api.events.nominationPools.PoolCommissionChangeRateUpdated.is` +- **summary**: A pool's commission `change_rate` has been changed. + +### PoolCommissionClaimed(`u32`, `u128`) +- **interface**: `api.events.nominationPools.PoolCommissionClaimed.is` +- **summary**: Pool commission has been claimed. + +### PoolCommissionClaimPermissionUpdated(`u32`, `Option`) +- **interface**: `api.events.nominationPools.PoolCommissionClaimPermissionUpdated.is` +- **summary**: Pool commission claim permission has been updated. + +### PoolCommissionUpdated(`u32`, `Option<(Perbill,AccountId32)>`) +- **interface**: `api.events.nominationPools.PoolCommissionUpdated.is` +- **summary**: A pool's commission setting has been changed. + +### PoolMaxCommissionUpdated(`u32`, `Perbill`) +- **interface**: `api.events.nominationPools.PoolMaxCommissionUpdated.is` +- **summary**: A pool's maximum commission setting has been changed. + +### PoolNominationMade(`u32`, `AccountId32`) +- **interface**: `api.events.nominationPools.PoolNominationMade.is` +- **summary**: A pool's nominating account (or the pool's root account) has nominated a validator set on behalf of the pool. + +### PoolNominatorChilled(`u32`, `AccountId32`) +- **interface**: `api.events.nominationPools.PoolNominatorChilled.is` +- **summary**: The pool is chilled i.e. no longer nominating. + +### PoolSlashed(`u32`, `u128`) +- **interface**: `api.events.nominationPools.PoolSlashed.is` +- **summary**: The active balance of pool `pool_id` has been slashed to `balance`. + +### RolesUpdated(`Option`, `Option`, `Option`) +- **interface**: `api.events.nominationPools.RolesUpdated.is` +- **summary**: The roles of a pool have been updated to the given new roles. Note that the depositor can never change. + +### StateChanged(`u32`, `PalletNominationPoolsPoolState`) +- **interface**: `api.events.nominationPools.StateChanged.is` +- **summary**: The state of a pool has changed + +### Unbonded(`AccountId32`, `u32`, `u128`, `u128`, `u32`) +- **interface**: `api.events.nominationPools.Unbonded.is` +- **summary**: A member has unbonded from their pool. + + - `balance` is the corresponding balance of the number of points that has been requested to be unbonded (the argument of the `unbond` transaction) from the bonded pool. + + - `points` is the number of points that are issued as a result of `balance` being dissolved into the corresponding unbonding pool. + + - `era` is the era in which the balance will be unbonded. In the absence of slashing, these values will match. In the presence of slashing, the number of points that are issued in the unbonding pool will be less than the amount requested to be unbonded. + +### UnbondingPoolSlashed(`u32`, `u32`, `u128`) +- **interface**: `api.events.nominationPools.UnbondingPoolSlashed.is` +- **summary**: The unbond pool at `era` of pool `pool_id` has been slashed to `balance`. + +### Withdrawn(`AccountId32`, `u32`, `u128`, `u128`) +- **interface**: `api.events.nominationPools.Withdrawn.is` +- **summary**: A member has withdrawn from their pool. + + The given number of `points` have been dissolved in return of `balance`. + + Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance will be 1. + +___ + + ## parachainSystem ### DownwardMessagesProcessed(`SpWeightsWeightV2Weight`, `H256`) @@ -720,6 +1241,17 @@ ___ ___ +## parameters + +### Updated(`AssetHubKusamaRuntimeRuntimeParametersKey`, `Option`, `Option`) +- **interface**: `api.events.parameters.Updated.is` +- **summary**: A Parameter was set. + + Is also emitted when the value was not changed. + +___ + + ## polkadotXcm ### AliasAuthorizationRemoved(`StagingXcmV5Location`, `StagingXcmV5Location`) @@ -956,6 +1488,23 @@ ___ ___ +## preimage + +### Cleared(`H256`) +- **interface**: `api.events.preimage.Cleared.is` +- **summary**: A preimage has ben cleared. + +### Noted(`H256`) +- **interface**: `api.events.preimage.Noted.is` +- **summary**: A preimage has been noted. + +### Requested(`H256`) +- **interface**: `api.events.preimage.Requested.is` +- **summary**: A preimage has been requested. + +___ + + ## proxy ### Announced(`AccountId32`, `AccountId32`, `H256`) @@ -981,6 +1530,110 @@ ___ ### PureCreated(`AccountId32`, `AccountId32`, `AssetHubKusamaRuntimeProxyType`, `u16`) - **interface**: `api.events.proxy.PureCreated.is` - **summary**: A pure account has been created by new proxy with given disambiguation index and proxy type. + +### PureKilled(`AccountId32`, `AccountId32`, `AssetHubKusamaRuntimeProxyType`, `u16`) +- **interface**: `api.events.proxy.PureKilled.is` +- **summary**: A pure proxy was killed by its spawner. + +___ + + +## recovery + +### AccountRecovered(`AccountId32`, `AccountId32`) +- **interface**: `api.events.recovery.AccountRecovered.is` +- **summary**: Lost account has been successfully recovered by rescuer account. + +### DepositPoked(`AccountId32`, `PalletRecoveryDepositKind`, `u128`, `u128`) +- **interface**: `api.events.recovery.DepositPoked.is` +- **summary**: A deposit has been updated. + +### RecoveryClosed(`AccountId32`, `AccountId32`) +- **interface**: `api.events.recovery.RecoveryClosed.is` +- **summary**: A recovery process for lost account by rescuer account has been closed. + +### RecoveryCreated(`AccountId32`) +- **interface**: `api.events.recovery.RecoveryCreated.is` +- **summary**: A recovery process has been set up for an account. + +### RecoveryInitiated(`AccountId32`, `AccountId32`) +- **interface**: `api.events.recovery.RecoveryInitiated.is` +- **summary**: A recovery process has been initiated for lost account by rescuer account. + +### RecoveryRemoved(`AccountId32`) +- **interface**: `api.events.recovery.RecoveryRemoved.is` +- **summary**: A recovery process has been removed for an account. + +### RecoveryVouched(`AccountId32`, `AccountId32`, `AccountId32`) +- **interface**: `api.events.recovery.RecoveryVouched.is` +- **summary**: A recovery process for lost account by rescuer account has been vouched for by sender. + +___ + + +## referenda + +### Approved(`u32`) +- **interface**: `api.events.referenda.Approved.is` +- **summary**: A referendum has been approved and its proposal has been scheduled. + +### Cancelled(`u32`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.Cancelled.is` +- **summary**: A referendum has been cancelled. + +### ConfirmAborted(`u32`) +- **interface**: `api.events.referenda.ConfirmAborted.is` + +### Confirmed(`u32`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.Confirmed.is` +- **summary**: A referendum has ended its confirmation phase and is ready for approval. + +### ConfirmStarted(`u32`) +- **interface**: `api.events.referenda.ConfirmStarted.is` + +### DecisionDepositPlaced(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.referenda.DecisionDepositPlaced.is` +- **summary**: The decision deposit has been placed. + +### DecisionDepositRefunded(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.referenda.DecisionDepositRefunded.is` +- **summary**: The decision deposit has been refunded. + +### DecisionStarted(`u32`, `u16`, `FrameSupportPreimagesBounded`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.DecisionStarted.is` +- **summary**: A referendum has moved into the deciding phase. + +### DepositSlashed(`AccountId32`, `u128`) +- **interface**: `api.events.referenda.DepositSlashed.is` +- **summary**: A deposit has been slashed. + +### Killed(`u32`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.Killed.is` +- **summary**: A referendum has been killed. + +### MetadataCleared(`u32`, `H256`) +- **interface**: `api.events.referenda.MetadataCleared.is` +- **summary**: Metadata for a referendum has been cleared. + +### MetadataSet(`u32`, `H256`) +- **interface**: `api.events.referenda.MetadataSet.is` +- **summary**: Metadata for a referendum has been set. + +### Rejected(`u32`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.Rejected.is` +- **summary**: A proposal has been rejected by referendum. + +### SubmissionDepositRefunded(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.referenda.SubmissionDepositRefunded.is` +- **summary**: The submission deposit has been refunded. + +### Submitted(`u32`, `u16`, `FrameSupportPreimagesBounded`) +- **interface**: `api.events.referenda.Submitted.is` +- **summary**: A referendum has been submitted. + +### TimedOut(`u32`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.TimedOut.is` +- **summary**: A referendum has been timed out without being decided. ___ @@ -990,12 +1643,65 @@ ___ ### ContractEmitted(`H160`, `Bytes`, `Vec`) - **interface**: `api.events.revive.ContractEmitted.is` - **summary**: A custom event emitted by the contract. + +### Instantiated(`H160`, `H160`) +- **interface**: `api.events.revive.Instantiated.is` +- **summary**: Contract deployed by deployer at the specified address. + +___ + + +## scheduler + +### AgendaIncomplete(`u32`) +- **interface**: `api.events.scheduler.AgendaIncomplete.is` +- **summary**: Agenda is incomplete from `when`. + +### CallUnavailable(`(u32,u32)`, `Option<[u8;32]>`) +- **interface**: `api.events.scheduler.CallUnavailable.is` +- **summary**: The call for the provided hash was not found so the task has been aborted. + +### Canceled(`u32`, `u32`) +- **interface**: `api.events.scheduler.Canceled.is` +- **summary**: Canceled some task. + +### Dispatched(`(u32,u32)`, `Option<[u8;32]>`, `Result`) +- **interface**: `api.events.scheduler.Dispatched.is` +- **summary**: Dispatched some task. + +### PeriodicFailed(`(u32,u32)`, `Option<[u8;32]>`) +- **interface**: `api.events.scheduler.PeriodicFailed.is` +- **summary**: The given task was unable to be renewed since the agenda is full at that block. + +### PermanentlyOverweight(`(u32,u32)`, `Option<[u8;32]>`) +- **interface**: `api.events.scheduler.PermanentlyOverweight.is` +- **summary**: The given task can never be executed since it is overweight. + +### RetryCancelled(`(u32,u32)`, `Option<[u8;32]>`) +- **interface**: `api.events.scheduler.RetryCancelled.is` +- **summary**: Cancel a retry configuration for some task. + +### RetryFailed(`(u32,u32)`, `Option<[u8;32]>`) +- **interface**: `api.events.scheduler.RetryFailed.is` +- **summary**: The given task was unable to be retried since the agenda is full at that block or there was not enough weight to reschedule it. + +### RetrySet(`(u32,u32)`, `Option<[u8;32]>`, `u32`, `u8`) +- **interface**: `api.events.scheduler.RetrySet.is` +- **summary**: Set a retry configuration for some task. + +### Scheduled(`u32`, `u32`) +- **interface**: `api.events.scheduler.Scheduled.is` +- **summary**: Scheduled some task. ___ ## session +### NewQueued() +- **interface**: `api.events.session.NewQueued.is` +- **summary**: The `NewSession` event in the current block also implies a new validator set to be queued. + ### NewSession(`u32`) - **interface**: `api.events.session.NewSession.is` - **summary**: New session has happened. Note that the argument is the session index, not the block number as the type might suggest. @@ -1011,6 +1717,212 @@ ___ ___ +## society + +### AutoUnbid(`AccountId32`) +- **interface**: `api.events.society.AutoUnbid.is` +- **summary**: A candidate was dropped (due to an excess of bids in the system). + +### Bid(`AccountId32`, `u128`) +- **interface**: `api.events.society.Bid.is` +- **summary**: A membership bid just happened. The given account is the candidate's ID and their offer is the second. + +### CandidateSuspended(`AccountId32`) +- **interface**: `api.events.society.CandidateSuspended.is` +- **summary**: A candidate has been suspended + +### Challenged(`AccountId32`) +- **interface**: `api.events.society.Challenged.is` +- **summary**: A member has been challenged + +### DefenderVote(`AccountId32`, `bool`) +- **interface**: `api.events.society.DefenderVote.is` +- **summary**: A vote has been placed for a defending member + +### Deposit(`u128`) +- **interface**: `api.events.society.Deposit.is` +- **summary**: Some funds were deposited into the society account. + +### DepositPoked(`AccountId32`, `u128`, `u128`) +- **interface**: `api.events.society.DepositPoked.is` +- **summary**: A deposit was poked / adjusted. + +### Elevated(`AccountId32`, `u32`) +- **interface**: `api.events.society.Elevated.is` +- **summary**: A \[member\] got elevated to \[rank\]. + +### Founded(`AccountId32`) +- **interface**: `api.events.society.Founded.is` +- **summary**: The society is founded by the given identity. + +### Inducted(`AccountId32`, `Vec`) +- **interface**: `api.events.society.Inducted.is` +- **summary**: A group of candidates have been inducted. The batch's primary is the first value, the batch in full is the second. + +### MemberSuspended(`AccountId32`) +- **interface**: `api.events.society.MemberSuspended.is` +- **summary**: A member has been suspended + +### NewParams(`PalletSocietyGroupParams`) +- **interface**: `api.events.society.NewParams.is` +- **summary**: A new set of \[params\] has been set for the group. + +### SuspendedMemberJudgement(`AccountId32`, `bool`) +- **interface**: `api.events.society.SuspendedMemberJudgement.is` +- **summary**: A suspended member has been judged. + +### Unbid(`AccountId32`) +- **interface**: `api.events.society.Unbid.is` +- **summary**: A candidate was dropped (by their request). + +### Unfounded(`AccountId32`) +- **interface**: `api.events.society.Unfounded.is` +- **summary**: Society is unfounded. + +### Unvouch(`AccountId32`) +- **interface**: `api.events.society.Unvouch.is` +- **summary**: A candidate was dropped (by request of who vouched for them). + +### Vote(`AccountId32`, `AccountId32`, `bool`) +- **interface**: `api.events.society.Vote.is` +- **summary**: A vote has been placed + +### Vouch(`AccountId32`, `u128`, `AccountId32`) +- **interface**: `api.events.society.Vouch.is` +- **summary**: A membership bid just happened by vouching. The given account is the candidate's ID and their offer is the second. The vouching party is the third. + +___ + + +## staking + +### Bonded(`AccountId32`, `u128`) +- **interface**: `api.events.staking.Bonded.is` +- **summary**: An account has bonded this amount. \[stash, amount\] + + NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably, it will not be emitted for staking rewards when they are added to stake. + +### Chilled(`AccountId32`) +- **interface**: `api.events.staking.Chilled.is` +- **summary**: An account has stopped participating as either a validator or nominator. + +### ControllerBatchDeprecated(`u32`) +- **interface**: `api.events.staking.ControllerBatchDeprecated.is` +- **summary**: Report of a controller batch deprecation. + +### CurrencyMigrated(`AccountId32`, `u128`) +- **interface**: `api.events.staking.CurrencyMigrated.is` +- **summary**: Staking balance migrated from locks to holds, with any balance that could not be held is force withdrawn. + +### EraPaid(`u32`, `u128`, `u128`) +- **interface**: `api.events.staking.EraPaid.is` +- **summary**: The era payout has been set; the first balance is the validator-payout; the second is the remainder from the maximum amount of reward. + +### EraPruned(`u32`) +- **interface**: `api.events.staking.EraPruned.is` +- **summary**: An old era with the given index was pruned. + +### ForceEra(`PalletStakingAsyncForcing`) +- **interface**: `api.events.staking.ForceEra.is` + +### Kicked(`AccountId32`, `AccountId32`) +- **interface**: `api.events.staking.Kicked.is` +- **summary**: A nominator has been kicked from a validator. + +### OffenceReported(`u32`, `AccountId32`, `Perbill`) +- **interface**: `api.events.staking.OffenceReported.is` +- **summary**: An offence for the given validator, for the given percentage of their stake, at the given era as been reported. + +### OffenceTooOld(`u32`, `AccountId32`, `Perbill`) +- **interface**: `api.events.staking.OffenceTooOld.is` +- **summary**: An offence was reported that was too old to be processed, and thus was dropped. + +### OldSlashingReportDiscarded(`u32`) +- **interface**: `api.events.staking.OldSlashingReportDiscarded.is` +- **summary**: An old slashing report from a prior era was discarded because it could not be processed. + +### PagedElectionProceeded(`u32`, `Result`) +- **interface**: `api.events.staking.PagedElectionProceeded.is` +- **summary**: A page from a multi-page election was fetched. A number of these are followed by `StakersElected`. + + `Ok(count)` indicates the give number of stashes were added. `Err(index)` indicates that the stashes after index were dropped. `Err(0)` indicates that an error happened but no stashes were dropped nor added. + + The error indicates that a number of validators were dropped due to excess size, but the overall election will continue. + +### PayoutStarted(`u32`, `AccountId32`, `u32`, `Option`) +- **interface**: `api.events.staking.PayoutStarted.is` +- **summary**: A Page of stakers rewards are getting paid. `next` is `None` if all pages are claimed. + +### Rewarded(`AccountId32`, `PalletStakingAsyncRewardDestination`, `u128`) +- **interface**: `api.events.staking.Rewarded.is` +- **summary**: The nominator has been rewarded by this amount to this destination. + +### SessionRotated(`u32`, `u32`, `u32`) +- **interface**: `api.events.staking.SessionRotated.is` +- **summary**: Session change has been triggered. + + If planned_era is one era ahead of active_era, it implies new era is being planned and election is ongoing. + +### SlashCancelled(`u32`, `AccountId32`) +- **interface**: `api.events.staking.SlashCancelled.is` +- **summary**: An unapplied slash has been cancelled. + +### SlashComputed(`u32`, `u32`, `AccountId32`, `u32`) +- **interface**: `api.events.staking.SlashComputed.is` +- **summary**: An offence has been processed and the corresponding slash has been computed. + +### Slashed(`AccountId32`, `u128`) +- **interface**: `api.events.staking.Slashed.is` +- **summary**: A staker (validator or nominator) has been slashed by the given amount. + +### SnapshotTargetsSizeExceeded(`u32`) +- **interface**: `api.events.staking.SnapshotTargetsSizeExceeded.is` +- **summary**: Targets size limit reached. + +### SnapshotVotersSizeExceeded(`u32`) +- **interface**: `api.events.staking.SnapshotVotersSizeExceeded.is` +- **summary**: Voters size limit reached. + +### StakerRemoved(`AccountId32`) +- **interface**: `api.events.staking.StakerRemoved.is` +- **summary**: A subsequent event of `Withdrawn`, indicating that `stash` was fully removed from the system. + +### Unbonded(`AccountId32`, `u128`) +- **interface**: `api.events.staking.Unbonded.is` +- **summary**: An account has unbonded this amount. + +### Unexpected(`PalletStakingAsyncPalletUnexpectedKind`) +- **interface**: `api.events.staking.Unexpected.is` +- **summary**: Something occurred that should never happen under normal operation. Logged as an event for fail-safe observability. + +### ValidatorPrefsSet(`AccountId32`, `PalletStakingAsyncValidatorPrefs`) +- **interface**: `api.events.staking.ValidatorPrefsSet.is` +- **summary**: A validator has set their preferences. + +### Withdrawn(`AccountId32`, `u128`) +- **interface**: `api.events.staking.Withdrawn.is` +- **summary**: An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance` from the unlocking queue. + +___ + + +## stakingRcClient + +### OffenceReceived(`u32`, `u32`) +- **interface**: `api.events.stakingRcClient.OffenceReceived.is` +- **summary**: A new offence was reported. + +### SessionReportReceived(`u32`, `Option<(u64,u32)>`, `u32`, `bool`) +- **interface**: `api.events.stakingRcClient.SessionReportReceived.is` +- **summary**: A said session report was received. + +### Unexpected(`PalletStakingAsyncRcClientUnexpectedKind`) +- **interface**: `api.events.stakingRcClient.Unexpected.is` +- **summary**: Something occurred that should never happen under normal operation. Logged as an event for fail-safe observability. + +___ + + ## stateTrieMigration ### AutoMigrationFinished() @@ -1062,6 +1974,18 @@ ___ - **interface**: `api.events.system.Remarked.is` - **summary**: On on-chain remark happened. +### TaskCompleted(`AssetHubKusamaRuntimeRuntimeTask`) +- **interface**: `api.events.system.TaskCompleted.is` +- **summary**: A [`Task`] has finished executing. + +### TaskFailed(`AssetHubKusamaRuntimeRuntimeTask`, `SpRuntimeDispatchError`) +- **interface**: `api.events.system.TaskFailed.is` +- **summary**: A [`Task`] failed during execution. + +### TaskStarted(`AssetHubKusamaRuntimeRuntimeTask`) +- **interface**: `api.events.system.TaskStarted.is` +- **summary**: A [`Task`] has started executing + ### UpgradeAuthorized(`H256`, `bool`) - **interface**: `api.events.system.UpgradeAuthorized.is` - **summary**: An upgrade was authorized. @@ -1091,6 +2015,59 @@ ___ ___ +## treasury + +### AssetSpendApproved(`u32`, `PolkadotRuntimeCommonImplsVersionedLocatableAsset`, `u128`, `ParachainsCommonPayVersionedLocatableAccount`, `u32`, `u32`) +- **interface**: `api.events.treasury.AssetSpendApproved.is` +- **summary**: A new asset spend proposal has been approved. + +### AssetSpendVoided(`u32`) +- **interface**: `api.events.treasury.AssetSpendVoided.is` +- **summary**: An approved spend was voided. + +### Awarded(`u32`, `u128`, `AccountId32`) +- **interface**: `api.events.treasury.Awarded.is` +- **summary**: Some funds have been allocated. + +### Burnt(`u128`) +- **interface**: `api.events.treasury.Burnt.is` +- **summary**: Some of our funds have been burnt. + +### Deposit(`u128`) +- **interface**: `api.events.treasury.Deposit.is` +- **summary**: Some funds have been deposited. + +### Paid(`u32`, `u64`) +- **interface**: `api.events.treasury.Paid.is` +- **summary**: A payment happened. + +### PaymentFailed(`u32`, `u64`) +- **interface**: `api.events.treasury.PaymentFailed.is` +- **summary**: A payment failed and can be retried. + +### Rollover(`u128`) +- **interface**: `api.events.treasury.Rollover.is` +- **summary**: Spending has finished; this is the amount that rolls over until next spend. + +### SpendApproved(`u32`, `u128`, `AccountId32`) +- **interface**: `api.events.treasury.SpendApproved.is` +- **summary**: A new spend proposal has been approved. + +### Spending(`u128`) +- **interface**: `api.events.treasury.Spending.is` +- **summary**: We have ended a spend period and will now allocate funds. + +### SpendProcessed(`u32`) +- **interface**: `api.events.treasury.SpendProcessed.is` +- **summary**: A spend was processed and removed from the storage. It might have been successfully paid or it may have expired. + +### UpdatedInactive(`u128`, `u128`) +- **interface**: `api.events.treasury.UpdatedInactive.is` +- **summary**: The inactive funds of the pallet have been updated. + +___ + + ## uniques ### ApprovalCancelled(`u32`, `u32`, `AccountId32`, `AccountId32`) @@ -1247,6 +2224,10 @@ ___ - **interface**: `api.events.vesting.VestingCompleted.is` - **summary**: An \[account\] has become fully vested. +### VestingCreated(`AccountId32`, `u32`) +- **interface**: `api.events.vesting.VestingCreated.is` +- **summary**: A vesting schedule has been created. + ### VestingUpdated(`AccountId32`, `u128`) - **interface**: `api.events.vesting.VestingUpdated.is` - **summary**: The amount vested has been updated. This could indicate a change in funds available. The balance given is the amount which is left unvested (and thus locked). @@ -1254,6 +2235,33 @@ ___ ___ +## voterList + +### Rebagged(`AccountId32`, `u64`, `u64`) +- **interface**: `api.events.voterList.Rebagged.is` +- **summary**: Moved an account from one bag to another. + +### ScoreUpdated(`AccountId32`, `u64`) +- **interface**: `api.events.voterList.ScoreUpdated.is` +- **summary**: Updated the score of some account to the given amount. + +___ + + +## whitelist + +### CallWhitelisted(`H256`) +- **interface**: `api.events.whitelist.CallWhitelisted.is` + +### WhitelistedCallDispatched(`H256`, `Result`) +- **interface**: `api.events.whitelist.WhitelistedCallDispatched.is` + +### WhitelistedCallRemoved(`H256`) +- **interface**: `api.events.whitelist.WhitelistedCallRemoved.is` + +___ + + ## xcmpQueue ### XcmpMessageSent(`[u8;32]`) diff --git a/docs/asset-hub-kusama/extrinsics.md b/docs/asset-hub-kusama/extrinsics.md index 6bc5ca3e6..c7dcbcade 100644 --- a/docs/asset-hub-kusama/extrinsics.md +++ b/docs/asset-hub-kusama/extrinsics.md @@ -6,42 +6,86 @@ The following sections contain Extrinsics methods are part of the default asset- (NOTE: These were generated from a static/snapshot view of a recent default asset-hub-kusama runtime. Some items may not be available in older nodes, or in any customized implementations.) +- **[ahMigrator](#ahmigrator)** + +- **[ahOps](#ahops)** + - **[assetConversion](#assetconversion)** +- **[assetRate](#assetrate)** + - **[assets](#assets)** - **[balances](#balances)** +- **[bounties](#bounties)** + +- **[childBounties](#childbounties)** + +- **[claims](#claims)** + - **[collatorSelection](#collatorselection)** +- **[convictionVoting](#convictionvoting)** + - **[cumulusXcm](#cumulusxcm)** - **[foreignAssets](#foreignassets)** +- **[indices](#indices)** + - **[messageQueue](#messagequeue)** +- **[multiBlockElection](#multiblockelection)** + +- **[multiBlockElectionSigned](#multiblockelectionsigned)** + +- **[multiBlockElectionUnsigned](#multiblockelectionunsigned)** + +- **[multiBlockElectionVerifier](#multiblockelectionverifier)** + +- **[multiBlockMigrations](#multiblockmigrations)** + - **[multisig](#multisig)** - **[nftFractionalization](#nftfractionalization)** - **[nfts](#nfts)** +- **[nominationPools](#nominationpools)** + - **[parachainInfo](#parachaininfo)** - **[parachainSystem](#parachainsystem)** +- **[parameters](#parameters)** + - **[polkadotXcm](#polkadotxcm)** - **[poolAssets](#poolassets)** +- **[preimage](#preimage)** + - **[proxy](#proxy)** +- **[recovery](#recovery)** + +- **[referenda](#referenda)** + - **[remoteProxyRelayChain](#remoteproxyrelaychain)** - **[revive](#revive)** +- **[scheduler](#scheduler)** + - **[session](#session)** +- **[society](#society)** + +- **[staking](#staking)** + +- **[stakingRcClient](#stakingrcclient)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** @@ -50,21 +94,202 @@ The following sections contain Extrinsics methods are part of the default asset- - **[toPolkadotXcmRouter](#topolkadotxcmrouter)** +- **[treasury](#treasury)** + - **[uniques](#uniques)** - **[utility](#utility)** - **[vesting](#vesting)** +- **[voterList](#voterlist)** + +- **[whitelist](#whitelist)** + - **[xcmpQueue](#xcmpqueue)** ___ +## ahMigrator + +### finishMigration(data: `Option`) +- **interface**: `api.tx.ahMigrator.finishMigration` +- **summary**: Finish the migration. + + This is typically called by the Relay Chain to signal the migration has finished. + + The `data` parameter might be `None` if we are running the migration for a second time for some pallets and have already performed the checking account balance correction, so we do not need to do it this time. + +### forceSetStage(stage: `PalletAhMigratorMigrationStage`) +- **interface**: `api.tx.ahMigrator.forceSetStage` +- **summary**: Set the migration stage. + + This call is intended for emergency use only and is guarded by the [`Config::AdminOrigin`]. + +### receiveAccounts(accounts: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveAccounts` +- **summary**: Receive accounts from the Relay Chain. + + The accounts sent with `pallet_rc_migrator::Pallet::migrate_accounts` function. + +### receiveAssetRates(rates: `Vec<(PolkadotRuntimeCommonImplsVersionedLocatableAsset,u128)>`) +- **interface**: `api.tx.ahMigrator.receiveAssetRates` + +### receiveBagsListMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveBagsListMessages` + +### receiveBountiesMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveBountiesMessages` + +### receiveChildBountiesMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveChildBountiesMessages` + +### receiveClaims(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveClaims` + +### receiveConvictionVotingMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveConvictionVotingMessages` + +### receiveCrowdloanMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveCrowdloanMessages` + +### receiveDelegatedStakingMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveDelegatedStakingMessages` + +### receiveIndices(indices: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveIndices` + +### receiveMultisigs(accounts: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveMultisigs` +- **summary**: Receive multisigs from the Relay Chain. + + This will be called from an XCM `Transact` inside a DMP from the relay chain. The multisigs were prepared by `pallet_rc_migrator::multisig::MultisigMigrator::migrate_many`. + +### receiveNomPoolsMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveNomPoolsMessages` + +### receivePreimageChunks(chunks: `Vec`) +- **interface**: `api.tx.ahMigrator.receivePreimageChunks` + +### receivePreimageLegacyStatus(legacy_status: `Vec`) +- **interface**: `api.tx.ahMigrator.receivePreimageLegacyStatus` + +### receivePreimageRequestStatus(request_status: `Vec`) +- **interface**: `api.tx.ahMigrator.receivePreimageRequestStatus` + +### receiveProxyAnnouncements(announcements: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveProxyAnnouncements` +- **summary**: Receive proxy announcements from the Relay Chain. + +### receiveProxyProxies(proxies: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveProxyProxies` +- **summary**: Receive proxies from the Relay Chain. + +### receiveRecoveryMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveRecoveryMessages` + +### receiveReferendaMetadata(metadata: `Vec<(u32,H256)>`) +- **interface**: `api.tx.ahMigrator.receiveReferendaMetadata` + +### receiveReferendaValues(values: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveReferendaValues` +- **summary**: Receive referendum counts, deciding counts, votes for the track queue. + +### receiveReferendums(referendums: `Vec<(u32,PalletReferendaReferendumInfoRcPalletsOrigin)>`) +- **interface**: `api.tx.ahMigrator.receiveReferendums` +- **summary**: Receive referendums from the Relay Chain. + +### receiveSchedulerAgendaMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveSchedulerAgendaMessages` + +### receiveSchedulerMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveSchedulerMessages` + +### receiveSocietyMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveSocietyMessages` + +### receiveStakingMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveStakingMessages` + +### receiveTreasuryMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveTreasuryMessages` + +### receiveVestingSchedules(schedules: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveVestingSchedules` + +### sendXcmMessage(dest: `XcmVersionedLocation`, message: `XcmVersionedXcm`) +- **interface**: `api.tx.ahMigrator.sendXcmMessage` +- **summary**: XCM send call identical to the [`pallet_xcm::Pallet::send`] call but with the [Config::SendXcm] router which will be able to send messages to the Relay Chain during the migration. + +### setDmpQueuePriority(new: `PalletRcMigratorQueuePriority`) +- **interface**: `api.tx.ahMigrator.setDmpQueuePriority` +- **summary**: Set the DMP queue priority configuration. + + Can only be called by the `AdminOrigin`. + +### setManager(new: `Option`) +- **interface**: `api.tx.ahMigrator.setManager` +- **summary**: Set the manager account id. + + The manager has the similar to [`Config::AdminOrigin`] privileges except that it can not set the manager account id via `set_manager` call. + +### startMigration() +- **interface**: `api.tx.ahMigrator.startMigration` +- **summary**: Start the data migration. + + This is typically called by the Relay Chain to start the migration on the Asset Hub and receive a handshake message indicating the Asset Hub's readiness. + +___ + + +## ahOps + +### transferToPostMigrationTreasury(asset_id: `StagingXcmV5Location`) +- **interface**: `api.tx.ahOps.transferToPostMigrationTreasury` +- **summary**: Transfer the balance from the pre-migration treasury account to the post-migration treasury account. + + This call can only be called after the migration is completed. + +### unreserveCrowdloanReserve(block: `u32`, depositor: `Option`, para_id: `u32`) +- **interface**: `api.tx.ahOps.unreserveCrowdloanReserve` +- **summary**: Unreserve the deposit that was taken for creating a crowdloan. + + This can be called once either: + + - The crowdloan failed to win an auction and timed out + + - Won an auction, all leases expired and all contributions are withdrawn + + Can be called by any signed origin. The condition that all contributions are withdrawn is in place since the reserve acts as a storage deposit. + +### unreserveLeaseDeposit(block: `u32`, depositor: `Option`, para_id: `u32`) +- **interface**: `api.tx.ahOps.unreserveLeaseDeposit` +- **summary**: Unreserve the deposit that was taken for creating a crowdloan. + + This can be called by any signed origin. It unreserves the lease deposit on the account that won the lease auction. It can be unreserved once all leases expired. Note that it will be called automatically from `withdraw_crowdloan_contribution` for the matching crowdloan account. + + Solo bidder accounts that won lease auctions can use this to unreserve their amount. + +### withdrawCrowdloanContribution(block: `u32`, depositor: `Option`, para_id: `u32`) +- **interface**: `api.tx.ahOps.withdrawCrowdloanContribution` +- **summary**: Withdraw the contribution of a finished crowdloan. + + A crowdloan contribution can be withdrawn if either: + + - The crowdloan failed to in an auction and timed out + + - Won an auction and all leases expired + + Can be called by any signed origin. + +___ + + ## assetConversion -### addLiquidity(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`, amount1_desired: `u128`, amount2_desired: `u128`, amount1_min: `u128`, amount2_min: `u128`, mint_to: `AccountId32`) +### addLiquidity(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`, amount1_desired: `u128`, amount2_desired: `u128`, amount1_min: `u128`, amount2_min: `u128`, mint_to: `AccountId32`) - **interface**: `api.tx.assetConversion.addLiquidity` - **summary**: Provide liquidity into the pool of `asset1` and `asset2`. NOTE: an optimal amount of asset1 and asset2 will be calculated and might be different than the provided `amount1_desired`/`amount2_desired` thus you should provide the min amount you're happy to provide. Params `amount1_min`/`amount2_min` represent that. `mint_to` will be sent the liquidity tokens that represent this share of the pool. @@ -72,29 +297,29 @@ ___ Once liquidity is added, someone may successfully call [`Pallet::swap_exact_tokens_for_tokens`]. -### createPool(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`) +### createPool(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`) - **interface**: `api.tx.assetConversion.createPool` - **summary**: Creates an empty liquidity pool and an associated new `lp_token` asset (the id of which is returned in the `Event::PoolCreated` event). Once a pool is created, someone may [`Pallet::add_liquidity`] to it. -### removeLiquidity(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`, lp_token_burn: `u128`, amount1_min_receive: `u128`, amount2_min_receive: `u128`, withdraw_to: `AccountId32`) +### removeLiquidity(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`, lp_token_burn: `u128`, amount1_min_receive: `u128`, amount2_min_receive: `u128`, withdraw_to: `AccountId32`) - **interface**: `api.tx.assetConversion.removeLiquidity` - **summary**: Allows you to remove liquidity by providing the `lp_token_burn` tokens that will be burned in the process. With the usage of `amount1_min_receive`/`amount2_min_receive` it's possible to control the min amount of returned tokens you're happy with. -### swapExactTokensForTokens(path: `Vec`, amount_in: `u128`, amount_out_min: `u128`, send_to: `AccountId32`, keep_alive: `bool`) +### swapExactTokensForTokens(path: `Vec`, amount_in: `u128`, amount_out_min: `u128`, send_to: `AccountId32`, keep_alive: `bool`) - **interface**: `api.tx.assetConversion.swapExactTokensForTokens` - **summary**: Swap the exact amount of `asset1` into `asset2`. `amount_out_min` param allows you to specify the min amount of the `asset2` you're happy to receive. [`AssetConversionApi::quote_price_exact_tokens_for_tokens`] runtime call can be called for a quote. -### swapTokensForExactTokens(path: `Vec`, amount_out: `u128`, amount_in_max: `u128`, send_to: `AccountId32`, keep_alive: `bool`) +### swapTokensForExactTokens(path: `Vec`, amount_out: `u128`, amount_in_max: `u128`, send_to: `AccountId32`, keep_alive: `bool`) - **interface**: `api.tx.assetConversion.swapTokensForExactTokens` - **summary**: Swap any amount of `asset1` to get the exact amount of `asset2`. `amount_in_max` param allows to specify the max amount of the `asset1` you're happy to provide. [`AssetConversionApi::quote_price_tokens_for_exact_tokens`] runtime call can be called for a quote. -### touch(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`) +### touch(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`) - **interface**: `api.tx.assetConversion.touch` - **summary**: Touch an existing pool to fulfill prerequisites before providing liquidity, such as ensuring that the pool's accounts are in place. It is typically useful when a pool creator removes the pool's accounts and does not provide a liquidity. This action may involve holding assets from the caller as a deposit for creating the pool's accounts. @@ -109,6 +334,35 @@ ___ ___ +## assetRate + +### create(asset_kind: `PolkadotRuntimeCommonImplsVersionedLocatableAsset`, rate: `u128`) +- **interface**: `api.tx.assetRate.create` +- **summary**: Initialize a conversion rate to native balance for the given asset. + + #### Complexity + + - O(1) + +### remove(asset_kind: `PolkadotRuntimeCommonImplsVersionedLocatableAsset`) +- **interface**: `api.tx.assetRate.remove` +- **summary**: Remove an existing conversion rate to native balance for the given asset. + + #### Complexity + + - O(1) + +### update(asset_kind: `PolkadotRuntimeCommonImplsVersionedLocatableAsset`, rate: `u128`) +- **interface**: `api.tx.assetRate.update` +- **summary**: Update the conversion rate to native balance for the given asset. + + #### Complexity + + - O(1) + +___ + + ## assets ### approveTransfer(id: `Compact`, delegate: `MultiAddress`, amount: `Compact`) @@ -707,2615 +961,4552 @@ ___ ___ -## collatorSelection - -### addInvulnerable(who: `AccountId32`) -- **interface**: `api.tx.collatorSelection.addInvulnerable` -- **summary**: Add a new account `who` to the list of `Invulnerables` collators. `who` must have registered session keys. If `who` is a candidate, they will be removed. - - The origin for this call must be the `UpdateOrigin`. +## bounties -### leaveIntent() -- **interface**: `api.tx.collatorSelection.leaveIntent` -- **summary**: Deregister `origin` as a collator candidate. Note that the collator can only leave on session change. The `CandidacyBond` will be unreserved immediately. +### acceptCurator(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.acceptCurator` +- **summary**: Accept the curator role for a bounty. A deposit will be reserved from curator and refund upon successful payout. - This call will fail if the total number of candidates would drop below `MinEligibleCollators`. - -### registerAsCandidate() -- **interface**: `api.tx.collatorSelection.registerAsCandidate` -- **summary**: Register this account as a collator candidate. The account must (a) already have registered session keys and (b) be able to reserve the `CandidacyBond`. + May only be called from the curator. - This call is not available to `Invulnerable` collators. - -### removeInvulnerable(who: `AccountId32`) -- **interface**: `api.tx.collatorSelection.removeInvulnerable` -- **summary**: Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must be sorted. + #### Complexity - The origin for this call must be the `UpdateOrigin`. + - O(1). -### setCandidacyBond(bond: `u128`) -- **interface**: `api.tx.collatorSelection.setCandidacyBond` -- **summary**: Set the candidacy bond amount. +### approveBounty(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.approveBounty` +- **summary**: Approve a bounty proposal. At a later time, the bounty will be funded and become active and the original deposit will be returned. - If the candidacy bond is increased by this call, all current candidates which have a deposit lower than the new bond will be kicked from the list and get their deposits back. + May only be called from `T::SpendOrigin`. - The origin for this call must be the `UpdateOrigin`. - -### setDesiredCandidates(max: `u32`) -- **interface**: `api.tx.collatorSelection.setDesiredCandidates` -- **summary**: Set the ideal number of non-invulnerable collators. If lowering this number, then the number of running collators could be higher than this figure. Aside from that edge case, there should be no other way to have more candidates than the desired number. + #### Complexity - The origin for this call must be the `UpdateOrigin`. + - O(1). -### setInvulnerables(new: `Vec`) -- **interface**: `api.tx.collatorSelection.setInvulnerables` -- **summary**: Set the list of invulnerable (fixed) collators. These collators must do some preparation, namely to have registered session keys. - - The call will remove any accounts that have not registered keys from the set. That is, it is non-atomic; the caller accepts all `AccountId`s passed in `new` _individually_ as acceptable Invulnerables, and is not proposing a _set_ of new Invulnerables. +### approveBountyWithCurator(bounty_id: `Compact`, curator: `MultiAddress`, fee: `Compact`) +- **interface**: `api.tx.bounties.approveBountyWithCurator` +- **summary**: Approve bountry and propose a curator simultaneously. This call is a shortcut to calling `approve_bounty` and `propose_curator` separately. - This call does not maintain mutual exclusivity of `Invulnerables` and `Candidates`. It is recommended to use a batch of `add_invulnerable` and `remove_invulnerable` instead. A `batch_all` can also be used to enforce atomicity. If any candidates are included in `new`, they should be removed with `remove_invulnerable_candidate` after execution. + May only be called from `T::SpendOrigin`. - Must be called by the `UpdateOrigin`. - -### takeCandidateSlot(deposit: `u128`, target: `AccountId32`) -- **interface**: `api.tx.collatorSelection.takeCandidateSlot` -- **summary**: The caller `origin` replaces a candidate `target` in the collator candidate list by reserving `deposit`. The amount `deposit` reserved by the caller must be greater than the existing bond of the target it is trying to replace. + - `bounty_id`: Bounty ID to approve. - This call will fail if the caller is already a collator candidate or invulnerable, the caller does not have registered session keys, the target is not a collator candidate, and/or the `deposit` amount cannot be reserved. - -### updateBond(new_deposit: `u128`) -- **interface**: `api.tx.collatorSelection.updateBond` -- **summary**: Update the candidacy bond of collator candidate `origin` to a new amount `new_deposit`. + - `curator`: The curator account whom will manage this bounty. - Setting a `new_deposit` that is lower than the current deposit while `origin` is occupying a top-`DesiredCandidates` slot is not allowed. + - `fee`: The curator fee. - This call will fail if `origin` is not a collator candidate, the updated bond is lower than the minimum candidacy bond, and/or the amount cannot be reserved. + #### Complexity -___ + - O(1). + +### awardBounty(bounty_id: `Compact`, beneficiary: `MultiAddress`) +- **interface**: `api.tx.bounties.awardBounty` +- **summary**: Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + The dispatch origin for this call must be the curator of this bounty. -## cumulusXcm + - `bounty_id`: Bounty ID to award. -___ + - `beneficiary`: The beneficiary account whom will receive the payout. + #### Complexity -## foreignAssets + - O(1). -### approveTransfer(id: `StagingXcmV4Location`, delegate: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.approveTransfer` -- **summary**: Approve an amount of asset for transfer by a delegated third-party account. +### claimBounty(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.claimBounty` +- **summary**: Claim the payout from an awarded bounty after payout delay. - Origin must be Signed. + The dispatch origin for this call must be the beneficiary of this bounty. - Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account to `delegate`, then it is topped up or unreserved to meet the right value. + - `bounty_id`: Bounty ID to claim. - NOTE: The signing account does not need to own `amount` of assets at the point of making this call. + #### Complexity - - `id`: The identifier of the asset. + - O(1). + +### closeBounty(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.closeBounty` +- **summary**: Cancel a proposed or active bounty. All the funds will be sent to treasury and the curator deposit will be unreserved if possible. - - `delegate`: The account to delegate permission to transfer asset. + Only `T::RejectOrigin` is able to cancel a bounty. - - `amount`: The amount of asset that may be transferred by `delegate`. If there is already an approval in place, then this acts additively. + - `bounty_id`: Bounty ID to cancel. - Emits `ApprovedTransfer` on success. + #### Complexity - Weight: `O(1)` + - O(1). -### block(id: `StagingXcmV4Location`, who: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.block` -- **summary**: Disallow further unprivileged transfers of an asset `id` to and from an account `who`. +### extendBountyExpiry(bounty_id: `Compact`, remark: `Bytes`) +- **interface**: `api.tx.bounties.extendBountyExpiry` +- **summary**: Extend the expiry time of an active bounty. - Origin must be Signed and the sender should be the Freezer of the asset `id`. + The dispatch origin for this call must be the curator of this bounty. - - `id`: The identifier of the account's asset. + - `bounty_id`: Bounty ID to extend. - - `who`: The account to be unblocked. + - `remark`: additional information. - Emits `Blocked`. + #### Complexity - Weight: `O(1)` + - O(1). -### burn(id: `StagingXcmV4Location`, who: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.burn` -- **summary**: Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. +### pokeDeposit(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.pokeDeposit` +- **summary**: Poke the deposit reserved for creating a bounty proposal. - Origin must be Signed and the sender should be the Manager of the asset `id`. + This can be used by accounts to update their reserved amount. - Bails with `NoAccount` if the `who` is already dead. + The dispatch origin for this call must be _Signed_. - - `id`: The identifier of the asset to have some amount burned. + Parameters: - - `who`: The account to be debited from. + - `bounty_id`: The bounty id for which to adjust the deposit. - - `amount`: The maximum amount by which `who`'s balance should be reduced. + If the deposit is updated, the difference will be reserved/unreserved from the proposer's account. - Emits `Burned` with the actual amount burned. If this takes the balance to below the minimum for the asset, then the amount burned is increased to take it to zero. + The transaction is made free if the deposit is updated and paid otherwise. - Weight: `O(1)` Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. + Emits `DepositPoked` if the deposit is updated. -### cancelApproval(id: `StagingXcmV4Location`, delegate: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.cancelApproval` -- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. +### proposeBounty(value: `Compact`, description: `Bytes`) +- **interface**: `api.tx.bounties.proposeBounty` +- **summary**: Propose a new bounty. - Origin must be Signed and there must be an approval in place between signer and `delegate`. + The dispatch origin for this call must be _Signed_. - Unreserves any deposit previously reserved by `approve_transfer` for the approval. + Payment: `TipReportDepositBase` will be reserved from the origin account, as well as `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, or slashed when rejected. - - `id`: The identifier of the asset. + - `curator`: The curator account whom will manage this bounty. - - `delegate`: The account delegated permission to transfer asset. + - `fee`: The curator fee. - Emits `ApprovalCancelled` on success. + - `value`: The total payment amount of this bounty, curator fee included. - Weight: `O(1)` + - `description`: The description of this bounty. -### clearMetadata(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.clearMetadata` -- **summary**: Clear the metadata for an asset. - - Origin must be Signed and the sender should be the Owner of the asset `id`. - - Any deposit is freed for the asset owner. +### proposeCurator(bounty_id: `Compact`, curator: `MultiAddress`, fee: `Compact`) +- **interface**: `api.tx.bounties.proposeCurator` +- **summary**: Propose a curator to a funded bounty. - - `id`: The identifier of the asset to clear. + May only be called from `T::SpendOrigin`. - Emits `MetadataCleared`. + #### Complexity - Weight: `O(1)` + - O(1). -### create(id: `StagingXcmV4Location`, admin: `MultiAddress`, min_balance: `u128`) -- **interface**: `api.tx.foreignAssets.create` -- **summary**: Issue a new class of fungible assets from a public origin. +### unassignCurator(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.unassignCurator` +- **summary**: Unassign curator from a bounty. - This new asset class has no assets initially and its owner is the origin. + This function can only be called by the `RejectOrigin` a signed origin. - The origin must conform to the configured `CreateOrigin` and have sufficient funds free. + If this function is called by the `RejectOrigin`, we assume that the curator is malicious or inactive. As a result, we will slash the curator when possible. - Funds of sender are reserved by `AssetDeposit`. + If the origin is the curator, we take this as a sign they are unable to do their job and they willingly give up. We could slash them, but for now we allow them to recover their deposit and exit without issue. (We may want to change this if it is abused.) - Parameters: + Finally, the origin can be anyone if and only if the curator is "inactive". This allows anyone in the community to call out that a curator is not doing their due diligence, and we should pick a new curator. In this case the curator should also be slashed. - - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + #### Complexity - - `admin`: The admin of this class of assets. The admin is the initial address of each member of the asset class's admin team. + - O(1). - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. +___ - Emits `Created` event when successful. - Weight: `O(1)` +## childBounties -### destroyAccounts(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.destroyAccounts` -- **summary**: Destroy all accounts associated with a given asset. +### acceptCurator(parent_bounty_id: `Compact`, child_bounty_id: `Compact`) +- **interface**: `api.tx.childBounties.acceptCurator` +- **summary**: Accept the curator role for the child-bounty. - `destroy_accounts` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + The dispatch origin for this call must be the curator of this child-bounty. - Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time. + A deposit will be reserved from the curator and refund upon successful payout or cancellation. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + Fee for curator is deducted from curator fee of parent bounty. - Each call emits the `Event::DestroyedAccounts` event. + Parent bounty must be in active state, for this child-bounty call to work. + + Child-bounty must be in "CuratorProposed" state, for processing the call. And state of child-bounty is moved to "Active" on successful call completion. + + - `parent_bounty_id`: Index of parent bounty. + + - `child_bounty_id`: Index of child bounty. -### destroyApprovals(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.destroyApprovals` -- **summary**: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit). +### addChildBounty(parent_bounty_id: `Compact`, value: `Compact`, description: `Bytes`) +- **interface**: `api.tx.childBounties.addChildBounty` +- **summary**: Add a new child-bounty. - `destroy_approvals` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + The dispatch origin for this call must be the curator of parent bounty and the parent bounty must be in "active" state. - Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time. + Child-bounty gets added successfully & fund gets transferred from parent bounty to child-bounty account, if parent bounty has enough funds, else the call fails. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + Upper bound to maximum number of active child bounties that can be added are managed via runtime trait config [`Config::MaxActiveChildBountyCount`]. - Each call emits the `Event::DestroyedApprovals` event. - -### finishDestroy(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.finishDestroy` -- **summary**: Complete destroying asset and unreserve currency. + If the call is success, the status of child-bounty is updated to "Added". - `finish_destroy` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. All accounts or approvals should be destroyed before hand. + - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + - `value`: Value for executing the proposal. - Each successful call emits the `Event::Destroyed` event. + - `description`: Text description for the child-bounty. -### forceAssetStatus(id: `StagingXcmV4Location`, owner: `MultiAddress`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`, min_balance: `Compact`, is_sufficient: `bool`, is_frozen: `bool`) -- **interface**: `api.tx.foreignAssets.forceAssetStatus` -- **summary**: Alter the attributes of a given asset. +### awardChildBounty(parent_bounty_id: `Compact`, child_bounty_id: `Compact`, beneficiary: `MultiAddress`) +- **interface**: `api.tx.childBounties.awardChildBounty` +- **summary**: Award child-bounty to a beneficiary. - Origin must be `ForceOrigin`. + The beneficiary will be able to claim the funds after a delay. - - `id`: The identifier of the asset. + The dispatch origin for this call must be the parent curator or curator of this child-bounty. - - `owner`: The new Owner of this asset. + Parent bounty must be in active state, for this child-bounty call to work. - - `issuer`: The new Issuer of this asset. + Child-bounty must be in active state, for processing the call. And state of child-bounty is moved to "PendingPayout" on successful call completion. - - `admin`: The new Admin of this asset. + - `parent_bounty_id`: Index of parent bounty. - - `freezer`: The new Freezer of this asset. + - `child_bounty_id`: Index of child bounty. - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + - `beneficiary`: Beneficiary account. + +### claimChildBounty(parent_bounty_id: `Compact`, child_bounty_id: `Compact`) +- **interface**: `api.tx.childBounties.claimChildBounty` +- **summary**: Claim the payout from an awarded child-bounty after payout delay. - - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient value to account for the state bloat associated with its balance storage. If set to `true`, then non-zero balances may be stored without a `consumer` reference (and thus an ED in the Balances pallet or whatever else is used to control user-account state growth). + The dispatch origin for this call may be any signed origin. - - `is_frozen`: Whether this asset class is frozen except for permissioned/admin instructions. + Call works independent of parent bounty state, No need for parent bounty to be in active state. - Emits `AssetStatusChanged` with the identity of the asset. + The Beneficiary is paid out with agreed bounty value. Curator fee is paid & curator deposit is unreserved. - Weight: `O(1)` + Child-bounty must be in "PendingPayout" state, for processing the call. And instance of child-bounty is removed from the state on successful call completion. + + - `parent_bounty_id`: Index of parent bounty. + + - `child_bounty_id`: Index of child bounty. -### forceCancelApproval(id: `StagingXcmV4Location`, owner: `MultiAddress`, delegate: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.forceCancelApproval` -- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. +### closeChildBounty(parent_bounty_id: `Compact`, child_bounty_id: `Compact`) +- **interface**: `api.tx.childBounties.closeChildBounty` +- **summary**: Cancel a proposed or active child-bounty. Child-bounty account funds are transferred to parent bounty account. The child-bounty curator deposit may be unreserved if possible. - Origin must be either ForceOrigin or Signed origin with the signer being the Admin account of the asset `id`. + The dispatch origin for this call must be either parent curator or `T::RejectOrigin`. - Unreserves any deposit previously reserved by `approve_transfer` for the approval. + If the state of child-bounty is `Active`, curator deposit is unreserved. - - `id`: The identifier of the asset. + If the state of child-bounty is `PendingPayout`, call fails & returns `PendingPayout` error. - - `delegate`: The account delegated permission to transfer asset. + For the origin other than T::RejectOrigin, parent bounty must be in active state, for this child-bounty call to work. For origin T::RejectOrigin execution is forced. - Emits `ApprovalCancelled` on success. + Instance of child-bounty is removed from the state on successful call completion. - Weight: `O(1)` + - `parent_bounty_id`: Index of parent bounty. + + - `child_bounty_id`: Index of child bounty. -### forceClearMetadata(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.forceClearMetadata` -- **summary**: Clear the metadata for an asset. +### proposeCurator(parent_bounty_id: `Compact`, child_bounty_id: `Compact`, curator: `MultiAddress`, fee: `Compact`) +- **interface**: `api.tx.childBounties.proposeCurator` +- **summary**: Propose curator for funded child-bounty. - Origin must be ForceOrigin. + The dispatch origin for this call must be curator of parent bounty. - Any deposit is returned. + Parent bounty must be in active state, for this child-bounty call to work. - - `id`: The identifier of the asset to clear. + Child-bounty must be in "Added" state, for processing the call. And state of child-bounty is moved to "CuratorProposed" on successful call completion. - Emits `MetadataCleared`. + - `parent_bounty_id`: Index of parent bounty. - Weight: `O(1)` + - `child_bounty_id`: Index of child bounty. + + - `curator`: Address of child-bounty curator. + + - `fee`: payment fee to child-bounty curator for execution. -### forceCreate(id: `StagingXcmV4Location`, owner: `MultiAddress`, is_sufficient: `bool`, min_balance: `Compact`) -- **interface**: `api.tx.foreignAssets.forceCreate` -- **summary**: Issue a new class of fungible assets from a privileged origin. +### unassignCurator(parent_bounty_id: `Compact`, child_bounty_id: `Compact`) +- **interface**: `api.tx.childBounties.unassignCurator` +- **summary**: Unassign curator from a child-bounty. - This new asset class has no assets initially. + The dispatch origin for this call can be either `RejectOrigin`, or the curator of the parent bounty, or any signed origin. - The origin must conform to `ForceOrigin`. + For the origin other than T::RejectOrigin and the child-bounty curator, parent bounty must be in active state, for this call to work. We allow child-bounty curator and T::RejectOrigin to execute this call irrespective of the parent bounty state. - Unlike `create`, no funds are reserved. + If this function is called by the `RejectOrigin` or the parent bounty curator, we assume that the child-bounty curator is malicious or inactive. As a result, child-bounty curator deposit is slashed. - - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + If the origin is the child-bounty curator, we take this as a sign that they are unable to do their job, and are willingly giving up. We could slash the deposit, but for now we allow them to unreserve their deposit and exit without issue. (We may want to change this if it is abused.) - - `owner`: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions using `transfer_ownership` and `set_team`. + Finally, the origin can be anyone iff the child-bounty curator is "inactive". Expiry update due of parent bounty is used to estimate inactive state of child-bounty curator. - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + This allows anyone in the community to call out that a child-bounty curator is not doing their due diligence, and we should pick a new one. In this case the child-bounty curator deposit is slashed. - Emits `ForceCreated` event when successful. + State of child-bounty is moved to Added state on successful call completion. - Weight: `O(1)` - -### forceSetMetadata(id: `StagingXcmV4Location`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`, is_frozen: `bool`) -- **interface**: `api.tx.foreignAssets.forceSetMetadata` -- **summary**: Force the metadata for an asset to some value. + - `parent_bounty_id`: Index of parent bounty. - Origin must be ForceOrigin. + - `child_bounty_id`: Index of child bounty. - Any deposit is left alone. +___ - - `id`: The identifier of the asset to update. - - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. +## claims + +### attest(statement: `Bytes`) +- **interface**: `api.tx.claims.attest` +- **summary**: Attest to a statement, needed to finalize the claims process. - - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. + WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `TransactionExtension`. - - `decimals`: The number of decimals this asset uses to represent one unit. + Unsigned Validation: A call to attest is deemed valid if the sender has a `Preclaim` registered and provides a `statement` which is expected for the account. - Emits `MetadataSet`. + Parameters: - Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. + - `statement`: The identity of the statement which is being attested to in the signature. + + -### forceTransfer(id: `StagingXcmV4Location`, source: `MultiAddress`, dest: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.forceTransfer` -- **summary**: Move some assets from one account to another. +### claim(dest: `AccountId32`, ethereum_signature: `PolkadotRuntimeCommonClaimsEcdsaSignature`) +- **interface**: `api.tx.claims.claim` +- **summary**: Make a claim to collect your DOTs. - Origin must be Signed and the sender should be the Admin of the asset `id`. + The dispatch origin for this call must be _None_. - - `id`: The identifier of the asset to have some amount transferred. + Unsigned Validation: A call to claim is deemed valid if the signature provided matches the expected signed message of: - - `source`: The account to be debited. + > Ethereum Signed Message: > (configured prefix string)(address) - - `dest`: The account to be credited. + and `address` matches the `dest` account. - - `amount`: The amount by which the `source`'s balance of assets should be reduced and `dest`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the `source` balance above zero but below the minimum balance. Must be greater than zero. + Parameters: - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + - `dest`: The destination account to payout the claim. - Weight: `O(1)` Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of `dest`. + - `ethereum_signature`: The signature of an ethereum signed message matching the format described above. + + -### freeze(id: `StagingXcmV4Location`, who: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.freeze` -- **summary**: Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` must already exist as an entry in `Account`s of the asset. If you want to freeze an account that does not have an entry, use `touch_other` first. +### claimAttest(dest: `AccountId32`, ethereum_signature: `PolkadotRuntimeCommonClaimsEcdsaSignature`, statement: `Bytes`) +- **interface**: `api.tx.claims.claimAttest` +- **summary**: Make a claim to collect your DOTs by signing a statement. - Origin must be Signed and the sender should be the Freezer of the asset `id`. + The dispatch origin for this call must be _None_. - - `id`: The identifier of the asset to be frozen. + Unsigned Validation: A call to `claim_attest` is deemed valid if the signature provided matches the expected signed message of: - - `who`: The account to be frozen. + > Ethereum Signed Message: > (configured prefix string)(address)(statement) - Emits `Frozen`. + and `address` matches the `dest` account; the `statement` must match that which is expected according to your purchase arrangement. - Weight: `O(1)` - -### freezeAsset(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.freezeAsset` -- **summary**: Disallow further unprivileged transfers for the asset class. + Parameters: - Origin must be Signed and the sender should be the Freezer of the asset `id`. + - `dest`: The destination account to payout the claim. - - `id`: The identifier of the asset to be frozen. + - `ethereum_signature`: The signature of an ethereum signed message matching the format described above. - Emits `Frozen`. + - `statement`: The identity of the statement which is being attested to in the signature. - Weight: `O(1)` + -### mint(id: `StagingXcmV4Location`, beneficiary: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.mint` -- **summary**: Mint assets of a particular class. +### mintClaim(who: `EthereumAddress`, value: `u128`, vesting_schedule: `Option<(u128,u128,u32)>`, statement: `Option`) +- **interface**: `api.tx.claims.mintClaim` +- **summary**: Mint a new claim to collect DOTs. - The origin must be Signed and the sender must be the Issuer of the asset `id`. + The dispatch origin for this call must be _Root_. - - `id`: The identifier of the asset to have some amount minted. + Parameters: - - `beneficiary`: The account to be credited with the minted assets. + - `who`: The Ethereum address allowed to collect this claim. - - `amount`: The amount of the asset to be minted. + - `value`: The number of DOTs that will be claimed. - Emits `Issued` event when successful. + - `vesting_schedule`: An optional vesting schedule for these DOTs. - Weight: `O(1)` Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. + -### refund(id: `StagingXcmV4Location`, allow_burn: `bool`) -- **interface**: `api.tx.foreignAssets.refund` -- **summary**: Return the deposit (if any) of an asset account or a consumer reference (if any) of an account. +### moveClaim(old: `EthereumAddress`, new: `EthereumAddress`, maybe_preclaim: `Option`) +- **interface**: `api.tx.claims.moveClaim` - The origin must be Signed. - - - `id`: The identifier of the asset for which the caller would like the deposit refunded. +___ - - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund. - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. +## collatorSelection + +### addInvulnerable(who: `AccountId32`) +- **interface**: `api.tx.collatorSelection.addInvulnerable` +- **summary**: Add a new account `who` to the list of `Invulnerables` collators. `who` must have registered session keys. If `who` is a candidate, they will be removed. - Emits `Refunded` event when successful. + The origin for this call must be the `UpdateOrigin`. -### refundOther(id: `StagingXcmV4Location`, who: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.refundOther` -- **summary**: Return the deposit (if any) of a target asset account. Useful if you are the depositor. +### leaveIntent() +- **interface**: `api.tx.collatorSelection.leaveIntent` +- **summary**: Deregister `origin` as a collator candidate. Note that the collator can only leave on session change. The `CandidacyBond` will be unreserved immediately. - The origin must be Signed and either the account owner, depositor, or asset `Admin`. In order to burn a non-zero balance of the asset, the caller must be the account and should use `refund`. + This call will fail if the total number of candidates would drop below `MinEligibleCollators`. + +### registerAsCandidate() +- **interface**: `api.tx.collatorSelection.registerAsCandidate` +- **summary**: Register this account as a collator candidate. The account must (a) already have registered session keys and (b) be able to reserve the `CandidacyBond`. - - `id`: The identifier of the asset for the account holding a deposit. + This call is not available to `Invulnerable` collators. + +### removeInvulnerable(who: `AccountId32`) +- **interface**: `api.tx.collatorSelection.removeInvulnerable` +- **summary**: Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must be sorted. - - `who`: The account to refund. + The origin for this call must be the `UpdateOrigin`. + +### setCandidacyBond(bond: `u128`) +- **interface**: `api.tx.collatorSelection.setCandidacyBond` +- **summary**: Set the candidacy bond amount. - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. + If the candidacy bond is increased by this call, all current candidates which have a deposit lower than the new bond will be kicked from the list and get their deposits back. - Emits `Refunded` event when successful. + The origin for this call must be the `UpdateOrigin`. -### setMetadata(id: `StagingXcmV4Location`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`) -- **interface**: `api.tx.foreignAssets.setMetadata` -- **summary**: Set the metadata for an asset. +### setDesiredCandidates(max: `u32`) +- **interface**: `api.tx.collatorSelection.setDesiredCandidates` +- **summary**: Set the ideal number of non-invulnerable collators. If lowering this number, then the number of running collators could be higher than this figure. Aside from that edge case, there should be no other way to have more candidates than the desired number. - Origin must be Signed and the sender should be the Owner of the asset `id`. + The origin for this call must be the `UpdateOrigin`. + +### setInvulnerables(new: `Vec`) +- **interface**: `api.tx.collatorSelection.setInvulnerables` +- **summary**: Set the list of invulnerable (fixed) collators. These collators must do some preparation, namely to have registered session keys. - Funds of sender are reserved according to the formula: `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into account any already reserved funds. + The call will remove any accounts that have not registered keys from the set. That is, it is non-atomic; the caller accepts all `AccountId`s passed in `new` _individually_ as acceptable Invulnerables, and is not proposing a _set_ of new Invulnerables. - - `id`: The identifier of the asset to update. + This call does not maintain mutual exclusivity of `Invulnerables` and `Candidates`. It is recommended to use a batch of `add_invulnerable` and `remove_invulnerable` instead. A `batch_all` can also be used to enforce atomicity. If any candidates are included in `new`, they should be removed with `remove_invulnerable_candidate` after execution. - - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. + Must be called by the `UpdateOrigin`. + +### takeCandidateSlot(deposit: `u128`, target: `AccountId32`) +- **interface**: `api.tx.collatorSelection.takeCandidateSlot` +- **summary**: The caller `origin` replaces a candidate `target` in the collator candidate list by reserving `deposit`. The amount `deposit` reserved by the caller must be greater than the existing bond of the target it is trying to replace. - - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. + This call will fail if the caller is already a collator candidate or invulnerable, the caller does not have registered session keys, the target is not a collator candidate, and/or the `deposit` amount cannot be reserved. + +### updateBond(new_deposit: `u128`) +- **interface**: `api.tx.collatorSelection.updateBond` +- **summary**: Update the candidacy bond of collator candidate `origin` to a new amount `new_deposit`. - - `decimals`: The number of decimals this asset uses to represent one unit. + Setting a `new_deposit` that is lower than the current deposit while `origin` is occupying a top-`DesiredCandidates` slot is not allowed. - Emits `MetadataSet`. + This call will fail if `origin` is not a collator candidate, the updated bond is lower than the minimum candidacy bond, and/or the amount cannot be reserved. - Weight: `O(1)` - -### setMinBalance(id: `StagingXcmV4Location`, min_balance: `u128`) -- **interface**: `api.tx.foreignAssets.setMinBalance` -- **summary**: Sets the minimum balance of an asset. +___ - Only works if there aren't any accounts that are holding the asset or if the new value of `min_balance` is less than the old one. - Origin must be Signed and the sender has to be the Owner of the asset `id`. +## convictionVoting + +### delegate(class: `u16`, to: `MultiAddress`, conviction: `PalletConvictionVotingConviction`, balance: `u128`) +- **interface**: `api.tx.convictionVoting.delegate` +- **summary**: Delegate the voting power (with some given conviction) of the sending account for a particular class of polls. - - `id`: The identifier of the asset. + The balance delegated is locked for as long as it's delegated, and thereafter for the time appropriate for the conviction's lock period. - - `min_balance`: The new value of `min_balance`. + The dispatch origin of this call must be _Signed_, and the signing account must either: - Emits `AssetMinBalanceChanged` event when successful. - -### setTeam(id: `StagingXcmV4Location`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.setTeam` -- **summary**: Change the Issuer, Admin and Freezer of an asset. + - be delegating already; or - Origin must be Signed and the sender should be the Owner of the asset `id`. + - have no voting activity (if there is, then it will need to be removed through `remove_vote`). - - `id`: The identifier of the asset to be frozen. + - `to`: The account whose voting the `target` account's voting power will follow. - - `issuer`: The new Issuer of this asset. + - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls to this function are required. - - `admin`: The new Admin of this asset. + - `conviction`: The conviction that will be attached to the delegated votes. When the account is undelegated, the funds will be locked for the corresponding period. - - `freezer`: The new Freezer of this asset. + - `balance`: The amount of the account's balance to be used in delegating. This must not be more than the account's current balance. - Emits `TeamChanged`. + Emits `Delegated`. - Weight: `O(1)` + Weight: `O(R)` where R is the number of polls the voter delegating to has voted on. Weight is initially charged as if maximum votes, but is refunded later. -### startDestroy(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.startDestroy` -- **summary**: Start the process of destroying a fungible asset class. +### removeOtherVote(target: `MultiAddress`, class: `u16`, index: `u32`) +- **interface**: `api.tx.convictionVoting.removeOtherVote` +- **summary**: Remove a vote for a poll. - `start_destroy` is the first in a series of extrinsics that should be called, to allow destruction of an asset class. + If the `target` is equal to the signer, then this function is exactly equivalent to `remove_vote`. If not equal to the signer, then the vote must have expired, either because the poll was cancelled, because the voter lost the poll or because the conviction period is over. - The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`. + The dispatch origin of this call must be _Signed_. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + - `target`: The account of the vote to be removed; this account must have voted for poll `index`. - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if an account contains holds or freezes in place. - -### thaw(id: `StagingXcmV4Location`, who: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.thaw` -- **summary**: Allow unprivileged transfers to and from an account again. + - `index`: The index of poll of the vote to be removed. - Origin must be Signed and the sender should be the Admin of the asset `id`. + - `class`: The class of the poll. - - `id`: The identifier of the asset to be frozen. + Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. Weight is calculated for the maximum number of vote. + +### removeVote(class: `Option`, index: `u32`) +- **interface**: `api.tx.convictionVoting.removeVote` +- **summary**: Remove a vote for a poll. - - `who`: The account to be unfrozen. + If: - Emits `Thawed`. + - the poll was cancelled, or - Weight: `O(1)` - -### thawAsset(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.thawAsset` -- **summary**: Allow unprivileged transfers for the asset again. + - the poll is ongoing, or - Origin must be Signed and the sender should be the Admin of the asset `id`. + - the poll has ended such that - - `id`: The identifier of the asset to be thawed. + - the vote of the account was in opposition to the result; or - Emits `Thawed`. + - there was no conviction to the account's vote; or - Weight: `O(1)` - -### touch(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.touch` -- **summary**: Create an asset account for non-provider assets. + - the account made a split vote ...then the vote is removed cleanly and a following call to `unlock` may result in more funds being available. - A deposit will be taken from the signer account. + If, however, the poll has ended and: - - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit to be taken. + - it finished corresponding to the vote of the account, and - - `id`: The identifier of the asset for the account to be created. + - the account made a standard vote with conviction, and - Emits `Touched` event when successful. - -### touchOther(id: `StagingXcmV4Location`, who: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.touchOther` -- **summary**: Create an asset account for `who`. + - the lock period of the conviction is not over ...then the lock will be aggregated into the overall account's lock, which may involve - A deposit will be taken from the signer account. + *overlocking* (where the two locks are combined into a single lock that is the maximum of both the amount locked and the time is it locked for). - - `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account must have sufficient funds for a deposit to be taken. + The dispatch origin of this call must be _Signed_, and the signer must have a vote registered for poll `index`. - - `id`: The identifier of the asset for the account to be created. + - `index`: The index of poll of the vote to be removed. - - `who`: The account to be created. + - `class`: Optional parameter, if given it indicates the class of the poll. For polls which have finished or are cancelled, this must be `Some`. - Emits `Touched` event when successful. + Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. Weight is calculated for the maximum number of vote. -### transfer(id: `StagingXcmV4Location`, target: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.transfer` -- **summary**: Move some assets from the sender account to another. - - Origin must be Signed. +### undelegate(class: `u16`) +- **interface**: `api.tx.convictionVoting.undelegate` +- **summary**: Undelegate the voting power of the sending account for a particular class of polls. - - `id`: The identifier of the asset to have some amount transferred. + Tokens may be unlocked following once an amount of time consistent with the lock period of the conviction with which the delegation was issued has passed. - - `target`: The account to be credited. + The dispatch origin of this call must be _Signed_ and the signing account must be currently delegating. - - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. + - `class`: The class of polls to remove the delegation from. - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + Emits `Undelegated`. - Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. + Weight: `O(R)` where R is the number of polls the voter delegating to has voted on. Weight is initially charged as if maximum votes, but is refunded later. -### transferAll(id: `StagingXcmV4Location`, dest: `MultiAddress`, keep_alive: `bool`) -- **interface**: `api.tx.foreignAssets.transferAll` -- **summary**: Transfer the entire transferable balance from the caller asset account. +### unlock(class: `u16`, target: `MultiAddress`) +- **interface**: `api.tx.convictionVoting.unlock` +- **summary**: Remove the lock caused by prior voting/delegating which has expired within a particular class. - NOTE: This function only attempts to transfer _transferable_ balances. This means that any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... - - The dispatch origin of this call must be Signed. + The dispatch origin of this call must be _Signed_. - - `id`: The identifier of the asset for the account holding a deposit. + - `class`: The class of polls to unlock. - - `dest`: The recipient of the transfer. + - `target`: The account to remove the lock on. - - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the asset account has, causing the sender asset account to be killed (false), or transfer everything except at least the minimum balance, which will guarantee to keep the sender asset account alive (true). + Weight: `O(R)` with R number of vote of target. -### transferApproved(id: `StagingXcmV4Location`, owner: `MultiAddress`, destination: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.transferApproved` -- **summary**: Transfer some asset balance from a previously delegated account to some third-party account. +### vote(poll_index: `Compact`, vote: `PalletConvictionVotingVoteAccountVote`) +- **interface**: `api.tx.convictionVoting.vote` +- **summary**: Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; otherwise it is a vote to keep the status quo. - Origin must be Signed and there must be an approval in place by the `owner` to the signer. + The dispatch origin of this call must be _Signed_. - If the entire amount approved for transfer is transferred, then any deposit previously reserved by `approve_transfer` is unreserved. + - `poll_index`: The index of the poll to vote for. - - `id`: The identifier of the asset. + - `vote`: The vote configuration. - - `owner`: The account which previously approved for a transfer of at least `amount` and from which the asset balance will be withdrawn. + Weight: `O(R)` where R is the number of polls the voter has voted on. - - `destination`: The account to which the asset balance of `amount` will be transferred. +___ - - `amount`: The amount of assets to transfer. - Emits `TransferredApproved` on success. +## cumulusXcm - Weight: `O(1)` +___ + + +## foreignAssets -### transferKeepAlive(id: `StagingXcmV4Location`, target: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.transferKeepAlive` -- **summary**: Move some assets from the sender account to another, keeping the sender account alive. +### approveTransfer(id: `StagingXcmV5Location`, delegate: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.approveTransfer` +- **summary**: Approve an amount of asset for transfer by a delegated third-party account. Origin must be Signed. - - `id`: The identifier of the asset to have some amount transferred. + Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account to `delegate`, then it is topped up or unreserved to meet the right value. - - `target`: The account to be credited. + NOTE: The signing account does not need to own `amount` of assets at the point of making this call. - - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. + - `id`: The identifier of the asset. - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + - `delegate`: The account to delegate permission to transfer asset. - Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. + - `amount`: The amount of asset that may be transferred by `delegate`. If there is already an approval in place, then this acts additively. + + Emits `ApprovedTransfer` on success. + + Weight: `O(1)` -### transferOwnership(id: `StagingXcmV4Location`, owner: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.transferOwnership` -- **summary**: Change the Owner of an asset. +### block(id: `StagingXcmV5Location`, who: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.block` +- **summary**: Disallow further unprivileged transfers of an asset `id` to and from an account `who`. - Origin must be Signed and the sender should be the Owner of the asset `id`. + Origin must be Signed and the sender should be the Freezer of the asset `id`. - - `id`: The identifier of the asset. + - `id`: The identifier of the account's asset. - - `owner`: The new Owner of this asset. + - `who`: The account to be unblocked. - Emits `OwnerChanged`. + Emits `Blocked`. Weight: `O(1)` + +### burn(id: `StagingXcmV5Location`, who: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.burn` +- **summary**: Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. -___ + Origin must be Signed and the sender should be the Manager of the asset `id`. + Bails with `NoAccount` if the `who` is already dead. -## messageQueue - -### executeOverweight(message_origin: `CumulusPrimitivesCoreAggregateMessageOrigin`, page: `u32`, index: `u32`, weight_limit: `SpWeightsWeightV2Weight`) -- **interface**: `api.tx.messageQueue.executeOverweight` -- **summary**: Execute an overweight message. + - `id`: The identifier of the asset to have some amount burned. - Temporary processing errors will be propagated whereas permanent errors are treated as success condition. + - `who`: The account to be debited from. - - `origin`: Must be `Signed`. + - `amount`: The maximum amount by which `who`'s balance should be reduced. - - `message_origin`: The origin from which the message to be executed arrived. + Emits `Burned` with the actual amount burned. If this takes the balance to below the minimum for the asset, then the amount burned is increased to take it to zero. - - `page`: The page in the queue in which the message to be executed is sitting. + Weight: `O(1)` Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. + +### cancelApproval(id: `StagingXcmV5Location`, delegate: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.cancelApproval` +- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. - - `index`: The index into the queue of the message to be executed. + Origin must be Signed and there must be an approval in place between signer and `delegate`. - - `weight_limit`: The maximum amount of weight allowed to be consumed in the execution of the message. + Unreserves any deposit previously reserved by `approve_transfer` for the approval. - Benchmark complexity considerations: O(index + weight_limit). - -### reapPage(message_origin: `CumulusPrimitivesCoreAggregateMessageOrigin`, page_index: `u32`) -- **interface**: `api.tx.messageQueue.reapPage` -- **summary**: Remove a page which has no more messages remaining to be processed or is stale. + - `id`: The identifier of the asset. -___ + - `delegate`: The account delegated permission to transfer asset. + Emits `ApprovalCancelled` on success. -## multisig + Weight: `O(1)` -### approveAsMulti(threshold: `u16`, other_signatories: `Vec`, maybe_timepoint: `Option`, call_hash: `[u8;32]`, max_weight: `SpWeightsWeightV2Weight`) -- **interface**: `api.tx.multisig.approveAsMulti` -- **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. +### clearMetadata(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.clearMetadata` +- **summary**: Clear the metadata for an asset. - Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. + Origin must be Signed and the sender should be the Owner of the asset `id`. - The dispatch origin for this call must be _Signed_. + Any deposit is freed for the asset owner. - - `threshold`: The total number of approvals for this dispatch before it is executed. + - `id`: The identifier of the asset to clear. - - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. + Emits `MetadataCleared`. - - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. + Weight: `O(1)` + +### create(id: `StagingXcmV5Location`, admin: `MultiAddress`, min_balance: `u128`) +- **interface**: `api.tx.foreignAssets.create` +- **summary**: Issue a new class of fungible assets from a public origin. - - `call_hash`: The hash of the call to be executed. + This new asset class has no assets initially and its owner is the origin. - NOTE: If this is the final approval, you will want to use `as_multi` instead. + The origin must conform to the configured `CreateOrigin` and have sufficient funds free. - #### Complexity + Funds of sender are reserved by `AssetDeposit`. - - `O(S)`. + Parameters: - - Up to one balance-reserve or unreserve operation. + - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. - - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + - `admin`: The admin of this class of assets. The admin is the initial address of each member of the asset class's admin team. - - One encode & hash, both of complexity `O(S)`. + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. - - Up to one binary search and insert (`O(logS + S)`). + Emits `Created` event when successful. - - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + Weight: `O(1)` + +### destroyAccounts(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.destroyAccounts` +- **summary**: Destroy all accounts associated with a given asset. - - One event. + `destroy_accounts` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. - - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`. - -### asMulti(threshold: `u16`, other_signatories: `Vec`, maybe_timepoint: `Option`, call: `Call`, max_weight: `SpWeightsWeightV2Weight`) -- **interface**: `api.tx.multisig.asMulti` -- **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. + Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time. - If there are enough, then dispatch the call. + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. - Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. + Each call emits the `Event::DestroyedAccounts` event. + +### destroyApprovals(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.destroyApprovals` +- **summary**: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit). - The dispatch origin for this call must be _Signed_. + `destroy_approvals` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. - - `threshold`: The total number of approvals for this dispatch before it is executed. + Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time. - - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. - - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. + Each call emits the `Event::DestroyedApprovals` event. + +### finishDestroy(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.finishDestroy` +- **summary**: Complete destroying asset and unreserve currency. - - `call`: The call to be executed. + `finish_destroy` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. All accounts or approvals should be destroyed before hand. - NOTE: Unless this is the final approval, you will generally want to use `approve_as_multi` instead, since it only requires a hash of the call. + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. - Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise on success, result is `Ok` and the result from the interior call, if it was executed, may be found in the deposited `MultisigExecuted` event. + Each successful call emits the `Event::Destroyed` event. + +### forceAssetStatus(id: `StagingXcmV5Location`, owner: `MultiAddress`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`, min_balance: `Compact`, is_sufficient: `bool`, is_frozen: `bool`) +- **interface**: `api.tx.foreignAssets.forceAssetStatus` +- **summary**: Alter the attributes of a given asset. - #### Complexity + Origin must be `ForceOrigin`. - - `O(S + Z + Call)`. + - `id`: The identifier of the asset. - - Up to one balance-reserve or unreserve operation. + - `owner`: The new Owner of this asset. - - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + - `issuer`: The new Issuer of this asset. - - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + - `admin`: The new Admin of this asset. - - One encode & hash, both of complexity `O(S)`. + - `freezer`: The new Freezer of this asset. - - Up to one binary search and insert (`O(logS + S)`). + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. - - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient value to account for the state bloat associated with its balance storage. If set to `true`, then non-zero balances may be stored without a `consumer` reference (and thus an ED in the Balances pallet or whatever else is used to control user-account state growth). - - One event. + - `is_frozen`: Whether this asset class is frozen except for permissioned/admin instructions. - - The weight of the `call`. + Emits `AssetStatusChanged` with the identity of the asset. - - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`. + Weight: `O(1)` -### asMultiThreshold1(other_signatories: `Vec`, call: `Call`) -- **interface**: `api.tx.multisig.asMultiThreshold1` -- **summary**: Immediately dispatch a multi-signature call using a single approval from the caller. +### forceCancelApproval(id: `StagingXcmV5Location`, owner: `MultiAddress`, delegate: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.forceCancelApproval` +- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. - The dispatch origin for this call must be _Signed_. + Origin must be either ForceOrigin or Signed origin with the signer being the Admin account of the asset `id`. - - `other_signatories`: The accounts (other than the sender) who are part of the multi-signature, but do not participate in the approval process. + Unreserves any deposit previously reserved by `approve_transfer` for the approval. - - `call`: The call to be executed. + - `id`: The identifier of the asset. - Result is equivalent to the dispatched result. + - `delegate`: The account delegated permission to transfer asset. - #### Complexity O(Z + C) where Z is the length of the call and C its execution weight. + Emits `ApprovalCancelled` on success. + + Weight: `O(1)` -### cancelAsMulti(threshold: `u16`, other_signatories: `Vec`, timepoint: `PalletMultisigTimepoint`, call_hash: `[u8;32]`) -- **interface**: `api.tx.multisig.cancelAsMulti` -- **summary**: Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously for this operation will be unreserved on success. +### forceClearMetadata(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.forceClearMetadata` +- **summary**: Clear the metadata for an asset. - The dispatch origin for this call must be _Signed_. + Origin must be ForceOrigin. - - `threshold`: The total number of approvals for this dispatch before it is executed. + Any deposit is returned. - - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. + - `id`: The identifier of the asset to clear. - - `timepoint`: The timepoint (block number and transaction index) of the first approval transaction for this dispatch. + Emits `MetadataCleared`. - - `call_hash`: The hash of the call to be executed. + Weight: `O(1)` + +### forceCreate(id: `StagingXcmV5Location`, owner: `MultiAddress`, is_sufficient: `bool`, min_balance: `Compact`) +- **interface**: `api.tx.foreignAssets.forceCreate` +- **summary**: Issue a new class of fungible assets from a privileged origin. - #### Complexity + This new asset class has no assets initially. - - `O(S)`. + The origin must conform to `ForceOrigin`. - - Up to one balance-reserve or unreserve operation. + Unlike `create`, no funds are reserved. - - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. - - One encode & hash, both of complexity `O(S)`. + - `owner`: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions using `transfer_ownership` and `set_team`. - - One event. + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. - - I/O: 1 read `O(S)`, one remove. + Emits `ForceCreated` event when successful. - - Storage: removes one item. + Weight: `O(1)` -### pokeDeposit(threshold: `u16`, other_signatories: `Vec`, call_hash: `[u8;32]`) -- **interface**: `api.tx.multisig.pokeDeposit` -- **summary**: Poke the deposit reserved for an existing multisig operation. - - The dispatch origin for this call must be _Signed_ and must be the original depositor of the multisig operation. +### forceSetMetadata(id: `StagingXcmV5Location`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`, is_frozen: `bool`) +- **interface**: `api.tx.foreignAssets.forceSetMetadata` +- **summary**: Force the metadata for an asset to some value. - The transaction fee is waived if the deposit amount has changed. + Origin must be ForceOrigin. - - `threshold`: The total number of approvals needed for this multisig. + Any deposit is left alone. - - `other_signatories`: The accounts (other than the sender) who are part of the multisig. + - `id`: The identifier of the asset to update. - - `call_hash`: The hash of the call this deposit is reserved for. + - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. - Emits `DepositPoked` if successful. + - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. -___ + - `decimals`: The number of decimals this asset uses to represent one unit. + Emits `MetadataSet`. -## nftFractionalization + Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. -### fractionalize(nft_collection_id: `u32`, nft_id: `u32`, asset_id: `u32`, beneficiary: `MultiAddress`, fractions: `u128`) -- **interface**: `api.tx.nftFractionalization.fractionalize` -- **summary**: Lock the NFT and mint a new fungible asset. +### forceTransfer(id: `StagingXcmV5Location`, source: `MultiAddress`, dest: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.forceTransfer` +- **summary**: Move some assets from one account to another. - The dispatch origin for this call must be Signed. The origin must be the owner of the NFT they are trying to lock. + Origin must be Signed and the sender should be the Admin of the asset `id`. - `Deposit` funds of sender are reserved. + - `id`: The identifier of the asset to have some amount transferred. - - `nft_collection_id`: The ID used to identify the collection of the NFT. Is used within the context of `pallet_nfts`. + - `source`: The account to be debited. - - `nft_id`: The ID used to identify the NFT within the given collection. Is used within the context of `pallet_nfts`. + - `dest`: The account to be credited. - - `asset_id`: The ID of the new asset. It must not exist. Is used within the context of `pallet_assets`. - - - `beneficiary`: The account that will receive the newly created asset. + - `amount`: The amount by which the `source`'s balance of assets should be reduced and `dest`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the `source` balance above zero but below the minimum balance. Must be greater than zero. - - `fractions`: The total issuance of the newly created asset class. + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. - Emits `NftFractionalized` event when successful. + Weight: `O(1)` Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of `dest`. -### unify(nft_collection_id: `u32`, nft_id: `u32`, asset_id: `u32`, beneficiary: `MultiAddress`) -- **interface**: `api.tx.nftFractionalization.unify` -- **summary**: Burn the total issuance of the fungible asset and return (unlock) the locked NFT. - - The dispatch origin for this call must be Signed. - - `Deposit` funds will be returned to `asset_creator`. - - - `nft_collection_id`: The ID used to identify the collection of the NFT. Is used within the context of `pallet_nfts`. - - - `nft_id`: The ID used to identify the NFT within the given collection. Is used within the context of `pallet_nfts`. - - - `asset_id`: The ID of the asset being returned and destroyed. Must match the original ID of the created asset, corresponding to the NFT. Is used within the context of `pallet_assets`. +### freeze(id: `StagingXcmV5Location`, who: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.freeze` +- **summary**: Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` must already exist as an entry in `Account`s of the asset. If you want to freeze an account that does not have an entry, use `touch_other` first. - - `beneficiary`: The account that will receive the unified NFT. + Origin must be Signed and the sender should be the Freezer of the asset `id`. - Emits `NftUnified` event when successful. + - `id`: The identifier of the asset to be frozen. -___ + - `who`: The account to be frozen. + Emits `Frozen`. -## nfts + Weight: `O(1)` -### approveItemAttributes(collection: `u32`, item: `u32`, delegate: `MultiAddress`) -- **interface**: `api.tx.nfts.approveItemAttributes` -- **summary**: Approve item's attributes to be changed by a delegated third-party account. - - Origin must be Signed and must be an owner of the `item`. +### freezeAsset(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.freezeAsset` +- **summary**: Disallow further unprivileged transfers for the asset class. - - `collection`: A collection of the item. + Origin must be Signed and the sender should be the Freezer of the asset `id`. - - `item`: The item that holds attributes. + - `id`: The identifier of the asset to be frozen. - - `delegate`: The account to delegate permission to change attributes of the item. + Emits `Frozen`. - Emits `ItemAttributesApprovalAdded` on success. + Weight: `O(1)` -### approveTransfer(collection: `u32`, item: `u32`, delegate: `MultiAddress`, maybe_deadline: `Option`) -- **interface**: `api.tx.nfts.approveTransfer` -- **summary**: Approve an item to be transferred by a delegated third-party account. - - Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the `item`. +### mint(id: `StagingXcmV5Location`, beneficiary: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.mint` +- **summary**: Mint assets of a particular class. - - `collection`: The collection of the item to be approved for delegated transfer. + The origin must be Signed and the sender must be the Issuer of the asset `id`. - - `item`: The item to be approved for delegated transfer. + - `id`: The identifier of the asset to have some amount minted. - - `delegate`: The account to delegate permission to transfer the item. + - `beneficiary`: The account to be credited with the minted assets. - - `maybe_deadline`: Optional deadline for the approval. Specified by providing the number of blocks after which the approval will expire + - `amount`: The amount of the asset to be minted. - Emits `TransferApproved` on success. + Emits `Issued` event when successful. - Weight: `O(1)` + Weight: `O(1)` Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. -### burn(collection: `u32`, item: `u32`) -- **interface**: `api.tx.nfts.burn` -- **summary**: Destroy a single item. +### refund(id: `StagingXcmV5Location`, allow_burn: `bool`) +- **interface**: `api.tx.foreignAssets.refund` +- **summary**: Return the deposit (if any) of an asset account or a consumer reference (if any) of an account. - The origin must conform to `ForceOrigin` or must be Signed and the signing account must be the owner of the `item`. + The origin must be Signed. - - `collection`: The collection of the item to be burned. + - `id`: The identifier of the asset for which the caller would like the deposit refunded. - - `item`: The item to be burned. + - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund. - Emits `Burned`. + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. - Weight: `O(1)` + Emits `Refunded` event when successful. -### buyItem(collection: `u32`, item: `u32`, bid_price: `u128`) -- **interface**: `api.tx.nfts.buyItem` -- **summary**: Allows to buy an item if it's up for sale. +### refundOther(id: `StagingXcmV5Location`, who: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.refundOther` +- **summary**: Return the deposit (if any) of a target asset account. Useful if you are the depositor. - Origin must be Signed and must not be the owner of the `item`. + The origin must be Signed and either the account owner, depositor, or asset `Admin`. In order to burn a non-zero balance of the asset, the caller must be the account and should use `refund`. - - `collection`: The collection of the item. + - `id`: The identifier of the asset for the account holding a deposit. - - `item`: The item the sender wants to buy. + - `who`: The account to refund. - - `bid_price`: The price the sender is willing to pay. + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. - Emits `ItemBought` on success. + Emits `Refunded` event when successful. -### cancelApproval(collection: `u32`, item: `u32`, delegate: `MultiAddress`) -- **interface**: `api.tx.nfts.cancelApproval` -- **summary**: Cancel one of the transfer approvals for a specific item. - - Origin must be either: +### setMetadata(id: `StagingXcmV5Location`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`) +- **interface**: `api.tx.foreignAssets.setMetadata` +- **summary**: Set the metadata for an asset. - - the `Force` origin; + Origin must be Signed and the sender should be the Owner of the asset `id`. - - `Signed` with the signer being the Owner of the `item`; + Funds of sender are reserved according to the formula: `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into account any already reserved funds. - Arguments: + - `id`: The identifier of the asset to update. - - `collection`: The collection of the item of whose approval will be cancelled. + - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. - - `item`: The item of the collection of whose approval will be cancelled. + - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. - - `delegate`: The account that is going to loose their approval. + - `decimals`: The number of decimals this asset uses to represent one unit. - Emits `ApprovalCancelled` on success. + Emits `MetadataSet`. Weight: `O(1)` -### cancelItemAttributesApproval(collection: `u32`, item: `u32`, delegate: `MultiAddress`, witness: `PalletNftsCancelAttributesApprovalWitness`) -- **interface**: `api.tx.nfts.cancelItemAttributesApproval` -- **summary**: Cancel the previously provided approval to change item's attributes. All the previously set attributes by the `delegate` will be removed. +### setMinBalance(id: `StagingXcmV5Location`, min_balance: `u128`) +- **interface**: `api.tx.foreignAssets.setMinBalance` +- **summary**: Sets the minimum balance of an asset. - Origin must be Signed and must be an owner of the `item`. + Only works if there aren't any accounts that are holding the asset or if the new value of `min_balance` is less than the old one. - - `collection`: Collection that the item is contained within. + Origin must be Signed and the sender has to be the Owner of the asset `id`. - - `item`: The item that holds attributes. + - `id`: The identifier of the asset. - - `delegate`: The previously approved account to remove. + - `min_balance`: The new value of `min_balance`. - Emits `ItemAttributesApprovalRemoved` on success. + Emits `AssetMinBalanceChanged` event when successful. -### cancelSwap(offered_collection: `u32`, offered_item: `u32`) -- **interface**: `api.tx.nfts.cancelSwap` -- **summary**: Cancel an atomic swap. +### setTeam(id: `StagingXcmV5Location`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.setTeam` +- **summary**: Change the Issuer, Admin and Freezer of an asset. - Origin must be Signed. Origin must be an owner of the `item` if the deadline hasn't expired. + Origin must be Signed and the sender should be the Owner of the asset `id`. - - `collection`: The collection of the item. + - `id`: The identifier of the asset to be frozen. - - `item`: The item an owner wants to give. + - `issuer`: The new Issuer of this asset. - Emits `SwapCancelled` on success. - -### claimSwap(send_collection: `u32`, send_item: `u32`, receive_collection: `u32`, receive_item: `u32`, witness_price: `Option`) -- **interface**: `api.tx.nfts.claimSwap` -- **summary**: Claim an atomic swap. This method executes a pending swap, that was created by a counterpart before. + - `admin`: The new Admin of this asset. - Origin must be Signed and must be an owner of the `item`. + - `freezer`: The new Freezer of this asset. - - `send_collection`: The collection of the item to be sent. + Emits `TeamChanged`. - - `send_item`: The item to be sent. + Weight: `O(1)` + +### startDestroy(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.startDestroy` +- **summary**: Start the process of destroying a fungible asset class. - - `receive_collection`: The collection of the item to be received. + `start_destroy` is the first in a series of extrinsics that should be called, to allow destruction of an asset class. - - `receive_item`: The item to be received. + The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`. - - `witness_price`: A price that was previously agreed on. + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. - Emits `SwapClaimed` on success. + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if an account contains holds or freezes in place. -### clearAllTransferApprovals(collection: `u32`, item: `u32`) -- **interface**: `api.tx.nfts.clearAllTransferApprovals` -- **summary**: Cancel all the approvals of a specific item. - - Origin must be either: - - - the `Force` origin; - - - `Signed` with the signer being the Owner of the `item`; +### thaw(id: `StagingXcmV5Location`, who: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.thaw` +- **summary**: Allow unprivileged transfers to and from an account again. - Arguments: + Origin must be Signed and the sender should be the Admin of the asset `id`. - - `collection`: The collection of the item of whose approvals will be cleared. + - `id`: The identifier of the asset to be frozen. - - `item`: The item of the collection of whose approvals will be cleared. + - `who`: The account to be unfrozen. - Emits `AllApprovalsCancelled` on success. + Emits `Thawed`. Weight: `O(1)` -### clearAttribute(collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`) -- **interface**: `api.tx.nfts.clearAttribute` -- **summary**: Clear an attribute for a collection or item. +### thawAsset(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.thawAsset` +- **summary**: Allow unprivileged transfers for the asset again. - Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the attribute. + Origin must be Signed and the sender should be the Admin of the asset `id`. - Any deposit is freed for the collection's owner. + - `id`: The identifier of the asset to be thawed. - - `collection`: The identifier of the collection whose item's metadata to clear. + Emits `Thawed`. - - `maybe_item`: The identifier of the item whose metadata to clear. + Weight: `O(1)` + +### touch(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.touch` +- **summary**: Create an asset account for non-provider assets. - - `namespace`: Attribute's namespace. + A deposit will be taken from the signer account. - - `key`: The key of the attribute. + - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit to be taken. - Emits `AttributeCleared`. + - `id`: The identifier of the asset for the account to be created. - Weight: `O(1)` + Emits `Touched` event when successful. -### clearCollectionMetadata(collection: `u32`) -- **interface**: `api.tx.nfts.clearCollectionMetadata` -- **summary**: Clear the metadata for a collection. +### touchOther(id: `StagingXcmV5Location`, who: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.touchOther` +- **summary**: Create an asset account for `who`. - Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of the `collection`. + A deposit will be taken from the signer account. - Any deposit is freed for the collection's owner. + - `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account must have sufficient funds for a deposit to be taken. - - `collection`: The identifier of the collection whose metadata to clear. + - `id`: The identifier of the asset for the account to be created. - Emits `CollectionMetadataCleared`. + - `who`: The account to be created. - Weight: `O(1)` + Emits `Touched` event when successful. -### clearMetadata(collection: `u32`, item: `u32`) -- **interface**: `api.tx.nfts.clearMetadata` -- **summary**: Clear the metadata for an item. +### transfer(id: `StagingXcmV5Location`, target: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.transfer` +- **summary**: Move some assets from the sender account to another. - Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. + Origin must be Signed. - Any deposit is freed for the collection's owner. + - `id`: The identifier of the asset to have some amount transferred. - - `collection`: The identifier of the collection whose item's metadata to clear. + - `target`: The account to be credited. - - `item`: The identifier of the item whose metadata to clear. + - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. - Emits `ItemMetadataCleared`. + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. - Weight: `O(1)` + Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. -### create(admin: `MultiAddress`, config: `PalletNftsCollectionConfig`) -- **interface**: `api.tx.nfts.create` -- **summary**: Issue a new collection of non-fungible items from a public origin. - - This new collection has no items initially and its owner is the origin. +### transferAll(id: `StagingXcmV5Location`, dest: `MultiAddress`, keep_alive: `bool`) +- **interface**: `api.tx.foreignAssets.transferAll` +- **summary**: Transfer the entire transferable balance from the caller asset account. - The origin must be Signed and the sender must have sufficient funds free. + NOTE: This function only attempts to transfer _transferable_ balances. This means that any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... - `CollectionDeposit` funds of sender are reserved. + The dispatch origin of this call must be Signed. - Parameters: + - `id`: The identifier of the asset for the account holding a deposit. - - `admin`: The admin of this collection. The admin is the initial address of each member of the collection's admin team. + - `dest`: The recipient of the transfer. - Emits `Created` event when successful. - - Weight: `O(1)` + - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the asset account has, causing the sender asset account to be killed (false), or transfer everything except at least the minimum balance, which will guarantee to keep the sender asset account alive (true). -### createSwap(offered_collection: `u32`, offered_item: `u32`, desired_collection: `u32`, maybe_desired_item: `Option`, maybe_price: `Option`, duration: `u32`) -- **interface**: `api.tx.nfts.createSwap` -- **summary**: Register a new atomic swap, declaring an intention to send an `item` in exchange for `desired_item` from origin to target on the current blockchain. The target can execute the swap during the specified `duration` of blocks (if set). Additionally, the price could be set for the desired `item`. +### transferApproved(id: `StagingXcmV5Location`, owner: `MultiAddress`, destination: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.transferApproved` +- **summary**: Transfer some asset balance from a previously delegated account to some third-party account. - Origin must be Signed and must be an owner of the `item`. + Origin must be Signed and there must be an approval in place by the `owner` to the signer. - - `collection`: The collection of the item. + If the entire amount approved for transfer is transferred, then any deposit previously reserved by `approve_transfer` is unreserved. - - `item`: The item an owner wants to give. + - `id`: The identifier of the asset. - - `desired_collection`: The collection of the desired item. + - `owner`: The account which previously approved for a transfer of at least `amount` and from which the asset balance will be withdrawn. - - `desired_item`: The desired item an owner wants to receive. + - `destination`: The account to which the asset balance of `amount` will be transferred. - - `maybe_price`: The price an owner is willing to pay or receive for the desired `item`. + - `amount`: The amount of assets to transfer. - - `duration`: A deadline for the swap. Specified by providing the number of blocks after which the swap will expire. + Emits `TransferredApproved` on success. - Emits `SwapCreated` on success. + Weight: `O(1)` -### destroy(collection: `u32`, witness: `PalletNftsDestroyWitness`) -- **interface**: `api.tx.nfts.destroy` -- **summary**: Destroy a collection of fungible items. - - The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the owner of the `collection`. - - NOTE: The collection must have 0 items to be destroyed. - - - `collection`: The identifier of the collection to be destroyed. +### transferKeepAlive(id: `StagingXcmV5Location`, target: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.transferKeepAlive` +- **summary**: Move some assets from the sender account to another, keeping the sender account alive. - - `witness`: Information on the items minted in the collection. This must be correct. + Origin must be Signed. - Emits `Destroyed` event when successful. + - `id`: The identifier of the asset to have some amount transferred. - Weight: `O(m + c + a)` where: + - `target`: The account to be credited. - - `m = witness.item_metadatas` + - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. - - `c = witness.item_configs` + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. - - `a = witness.attributes` + Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. -### forceCollectionConfig(collection: `u32`, config: `PalletNftsCollectionConfig`) -- **interface**: `api.tx.nfts.forceCollectionConfig` -- **summary**: Change the config of a collection. +### transferOwnership(id: `StagingXcmV5Location`, owner: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.transferOwnership` +- **summary**: Change the Owner of an asset. - Origin must be `ForceOrigin`. + Origin must be Signed and the sender should be the Owner of the asset `id`. - - `collection`: The identifier of the collection. + - `id`: The identifier of the asset. - - `config`: The new config of this collection. + - `owner`: The new Owner of this asset. - Emits `CollectionConfigChanged`. + Emits `OwnerChanged`. Weight: `O(1)` - -### forceCollectionOwner(collection: `u32`, owner: `MultiAddress`) -- **interface**: `api.tx.nfts.forceCollectionOwner` -- **summary**: Change the Owner of a collection. - - Origin must be `ForceOrigin`. - - - `collection`: The identifier of the collection. - - `owner`: The new Owner of this collection. +___ - Emits `OwnerChanged`. - Weight: `O(1)` +## indices -### forceCreate(owner: `MultiAddress`, config: `PalletNftsCollectionConfig`) -- **interface**: `api.tx.nfts.forceCreate` -- **summary**: Issue a new collection of non-fungible items from a privileged origin. +### claim(index: `u32`) +- **interface**: `api.tx.indices.claim` +- **summary**: Assign an previously unassigned index. - This new collection has no items initially. + Payment: `Deposit` is reserved from the sender account. - The origin must conform to `ForceOrigin`. + The dispatch origin for this call must be _Signed_. - Unlike `create`, no funds are reserved. + - `index`: the index to be claimed. This must not be in use. - - `owner`: The owner of this collection of items. The owner has full superuser permissions over this item, but may later change and configure the permissions using `transfer_ownership` and `set_team`. + Emits `IndexAssigned` if successful. - Emits `ForceCreated` event when successful. + #### Complexity - Weight: `O(1)` + - `O(1)`. -### forceMint(collection: `u32`, item: `u32`, mint_to: `MultiAddress`, item_config: `PalletNftsItemConfig`) -- **interface**: `api.tx.nfts.forceMint` -- **summary**: Mint an item of a particular collection from a privileged origin. +### forceTransfer(new: `MultiAddress`, index: `u32`, freeze: `bool`) +- **interface**: `api.tx.indices.forceTransfer` +- **summary**: Force an index to an account. This doesn't require a deposit. If the index is already held, then any deposit is reimbursed to its current owner. - The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the Issuer of the `collection`. + The dispatch origin for this call must be _Root_. - - `collection`: The collection of the item to be minted. + - `index`: the index to be (re-)assigned. - - `item`: An identifier of the new item. + - `new`: the new owner of the index. This function is a no-op if it is equal to sender. - - `mint_to`: Account into which the item will be minted. + - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. - - `item_config`: A config of the new item. + Emits `IndexAssigned` if successful. - Emits `Issued` event when successful. + #### Complexity - Weight: `O(1)` + - `O(1)`. -### forceSetAttribute(set_as: `Option`, collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`, value: `Bytes`) -- **interface**: `api.tx.nfts.forceSetAttribute` -- **summary**: Force-set an attribute for a collection or item. - - Origin must be `ForceOrigin`. - - If the attribute already exists and it was set by another account, the deposit will be returned to the previous owner. - - - `set_as`: An optional owner of the attribute. - - - `collection`: The identifier of the collection whose item's metadata to set. +### free(index: `u32`) +- **interface**: `api.tx.indices.free` +- **summary**: Free up an index owned by the sender. - - `maybe_item`: The identifier of the item whose metadata to set. + Payment: Any previous deposit placed for the index is unreserved in the sender account. - - `namespace`: Attribute's namespace. + The dispatch origin for this call must be _Signed_ and the sender must own the index. - - `key`: The key of the attribute. + - `index`: the index to be freed. This must be owned by the sender. - - `value`: The value to which to set the attribute. + Emits `IndexFreed` if successful. - Emits `AttributeSet`. + #### Complexity - Weight: `O(1)` + - `O(1)`. -### lockCollection(collection: `u32`, lock_settings: `u64`) -- **interface**: `api.tx.nfts.lockCollection` -- **summary**: Disallows specified settings for the whole collection. +### freeze(index: `u32`) +- **interface**: `api.tx.indices.freeze` +- **summary**: Freeze an index so it will always point to the sender account. This consumes the deposit. - Origin must be Signed and the sender should be the Owner of the `collection`. - - - `collection`: The collection to be locked. + The dispatch origin for this call must be _Signed_ and the signing account must have a non-frozen account `index`. - - `lock_settings`: The settings to be locked. + - `index`: the index to be frozen in place. - Note: it's possible to only lock(set) the setting, but not to unset it. + Emits `IndexFrozen` if successful. - Emits `CollectionLocked`. + #### Complexity - Weight: `O(1)` + - `O(1)`. -### lockItemProperties(collection: `u32`, item: `u32`, lock_metadata: `bool`, lock_attributes: `bool`) -- **interface**: `api.tx.nfts.lockItemProperties` -- **summary**: Disallows changing the metadata or attributes of the item. +### pokeDeposit(index: `u32`) +- **interface**: `api.tx.indices.pokeDeposit` +- **summary**: Poke the deposit reserved for an index. - Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. + The dispatch origin for this call must be _Signed_ and the signing account must have a non-frozen account `index`. - - `collection`: The collection if the `item`. + The transaction fees is waived if the deposit is changed after poking/reconsideration. - - `item`: An item to be locked. + - `index`: the index whose deposit is to be poked/reconsidered. - - `lock_metadata`: Specifies whether the metadata should be locked. + Emits `DepositPoked` if successful. + +### transfer(new: `MultiAddress`, index: `u32`) +- **interface**: `api.tx.indices.transfer` +- **summary**: Assign an index already owned by the sender to another account. The balance reservation is effectively transferred to the new account. - - `lock_attributes`: Specifies whether the attributes in the `CollectionOwner` namespace should be locked. + The dispatch origin for this call must be _Signed_. - Note: `lock_attributes` affects the attributes in the `CollectionOwner` namespace only. When the metadata or attributes are locked, it won't be possible the unlock them. + - `index`: the index to be re-assigned. This must be owned by the sender. - Emits `ItemPropertiesLocked`. + - `new`: the new owner of the index. This function is a no-op if it is equal to sender. - Weight: `O(1)` - -### lockItemTransfer(collection: `u32`, item: `u32`) -- **interface**: `api.tx.nfts.lockItemTransfer` -- **summary**: Disallow further unprivileged transfer of an item. + Emits `IndexAssigned` if successful. - Origin must be Signed and the sender should be the Freezer of the `collection`. + #### Complexity - - `collection`: The collection of the item to be changed. + - `O(1)`. - - `item`: The item to become non-transferable. +___ - Emits `ItemTransferLocked`. - Weight: `O(1)` +## messageQueue -### mint(collection: `u32`, item: `u32`, mint_to: `MultiAddress`, witness_data: `Option`) -- **interface**: `api.tx.nfts.mint` -- **summary**: Mint an item of a particular collection. +### executeOverweight(message_origin: `CumulusPrimitivesCoreAggregateMessageOrigin`, page: `u32`, index: `u32`, weight_limit: `SpWeightsWeightV2Weight`) +- **interface**: `api.tx.messageQueue.executeOverweight` +- **summary**: Execute an overweight message. - The origin must be Signed and the sender must comply with the `mint_settings` rules. + Temporary processing errors will be propagated whereas permanent errors are treated as success condition. - - `collection`: The collection of the item to be minted. + - `origin`: Must be `Signed`. - - `item`: An identifier of the new item. + - `message_origin`: The origin from which the message to be executed arrived. - - `mint_to`: Account into which the item will be minted. + - `page`: The page in the queue in which the message to be executed is sitting. - - `witness_data`: When the mint type is `HolderOf(collection_id)`, then the owned item_id from that collection needs to be provided within the witness data object. If the mint price is set, then it should be additionally confirmed in the `witness_data`. + - `index`: The index into the queue of the message to be executed. - Note: the deposit will be taken from the `origin` and not the `owner` of the `item`. + - `weight_limit`: The maximum amount of weight allowed to be consumed in the execution of the message. - Emits `Issued` event when successful. + Benchmark complexity considerations: O(index + weight_limit). + +### reapPage(message_origin: `CumulusPrimitivesCoreAggregateMessageOrigin`, page_index: `u32`) +- **interface**: `api.tx.messageQueue.reapPage` +- **summary**: Remove a page which has no more messages remaining to be processed or is stale. - Weight: `O(1)` +___ + + +## multiBlockElection -### mintPreSigned(mint_data: `PalletNftsPreSignedMint`, signature: `SpRuntimeMultiSignature`, signer: `AccountId32`) -- **interface**: `api.tx.nfts.mintPreSigned` -- **summary**: Mint an item by providing the pre-signed approval. +### manage(op: `PalletElectionProviderMultiBlockAdminOperation`) +- **interface**: `api.tx.multiBlockElection.manage` +- **summary**: Manage this pallet. - Origin must be Signed. + The origin of this call must be [`Config::AdminOrigin`]. - - `mint_data`: The pre-signed approval that consists of the information about the item, its metadata, attributes, who can mint it (`None` for anyone) and until what block number. + See [`AdminOperation`] for various operations that are possible. - - `signature`: The signature of the `data` object. +___ - - `signer`: The `data` object's signer. Should be an Issuer of the collection. - Emits `Issued` on success. Emits `AttributeSet` if the attributes were provided. Emits `ItemMetadataSet` if the metadata was not empty. +## multiBlockElectionSigned -### payTips(tips: `Vec`) -- **interface**: `api.tx.nfts.payTips` -- **summary**: Allows to pay the tips. +### bail() +- **interface**: `api.tx.multiBlockElectionSigned.bail` +- **summary**: Retract a submission. - Origin must be Signed. - - - `tips`: Tips array. + A portion of the deposit may be returned, based on the [`Config::BailoutGraceRatio`]. - Emits `TipSent` on every tip transfer. + This will fully remove the solution from storage. -### redeposit(collection: `u32`, items: `Vec`) -- **interface**: `api.tx.nfts.redeposit` -- **summary**: Re-evaluate the deposits on some items. +### clearOldRoundData(round: `u32`, witness_pages: `u32`) +- **interface**: `api.tx.multiBlockElectionSigned.clearOldRoundData` +- **summary**: Clear the data of a submitter form an old round. - Origin must be Signed and the sender should be the Owner of the `collection`. + The dispatch origin of this call must be signed, and the original submitter. - - `collection`: The collection of the items to be reevaluated. + This can only be called for submissions that end up being discarded, as in they are not processed and they end up lingering in the queue. + +### register(claimed_score: `SpNposElectionsElectionScore`) +- **interface**: `api.tx.multiBlockElectionSigned.register` +- **summary**: Register oneself for an upcoming signed election. + +### setInvulnerables(inv: `Vec`) +- **interface**: `api.tx.multiBlockElectionSigned.setInvulnerables` +- **summary**: Set the invulnerable list. - - `items`: The items of the collection whose deposits will be reevaluated. + Dispatch origin must the the same as [`crate::Config::AdminOrigin`]. + +### submitPage(page: `u32`, maybe_solution: `Option`) +- **interface**: `api.tx.multiBlockElectionSigned.submitPage` +- **summary**: Submit a single page of a solution. - NOTE: This exists as a best-effort function. Any items which are unknown or in the case that the owner account does not have reservable funds to pay for a deposit increase are ignored. Generally the owner isn't going to call this on items whose existing deposit is less than the refreshed deposit as it would only cost them, so it's of little consequence. + Must always come after [`Pallet::register`]. - It will still return an error in the case that the collection is unknown or the signer is not permitted to call it. + `maybe_solution` can be set to `None` to erase the page. - Weight: `O(items.len())` - -### setAcceptOwnership(maybe_collection: `Option`) -- **interface**: `api.tx.nfts.setAcceptOwnership` -- **summary**: Set (or reset) the acceptance of ownership for a particular account. + Collects deposits from the signed origin based on [`Config::DepositBase`] and [`Config::DepositPerPage`]. - Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a provider reference. +___ - - `maybe_collection`: The identifier of the collection whose ownership the signer is willing to accept, or if `None`, an indication that the signer is willing to accept no ownership transferal. - Emits `OwnershipAcceptanceChanged`. +## multiBlockElectionUnsigned -### setAttribute(collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`, value: `Bytes`) -- **interface**: `api.tx.nfts.setAttribute` -- **summary**: Set an attribute for a collection or item. +### submitUnsigned(paged_solution: `PalletElectionProviderMultiBlockPagedRawSolution`) +- **interface**: `api.tx.multiBlockElectionUnsigned.submitUnsigned` +- **summary**: Submit an unsigned solution. - Origin must be Signed and must conform to the namespace ruleset: + This works very much like an inherent, as only the validators are permitted to submit anything. By default validators will compute this call in their `offchain_worker` hook and try and submit it back. - - `CollectionOwner` namespace could be modified by the `collection` Admin only; + This is different from signed page submission mainly in that the solution page is verified on the fly. - - `ItemOwner` namespace could be modified by the `maybe_item` owner only. `maybe_item` should be set in that case; + The `paged_solution` may contain at most [`Config::MinerPages`] pages. They are interpreted as msp -> lsp, as per [`crate::Pallet::msp_range_for`]. - - `Account(AccountId)` namespace could be modified only when the `origin` was given a permission to do so; + For example, if `Pages = 4`, and `MinerPages = 2`, our full snapshot range would be [0, 1, 2, 3], with 3 being msp. But, in this case, then the `paged_raw_solution.pages` is expected to correspond to `[snapshot(2), snapshot(3)]`. - The funds of `origin` are reserved according to the formula: `AttributeDepositBase + DepositPerByte * (key.len + value.len)` taking into account any already reserved funds. +___ - - `collection`: The identifier of the collection whose item's metadata to set. - - `maybe_item`: The identifier of the item whose metadata to set. +## multiBlockElectionVerifier - - `namespace`: Attribute's namespace. +___ - - `key`: The key of the attribute. - - `value`: The value to which to set the attribute. +## multiBlockMigrations + +### clearHistoric(selector: `PalletMigrationsHistoricCleanupSelector`) +- **interface**: `api.tx.multiBlockMigrations.clearHistoric` +- **summary**: Clears the `Historic` set. - Emits `AttributeSet`. + `map_cursor` must be set to the last value that was returned by the `HistoricCleared` event. The first time `None` can be used. `limit` must be chosen in a way that will result in a sensible weight. + +### forceOnboardMbms() +- **interface**: `api.tx.multiBlockMigrations.forceOnboardMbms` +- **summary**: Forces the onboarding of the migrations. - Weight: `O(1)` + This process happens automatically on a runtime upgrade. It is in place as an emergency measurement. The cursor needs to be `None` for this to succeed. -### setAttributesPreSigned(data: `PalletNftsPreSignedAttributes`, signature: `SpRuntimeMultiSignature`, signer: `AccountId32`) -- **interface**: `api.tx.nfts.setAttributesPreSigned` -- **summary**: Set attributes for an item by providing the pre-signed approval. +### forceSetActiveCursor(index: `u32`, inner_cursor: `Option`, started_at: `Option`) +- **interface**: `api.tx.multiBlockMigrations.forceSetActiveCursor` +- **summary**: Allows root to set an active cursor to forcefully start/forward the migration process. - Origin must be Signed and must be an owner of the `data.item`. + This is an edge-case version of [`Self::force_set_cursor`] that allows to set the `started_at` value to the next block number. Otherwise this would not be possible, since `force_set_cursor` takes an absolute block number. Setting `started_at` to `None` indicates that the current block number plus one should be used. + +### forceSetCursor(cursor: `Option`) +- **interface**: `api.tx.multiBlockMigrations.forceSetCursor` +- **summary**: Allows root to set a cursor to forcefully start, stop or forward the migration process. - - `data`: The pre-signed approval that consists of the information about the item, attributes to update and until what block number. + Should normally not be needed and is only in place as emergency measure. Note that restarting the migration process in this manner will not call the [`MigrationStatusHandler::started`] hook or emit an `UpgradeStarted` event. - - `signature`: The signature of the `data` object. +___ - - `signer`: The `data` object's signer. Should be an Admin of the collection for the `CollectionOwner` namespace. - Emits `AttributeSet` for each provided attribute. Emits `ItemAttributesApprovalAdded` if the approval wasn't set before. Emits `PreSignedAttributesSet` on success. +## multisig -### setCollectionMaxSupply(collection: `u32`, max_supply: `u32`) -- **interface**: `api.tx.nfts.setCollectionMaxSupply` -- **summary**: Set the maximum number of items a collection could have. +### approveAsMulti(threshold: `u16`, other_signatories: `Vec`, maybe_timepoint: `Option`, call_hash: `[u8;32]`, max_weight: `SpWeightsWeightV2Weight`) +- **interface**: `api.tx.multisig.approveAsMulti` +- **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. + + Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. + + The dispatch origin for this call must be _Signed_. + + - `threshold`: The total number of approvals for this dispatch before it is executed. + + - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. + + - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. + + - `call_hash`: The hash of the call to be executed. + + NOTE: If this is the final approval, you will want to use `as_multi` instead. + + #### Complexity + + - `O(S)`. + + - Up to one balance-reserve or unreserve operation. + + - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + + - One encode & hash, both of complexity `O(S)`. + + - Up to one binary search and insert (`O(logS + S)`). + + - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + + - One event. + + - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`. + +### asMulti(threshold: `u16`, other_signatories: `Vec`, maybe_timepoint: `Option`, call: `Call`, max_weight: `SpWeightsWeightV2Weight`) +- **interface**: `api.tx.multisig.asMulti` +- **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. + + If there are enough, then dispatch the call. + + Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. + + The dispatch origin for this call must be _Signed_. + + - `threshold`: The total number of approvals for this dispatch before it is executed. + + - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. + + - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. + + - `call`: The call to be executed. + + NOTE: Unless this is the final approval, you will generally want to use `approve_as_multi` instead, since it only requires a hash of the call. + + Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise on success, result is `Ok` and the result from the interior call, if it was executed, may be found in the deposited `MultisigExecuted` event. + + #### Complexity + + - `O(S + Z + Call)`. + + - Up to one balance-reserve or unreserve operation. + + - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + + - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + + - One encode & hash, both of complexity `O(S)`. + + - Up to one binary search and insert (`O(logS + S)`). + + - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + + - One event. + + - The weight of the `call`. + + - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`. + +### asMultiThreshold1(other_signatories: `Vec`, call: `Call`) +- **interface**: `api.tx.multisig.asMultiThreshold1` +- **summary**: Immediately dispatch a multi-signature call using a single approval from the caller. + + The dispatch origin for this call must be _Signed_. + + - `other_signatories`: The accounts (other than the sender) who are part of the multi-signature, but do not participate in the approval process. + + - `call`: The call to be executed. + + Result is equivalent to the dispatched result. + + #### Complexity O(Z + C) where Z is the length of the call and C its execution weight. + +### cancelAsMulti(threshold: `u16`, other_signatories: `Vec`, timepoint: `PalletMultisigTimepoint`, call_hash: `[u8;32]`) +- **interface**: `api.tx.multisig.cancelAsMulti` +- **summary**: Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously for this operation will be unreserved on success. + + The dispatch origin for this call must be _Signed_. + + - `threshold`: The total number of approvals for this dispatch before it is executed. + + - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. + + - `timepoint`: The timepoint (block number and transaction index) of the first approval transaction for this dispatch. + + - `call_hash`: The hash of the call to be executed. + + #### Complexity + + - `O(S)`. + + - Up to one balance-reserve or unreserve operation. + + - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + + - One encode & hash, both of complexity `O(S)`. + + - One event. + + - I/O: 1 read `O(S)`, one remove. + + - Storage: removes one item. + +### pokeDeposit(threshold: `u16`, other_signatories: `Vec`, call_hash: `[u8;32]`) +- **interface**: `api.tx.multisig.pokeDeposit` +- **summary**: Poke the deposit reserved for an existing multisig operation. + + The dispatch origin for this call must be _Signed_ and must be the original depositor of the multisig operation. + + The transaction fee is waived if the deposit amount has changed. + + - `threshold`: The total number of approvals needed for this multisig. + + - `other_signatories`: The accounts (other than the sender) who are part of the multisig. + + - `call_hash`: The hash of the call this deposit is reserved for. + + Emits `DepositPoked` if successful. + +___ + + +## nftFractionalization + +### fractionalize(nft_collection_id: `u32`, nft_id: `u32`, asset_id: `u32`, beneficiary: `MultiAddress`, fractions: `u128`) +- **interface**: `api.tx.nftFractionalization.fractionalize` +- **summary**: Lock the NFT and mint a new fungible asset. + + The dispatch origin for this call must be Signed. The origin must be the owner of the NFT they are trying to lock. + + `Deposit` funds of sender are reserved. + + - `nft_collection_id`: The ID used to identify the collection of the NFT. Is used within the context of `pallet_nfts`. + + - `nft_id`: The ID used to identify the NFT within the given collection. Is used within the context of `pallet_nfts`. + + - `asset_id`: The ID of the new asset. It must not exist. Is used within the context of `pallet_assets`. + + - `beneficiary`: The account that will receive the newly created asset. + + - `fractions`: The total issuance of the newly created asset class. + + Emits `NftFractionalized` event when successful. + +### unify(nft_collection_id: `u32`, nft_id: `u32`, asset_id: `u32`, beneficiary: `MultiAddress`) +- **interface**: `api.tx.nftFractionalization.unify` +- **summary**: Burn the total issuance of the fungible asset and return (unlock) the locked NFT. + + The dispatch origin for this call must be Signed. + + `Deposit` funds will be returned to `asset_creator`. + + - `nft_collection_id`: The ID used to identify the collection of the NFT. Is used within the context of `pallet_nfts`. + + - `nft_id`: The ID used to identify the NFT within the given collection. Is used within the context of `pallet_nfts`. + + - `asset_id`: The ID of the asset being returned and destroyed. Must match the original ID of the created asset, corresponding to the NFT. Is used within the context of `pallet_assets`. + + - `beneficiary`: The account that will receive the unified NFT. + + Emits `NftUnified` event when successful. + +___ + + +## nfts + +### approveItemAttributes(collection: `u32`, item: `u32`, delegate: `MultiAddress`) +- **interface**: `api.tx.nfts.approveItemAttributes` +- **summary**: Approve item's attributes to be changed by a delegated third-party account. + + Origin must be Signed and must be an owner of the `item`. + + - `collection`: A collection of the item. + + - `item`: The item that holds attributes. + + - `delegate`: The account to delegate permission to change attributes of the item. + + Emits `ItemAttributesApprovalAdded` on success. + +### approveTransfer(collection: `u32`, item: `u32`, delegate: `MultiAddress`, maybe_deadline: `Option`) +- **interface**: `api.tx.nfts.approveTransfer` +- **summary**: Approve an item to be transferred by a delegated third-party account. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the `item`. + + - `collection`: The collection of the item to be approved for delegated transfer. + + - `item`: The item to be approved for delegated transfer. + + - `delegate`: The account to delegate permission to transfer the item. + + - `maybe_deadline`: Optional deadline for the approval. Specified by providing the number of blocks after which the approval will expire + + Emits `TransferApproved` on success. + + Weight: `O(1)` + +### burn(collection: `u32`, item: `u32`) +- **interface**: `api.tx.nfts.burn` +- **summary**: Destroy a single item. + + The origin must conform to `ForceOrigin` or must be Signed and the signing account must be the owner of the `item`. + + - `collection`: The collection of the item to be burned. + + - `item`: The item to be burned. + + Emits `Burned`. + + Weight: `O(1)` + +### buyItem(collection: `u32`, item: `u32`, bid_price: `u128`) +- **interface**: `api.tx.nfts.buyItem` +- **summary**: Allows to buy an item if it's up for sale. + + Origin must be Signed and must not be the owner of the `item`. + + - `collection`: The collection of the item. + + - `item`: The item the sender wants to buy. + + - `bid_price`: The price the sender is willing to pay. + + Emits `ItemBought` on success. + +### cancelApproval(collection: `u32`, item: `u32`, delegate: `MultiAddress`) +- **interface**: `api.tx.nfts.cancelApproval` +- **summary**: Cancel one of the transfer approvals for a specific item. + + Origin must be either: + + - the `Force` origin; + + - `Signed` with the signer being the Owner of the `item`; + + Arguments: + + - `collection`: The collection of the item of whose approval will be cancelled. + + - `item`: The item of the collection of whose approval will be cancelled. + + - `delegate`: The account that is going to loose their approval. + + Emits `ApprovalCancelled` on success. + + Weight: `O(1)` + +### cancelItemAttributesApproval(collection: `u32`, item: `u32`, delegate: `MultiAddress`, witness: `PalletNftsCancelAttributesApprovalWitness`) +- **interface**: `api.tx.nfts.cancelItemAttributesApproval` +- **summary**: Cancel the previously provided approval to change item's attributes. All the previously set attributes by the `delegate` will be removed. + + Origin must be Signed and must be an owner of the `item`. + + - `collection`: Collection that the item is contained within. + + - `item`: The item that holds attributes. + + - `delegate`: The previously approved account to remove. + + Emits `ItemAttributesApprovalRemoved` on success. + +### cancelSwap(offered_collection: `u32`, offered_item: `u32`) +- **interface**: `api.tx.nfts.cancelSwap` +- **summary**: Cancel an atomic swap. + + Origin must be Signed. Origin must be an owner of the `item` if the deadline hasn't expired. + + - `collection`: The collection of the item. + + - `item`: The item an owner wants to give. + + Emits `SwapCancelled` on success. + +### claimSwap(send_collection: `u32`, send_item: `u32`, receive_collection: `u32`, receive_item: `u32`, witness_price: `Option`) +- **interface**: `api.tx.nfts.claimSwap` +- **summary**: Claim an atomic swap. This method executes a pending swap, that was created by a counterpart before. + + Origin must be Signed and must be an owner of the `item`. + + - `send_collection`: The collection of the item to be sent. + + - `send_item`: The item to be sent. + + - `receive_collection`: The collection of the item to be received. + + - `receive_item`: The item to be received. + + - `witness_price`: A price that was previously agreed on. + + Emits `SwapClaimed` on success. + +### clearAllTransferApprovals(collection: `u32`, item: `u32`) +- **interface**: `api.tx.nfts.clearAllTransferApprovals` +- **summary**: Cancel all the approvals of a specific item. + + Origin must be either: + + - the `Force` origin; + + - `Signed` with the signer being the Owner of the `item`; + + Arguments: + + - `collection`: The collection of the item of whose approvals will be cleared. + + - `item`: The item of the collection of whose approvals will be cleared. + + Emits `AllApprovalsCancelled` on success. + + Weight: `O(1)` + +### clearAttribute(collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`) +- **interface**: `api.tx.nfts.clearAttribute` +- **summary**: Clear an attribute for a collection or item. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the attribute. + + Any deposit is freed for the collection's owner. + + - `collection`: The identifier of the collection whose item's metadata to clear. + + - `maybe_item`: The identifier of the item whose metadata to clear. + + - `namespace`: Attribute's namespace. + + - `key`: The key of the attribute. + + Emits `AttributeCleared`. + + Weight: `O(1)` + +### clearCollectionMetadata(collection: `u32`) +- **interface**: `api.tx.nfts.clearCollectionMetadata` +- **summary**: Clear the metadata for a collection. + + Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of the `collection`. + + Any deposit is freed for the collection's owner. + + - `collection`: The identifier of the collection whose metadata to clear. + + Emits `CollectionMetadataCleared`. + + Weight: `O(1)` + +### clearMetadata(collection: `u32`, item: `u32`) +- **interface**: `api.tx.nfts.clearMetadata` +- **summary**: Clear the metadata for an item. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. + + Any deposit is freed for the collection's owner. + + - `collection`: The identifier of the collection whose item's metadata to clear. + + - `item`: The identifier of the item whose metadata to clear. + + Emits `ItemMetadataCleared`. + + Weight: `O(1)` + +### create(admin: `MultiAddress`, config: `PalletNftsCollectionConfig`) +- **interface**: `api.tx.nfts.create` +- **summary**: Issue a new collection of non-fungible items from a public origin. + + This new collection has no items initially and its owner is the origin. + + The origin must be Signed and the sender must have sufficient funds free. + + `CollectionDeposit` funds of sender are reserved. + + Parameters: + + - `admin`: The admin of this collection. The admin is the initial address of each member of the collection's admin team. + + Emits `Created` event when successful. + + Weight: `O(1)` + +### createSwap(offered_collection: `u32`, offered_item: `u32`, desired_collection: `u32`, maybe_desired_item: `Option`, maybe_price: `Option`, duration: `u32`) +- **interface**: `api.tx.nfts.createSwap` +- **summary**: Register a new atomic swap, declaring an intention to send an `item` in exchange for `desired_item` from origin to target on the current blockchain. The target can execute the swap during the specified `duration` of blocks (if set). Additionally, the price could be set for the desired `item`. + + Origin must be Signed and must be an owner of the `item`. + + - `collection`: The collection of the item. + + - `item`: The item an owner wants to give. + + - `desired_collection`: The collection of the desired item. + + - `desired_item`: The desired item an owner wants to receive. + + - `maybe_price`: The price an owner is willing to pay or receive for the desired `item`. + + - `duration`: A deadline for the swap. Specified by providing the number of blocks after which the swap will expire. + + Emits `SwapCreated` on success. + +### destroy(collection: `u32`, witness: `PalletNftsDestroyWitness`) +- **interface**: `api.tx.nfts.destroy` +- **summary**: Destroy a collection of fungible items. + + The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the owner of the `collection`. + + NOTE: The collection must have 0 items to be destroyed. + + - `collection`: The identifier of the collection to be destroyed. + + - `witness`: Information on the items minted in the collection. This must be correct. + + Emits `Destroyed` event when successful. + + Weight: `O(m + c + a)` where: + + - `m = witness.item_metadatas` + + - `c = witness.item_configs` + + - `a = witness.attributes` + +### forceCollectionConfig(collection: `u32`, config: `PalletNftsCollectionConfig`) +- **interface**: `api.tx.nfts.forceCollectionConfig` +- **summary**: Change the config of a collection. + + Origin must be `ForceOrigin`. + + - `collection`: The identifier of the collection. + + - `config`: The new config of this collection. + + Emits `CollectionConfigChanged`. + + Weight: `O(1)` + +### forceCollectionOwner(collection: `u32`, owner: `MultiAddress`) +- **interface**: `api.tx.nfts.forceCollectionOwner` +- **summary**: Change the Owner of a collection. + + Origin must be `ForceOrigin`. + + - `collection`: The identifier of the collection. + + - `owner`: The new Owner of this collection. + + Emits `OwnerChanged`. + + Weight: `O(1)` + +### forceCreate(owner: `MultiAddress`, config: `PalletNftsCollectionConfig`) +- **interface**: `api.tx.nfts.forceCreate` +- **summary**: Issue a new collection of non-fungible items from a privileged origin. + + This new collection has no items initially. + + The origin must conform to `ForceOrigin`. + + Unlike `create`, no funds are reserved. + + - `owner`: The owner of this collection of items. The owner has full superuser permissions over this item, but may later change and configure the permissions using `transfer_ownership` and `set_team`. + + Emits `ForceCreated` event when successful. + + Weight: `O(1)` + +### forceMint(collection: `u32`, item: `u32`, mint_to: `MultiAddress`, item_config: `PalletNftsItemConfig`) +- **interface**: `api.tx.nfts.forceMint` +- **summary**: Mint an item of a particular collection from a privileged origin. + + The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the Issuer of the `collection`. + + - `collection`: The collection of the item to be minted. + + - `item`: An identifier of the new item. + + - `mint_to`: Account into which the item will be minted. + + - `item_config`: A config of the new item. + + Emits `Issued` event when successful. + + Weight: `O(1)` + +### forceSetAttribute(set_as: `Option`, collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`, value: `Bytes`) +- **interface**: `api.tx.nfts.forceSetAttribute` +- **summary**: Force-set an attribute for a collection or item. + + Origin must be `ForceOrigin`. + + If the attribute already exists and it was set by another account, the deposit will be returned to the previous owner. + + - `set_as`: An optional owner of the attribute. + + - `collection`: The identifier of the collection whose item's metadata to set. + + - `maybe_item`: The identifier of the item whose metadata to set. + + - `namespace`: Attribute's namespace. + + - `key`: The key of the attribute. + + - `value`: The value to which to set the attribute. + + Emits `AttributeSet`. + + Weight: `O(1)` + +### lockCollection(collection: `u32`, lock_settings: `u64`) +- **interface**: `api.tx.nfts.lockCollection` +- **summary**: Disallows specified settings for the whole collection. + + Origin must be Signed and the sender should be the Owner of the `collection`. + + - `collection`: The collection to be locked. + + - `lock_settings`: The settings to be locked. + + Note: it's possible to only lock(set) the setting, but not to unset it. + + Emits `CollectionLocked`. + + Weight: `O(1)` + +### lockItemProperties(collection: `u32`, item: `u32`, lock_metadata: `bool`, lock_attributes: `bool`) +- **interface**: `api.tx.nfts.lockItemProperties` +- **summary**: Disallows changing the metadata or attributes of the item. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. + + - `collection`: The collection if the `item`. + + - `item`: An item to be locked. + + - `lock_metadata`: Specifies whether the metadata should be locked. + + - `lock_attributes`: Specifies whether the attributes in the `CollectionOwner` namespace should be locked. + + Note: `lock_attributes` affects the attributes in the `CollectionOwner` namespace only. When the metadata or attributes are locked, it won't be possible the unlock them. + + Emits `ItemPropertiesLocked`. + + Weight: `O(1)` + +### lockItemTransfer(collection: `u32`, item: `u32`) +- **interface**: `api.tx.nfts.lockItemTransfer` +- **summary**: Disallow further unprivileged transfer of an item. + + Origin must be Signed and the sender should be the Freezer of the `collection`. + + - `collection`: The collection of the item to be changed. + + - `item`: The item to become non-transferable. + + Emits `ItemTransferLocked`. + + Weight: `O(1)` + +### mint(collection: `u32`, item: `u32`, mint_to: `MultiAddress`, witness_data: `Option`) +- **interface**: `api.tx.nfts.mint` +- **summary**: Mint an item of a particular collection. + + The origin must be Signed and the sender must comply with the `mint_settings` rules. + + - `collection`: The collection of the item to be minted. + + - `item`: An identifier of the new item. + + - `mint_to`: Account into which the item will be minted. + + - `witness_data`: When the mint type is `HolderOf(collection_id)`, then the owned item_id from that collection needs to be provided within the witness data object. If the mint price is set, then it should be additionally confirmed in the `witness_data`. + + Note: the deposit will be taken from the `origin` and not the `owner` of the `item`. + + Emits `Issued` event when successful. + + Weight: `O(1)` + +### mintPreSigned(mint_data: `PalletNftsPreSignedMint`, signature: `SpRuntimeMultiSignature`, signer: `AccountId32`) +- **interface**: `api.tx.nfts.mintPreSigned` +- **summary**: Mint an item by providing the pre-signed approval. + + Origin must be Signed. + + - `mint_data`: The pre-signed approval that consists of the information about the item, its metadata, attributes, who can mint it (`None` for anyone) and until what block number. + + - `signature`: The signature of the `data` object. + + - `signer`: The `data` object's signer. Should be an Issuer of the collection. + + Emits `Issued` on success. Emits `AttributeSet` if the attributes were provided. Emits `ItemMetadataSet` if the metadata was not empty. + +### payTips(tips: `Vec`) +- **interface**: `api.tx.nfts.payTips` +- **summary**: Allows to pay the tips. + + Origin must be Signed. + + - `tips`: Tips array. + + Emits `TipSent` on every tip transfer. + +### redeposit(collection: `u32`, items: `Vec`) +- **interface**: `api.tx.nfts.redeposit` +- **summary**: Re-evaluate the deposits on some items. + + Origin must be Signed and the sender should be the Owner of the `collection`. + + - `collection`: The collection of the items to be reevaluated. + + - `items`: The items of the collection whose deposits will be reevaluated. + + NOTE: This exists as a best-effort function. Any items which are unknown or in the case that the owner account does not have reservable funds to pay for a deposit increase are ignored. Generally the owner isn't going to call this on items whose existing deposit is less than the refreshed deposit as it would only cost them, so it's of little consequence. + + It will still return an error in the case that the collection is unknown or the signer is not permitted to call it. + + Weight: `O(items.len())` + +### setAcceptOwnership(maybe_collection: `Option`) +- **interface**: `api.tx.nfts.setAcceptOwnership` +- **summary**: Set (or reset) the acceptance of ownership for a particular account. + + Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a provider reference. + + - `maybe_collection`: The identifier of the collection whose ownership the signer is willing to accept, or if `None`, an indication that the signer is willing to accept no ownership transferal. + + Emits `OwnershipAcceptanceChanged`. + +### setAttribute(collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`, value: `Bytes`) +- **interface**: `api.tx.nfts.setAttribute` +- **summary**: Set an attribute for a collection or item. + + Origin must be Signed and must conform to the namespace ruleset: + + - `CollectionOwner` namespace could be modified by the `collection` Admin only; + + - `ItemOwner` namespace could be modified by the `maybe_item` owner only. `maybe_item` should be set in that case; + + - `Account(AccountId)` namespace could be modified only when the `origin` was given a permission to do so; + + The funds of `origin` are reserved according to the formula: `AttributeDepositBase + DepositPerByte * (key.len + value.len)` taking into account any already reserved funds. + + - `collection`: The identifier of the collection whose item's metadata to set. + + - `maybe_item`: The identifier of the item whose metadata to set. + + - `namespace`: Attribute's namespace. + + - `key`: The key of the attribute. + + - `value`: The value to which to set the attribute. + + Emits `AttributeSet`. + + Weight: `O(1)` + +### setAttributesPreSigned(data: `PalletNftsPreSignedAttributes`, signature: `SpRuntimeMultiSignature`, signer: `AccountId32`) +- **interface**: `api.tx.nfts.setAttributesPreSigned` +- **summary**: Set attributes for an item by providing the pre-signed approval. + + Origin must be Signed and must be an owner of the `data.item`. + + - `data`: The pre-signed approval that consists of the information about the item, attributes to update and until what block number. + + - `signature`: The signature of the `data` object. + + - `signer`: The `data` object's signer. Should be an Admin of the collection for the `CollectionOwner` namespace. + + Emits `AttributeSet` for each provided attribute. Emits `ItemAttributesApprovalAdded` if the approval wasn't set before. Emits `PreSignedAttributesSet` on success. + +### setCollectionMaxSupply(collection: `u32`, max_supply: `u32`) +- **interface**: `api.tx.nfts.setCollectionMaxSupply` +- **summary**: Set the maximum number of items a collection could have. Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of the `collection`. - - `collection`: The identifier of the collection to change. + - `collection`: The identifier of the collection to change. + + - `max_supply`: The maximum number of items a collection could have. + + Emits `CollectionMaxSupplySet` event when successful. + +### setCollectionMetadata(collection: `u32`, data: `Bytes`) +- **interface**: `api.tx.nfts.setCollectionMetadata` +- **summary**: Set the metadata for a collection. + + Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of the `collection`. + + If the origin is `Signed`, then funds of signer are reserved according to the formula: `MetadataDepositBase + DepositPerByte * data.len` taking into account any already reserved funds. + + - `collection`: The identifier of the item whose metadata to update. + + - `data`: The general information of this item. Limited in length by `StringLimit`. + + Emits `CollectionMetadataSet`. + + Weight: `O(1)` + +### setMetadata(collection: `u32`, item: `u32`, data: `Bytes`) +- **interface**: `api.tx.nfts.setMetadata` +- **summary**: Set the metadata for an item. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. + + If the origin is Signed, then funds of signer are reserved according to the formula: `MetadataDepositBase + DepositPerByte * data.len` taking into account any already reserved funds. + + - `collection`: The identifier of the collection whose item's metadata to set. + + - `item`: The identifier of the item whose metadata to set. + + - `data`: The general information of this item. Limited in length by `StringLimit`. + + Emits `ItemMetadataSet`. + + Weight: `O(1)` + +### setPrice(collection: `u32`, item: `u32`, price: `Option`, whitelisted_buyer: `Option`) +- **interface**: `api.tx.nfts.setPrice` +- **summary**: Set (or reset) the price for an item. + + Origin must be Signed and must be the owner of the `item`. + + - `collection`: The collection of the item. + + - `item`: The item to set the price for. + + - `price`: The price for the item. Pass `None`, to reset the price. + + - `buyer`: Restricts the buy operation to a specific account. + + Emits `ItemPriceSet` on success if the price is not `None`. Emits `ItemPriceRemoved` on success if the price is `None`. + +### setTeam(collection: `u32`, issuer: `Option`, admin: `Option`, freezer: `Option`) +- **interface**: `api.tx.nfts.setTeam` +- **summary**: Change the Issuer, Admin and Freezer of a collection. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the `collection`. + + Note: by setting the role to `None` only the `ForceOrigin` will be able to change it after to `Some(account)`. + + - `collection`: The collection whose team should be changed. + + - `issuer`: The new Issuer of this collection. + + - `admin`: The new Admin of this collection. + + - `freezer`: The new Freezer of this collection. + + Emits `TeamChanged`. + + Weight: `O(1)` + +### transfer(collection: `u32`, item: `u32`, dest: `MultiAddress`) +- **interface**: `api.tx.nfts.transfer` +- **summary**: Move an item from the sender account to another. + + Origin must be Signed and the signing account must be either: + + - the Owner of the `item`; + + - the approved delegate for the `item` (in this case, the approval is reset). + + Arguments: + + - `collection`: The collection of the item to be transferred. + + - `item`: The item to be transferred. + + - `dest`: The account to receive ownership of the item. + + Emits `Transferred`. + + Weight: `O(1)` + +### transferOwnership(collection: `u32`, new_owner: `MultiAddress`) +- **interface**: `api.tx.nfts.transferOwnership` +- **summary**: Change the Owner of a collection. + + Origin must be Signed and the sender should be the Owner of the `collection`. + + - `collection`: The collection whose owner should be changed. + + - `owner`: The new Owner of this collection. They must have called `set_accept_ownership` with `collection` in order for this operation to succeed. + + Emits `OwnerChanged`. + + Weight: `O(1)` + +### unlockItemTransfer(collection: `u32`, item: `u32`) +- **interface**: `api.tx.nfts.unlockItemTransfer` +- **summary**: Re-allow unprivileged transfer of an item. + + Origin must be Signed and the sender should be the Freezer of the `collection`. + + - `collection`: The collection of the item to be changed. + + - `item`: The item to become transferable. + + Emits `ItemTransferUnlocked`. + + Weight: `O(1)` + +### updateMintSettings(collection: `u32`, mint_settings: `PalletNftsMintSettings`) +- **interface**: `api.tx.nfts.updateMintSettings` +- **summary**: Update mint settings. + + Origin must be either `ForceOrigin` or `Signed` and the sender should be the Issuer of the `collection`. + + - `collection`: The identifier of the collection to change. + + - `mint_settings`: The new mint settings. + + Emits `CollectionMintSettingsUpdated` event when successful. + +___ + + +## nominationPools + +### adjustPoolDeposit(pool_id: `u32`) +- **interface**: `api.tx.nominationPools.adjustPoolDeposit` +- **summary**: Top up the deficit or withdraw the excess ED from the pool. + + When a pool is created, the pool depositor transfers ED to the reward account of the pool. ED is subject to change and over time, the deposit in the reward account may be insufficient to cover the ED deficit of the pool or vice-versa where there is excess deposit to the pool. This call allows anyone to adjust the ED deposit of the pool by either topping up the deficit or claiming the excess. + +### applySlash(member_account: `MultiAddress`) +- **interface**: `api.tx.nominationPools.applySlash` +- **summary**: Apply a pending slash on a member. + + Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type: [`adapter::StakeStrategyType::Delegate`]. + + The pending slash amount of the member must be equal or more than `ExistentialDeposit`. This call can be dispatched permissionlessly (i.e. by any account). If the execution is successful, fee is refunded and caller may be rewarded with a part of the slash based on the [`crate::pallet::Config::StakeAdapter`] configuration. + +### bondExtra(extra: `PalletNominationPoolsBondExtra`) +- **interface**: `api.tx.nominationPools.bondExtra` +- **summary**: Bond `extra` more funds from `origin` into the pool to which they already belong. + + Additional funds can come from either the free balance of the account, of from the accumulated rewards, see [`BondExtra`]. + + Bonding extra funds implies an automatic payout of all pending rewards as well. See `bond_extra_other` to bond pending rewards of `other` members. + +### bondExtraOther(member: `MultiAddress`, extra: `PalletNominationPoolsBondExtra`) +- **interface**: `api.tx.nominationPools.bondExtraOther` +- **summary**: `origin` bonds funds from `extra` for some pool member `member` into their respective pools. + + `origin` can bond extra funds from free balance or pending rewards when `origin == other`. + + In the case of `origin != other`, `origin` can only bond extra pending rewards of `other` members assuming set_claim_permission for the given member is `PermissionlessCompound` or `PermissionlessAll`. + +### chill(pool_id: `u32`) +- **interface**: `api.tx.nominationPools.chill` +- **summary**: Chill on behalf of the pool. + + The dispatch origin of this call can be signed by the pool nominator or the pool root role, same as [`Pallet::nominate`]. + + This directly forwards the call to an implementation of `StakingInterface` (e.g., `pallet-staking`) through [`Config::StakeAdapter`], on behalf of the bonded pool. + + Under certain conditions, this call can be dispatched permissionlessly (i.e. by any account). + + #### Conditions for a permissionless dispatch: + + * When pool depositor has less than `MinNominatorBond` staked, otherwise pool members are unable to unbond. + + #### Conditions for permissioned dispatch: + + * The caller is the pool's nominator or root. + +### claimCommission(pool_id: `u32`) +- **interface**: `api.tx.nominationPools.claimCommission` +- **summary**: Claim pending commission. + + The `root` role of the pool is _always_ allowed to claim the pool's commission. + + If the pool has set `CommissionClaimPermission::Permissionless`, then any account can trigger the process of claiming the pool's commission. + + If the pool has set its `CommissionClaimPermission` to `Account(acc)`, then only accounts + + * `acc`, and + + * the pool's root account + + may call this extrinsic on behalf of the pool. + + Pending commissions are paid out and added to the total claimed commission. The total pending commission is reset to zero. + +### claimPayout() +- **interface**: `api.tx.nominationPools.claimPayout` +- **summary**: A bonded member can use this to claim their payout based on the rewards that the pool has accumulated since their last claimed payout (OR since joining if this is their first time claiming rewards). The payout will be transferred to the member's account. + + The member will earn rewards pro rata based on the members stake vs the sum of the members in the pools stake. Rewards do not "expire". + + See `claim_payout_other` to claim rewards on behalf of some `other` pool member. + +### claimPayoutOther(other: `AccountId32`) +- **interface**: `api.tx.nominationPools.claimPayoutOther` +- **summary**: `origin` can claim payouts on some pool member `other`'s behalf. + + Pool member `other` must have a `PermissionlessWithdraw` or `PermissionlessAll` claim permission for this call to be successful. + +### create(amount: `Compact`, root: `MultiAddress`, nominator: `MultiAddress`, bouncer: `MultiAddress`) +- **interface**: `api.tx.nominationPools.create` +- **summary**: Create a new delegation pool. + + #### Arguments + + * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of deposit since the pools creator cannot fully unbond funds until the pool is being destroyed. + + * `index` - A disambiguation index for creating the account. Likely only useful when creating multiple pools in the same extrinsic. + + * `root` - The account to set as [`PoolRoles::root`]. + + * `nominator` - The account to set as the [`PoolRoles::nominator`]. + + * `bouncer` - The account to set as the [`PoolRoles::bouncer`]. + + #### Note + + In addition to `amount`, the caller will transfer the existential deposit; so the caller needs at have at least `amount + existential_deposit` transferable. + +### createWithPoolId(amount: `Compact`, root: `MultiAddress`, nominator: `MultiAddress`, bouncer: `MultiAddress`, pool_id: `u32`) +- **interface**: `api.tx.nominationPools.createWithPoolId` +- **summary**: Create a new delegation pool with a previously used pool id + + #### Arguments + + same as `create` with the inclusion of + + * `pool_id` - `A valid PoolId. + +### join(amount: `Compact`, pool_id: `u32`) +- **interface**: `api.tx.nominationPools.join` +- **summary**: Stake funds with a pool. The amount to bond is delegated (or transferred based on [`adapter::StakeStrategyType`]) from the member to the pool account and immediately increases the pool's bond. + + The method of transferring the amount to the pool account is determined by [`adapter::StakeStrategyType`]. If the pool is configured to use [`adapter::StakeStrategyType::Delegate`], the funds remain in the account of the `origin`, while the pool gains the right to use these funds for staking. + + #### Note + + * An account can only be a member of a single pool. + + * An account cannot join the same pool multiple times. + + * This call will *not* dust the member account, so the member must have at least `existential deposit + amount` in their account. + + * Only a pool with [`PoolState::Open`] can be joined + +### migrateDelegation(member_account: `MultiAddress`) +- **interface**: `api.tx.nominationPools.migrateDelegation` +- **summary**: Migrates delegated funds from the pool account to the `member_account`. + + Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type: [`adapter::StakeStrategyType::Delegate`]. + + This is a permission-less call and refunds any fee if claim is successful. + + If the pool has migrated to delegation based staking, the staked tokens of pool members can be moved and held in their own account. See [`adapter::DelegateStake`] + +### migratePoolToDelegateStake(pool_id: `u32`) +- **interface**: `api.tx.nominationPools.migratePoolToDelegateStake` +- **summary**: Migrate pool from [`adapter::StakeStrategyType::Transfer`] to [`adapter::StakeStrategyType::Delegate`]. + + Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type: [`adapter::StakeStrategyType::Delegate`]. + + This call can be dispatched permissionlessly, and refunds any fee if successful. + + If the pool has already migrated to delegation based staking, this call will fail. + +### nominate(pool_id: `u32`, validators: `Vec`) +- **interface**: `api.tx.nominationPools.nominate` +- **summary**: Nominate on behalf of the pool. + + The dispatch origin of this call must be signed by the pool nominator or the pool root role. + + This directly forwards the call to an implementation of `StakingInterface` (e.g., `pallet-staking`) through [`Config::StakeAdapter`], on behalf of the bonded pool. + + #### Note + + In addition to a `root` or `nominator` role of `origin`, the pool's depositor needs to have at least `depositor_min_bond` in the pool to start nominating. + +### poolWithdrawUnbonded(pool_id: `u32`, num_slashing_spans: `u32`) +- **interface**: `api.tx.nominationPools.poolWithdrawUnbonded` +- **summary**: Call `withdraw_unbonded` for the pools account. This call can be made by any account. + + This is useful if there are too many unlocking chunks to call `unbond`, and some can be cleared by withdrawing. In the case there are too many unlocking chunks, the user would probably see an error like `NoMoreChunks` emitted from the staking system when they attempt to unbond. + +### setClaimPermission(permission: `PalletNominationPoolsClaimPermission`) +- **interface**: `api.tx.nominationPools.setClaimPermission` +- **summary**: Allows a pool member to set a claim permission to allow or disallow permissionless bonding and withdrawing. + + #### Arguments + + * `origin` - Member of a pool. + + * `permission` - The permission to be applied. + +### setCommission(pool_id: `u32`, new_commission: `Option<(Perbill,AccountId32)>`) +- **interface**: `api.tx.nominationPools.setCommission` +- **summary**: Set the commission of a pool. Both a commission percentage and a commission payee must be provided in the `current` tuple. Where a `current` of `None` is provided, any current commission will be removed. + + - If a `None` is supplied to `new_commission`, existing commission will be removed. + +### setCommissionChangeRate(pool_id: `u32`, change_rate: `PalletNominationPoolsCommissionChangeRate`) +- **interface**: `api.tx.nominationPools.setCommissionChangeRate` +- **summary**: Set the commission change rate for a pool. + + Initial change rate is not bounded, whereas subsequent updates can only be more restrictive than the current. + +### setCommissionClaimPermission(pool_id: `u32`, permission: `Option`) +- **interface**: `api.tx.nominationPools.setCommissionClaimPermission` +- **summary**: Set or remove a pool's commission claim permission. + + Determines who can claim the pool's pending commission. Only the `Root` role of the pool is able to configure commission claim permissions. + +### setCommissionMax(pool_id: `u32`, max_commission: `Perbill`) +- **interface**: `api.tx.nominationPools.setCommissionMax` +- **summary**: Set the maximum commission of a pool. + + - Initial max can be set to any `Perbill`, and only smaller values thereafter. + + - Current commission will be lowered in the event it is higher than a new max commission. + +### setConfigs(min_join_bond: `PalletNominationPoolsConfigOpU128`, min_create_bond: `PalletNominationPoolsConfigOpU128`, max_pools: `PalletNominationPoolsConfigOpU32`, max_members: `PalletNominationPoolsConfigOpU32`, max_members_per_pool: `PalletNominationPoolsConfigOpU32`, global_max_commission: `PalletNominationPoolsConfigOpPerbill`) +- **interface**: `api.tx.nominationPools.setConfigs` +- **summary**: Update configurations for the nomination pools. The origin for this call must be [`Config::AdminOrigin`]. + + #### Arguments + + * `min_join_bond` - Set [`MinJoinBond`]. + + * `min_create_bond` - Set [`MinCreateBond`]. + + * `max_pools` - Set [`MaxPools`]. + + * `max_members` - Set [`MaxPoolMembers`]. + + * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + + * `global_max_commission` - Set [`GlobalMaxCommission`]. + +### setMetadata(pool_id: `u32`, metadata: `Bytes`) +- **interface**: `api.tx.nominationPools.setMetadata` +- **summary**: Set a new metadata for the pool. + + The dispatch origin of this call must be signed by the bouncer, or the root role of the pool. + +### setState(pool_id: `u32`, state: `PalletNominationPoolsPoolState`) +- **interface**: `api.tx.nominationPools.setState` +- **summary**: Set a new state for the pool. + + If a pool is already in the `Destroying` state, then under no condition can its state change again. + + The dispatch origin of this call must be either: + + 1. signed by the bouncer, or the root role of the pool, 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and then the state of the pool can be permissionlessly changed to `Destroying`. + +### unbond(member_account: `MultiAddress`, unbonding_points: `Compact`) +- **interface**: `api.tx.nominationPools.unbond` +- **summary**: Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It implicitly collects the rewards one last time, since not doing so would mean some rewards would be forfeited. + + Under certain conditions, this call can be dispatched permissionlessly (i.e. by any account). + + #### Conditions for a permissionless dispatch. + + * The pool is blocked and the caller is either the root or bouncer. This is refereed to as a kick. + + * The pool is destroying and the member is not the depositor. + + * The pool is destroying, the member is the depositor and no other members are in the pool. + + #### Conditions for permissioned dispatch (i.e. the caller is also the `member_account`): + + * The caller is not the depositor. + + * The caller is the depositor, the pool is destroying and no other members are in the pool. + + #### Note + + If there are too many unlocking chunks to unbond with the pool account, [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`] to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks are available). However, it may not be possible to release the current unlocking chunks, in which case, the result of this call will likely be the `NoMoreChunks` error from the staking system. + +### updateRoles(pool_id: `u32`, new_root: `PalletNominationPoolsConfigOpAccountId32`, new_nominator: `PalletNominationPoolsConfigOpAccountId32`, new_bouncer: `PalletNominationPoolsConfigOpAccountId32`) +- **interface**: `api.tx.nominationPools.updateRoles` +- **summary**: Update the roles of the pool. + + The root is the only entity that can change any of the roles, including itself, excluding the depositor, who can never change. + + It emits an event, notifying UIs of the role change. This event is quite relevant to most pool members and they should be informed of changes to pool roles. + +### withdrawUnbonded(member_account: `MultiAddress`, num_slashing_spans: `u32`) +- **interface**: `api.tx.nominationPools.withdrawUnbonded` +- **summary**: Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an error is returned. + + Under certain conditions, this call can be dispatched permissionlessly (i.e. by any account). + + #### Conditions for a permissionless dispatch + + * The pool is in destroy mode and the target is not the depositor. + + * The target is the depositor and they are the only member in the sub pools. + + * The pool is blocked and the caller is either the root or bouncer. + + #### Conditions for permissioned dispatch + + * The caller is the target and they are not the depositor. + + #### Note + + - If the target is the depositor, the pool will be destroyed. + + - If the pool has any pending slash, we also try to slash the member before letting them withdraw. This calculation adds some weight overhead and is only defensive. In reality, pool slashes must have been already applied via permissionless [`Call::apply_slash`]. + +___ + + +## parachainInfo + +___ + + +## parachainSystem + +### setValidationData(data: `CumulusPalletParachainSystemParachainInherentBasicParachainInherentData`, inbound_messages_data: `CumulusPalletParachainSystemParachainInherentInboundMessagesData`) +- **interface**: `api.tx.parachainSystem.setValidationData` +- **summary**: Set the current validation data. + + This should be invoked exactly once per block. It will panic at the finalization phase if the call was not invoked. + + The dispatch origin for this call must be `Inherent` + + As a side effect, this function upgrades the current validation function if the appropriate time has come. + +### sudoSendUpwardMessage(message: `Bytes`) +- **interface**: `api.tx.parachainSystem.sudoSendUpwardMessage` + +___ + + +## parameters + +### setParameter(key_value: `AssetHubKusamaRuntimeRuntimeParameters`) +- **interface**: `api.tx.parameters.setParameter` +- **summary**: Set the value of a parameter. + + The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be deleted by setting them to `None`. + +___ + + +## polkadotXcm + +### addAuthorizedAlias(aliaser: `XcmVersionedLocation`, expires: `Option`) +- **interface**: `api.tx.polkadotXcm.addAuthorizedAlias` +- **summary**: Authorize another `aliaser` location to alias into the local `origin` making this call. The `aliaser` is only authorized until the provided `expiry` block number. The call can also be used for a previously authorized alias in order to update its `expiry` block number. + + Usually useful to allow your local account to be aliased into from a remote location also under your control (like your account on another chain). + + WARNING: make sure the caller `origin` (you) trusts the `aliaser` location to act in their/your name. Once authorized using this call, the `aliaser` can freely impersonate `origin` in XCM programs executed on the local chain. + +### claimAssets(assets: `XcmVersionedAssets`, beneficiary: `XcmVersionedLocation`) +- **interface**: `api.tx.polkadotXcm.claimAssets` +- **summary**: Claims assets trapped on this pallet because of leftover assets during XCM execution. + + - `origin`: Anyone can call this extrinsic. + + - `assets`: The exact assets that were trapped. Use the version to specify what version was the latest when they were trapped. + + - `beneficiary`: The location/account where the claimed assets will be deposited. + +### execute(message: `XcmVersionedXcm`, max_weight: `SpWeightsWeightV2Weight`) +- **interface**: `api.tx.polkadotXcm.execute` +- **summary**: Execute an XCM message from a local, signed, origin. + + An event is deposited indicating whether `msg` could be executed completely or only partially. + + No more than `max_weight` will be used in its attempted execution. If this is less than the maximum amount of weight that the message could take to be executed, then no execution attempt will be made. + +### forceDefaultXcmVersion(maybe_xcm_version: `Option`) +- **interface**: `api.tx.polkadotXcm.forceDefaultXcmVersion` +- **summary**: Set a safe XCM version (the version that XCM should be encoded with if the most recent version a destination can accept is unknown). + + - `origin`: Must be an origin specified by AdminOrigin. + + - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + +### forceSubscribeVersionNotify(location: `XcmVersionedLocation`) +- **interface**: `api.tx.polkadotXcm.forceSubscribeVersionNotify` +- **summary**: Ask a location to notify us regarding their XCM version and any changes to it. + + - `origin`: Must be an origin specified by AdminOrigin. + + - `location`: The location to which we should subscribe for XCM version notifications. + +### forceSuspension(suspended: `bool`) +- **interface**: `api.tx.polkadotXcm.forceSuspension` +- **summary**: Set or unset the global suspension state of the XCM executor. + + - `origin`: Must be an origin specified by AdminOrigin. + + - `suspended`: `true` to suspend, `false` to resume. + +### forceUnsubscribeVersionNotify(location: `XcmVersionedLocation`) +- **interface**: `api.tx.polkadotXcm.forceUnsubscribeVersionNotify` +- **summary**: Require that a particular destination should no longer notify us regarding any XCM version changes. + + - `origin`: Must be an origin specified by AdminOrigin. + + - `location`: The location to which we are currently subscribed for XCM version notifications which we no longer desire. + +### forceXcmVersion(location: `StagingXcmV5Location`, version: `u32`) +- **interface**: `api.tx.polkadotXcm.forceXcmVersion` +- **summary**: Extoll that a particular destination can be communicated with through a particular version of XCM. + + - `origin`: Must be an origin specified by AdminOrigin. + + - `location`: The destination that is being described. + + - `xcm_version`: The latest version of XCM that `location` supports. + +### limitedReserveTransferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) +- **interface**: `api.tx.polkadotXcm.limitedReserveTransferAssets` +- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve. + + `assets` must have same reserve location and may not be teleportable to `dest`. + + - `assets` have local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + - `assets` have destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + + - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + + - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + + - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + + - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + +### limitedTeleportAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) +- **interface**: `api.tx.polkadotXcm.limitedTeleportAssets` +- **summary**: Teleport some assets from the local chain to some destination chain. + + Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + + - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` chain. + + - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + + - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + +### removeAllAuthorizedAliases() +- **interface**: `api.tx.polkadotXcm.removeAllAuthorizedAliases` +- **summary**: Remove all previously authorized `aliaser`s that can alias into the local `origin` making this call. + +### removeAuthorizedAlias(aliaser: `XcmVersionedLocation`) +- **interface**: `api.tx.polkadotXcm.removeAuthorizedAlias` +- **summary**: Remove a previously authorized `aliaser` from the list of locations that can alias into the local `origin` making this call. + +### reserveTransferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`) +- **interface**: `api.tx.polkadotXcm.reserveTransferAssets` +- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve. + + `assets` must have same reserve location and may not be teleportable to `dest`. + + - `assets` have local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + - `assets` have destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + + - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + **This function is deprecated: Use `limited_reserve_transfer_assets` instead.** + + Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, with all fees taken as needed from the asset. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + + - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + + - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + +### send(dest: `XcmVersionedLocation`, message: `XcmVersionedXcm`) +- **interface**: `api.tx.polkadotXcm.send` + +### teleportAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`) +- **interface**: `api.tx.polkadotXcm.teleportAssets` +- **summary**: Teleport some assets from the local chain to some destination chain. + + **This function is deprecated: Use `limited_teleport_assets` instead.** + + Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, with all fees taken as needed from the asset. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + + - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` chain. + + - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + +### transferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) +- **interface**: `api.tx.polkadotXcm.transferAssets` +- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve, or through teleports. + + Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + + `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable to `dest`, no limitations imposed on `fees`. + + - for local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + - for destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + + - for remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + - for teleports: burn local assets and forward XCM to `dest` chain to mint/teleport assets and deposit them to `beneficiary`. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + + - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + + - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + + - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + +### transferAssetsUsingTypeAndThen(dest: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, assets_transfer_type: `StagingXcmExecutorAssetTransferTransferType`, remote_fees_id: `XcmVersionedAssetId`, fees_transfer_type: `StagingXcmExecutorAssetTransferTransferType`, custom_xcm_on_dest: `XcmVersionedXcm`, weight_limit: `XcmV3WeightLimit`) +- **interface**: `api.tx.polkadotXcm.transferAssetsUsingTypeAndThen` +- **summary**: Transfer assets from the local chain to the destination chain using explicit transfer types for assets and fees. + + `assets` must have same reserve location or may be teleportable to `dest`. Caller must provide the `assets_transfer_type` to be used for `assets`: + + - `TransferType::LocalReserve`: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + - `TransferType::DestinationReserve`: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + + - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve` chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically the remote `reserve` is Asset Hub. + + - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to mint/teleport assets and deposit them to `beneficiary`. + + On the destination chain, as well as any intermediary hops, `BuyExecution` is used to buy execution using transferred `assets` identified by `remote_fees_id`. Make sure enough of the specified `remote_fees_id` asset is included in the given list of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + + `remote_fees_id` may use different transfer type than rest of `assets` and can be specified through `fees_transfer_type`. + + The caller needs to specify what should happen to the transferred assets once they reach the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which contains the instructions to execute on `dest` as a final step. This is usually as simple as: `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`, but could be something more exotic like sending the `assets` even further. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from parachain across a bridge to another ecosystem destination. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + + - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`. + + - `remote_fees_id`: One of the included `assets` to be used to pay fees. + + - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets. + + - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the transfer, which also determines what happens to the assets on the destination chain. + + - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + +___ + + +## poolAssets + +### approveTransfer(id: `u32`, delegate: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.approveTransfer` +- **summary**: Approve an amount of asset for transfer by a delegated third-party account. + + Origin must be Signed. + + Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account to `delegate`, then it is topped up or unreserved to meet the right value. + + NOTE: The signing account does not need to own `amount` of assets at the point of making this call. + + - `id`: The identifier of the asset. + + - `delegate`: The account to delegate permission to transfer asset. + + - `amount`: The amount of asset that may be transferred by `delegate`. If there is already an approval in place, then this acts additively. + + Emits `ApprovedTransfer` on success. + + Weight: `O(1)` + +### block(id: `u32`, who: `MultiAddress`) +- **interface**: `api.tx.poolAssets.block` +- **summary**: Disallow further unprivileged transfers of an asset `id` to and from an account `who`. + + Origin must be Signed and the sender should be the Freezer of the asset `id`. + + - `id`: The identifier of the account's asset. + + - `who`: The account to be unblocked. + + Emits `Blocked`. + + Weight: `O(1)` + +### burn(id: `u32`, who: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.burn` +- **summary**: Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. + + Origin must be Signed and the sender should be the Manager of the asset `id`. + + Bails with `NoAccount` if the `who` is already dead. + + - `id`: The identifier of the asset to have some amount burned. + + - `who`: The account to be debited from. + + - `amount`: The maximum amount by which `who`'s balance should be reduced. + + Emits `Burned` with the actual amount burned. If this takes the balance to below the minimum for the asset, then the amount burned is increased to take it to zero. + + Weight: `O(1)` Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. + +### cancelApproval(id: `u32`, delegate: `MultiAddress`) +- **interface**: `api.tx.poolAssets.cancelApproval` +- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. + + Origin must be Signed and there must be an approval in place between signer and `delegate`. + + Unreserves any deposit previously reserved by `approve_transfer` for the approval. + + - `id`: The identifier of the asset. + + - `delegate`: The account delegated permission to transfer asset. + + Emits `ApprovalCancelled` on success. + + Weight: `O(1)` + +### clearMetadata(id: `u32`) +- **interface**: `api.tx.poolAssets.clearMetadata` +- **summary**: Clear the metadata for an asset. + + Origin must be Signed and the sender should be the Owner of the asset `id`. + + Any deposit is freed for the asset owner. + + - `id`: The identifier of the asset to clear. + + Emits `MetadataCleared`. + + Weight: `O(1)` + +### create(id: `u32`, admin: `MultiAddress`, min_balance: `u128`) +- **interface**: `api.tx.poolAssets.create` +- **summary**: Issue a new class of fungible assets from a public origin. + + This new asset class has no assets initially and its owner is the origin. + + The origin must conform to the configured `CreateOrigin` and have sufficient funds free. + + Funds of sender are reserved by `AssetDeposit`. + + Parameters: + + - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + + - `admin`: The admin of this class of assets. The admin is the initial address of each member of the asset class's admin team. + + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + + Emits `Created` event when successful. + + Weight: `O(1)` + +### destroyAccounts(id: `u32`) +- **interface**: `api.tx.poolAssets.destroyAccounts` +- **summary**: Destroy all accounts associated with a given asset. + + `destroy_accounts` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + + Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time. + + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + + Each call emits the `Event::DestroyedAccounts` event. + +### destroyApprovals(id: `u32`) +- **interface**: `api.tx.poolAssets.destroyApprovals` +- **summary**: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit). + + `destroy_approvals` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + + Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time. + + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + + Each call emits the `Event::DestroyedApprovals` event. + +### finishDestroy(id: `u32`) +- **interface**: `api.tx.poolAssets.finishDestroy` +- **summary**: Complete destroying asset and unreserve currency. + + `finish_destroy` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. All accounts or approvals should be destroyed before hand. + + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + + Each successful call emits the `Event::Destroyed` event. + +### forceAssetStatus(id: `u32`, owner: `MultiAddress`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`, min_balance: `Compact`, is_sufficient: `bool`, is_frozen: `bool`) +- **interface**: `api.tx.poolAssets.forceAssetStatus` +- **summary**: Alter the attributes of a given asset. + + Origin must be `ForceOrigin`. + + - `id`: The identifier of the asset. + + - `owner`: The new Owner of this asset. + + - `issuer`: The new Issuer of this asset. + + - `admin`: The new Admin of this asset. + + - `freezer`: The new Freezer of this asset. + + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + + - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient value to account for the state bloat associated with its balance storage. If set to `true`, then non-zero balances may be stored without a `consumer` reference (and thus an ED in the Balances pallet or whatever else is used to control user-account state growth). + + - `is_frozen`: Whether this asset class is frozen except for permissioned/admin instructions. + + Emits `AssetStatusChanged` with the identity of the asset. + + Weight: `O(1)` + +### forceCancelApproval(id: `u32`, owner: `MultiAddress`, delegate: `MultiAddress`) +- **interface**: `api.tx.poolAssets.forceCancelApproval` +- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. + + Origin must be either ForceOrigin or Signed origin with the signer being the Admin account of the asset `id`. + + Unreserves any deposit previously reserved by `approve_transfer` for the approval. + + - `id`: The identifier of the asset. + + - `delegate`: The account delegated permission to transfer asset. + + Emits `ApprovalCancelled` on success. + + Weight: `O(1)` + +### forceClearMetadata(id: `u32`) +- **interface**: `api.tx.poolAssets.forceClearMetadata` +- **summary**: Clear the metadata for an asset. + + Origin must be ForceOrigin. + + Any deposit is returned. + + - `id`: The identifier of the asset to clear. + + Emits `MetadataCleared`. + + Weight: `O(1)` + +### forceCreate(id: `u32`, owner: `MultiAddress`, is_sufficient: `bool`, min_balance: `Compact`) +- **interface**: `api.tx.poolAssets.forceCreate` +- **summary**: Issue a new class of fungible assets from a privileged origin. + + This new asset class has no assets initially. + + The origin must conform to `ForceOrigin`. + + Unlike `create`, no funds are reserved. + + - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + + - `owner`: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions using `transfer_ownership` and `set_team`. + + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + + Emits `ForceCreated` event when successful. + + Weight: `O(1)` + +### forceSetMetadata(id: `u32`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`, is_frozen: `bool`) +- **interface**: `api.tx.poolAssets.forceSetMetadata` +- **summary**: Force the metadata for an asset to some value. + + Origin must be ForceOrigin. + + Any deposit is left alone. + + - `id`: The identifier of the asset to update. + + - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. + + - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. + + - `decimals`: The number of decimals this asset uses to represent one unit. + + Emits `MetadataSet`. + + Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. + +### forceTransfer(id: `u32`, source: `MultiAddress`, dest: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.forceTransfer` +- **summary**: Move some assets from one account to another. + + Origin must be Signed and the sender should be the Admin of the asset `id`. + + - `id`: The identifier of the asset to have some amount transferred. + + - `source`: The account to be debited. + + - `dest`: The account to be credited. + + - `amount`: The amount by which the `source`'s balance of assets should be reduced and `dest`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the `source` balance above zero but below the minimum balance. Must be greater than zero. + + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + + Weight: `O(1)` Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of `dest`. + +### freeze(id: `u32`, who: `MultiAddress`) +- **interface**: `api.tx.poolAssets.freeze` +- **summary**: Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` must already exist as an entry in `Account`s of the asset. If you want to freeze an account that does not have an entry, use `touch_other` first. + + Origin must be Signed and the sender should be the Freezer of the asset `id`. + + - `id`: The identifier of the asset to be frozen. + + - `who`: The account to be frozen. + + Emits `Frozen`. + + Weight: `O(1)` + +### freezeAsset(id: `u32`) +- **interface**: `api.tx.poolAssets.freezeAsset` +- **summary**: Disallow further unprivileged transfers for the asset class. + + Origin must be Signed and the sender should be the Freezer of the asset `id`. + + - `id`: The identifier of the asset to be frozen. + + Emits `Frozen`. + + Weight: `O(1)` + +### mint(id: `u32`, beneficiary: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.mint` +- **summary**: Mint assets of a particular class. + + The origin must be Signed and the sender must be the Issuer of the asset `id`. + + - `id`: The identifier of the asset to have some amount minted. + + - `beneficiary`: The account to be credited with the minted assets. + + - `amount`: The amount of the asset to be minted. + + Emits `Issued` event when successful. + + Weight: `O(1)` Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. + +### refund(id: `u32`, allow_burn: `bool`) +- **interface**: `api.tx.poolAssets.refund` +- **summary**: Return the deposit (if any) of an asset account or a consumer reference (if any) of an account. + + The origin must be Signed. + + - `id`: The identifier of the asset for which the caller would like the deposit refunded. + + - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund. + + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. + + Emits `Refunded` event when successful. + +### refundOther(id: `u32`, who: `MultiAddress`) +- **interface**: `api.tx.poolAssets.refundOther` +- **summary**: Return the deposit (if any) of a target asset account. Useful if you are the depositor. + + The origin must be Signed and either the account owner, depositor, or asset `Admin`. In order to burn a non-zero balance of the asset, the caller must be the account and should use `refund`. + + - `id`: The identifier of the asset for the account holding a deposit. + + - `who`: The account to refund. + + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. + + Emits `Refunded` event when successful. + +### setMetadata(id: `u32`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`) +- **interface**: `api.tx.poolAssets.setMetadata` +- **summary**: Set the metadata for an asset. + + Origin must be Signed and the sender should be the Owner of the asset `id`. + + Funds of sender are reserved according to the formula: `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into account any already reserved funds. + + - `id`: The identifier of the asset to update. + + - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. + + - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. - - `max_supply`: The maximum number of items a collection could have. + - `decimals`: The number of decimals this asset uses to represent one unit. - Emits `CollectionMaxSupplySet` event when successful. - -### setCollectionMetadata(collection: `u32`, data: `Bytes`) -- **interface**: `api.tx.nfts.setCollectionMetadata` -- **summary**: Set the metadata for a collection. + Emits `MetadataSet`. - Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of the `collection`. + Weight: `O(1)` + +### setMinBalance(id: `u32`, min_balance: `u128`) +- **interface**: `api.tx.poolAssets.setMinBalance` +- **summary**: Sets the minimum balance of an asset. - If the origin is `Signed`, then funds of signer are reserved according to the formula: `MetadataDepositBase + DepositPerByte * data.len` taking into account any already reserved funds. + Only works if there aren't any accounts that are holding the asset or if the new value of `min_balance` is less than the old one. - - `collection`: The identifier of the item whose metadata to update. + Origin must be Signed and the sender has to be the Owner of the asset `id`. - - `data`: The general information of this item. Limited in length by `StringLimit`. + - `id`: The identifier of the asset. - Emits `CollectionMetadataSet`. + - `min_balance`: The new value of `min_balance`. - Weight: `O(1)` + Emits `AssetMinBalanceChanged` event when successful. -### setMetadata(collection: `u32`, item: `u32`, data: `Bytes`) -- **interface**: `api.tx.nfts.setMetadata` -- **summary**: Set the metadata for an item. +### setTeam(id: `u32`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`) +- **interface**: `api.tx.poolAssets.setTeam` +- **summary**: Change the Issuer, Admin and Freezer of an asset. - Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. + Origin must be Signed and the sender should be the Owner of the asset `id`. - If the origin is Signed, then funds of signer are reserved according to the formula: `MetadataDepositBase + DepositPerByte * data.len` taking into account any already reserved funds. + - `id`: The identifier of the asset to be frozen. - - `collection`: The identifier of the collection whose item's metadata to set. + - `issuer`: The new Issuer of this asset. - - `item`: The identifier of the item whose metadata to set. + - `admin`: The new Admin of this asset. - - `data`: The general information of this item. Limited in length by `StringLimit`. + - `freezer`: The new Freezer of this asset. - Emits `ItemMetadataSet`. + Emits `TeamChanged`. Weight: `O(1)` -### setPrice(collection: `u32`, item: `u32`, price: `Option`, whitelisted_buyer: `Option`) -- **interface**: `api.tx.nfts.setPrice` -- **summary**: Set (or reset) the price for an item. - - Origin must be Signed and must be the owner of the `item`. - - - `collection`: The collection of the item. +### startDestroy(id: `u32`) +- **interface**: `api.tx.poolAssets.startDestroy` +- **summary**: Start the process of destroying a fungible asset class. - - `item`: The item to set the price for. + `start_destroy` is the first in a series of extrinsics that should be called, to allow destruction of an asset class. - - `price`: The price for the item. Pass `None`, to reset the price. + The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`. - - `buyer`: Restricts the buy operation to a specific account. + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. - Emits `ItemPriceSet` on success if the price is not `None`. Emits `ItemPriceRemoved` on success if the price is `None`. + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if an account contains holds or freezes in place. -### setTeam(collection: `u32`, issuer: `Option`, admin: `Option`, freezer: `Option`) -- **interface**: `api.tx.nfts.setTeam` -- **summary**: Change the Issuer, Admin and Freezer of a collection. +### thaw(id: `u32`, who: `MultiAddress`) +- **interface**: `api.tx.poolAssets.thaw` +- **summary**: Allow unprivileged transfers to and from an account again. - Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the `collection`. + Origin must be Signed and the sender should be the Admin of the asset `id`. - Note: by setting the role to `None` only the `ForceOrigin` will be able to change it after to `Some(account)`. + - `id`: The identifier of the asset to be frozen. - - `collection`: The collection whose team should be changed. + - `who`: The account to be unfrozen. - - `issuer`: The new Issuer of this collection. + Emits `Thawed`. - - `admin`: The new Admin of this collection. + Weight: `O(1)` + +### thawAsset(id: `u32`) +- **interface**: `api.tx.poolAssets.thawAsset` +- **summary**: Allow unprivileged transfers for the asset again. - - `freezer`: The new Freezer of this collection. + Origin must be Signed and the sender should be the Admin of the asset `id`. - Emits `TeamChanged`. + - `id`: The identifier of the asset to be thawed. + + Emits `Thawed`. Weight: `O(1)` -### transfer(collection: `u32`, item: `u32`, dest: `MultiAddress`) -- **interface**: `api.tx.nfts.transfer` -- **summary**: Move an item from the sender account to another. +### touch(id: `u32`) +- **interface**: `api.tx.poolAssets.touch` +- **summary**: Create an asset account for non-provider assets. - Origin must be Signed and the signing account must be either: + A deposit will be taken from the signer account. - - the Owner of the `item`; + - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit to be taken. - - the approved delegate for the `item` (in this case, the approval is reset). + - `id`: The identifier of the asset for the account to be created. - Arguments: + Emits `Touched` event when successful. + +### touchOther(id: `u32`, who: `MultiAddress`) +- **interface**: `api.tx.poolAssets.touchOther` +- **summary**: Create an asset account for `who`. - - `collection`: The collection of the item to be transferred. + A deposit will be taken from the signer account. - - `item`: The item to be transferred. + - `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account must have sufficient funds for a deposit to be taken. - - `dest`: The account to receive ownership of the item. + - `id`: The identifier of the asset for the account to be created. - Emits `Transferred`. + - `who`: The account to be created. - Weight: `O(1)` + Emits `Touched` event when successful. -### transferOwnership(collection: `u32`, new_owner: `MultiAddress`) -- **interface**: `api.tx.nfts.transferOwnership` -- **summary**: Change the Owner of a collection. +### transfer(id: `u32`, target: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.transfer` +- **summary**: Move some assets from the sender account to another. - Origin must be Signed and the sender should be the Owner of the `collection`. + Origin must be Signed. - - `collection`: The collection whose owner should be changed. + - `id`: The identifier of the asset to have some amount transferred. - - `owner`: The new Owner of this collection. They must have called `set_accept_ownership` with `collection` in order for this operation to succeed. + - `target`: The account to be credited. - Emits `OwnerChanged`. + - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. - Weight: `O(1)` + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + + Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. -### unlockItemTransfer(collection: `u32`, item: `u32`) -- **interface**: `api.tx.nfts.unlockItemTransfer` -- **summary**: Re-allow unprivileged transfer of an item. +### transferAll(id: `u32`, dest: `MultiAddress`, keep_alive: `bool`) +- **interface**: `api.tx.poolAssets.transferAll` +- **summary**: Transfer the entire transferable balance from the caller asset account. - Origin must be Signed and the sender should be the Freezer of the `collection`. + NOTE: This function only attempts to transfer _transferable_ balances. This means that any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... - - `collection`: The collection of the item to be changed. + The dispatch origin of this call must be Signed. - - `item`: The item to become transferable. + - `id`: The identifier of the asset for the account holding a deposit. - Emits `ItemTransferUnlocked`. + - `dest`: The recipient of the transfer. - Weight: `O(1)` + - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the asset account has, causing the sender asset account to be killed (false), or transfer everything except at least the minimum balance, which will guarantee to keep the sender asset account alive (true). -### updateMintSettings(collection: `u32`, mint_settings: `PalletNftsMintSettings`) -- **interface**: `api.tx.nfts.updateMintSettings` -- **summary**: Update mint settings. +### transferApproved(id: `u32`, owner: `MultiAddress`, destination: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.transferApproved` +- **summary**: Transfer some asset balance from a previously delegated account to some third-party account. - Origin must be either `ForceOrigin` or `Signed` and the sender should be the Issuer of the `collection`. + Origin must be Signed and there must be an approval in place by the `owner` to the signer. - - `collection`: The identifier of the collection to change. + If the entire amount approved for transfer is transferred, then any deposit previously reserved by `approve_transfer` is unreserved. - - `mint_settings`: The new mint settings. + - `id`: The identifier of the asset. - Emits `CollectionMintSettingsUpdated` event when successful. + - `owner`: The account which previously approved for a transfer of at least `amount` and from which the asset balance will be withdrawn. -___ + - `destination`: The account to which the asset balance of `amount` will be transferred. + - `amount`: The amount of assets to transfer. -## parachainInfo + Emits `TransferredApproved` on success. -___ + Weight: `O(1)` + +### transferKeepAlive(id: `u32`, target: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.transferKeepAlive` +- **summary**: Move some assets from the sender account to another, keeping the sender account alive. + Origin must be Signed. -## parachainSystem - -### setValidationData(data: `CumulusPrimitivesParachainInherentParachainInherentData`) -- **interface**: `api.tx.parachainSystem.setValidationData` -- **summary**: Set the current validation data. + - `id`: The identifier of the asset to have some amount transferred. - This should be invoked exactly once per block. It will panic at the finalization phase if the call was not invoked. + - `target`: The account to be credited. - The dispatch origin for this call must be `Inherent` + - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. - As a side effect, this function upgrades the current validation function if the appropriate time has come. + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + + Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. -### sudoSendUpwardMessage(message: `Bytes`) -- **interface**: `api.tx.parachainSystem.sudoSendUpwardMessage` +### transferOwnership(id: `u32`, owner: `MultiAddress`) +- **interface**: `api.tx.poolAssets.transferOwnership` +- **summary**: Change the Owner of an asset. -___ + Origin must be Signed and the sender should be the Owner of the asset `id`. + - `id`: The identifier of the asset. -## polkadotXcm - -### addAuthorizedAlias(aliaser: `XcmVersionedLocation`, expires: `Option`) -- **interface**: `api.tx.polkadotXcm.addAuthorizedAlias` -- **summary**: Authorize another `aliaser` location to alias into the local `origin` making this call. The `aliaser` is only authorized until the provided `expiry` block number. The call can also be used for a previously authorized alias in order to update its `expiry` block number. + - `owner`: The new Owner of this asset. - Usually useful to allow your local account to be aliased into from a remote location also under your control (like your account on another chain). + Emits `OwnerChanged`. - WARNING: make sure the caller `origin` (you) trusts the `aliaser` location to act in their/your name. Once authorized using this call, the `aliaser` can freely impersonate `origin` in XCM programs executed on the local chain. - -### claimAssets(assets: `XcmVersionedAssets`, beneficiary: `XcmVersionedLocation`) -- **interface**: `api.tx.polkadotXcm.claimAssets` -- **summary**: Claims assets trapped on this pallet because of leftover assets during XCM execution. + Weight: `O(1)` - - `origin`: Anyone can call this extrinsic. +___ - - `assets`: The exact assets that were trapped. Use the version to specify what version was the latest when they were trapped. - - `beneficiary`: The location/account where the claimed assets will be deposited. +## preimage -### execute(message: `XcmVersionedXcm`, max_weight: `SpWeightsWeightV2Weight`) -- **interface**: `api.tx.polkadotXcm.execute` -- **summary**: Execute an XCM message from a local, signed, origin. - - An event is deposited indicating whether `msg` could be executed completely or only partially. +### ensureUpdated(hashes: `Vec`) +- **interface**: `api.tx.preimage.ensureUpdated` +- **summary**: Ensure that the bulk of pre-images is upgraded. - No more than `max_weight` will be used in its attempted execution. If this is less than the maximum amount of weight that the message could take to be executed, then no execution attempt will be made. + The caller pays no fee if at least 90% of pre-images were successfully updated. -### forceDefaultXcmVersion(maybe_xcm_version: `Option`) -- **interface**: `api.tx.polkadotXcm.forceDefaultXcmVersion` -- **summary**: Set a safe XCM version (the version that XCM should be encoded with if the most recent version a destination can accept is unknown). +### notePreimage(bytes: `Bytes`) +- **interface**: `api.tx.preimage.notePreimage` +- **summary**: Register a preimage on-chain. - - `origin`: Must be an origin specified by AdminOrigin. + If the preimage was previously requested, no fees or deposits are taken for providing the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. + +### requestPreimage(hash: `H256`) +- **interface**: `api.tx.preimage.requestPreimage` +- **summary**: Request a preimage be uploaded to the chain without paying any fees or deposits. - - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + If the preimage requests has already been provided on-chain, we unreserve any deposit a user may have paid, and take the control of the preimage out of their hands. -### forceSubscribeVersionNotify(location: `XcmVersionedLocation`) -- **interface**: `api.tx.polkadotXcm.forceSubscribeVersionNotify` -- **summary**: Ask a location to notify us regarding their XCM version and any changes to it. +### unnotePreimage(hash: `H256`) +- **interface**: `api.tx.preimage.unnotePreimage` +- **summary**: Clear an unrequested preimage from the runtime storage. - - `origin`: Must be an origin specified by AdminOrigin. + If `len` is provided, then it will be a much cheaper operation. - - `location`: The location to which we should subscribe for XCM version notifications. + - `hash`: The hash of the preimage to be removed from the store. + + - `len`: The length of the preimage of `hash`. -### forceSuspension(suspended: `bool`) -- **interface**: `api.tx.polkadotXcm.forceSuspension` -- **summary**: Set or unset the global suspension state of the XCM executor. +### unrequestPreimage(hash: `H256`) +- **interface**: `api.tx.preimage.unrequestPreimage` +- **summary**: Clear a previously made request for a preimage. - - `origin`: Must be an origin specified by AdminOrigin. + NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. - - `suspended`: `true` to suspend, `false` to resume. - -### forceUnsubscribeVersionNotify(location: `XcmVersionedLocation`) -- **interface**: `api.tx.polkadotXcm.forceUnsubscribeVersionNotify` -- **summary**: Require that a particular destination should no longer notify us regarding any XCM version changes. +___ - - `origin`: Must be an origin specified by AdminOrigin. - - `location`: The location to which we are currently subscribed for XCM version notifications which we no longer desire. +## proxy -### forceXcmVersion(location: `StagingXcmV5Location`, version: `u32`) -- **interface**: `api.tx.polkadotXcm.forceXcmVersion` -- **summary**: Extoll that a particular destination can be communicated with through a particular version of XCM. +### addProxy(delegate: `MultiAddress`, proxy_type: `AssetHubKusamaRuntimeProxyType`, delay: `u32`) +- **interface**: `api.tx.proxy.addProxy` +- **summary**: 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_. + + Parameters: - - `origin`: Must be an origin specified by AdminOrigin. + - `proxy`: The account that the `caller` would like to make a proxy. - - `location`: The destination that is being described. + - `proxy_type`: The permissions allowed for this proxy account. - - `xcm_version`: The latest version of XCM that `location` supports. + - `delay`: The announcement period required of the initial proxy. Will generally be zero. -### limitedReserveTransferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) -- **interface**: `api.tx.polkadotXcm.limitedReserveTransferAssets` -- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve. +### announce(real: `MultiAddress`, call_hash: `H256`) +- **interface**: `api.tx.proxy.announce` +- **summary**: Publish the hash of a proxy-call that will be made in the future. - `assets` must have same reserve location and may not be teleportable to `dest`. + This must be called some number of blocks before the corresponding `proxy` is attempted if the delay associated with the proxy relationship is greater than zero. - - `assets` have local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + No more than `MaxPending` announcements may be made at any one time. - - `assets` have destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + This will take a deposit of `AnnouncementDepositFactor` as well as `AnnouncementDepositBase` if there are no other pending announcements. - - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + The dispatch origin for this call must be _Signed_ and a proxy of `real`. - Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + Parameters: - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + - `real`: The account that the proxy will make a call on behalf of. - - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + - `call_hash`: The hash of the call to be made by the `real` account. + +### createPure(proxy_type: `AssetHubKusamaRuntimeProxyType`, delay: `u32`, index: `u16`) +- **interface**: `api.tx.proxy.createPure` +- **summary**: Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and initialize it with a proxy of `proxy_type` for `origin` sender. - - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + Requires a `Signed` origin. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + - `proxy_type`: The type of the proxy that the sender will be registered as over the new account. This will almost always be the most permissive `ProxyType` possible to allow for maximum flexibility. - - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + - `index`: A disambiguation index, in case this is called multiple times in the same transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just want to use `0`. - - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. - -### limitedTeleportAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) -- **interface**: `api.tx.polkadotXcm.limitedTeleportAssets` -- **summary**: Teleport some assets from the local chain to some destination chain. + - `delay`: The announcement period required of the initial proxy. Will generally be zero. - Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + Fails with `Duplicate` if this has already been called in this transaction, from the same sender, with the same parameters. - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + Fails if there are insufficient funds to pay for deposit. + +### killPure(spawner: `MultiAddress`, proxy_type: `AssetHubKusamaRuntimeProxyType`, index: `u16`, height: `Compact`, ext_index: `Compact`) +- **interface**: `api.tx.proxy.killPure` +- **summary**: Removes a previously spawned pure proxy. - - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + WARNING: **All access to this account will be lost.** Any funds held in it will be inaccessible. - - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + Requires a `Signed` origin, and the sender account must have been created by a call to `create_pure` with corresponding parameters. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` chain. + - `spawner`: The account that originally called `create_pure` to create this account. - - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + - `index`: The disambiguation index originally passed to `create_pure`. Probably `0`. - - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. - -### removeAllAuthorizedAliases() -- **interface**: `api.tx.polkadotXcm.removeAllAuthorizedAliases` -- **summary**: Remove all previously authorized `aliaser`s that can alias into the local `origin` making this call. - -### removeAuthorizedAlias(aliaser: `XcmVersionedLocation`) -- **interface**: `api.tx.polkadotXcm.removeAuthorizedAlias` -- **summary**: Remove a previously authorized `aliaser` from the list of locations that can alias into the local `origin` making this call. - -### reserveTransferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`) -- **interface**: `api.tx.polkadotXcm.reserveTransferAssets` -- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve. + - `proxy_type`: The proxy type originally passed to `create_pure`. - `assets` must have same reserve location and may not be teleportable to `dest`. + - `height`: The height of the chain when the call to `create_pure` was processed. - - `assets` have local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + - `ext_index`: The extrinsic index in which the call to `create_pure` was processed. - - `assets` have destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + Fails with `NoPermission` in case the caller is not a previously created pure account whose `create_pure` call has corresponding parameters. + +### pokeDeposit() +- **interface**: `api.tx.proxy.pokeDeposit` +- **summary**: Poke / Adjust deposits made for proxies and announcements based on current values. This can be used by accounts to possibly lower their locked amount. - - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + The dispatch origin for this call must be _Signed_. - **This function is deprecated: Use `limited_reserve_transfer_assets` instead.** + The transaction fee is waived if the deposit amount has changed. - Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, with all fees taken as needed from the asset. + Emits `DepositPoked` if successful. + +### proxy(real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`) +- **interface**: `api.tx.proxy.proxy` +- **summary**: Dispatch the given `call` from an account that the sender is authorised for through `add_proxy`. - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + The dispatch origin for this call must be _Signed_. - - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + Parameters: - - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + - `real`: The account that the proxy will make a call on behalf of. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. - - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. - -### send(dest: `XcmVersionedLocation`, message: `XcmVersionedXcm`) -- **interface**: `api.tx.polkadotXcm.send` + - `call`: The call to be made by the `real` account. -### teleportAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`) -- **interface**: `api.tx.polkadotXcm.teleportAssets` -- **summary**: Teleport some assets from the local chain to some destination chain. - - **This function is deprecated: Use `limited_teleport_assets` instead.** +### proxyAnnounced(delegate: `MultiAddress`, real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`) +- **interface**: `api.tx.proxy.proxyAnnounced` +- **summary**: Dispatch the given `call` from an account that the sender is authorized for through `add_proxy`. - Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, with all fees taken as needed from the asset. + Removes any corresponding announcement(s). - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + The dispatch origin for this call must be _Signed_. - - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + Parameters: - - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + - `real`: The account that the proxy will make a call on behalf of. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` chain. + - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. - - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + - `call`: The call to be made by the `real` account. -### transferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) -- **interface**: `api.tx.polkadotXcm.transferAssets` -- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve, or through teleports. +### rejectAnnouncement(delegate: `MultiAddress`, call_hash: `H256`) +- **interface**: `api.tx.proxy.rejectAnnouncement` +- **summary**: Remove the given announcement of a delegate. - Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + May be called by a target (proxied) account to remove a call that one of their delegates (`delegate`) has announced they want to execute. The deposit is returned. - `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable to `dest`, no limitations imposed on `fees`. + The dispatch origin for this call must be _Signed_. - - for local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + Parameters: - - for destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + - `delegate`: The account that previously announced the call. - - for remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + - `call_hash`: The hash of the call to be made. + +### removeAnnouncement(real: `MultiAddress`, call_hash: `H256`) +- **interface**: `api.tx.proxy.removeAnnouncement` +- **summary**: Remove a given announcement. - - for teleports: burn local assets and forward XCM to `dest` chain to mint/teleport assets and deposit them to `beneficiary`. + May be called by a proxy account to remove a call they previously announced and return the deposit. - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + The dispatch origin for this call must be _Signed_. - - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + Parameters: - - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + - `real`: The account that the proxy will make a call on behalf of. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + - `call_hash`: The hash of the call to be made by the `real` account. + +### removeProxies() +- **interface**: `api.tx.proxy.removeProxies` +- **summary**: Unregister all proxy accounts for the sender. - - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + The dispatch origin for this call must be _Signed_. - - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + WARNING: This may be called on accounts created by `create_pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** -### transferAssetsUsingTypeAndThen(dest: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, assets_transfer_type: `StagingXcmExecutorAssetTransferTransferType`, remote_fees_id: `XcmVersionedAssetId`, fees_transfer_type: `StagingXcmExecutorAssetTransferTransferType`, custom_xcm_on_dest: `XcmVersionedXcm`, weight_limit: `XcmV3WeightLimit`) -- **interface**: `api.tx.polkadotXcm.transferAssetsUsingTypeAndThen` -- **summary**: Transfer assets from the local chain to the destination chain using explicit transfer types for assets and fees. +### removeProxy(delegate: `MultiAddress`, proxy_type: `AssetHubKusamaRuntimeProxyType`, delay: `u32`) +- **interface**: `api.tx.proxy.removeProxy` +- **summary**: Unregister a proxy account for the sender. - `assets` must have same reserve location or may be teleportable to `dest`. Caller must provide the `assets_transfer_type` to be used for `assets`: + The dispatch origin for this call must be _Signed_. - - `TransferType::LocalReserve`: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + Parameters: - - `TransferType::DestinationReserve`: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + - `proxy`: The account that the `caller` would like to remove as a proxy. - - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve` chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically the remote `reserve` is Asset Hub. + - `proxy_type`: The permissions currently enabled for the removed proxy account. - - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to mint/teleport assets and deposit them to `beneficiary`. +___ - On the destination chain, as well as any intermediary hops, `BuyExecution` is used to buy execution using transferred `assets` identified by `remote_fees_id`. Make sure enough of the specified `remote_fees_id` asset is included in the given list of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. - `remote_fees_id` may use different transfer type than rest of `assets` and can be specified through `fees_transfer_type`. +## recovery + +### asRecovered(account: `MultiAddress`, call: `Call`) +- **interface**: `api.tx.recovery.asRecovered` +- **summary**: Send a call through a recovered account. - The caller needs to specify what should happen to the transferred assets once they reach the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which contains the instructions to execute on `dest` as a final step. This is usually as simple as: `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`, but could be something more exotic like sending the `assets` even further. + The dispatch origin for this call must be _Signed_ and registered to be able to make calls on behalf of the recovered account. - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + Parameters: - - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from parachain across a bridge to another ecosystem destination. + - `account`: The recovered account you want to make a call on-behalf-of. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + - `call`: The call you want to make with the recovered account. + +### cancelRecovered(account: `MultiAddress`) +- **interface**: `api.tx.recovery.cancelRecovered` +- **summary**: Cancel the ability to use `as_recovered` for `account`. - - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`. + The dispatch origin for this call must be _Signed_ and registered to be able to make calls on behalf of the recovered account. - - `remote_fees_id`: One of the included `assets` to be used to pay fees. + Parameters: - - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets. + - `account`: The recovered account you are able to call on-behalf-of. + +### claimRecovery(account: `MultiAddress`) +- **interface**: `api.tx.recovery.claimRecovery` +- **summary**: Allow a successful rescuer to claim their recovered account. - - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the transfer, which also determines what happens to the assets on the destination chain. + The dispatch origin for this call must be _Signed_ and must be a "rescuer" who has successfully completed the account recovery process: collected `threshold` or more vouches, waited `delay_period` blocks since initiation. - - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + Parameters: -___ + - `account`: The lost account that you want to claim has been successfully recovered by you. + +### closeRecovery(rescuer: `MultiAddress`) +- **interface**: `api.tx.recovery.closeRecovery` +- **summary**: As the controller of a recoverable account, close an active recovery process for your account. + Payment: By calling this function, the recoverable account will receive the recovery deposit `RecoveryDeposit` placed by the rescuer. -## poolAssets - -### approveTransfer(id: `u32`, delegate: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.approveTransfer` -- **summary**: Approve an amount of asset for transfer by a delegated third-party account. + The dispatch origin for this call must be _Signed_ and must be a recoverable account with an active recovery process for it. - Origin must be Signed. + Parameters: - Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account to `delegate`, then it is topped up or unreserved to meet the right value. + - `rescuer`: The account trying to rescue this recoverable account. + +### createRecovery(friends: `Vec`, threshold: `u16`, delay_period: `u32`) +- **interface**: `api.tx.recovery.createRecovery` +- **summary**: Create a recovery configuration for your account. This makes your account recoverable. - NOTE: The signing account does not need to own `amount` of assets at the point of making this call. + Payment: `ConfigDepositBase` + `FriendDepositFactor` * #_of_friends balance will be reserved for storing the recovery configuration. This deposit is returned in full when the user calls `remove_recovery`. - - `id`: The identifier of the asset. + The dispatch origin for this call must be _Signed_. - - `delegate`: The account to delegate permission to transfer asset. + Parameters: - - `amount`: The amount of asset that may be transferred by `delegate`. If there is already an approval in place, then this acts additively. + - `friends`: A list of friends you trust to vouch for recovery attempts. Should be ordered and contain no duplicate values. - Emits `ApprovedTransfer` on success. + - `threshold`: The number of friends that must vouch for a recovery attempt before the account can be recovered. Should be less than or equal to the length of the list of friends. - Weight: `O(1)` + - `delay_period`: The number of blocks after a recovery attempt is initialized that needs to pass before the account can be recovered. -### block(id: `u32`, who: `MultiAddress`) -- **interface**: `api.tx.poolAssets.block` -- **summary**: Disallow further unprivileged transfers of an asset `id` to and from an account `who`. - - Origin must be Signed and the sender should be the Freezer of the asset `id`. +### initiateRecovery(account: `MultiAddress`) +- **interface**: `api.tx.recovery.initiateRecovery` +- **summary**: Initiate the process for recovering a recoverable account. - - `id`: The identifier of the account's asset. + Payment: `RecoveryDeposit` balance will be reserved for initiating the recovery process. This deposit will always be repatriated to the account trying to be recovered. See `close_recovery`. - - `who`: The account to be unblocked. + The dispatch origin for this call must be _Signed_. - Emits `Blocked`. + Parameters: - Weight: `O(1)` + - `account`: The lost account that you want to recover. This account needs to be recoverable (i.e. have a recovery configuration). -### burn(id: `u32`, who: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.burn` -- **summary**: Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. +### pokeDeposit(maybe_account: `Option`) +- **interface**: `api.tx.recovery.pokeDeposit` +- **summary**: Poke deposits for recovery configurations and / or active recoveries. - Origin must be Signed and the sender should be the Manager of the asset `id`. + This can be used by accounts to possibly lower their locked amount. - Bails with `NoAccount` if the `who` is already dead. + The dispatch origin for this call must be _Signed_. - - `id`: The identifier of the asset to have some amount burned. + Parameters: - - `who`: The account to be debited from. + - `maybe_account`: Optional recoverable account for which you have an active recovery and want to adjust the deposit for the active recovery. - - `amount`: The maximum amount by which `who`'s balance should be reduced. + This function checks both recovery configuration deposit and active recovery deposits of the caller: - Emits `Burned` with the actual amount burned. If this takes the balance to below the minimum for the asset, then the amount burned is increased to take it to zero. + - If the caller has created a recovery configuration, checks and adjusts its deposit - Weight: `O(1)` Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. - -### cancelApproval(id: `u32`, delegate: `MultiAddress`) -- **interface**: `api.tx.poolAssets.cancelApproval` -- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. + - If the caller has initiated any active recoveries, and provides the account in `maybe_account`, checks and adjusts those deposits - Origin must be Signed and there must be an approval in place between signer and `delegate`. + If any deposit is updated, the difference will be reserved/unreserved from the caller's account. - Unreserves any deposit previously reserved by `approve_transfer` for the approval. + The transaction is made free if any deposit is updated and paid otherwise. - - `id`: The identifier of the asset. + Emits `DepositPoked` if any deposit is updated. Multiple events may be emitted in case both types of deposits are updated. + +### removeRecovery() +- **interface**: `api.tx.recovery.removeRecovery` +- **summary**: Remove the recovery process for your account. Recovered accounts are still accessible. - - `delegate`: The account delegated permission to transfer asset. + NOTE: The user must make sure to call `close_recovery` on all active recovery attempts before calling this function else it will fail. - Emits `ApprovalCancelled` on success. + Payment: By calling this function the recoverable account will unreserve their recovery configuration deposit. (`ConfigDepositBase` + `FriendDepositFactor` * #_of_friends) - Weight: `O(1)` + The dispatch origin for this call must be _Signed_ and must be a recoverable account (i.e. has a recovery configuration). -### clearMetadata(id: `u32`) -- **interface**: `api.tx.poolAssets.clearMetadata` -- **summary**: Clear the metadata for an asset. - - Origin must be Signed and the sender should be the Owner of the asset `id`. +### setRecovered(lost: `MultiAddress`, rescuer: `MultiAddress`) +- **interface**: `api.tx.recovery.setRecovered` +- **summary**: Allow ROOT to bypass the recovery process and set a rescuer account for a lost account directly. - Any deposit is freed for the asset owner. + The dispatch origin for this call must be _ROOT_. - - `id`: The identifier of the asset to clear. + Parameters: - Emits `MetadataCleared`. + - `lost`: The "lost account" to be recovered. - Weight: `O(1)` + - `rescuer`: The "rescuer account" which can call as the lost account. -### create(id: `u32`, admin: `MultiAddress`, min_balance: `u128`) -- **interface**: `api.tx.poolAssets.create` -- **summary**: Issue a new class of fungible assets from a public origin. +### vouchRecovery(lost: `MultiAddress`, rescuer: `MultiAddress`) +- **interface**: `api.tx.recovery.vouchRecovery` +- **summary**: Allow a "friend" of a recoverable account to vouch for an active recovery process for that account. + + The dispatch origin for this call must be _Signed_ and must be a "friend" for the recoverable account. - This new asset class has no assets initially and its owner is the origin. + Parameters: - The origin must conform to the configured `CreateOrigin` and have sufficient funds free. + - `lost`: The lost account that you want to recover. - Funds of sender are reserved by `AssetDeposit`. + - `rescuer`: The account trying to rescue the lost account that you want to vouch for. - Parameters: + The combination of these two parameters must point to an active recovery process. - - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. +___ - - `admin`: The admin of this class of assets. The admin is the initial address of each member of the asset class's admin team. - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. +## referenda + +### cancel(index: `u32`) +- **interface**: `api.tx.referenda.cancel` +- **summary**: Cancel an ongoing referendum. - Emits `Created` event when successful. + - `origin`: must be the `CancelOrigin`. - Weight: `O(1)` + - `index`: The index of the referendum to be cancelled. + + Emits `Cancelled`. -### destroyAccounts(id: `u32`) -- **interface**: `api.tx.poolAssets.destroyAccounts` -- **summary**: Destroy all accounts associated with a given asset. +### kill(index: `u32`) +- **interface**: `api.tx.referenda.kill` +- **summary**: Cancel an ongoing referendum and slash the deposits. - `destroy_accounts` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + - `origin`: must be the `KillOrigin`. - Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time. + - `index`: The index of the referendum to be cancelled. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + Emits `Killed` and `DepositSlashed`. + +### nudgeReferendum(index: `u32`) +- **interface**: `api.tx.referenda.nudgeReferendum` +- **summary**: Advance a referendum onto its next logical state. Only used internally. - Each call emits the `Event::DestroyedAccounts` event. + - `origin`: must be `Root`. + + - `index`: the referendum to be advanced. -### destroyApprovals(id: `u32`) -- **interface**: `api.tx.poolAssets.destroyApprovals` -- **summary**: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit). +### oneFewerDeciding(track: `u16`) +- **interface**: `api.tx.referenda.oneFewerDeciding` +- **summary**: Advance a track onto its next logical state. Only used internally. - `destroy_approvals` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + - `origin`: must be `Root`. - Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time. + - `track`: the track to be advanced. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + Action item for when there is now one fewer referendum in the deciding phase and the `DecidingCount` is not yet updated. This means that we should either: - Each call emits the `Event::DestroyedApprovals` event. + - begin deciding another referendum (and leave `DecidingCount` alone); or + + - decrement `DecidingCount`. -### finishDestroy(id: `u32`) -- **interface**: `api.tx.poolAssets.finishDestroy` -- **summary**: Complete destroying asset and unreserve currency. +### placeDecisionDeposit(index: `u32`) +- **interface**: `api.tx.referenda.placeDecisionDeposit` +- **summary**: Post the Decision Deposit for a referendum. - `finish_destroy` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. All accounts or approvals should be destroyed before hand. + - `origin`: must be `Signed` and the account must have funds available for the referendum's track's Decision Deposit. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + - `index`: The index of the submitted referendum whose Decision Deposit is yet to be posted. - Each successful call emits the `Event::Destroyed` event. + Emits `DecisionDepositPlaced`. -### forceAssetStatus(id: `u32`, owner: `MultiAddress`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`, min_balance: `Compact`, is_sufficient: `bool`, is_frozen: `bool`) -- **interface**: `api.tx.poolAssets.forceAssetStatus` -- **summary**: Alter the attributes of a given asset. - - Origin must be `ForceOrigin`. +### refundDecisionDeposit(index: `u32`) +- **interface**: `api.tx.referenda.refundDecisionDeposit` +- **summary**: Refund the Decision Deposit for a closed referendum back to the depositor. - - `id`: The identifier of the asset. + - `origin`: must be `Signed` or `Root`. - - `owner`: The new Owner of this asset. + - `index`: The index of a closed referendum whose Decision Deposit has not yet been refunded. - - `issuer`: The new Issuer of this asset. + Emits `DecisionDepositRefunded`. + +### refundSubmissionDeposit(index: `u32`) +- **interface**: `api.tx.referenda.refundSubmissionDeposit` +- **summary**: Refund the Submission Deposit for a closed referendum back to the depositor. - - `admin`: The new Admin of this asset. + - `origin`: must be `Signed` or `Root`. - - `freezer`: The new Freezer of this asset. + - `index`: The index of a closed referendum whose Submission Deposit has not yet been refunded. - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + Emits `SubmissionDepositRefunded`. + +### setMetadata(index: `u32`, maybe_hash: `Option`) +- **interface**: `api.tx.referenda.setMetadata` +- **summary**: Set or clear metadata of a referendum. - - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient value to account for the state bloat associated with its balance storage. If set to `true`, then non-zero balances may be stored without a `consumer` reference (and thus an ED in the Balances pallet or whatever else is used to control user-account state growth). + Parameters: - - `is_frozen`: Whether this asset class is frozen except for permissioned/admin instructions. + - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a metadata of a finished referendum. - Emits `AssetStatusChanged` with the identity of the asset. + - `index`: The index of a referendum to set or clear metadata for. - Weight: `O(1)` + - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. -### forceCancelApproval(id: `u32`, owner: `MultiAddress`, delegate: `MultiAddress`) -- **interface**: `api.tx.poolAssets.forceCancelApproval` -- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. +### submit(proposal_origin: `AssetHubKusamaRuntimeOriginCaller`, proposal: `FrameSupportPreimagesBounded`, enactment_moment: `FrameSupportScheduleDispatchTime`) +- **interface**: `api.tx.referenda.submit` +- **summary**: Propose a referendum on a privileged action. - Origin must be either ForceOrigin or Signed origin with the signer being the Admin account of the asset `id`. + - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds available. - Unreserves any deposit previously reserved by `approve_transfer` for the approval. + - `proposal_origin`: The origin from which the proposal should be executed. - - `id`: The identifier of the asset. + - `proposal`: The proposal. - - `delegate`: The account delegated permission to transfer asset. + - `enactment_moment`: The moment that the proposal should be enacted. - Emits `ApprovalCancelled` on success. + Emits `Submitted`. - Weight: `O(1)` - -### forceClearMetadata(id: `u32`) -- **interface**: `api.tx.poolAssets.forceClearMetadata` -- **summary**: Clear the metadata for an asset. +___ - Origin must be ForceOrigin. - Any deposit is returned. +## remoteProxyRelayChain + +### registerRemoteProxyProof(proof: `PalletRemoteProxyRemoteProxyProof`) +- **interface**: `api.tx.remoteProxyRelayChain.registerRemoteProxyProof` +- **summary**: Register a given remote proxy proof in the current [`dispatch_context`]. - - `id`: The identifier of the asset to clear. + The registered remote proof can then be used later in the same context to execute a remote proxy call. This is for example useful when having a multisig operation. The multisig call can use [`Self::remote_proxy_with_registered_proof`] to get an approval by the members of the multisig. The final execution of the multisig call should be at least a batch of `register_remote_proxy_proof` and the multisig call that uses `remote_proxy_with_registered_proof`. This way the final approver can use a recent proof to prove the existence of the remote proxy. Otherwise it would require the multisig members to approve the call in [`Config::MaxStorageRootsToKeep`] amount of time. - Emits `MetadataCleared`. + It is supported to register multiple proofs, but the proofs need to be consumed in the reverse order as they were registered. Basically this means last in, first out. - Weight: `O(1)` - -### forceCreate(id: `u32`, owner: `MultiAddress`, is_sufficient: `bool`, min_balance: `Compact`) -- **interface**: `api.tx.poolAssets.forceCreate` -- **summary**: Issue a new class of fungible assets from a privileged origin. + The [`dispatch_context`] spans the entire lifetime of a transaction and every call in the transaction gets access to the same context. - This new asset class has no assets initially. + #### Example - The origin must conform to `ForceOrigin`. + ```ignore batch([ register_remote_proxy_proof, as_multisig(remote_proxy_with_registered_proof(transfer)) ]) ``` - Unlike `create`, no funds are reserved. + As `proofs` can not be verified indefinitely (the time the storage roots are stored is limited) this function provides the possibility to provide a "fresh proof" at time of dispatch. As in the example above, this could be useful for multisig operation that depend on multiple members to approve a certain action, which can take multiple days. + +### remoteProxy(real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`, proof: `PalletRemoteProxyRemoteProxyProof`) +- **interface**: `api.tx.remoteProxyRelayChain.remoteProxy` +- **summary**: Dispatch the given `call` from an account that the sender is authorised on a remote chain. - - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + The dispatch origin for this call must be _Signed_. - - `owner`: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions using `transfer_ownership` and `set_team`. + Parameters: - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + - `real`: The account that the proxy will make a call on behalf of. - Emits `ForceCreated` event when successful. + - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. - Weight: `O(1)` + - `call`: The call to be made by the `real` account. + + - `proof`: The proof from the remote chain about the existence of the proxy. -### forceSetMetadata(id: `u32`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`, is_frozen: `bool`) -- **interface**: `api.tx.poolAssets.forceSetMetadata` -- **summary**: Force the metadata for an asset to some value. +### remoteProxyWithRegisteredProof(real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`) +- **interface**: `api.tx.remoteProxyRelayChain.remoteProxyWithRegisteredProof` +- **summary**: Dispatch the given `call` from an account that the sender is authorised on a remote chain. - Origin must be ForceOrigin. + The dispatch origin for this call must be _Signed_. The difference to [`Self::remote_proxy`] is that the proof nees to registered before using [`Self::register_remote_proxy_proof`] (see for more information). - Any deposit is left alone. + Parameters: - - `id`: The identifier of the asset to update. + - `real`: The account that the proxy will make a call on behalf of. - - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. + - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. - - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. + - `call`: The call to be made by the `real` account. - - `decimals`: The number of decimals this asset uses to represent one unit. +___ - Emits `MetadataSet`. - Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. +## revive -### forceTransfer(id: `u32`, source: `MultiAddress`, dest: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.forceTransfer` -- **summary**: Move some assets from one account to another. +### call(dest: `H160`, value: `Compact`, gas_limit: `SpWeightsWeightV2Weight`, storage_deposit_limit: `Compact`, data: `Bytes`) +- **interface**: `api.tx.revive.call` +- **summary**: Makes a call to an account, optionally transferring some balance. - Origin must be Signed and the sender should be the Admin of the asset `id`. + #### Parameters - - `id`: The identifier of the asset to have some amount transferred. + * `dest`: Address of the contract to call. - - `source`: The account to be debited. + * `value`: The balance to transfer from the `origin` to `dest`. - - `dest`: The account to be credited. + * `gas_limit`: The gas limit enforced when executing the constructor. - - `amount`: The amount by which the `source`'s balance of assets should be reduced and `dest`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the `source` balance above zero but below the minimum balance. Must be greater than zero. + * `storage_deposit_limit`: The maximum amount of balance that can be charged from the caller to pay for the storage consumed. - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + * `data`: The input data to pass to the contract. - Weight: `O(1)` Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of `dest`. + * If the account is a smart-contract account, the associated code will be executed and any value will be transferred. + + * If the account is a regular account, any value will be transferred. + + * If no account exists and the call value is not less than `existential_deposit`, a regular account will be created and any value will be transferred. -### freeze(id: `u32`, who: `MultiAddress`) -- **interface**: `api.tx.poolAssets.freeze` -- **summary**: Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` must already exist as an entry in `Account`s of the asset. If you want to freeze an account that does not have an entry, use `touch_other` first. +### dispatchAsFallbackAccount(call: `Call`) +- **interface**: `api.tx.revive.dispatchAsFallbackAccount` +- **summary**: Dispatch an `call` with the origin set to the callers fallback address. - Origin must be Signed and the sender should be the Freezer of the asset `id`. + Every `AccountId32` can control its corresponding fallback account. The fallback account is the `AccountId20` with the last 12 bytes set to `0xEE`. This is essentially a recovery function in case an `AccountId20` was used without creating a mapping first. + +### ethCall(dest: `H160`, value: `U256`, gas_limit: `SpWeightsWeightV2Weight`, storage_deposit_limit: `Compact`, data: `Bytes`) +- **interface**: `api.tx.revive.ethCall` +- **summary**: Same as [`Self::call`], but intended to be dispatched **only** by an EVM transaction through the EVM compatibility layer. + +### ethInstantiateWithCode(value: `U256`, gas_limit: `SpWeightsWeightV2Weight`, storage_deposit_limit: `Compact`, code: `Bytes`, data: `Bytes`) +- **interface**: `api.tx.revive.ethInstantiateWithCode` +- **summary**: Same as [`Self::instantiate_with_code`], but intended to be dispatched **only** by an EVM transaction through the EVM compatibility layer. - - `id`: The identifier of the asset to be frozen. + Calling this dispatchable ensures that the origin's nonce is bumped only once, via the `CheckNonce` transaction extension. In contrast, [`Self::instantiate_with_code`] also bumps the nonce after contract instantiation, since it may be invoked multiple times within a batch call transaction. + +### ethTransact(payload: `Bytes`) +- **interface**: `api.tx.revive.ethTransact` +- **summary**: A raw EVM transaction, typically dispatched by an Ethereum JSON-RPC server. - - `who`: The account to be frozen. + #### Parameters - Emits `Frozen`. + * `payload`: The encoded [`crate::evm::TransactionSigned`]. - Weight: `O(1)` - -### freezeAsset(id: `u32`) -- **interface**: `api.tx.poolAssets.freezeAsset` -- **summary**: Disallow further unprivileged transfers for the asset class. + * `gas_limit`: The gas limit enforced during contract execution. - Origin must be Signed and the sender should be the Freezer of the asset `id`. + * `storage_deposit_limit`: The maximum balance that can be charged to the caller for storage usage. - - `id`: The identifier of the asset to be frozen. + #### Note - Emits `Frozen`. + This call cannot be dispatched directly; attempting to do so will result in a failed transaction. It serves as a wrapper for an Ethereum transaction. When submitted, the runtime converts it into a [`sp_runtime::generic::CheckedExtrinsic`] by recovering the signer and validating the transaction. + +### instantiate(value: `Compact`, gas_limit: `SpWeightsWeightV2Weight`, storage_deposit_limit: `Compact`, code_hash: `H256`, data: `Bytes`, salt: `Option<[u8;32]>`) +- **interface**: `api.tx.revive.instantiate` +- **summary**: Instantiates a contract from a previously deployed vm binary. - Weight: `O(1)` + This function is identical to [`Self::instantiate_with_code`] but without the code deployment step. Instead, the `code_hash` of an on-chain deployed vm binary must be supplied. -### mint(id: `u32`, beneficiary: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.mint` -- **summary**: Mint assets of a particular class. +### instantiateWithCode(value: `Compact`, gas_limit: `SpWeightsWeightV2Weight`, storage_deposit_limit: `Compact`, code: `Bytes`, data: `Bytes`, salt: `Option<[u8;32]>`) +- **interface**: `api.tx.revive.instantiateWithCode` +- **summary**: Instantiates a new contract from the supplied `code` optionally transferring some balance. - The origin must be Signed and the sender must be the Issuer of the asset `id`. + This dispatchable has the same effect as calling [`Self::upload_code`] + [`Self::instantiate`]. Bundling them together provides efficiency gains. Please also check the documentation of [`Self::upload_code`]. - - `id`: The identifier of the asset to have some amount minted. + #### Parameters - - `beneficiary`: The account to be credited with the minted assets. + * `value`: The balance to transfer from the `origin` to the newly created contract. - - `amount`: The amount of the asset to be minted. + * `gas_limit`: The gas limit enforced when executing the constructor. - Emits `Issued` event when successful. + * `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved from the caller to pay for the storage consumed. - Weight: `O(1)` Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. - -### refund(id: `u32`, allow_burn: `bool`) -- **interface**: `api.tx.poolAssets.refund` -- **summary**: Return the deposit (if any) of an asset account or a consumer reference (if any) of an account. + * `code`: The contract code to deploy in raw bytes. - The origin must be Signed. + * `data`: The input data to pass to the contract constructor. - - `id`: The identifier of the asset for which the caller would like the deposit refunded. + * `salt`: Used for the address derivation. If `Some` is supplied then `CREATE2` semantics are used. If `None` then `CRATE1` is used. - - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund. + - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. + Instantiation is executed as follows: - Emits `Refunded` event when successful. - -### refundOther(id: `u32`, who: `MultiAddress`) -- **interface**: `api.tx.poolAssets.refundOther` -- **summary**: Return the deposit (if any) of a target asset account. Useful if you are the depositor. + - The supplied `code` is deployed, and a `code_hash` is created for that code. - The origin must be Signed and either the account owner, depositor, or asset `Admin`. In order to burn a non-zero balance of the asset, the caller must be the account and should use `refund`. + - If the `code_hash` already exists on the chain the underlying `code` will be shared. - - `id`: The identifier of the asset for the account holding a deposit. + - The destination address is computed based on the sender, code_hash and the salt. - - `who`: The account to refund. + - The smart-contract account is created at the computed address. - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. + - The `value` is transferred to the new account. - Emits `Refunded` event when successful. + - The `deploy` function is executed in the context of the newly-created account. -### setMetadata(id: `u32`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`) -- **interface**: `api.tx.poolAssets.setMetadata` -- **summary**: Set the metadata for an asset. - - Origin must be Signed and the sender should be the Owner of the asset `id`. - - Funds of sender are reserved according to the formula: `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into account any already reserved funds. +### mapAccount() +- **interface**: `api.tx.revive.mapAccount` +- **summary**: Register the callers account id so that it can be used in contract interactions. - - `id`: The identifier of the asset to update. + This will error if the origin is already mapped or is a eth native `Address20`. It will take a deposit that can be released by calling [`Self::unmap_account`]. + +### removeCode(code_hash: `H256`) +- **interface**: `api.tx.revive.removeCode` +- **summary**: Remove the code stored under `code_hash` and refund the deposit to its owner. - - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. + A code can only be removed by its original uploader (its owner) and only if it is not used by any contract. + +### setCode(dest: `H160`, code_hash: `H256`) +- **interface**: `api.tx.revive.setCode` +- **summary**: Privileged function that changes the code of an existing contract. - - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. + This takes care of updating refcounts and all other necessary operations. Returns an error if either the `code_hash` or `dest` do not exist. - - `decimals`: The number of decimals this asset uses to represent one unit. + #### Note - Emits `MetadataSet`. + This does **not** change the address of the contract in question. This means that the contract address is no longer derived from its code hash after calling this dispatchable. + +### unmapAccount() +- **interface**: `api.tx.revive.unmapAccount` +- **summary**: Unregister the callers account id in order to free the deposit. - Weight: `O(1)` + There is no reason to ever call this function other than freeing up the deposit. This is only useful when the account should no longer be used. -### setMinBalance(id: `u32`, min_balance: `u128`) -- **interface**: `api.tx.poolAssets.setMinBalance` -- **summary**: Sets the minimum balance of an asset. +### uploadCode(code: `Bytes`, storage_deposit_limit: `Compact`) +- **interface**: `api.tx.revive.uploadCode` +- **summary**: Upload new `code` without instantiating a contract from it. - Only works if there aren't any accounts that are holding the asset or if the new value of `min_balance` is less than the old one. + If the code does not already exist a deposit is reserved from the caller and unreserved only when [`Self::remove_code`] is called. The size of the reserve depends on the size of the supplied `code`. - Origin must be Signed and the sender has to be the Owner of the asset `id`. + #### Note - - `id`: The identifier of the asset. + Anyone can instantiate a contract from any uploaded code and thus prevent its removal. To avoid this situation a constructor could employ access control so that it can only be instantiated by permissioned entities. The same is true when uploading through [`Self::instantiate_with_code`]. - - `min_balance`: The new value of `min_balance`. +___ - Emits `AssetMinBalanceChanged` event when successful. + +## scheduler -### setTeam(id: `u32`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`) -- **interface**: `api.tx.poolAssets.setTeam` -- **summary**: Change the Issuer, Admin and Freezer of an asset. +### cancel(when: `u32`, index: `u32`) +- **interface**: `api.tx.scheduler.cancel` +- **summary**: Cancel an anonymously scheduled task. + +### cancelNamed(id: `[u8;32]`) +- **interface**: `api.tx.scheduler.cancelNamed` +- **summary**: Cancel a named scheduled task. + +### cancelRetry(task: `(u32,u32)`) +- **interface**: `api.tx.scheduler.cancelRetry` +- **summary**: Removes the retry configuration of a task. + +### cancelRetryNamed(id: `[u8;32]`) +- **interface**: `api.tx.scheduler.cancelRetryNamed` +- **summary**: Cancel the retry configuration of a named task. + +### schedule(when: `u32`, maybe_periodic: `Option<(u32,u32)>`, priority: `u8`, call: `Call`) +- **interface**: `api.tx.scheduler.schedule` +- **summary**: Anonymously schedule a task. + +### scheduleAfter(after: `u32`, maybe_periodic: `Option<(u32,u32)>`, priority: `u8`, call: `Call`) +- **interface**: `api.tx.scheduler.scheduleAfter` +- **summary**: Anonymously schedule a task after a delay. + +### scheduleNamed(id: `[u8;32]`, when: `u32`, maybe_periodic: `Option<(u32,u32)>`, priority: `u8`, call: `Call`) +- **interface**: `api.tx.scheduler.scheduleNamed` +- **summary**: Schedule a named task. + +### scheduleNamedAfter(id: `[u8;32]`, after: `u32`, maybe_periodic: `Option<(u32,u32)>`, priority: `u8`, call: `Call`) +- **interface**: `api.tx.scheduler.scheduleNamedAfter` +- **summary**: Schedule a named task after a delay. + +### setRetry(task: `(u32,u32)`, retries: `u8`, period: `u32`) +- **interface**: `api.tx.scheduler.setRetry` +- **summary**: Set a retry configuration for a task so that, in case its scheduled run fails, it will be retried after `period` blocks, for a total amount of `retries` retries or until it succeeds. - Origin must be Signed and the sender should be the Owner of the asset `id`. + Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. - - `id`: The identifier of the asset to be frozen. + Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`. + +### setRetryNamed(id: `[u8;32]`, retries: `u8`, period: `u32`) +- **interface**: `api.tx.scheduler.setRetryNamed` +- **summary**: Set a retry configuration for a named task so that, in case its scheduled run fails, it will be retried after `period` blocks, for a total amount of `retries` retries or until it succeeds. - - `issuer`: The new Issuer of this asset. + Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. - - `admin`: The new Admin of this asset. + Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`. - - `freezer`: The new Freezer of this asset. +___ - Emits `TeamChanged`. - Weight: `O(1)` +## session -### startDestroy(id: `u32`) -- **interface**: `api.tx.poolAssets.startDestroy` -- **summary**: Start the process of destroying a fungible asset class. +### purgeKeys() +- **interface**: `api.tx.session.purgeKeys` +- **summary**: Removes any session key(s) of the function caller. - `start_destroy` is the first in a series of extrinsics that should be called, to allow destruction of an asset class. + This doesn't take effect until the next session. - The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`. + The dispatch origin of this function must be Signed and the account must be either be convertible to a validator ID using the chain's typical addressing system (this usually means being a controller account) or directly convertible into a validator ID (which usually means being a stash account). - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + #### Complexity - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if an account contains holds or freezes in place. + - `O(1)` in number of key types. Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. -### thaw(id: `u32`, who: `MultiAddress`) -- **interface**: `api.tx.poolAssets.thaw` -- **summary**: Allow unprivileged transfers to and from an account again. +### setKeys(keys: `AssetHubKusamaRuntimeSessionKeys`, proof: `Bytes`) +- **interface**: `api.tx.session.setKeys` +- **summary**: 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. - Origin must be Signed and the sender should be the Admin of the asset `id`. + The dispatch origin of this function must be signed. - - `id`: The identifier of the asset to be frozen. + #### Complexity - - `who`: The account to be unfrozen. + - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. - Emits `Thawed`. +___ - Weight: `O(1)` + +## society -### thawAsset(id: `u32`) -- **interface**: `api.tx.poolAssets.thawAsset` -- **summary**: Allow unprivileged transfers for the asset again. +### bestowMembership(candidate: `AccountId32`) +- **interface**: `api.tx.society.bestowMembership` +- **summary**: Transform an approved candidate into a member. Callable only by the Signed origin of the Founder, only after the period for voting has ended and only when the candidate is not clearly rejected. + +### bid(value: `u128`) +- **interface**: `api.tx.society.bid` +- **summary**: A user outside of the society can make a bid for entry. - Origin must be Signed and the sender should be the Admin of the asset `id`. + Payment: The group's Candidate Deposit will be reserved for making a bid. It is returned when the bid becomes a member, or if the bid calls `unbid`. - - `id`: The identifier of the asset to be thawed. + The dispatch origin for this call must be _Signed_. - Emits `Thawed`. + Parameters: - Weight: `O(1)` + - `value`: A one time payment the bid would like to receive when joining the society. -### touch(id: `u32`) -- **interface**: `api.tx.poolAssets.touch` -- **summary**: Create an asset account for non-provider assets. +### claimMembership() +- **interface**: `api.tx.society.claimMembership` +- **summary**: Transform an approved candidate into a member. Callable only by the the candidate, and only after the period for voting has ended. + +### cleanupCandidacy(candidate: `AccountId32`, max: `u32`) +- **interface**: `api.tx.society.cleanupCandidacy` +- **summary**: Remove up to `max` stale votes for the given `candidate`. - A deposit will be taken from the signer account. + May be called by any Signed origin, but only after the candidate's candidacy is ended. + +### cleanupChallenge(challenge_round: `u32`, max: `u32`) +- **interface**: `api.tx.society.cleanupChallenge` +- **summary**: Remove up to `max` stale votes for the defender in the given `challenge_round`. - - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit to be taken. + May be called by any Signed origin, but only after the challenge round is ended. + +### defenderVote(approve: `bool`) +- **interface**: `api.tx.society.defenderVote` +- **summary**: As a member, vote on the defender. - - `id`: The identifier of the asset for the account to be created. + The dispatch origin for this call must be _Signed_ and a member. - Emits `Touched` event when successful. + Parameters: + + - `approve`: A boolean which says if the candidate should be approved (`true`) or rejected (`false`). -### touchOther(id: `u32`, who: `MultiAddress`) -- **interface**: `api.tx.poolAssets.touchOther` -- **summary**: Create an asset account for `who`. +### dissolve() +- **interface**: `api.tx.society.dissolve` +- **summary**: Dissolve the society and remove all members. - A deposit will be taken from the signer account. + The dispatch origin for this call must be Signed, and the signing account must be both the `Founder` and the `Head`. This implies that it may only be done when there is one member. + +### dropCandidate(candidate: `AccountId32`) +- **interface**: `api.tx.society.dropCandidate` +- **summary**: Remove a `candidate`'s failed application from the society. Callable by any signed origin but only at the end of the subsequent round and only for a candidate with more rejections than approvals. - - `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account must have sufficient funds for a deposit to be taken. + The bid deposit is lost and the voucher is banned. + +### foundSociety(founder: `MultiAddress`, max_members: `u32`, max_intake: `u32`, max_strikes: `u32`, candidate_deposit: `u128`, rules: `Bytes`) +- **interface**: `api.tx.society.foundSociety` +- **summary**: Found the society. - - `id`: The identifier of the asset for the account to be created. + This is done as a discrete action in order to allow for the pallet to be included into a running chain and can only be done once. - - `who`: The account to be created. + The dispatch origin for this call must be from the _FounderSetOrigin_. - Emits `Touched` event when successful. - -### transfer(id: `u32`, target: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.transfer` -- **summary**: Move some assets from the sender account to another. + Parameters: - Origin must be Signed. + - `founder` - The first member and head of the newly founded society. - - `id`: The identifier of the asset to have some amount transferred. + - `max_members` - The initial max number of members for the society. - - `target`: The account to be credited. + - `max_intake` - The maximum number of candidates per intake period. - - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. + - `max_strikes`: The maximum number of strikes a member may get before they become suspended and may only be reinstated by the founder. - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + - `candidate_deposit`: The deposit required to make a bid for membership of the group. - Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. + - `rules` - The rules of this society concerning membership. + + Complexity: O(1) -### transferAll(id: `u32`, dest: `MultiAddress`, keep_alive: `bool`) -- **interface**: `api.tx.poolAssets.transferAll` -- **summary**: Transfer the entire transferable balance from the caller asset account. +### judgeSuspendedMember(who: `MultiAddress`, forgive: `bool`) +- **interface**: `api.tx.society.judgeSuspendedMember` +- **summary**: Allow suspension judgement origin to make judgement on a suspended member. - NOTE: This function only attempts to transfer _transferable_ balances. This means that any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... + If a suspended member is forgiven, we simply add them back as a member, not affecting any of the existing storage items for that member. - The dispatch origin of this call must be Signed. + If a suspended member is rejected, remove all associated storage items, including their payouts, and remove any vouched bids they currently have. - - `id`: The identifier of the asset for the account holding a deposit. + The dispatch origin for this call must be Signed from the Founder. - - `dest`: The recipient of the transfer. + Parameters: - - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the asset account has, causing the sender asset account to be killed (false), or transfer everything except at least the minimum balance, which will guarantee to keep the sender asset account alive (true). + - `who` - The suspended member to be judged. + + - `forgive` - A boolean representing whether the suspension judgement origin forgives (`true`) or rejects (`false`) a suspended member. -### transferApproved(id: `u32`, owner: `MultiAddress`, destination: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.transferApproved` -- **summary**: Transfer some asset balance from a previously delegated account to some third-party account. +### kickCandidate(candidate: `AccountId32`) +- **interface**: `api.tx.society.kickCandidate` +- **summary**: Remove the candidate's application from the society. Callable only by the Signed origin of the Founder, only after the period for voting has ended, and only when they do not have a clear approval. - Origin must be Signed and there must be an approval in place by the `owner` to the signer. + Any bid deposit is lost and voucher is banned. + +### payout() +- **interface**: `api.tx.society.payout` +- **summary**: Transfer the first matured payout for the sender and remove it from the records. - If the entire amount approved for transfer is transferred, then any deposit previously reserved by `approve_transfer` is unreserved. + NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts. - - `id`: The identifier of the asset. + Payment: The member will receive a payment equal to their first matured payout to their free balance. - - `owner`: The account which previously approved for a transfer of at least `amount` and from which the asset balance will be withdrawn. + The dispatch origin for this call must be _Signed_ and a member with payouts remaining. + +### pokeDeposit() +- **interface**: `api.tx.society.pokeDeposit` +- **summary**: Poke the deposit reserved when bidding. - - `destination`: The account to which the asset balance of `amount` will be transferred. + The dispatch origin for this call must be _Signed_ and must be the bidder. - - `amount`: The amount of assets to transfer. + The transaction fee is waived if the deposit is changed after poking/reconsideration. - Emits `TransferredApproved` on success. + Emits `DepositPoked` if successful. + +### punishSkeptic() +- **interface**: `api.tx.society.punishSkeptic` +- **summary**: Punish the skeptic with a strike if they did not vote on a candidate. Callable by the candidate. + +### resignCandidacy() +- **interface**: `api.tx.society.resignCandidacy` +- **summary**: Remove the candidate's application from the society. Callable only by the candidate. - Weight: `O(1)` + Any bid deposit is lost and voucher is banned. -### transferKeepAlive(id: `u32`, target: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.transferKeepAlive` -- **summary**: Move some assets from the sender account to another, keeping the sender account alive. +### setParameters(max_members: `u32`, max_intake: `u32`, max_strikes: `u32`, candidate_deposit: `u128`) +- **interface**: `api.tx.society.setParameters` +- **summary**: Change the maximum number of members in society and the maximum number of new candidates in a single intake period. - Origin must be Signed. + The dispatch origin for this call must be Signed by the Founder. - - `id`: The identifier of the asset to have some amount transferred. + Parameters: - - `target`: The account to be credited. + - `max_members` - The maximum number of members for the society. This must be no less than the current number of members. - - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. + - `max_intake` - The maximum number of candidates per intake period. - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + - `max_strikes`: The maximum number of strikes a member may get before they become suspended and may only be reinstated by the founder. - Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. + - `candidate_deposit`: The deposit required to make a bid for membership of the group. -### transferOwnership(id: `u32`, owner: `MultiAddress`) -- **interface**: `api.tx.poolAssets.transferOwnership` -- **summary**: Change the Owner of an asset. +### unbid() +- **interface**: `api.tx.society.unbid` +- **summary**: A bidder can remove their bid for entry into society. By doing so, they will have their candidate deposit returned or they will unvouch their voucher. - Origin must be Signed and the sender should be the Owner of the asset `id`. + Payment: The bid deposit is unreserved if the user made a bid. - - `id`: The identifier of the asset. + The dispatch origin for this call must be _Signed_ and a bidder. + +### unvouch() +- **interface**: `api.tx.society.unvouch` +- **summary**: As a vouching member, unvouch a bid. This only works while vouched user is only a bidder (and not a candidate). - - `owner`: The new Owner of this asset. + The dispatch origin for this call must be _Signed_ and a vouching member. - Emits `OwnerChanged`. + Parameters: - Weight: `O(1)` + - `pos`: Position in the `Bids` vector of the bid who should be unvouched. + +### vote(candidate: `MultiAddress`, approve: `bool`) +- **interface**: `api.tx.society.vote` +- **summary**: As a member, vote on a candidate. -___ + The dispatch origin for this call must be _Signed_ and a member. + + Parameters: + - `candidate`: The candidate that the member would like to bid on. -## proxy + - `approve`: A boolean which says if the candidate should be approved (`true`) or rejected (`false`). -### addProxy(delegate: `MultiAddress`, proxy_type: `AssetHubKusamaRuntimeProxyType`, delay: `u32`) -- **interface**: `api.tx.proxy.addProxy` -- **summary**: Register a proxy account for the sender that is able to make calls on its behalf. +### vouch(who: `MultiAddress`, value: `u128`, tip: `u128`) +- **interface**: `api.tx.society.vouch` +- **summary**: As a member, vouch for someone to join society by placing a bid on their behalf. - The dispatch origin for this call must be _Signed_. + There is no deposit required to vouch for a new bid, but a member can only vouch for one bid at a time. If the bid becomes a suspended candidate and ultimately rejected by the suspension judgement origin, the member will be banned from vouching again. + + As a vouching member, you can claim a tip if the candidate is accepted. This tip will be paid as a portion of the reward the member will receive for joining the society. + + The dispatch origin for this call must be _Signed_ and a member. Parameters: - - `proxy`: The account that the `caller` would like to make a proxy. + - `who`: The user who you would like to vouch for. - - `proxy_type`: The permissions allowed for this proxy account. + - `value`: The total reward to be paid between you and the candidate if they become a member in the society. - - `delay`: The announcement period required of the initial proxy. Will generally be zero. + - `tip`: Your cut of the total `value` payout when the candidate is inducted into the society. Tips larger than `value` will be saturated upon payout. -### announce(real: `MultiAddress`, call_hash: `H256`) -- **interface**: `api.tx.proxy.announce` -- **summary**: Publish the hash of a proxy-call that will be made in the future. +### waiveRepay(amount: `u128`) +- **interface**: `api.tx.society.waiveRepay` +- **summary**: Repay the payment previously given to the member with the signed origin, remove any pending payments, and elevate them from rank 0 to rank 1. - This must be called some number of blocks before the corresponding `proxy` is attempted if the delay associated with the proxy relationship is greater than zero. +___ - No more than `MaxPending` announcements may be made at any one time. - This will take a deposit of `AnnouncementDepositFactor` as well as `AnnouncementDepositBase` if there are no other pending announcements. +## staking + +### applySlash(slash_era: `u32`, slash_key: `(AccountId32,Perbill,u32)`) +- **interface**: `api.tx.staking.applySlash` +- **summary**: Manually and permissionlessly applies a deferred slash for a given era. - The dispatch origin for this call must be _Signed_ and a proxy of `real`. + Normally, slashes are automatically applied shortly after the start of the `slash_era`. The automatic application of slashes is handled by the pallet's internal logic, and it tries to apply one slash page per block of the era. If for some reason, one era is not enough for applying all slash pages, the remaining slashes need to be manually (permissionlessly) applied. - Parameters: + For a given era x, if at era x+1, slashes are still unapplied, all withdrawals get blocked, and these need to be manually applied by calling this function. This function exists as a **fallback mechanism** for this extreme situation, but we never expect to encounter this in normal scenarios. - - `real`: The account that the proxy will make a call on behalf of. + The parameters for this call can be queried by looking at the `UnappliedSlashes` storage for eras older than the active era. - - `call_hash`: The hash of the call to be made by the `real` account. - -### createPure(proxy_type: `AssetHubKusamaRuntimeProxyType`, delay: `u32`, index: `u16`) -- **interface**: `api.tx.proxy.createPure` -- **summary**: Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and initialize it with a proxy of `proxy_type` for `origin` sender. + #### Parameters - Requires a `Signed` origin. + - `slash_era`: The staking era in which the slash was originally scheduled. - - `proxy_type`: The type of the proxy that the sender will be registered as over the new account. This will almost always be the most permissive `ProxyType` possible to allow for maximum flexibility. + - `slash_key`: A unique identifier for the slash, represented as a tuple: - - `index`: A disambiguation index, in case this is called multiple times in the same transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just want to use `0`. + - `stash`: The stash account of the validator being slashed. - - `delay`: The announcement period required of the initial proxy. Will generally be zero. + - `slash_fraction`: The fraction of the stake that was slashed. - Fails with `Duplicate` if this has already been called in this transaction, from the same sender, with the same parameters. + - `page_index`: The index of the exposure page being processed. - Fails if there are insufficient funds to pay for deposit. - -### killPure(spawner: `MultiAddress`, proxy_type: `AssetHubKusamaRuntimeProxyType`, index: `u16`, height: `Compact`, ext_index: `Compact`) -- **interface**: `api.tx.proxy.killPure` -- **summary**: Removes a previously spawned pure proxy. + #### Behavior - WARNING: **All access to this account will be lost.** Any funds held in it will be inaccessible. + - The function is **permissionless**—anyone can call it. + + - The `slash_era` **must be the current era or a past era**. If it is in the future, the call fails with `EraNotStarted`. - Requires a `Signed` origin, and the sender account must have been created by a call to `pure` with corresponding parameters. + - The fee is waived if the slash is successfully applied. - - `spawner`: The account that originally called `pure` to create this account. + #### Future Improvement - - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + - Implement an **off-chain worker (OCW) task** to automatically apply slashes when there is unused block space, improving efficiency. + +### bond(value: `Compact`, payee: `PalletStakingAsyncRewardDestination`) +- **interface**: `api.tx.staking.bond` +- **summary**: Take the origin account as a stash and lock up `value` of its balance. `controller` will be the account that controls it. - - `proxy_type`: The proxy type originally passed to `pure`. + `value` must be more than the `minimum_balance` specified by `T::Currency`. - - `height`: The height of the chain when the call to `pure` was processed. + The dispatch origin for this call must be _Signed_ by the stash account. - - `ext_index`: The extrinsic index in which the call to `pure` was processed. + Emits `Bonded`. - Fails with `NoPermission` in case the caller is not a previously created pure account whose `pure` call has corresponding parameters. + NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned unless the `origin` falls below _existential deposit_ (or equal to 0) and gets removed as dust. -### pokeDeposit() -- **interface**: `api.tx.proxy.pokeDeposit` -- **summary**: Poke / Adjust deposits made for proxies and announcements based on current values. This can be used by accounts to possibly lower their locked amount. +### bondExtra(max_additional: `Compact`) +- **interface**: `api.tx.staking.bondExtra` +- **summary**: Add some extra amount that have appeared in the stash `free_balance` into the balance up for staking. - The dispatch origin for this call must be _Signed_. + The dispatch origin for this call must be _Signed_ by the stash, not the controller. - The transaction fee is waived if the deposit amount has changed. + Use this if there are additional funds in your stash account that you wish to bond. Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose any limitation on the amount that can be added. - Emits `DepositPoked` if successful. + Emits `Bonded`. -### proxy(real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`) -- **interface**: `api.tx.proxy.proxy` -- **summary**: Dispatch the given `call` from an account that the sender is authorised for through `add_proxy`. - - The dispatch origin for this call must be _Signed_. +### cancelDeferredSlash(era: `u32`, validator_slashes: `Vec<(AccountId32,Perbill)>`) +- **interface**: `api.tx.staking.cancelDeferredSlash` +- **summary**: Cancels scheduled slashes for a given era before they are applied. - Parameters: + This function allows `T::AdminOrigin` to cancel pending slashes for specified validators in a given era. The cancelled slashes are stored and will be checked when applying slashes. - - `real`: The account that the proxy will make a call on behalf of. + #### Parameters - - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + - `era`: The staking era for which slashes should be cancelled. This is the era where the slash would be applied, not the era in which the offence was committed. - - `call`: The call to be made by the `real` account. + - `validator_slashes`: A list of validator stash accounts and their slash fractions to be cancelled. -### proxyAnnounced(delegate: `MultiAddress`, real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`) -- **interface**: `api.tx.proxy.proxyAnnounced` -- **summary**: Dispatch the given `call` from an account that the sender is authorized for through `add_proxy`. +### chill() +- **interface**: `api.tx.staking.chill` +- **summary**: Declare no desire to either validate or nominate. - Removes any corresponding announcement(s). + Effects will be felt at the beginning of the next era. - The dispatch origin for this call must be _Signed_. + The dispatch origin for this call must be _Signed_ by the controller, not the stash. - Parameters: + #### Complexity - - `real`: The account that the proxy will make a call on behalf of. + - Independent of the arguments. Insignificant complexity. - - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + - Contains one read. - - `call`: The call to be made by the `real` account. + - Writes are limited to the `origin` account key. -### rejectAnnouncement(delegate: `MultiAddress`, call_hash: `H256`) -- **interface**: `api.tx.proxy.rejectAnnouncement` -- **summary**: Remove the given announcement of a delegate. +### chillOther(stash: `AccountId32`) +- **interface**: `api.tx.staking.chillOther` +- **summary**: Declare a `controller` to stop participating as either a validator or nominator. - May be called by a target (proxied) account to remove a call that one of their delegates (`delegate`) has announced they want to execute. The deposit is returned. + Effects will be felt at the beginning of the next era. - The dispatch origin for this call must be _Signed_. + The dispatch origin for this call must be _Signed_, but can be called by anyone. - Parameters: + If the caller is the same as the controller being targeted, then no further checks are enforced, and this function behaves just like `chill`. - - `delegate`: The account that previously announced the call. + If the caller is different than the controller being targeted, the following conditions must be met: - - `call_hash`: The hash of the call to be made. - -### removeAnnouncement(real: `MultiAddress`, call_hash: `H256`) -- **interface**: `api.tx.proxy.removeAnnouncement` -- **summary**: Remove a given announcement. + * `controller` must belong to a nominator who has become non-decodable, + + Or: + + * A `ChillThreshold` must be set and checked which defines how close to the max nominators or validators we must reach before users can start chilling one-another. + + * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine how close we are to the threshold. + + * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines if this is a person that should be chilled because they have not met the threshold bond required. + + This can be helpful if bond requirements are updated, and we need to remove old users who do not satisfy these requirements. + +### deprecateControllerBatch(controllers: `Vec`) +- **interface**: `api.tx.staking.deprecateControllerBatch` +- **summary**: Updates a batch of controller accounts to their corresponding stash account if they are not the same. Ignores any controller accounts that do not exist, and does not operate if the stash and controller are already the same. - May be called by a proxy account to remove a call they previously announced and return the deposit. + Effects will be felt instantly (as soon as this function is completed successfully). - The dispatch origin for this call must be _Signed_. + The dispatch origin must be `T::AdminOrigin`. + +### forceApplyMinCommission(validator_stash: `AccountId32`) +- **interface**: `api.tx.staking.forceApplyMinCommission` +- **summary**: Force a validator to have at least the minimum commission. This will not affect a validator who already has a commission greater than or equal to the minimum. Any account can call this. + +### forceNewEra() +- **interface**: `api.tx.staking.forceNewEra` +- **summary**: Force there to be a new era at the end of the next session. After this, it will be reset to normal (non-forced) behaviour. - Parameters: + The dispatch origin must be Root. - - `real`: The account that the proxy will make a call on behalf of. + #### Warning - - `call_hash`: The hash of the call to be made by the `real` account. + The election process starts multiple blocks before the end of the era. If this is called just before a new era is triggered, the election process may not have enough blocks to get a result. -### removeProxies() -- **interface**: `api.tx.proxy.removeProxies` -- **summary**: Unregister all proxy accounts for the sender. +### forceNewEraAlways() +- **interface**: `api.tx.staking.forceNewEraAlways` +- **summary**: Force there to be a new era at the end of sessions indefinitely. - The dispatch origin for this call must be _Signed_. + The dispatch origin must be Root. - WARNING: This may be called on accounts created by `pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** + #### Warning + + The election process starts multiple blocks before the end of the era. If this is called just before a new era is triggered, the election process may not have enough blocks to get a result. -### removeProxy(delegate: `MultiAddress`, proxy_type: `AssetHubKusamaRuntimeProxyType`, delay: `u32`) -- **interface**: `api.tx.proxy.removeProxy` -- **summary**: Unregister a proxy account for the sender. +### forceNoEras() +- **interface**: `api.tx.staking.forceNoEras` +- **summary**: Force there to be no new eras indefinitely. - The dispatch origin for this call must be _Signed_. + The dispatch origin must be Root. - Parameters: + #### Warning - - `proxy`: The account that the `caller` would like to remove as a proxy. + The election process starts multiple blocks before the end of the era. Thus the election process may be ongoing when this is called. In this case the election will continue until the next era is triggered. + +### forceUnstake(stash: `AccountId32`, num_slashing_spans: `u32`) +- **interface**: `api.tx.staking.forceUnstake` +- **summary**: Force a current staker to become completely unstaked, immediately. - - `proxy_type`: The permissions currently enabled for the removed proxy account. + The dispatch origin must be Root. #### Parameters -___ + - `stash`: The stash account to be unstaked. + - `num_slashing_spans`: **Deprecated**. This parameter is retained for backward compatibility. It no longer has any effect. + +### increaseValidatorCount(additional: `Compact`) +- **interface**: `api.tx.staking.increaseValidatorCount` +- **summary**: Increments the ideal number of validators up to maximum of `T::MaxValidatorSet`. -## remoteProxyRelayChain + The dispatch origin must be Root. -### registerRemoteProxyProof(proof: `PalletRemoteProxyRemoteProxyProof`) -- **interface**: `api.tx.remoteProxyRelayChain.registerRemoteProxyProof` -- **summary**: Register a given remote proxy proof in the current [`dispatch_context`]. +### kick(who: `Vec`) +- **interface**: `api.tx.staking.kick` +- **summary**: Remove the given nominations from the calling validator. - The registered remote proof can then be used later in the same context to execute a remote proxy call. This is for example useful when having a multisig operation. The multisig call can use [`Self::remote_proxy_with_registered_proof`] to get an approval by the members of the multisig. The final execution of the multisig call should be at least a batch of `register_remote_proxy_proof` and the multisig call that uses `remote_proxy_with_registered_proof`. This way the final approver can use a recent proof to prove the existence of the remote proxy. Otherwise it would require the multisig members to approve the call in [`Config::MaxStorageRootsToKeep`] amount of time. + Effects will be felt at the beginning of the next era. - It is supported to register multiple proofs, but the proofs need to be consumed in the reverse order as they were registered. Basically this means last in, first out. + The dispatch origin for this call must be _Signed_ by the controller, not the stash. - The [`dispatch_context`] spans the entire lifetime of a transaction and every call in the transaction gets access to the same context. + - `who`: A list of nominator stash accounts who are nominating this validator which should no longer be nominating this validator. - #### Example + Note: Making this call only makes sense if you first set the validator preferences to block any further nominations. + +### migrateCurrency(stash: `AccountId32`) +- **interface**: `api.tx.staking.migrateCurrency` +- **summary**: Migrates permissionlessly a stash from locks to holds. - ```ignore batch([ register_remote_proxy_proof, as_multisig(remote_proxy_with_registered_proof(transfer)) ]) ``` + This removes the old lock on the stake and creates a hold on it atomically. If all stake cannot be held, the best effort is made to hold as much as possible. The remaining stake is removed from the ledger. - As `proofs` can not be verified indefinitely (the time the storage roots are stored is limited) this function provides the possibility to provide a "fresh proof" at time of dispatch. As in the example above, this could be useful for multisig operation that depend on multiple members to approve a certain action, which can take multiple days. + The fee is waived if the migration is successful. -### remoteProxy(real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`, proof: `PalletRemoteProxyRemoteProxyProof`) -- **interface**: `api.tx.remoteProxyRelayChain.remoteProxy` -- **summary**: Dispatch the given `call` from an account that the sender is authorised on a remote chain. +### nominate(targets: `Vec`) +- **interface**: `api.tx.staking.nominate` +- **summary**: Declare the desire to nominate `targets` for the origin controller. - The dispatch origin for this call must be _Signed_. + Effects will be felt at the beginning of the next era. - Parameters: + The dispatch origin for this call must be _Signed_ by the controller, not the stash. + +### payoutStakers(validator_stash: `AccountId32`, era: `u32`) +- **interface**: `api.tx.staking.payoutStakers` +- **summary**: Pay out next page of the stakers behind a validator for the given era. - - `real`: The account that the proxy will make a call on behalf of. + - `validator_stash` is the stash account of the validator. - - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + - `era` may be any era between `[current_era - history_depth; current_era]`. - - `call`: The call to be made by the `real` account. + The origin of this call must be _Signed_. Any account can call this function, even if it is not one of the stakers. - - `proof`: The proof from the remote chain about the existence of the proxy. + The reward payout could be paged in case there are too many nominators backing the `validator_stash`. This call will payout unpaid pages in an ascending order. To claim a specific page, use `payout_stakers_by_page`.` + + If all pages are claimed, it returns an error `InvalidPage`. -### remoteProxyWithRegisteredProof(real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`) -- **interface**: `api.tx.remoteProxyRelayChain.remoteProxyWithRegisteredProof` -- **summary**: Dispatch the given `call` from an account that the sender is authorised on a remote chain. +### payoutStakersByPage(validator_stash: `AccountId32`, era: `u32`, page: `u32`) +- **interface**: `api.tx.staking.payoutStakersByPage` +- **summary**: Pay out a page of the stakers behind a validator for the given era and page. - The dispatch origin for this call must be _Signed_. The difference to [`Self::remote_proxy`] is that the proof nees to registered before using [`Self::register_remote_proxy_proof`] (see for more information). + - `validator_stash` is the stash account of the validator. - Parameters: + - `era` may be any era between `[current_era - history_depth; current_era]`. - - `real`: The account that the proxy will make a call on behalf of. + - `page` is the page index of nominators to pay out with value between 0 and `num_nominators / T::MaxExposurePageSize`. - - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + The origin of this call must be _Signed_. Any account can call this function, even if it is not one of the stakers. - - `call`: The call to be made by the `real` account. + If a validator has more than [`Config::MaxExposurePageSize`] nominators backing them, then the list of nominators is paged, with each page being capped at [`Config::MaxExposurePageSize`.] If a validator has more than one page of nominators, the call needs to be made for each page separately in order for all the nominators backing a validator to receive the reward. The nominators are not sorted across pages and so it should not be assumed the highest staker would be on the topmost page and vice versa. If rewards are not claimed in [`Config::HistoryDepth`] eras, they are lost. + +### pruneEraStep(era: `u32`) +- **interface**: `api.tx.staking.pruneEraStep` +- **summary**: Perform one step of era pruning to prevent PoV size exhaustion from unbounded deletions. -___ + This extrinsic enables permissionless lazy pruning of era data by performing incremental deletion of storage items. Each call processes a limited number of items based on available block weight to avoid exceeding block limits. + Returns `Pays::No` when work is performed to incentivize regular maintenance. Anyone can call this to help maintain the chain's storage health. -## revive + The era must be eligible for pruning (older than HistoryDepth + 1). Check `EraPruningState` storage to see if an era needs pruning before calling. -### call(dest: `H160`, value: `Compact`, gas_limit: `SpWeightsWeightV2Weight`, storage_deposit_limit: `Compact`, data: `Bytes`) -- **interface**: `api.tx.revive.call` -- **summary**: Makes a call to an account, optionally transferring some balance. - - #### Parameters - - * `dest`: Address of the contract to call. +### reapStash(stash: `AccountId32`, num_slashing_spans: `u32`) +- **interface**: `api.tx.staking.reapStash` +- **summary**: Remove all data structures concerning a staker/stash once it is at a state where it can be considered `dust` in the staking system. The requirements are: - * `value`: The balance to transfer from the `origin` to `dest`. + 1. the `total_balance` of the stash is below `min_chilled_bond` or is zero. 2. or, the `ledger.total` of the stash is below `min_chilled_bond` or is zero. - * `gas_limit`: The gas limit enforced when executing the constructor. + The former can happen in cases like a slash; the latter when a fully unbonded account is still receiving staking rewards in `RewardDestination::Staked`. - * `storage_deposit_limit`: The maximum amount of balance that can be charged from the caller to pay for the storage consumed. + It can be called by anyone, as long as `stash` meets the above requirements. - * `data`: The input data to pass to the contract. + Refunds the transaction fees upon successful execution. - * If the account is a smart-contract account, the associated code will be executed and any value will be transferred. + #### Parameters - * If the account is a regular account, any value will be transferred. + - `stash`: The stash account to be reaped. - * If no account exists and the call value is not less than `existential_deposit`, a regular account will be created and any value will be transferred. + - `num_slashing_spans`: **Deprecated**. This parameter is retained for backward compatibility. It no longer has any effect. -### dispatchAsFallbackAccount(call: `Call`) -- **interface**: `api.tx.revive.dispatchAsFallbackAccount` -- **summary**: Dispatch an `call` with the origin set to the callers fallback address. +### rebond(value: `Compact`) +- **interface**: `api.tx.staking.rebond` +- **summary**: Rebond a portion of the stash scheduled to be unlocked. - Every `AccountId32` can control its corresponding fallback account. The fallback account is the `AccountId20` with the last 12 bytes set to `0xEE`. This is essentially a recovery function in case an `AccountId20` was used without creating a mapping first. + The dispatch origin must be signed by the controller. -### ethTransact(payload: `Bytes`) -- **interface**: `api.tx.revive.ethTransact` -- **summary**: A raw EVM transaction, typically dispatched by an Ethereum JSON-RPC server. +### restoreLedger(stash: `AccountId32`, maybe_controller: `Option`, maybe_total: `Option`, maybe_unlocking: `Option>`) +- **interface**: `api.tx.staking.restoreLedger` +- **summary**: Restores the state of a ledger which is in an inconsistent state. - #### Parameters + The requirements to restore a ledger are the following: - * `payload`: The encoded [`crate::evm::TransactionSigned`]. + * The stash is bonded; or - * `gas_limit`: The gas limit enforced during contract execution. + * The stash is not bonded but it has a staking lock left behind; or - * `storage_deposit_limit`: The maximum balance that can be charged to the caller for storage usage. + * If the stash has an associated ledger and its state is inconsistent; or - #### Note + * If the ledger is not corrupted *but* its staking lock is out of sync. - This call cannot be dispatched directly; attempting to do so will result in a failed transaction. It serves as a wrapper for an Ethereum transaction. When submitted, the runtime converts it into a [`sp_runtime::generic::CheckedExtrinsic`] by recovering the signer and validating the transaction. + The `maybe_*` input parameters will overwrite the corresponding data and metadata of the ledger associated with the stash. If the input parameters are not set, the ledger will be reset values from on-chain state. -### instantiate(value: `Compact`, gas_limit: `SpWeightsWeightV2Weight`, storage_deposit_limit: `Compact`, code_hash: `H256`, data: `Bytes`, salt: `Option<[u8;32]>`) -- **interface**: `api.tx.revive.instantiate` -- **summary**: Instantiates a contract from a previously deployed wasm binary. +### scaleValidatorCount(factor: `Percent`) +- **interface**: `api.tx.staking.scaleValidatorCount` +- **summary**: Scale up the ideal number of validators by a factor up to maximum of `T::MaxValidatorSet`. - This function is identical to [`Self::instantiate_with_code`] but without the code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary must be supplied. + The dispatch origin must be Root. -### instantiateWithCode(value: `Compact`, gas_limit: `SpWeightsWeightV2Weight`, storage_deposit_limit: `Compact`, code: `Bytes`, data: `Bytes`, salt: `Option<[u8;32]>`) -- **interface**: `api.tx.revive.instantiateWithCode` -- **summary**: Instantiates a new contract from the supplied `code` optionally transferring some balance. - - This dispatchable has the same effect as calling [`Self::upload_code`] + [`Self::instantiate`]. Bundling them together provides efficiency gains. Please also check the documentation of [`Self::upload_code`]. - - #### Parameters +### setController() +- **interface**: `api.tx.staking.setController` +- **summary**: (Re-)sets the controller of a stash to the stash itself. This function previously accepted a `controller` argument to set the controller to an account other than the stash itself. This functionality has now been removed, now only setting the controller to the stash, if it is not already. - * `value`: The balance to transfer from the `origin` to the newly created contract. + Effects will be felt instantly (as soon as this function is completed successfully). - * `gas_limit`: The gas limit enforced when executing the constructor. + The dispatch origin for this call must be _Signed_ by the stash, not the controller. + +### setInvulnerables(invulnerables: `Vec`) +- **interface**: `api.tx.staking.setInvulnerables` +- **summary**: Set the validators who cannot be slashed (if any). - * `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved from the caller to pay for the storage consumed. + The dispatch origin must be Root. + +### setMinCommission(new: `Perbill`) +- **interface**: `api.tx.staking.setMinCommission` +- **summary**: Sets the minimum amount of commission that each validators must maintain. - * `code`: The contract code to deploy in raw bytes. + This call has lower privilege requirements than `set_staking_config` and can be called by the `T::AdminOrigin`. Root can always call this. + +### setPayee(payee: `PalletStakingAsyncRewardDestination`) +- **interface**: `api.tx.staking.setPayee` +- **summary**: (Re-)set the payment target for a controller. - * `data`: The input data to pass to the contract constructor. + Effects will be felt instantly (as soon as this function is completed successfully). - * `salt`: Used for the address derivation. If `Some` is supplied then `CREATE2` semantics are used. If `None` then `CRATE1` is used. + The dispatch origin for this call must be _Signed_ by the controller, not the stash. + +### setStakingConfigs(min_nominator_bond: `PalletStakingAsyncPalletConfigOpU128`, min_validator_bond: `PalletStakingAsyncPalletConfigOpU128`, max_nominator_count: `PalletStakingAsyncPalletConfigOpU32`, max_validator_count: `PalletStakingAsyncPalletConfigOpU32`, chill_threshold: `PalletStakingAsyncPalletConfigOpPercent`, min_commission: `PalletStakingAsyncPalletConfigOpPerbill`, max_staked_rewards: `PalletStakingAsyncPalletConfigOpPercent`) +- **interface**: `api.tx.staking.setStakingConfigs` +- **summary**: Update the various staking configurations . - + * `min_nominator_bond`: The minimum active bond needed to be a nominator. - Instantiation is executed as follows: + * `min_validator_bond`: The minimum active bond needed to be a validator. - - The supplied `code` is deployed, and a `code_hash` is created for that code. + * `max_nominator_count`: The max number of users who can be a nominator at once. When set to `None`, no limit is enforced. - - If the `code_hash` already exists on the chain the underlying `code` will be shared. + * `max_validator_count`: The max number of users who can be a validator at once. When set to `None`, no limit is enforced. - - The destination address is computed based on the sender, code_hash and the salt. + * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which should be filled in order for the `chill_other` transaction to work. - - The smart-contract account is created at the computed address. + * `min_commission`: The minimum amount of commission that each validators must maintain. This is checked only upon calling `validate`. Existing validators are not affected. - - The `value` is transferred to the new account. + RuntimeOrigin must be Root to call this function. - - The `deploy` function is executed in the context of the newly-created account. + NOTE: Existing nominators and validators will not be affected by this update. to kick people under the new limits, `chill_other` should be called. -### mapAccount() -- **interface**: `api.tx.revive.mapAccount` -- **summary**: Register the callers account id so that it can be used in contract interactions. +### setValidatorCount(new: `Compact`) +- **interface**: `api.tx.staking.setValidatorCount` +- **summary**: Sets the ideal number of validators. - This will error if the origin is already mapped or is a eth native `Address20`. It will take a deposit that can be released by calling [`Self::unmap_account`]. + The dispatch origin must be Root. -### removeCode(code_hash: `H256`) -- **interface**: `api.tx.revive.removeCode` -- **summary**: Remove the code stored under `code_hash` and refund the deposit to its owner. +### unbond(value: `Compact`) +- **interface**: `api.tx.staking.unbond` +- **summary**: Schedule a portion of the stash to be unlocked ready for transfer out after the bond period ends. If this leaves an amount actively bonded less than [`asset::existential_deposit`], then it is increased to the full amount. - A code can only be removed by its original uploader (its owner) and only if it is not used by any contract. - -### setCode(dest: `H160`, code_hash: `H256`) -- **interface**: `api.tx.revive.setCode` -- **summary**: Privileged function that changes the code of an existing contract. + The dispatch origin for this call must be _Signed_ by the controller, not the stash. - This takes care of updating refcounts and all other necessary operations. Returns an error if either the `code_hash` or `dest` do not exist. + Once the unlock period is done, you can call `withdraw_unbonded` to actually move the funds out of management ready for transfer. - #### Note + No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) can co-exists at the same time. If there are no unlocking chunks slots available [`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible). - This does **not** change the address of the contract in question. This means that the contract address is no longer derived from its code hash after calling this dispatchable. - -### unmapAccount() -- **interface**: `api.tx.revive.unmapAccount` -- **summary**: Unregister the callers account id in order to free the deposit. + If a user encounters the `InsufficientBond` error when calling this extrinsic, they should call `chill` first in order to free up their bonded funds. - There is no reason to ever call this function other than freeing up the deposit. This is only useful when the account should no longer be used. + Emits `Unbonded`. + + See also [`Call::withdraw_unbonded`]. -### uploadCode(code: `Bytes`, storage_deposit_limit: `Compact`) -- **interface**: `api.tx.revive.uploadCode` -- **summary**: Upload new `code` without instantiating a contract from it. +### updatePayee(controller: `AccountId32`) +- **interface**: `api.tx.staking.updatePayee` +- **summary**: Migrates an account's `RewardDestination::Controller` to `RewardDestination::Account(controller)`. - If the code does not already exist a deposit is reserved from the caller and unreserved only when [`Self::remove_code`] is called. The size of the reserve depends on the size of the supplied `code`. + Effects will be felt instantly (as soon as this function is completed successfully). - #### Note + This will waive the transaction fee if the `payee` is successfully migrated. + +### validate(prefs: `PalletStakingAsyncValidatorPrefs`) +- **interface**: `api.tx.staking.validate` +- **summary**: Declare the desire to validate for the origin controller. - Anyone can instantiate a contract from any uploaded code and thus prevent its removal. To avoid this situation a constructor could employ access control so that it can only be instantiated by permissioned entities. The same is true when uploading through [`Self::instantiate_with_code`]. + Effects will be felt at the beginning of the next era. -___ + The dispatch origin for this call must be _Signed_ by the controller, not the stash. + +### withdrawUnbonded(num_slashing_spans: `u32`) +- **interface**: `api.tx.staking.withdrawUnbonded` +- **summary**: Remove any stake that has been fully unbonded and is ready for withdrawal. + Stake is considered fully unbonded once [`Config::BondingDuration`] has elapsed since the unbonding was initiated. In rare cases—such as when offences for the unbonded era have been reported but not yet processed—withdrawal is restricted to eras for which all offences have been processed. -## session - -### purgeKeys() -- **interface**: `api.tx.session.purgeKeys` -- **summary**: Removes any session key(s) of the function caller. + The unlocked stake will be returned as free balance in the stash account. - This doesn't take effect until the next session. + The dispatch origin for this call must be _Signed_ by the controller. - The dispatch origin of this function must be Signed and the account must be either be convertible to a validator ID using the chain's typical addressing system (this usually means being a controller account) or directly convertible into a validator ID (which usually means being a stash account). + Emits `Withdrawn`. - #### Complexity + See also [`Call::unbond`]. - - `O(1)` in number of key types. Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. - -### setKeys(keys: `AssetHubKusamaRuntimeSessionKeys`, proof: `Bytes`) -- **interface**: `api.tx.session.setKeys` -- **summary**: 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. + #### Parameters - The dispatch origin of this function must be signed. + - `num_slashing_spans`: **Deprecated**. Retained only for backward compatibility; this parameter has no effect. - #### Complexity +___ - - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. + +## stakingRcClient + +### relayNewOffencePaged(offences: `Vec<(u32,PalletStakingAsyncRcClientOffence)>`) +- **interface**: `api.tx.stakingRcClient.relayNewOffencePaged` + +### relaySessionReport(report: `PalletStakingAsyncRcClientSessionReport`) +- **interface**: `api.tx.stakingRcClient.relaySessionReport` +- **summary**: Called to indicate the start of a new session on the relay chain. ___ @@ -3397,6 +5588,9 @@ ___ This call requires Root origin. +### doTask(task: `AssetHubKusamaRuntimeRuntimeTask`) +- **interface**: `api.tx.system.doTask` + ### killPrefix(prefix: `Bytes`, subkeys: `u32`) - **interface**: `api.tx.system.killPrefix` - **summary**: Kill all storage items with a key that starts with the given prefix. @@ -3472,6 +5666,141 @@ ___ ___ +## treasury + +### checkStatus(index: `u32`) +- **interface**: `api.tx.treasury.checkStatus` +- **summary**: Check the status of the spend and remove it from the storage if processed. + + #### Dispatch Origin + + Must be signed. + + #### Details + + The status check is a prerequisite for retrying a failed payout. If a spend has either succeeded or expired, it is removed from the storage by this function. In such instances, transaction fees are refunded. + + #### Parameters + + - `index`: The spend index. + + #### Events + + Emits [`Event::PaymentFailed`] if the spend payout has failed. Emits [`Event::SpendProcessed`] if the spend payout has succeed. + +### payout(index: `u32`) +- **interface**: `api.tx.treasury.payout` +- **summary**: Claim a spend. + + #### Dispatch Origin + + Must be signed + + #### Details + + Spends must be claimed within some temporal bounds. A spend may be claimed within one [`Config::PayoutPeriod`] from the `valid_from` block. In case of a payout failure, the spend status must be updated with the `check_status` dispatchable before retrying with the current function. + + #### Parameters + + - `index`: The spend index. + + #### Events + + Emits [`Event::Paid`] if successful. + +### removeApproval(proposal_id: `Compact`) +- **interface**: `api.tx.treasury.removeApproval` +- **summary**: Force a previously approved proposal to be removed from the approval queue. + + #### Dispatch Origin + + Must be [`Config::RejectOrigin`]. + + #### Details + + The original deposit will no longer be returned. + + #### Parameters + + - `proposal_id`: The index of a proposal + + #### Complexity + + - O(A) where `A` is the number of approvals + + #### Errors + + - [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the approval queue, i.e., the proposal has not been approved. This could also mean the proposal does not exist altogether, thus there is no way it would have been approved in the first place. + +### spend(asset_kind: `PolkadotRuntimeCommonImplsVersionedLocatableAsset`, amount: `Compact`, beneficiary: `ParachainsCommonPayVersionedLocatableAccount`, valid_from: `Option`) +- **interface**: `api.tx.treasury.spend` +- **summary**: Propose and approve a spend of treasury funds. + + #### Dispatch Origin + + Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted for assertion using the [`Config::BalanceConverter`]. + + #### Details + + Create an approved spend for transferring a specific `amount` of `asset_kind` to a designated beneficiary. The spend must be claimed using the `payout` dispatchable within the [`Config::PayoutPeriod`]. + + #### Parameters + + - `asset_kind`: An indicator of the specific asset class to be spent. + + - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + + - `beneficiary`: The beneficiary of the spend. + + - `valid_from`: The block number from which the spend can be claimed. It can refer to the past if the resulting spend has not yet expired according to the [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after approval. + + #### Events + + Emits [`Event::AssetSpendApproved`] if successful. + +### spendLocal(amount: `Compact`, beneficiary: `MultiAddress`) +- **interface**: `api.tx.treasury.spendLocal` +- **summary**: Propose and approve a spend of treasury funds. + + #### Dispatch Origin + + Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`. + + #### Details NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the beneficiary. + + #### Parameters + + - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + + - `beneficiary`: The destination account for the transfer. + + #### Events + + Emits [`Event::SpendApproved`] if successful. + +### voidSpend(index: `u32`) +- **interface**: `api.tx.treasury.voidSpend` +- **summary**: Void previously approved spend. + + #### Dispatch Origin + + Must be [`Config::RejectOrigin`]. + + #### Details + + A spend void is only possible if the payout has not been attempted yet. + + #### Parameters + + - `index`: The spend index. + + #### Events + + Emits [`Event::AssetSpendVoided`] if successful. + +___ + + ## uniques ### approveTransfer(collection: `u32`, item: `u32`, delegate: `MultiAddress`) @@ -4131,6 +6460,56 @@ ___ ___ +## voterList + +### putInFrontOf(lighter: `MultiAddress`) +- **interface**: `api.tx.voterList.putInFrontOf` +- **summary**: Move the caller's Id directly in front of `lighter`. + + The dispatch origin for this call must be _Signed_ and can only be called by the Id of the account going in front of `lighter`. Fee is payed by the origin under all circumstances. + + Only works if: + + - both nodes are within the same bag, + + - and `origin` has a greater `Score` than `lighter`. + +### putInFrontOfOther(heavier: `MultiAddress`, lighter: `MultiAddress`) +- **interface**: `api.tx.voterList.putInFrontOfOther` +- **summary**: Same as [`Pallet::put_in_front_of`], but it can be called by anyone. + + Fee is paid by the origin under all circumstances. + +### rebag(dislocated: `MultiAddress`) +- **interface**: `api.tx.voterList.rebag` +- **summary**: Declare that some `dislocated` account has, through rewards or penalties, sufficiently changed its score that it should properly fall into a different bag than its current one. + + Anyone can call this function about any potentially dislocated account. + + Will always update the stored score of `dislocated` to the correct score, based on `ScoreProvider`. + + If `dislocated` does not exists, it returns an error. + +___ + + +## whitelist + +### dispatchWhitelistedCall(call_hash: `H256`, call_encoded_len: `u32`, call_weight_witness: `SpWeightsWeightV2Weight`) +- **interface**: `api.tx.whitelist.dispatchWhitelistedCall` + +### dispatchWhitelistedCallWithPreimage(call: `Call`) +- **interface**: `api.tx.whitelist.dispatchWhitelistedCallWithPreimage` + +### removeWhitelistedCall(call_hash: `H256`) +- **interface**: `api.tx.whitelist.removeWhitelistedCall` + +### whitelistCall(call_hash: `H256`) +- **interface**: `api.tx.whitelist.whitelistCall` + +___ + + ## xcmpQueue ### resumeXcmExecution() diff --git a/docs/asset-hub-kusama/rpc.md b/docs/asset-hub-kusama/rpc.md index 6e591b76e..6356c75aa 100644 --- a/docs/asset-hub-kusama/rpc.md +++ b/docs/asset-hub-kusama/rpc.md @@ -12,8 +12,6 @@ The following sections contain known RPC methods that may be available on specif - **[dev](#dev)** -- **[engine](#engine)** - - **[offchain](#offchain)** - **[payment](#payment)** @@ -164,21 +162,6 @@ ___ ___ -## engine - -### createBlock(createEmpty: `bool`, finalize: `bool`, parentHash?: `BlockHash`): `CreatedBlock` -- **interface**: `api.rpc.engine.createBlock` -- **jsonrpc**: `engine_createBlock` -- **summary**: Instructs the manual-seal authorship task to create a new block - -### finalizeBlock(hash: `BlockHash`, justification?: `Justification`): `bool` -- **interface**: `api.rpc.engine.finalizeBlock` -- **jsonrpc**: `engine_finalizeBlock` -- **summary**: Instructs the manual-seal authorship task to finalize a block - -___ - - ## offchain ### localStorageClear(kind: `StorageKind`, key: `Bytes`): `Null` diff --git a/docs/asset-hub-kusama/runtime.md b/docs/asset-hub-kusama/runtime.md index 8326c5545..aba7dfee4 100644 --- a/docs/asset-hub-kusama/runtime.md +++ b/docs/asset-hub-kusama/runtime.md @@ -12,6 +12,8 @@ The following section contains known runtime calls that may be available on spec - **[auraUnincludedSegmentApi](#auraunincludedsegmentapi)** +- **[authorizedAliasersApi](#authorizedaliasersapi)** + - **[blockBuilder](#blockbuilder)** - **[collectCollationInfo](#collectcollationinfo)** @@ -24,22 +26,34 @@ The following section contains known runtime calls that may be available on spec - **[genesisBuilder](#genesisbuilder)** +- **[getParachainInfo](#getparachaininfo)** + - **[locationToAccountApi](#locationtoaccountapi)** - **[metadata](#metadata)** +- **[nominationPoolsApi](#nominationpoolsapi)** + - **[offchainWorkerApi](#offchainworkerapi)** +- **[relayParentOffsetApi](#relayparentoffsetapi)** + - **[reviveApi](#reviveapi)** +- **[runtimeViewFunction](#runtimeviewfunction)** + - **[sessionKeys](#sessionkeys)** +- **[stakingApi](#stakingapi)** + - **[taggedTransactionQueue](#taggedtransactionqueue)** - **[transactionPaymentApi](#transactionpaymentapi)** - **[transactionPaymentCallApi](#transactionpaymentcallapi)** +- **[trustedQueryApi](#trustedqueryapi)** + - **[xcmPaymentApi](#xcmpaymentapi)** @@ -58,17 +72,17 @@ ___ ## assetConversionApi -### getReserves(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`): `Option<(u128,u128)>` +### getReserves(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`): `Option<(u128,u128)>` - **interface**: `api.call.assetConversionApi.getReserves` - **runtime**: `assetConversionApi_get_reserves` - **summary**: Returns the size of the liquidity pool for the given asset pair. -### quotePriceExactTokensForTokens(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`, amount: `u128`, include_fee: `bool`): `Option` +### quotePriceExactTokensForTokens(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`, amount: `u128`, include_fee: `bool`): `Option` - **interface**: `api.call.assetConversionApi.quotePriceExactTokensForTokens` - **runtime**: `assetConversionApi_quote_price_exact_tokens_for_tokens` - **summary**: Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_out_min` to control slippage.) -### quotePriceTokensForExactTokens(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`, amount: `u128`, include_fee: `bool`): `Option` +### quotePriceTokensForExactTokens(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`, amount: `u128`, include_fee: `bool`): `Option` - **interface**: `api.call.assetConversionApi.quotePriceTokensForExactTokens` - **runtime**: `assetConversionApi_quote_price_tokens_for_exact_tokens` - **summary**: Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_in_max` to control slippage.) @@ -101,6 +115,21 @@ ___ ___ +## authorizedAliasersApi + +### authorizedAliasers(target: `XcmVersionedLocation`): `Result, XcmRuntimeApisAuthorizedAliasesError>` +- **interface**: `api.call.authorizedAliasersApi.authorizedAliasers` +- **runtime**: `authorizedAliasersApi_authorized_aliasers` +- **summary**: Returns locations allowed to alias into and act as `target`. + +### isAuthorizedAlias(origin: `XcmVersionedLocation`, target: `XcmVersionedLocation`): `Result` +- **interface**: `api.call.authorizedAliasersApi.isAuthorizedAlias` +- **runtime**: `authorizedAliasersApi_is_authorized_alias` +- **summary**: Returns whether `origin` is allowed to alias into and act as `target`. + +___ + + ## blockBuilder ### applyExtrinsic(extrinsic: `SpRuntimeUncheckedExtrinsic`): `Result, SpRuntimeTransactionValidityTransactionValidityError>` @@ -201,6 +230,16 @@ ___ ___ +## getParachainInfo + +### parachainId(): `PolkadotParachainPrimitivesPrimitivesId` +- **interface**: `api.call.getParachainInfo.parachainId` +- **runtime**: `getParachainInfo_parachain_id` +- **summary**: Retrieve the parachain id used for runtime. + +___ + + ## locationToAccountApi ### convertLocation(location: `XcmVersionedLocation`): `Result` @@ -231,6 +270,61 @@ ___ ___ +## nominationPoolsApi + +### balanceToPoints(pool_id: `u32`, new_funds: `u128`): `u128` +- **interface**: `api.call.nominationPoolsApi.balanceToPoints` +- **runtime**: `nominationPoolsApi_balance_to_points` +- **summary**: Returns the equivalent points of `new_funds` for a given pool. + +### memberNeedsDelegateMigration(member: `SpCoreCryptoAccountId32`): `bool` +- **interface**: `api.call.nominationPoolsApi.memberNeedsDelegateMigration` +- **runtime**: `nominationPoolsApi_member_needs_delegate_migration` +- **summary**: Returns true if the delegated funds of the pool `member` needs migration.,, Once a pool has successfully migrated to the strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake), the funds of the, member can be migrated from pool account to the member's account. Use, [`migrate_delegation`](pallet_nomination_pools::Call::migrate_delegation), to migrate the funds of the pool member. + +### memberPendingSlash(member: `SpCoreCryptoAccountId32`): `u128` +- **interface**: `api.call.nominationPoolsApi.memberPendingSlash` +- **runtime**: `nominationPoolsApi_member_pending_slash` +- **summary**: Returns the pending slash for a given pool member.,, If pending slash of the member exceeds `ExistentialDeposit`, it can be reported on, chain. + +### memberTotalBalance(who: `SpCoreCryptoAccountId32`): `u128` +- **interface**: `api.call.nominationPoolsApi.memberTotalBalance` +- **runtime**: `nominationPoolsApi_member_total_balance` +- **summary**: Returns the total contribution of a pool member including any balance that is unbonding. + +### pendingRewards(who: `SpCoreCryptoAccountId32`): `u128` +- **interface**: `api.call.nominationPoolsApi.pendingRewards` +- **runtime**: `nominationPoolsApi_pending_rewards` +- **summary**: Returns the pending rewards for the member that the AccountId was given for. + +### pointsToBalance(pool_id: `u32`, points: `u128`): `u128` +- **interface**: `api.call.nominationPoolsApi.pointsToBalance` +- **runtime**: `nominationPoolsApi_points_to_balance` +- **summary**: Returns the equivalent balance of `points` for a given pool. + +### poolAccounts(pool_id: `u32`): `(AccountId32,AccountId32)` +- **interface**: `api.call.nominationPoolsApi.poolAccounts` +- **runtime**: `nominationPoolsApi_pool_accounts` +- **summary**: Returns the bonded account and reward account associated with the pool_id. + +### poolBalance(pool_id: `u32`): `u128` +- **interface**: `api.call.nominationPoolsApi.poolBalance` +- **runtime**: `nominationPoolsApi_pool_balance` +- **summary**: Total balance contributed to the pool. + +### poolNeedsDelegateMigration(pool_id: `u32`): `bool` +- **interface**: `api.call.nominationPoolsApi.poolNeedsDelegateMigration` +- **runtime**: `nominationPoolsApi_pool_needs_delegate_migration` +- **summary**: Returns true if the pool with `pool_id` needs migration.,, This can happen when the `pallet-nomination-pools` has switched to using strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool, still has funds that were staked using the older strategy, [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use, [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake), to migrate the pool. + +### poolPendingSlash(pool_id: `u32`): `u128` +- **interface**: `api.call.nominationPoolsApi.poolPendingSlash` +- **runtime**: `nominationPoolsApi_pool_pending_slash` +- **summary**: Returns the pending slash for a given pool. + +___ + + ## offchainWorkerApi ### offchainWorker(header: `SpRuntimeHeader`): `Null` @@ -241,13 +335,33 @@ ___ ___ +## relayParentOffsetApi + +### relayParentOffset(): `u32` +- **interface**: `api.call.relayParentOffsetApi.relayParentOffset` +- **runtime**: `relayParentOffsetApi_relay_parent_offset` +- **summary**: Fetch the slot offset that is expected from the relay chain. + +___ + + ## reviveApi +### address(account_id: `SpCoreCryptoAccountId32`): `PrimitiveTypesH160` +- **interface**: `api.call.reviveApi.address` +- **runtime**: `reviveApi_address` +- **summary**: Get the H160 address associated to this account id + ### balance(address: `PrimitiveTypesH160`): `PrimitiveTypesU256` - **interface**: `api.call.reviveApi.balance` - **runtime**: `reviveApi_balance` - **summary**: Returns the free balance of the given `[H160]` address, using EVM decimals. +### blockAuthor(): `Option` +- **interface**: `api.call.reviveApi.blockAuthor` +- **runtime**: `reviveApi_block_author` +- **summary**: The address of the validator that produced the current block. + ### blockGasLimit(): `PrimitiveTypesU256` - **interface**: `api.call.reviveApi.blockGasLimit` - **runtime**: `reviveApi_block_gas_limit` @@ -258,10 +372,15 @@ ___ - **runtime**: `reviveApi_call` - **summary**: Perform a call from a specified account to a given contract.,, See [`crate::Pallet::bare_call`]. +### code(address: `PrimitiveTypesH160`): `Bytes` +- **interface**: `api.call.reviveApi.code` +- **runtime**: `reviveApi_code` +- **summary**: The code at the specified address taking pre-compiles into account. + ### ethTransact(tx: `PalletReviveEvmApiRpcTypesGenGenericTransaction`): `Result` - **interface**: `api.call.reviveApi.ethTransact` - **runtime**: `reviveApi_eth_transact` -- **summary**: Perform an Ethereum call.,, See [`crate::Pallet::bare_eth_transact`] +- **summary**: Perform an Ethereum call.,, See [`crate::Pallet::dry_run_eth_transact`] ### gasPrice(): `PrimitiveTypesU256` - **interface**: `api.call.reviveApi.gasPrice` @@ -273,6 +392,11 @@ ___ - **runtime**: `reviveApi_get_storage` - **summary**: Query a given storage key in a given contract.,, Returns `Ok(Some(Vec))` if the storage value exists under the given key in the, specified account and `Ok(None)` if it doesn't. If the account specified by the address, doesn't exist, or doesn't have a contract then `Err` is returned. +### getStorageVarKey(address: `PrimitiveTypesH160`, key: `Bytes`): `Result, PalletRevivePrimitivesContractAccessError>` +- **interface**: `api.call.reviveApi.getStorageVarKey` +- **runtime**: `reviveApi_get_storage_var_key` +- **summary**: Query a given variable-sized storage key in a given contract.,, Returns `Ok(Some(Vec))` if the storage value exists under the given key in the, specified account and `Ok(None)` if it doesn't. If the account specified by the address, doesn't exist, or doesn't have a contract then `Err` is returned. + ### instantiate(origin: `SpCoreCryptoAccountId32`, value: `u128`, gas_limit: `Option`, storage_deposit_limit: `Option`, code: `PalletRevivePrimitivesCode`, data: `Bytes`, salt: `Option<[u8;32]>`): `PalletRevivePrimitivesContractResultInstantiateReturnValue` - **interface**: `api.call.reviveApi.instantiate` - **runtime**: `reviveApi_instantiate` @@ -283,6 +407,11 @@ ___ - **runtime**: `reviveApi_nonce` - **summary**: Returns the nonce of the given `[H160]` address. +### runtimePalletsAddress(): `PrimitiveTypesH160` +- **interface**: `api.call.reviveApi.runtimePalletsAddress` +- **runtime**: `reviveApi_runtime_pallets_address` +- **summary**: The address used to call the runtime's pallets dispatchables + ### traceBlock(block: `SpRuntimeBlock`, config: `PalletReviveEvmApiDebugRpcTypesTracerType`): `Vec<(u32,PalletReviveEvmApiDebugRpcTypesTrace)>` - **interface**: `api.call.reviveApi.traceBlock` - **runtime**: `reviveApi_trace_block` @@ -306,6 +435,16 @@ ___ ___ +## runtimeViewFunction + +### executeViewFunction(query_id: `FrameSupportViewFunctionsViewFunctionId`, input: `Bytes`): `Result` +- **interface**: `api.call.runtimeViewFunction.executeViewFunction` +- **runtime**: `runtimeViewFunction_execute_view_function` +- **summary**: Execute a view function query. + +___ + + ## sessionKeys ### decodeSessionKeys(encoded: `Bytes`): `Option>` @@ -321,6 +460,26 @@ ___ ___ +## stakingApi + +### erasStakersPageCount(era: `u32`, account: `SpCoreCryptoAccountId32`): `u32` +- **interface**: `api.call.stakingApi.erasStakersPageCount` +- **runtime**: `stakingApi_eras_stakers_page_count` +- **summary**: Returns the page count of exposures for a validator `account` in a given era. + +### nominationsQuota(balance: `u128`): `u32` +- **interface**: `api.call.stakingApi.nominationsQuota` +- **runtime**: `stakingApi_nominations_quota` +- **summary**: Returns the nominations quota for a nominator with a given balance. + +### pendingRewards(era: `u32`, account: `SpCoreCryptoAccountId32`): `bool` +- **interface**: `api.call.stakingApi.pendingRewards` +- **runtime**: `stakingApi_pending_rewards` +- **summary**: Returns true if validator `account` has pages to be claimed for the given era. + +___ + + ## taggedTransactionQueue ### validateTransaction(source: `SpRuntimeTransactionValidityTransactionSource`, tx: `SpRuntimeUncheckedExtrinsic`, block_hash: `PrimitiveTypesH256`): `Result` @@ -381,6 +540,21 @@ ___ ___ +## trustedQueryApi + +### isTrustedReserve(asset: `XcmVersionedAsset`, location: `XcmVersionedLocation`): `Result` +- **interface**: `api.call.trustedQueryApi.isTrustedReserve` +- **runtime**: `trustedQueryApi_is_trusted_reserve` +- **summary**: Returns if the location is a trusted reserve for the asset.,, # Arguments, * `asset`: `VersionedAsset`., * `location`: `VersionedLocation`. + +### isTrustedTeleporter(asset: `XcmVersionedAsset`, location: `XcmVersionedLocation`): `Result` +- **interface**: `api.call.trustedQueryApi.isTrustedTeleporter` +- **runtime**: `trustedQueryApi_is_trusted_teleporter` +- **summary**: Returns if the asset can be teleported to the location.,, # Arguments, * `asset`: `VersionedAsset`., * `location`: `VersionedLocation`. + +___ + + ## xcmPaymentApi ### queryAcceptablePaymentAssets(xcm_version: `u32`): `Result, XcmRuntimeApisFeesError>` diff --git a/docs/asset-hub-kusama/storage.md b/docs/asset-hub-kusama/storage.md index d65e10b09..2664bbc8a 100644 --- a/docs/asset-hub-kusama/storage.md +++ b/docs/asset-hub-kusama/storage.md @@ -6,8 +6,14 @@ The following sections contain Storage methods are part of the default asset-hub (NOTE: These were generated from a static/snapshot view of a recent default asset-hub-kusama runtime. Some items may not be available in older nodes, or in any customized implementations.) +- **[ahMigrator](#ahmigrator)** + +- **[ahOps](#ahops)** + - **[assetConversion](#assetconversion)** +- **[assetRate](#assetrate)** + - **[assets](#assets)** - **[aura](#aura)** @@ -18,34 +24,72 @@ The following sections contain Storage methods are part of the default asset-hub - **[balances](#balances)** +- **[bounties](#bounties)** + +- **[childBounties](#childbounties)** + +- **[claims](#claims)** + - **[collatorSelection](#collatorselection)** +- **[convictionVoting](#convictionvoting)** + +- **[delegatedStaking](#delegatedstaking)** + - **[foreignAssets](#foreignassets)** +- **[indices](#indices)** + - **[messageQueue](#messagequeue)** +- **[multiBlockElection](#multiblockelection)** + +- **[multiBlockElectionSigned](#multiblockelectionsigned)** + +- **[multiBlockElectionVerifier](#multiblockelectionverifier)** + +- **[multiBlockMigrations](#multiblockmigrations)** + - **[multisig](#multisig)** - **[nftFractionalization](#nftfractionalization)** - **[nfts](#nfts)** +- **[nominationPools](#nominationpools)** + - **[parachainInfo](#parachaininfo)** - **[parachainSystem](#parachainsystem)** +- **[parameters](#parameters)** + - **[polkadotXcm](#polkadotxcm)** - **[poolAssets](#poolassets)** +- **[preimage](#preimage)** + - **[proxy](#proxy)** +- **[recovery](#recovery)** + +- **[referenda](#referenda)** + - **[remoteProxyRelayChain](#remoteproxyrelaychain)** - **[revive](#revive)** +- **[scheduler](#scheduler)** + - **[session](#session)** +- **[society](#society)** + +- **[staking](#staking)** + +- **[stakingRcClient](#stakingrcclient)** + - **[stateTrieMigration](#statetriemigration)** - **[substrate](#substrate)** @@ -58,29 +102,142 @@ The following sections contain Storage methods are part of the default asset-hub - **[transactionPayment](#transactionpayment)** +- **[treasury](#treasury)** + - **[uniques](#uniques)** - **[vesting](#vesting)** +- **[voterList](#voterlist)** + +- **[whitelist](#whitelist)** + - **[xcmpQueue](#xcmpqueue)** ___ +## ahMigrator + +### ahBalancesBefore(): `PalletAhMigratorBalancesBefore` +- **interface**: `api.query.ahMigrator.ahBalancesBefore` +- **summary**: Helper storage item to store the total balance / total issuance of native token at the start of the migration. Since teleports are disabled during migration, the total issuance will not change for other reason than the migration itself. + +### ahMigrationStage(): `PalletAhMigratorMigrationStage` +- **interface**: `api.query.ahMigrator.ahMigrationStage` +- **summary**: The Asset Hub migration state. + +### dmpQueuePriorityConfig(): `PalletRcMigratorQueuePriority` +- **interface**: `api.query.ahMigrator.dmpQueuePriorityConfig` +- **summary**: The priority of the DMP queue during migration. + + Controls how the DMP (Downward Message Passing) queue is processed relative to other queues during the migration process. This helps ensure timely processing of migration messages. The default priority pattern is defined in the pallet configuration, but can be overridden by a storage value of this type. + +### manager(): `Option` +- **interface**: `api.query.ahMigrator.manager` +- **summary**: An optional account id of a manager. + + This account id has similar privileges to [`Config::AdminOrigin`] except that it can not set the manager account id via `set_manager` call. + +### migrationEndBlock(): `Option` +- **interface**: `api.query.ahMigrator.migrationEndBlock` +- **summary**: Block number when migration finished and extrinsics were unlocked. + + This is set when entering the `MigrationDone` stage hence when `RcMigrationStage::is_finished()` becomes `true`. + +### migrationStartBlock(): `Option` +- **interface**: `api.query.ahMigrator.migrationStartBlock` +- **summary**: The block number at which the migration began and the pallet's extrinsics were locked. + + This value is set when entering the `WaitingForAh` stage, i.e., when `RcMigrationStage::is_ongoing()` becomes `true`. + +### rcAccounts(`AccountId32`): `Option` +- **interface**: `api.query.ahMigrator.rcAccounts` +- **summary**: RC accounts that failed to migrate when were received on the Asset Hub. + + This is unlikely to happen, since we dry run the migration, but we keep it for completeness. + +___ + + +## ahOps + +### rcCrowdloanContribution(`u32, u32, AccountId32`): `Option<(AccountId32,u128)>` +- **interface**: `api.query.ahOps.rcCrowdloanContribution` +- **summary**: Amount of balance that a contributor made towards a crowdloan. + + `withdraw_crowdloan_contribution` can be permissionlessly called once the block number passed to unlock the balance for a specific account. + + The keys are as follows: + + - Block number after which the balance can be unlocked. + + - The para_id of the crowdloan. + + - The account that made the contribution. + + The value is (fund_pot, balance). The contribution pot is the second key in the `RcCrowdloanContribution` storage. + +### rcCrowdloanReserve(`u32, u32, AccountId32`): `Option` +- **interface**: `api.query.ahOps.rcCrowdloanReserve` +- **summary**: The reserve that was taken to create a crowdloan. + + This is normally 500 DOT and can be refunded as last step after all `RcCrowdloanContribution`s of this loan have been withdrawn. + + Keys: + + - Block number after which this can be unreserved + + - The para_id of the crowdloan + + - The account that will have the balance unreserved + +### rcLeaseReserve(`u32, u32, AccountId32`): `Option` +- **interface**: `api.query.ahOps.rcLeaseReserve` +- **summary**: Amount of balance that was reserved for winning a lease auction. + + `unreserve_lease_deposit` can be permissionlessly called once the block number passed to unreserve the deposit. It is implicitly called by `withdraw_crowdloan_contribution`. + + The account here can either be a crowdloan account or a solo bidder. If it is a crowdloan account, then the summed up contributions for it in the contributions map will equate the reserved balance here. + + The keys are as follows: + + - Block number after which the deposit can be unreserved. + + - The para_id of the lease slot. + + - The account that will have the balance unreserved. + + - The balance to be unreserved. + +___ + + ## assetConversion ### nextPoolAssetId(): `Option` - **interface**: `api.query.assetConversion.nextPoolAssetId` - **summary**: Stores the `PoolAssetId` that is going to be used for the next lp token. This gets incremented whenever a new lp pool is created. -### pools(`(StagingXcmV4Location,StagingXcmV4Location)`): `Option` +### pools(`(StagingXcmV5Location,StagingXcmV5Location)`): `Option` - **interface**: `api.query.assetConversion.pools` - **summary**: Map from `PoolAssetId` to `PoolInfo`. This establishes whether a pool has been officially created rather than people sending tokens directly to a pool's public account. ___ +## assetRate + +### conversionRateToNative(`PolkadotRuntimeCommonImplsVersionedLocatableAsset`): `Option` +- **interface**: `api.query.assetRate.conversionRateToNative` +- **summary**: Maps an asset to its fixed point representation in the native balance. + + E.g. `native_amount = asset_amount * ConversionRateToNative::::get(asset_kind)` + +___ + + ## assets ### account(`u32, AccountId32`): `Option` @@ -169,11 +326,11 @@ ___ But this comes with tradeoffs, storing account balances in the system pallet stores `frame_system` data alongside the account data contrary to storing account balances in the `Balances` pallet, which uses a `StorageMap` to store balances data only. NOTE: This is only used in the case that this pallet is used to store balances. -### freezes(`AccountId32`): `Vec` +### freezes(`AccountId32`): `Vec` - **interface**: `api.query.balances.freezes` - **summary**: Freeze locks on account balances. -### holds(`AccountId32`): `Vec<{"id":"AssetHubKusamaRuntimeRuntimeHoldReason","amount":"u128"}>` +### holds(`AccountId32`): `Vec` - **interface**: `api.query.balances.holds` - **summary**: Holds on account balances. @@ -200,6 +357,87 @@ ___ ___ +## bounties + +### bounties(`u32`): `Option` +- **interface**: `api.query.bounties.bounties` +- **summary**: Bounties that have been made. + +### bountyApprovals(): `Vec` +- **interface**: `api.query.bounties.bountyApprovals` +- **summary**: Bounty indices that have been approved but not yet funded. + +### bountyCount(): `u32` +- **interface**: `api.query.bounties.bountyCount` +- **summary**: Number of bounty proposals that have been made. + +### bountyDescriptions(`u32`): `Option` +- **interface**: `api.query.bounties.bountyDescriptions` +- **summary**: The description of each bounty. + +___ + + +## childBounties + +### childBounties(`u32, u32`): `Option` +- **interface**: `api.query.childBounties.childBounties` +- **summary**: Child bounties that have been added. + +### childBountyCount(): `u32` +- **interface**: `api.query.childBounties.childBountyCount` +- **summary**: DEPRECATED: Replaced with `ParentTotalChildBounties` storage item keeping dedicated counts for each parent bounty. Number of total child bounties. Will be removed in May 2025. + +### childBountyDescriptionsV1(`u32, u32`): `Option` +- **interface**: `api.query.childBounties.childBountyDescriptionsV1` +- **summary**: The description of each child-bounty. Indexed by `(parent_id, child_id)`. + + This item replaces the `ChildBountyDescriptions` storage item from the V0 storage version. + +### childrenCuratorFees(`u32`): `u128` +- **interface**: `api.query.childBounties.childrenCuratorFees` +- **summary**: The cumulative child-bounty curator fee for each parent bounty. + +### parentChildBounties(`u32`): `u32` +- **interface**: `api.query.childBounties.parentChildBounties` +- **summary**: Number of active child bounties per parent bounty. Map of parent bounty index to number of child bounties. + +### parentTotalChildBounties(`u32`): `u32` +- **interface**: `api.query.childBounties.parentTotalChildBounties` +- **summary**: Number of total child bounties per parent bounty, including completed bounties. + +### v0ToV1ChildBountyIds(`u32`): `Option<(u32,u32)>` +- **interface**: `api.query.childBounties.v0ToV1ChildBountyIds` +- **summary**: The mapping of the child bounty ids from storage version `V0` to the new `V1` version. + + The `V0` ids based on total child bounty count [`ChildBountyCount`]`. The `V1` version ids based on the child bounty count per parent bounty [`ParentTotalChildBounties`]. The item intended solely for client convenience and not used in the pallet's core logic. + +___ + + +## claims + +### claims(`EthereumAddress`): `Option` +- **interface**: `api.query.claims.claims` + +### preclaims(`AccountId32`): `Option` +- **interface**: `api.query.claims.preclaims` +- **summary**: Pre-claimed Ethereum accounts, by the Account ID that they are claimed to. + +### signing(`EthereumAddress`): `Option` +- **interface**: `api.query.claims.signing` +- **summary**: The statement kind that must be signed, if any. + +### total(): `u128` +- **interface**: `api.query.claims.total` + +### vesting(`EthereumAddress`): `Option<(u128,u128,u32)>` +- **interface**: `api.query.claims.vesting` +- **summary**: Vesting schedule for a claim. First balance is the total amount that should be held for vesting. Second balance is how much should be unlocked per block. The block number is when the vesting should start. + +___ + + ## collatorSelection ### candidacyBond(): `u128` @@ -231,25 +469,61 @@ ___ ___ +## convictionVoting + +### classLocksFor(`AccountId32`): `Vec<(u16,u128)>` +- **interface**: `api.query.convictionVoting.classLocksFor` +- **summary**: The voting classes which have a non-zero lock requirement and the lock amounts which they require. The actual amount locked on behalf of this pallet should always be the maximum of this list. + +### votingFor(`AccountId32, u16`): `PalletConvictionVotingVoteVoting` +- **interface**: `api.query.convictionVoting.votingFor` +- **summary**: All voting for a particular voter in a particular voting class. We store the balance for the number of votes that we have recorded. + +___ + + +## delegatedStaking + +### agents(`AccountId32`): `Option` +- **interface**: `api.query.delegatedStaking.agents` +- **summary**: Map of `Agent` to their `Ledger`. + +### counterForAgents(): `u32` +- **interface**: `api.query.delegatedStaking.counterForAgents` +- **summary**: Counter for the related counted storage map + +### counterForDelegators(): `u32` +- **interface**: `api.query.delegatedStaking.counterForDelegators` +- **summary**: Counter for the related counted storage map + +### delegators(`AccountId32`): `Option` +- **interface**: `api.query.delegatedStaking.delegators` +- **summary**: Map of Delegators to their `Delegation`. + + Implementation note: We are not using a double map with `delegator` and `agent` account as keys since we want to restrict delegators to delegate only to one account at a time. + +___ + + ## foreignAssets -### account(`StagingXcmV4Location, AccountId32`): `Option` +### account(`StagingXcmV5Location, AccountId32`): `Option` - **interface**: `api.query.foreignAssets.account` - **summary**: The holdings of a specific account for a specific asset. -### approvals(`StagingXcmV4Location, AccountId32, AccountId32`): `Option` +### approvals(`StagingXcmV5Location, AccountId32, AccountId32`): `Option` - **interface**: `api.query.foreignAssets.approvals` - **summary**: Approved balance transfers. First balance is the amount approved for transfer. Second is the amount of `T::Currency` reserved for storing this. First key is the asset ID, second key is the owner and third key is the delegate. -### asset(`StagingXcmV4Location`): `Option` +### asset(`StagingXcmV5Location`): `Option` - **interface**: `api.query.foreignAssets.asset` - **summary**: Details of an asset. -### metadata(`StagingXcmV4Location`): `{"deposit":"u128","name":"Bytes","symbol":"Bytes","decimals":"u8","isFrozen":"bool"}` +### metadata(`StagingXcmV5Location`): `{"deposit":"u128","name":"Bytes","symbol":"Bytes","decimals":"u8","isFrozen":"bool"}` - **interface**: `api.query.foreignAssets.metadata` - **summary**: Metadata of an asset. -### nextAssetId(): `Option` +### nextAssetId(): `Option` - **interface**: `api.query.foreignAssets.nextAssetId` - **summary**: The asset ID enforced for the next asset creation, if any present. Otherwise, this storage item has no effect. @@ -260,6 +534,15 @@ ___ ___ +## indices + +### accounts(`u32`): `Option<(AccountId32,u128,bool)>` +- **interface**: `api.query.indices.accounts` +- **summary**: The lookup from index to account. + +___ + + ## messageQueue ### bookStateFor(`CumulusPrimitivesCoreAggregateMessageOrigin`): `PalletMessageQueueBookState` @@ -277,6 +560,137 @@ ___ ___ +## multiBlockElection + +### currentPhase(): `PalletElectionProviderMultiBlockPhase` +- **interface**: `api.query.multiBlockElection.currentPhase` +- **summary**: Current phase. + +### desiredTargets(`u32`): `Option` +- **interface**: `api.query.multiBlockElection.desiredTargets` +- **summary**: Desired number of targets to elect for this round. + +### pagedTargetSnapshot(`u32, u32`): `Option>` +- **interface**: `api.query.multiBlockElection.pagedTargetSnapshot` +- **summary**: Paginated target snapshot. + + For the time being, since we assume one pages of targets, at most ONE key will exist. + +### pagedTargetSnapshotHash(`u32, u32`): `Option` +- **interface**: `api.query.multiBlockElection.pagedTargetSnapshotHash` +- **summary**: Same as [`PagedTargetSnapshot`], but it will store the hash of the snapshot. + + The hash is generated using [`frame_system::Config::Hashing`]. + +### pagedVoterSnapshot(`u32, u32`): `Option)>>` +- **interface**: `api.query.multiBlockElection.pagedVoterSnapshot` +- **summary**: Paginated voter snapshot. At most [`T::Pages`] keys will exist. + +### pagedVoterSnapshotHash(`u32, u32`): `Option` +- **interface**: `api.query.multiBlockElection.pagedVoterSnapshotHash` +- **summary**: Same as [`PagedVoterSnapshot`], but it will store the hash of the snapshot. + + The hash is generated using [`frame_system::Config::Hashing`]. + +### round(): `u32` +- **interface**: `api.query.multiBlockElection.round` +- **summary**: Internal counter for the number of rounds. + + This is useful for de-duplication of transactions submitted to the pool, and general diagnostics of the pallet. + + This is merely incremented once per every time that an upstream `elect` is called. + +___ + + +## multiBlockElectionSigned + +### invulnerables(): `Vec` +- **interface**: `api.query.multiBlockElectionSigned.invulnerables` +- **summary**: Accounts whitelisted by governance to always submit their solutions. + + They are different in that: + + * They always pay a fixed deposit for submission, specified by [`Config::InvulnerableDeposit`]. They pay no page deposit. + + * If _ejected_ by better solution from [`SortedScores`], they will get their full deposit back. + + * They always get their tx-fee back even if they are _discarded_. + +### sortedScores(`u32`): `Vec<(AccountId32,SpNposElectionsElectionScore)>` +- **interface**: `api.query.multiBlockElectionSigned.sortedScores` + +### submissionMetadataStorage(`u32, AccountId32`): `Option` +- **interface**: `api.query.multiBlockElectionSigned.submissionMetadataStorage` +- **summary**: Map from account to the metadata of their submission. + + invariant: for any Key1 of type `AccountId` in [`Submissions`], this storage map also has a value. + +### submissionStorage(`u32, AccountId32, u32`): `Option` +- **interface**: `api.query.multiBlockElectionSigned.submissionStorage` +- **summary**: Triple map from (round, account, page) to a solution page. + +___ + + +## multiBlockElectionVerifier + +### minimumScore(): `Option` +- **interface**: `api.query.multiBlockElectionVerifier.minimumScore` +- **summary**: The minimum score that each solution must attain in order to be considered feasible. + +### queuedSolutionBackings(`u32, u32`): `Option>` +- **interface**: `api.query.multiBlockElectionVerifier.queuedSolutionBackings` +- **summary**: The `(amount, count)` of backings, divided per page. + + This is stored because in the last block of verification we need them to compute the score, and check `MaxBackersPerWinnerFinal`. + + This can only ever live for the invalid variant of the solution. Once it is valid, we don't need this information anymore; the score is already computed once in [`QueuedSolutionScore`], and the backing counts are checked. + +### queuedSolutionScore(`u32`): `Option` +- **interface**: `api.query.multiBlockElectionVerifier.queuedSolutionScore` +- **summary**: The score of the valid variant of [`QueuedSolution`]. + + This only ever lives for the `valid` variant. + +### queuedSolutionX(`u32, u32`): `Option` +- **interface**: `api.query.multiBlockElectionVerifier.queuedSolutionX` +- **summary**: The `X` variant of the current queued solution. Might be the valid one or not. + + The two variants of this storage item is to avoid the need of copying. Recall that once a `VerifyingSolution` is being processed, it needs to write its partial supports *somewhere*. Writing theses supports on top of a *good* queued supports is wrong, since we might bail. Writing them to a bugger and copying at the ned is slightly better, but expensive. This flag system is best of both worlds. + +### queuedSolutionY(`u32, u32`): `Option` +- **interface**: `api.query.multiBlockElectionVerifier.queuedSolutionY` +- **summary**: The `Y` variant of the current queued solution. Might be the valid one or not. + +### queuedValidVariant(`u32`): `PalletElectionProviderMultiBlockVerifierImplsValidSolution` +- **interface**: `api.query.multiBlockElectionVerifier.queuedValidVariant` +- **summary**: Pointer to the variant of [`QueuedSolutionX`] or [`QueuedSolutionY`] that is currently valid. + +### statusStorage(): `PalletElectionProviderMultiBlockVerifierImplsStatus` +- **interface**: `api.query.multiBlockElectionVerifier.statusStorage` +- **summary**: Storage item for [`Status`]. + +___ + + +## multiBlockMigrations + +### cursor(): `Option` +- **interface**: `api.query.multiBlockMigrations.cursor` +- **summary**: The currently active migration to run and its cursor. + + `None` indicates that no migration is running. + +### historic(`Bytes`): `Option` +- **interface**: `api.query.multiBlockMigrations.historic` +- **summary**: Set of all successfully executed migrations. + + This is used as blacklist, to not re-execute migrations that have not been removed from the codebase yet. Governance can regularly clear this out via `clear_historic`. + +___ + + ## multisig ### multisigs(`AccountId32, [u8;32]`): `Option` @@ -360,6 +774,105 @@ ___ ___ +## nominationPools + +### bondedPools(`u32`): `Option` +- **interface**: `api.query.nominationPools.bondedPools` +- **summary**: Storage for bonded pools. + +### claimPermissions(`AccountId32`): `PalletNominationPoolsClaimPermission` +- **interface**: `api.query.nominationPools.claimPermissions` +- **summary**: Map from a pool member account to their opted claim permission. + +### counterForBondedPools(): `u32` +- **interface**: `api.query.nominationPools.counterForBondedPools` +- **summary**: Counter for the related counted storage map + +### counterForMetadata(): `u32` +- **interface**: `api.query.nominationPools.counterForMetadata` +- **summary**: Counter for the related counted storage map + +### counterForPoolMembers(): `u32` +- **interface**: `api.query.nominationPools.counterForPoolMembers` +- **summary**: Counter for the related counted storage map + +### counterForReversePoolIdLookup(): `u32` +- **interface**: `api.query.nominationPools.counterForReversePoolIdLookup` +- **summary**: Counter for the related counted storage map + +### counterForRewardPools(): `u32` +- **interface**: `api.query.nominationPools.counterForRewardPools` +- **summary**: Counter for the related counted storage map + +### counterForSubPoolsStorage(): `u32` +- **interface**: `api.query.nominationPools.counterForSubPoolsStorage` +- **summary**: Counter for the related counted storage map + +### globalMaxCommission(): `Option` +- **interface**: `api.query.nominationPools.globalMaxCommission` +- **summary**: The maximum commission that can be charged by a pool. Used on commission payouts to bound pool commissions that are > `GlobalMaxCommission`, necessary if a future `GlobalMaxCommission` is lower than some current pool commissions. + +### lastPoolId(): `u32` +- **interface**: `api.query.nominationPools.lastPoolId` +- **summary**: Ever increasing number of all pools created so far. + +### maxPoolMembers(): `Option` +- **interface**: `api.query.nominationPools.maxPoolMembers` +- **summary**: Maximum number of members that can exist in the system. If `None`, then the count members are not bound on a system wide basis. + +### maxPoolMembersPerPool(): `Option` +- **interface**: `api.query.nominationPools.maxPoolMembersPerPool` +- **summary**: Maximum number of members that may belong to pool. If `None`, then the count of members is not bound on a per pool basis. + +### maxPools(): `Option` +- **interface**: `api.query.nominationPools.maxPools` +- **summary**: Maximum number of nomination pools that can exist. If `None`, then an unbounded number of pools can exist. + +### metadata(`u32`): `Bytes` +- **interface**: `api.query.nominationPools.metadata` +- **summary**: Metadata for the pool. + +### minCreateBond(): `u128` +- **interface**: `api.query.nominationPools.minCreateBond` +- **summary**: Minimum bond required to create a pool. + + This is the amount that the depositor must put as their initial stake in the pool, as an indication of "skin in the game". + + This is the value that will always exist in the staking ledger of the pool bonded account while all other accounts leave. + +### minJoinBond(): `u128` +- **interface**: `api.query.nominationPools.minJoinBond` +- **summary**: Minimum amount to bond to join a pool. + +### poolMembers(`AccountId32`): `Option` +- **interface**: `api.query.nominationPools.poolMembers` +- **summary**: Active members. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### reversePoolIdLookup(`AccountId32`): `Option` +- **interface**: `api.query.nominationPools.reversePoolIdLookup` +- **summary**: A reverse lookup from the pool's account id to its id. + + This is only used for slashing and on automatic withdraw update. In all other instances, the pool id is used, and the accounts are deterministically derived from it. + +### rewardPools(`u32`): `Option` +- **interface**: `api.query.nominationPools.rewardPools` +- **summary**: Reward pools. This is where there rewards for each pool accumulate. When a members payout is claimed, the balance comes out of the reward pool. Keyed by the bonded pools account. + +### subPoolsStorage(`u32`): `Option` +- **interface**: `api.query.nominationPools.subPoolsStorage` +- **summary**: Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool, hence the name sub-pools. Keyed by the bonded pools account. + +### totalValueLocked(): `u128` +- **interface**: `api.query.nominationPools.totalValueLocked` +- **summary**: The sum of funds across all pools. + + This might be lower but never higher than the sum of `total_balance` of all [`PoolMembers`] because calling `pool_withdraw_unbonded` might decrease the total stake of the pool's `bonded_account` without adjusting the pallet-internal `UnbondingPool`'s. + +___ + + ## parachainInfo ### parachainId(): `u32` @@ -405,8 +918,6 @@ ___ ### hrmpWatermark(): `u32` - **interface**: `api.query.parachainSystem.hrmpWatermark` - **summary**: HRMP watermark that was set in a block. - - This will be cleared in `on_initialize` of each new block. ### lastDmqMqcHead(): `H256` - **interface**: `api.query.parachainSystem.lastDmqMqcHead` @@ -420,6 +931,18 @@ ___ This value is loaded before and saved after processing inbound downward messages carried by the system inherent. +### lastProcessedDownwardMessage(): `Option` +- **interface**: `api.query.parachainSystem.lastProcessedDownwardMessage` +- **summary**: The last processed downward message. + + We need to keep track of this to filter the messages that have been already processed. + +### lastProcessedHrmpMessage(): `Option` +- **interface**: `api.query.parachainSystem.lastProcessedHrmpMessage` +- **summary**: The last processed HRMP message. + + We need to keep track of this to filter the messages that have been already processed. + ### lastRelayChainBlockNumber(): `u32` - **interface**: `api.query.parachainSystem.lastRelayChainBlockNumber` - **summary**: The relay chain block number associated with the last parachain block. @@ -507,6 +1030,15 @@ ___ ___ +## parameters + +### parameters(`AssetHubKusamaRuntimeRuntimeParametersKey`): `Option` +- **interface**: `api.query.parameters.parameters` +- **summary**: Stored parameters. + +___ + + ## polkadotXcm ### assetTraps(`H256`): `u32` @@ -607,19 +1139,85 @@ ___ ___ +## preimage + +### preimageFor(`(H256,u32)`): `Option` +- **interface**: `api.query.preimage.preimageFor` + +### requestStatusFor(`H256`): `Option` +- **interface**: `api.query.preimage.requestStatusFor` +- **summary**: The request status of a given hash. + +### statusFor(`H256`): `Option` +- **interface**: `api.query.preimage.statusFor` +- **summary**: The request status of a given hash. + +___ + + ## proxy ### announcements(`AccountId32`): `(Vec,u128)` - **interface**: `api.query.proxy.announcements` - **summary**: The announcements made by the proxy (key). -### proxies(`AccountId32`): `(Vec,u128)` +### proxies(`AccountId32`): `(Vec,u128)` - **interface**: `api.query.proxy.proxies` - **summary**: The set of account proxies. Maps the account which has delegated to the accounts which are being delegated to, together with the amount held on deposit. ___ +## recovery + +### activeRecoveries(`AccountId32, AccountId32`): `Option` +- **interface**: `api.query.recovery.activeRecoveries` +- **summary**: Active recovery attempts. + + First account is the account to be recovered, and the second account is the user trying to recover the account. + +### proxy(`AccountId32`): `Option` +- **interface**: `api.query.recovery.proxy` +- **summary**: The list of allowed proxy accounts. + + Map from the user who can access it to the recovered account. + +### recoverable(`AccountId32`): `Option` +- **interface**: `api.query.recovery.recoverable` +- **summary**: The set of recoverable accounts and their recovery configuration. + +___ + + +## referenda + +### decidingCount(`u16`): `u32` +- **interface**: `api.query.referenda.decidingCount` +- **summary**: The number of referenda being decided currently. + +### metadataOf(`u32`): `Option` +- **interface**: `api.query.referenda.metadataOf` +- **summary**: The metadata is a general information concerning the referendum. The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON dump or IPFS hash of a JSON file. + + Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove) large preimages. + +### referendumCount(): `u32` +- **interface**: `api.query.referenda.referendumCount` +- **summary**: The next free referendum index, aka the number of referenda started so far. + +### referendumInfoFor(`u32`): `Option` +- **interface**: `api.query.referenda.referendumInfoFor` +- **summary**: Information concerning any given referendum. + +### trackQueue(`u16`): `Vec<(u32,u128)>` +- **interface**: `api.query.referenda.trackQueue` +- **summary**: The sorted list of referenda ready to be decided but not yet being decided, ordered by conviction-weighted approvals. + + This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. + +___ + + ## remoteProxyRelayChain ### blockToRoot(): `Vec<(u32,H256)>` @@ -631,14 +1229,14 @@ ___ ## revive -### codeInfoOf(`H256`): `Option` +### accountInfoOf(`H160`): `Option` +- **interface**: `api.query.revive.accountInfoOf` +- **summary**: The data associated to a contract or externally owned account. + +### codeInfoOf(`H256`): `Option` - **interface**: `api.query.revive.codeInfoOf` - **summary**: A mapping from a contract's code hash to its code info. -### contractInfoOf(`H160`): `Option` -- **interface**: `api.query.revive.contractInfoOf` -- **summary**: The code associated with a given account. - ### deletionQueue(`u32`): `Option` - **interface**: `api.query.revive.deletionQueue` - **summary**: Evicted contracts that await child trie deletion. @@ -666,6 +1264,29 @@ ___ ___ +## scheduler + +### agenda(`u32`): `Vec>` +- **interface**: `api.query.scheduler.agenda` +- **summary**: Items to be executed, indexed by the block number that they should be executed on. + +### incompleteSince(): `Option` +- **interface**: `api.query.scheduler.incompleteSince` +- **summary**: Block number at which the agenda began incomplete execution. + +### lookup(`[u8;32]`): `Option<(u32,u32)>` +- **interface**: `api.query.scheduler.lookup` +- **summary**: Lookup from a name to the block number and index of the task. + + For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4 identities. + +### retries(`(u32,u32)`): `Option` +- **interface**: `api.query.scheduler.retries` +- **summary**: Retry configurations for items to be executed, indexed by task address. + +___ + + ## session ### currentIndex(): `u32` @@ -701,6 +1322,378 @@ ___ ___ +## society + +### bids(): `Vec` +- **interface**: `api.query.society.bids` +- **summary**: The current bids, stored ordered by the value of the bid. + +### candidates(`AccountId32`): `Option` +- **interface**: `api.query.society.candidates` + +### challengeRoundCount(): `u32` +- **interface**: `api.query.society.challengeRoundCount` +- **summary**: The number of challenge rounds there have been. Used to identify stale DefenderVotes. + +### defenderVotes(`u32, AccountId32`): `Option` +- **interface**: `api.query.society.defenderVotes` +- **summary**: Votes for the defender, keyed by challenge round. + +### defending(): `Option<(AccountId32,AccountId32,PalletSocietyTally)>` +- **interface**: `api.query.society.defending` +- **summary**: The defending member currently being challenged, along with a running tally of votes. + +### founder(): `Option` +- **interface**: `api.query.society.founder` +- **summary**: The first member. + +### head(): `Option` +- **interface**: `api.query.society.head` +- **summary**: The most primary from the most recently approved rank 0 members in the society. + +### memberByIndex(`u32`): `Option` +- **interface**: `api.query.society.memberByIndex` +- **summary**: The current items in `Members` keyed by their unique index. Keys are densely populated `0..MemberCount` (does not include `MemberCount`). + +### memberCount(): `u32` +- **interface**: `api.query.society.memberCount` +- **summary**: The number of items in `Members` currently. (Doesn't include `SuspendedMembers`.) + +### members(`AccountId32`): `Option` +- **interface**: `api.query.society.members` +- **summary**: The current members and their rank. Doesn't include `SuspendedMembers`. + +### nextChallengeAt(): `Option` +- **interface**: `api.query.society.nextChallengeAt` +- **summary**: Next challenge rotation scheduled with [Config::BlockNumberProvider]. + +### nextHead(): `Option` +- **interface**: `api.query.society.nextHead` +- **summary**: At the end of the claim period, this contains the most recently approved members (along with their bid and round ID) who is from the most recent round with the lowest bid. They will become the new `Head`. + +### nextIntakeAt(): `Option` +- **interface**: `api.query.society.nextIntakeAt` +- **summary**: Next intake rotation scheduled with [Config::BlockNumberProvider]. + +### parameters(): `Option` +- **interface**: `api.query.society.parameters` +- **summary**: The max number of members for the society at one time. + +### payouts(`AccountId32`): `PalletSocietyPayoutRecord` +- **interface**: `api.query.society.payouts` +- **summary**: Information regarding rank-0 payouts, past and future. + +### pot(): `u128` +- **interface**: `api.query.society.pot` +- **summary**: Amount of our account balance that is specifically for the next round's bid(s). + +### roundCount(): `u32` +- **interface**: `api.query.society.roundCount` +- **summary**: The number of rounds which have passed. + +### rules(): `Option` +- **interface**: `api.query.society.rules` +- **summary**: A hash of the rules of this society concerning membership. Can only be set once and only by the founder. + +### skeptic(): `Option` +- **interface**: `api.query.society.skeptic` +- **summary**: The current skeptic. + +### suspendedMembers(`AccountId32`): `Option` +- **interface**: `api.query.society.suspendedMembers` +- **summary**: The set of suspended members, with their old membership record. + +### voteClearCursor(`AccountId32`): `Option` +- **interface**: `api.query.society.voteClearCursor` +- **summary**: Clear-cursor for Vote, map from Candidate -> (Maybe) Cursor. + +### votes(`AccountId32, AccountId32`): `Option` +- **interface**: `api.query.society.votes` +- **summary**: Double map from Candidate -> Voter -> (Maybe) Vote. + +___ + + +## staking + +### activeEra(): `Option` +- **interface**: `api.query.staking.activeEra` +- **summary**: The active era information, it holds index and start. + + The active era is the era being currently rewarded. Validator set of this era must be equal to what is RC's session pallet. + +### bonded(`AccountId32`): `Option` +- **interface**: `api.query.staking.bonded` +- **summary**: Map from all locked "stash" accounts to the controller account. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### bondedEras(): `Vec<(u32,u32)>` +- **interface**: `api.query.staking.bondedEras` +- **summary**: A mapping from still-bonded eras to the first session index of that era. + + Must contains information for eras for the range: `[active_era - bounding_duration; active_era]` + +### canceledSlashPayout(): `u128` +- **interface**: `api.query.staking.canceledSlashPayout` +- **summary**: The amount of currency given to reporters of a slash event which was canceled by extraordinary circumstances (e.g. governance). + +### cancelledSlashes(`u32`): `Vec<(AccountId32,Perbill)>` +- **interface**: `api.query.staking.cancelledSlashes` +- **summary**: Cancelled slashes by era and validator with maximum slash fraction to be cancelled. + + When slashes are cancelled by governance, this stores the era and the validators whose slashes should be cancelled, along with the maximum slash fraction that should be cancelled for each validator. + +### chillThreshold(): `Option` +- **interface**: `api.query.staking.chillThreshold` +- **summary**: The threshold for when users can start calling `chill_other` for other validators / nominators. The threshold is compared to the actual number of validators / nominators (`CountFor*`) in the system compared to the configured max (`Max*Count`). + +### claimedRewards(`u32, AccountId32`): `Vec` +- **interface**: `api.query.staking.claimedRewards` +- **summary**: History of claimed paged rewards by era and validator. + + This is keyed by era and validator stash which maps to the set of page indexes which have been claimed. + + It is removed after [`Config::HistoryDepth`] eras. + +### counterForNominators(): `u32` +- **interface**: `api.query.staking.counterForNominators` +- **summary**: Counter for the related counted storage map + +### counterForValidators(): `u32` +- **interface**: `api.query.staking.counterForValidators` +- **summary**: Counter for the related counted storage map + +### counterForVirtualStakers(): `u32` +- **interface**: `api.query.staking.counterForVirtualStakers` +- **summary**: Counter for the related counted storage map + +### currentEra(): `Option` +- **interface**: `api.query.staking.currentEra` +- **summary**: The current planned era index. + + This is the latest planned era, depending on how the Session pallet queues the validator set, it might be active or not. + +### electableStashes(): `BTreeSet` +- **interface**: `api.query.staking.electableStashes` +- **summary**: A bounded list of the "electable" stashes that resulted from a successful election. + +### eraPruningState(`u32`): `Option` +- **interface**: `api.query.staking.eraPruningState` +- **summary**: Tracks the current step of era pruning process for each era being lazily pruned. + +### erasRewardPoints(`u32`): `PalletStakingAsyncEraRewardPoints` +- **interface**: `api.query.staking.erasRewardPoints` +- **summary**: Rewards for the last [`Config::HistoryDepth`] eras. If reward hasn't been set or has been removed then 0 reward is returned. + +### erasStakersOverview(`u32, AccountId32`): `Option` +- **interface**: `api.query.staking.erasStakersOverview` +- **summary**: Summary of validator exposure at a given era. + + This contains the total stake in support of the validator and their own stake. In addition, it can also be used to get the number of nominators backing this validator and the number of exposure pages they are divided into. The page count is useful to determine the number of pages of rewards that needs to be claimed. + + This is keyed first by the era index to allow bulk deletion and then the stash account. Should only be accessed through `Eras`. + + Is it removed after [`Config::HistoryDepth`] eras. If stakers hasn't been set or has been removed then empty overview is returned. + +### erasStakersPaged(`u32, AccountId32, u32`): `Option` +- **interface**: `api.query.staking.erasStakersPaged` +- **summary**: Paginated exposure of a validator at given era. + + This is keyed first by the era index to allow bulk deletion, then stash account and finally the page. Should only be accessed through `Eras`. + + This is cleared after [`Config::HistoryDepth`] eras. + +### erasTotalStake(`u32`): `u128` +- **interface**: `api.query.staking.erasTotalStake` +- **summary**: The total amount staked for the last [`Config::HistoryDepth`] eras. If total hasn't been set or has been removed then 0 stake is returned. + +### erasValidatorPrefs(`u32, AccountId32`): `PalletStakingAsyncValidatorPrefs` +- **interface**: `api.query.staking.erasValidatorPrefs` +- **summary**: Exposure of validator at era with the preferences of validators. + + This is keyed first by the era index to allow bulk deletion and then the stash account. + + Is it removed after [`Config::HistoryDepth`] eras. + +### erasValidatorReward(`u32`): `Option` +- **interface**: `api.query.staking.erasValidatorReward` +- **summary**: The total validator era payout for the last [`Config::HistoryDepth`] eras. + + Eras that haven't finished yet or has been removed doesn't have reward. + +### forceEra(): `PalletStakingAsyncForcing` +- **interface**: `api.query.staking.forceEra` +- **summary**: Mode of era forcing. + +### invulnerables(): `Vec` +- **interface**: `api.query.staking.invulnerables` +- **summary**: Any validators that may never be slashed or forcibly kicked. It's a Vec since they're easy to initialize and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets. + +### ledger(`AccountId32`): `Option` +- **interface**: `api.query.staking.ledger` +- **summary**: Map from all (unlocked) "controller" accounts to the info regarding the staking. + + Note: All the reads and mutations to this storage *MUST* be done through the methods exposed by [`StakingLedger`] to ensure data and lock consistency. + +### maxNominatorsCount(): `Option` +- **interface**: `api.query.staking.maxNominatorsCount` +- **summary**: The maximum nominator count before we stop allowing new validators to join. + + When this value is not set, no limits are enforced. + +### maxStakedRewards(): `Option` +- **interface**: `api.query.staking.maxStakedRewards` +- **summary**: Maximum staked rewards, i.e. the percentage of the era inflation that is used for stake rewards. See [Era payout](./index.html#era-payout). + +### maxValidatorsCount(): `Option` +- **interface**: `api.query.staking.maxValidatorsCount` +- **summary**: The maximum validator count before we stop allowing new validators to join. + + When this value is not set, no limits are enforced. + +### minCommission(): `Perbill` +- **interface**: `api.query.staking.minCommission` +- **summary**: The minimum amount of commission that validators can set. + + If set to `0`, no limit exists. + +### minimumActiveStake(): `u128` +- **interface**: `api.query.staking.minimumActiveStake` +- **summary**: The minimum active nominator stake of the last successful election. + +### minNominatorBond(): `u128` +- **interface**: `api.query.staking.minNominatorBond` +- **summary**: The minimum active bond to become and maintain the role of a nominator. + +### minValidatorBond(): `u128` +- **interface**: `api.query.staking.minValidatorBond` +- **summary**: The minimum active bond to become and maintain the role of a validator. + +### nextElectionPage(): `Option` +- **interface**: `api.query.staking.nextElectionPage` +- **summary**: Keeps track of an ongoing multi-page election solution request. + + If `Some(_)``, it is the next page that we intend to elect. If `None`, we are not in the election process. + + This is only set in multi-block elections. Should always be `None` otherwise. + +### nominators(`AccountId32`): `Option` +- **interface**: `api.query.staking.nominators` +- **summary**: The map from nominator stash key to their nomination preferences, namely the validators that they wish to support. + + Note that the keys of this storage map might become non-decodable in case the account's [`NominationsQuota::MaxNominations`] configuration is decreased. In this rare case, these nominators are still existent in storage, their key is correct and retrievable (i.e. `contains_key` indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable nominators will effectively not-exist, until they re-submit their preferences such that it is within the bounds of the newly set `Config::MaxNominations`. + + This implies that `::iter_keys().count()` and `::iter().count()` might return different values for this map. Moreover, the main `::count()` is aligned with the former, namely the number of keys that exist. + + Lastly, if any of the nominators become non-decodable, they can be chilled immediately via [`Call::chill_other`] dispatchable by anyone. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### offenceQueue(`u32, AccountId32`): `Option` +- **interface**: `api.query.staking.offenceQueue` +- **summary**: Stores reported offences in a queue until they are processed in subsequent blocks. + + Each offence is recorded under the corresponding era index and the offending validator's account. If an offence spans multiple pages, only one page is processed at a time. Offences are handled sequentially, with their associated slashes computed and stored in `UnappliedSlashes`. These slashes are then applied in a future era as determined by `SlashDeferDuration`. + + Any offences tied to an era older than `BondingDuration` are automatically dropped. Processing always prioritizes the oldest era first. + +### offenceQueueEras(): `Option>` +- **interface**: `api.query.staking.offenceQueueEras` +- **summary**: Tracks the eras that contain offences in `OffenceQueue`, sorted from **earliest to latest**. + + - This ensures efficient retrieval of the oldest offence without iterating through `OffenceQueue`. + + - When a new offence is added to `OffenceQueue`, its era is **inserted in sorted order** if not already present. + + - When all offences for an era are processed, it is **removed** from this list. + + - The maximum length of this vector is bounded by `BondingDuration`. + + This eliminates the need for expensive iteration and sorting when fetching the next offence to process. + +### payee(`AccountId32`): `Option` +- **interface**: `api.query.staking.payee` +- **summary**: Where the reward payment should be made. Keyed by stash. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### processingOffence(): `Option<(u32,AccountId32,PalletStakingAsyncSlashingOffenceRecord)>` +- **interface**: `api.query.staking.processingOffence` +- **summary**: Tracks the currently processed offence record from the `OffenceQueue`. + + - When processing offences, an offence record is **popped** from the oldest era in `OffenceQueue` and stored here. + + - The function `process_offence` reads from this storage, processing one page of exposure at a time. + + - After processing a page, the `exposure_page` count is **decremented** until it reaches zero. + + - Once fully processed, the offence record is removed from this storage. + + This ensures that offences are processed incrementally, preventing excessive computation in a single block while maintaining correct slashing behavior. + +### slashRewardFraction(): `Perbill` +- **interface**: `api.query.staking.slashRewardFraction` +- **summary**: The percentage of the slash that is distributed to reporters. + + The rest of the slashed value is handled by the `Slash`. + +### unappliedSlashes(`u32, (AccountId32,Perbill,u32)`): `Option` +- **interface**: `api.query.staking.unappliedSlashes` +- **summary**: All unapplied slashes that are queued for later. + +### validatorCount(): `u32` +- **interface**: `api.query.staking.validatorCount` +- **summary**: The ideal number of active validators. + +### validators(`AccountId32`): `PalletStakingAsyncValidatorPrefs` +- **interface**: `api.query.staking.validators` +- **summary**: The map from (wannabe) validator stash key to the preferences of that validator. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### validatorSlashInEra(`u32, AccountId32`): `Option<(Perbill,u128)>` +- **interface**: `api.query.staking.validatorSlashInEra` +- **summary**: All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era. + +### virtualStakers(`AccountId32`): `Option` +- **interface**: `api.query.staking.virtualStakers` +- **summary**: Stakers whose funds are managed by other pallets. + + This pallet does not apply any locks on them, therefore they are only virtually bonded. They are expected to be keyless accounts and hence should not be allowed to mutate their ledger directly via this pallet. Instead, these accounts are managed by other pallets and accessed via low level apis. We keep track of them to do minimal integrity checks. + +### voterSnapshotStatus(): `PalletStakingAsyncSnapshotStatus` +- **interface**: `api.query.staking.voterSnapshotStatus` +- **summary**: Voter snapshot progress status. + + If the status is `Ongoing`, it keeps a cursor of the last voter retrieved to proceed when creating the next snapshot page. + +___ + + +## stakingRcClient + +### incompleteSessionReport(): `Option` +- **interface**: `api.query.stakingRcClient.incompleteSessionReport` +- **summary**: An incomplete incoming session report that we have not acted upon yet. + +### lastSessionReportEndingIndex(): `Option` +- **interface**: `api.query.stakingRcClient.lastSessionReportEndingIndex` +- **summary**: The last session report's `end_index` that we have acted upon. + + This allows this pallet to ensure a sequentially increasing sequence of session reports passed to staking. + + Note that with the XCM being the backbone of communication, we have a guarantee on the ordering of messages. As long as the RC sends session reports in order, we _eventually_ receive them in the same correct order as well. + +### outgoingValidatorSet(): `Option<(PalletStakingAsyncRcClientValidatorSetReport,u32)>` +- **interface**: `api.query.stakingRcClient.outgoingValidatorSet` +- **summary**: A validator set that is outgoing, and should be sent. + + This will be attempted to be sent, possibly on every `on_initialize` call, until it is sent, or the second value reaches zero, at which point we drop it. + +___ + + ## stateTrieMigration ### autoLimits(): `Option` @@ -897,6 +1890,45 @@ ___ ___ +## treasury + +### approvals(): `Vec` +- **interface**: `api.query.treasury.approvals` +- **summary**: DEPRECATED: associated with `spend_local` call and will be removed in May 2025. Refer to for migration to `spend`. + + Proposal indices that have been approved but not yet awarded. + +### deactivated(): `u128` +- **interface**: `api.query.treasury.deactivated` +- **summary**: The amount which has been reported as inactive to Currency. + +### lastSpendPeriod(): `Option` +- **interface**: `api.query.treasury.lastSpendPeriod` +- **summary**: The blocknumber for the last triggered spend period. + +### proposalCount(): `u32` +- **interface**: `api.query.treasury.proposalCount` +- **summary**: DEPRECATED: associated with `spend_local` call and will be removed in May 2025. Refer to for migration to `spend`. + + Number of proposals that have been made. + +### proposals(`u32`): `Option` +- **interface**: `api.query.treasury.proposals` +- **summary**: DEPRECATED: associated with `spend_local` call and will be removed in May 2025. Refer to for migration to `spend`. + + Proposals that have been made. + +### spendCount(): `u32` +- **interface**: `api.query.treasury.spendCount` +- **summary**: The count of spends that have been made. + +### spends(`u32`): `Option` +- **interface**: `api.query.treasury.spends` +- **summary**: Spends that have been approved and being processed. + +___ + + ## uniques ### account(`AccountId32, u32, u32`): `Option` @@ -957,6 +1989,45 @@ ___ ___ +## voterList + +### counterForListNodes(): `u32` +- **interface**: `api.query.voterList.counterForListNodes` +- **summary**: Counter for the related counted storage map + +### listBags(`u64`): `Option` +- **interface**: `api.query.voterList.listBags` +- **summary**: A bag stored in storage. + + Stores a `Bag` struct, which stores head and tail pointers to itself. + +### listNodes(`AccountId32`): `Option` +- **interface**: `api.query.voterList.listNodes` +- **summary**: A single node, within some bag. + + Nodes store links forward and back within their respective bags. + +### lock(): `Option` +- **interface**: `api.query.voterList.lock` +- **summary**: Lock all updates to this pallet. + + If any nodes needs updating, removal or addition due to a temporary lock, the [`Call::rebag`] can be used. + +### nextNodeAutoRebagged(): `Option` +- **interface**: `api.query.voterList.nextNodeAutoRebagged` +- **summary**: Pointer that remembers the next node that will be auto-rebagged. When `None`, the next scan will start from the list head again. + +___ + + +## whitelist + +### whitelistedCall(`H256`): `Option` +- **interface**: `api.query.whitelist.whitelistedCall` + +___ + + ## xcmpQueue ### deliveryFeeFactor(`u32`): `u128` diff --git a/docs/asset-hub-polkadot/constants.md b/docs/asset-hub-polkadot/constants.md index 6a2ab2c45..c4492f3d0 100644 --- a/docs/asset-hub-polkadot/constants.md +++ b/docs/asset-hub-polkadot/constants.md @@ -14,16 +14,34 @@ The following sections contain the module constants, also known as parameter typ - **[balances](#balances)** +- **[bounties](#bounties)** + +- **[childBounties](#childbounties)** + +- **[claims](#claims)** + - **[collatorSelection](#collatorselection)** +- **[convictionVoting](#convictionvoting)** + +- **[delegatedStaking](#delegatedstaking)** + - **[foreignAssets](#foreignassets)** +- **[indices](#indices)** + - **[messageQueue](#messagequeue)** +- **[multiBlockElection](#multiblockelection)** + +- **[multiBlockElectionVerifier](#multiblockelectionverifier)** + - **[multisig](#multisig)** - **[nfts](#nfts)** +- **[nominationPools](#nominationpools)** + - **[parachainSystem](#parachainsystem)** - **[polkadotXcm](#polkadotxcm)** @@ -32,6 +50,14 @@ The following sections contain the module constants, also known as parameter typ - **[proxy](#proxy)** +- **[referenda](#referenda)** + +- **[scheduler](#scheduler)** + +- **[session](#session)** + +- **[staking](#staking)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** @@ -40,12 +66,16 @@ The following sections contain the module constants, also known as parameter typ - **[transactionPayment](#transactionpayment)** +- **[treasury](#treasury)** + - **[uniques](#uniques)** - **[utility](#utility)** - **[vesting](#vesting)** +- **[voterList](#voterlist)** + - **[xcmpQueue](#xcmpqueue)** @@ -78,7 +108,7 @@ ___ - **interface**: `api.consts.assetConversion.poolSetupFee` - **summary**: A one-time fee to setup the pool. -### poolSetupFeeAsset: `StagingXcmV4Location` +### poolSetupFeeAsset: `StagingXcmV5Location` - **interface**: `api.consts.assetConversion.poolSetupFeeAsset` - **summary**: Asset class from [`Config::Assets`] used to pay the [`Config::PoolSetupFee`]. @@ -160,6 +190,74 @@ ___ ___ +## bounties + +### bountyDepositBase: `u128` +- **interface**: `api.consts.bounties.bountyDepositBase` +- **summary**: The amount held on deposit for placing a bounty proposal. + +### bountyDepositPayoutDelay: `u32` +- **interface**: `api.consts.bounties.bountyDepositPayoutDelay` +- **summary**: The delay period for which a bounty beneficiary need to wait before claim the payout. + +### bountyUpdatePeriod: `u32` +- **interface**: `api.consts.bounties.bountyUpdatePeriod` +- **summary**: The time limit for a curator to act before a bounty expires. + + The period that starts when a curator is approved, during which they must execute or update the bounty via `extend_bounty_expiry`. If missed, the bounty expires, and the curator may be slashed. If `BlockNumberFor::MAX`, bounties stay active indefinitely, removing the need for `extend_bounty_expiry`. + +### bountyValueMinimum: `u128` +- **interface**: `api.consts.bounties.bountyValueMinimum` +- **summary**: Minimum value for a bounty. + +### curatorDepositMax: `Option` +- **interface**: `api.consts.bounties.curatorDepositMax` +- **summary**: Maximum amount of funds that should be placed in a deposit for making a proposal. + +### curatorDepositMin: `Option` +- **interface**: `api.consts.bounties.curatorDepositMin` +- **summary**: Minimum amount of funds that should be placed in a deposit for making a proposal. + +### curatorDepositMultiplier: `Permill` +- **interface**: `api.consts.bounties.curatorDepositMultiplier` +- **summary**: The curator deposit is calculated as a percentage of the curator fee. + + This deposit has optional upper and lower bounds with `CuratorDepositMax` and `CuratorDepositMin`. + +### dataDepositPerByte: `u128` +- **interface**: `api.consts.bounties.dataDepositPerByte` +- **summary**: The amount held on deposit per byte within the tip report reason or bounty description. + +### maximumReasonLength: `u32` +- **interface**: `api.consts.bounties.maximumReasonLength` +- **summary**: Maximum acceptable reason length. + + Benchmarks depend on this value, be sure to update weights file when changing this value + +___ + + +## childBounties + +### childBountyValueMinimum: `u128` +- **interface**: `api.consts.childBounties.childBountyValueMinimum` +- **summary**: Minimum value for a child-bounty. + +### maxActiveChildBountyCount: `u32` +- **interface**: `api.consts.childBounties.maxActiveChildBountyCount` +- **summary**: Maximum number of child bounties that can be added to a parent bounty. + +___ + + +## claims + +### prefix: `Bytes` +- **interface**: `api.consts.claims.prefix` + +___ + + ## collatorSelection ### kickThreshold: `u32` @@ -190,6 +288,36 @@ ___ ___ +## convictionVoting + +### maxVotes: `u32` +- **interface**: `api.consts.convictionVoting.maxVotes` +- **summary**: The maximum number of concurrent votes an account may have. + + Also used to compute weight, an overly large value can lead to extrinsics with large weight estimation: see `delegate` for instance. + +### voteLockingPeriod: `u32` +- **interface**: `api.consts.convictionVoting.voteLockingPeriod` +- **summary**: The minimum period of vote locking. + + It should be no shorter than enactment period to ensure that in the case of an approval, those successful voters are locked into the consequences that their votes entail. + +___ + + +## delegatedStaking + +### palletId: `FrameSupportPalletId` +- **interface**: `api.consts.delegatedStaking.palletId` +- **summary**: Injected identifier for the pallet. + +### slashRewardFraction: `Perbill` +- **interface**: `api.consts.delegatedStaking.slashRewardFraction` +- **summary**: Fraction of the slash that is rewarded to the caller of pending slash to the agent. + +___ + + ## foreignAssets ### approvalDeposit: `u128` @@ -225,6 +353,15 @@ ___ ___ +## indices + +### deposit: `u128` +- **interface**: `api.consts.indices.deposit` +- **summary**: The deposit needed for reserving an index. + +___ + + ## messageQueue ### heapSize: `u32` @@ -252,6 +389,66 @@ ___ ___ +## multiBlockElection + +### pages: `u32` +- **interface**: `api.consts.multiBlockElection.pages` +- **summary**: The number of pages. + + The snapshot is created with this many keys in the storage map. + + The solutions may contain at MOST this many pages, but less pages are acceptable as well. + +### signedPhase: `u32` +- **interface**: `api.consts.multiBlockElection.signedPhase` +- **summary**: Duration of the signed phase. + +### signedValidationPhase: `u32` +- **interface**: `api.consts.multiBlockElection.signedValidationPhase` +- **summary**: Duration of the singed validation phase. + + The duration of this should not be less than `T::Pages`, and there is no point in it being more than `SignedPhase::MaxSubmission::get() * T::Pages`. TODO: integrity test for it. + +### targetSnapshotPerBlock: `u32` +- **interface**: `api.consts.multiBlockElection.targetSnapshotPerBlock` +- **summary**: The number of snapshot targets to fetch per block. + +### unsignedPhase: `u32` +- **interface**: `api.consts.multiBlockElection.unsignedPhase` +- **summary**: Duration of the unsigned phase. + +### voterSnapshotPerBlock: `u32` +- **interface**: `api.consts.multiBlockElection.voterSnapshotPerBlock` +- **summary**: The number of snapshot voters to fetch per block. + +___ + + +## multiBlockElectionVerifier + +### maxBackersPerWinner: `u32` +- **interface**: `api.consts.multiBlockElectionVerifier.maxBackersPerWinner` +- **summary**: Maximum number of backers, per winner, per page. + +### maxBackersPerWinnerFinal: `u32` +- **interface**: `api.consts.multiBlockElectionVerifier.maxBackersPerWinnerFinal` +- **summary**: Maximum number of backers, per winner, among all pages of an election. + + This can only be checked at the very final step of verification. + + NOTE: at the moment, we don't check this, and it is in place for future compatibility. + +### maxWinnersPerPage: `u32` +- **interface**: `api.consts.multiBlockElectionVerifier.maxWinnersPerPage` +- **summary**: Maximum number of supports (aka. winners/validators/targets) that can be represented in a page of results. + +### solutionImprovementThreshold: `Perbill` +- **interface**: `api.consts.multiBlockElectionVerifier.solutionImprovementThreshold` +- **summary**: The minimum amount of improvement to the solution score that defines a solution as "better". + +___ + + ## multisig ### depositBase: `u128` @@ -334,6 +531,29 @@ ___ ___ +## nominationPools + +### maxPointsToBalance: `u8` +- **interface**: `api.consts.nominationPools.maxPointsToBalance` +- **summary**: The maximum pool points-to-balance ratio that an `open` pool can have. + + This is important in the event slashing takes place and the pool's points-to-balance ratio becomes disproportional. + + Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations are a function of number of points, and by setting this value to e.g. 10, you ensure that the total number of points in the system are at most 10 times the total_issuance of the chain, in the absolute worse case. + + For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1. Such a scenario would also be the equivalent of the pool being 90% slashed. + +### maxUnbonding: `u32` +- **interface**: `api.consts.nominationPools.maxUnbonding` +- **summary**: The maximum number of simultaneous unbonding chunks that can exist per member. + +### palletId: `FrameSupportPalletId` +- **interface**: `api.consts.nominationPools.palletId` +- **summary**: The nomination pool's pallet id. + +___ + + ## parachainSystem ### selfParaId: `u32` @@ -348,6 +568,18 @@ ___ ### advertisedXcmVersion: `u32` - **interface**: `api.consts.polkadotXcm.advertisedXcmVersion` - **summary**: The latest supported version that we advertise. Generally just set it to `pallet_xcm::CurrentXcmVersion`. + +### maxLockers: `u32` +- **interface**: `api.consts.polkadotXcm.maxLockers` +- **summary**: The maximum number of local XCM locks that a single account may have. + +### maxRemoteLockConsumers: `u32` +- **interface**: `api.consts.polkadotXcm.maxRemoteLockConsumers` +- **summary**: The maximum number of consumers a single remote lock may have. + +### universalLocation: `StagingXcmV5Junctions` +- **interface**: `api.consts.polkadotXcm.universalLocation` +- **summary**: This chain's Universal Location. ___ @@ -424,6 +656,140 @@ ___ ___ +## referenda + +### alarmInterval: `u32` +- **interface**: `api.consts.referenda.alarmInterval` +- **summary**: Quantization level for the referendum wakeup scheduler. A higher number will result in fewer storage reads/writes needed for smaller voters, but also result in delays to the automatic referendum status changes. Explicit servicing instructions are unaffected. + +### maxQueued: `u32` +- **interface**: `api.consts.referenda.maxQueued` +- **summary**: Maximum size of the referendum queue for a single track. + +### submissionDeposit: `u128` +- **interface**: `api.consts.referenda.submissionDeposit` +- **summary**: The minimum amount to be used as a deposit for a public referendum proposal. + +### tracks: `Vec<(u16,PalletReferendaTrackDetails)>` +- **interface**: `api.consts.referenda.tracks` +- **summary**: A list of tracks. + + Note: if the tracks are dynamic, the value in the static metadata might be inaccurate. + +### undecidingTimeout: `u32` +- **interface**: `api.consts.referenda.undecidingTimeout` +- **summary**: The number of blocks after submission that a referendum must begin being decided by. Once this passes, then anyone may cancel the referendum. + +___ + + +## scheduler + +### maximumWeight: `SpWeightsWeightV2Weight` +- **interface**: `api.consts.scheduler.maximumWeight` +- **summary**: The maximum weight that may be scheduled per block for any dispatchables. + +### maxScheduledPerBlock: `u32` +- **interface**: `api.consts.scheduler.maxScheduledPerBlock` +- **summary**: The maximum number of scheduled calls in the queue for a single block. + + NOTE: + Dependent pallets' benchmarks might require a higher limit for the setting. Set a higher limit under `runtime-benchmarks` feature. + +___ + + +## session + +### keyDeposit: `u128` +- **interface**: `api.consts.session.keyDeposit` +- **summary**: The amount to be held when setting keys. + +___ + + +## staking + +### bondingDuration: `u32` +- **interface**: `api.consts.staking.bondingDuration` +- **summary**: Number of eras that staked funds must remain bonded for. + +### historyDepth: `u32` +- **interface**: `api.consts.staking.historyDepth` +- **summary**: Number of eras to keep in history. + + Following information is kept for eras in `[current_era - HistoryDepth, current_era]`: `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`, `ErasTotalStake`, `ClaimedRewards`, `ErasStakersPaged`, `ErasStakersOverview`. + + Must be more than the number of eras delayed by session. I.e. active era must always be in history. I.e. `active_era > current_era - history_depth` must be guaranteed. + + If migrating an existing pallet from storage value to config value, this should be set to same value or greater as in storage. + +### maxEraDuration: `u64` +- **interface**: `api.consts.staking.maxEraDuration` +- **summary**: Maximum allowed era duration in milliseconds. + + This provides a defensive upper bound to cap the effective era duration, preventing excessively long eras from causing runaway inflation (e.g., due to bugs). If the actual era duration exceeds this value, it will be clamped to this maximum. + + Example: For an ideal era duration of 24 hours (86,400,000 ms), this can be set to 604,800,000 ms (7 days). + +### maxExposurePageSize: `u32` +- **interface**: `api.consts.staking.maxExposurePageSize` +- **summary**: The maximum size of each `T::ExposurePage`. + + An `ExposurePage` is weakly bounded to a maximum of `MaxExposurePageSize` nominators. + + For older non-paged exposure, a reward payout was restricted to the top `MaxExposurePageSize` nominators. This is to limit the i/o cost for the nominator payout. + + Note: `MaxExposurePageSize` is used to bound `ClaimedRewards` and is unsafe to reduce without handling it in a migration. + +### maxInvulnerables: `u32` +- **interface**: `api.consts.staking.maxInvulnerables` +- **summary**: Maximum number of invulnerable validators. + +### maxPruningItems: `u32` +- **interface**: `api.consts.staking.maxPruningItems` +- **summary**: Maximum number of storage items that can be pruned in a single call. + + This controls how many storage items can be deleted in each call to `prune_era_step`. This should be set to a conservative value (e.g., 100-500 items) to ensure pruning doesn't consume too much block space. The actual weight is determined by benchmarks. + +### maxUnlockingChunks: `u32` +- **interface**: `api.consts.staking.maxUnlockingChunks` +- **summary**: The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively determines how many unique eras a staker may be unbonding in. + + Note: `MaxUnlockingChunks` is used as the upper bound for the `BoundedVec` item `StakingLedger.unlocking`. Setting this value lower than the existing value can lead to inconsistencies in the `StakingLedger` and will need to be handled properly in a runtime migration. The test `reducing_max_unlocking_chunks_abrupt` shows this effect. + +### maxValidatorSet: `u32` +- **interface**: `api.consts.staking.maxValidatorSet` +- **summary**: The absolute maximum of winner validators this pallet should return. + + As this pallet supports multi-block election, the set of winner validators *per election* is bounded by this type. + +### planningEraOffset: `u32` +- **interface**: `api.consts.staking.planningEraOffset` +- **summary**: Number of sessions before the end of an era when the election for the next era will start. + + - This determines how many sessions **before** the last session of the era the staking election process should begin. + + - The value is bounded between **1** (election starts at the beginning of the last session) and `SessionsPerEra` (election starts at the beginning of the first session of the era). + + #### Example: + + - If `SessionsPerEra = 6` and `PlanningEraOffset = 1`, the election starts at the beginning of session `6 - 1 = 5`. + + - If `PlanningEraOffset = 6`, the election starts at the beginning of session `6 - 6 = 0`, meaning it starts at the very beginning of the era. + +### sessionsPerEra: `u32` +- **interface**: `api.consts.staking.sessionsPerEra` +- **summary**: Number of sessions per era, as per the preferences of the **relay chain**. + +### slashDeferDuration: `u32` +- **interface**: `api.consts.staking.slashDeferDuration` +- **summary**: Number of eras that slashes are deferred by, after computation. + + This should be less than the bonding duration. Set to 0 if slashes should be applied immediately, without opportunity for intervention. + +___ + + ## stateTrieMigration ### maxKeyLen: `u32` @@ -508,6 +874,39 @@ ___ ___ +## treasury + +### burn: `Permill` +- **interface**: `api.consts.treasury.burn` +- **summary**: Percentage of spare funds (if any) that are burnt per spend period. + +### maxApprovals: `u32` +- **interface**: `api.consts.treasury.maxApprovals` +- **summary**: DEPRECATED: associated with `spend_local` call and will be removed in May 2025. Refer to for migration to `spend`. + + The maximum number of approvals that can wait in the spending queue. + + NOTE: This parameter is also used within the Bounties Pallet extension if enabled. + +### palletId: `FrameSupportPalletId` +- **interface**: `api.consts.treasury.palletId` +- **summary**: The treasury's pallet id, used for deriving its sovereign account ID. + +### payoutPeriod: `u32` +- **interface**: `api.consts.treasury.payoutPeriod` +- **summary**: The period during which an approved treasury spend has to be claimed. + +### potAccount: `AccountId32` +- **interface**: `api.consts.treasury.potAccount` +- **summary**: Gets this pallet's derived pot account. + +### spendPeriod: `u32` +- **interface**: `api.consts.treasury.spendPeriod` +- **summary**: Period between successive spends. + +___ + + ## uniques ### attributeDepositBase: `u128` @@ -566,6 +965,51 @@ ___ ___ +## voterList + +### bagThresholds: `Vec` +- **interface**: `api.consts.voterList.bagThresholds` +- **summary**: The list of thresholds separating the various bags. + + Ids are separated into unsorted bags according to their score. This specifies the thresholds separating the bags. An id's bag is the largest bag for which the id's score is less than or equal to its upper threshold. + + When ids are iterated, higher bags are iterated completely before lower bags. This means that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower score, but peer ids within a particular bag are sorted in insertion order. + + #### Expressing the constant + + This constant must be sorted in strictly increasing order. Duplicate items are not permitted. + + There is an implied upper limit of `Score::MAX`; that value does not need to be specified within the bag. For any two threshold lists, if one ends with `Score::MAX`, the other one does not, and they are otherwise equal, the two lists will behave identically. + + #### Calculation + + It is recommended to generate the set of thresholds in a geometric series, such that there exists some constant ratio such that `threshold[k + 1] == (threshold[k] * constant_ratio).max(threshold[k] + 1)` for all `k`. + + The helpers in the `/utils/frame/generate-bags` module can simplify this calculation. + + #### Examples + + - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and iteration is strictly in insertion order. + + - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to the procedure given above, then the constant ratio is equal to 2. + + - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to the procedure given above, then the constant ratio is approximately equal to 1.248. + + - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall into bag 0, an id with score 2 will fall into bag 1, etc. + + #### Migration + + In the event that this list ever changes, a copy of the old bags list must be retained. With that `List::migrate` can be called, which will perform the appropriate migration. + +### maxAutoRebagPerBlock: `u32` +- **interface**: `api.consts.voterList.maxAutoRebagPerBlock` +- **summary**: Maximum number of accounts that may be re-bagged automatically in `on_idle`. + + A value of `0` (obtained by configuring `type MaxAutoRebagPerBlock = ();`) disables the feature. + +___ + + ## xcmpQueue ### maxActiveOutboundChannels: `u32` diff --git a/docs/asset-hub-polkadot/errors.md b/docs/asset-hub-polkadot/errors.md index e4d368448..0e59b2d06 100644 --- a/docs/asset-hub-polkadot/errors.md +++ b/docs/asset-hub-polkadot/errors.md @@ -6,48 +6,218 @@ This page lists the errors that can be encountered in the different modules. (NOTE: These were generated from a static/snapshot view of a recent default asset-hub-polkadot runtime. Some items may not be available in older nodes, or in any customized implementations.) +- **[ahMigrator](#ahmigrator)** + +- **[ahOps](#ahops)** + - **[assetConversion](#assetconversion)** +- **[assetRate](#assetrate)** + - **[assets](#assets)** - **[balances](#balances)** +- **[bounties](#bounties)** + +- **[childBounties](#childbounties)** + +- **[claims](#claims)** + - **[collatorSelection](#collatorselection)** +- **[convictionVoting](#convictionvoting)** + +- **[delegatedStaking](#delegatedstaking)** + - **[foreignAssets](#foreignassets)** +- **[indices](#indices)** + - **[messageQueue](#messagequeue)** +- **[multiBlockElection](#multiblockelection)** + +- **[multiBlockElectionSigned](#multiblockelectionsigned)** + - **[multisig](#multisig)** - **[nfts](#nfts)** +- **[nominationPools](#nominationpools)** + - **[parachainSystem](#parachainsystem)** - **[polkadotXcm](#polkadotxcm)** - **[poolAssets](#poolassets)** +- **[preimage](#preimage)** + - **[proxy](#proxy)** +- **[referenda](#referenda)** + +- **[scheduler](#scheduler)** + - **[session](#session)** +- **[snowbridgeSystemFrontend](#snowbridgesystemfrontend)** + +- **[staking](#staking)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** +- **[treasury](#treasury)** + - **[uniques](#uniques)** - **[utility](#utility)** - **[vesting](#vesting)** +- **[voterList](#voterlist)** + +- **[whitelist](#whitelist)** + - **[xcmpQueue](#xcmpqueue)** ___ +## ahMigrator + +### BadXcmVersion +- **interface**: `api.errors.ahMigrator.BadXcmVersion.is` +- **summary**: The XCM version is invalid. + +### DmpQueuePriorityAlreadySet +- **interface**: `api.errors.ahMigrator.DmpQueuePriorityAlreadySet.is` +- **summary**: The DMP queue priority is already set to the same value. + +### FailedToBoundCall +- **interface**: `api.errors.ahMigrator.FailedToBoundCall.is` +- **summary**: Failed to bound a call. + +### FailedToBoundVector +- **interface**: `api.errors.ahMigrator.FailedToBoundVector.is` +- **summary**: Vector did not fit into its compile-time bound. + +### FailedToCalculateCheckingAccount +- **interface**: `api.errors.ahMigrator.FailedToCalculateCheckingAccount.is` +- **summary**: Checking account overflow or underflow. + +### FailedToConvertCall +- **interface**: `api.errors.ahMigrator.FailedToConvertCall.is` +- **summary**: Failed to convert RC call to AH call. + +### FailedToConvertType +- **interface**: `api.errors.ahMigrator.FailedToConvertType.is` +- **summary**: Failed to convert RC type to AH type. + +### FailedToIntegrateVestingSchedule +- **interface**: `api.errors.ahMigrator.FailedToIntegrateVestingSchedule.is` +- **summary**: Failed to integrate a vesting schedule. + +### FailedToProcessAccount +- **interface**: `api.errors.ahMigrator.FailedToProcessAccount.is` +- **summary**: Failed to process an account data from RC. + +### FailedToUnreserveDeposit +- **interface**: `api.errors.ahMigrator.FailedToUnreserveDeposit.is` +- **summary**: Failed to unreserve deposit. + +### InsertConflict +- **interface**: `api.errors.ahMigrator.InsertConflict.is` +- **summary**: Some item could not be inserted because it already exists. + +### InvalidOrigin +- **interface**: `api.errors.ahMigrator.InvalidOrigin.is` +- **summary**: The origin is invalid. + +### InvalidParameter +- **interface**: `api.errors.ahMigrator.InvalidParameter.is` +- **summary**: Invalid parameter. + +### PreimageChunkMissing +- **interface**: `api.errors.ahMigrator.PreimageChunkMissing.is` +- **summary**: Preimage chunk missing. + +### PreimageMissing +- **interface**: `api.errors.ahMigrator.PreimageMissing.is` +- **summary**: Preimage missing. + +### PreimageNotFound +- **interface**: `api.errors.ahMigrator.PreimageNotFound.is` +- **summary**: Failed to fetch preimage. + +### PreimageStatusInvalid +- **interface**: `api.errors.ahMigrator.PreimageStatusInvalid.is` +- **summary**: Preimage status invalid. + +### PreimageTooBig +- **interface**: `api.errors.ahMigrator.PreimageTooBig.is` +- **summary**: Preimage too big. + +### XcmError +- **interface**: `api.errors.ahMigrator.XcmError.is` +- **summary**: Failed to send XCM message. + +___ + + +## ahOps + +### ContributionsRemaining +- **interface**: `api.errors.ahOps.ContributionsRemaining.is` +- **summary**: Not all contributions are withdrawn. + +### FailedToWithdrawCrowdloanContribution +- **interface**: `api.errors.ahOps.FailedToWithdrawCrowdloanContribution.is` +- **summary**: Failed to withdraw crowdloan contribution. + +### InternalError +- **interface**: `api.errors.ahOps.InternalError.is` +- **summary**: Internal error, please bug report. + +### MigrationNotCompleted +- **interface**: `api.errors.ahOps.MigrationNotCompleted.is` +- **summary**: The Asset Hub migration is not completed. + +### NoCrowdloanContribution +- **interface**: `api.errors.ahOps.NoCrowdloanContribution.is` +- **summary**: Either no crowdloan contribution or already withdrawn. + +### NoCrowdloanReserve +- **interface**: `api.errors.ahOps.NoCrowdloanReserve.is` +- **summary**: Either no crowdloan reserve or already unreserved. + +### NoLeaseReserve +- **interface**: `api.errors.ahOps.NoLeaseReserve.is` +- **summary**: Either no lease deposit or already unreserved. + +### NotSovereign +- **interface**: `api.errors.ahOps.NotSovereign.is` +- **summary**: Account cannot be migrated since it is not a sovereign parachain account. + +### NotYet +- **interface**: `api.errors.ahOps.NotYet.is` +- **summary**: Block number is not yet reached. + +### WrongDerivedTranslation +- **interface**: `api.errors.ahOps.WrongDerivedTranslation.is` +- **summary**: The account is not a derived account. + +### ZeroBalance +- **interface**: `api.errors.ahOps.ZeroBalance.is` +- **summary**: The balance is zero. + +___ + + ## assetConversion ### AmountOneLessThanMinimal @@ -145,6 +315,23 @@ ___ ___ +## assetRate + +### AlreadyExists +- **interface**: `api.errors.assetRate.AlreadyExists.is` +- **summary**: The given asset ID already has an assigned conversion rate and cannot be re-created. + +### Overflow +- **interface**: `api.errors.assetRate.Overflow.is` +- **summary**: Overflow ocurred when calculating the inverse rate. + +### UnknownAssetKind +- **interface**: `api.errors.assetRate.UnknownAssetKind.is` +- **summary**: The given asset ID is unknown. + +___ + + ## assets ### AlreadyExists @@ -295,6 +482,105 @@ ___ ___ +## bounties + +### HasActiveChildBounty +- **interface**: `api.errors.bounties.HasActiveChildBounty.is` +- **summary**: The bounty cannot be closed because it has active child bounties. + +### InsufficientProposersBalance +- **interface**: `api.errors.bounties.InsufficientProposersBalance.is` +- **summary**: Proposer's balance is too low. + +### InvalidFee +- **interface**: `api.errors.bounties.InvalidFee.is` +- **summary**: Invalid bounty fee. + +### InvalidIndex +- **interface**: `api.errors.bounties.InvalidIndex.is` +- **summary**: No proposal or bounty at that index. + +### InvalidValue +- **interface**: `api.errors.bounties.InvalidValue.is` +- **summary**: Invalid bounty value. + +### NotProposer +- **interface**: `api.errors.bounties.NotProposer.is` +- **summary**: User is not the proposer of the bounty. + +### PendingPayout +- **interface**: `api.errors.bounties.PendingPayout.is` +- **summary**: A bounty payout is pending. To cancel the bounty, you must unassign and slash the curator. + +### Premature +- **interface**: `api.errors.bounties.Premature.is` +- **summary**: The bounties cannot be claimed/closed because it's still in the countdown period. + +### ReasonTooBig +- **interface**: `api.errors.bounties.ReasonTooBig.is` +- **summary**: The reason given is just too big. + +### RequireCurator +- **interface**: `api.errors.bounties.RequireCurator.is` +- **summary**: Require bounty curator. + +### TooManyQueued +- **interface**: `api.errors.bounties.TooManyQueued.is` +- **summary**: Too many approvals are already queued. + +### UnexpectedStatus +- **interface**: `api.errors.bounties.UnexpectedStatus.is` +- **summary**: The bounty status is unexpected. + +___ + + +## childBounties + +### InsufficientBountyBalance +- **interface**: `api.errors.childBounties.InsufficientBountyBalance.is` +- **summary**: The bounty balance is not enough to add new child-bounty. + +### ParentBountyNotActive +- **interface**: `api.errors.childBounties.ParentBountyNotActive.is` +- **summary**: The parent bounty is not in active state. + +### TooManyChildBounties +- **interface**: `api.errors.childBounties.TooManyChildBounties.is` +- **summary**: Number of child bounties exceeds limit `MaxActiveChildBountyCount`. + +___ + + +## claims + +### InvalidEthereumSignature +- **interface**: `api.errors.claims.InvalidEthereumSignature.is` +- **summary**: Invalid Ethereum signature. + +### InvalidStatement +- **interface**: `api.errors.claims.InvalidStatement.is` +- **summary**: A needed statement was not included. + +### PotUnderflow +- **interface**: `api.errors.claims.PotUnderflow.is` +- **summary**: There's not enough in the pot to pay out some unvested amount. Generally implies a logic error. + +### SenderHasNoClaim +- **interface**: `api.errors.claims.SenderHasNoClaim.is` +- **summary**: Account ID sending transaction has no claim. + +### SignerHasNoClaim +- **interface**: `api.errors.claims.SignerHasNoClaim.is` +- **summary**: Ethereum address has no claim. + +### VestedBalanceExists +- **interface**: `api.errors.claims.VestedBalanceExists.is` +- **summary**: The account already has a vested balance. + +___ + + ## collatorSelection ### AlreadyCandidate @@ -368,6 +654,114 @@ ___ ___ +## convictionVoting + +### AlreadyDelegating +- **interface**: `api.errors.convictionVoting.AlreadyDelegating.is` +- **summary**: The account is already delegating. + +### AlreadyVoting +- **interface**: `api.errors.convictionVoting.AlreadyVoting.is` +- **summary**: The account currently has votes attached to it and the operation cannot succeed until these are removed through `remove_vote`. + +### BadClass +- **interface**: `api.errors.convictionVoting.BadClass.is` +- **summary**: The class ID supplied is invalid. + +### ClassNeeded +- **interface**: `api.errors.convictionVoting.ClassNeeded.is` +- **summary**: The class must be supplied since it is not easily determinable from the state. + +### InsufficientFunds +- **interface**: `api.errors.convictionVoting.InsufficientFunds.is` +- **summary**: Too high a balance was provided that the account cannot afford. + +### MaxVotesReached +- **interface**: `api.errors.convictionVoting.MaxVotesReached.is` +- **summary**: Maximum number of votes reached. + +### Nonsense +- **interface**: `api.errors.convictionVoting.Nonsense.is` +- **summary**: Delegation to oneself makes no sense. + +### NoPermission +- **interface**: `api.errors.convictionVoting.NoPermission.is` +- **summary**: The actor has no permission to conduct the action. + +### NoPermissionYet +- **interface**: `api.errors.convictionVoting.NoPermissionYet.is` +- **summary**: The actor has no permission to conduct the action right now but will do in the future. + +### NotDelegating +- **interface**: `api.errors.convictionVoting.NotDelegating.is` +- **summary**: The account is not currently delegating. + +### NotOngoing +- **interface**: `api.errors.convictionVoting.NotOngoing.is` +- **summary**: Poll is not ongoing. + +### NotVoter +- **interface**: `api.errors.convictionVoting.NotVoter.is` +- **summary**: The given account did not vote on the poll. + +___ + + +## delegatedStaking + +### AlreadyStaking +- **interface**: `api.errors.delegatedStaking.AlreadyStaking.is` +- **summary**: An existing staker cannot perform this action. + +### BadState +- **interface**: `api.errors.delegatedStaking.BadState.is` +- **summary**: Some corruption in internal state. + +### InvalidDelegation +- **interface**: `api.errors.delegatedStaking.InvalidDelegation.is` +- **summary**: Delegation conditions are not met. + + Possible issues are 1) Cannot delegate to self, 2) Cannot delegate to multiple delegates. + +### InvalidRewardDestination +- **interface**: `api.errors.delegatedStaking.InvalidRewardDestination.is` +- **summary**: Reward Destination cannot be same as `Agent` account. + +### NotAgent +- **interface**: `api.errors.delegatedStaking.NotAgent.is` +- **summary**: Not an existing `Agent` account. + +### NotAllowed +- **interface**: `api.errors.delegatedStaking.NotAllowed.is` +- **summary**: The account cannot perform this operation. + +### NotDelegator +- **interface**: `api.errors.delegatedStaking.NotDelegator.is` +- **summary**: Not a Delegator account. + +### NotEnoughFunds +- **interface**: `api.errors.delegatedStaking.NotEnoughFunds.is` +- **summary**: The account does not have enough funds to perform the operation. + +### NothingToSlash +- **interface**: `api.errors.delegatedStaking.NothingToSlash.is` +- **summary**: `Agent` has no pending slash to be applied. + +### NotSupported +- **interface**: `api.errors.delegatedStaking.NotSupported.is` +- **summary**: Operation not supported by this pallet. + +### UnappliedSlash +- **interface**: `api.errors.delegatedStaking.UnappliedSlash.is` +- **summary**: Unapplied pending slash restricts operation on `Agent`. + +### WithdrawFailed +- **interface**: `api.errors.delegatedStaking.WithdrawFailed.is` +- **summary**: Failed to withdraw amount from Core Staking. + +___ + + ## foreignAssets ### AlreadyExists @@ -465,6 +859,31 @@ ___ ___ +## indices + +### InUse +- **interface**: `api.errors.indices.InUse.is` +- **summary**: The index was not available. + +### NotAssigned +- **interface**: `api.errors.indices.NotAssigned.is` +- **summary**: The index was not already assigned. + +### NotOwner +- **interface**: `api.errors.indices.NotOwner.is` +- **summary**: The index is assigned to another account. + +### NotTransfer +- **interface**: `api.errors.indices.NotTransfer.is` +- **summary**: The source and destination accounts are identical. + +### Permanent +- **interface**: `api.errors.indices.Permanent.is` +- **summary**: The index is permanent and may not be freed/changed. + +___ + + ## messageQueue ### AlreadyProcessed @@ -510,6 +929,64 @@ ___ ___ +## multiBlockElection + +### Fallback +- **interface**: `api.errors.multiBlockElection.Fallback.is` +- **summary**: Triggering the `Fallback` failed. + +### Snapshot +- **interface**: `api.errors.multiBlockElection.Snapshot.is` +- **summary**: Snapshot was unavailable. + +### UnexpectedPhase +- **interface**: `api.errors.multiBlockElection.UnexpectedPhase.is` +- **summary**: Unexpected phase + +___ + + +## multiBlockElectionSigned + +### BadPageIndex +- **interface**: `api.errors.multiBlockElectionSigned.BadPageIndex.is` +- **summary**: The page index is out of bounds. + +### BadWitnessData +- **interface**: `api.errors.multiBlockElectionSigned.BadWitnessData.is` +- **summary**: Bad witness data provided. + +### Duplicate +- **interface**: `api.errors.multiBlockElectionSigned.Duplicate.is` +- **summary**: The submission is a duplicate. + +### NoSubmission +- **interface**: `api.errors.multiBlockElectionSigned.NoSubmission.is` +- **summary**: No submission found. + +### NotRegistered +- **interface**: `api.errors.multiBlockElectionSigned.NotRegistered.is` +- **summary**: The account is not registered. + +### PhaseNotSigned +- **interface**: `api.errors.multiBlockElectionSigned.PhaseNotSigned.is` +- **summary**: The phase is not signed. + +### QueueFull +- **interface**: `api.errors.multiBlockElectionSigned.QueueFull.is` +- **summary**: The queue is full. + +### RoundNotOver +- **interface**: `api.errors.multiBlockElectionSigned.RoundNotOver.is` +- **summary**: Round is not yet over. + +### TooManyInvulnerables +- **interface**: `api.errors.multiBlockElectionSigned.TooManyInvulnerables.is` +- **summary**: Too many invulnerable accounts are provided, + +___ + + ## multisig ### AlreadyApproved @@ -756,6 +1233,165 @@ ___ ___ +## nominationPools + +### AccountBelongsToOtherPool +- **interface**: `api.errors.nominationPools.AccountBelongsToOtherPool.is` +- **summary**: An account is already delegating in another pool. An account may only belong to one pool at a time. + +### AlreadyMigrated +- **interface**: `api.errors.nominationPools.AlreadyMigrated.is` +- **summary**: The pool or member delegation has already migrated to delegate stake. + +### BondExtraRestricted +- **interface**: `api.errors.nominationPools.BondExtraRestricted.is` +- **summary**: Bonding extra is restricted to the exact pending reward amount. + +### CanNotChangeState +- **interface**: `api.errors.nominationPools.CanNotChangeState.is` +- **summary**: The pools state cannot be changed. + +### CannotWithdrawAny +- **interface**: `api.errors.nominationPools.CannotWithdrawAny.is` +- **summary**: None of the funds can be withdrawn yet because the bonding duration has not passed. + +### CommissionChangeRateNotAllowed +- **interface**: `api.errors.nominationPools.CommissionChangeRateNotAllowed.is` +- **summary**: The submitted changes to commission change rate are not allowed. + +### CommissionChangeThrottled +- **interface**: `api.errors.nominationPools.CommissionChangeThrottled.is` +- **summary**: Not enough blocks have surpassed since the last commission update. + +### CommissionExceedsGlobalMaximum +- **interface**: `api.errors.nominationPools.CommissionExceedsGlobalMaximum.is` +- **summary**: The supplied commission exceeds global maximum commission. + +### CommissionExceedsMaximum +- **interface**: `api.errors.nominationPools.CommissionExceedsMaximum.is` +- **summary**: The supplied commission exceeds the max allowed commission. + +### Defensive +- **interface**: `api.errors.nominationPools.Defensive.is` +- **summary**: Some error occurred that should never happen. This should be reported to the maintainers. + +### DoesNotHavePermission +- **interface**: `api.errors.nominationPools.DoesNotHavePermission.is` +- **summary**: The caller does not have adequate permissions. + +### FullyUnbonding +- **interface**: `api.errors.nominationPools.FullyUnbonding.is` +- **summary**: The member is fully unbonded (and thus cannot access the bonded and reward pool anymore to, for example, collect rewards). + +### InvalidPoolId +- **interface**: `api.errors.nominationPools.InvalidPoolId.is` +- **summary**: Pool id provided is not correct/usable. + +### MaxCommissionRestricted +- **interface**: `api.errors.nominationPools.MaxCommissionRestricted.is` +- **summary**: The pool's max commission cannot be set higher than the existing value. + +### MaxPoolMembers +- **interface**: `api.errors.nominationPools.MaxPoolMembers.is` +- **summary**: Too many members in the pool or system. + +### MaxPools +- **interface**: `api.errors.nominationPools.MaxPools.is` +- **summary**: The system is maxed out on pools. + +### MaxUnbondingLimit +- **interface**: `api.errors.nominationPools.MaxUnbondingLimit.is` +- **summary**: The member cannot unbond further chunks due to reaching the limit. + +### MetadataExceedsMaxLen +- **interface**: `api.errors.nominationPools.MetadataExceedsMaxLen.is` +- **summary**: Metadata exceeds [`Config::MaxMetadataLen`] + +### MinimumBondNotMet +- **interface**: `api.errors.nominationPools.MinimumBondNotMet.is` +- **summary**: The amount does not meet the minimum bond to either join or create a pool. + + The depositor can never unbond to a value less than `Pallet::depositor_min_bond`. The caller does not have nominating permissions for the pool. Members can never unbond to a value below `MinJoinBond`. + +### NoCommissionCurrentSet +- **interface**: `api.errors.nominationPools.NoCommissionCurrentSet.is` +- **summary**: No commission current has been set. + +### NoPendingCommission +- **interface**: `api.errors.nominationPools.NoPendingCommission.is` +- **summary**: There is no pending commission to claim. + +### NotDestroying +- **interface**: `api.errors.nominationPools.NotDestroying.is` +- **summary**: A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for other members to be permissionlessly unbonded. + +### NothingToAdjust +- **interface**: `api.errors.nominationPools.NothingToAdjust.is` +- **summary**: No imbalance in the ED deposit for the pool. + +### NothingToSlash +- **interface**: `api.errors.nominationPools.NothingToSlash.is` +- **summary**: No slash pending that can be applied to the member. + +### NotKickerOrDestroying +- **interface**: `api.errors.nominationPools.NotKickerOrDestroying.is` +- **summary**: Either a) the caller cannot make a valid kick or b) the pool is not destroying. + +### NotMigrated +- **interface**: `api.errors.nominationPools.NotMigrated.is` +- **summary**: The pool or member delegation has not migrated yet to delegate stake. + +### NotNominator +- **interface**: `api.errors.nominationPools.NotNominator.is` +- **summary**: The caller does not have nominating permissions for the pool. + +### NotOpen +- **interface**: `api.errors.nominationPools.NotOpen.is` +- **summary**: The pool is not open to join + +### NotSupported +- **interface**: `api.errors.nominationPools.NotSupported.is` +- **summary**: This call is not allowed in the current state of the pallet. + +### OverflowRisk +- **interface**: `api.errors.nominationPools.OverflowRisk.is` +- **summary**: The transaction could not be executed due to overflow risk for the pool. + +### PartialUnbondNotAllowedPermissionlessly +- **interface**: `api.errors.nominationPools.PartialUnbondNotAllowedPermissionlessly.is` +- **summary**: Partial unbonding now allowed permissionlessly. + +### PoolIdInUse +- **interface**: `api.errors.nominationPools.PoolIdInUse.is` +- **summary**: Pool id currently in use. + +### PoolMemberNotFound +- **interface**: `api.errors.nominationPools.PoolMemberNotFound.is` +- **summary**: An account is not a member. + +### PoolNotFound +- **interface**: `api.errors.nominationPools.PoolNotFound.is` +- **summary**: A (bonded) pool id does not exist. + +### Restricted +- **interface**: `api.errors.nominationPools.Restricted.is` +- **summary**: Account is restricted from participation in pools. This may happen if the account is staking in another way already. + +### RewardPoolNotFound +- **interface**: `api.errors.nominationPools.RewardPoolNotFound.is` +- **summary**: A reward pool does not exist. In all cases this is a system logic error. + +### SlashTooLow +- **interface**: `api.errors.nominationPools.SlashTooLow.is` +- **summary**: The slash amount is too low to be applied. + +### SubPoolsNotFound +- **interface**: `api.errors.nominationPools.SubPoolsNotFound.is` +- **summary**: A sub pool does not exist. + +___ + + ## parachainSystem ### HostConfigurationNotAvailable @@ -855,6 +1491,10 @@ ___ - **interface**: `api.errors.polkadotXcm.LocalExecutionIncomplete.is` - **summary**: Local XCM execution incomplete. +### LocalExecutionIncompleteWithError +- **interface**: `api.errors.polkadotXcm.LocalExecutionIncompleteWithError.is` +- **summary**: Local XCM execution incomplete with the actual XCM error and the index of the instruction that caused the error. + ### LockNotFound - **interface**: `api.errors.polkadotXcm.LockNotFound.is` - **summary**: A remote lock with the corresponding data could not be found. @@ -995,6 +1635,43 @@ ___ ___ +## preimage + +### AlreadyNoted +- **interface**: `api.errors.preimage.AlreadyNoted.is` +- **summary**: Preimage has already been noted on-chain. + +### NotAuthorized +- **interface**: `api.errors.preimage.NotAuthorized.is` +- **summary**: The user is not authorized to perform this action. + +### NotNoted +- **interface**: `api.errors.preimage.NotNoted.is` +- **summary**: The preimage cannot be removed since it has not yet been noted. + +### NotRequested +- **interface**: `api.errors.preimage.NotRequested.is` +- **summary**: The preimage request cannot be removed since no outstanding requests exist. + +### Requested +- **interface**: `api.errors.preimage.Requested.is` +- **summary**: A preimage may not be removed when there are outstanding requests. + +### TooBig +- **interface**: `api.errors.preimage.TooBig.is` +- **summary**: Preimage is too large to store on-chain. + +### TooFew +- **interface**: `api.errors.preimage.TooFew.is` +- **summary**: Too few hashes were requested to be upgraded (i.e. zero). + +### TooMany +- **interface**: `api.errors.preimage.TooMany.is` +- **summary**: More than `MAX_HASH_UPGRADE_BULK_COUNT` hashes were requested to be upgraded at once. + +___ + + ## proxy ### Duplicate @@ -1032,6 +1709,92 @@ ___ ___ +## referenda + +### BadReferendum +- **interface**: `api.errors.referenda.BadReferendum.is` +- **summary**: The referendum index provided is invalid in this context. + +### BadStatus +- **interface**: `api.errors.referenda.BadStatus.is` +- **summary**: The referendum status is invalid for this operation. + +### BadTrack +- **interface**: `api.errors.referenda.BadTrack.is` +- **summary**: The track identifier given was invalid. + +### Full +- **interface**: `api.errors.referenda.Full.is` +- **summary**: There are already a full complement of referenda in progress for this track. + +### HasDeposit +- **interface**: `api.errors.referenda.HasDeposit.is` +- **summary**: Referendum's decision deposit is already paid. + +### NoDeposit +- **interface**: `api.errors.referenda.NoDeposit.is` +- **summary**: The deposit cannot be refunded since none was made. + +### NoPermission +- **interface**: `api.errors.referenda.NoPermission.is` +- **summary**: The deposit refunder is not the depositor. + +### NothingToDo +- **interface**: `api.errors.referenda.NothingToDo.is` +- **summary**: There was nothing to do in the advancement. + +### NotOngoing +- **interface**: `api.errors.referenda.NotOngoing.is` +- **summary**: Referendum is not ongoing. + +### NoTrack +- **interface**: `api.errors.referenda.NoTrack.is` +- **summary**: No track exists for the proposal origin. + +### PreimageNotExist +- **interface**: `api.errors.referenda.PreimageNotExist.is` +- **summary**: The preimage does not exist. + +### PreimageStoredWithDifferentLength +- **interface**: `api.errors.referenda.PreimageStoredWithDifferentLength.is` +- **summary**: The preimage is stored with a different length than the one provided. + +### QueueEmpty +- **interface**: `api.errors.referenda.QueueEmpty.is` +- **summary**: The queue of the track is empty. + +### Unfinished +- **interface**: `api.errors.referenda.Unfinished.is` +- **summary**: Any deposit cannot be refunded until after the decision is over. + +___ + + +## scheduler + +### FailedToSchedule +- **interface**: `api.errors.scheduler.FailedToSchedule.is` +- **summary**: Failed to schedule a call + +### Named +- **interface**: `api.errors.scheduler.Named.is` +- **summary**: Attempt to use a non-named function on a named task. + +### NotFound +- **interface**: `api.errors.scheduler.NotFound.is` +- **summary**: Cannot find the scheduled call. + +### RescheduleNoChange +- **interface**: `api.errors.scheduler.RescheduleNoChange.is` +- **summary**: Reschedule failed because it does not change scheduled time. + +### TargetBlockNumberInPast +- **interface**: `api.errors.scheduler.TargetBlockNumberInPast.is` +- **summary**: Given target block number is in the past. + +___ + + ## session ### DuplicatedKey @@ -1057,6 +1820,212 @@ ___ ___ +## snowbridgeSystemFrontend + +### BurnError +- **interface**: `api.errors.snowbridgeSystemFrontend.BurnError.is` +- **summary**: Ether could not be burned. + +### FeesNotMet +- **interface**: `api.errors.snowbridgeSystemFrontend.FeesNotMet.is` +- **summary**: Withdraw fee asset failure + +### Halted +- **interface**: `api.errors.snowbridgeSystemFrontend.Halted.is` +- **summary**: Message export is halted + +### InvalidAccount +- **interface**: `api.errors.snowbridgeSystemFrontend.InvalidAccount.is` +- **summary**: Account could not be converted to a location. + +### InvalidAssetOwner +- **interface**: `api.errors.snowbridgeSystemFrontend.InvalidAssetOwner.is` +- **summary**: Check location failure, should start from the dispatch origin as owner + +### LocationConversionFailed +- **interface**: `api.errors.snowbridgeSystemFrontend.LocationConversionFailed.is` +- **summary**: Convert to reanchored location failure + +### SendFailure +- **interface**: `api.errors.snowbridgeSystemFrontend.SendFailure.is` +- **summary**: Send xcm message failure + +### SwapError +- **interface**: `api.errors.snowbridgeSystemFrontend.SwapError.is` +- **summary**: Provided tip asset could not be swapped for ether. + +### TipAmountZero +- **interface**: `api.errors.snowbridgeSystemFrontend.TipAmountZero.is` +- **summary**: The tip provided is zero. + +### Unreachable +- **interface**: `api.errors.snowbridgeSystemFrontend.Unreachable.is` +- **summary**: The desired destination was unreachable, generally because there is a no way of routing to it. + +### UnsupportedAsset +- **interface**: `api.errors.snowbridgeSystemFrontend.UnsupportedAsset.is` +- **summary**: The asset provided for the tip is unsupported. + +### UnsupportedLocationVersion +- **interface**: `api.errors.snowbridgeSystemFrontend.UnsupportedLocationVersion.is` +- **summary**: Convert versioned location failure + +### WithdrawError +- **interface**: `api.errors.snowbridgeSystemFrontend.WithdrawError.is` +- **summary**: Unable to withdraw asset. + +___ + + +## staking + +### AlreadyBonded +- **interface**: `api.errors.staking.AlreadyBonded.is` +- **summary**: Stash is already bonded. + +### AlreadyClaimed +- **interface**: `api.errors.staking.AlreadyClaimed.is` +- **summary**: Rewards for this era have already been claimed for this validator. + +### AlreadyMigrated +- **interface**: `api.errors.staking.AlreadyMigrated.is` +- **summary**: The stake of this account is already migrated to `Fungible` holds. + +### AlreadyPaired +- **interface**: `api.errors.staking.AlreadyPaired.is` +- **summary**: Controller is already paired. + +### BadState +- **interface**: `api.errors.staking.BadState.is` +- **summary**: Internal state has become somehow corrupted and the operation cannot continue. + +### BadTarget +- **interface**: `api.errors.staking.BadTarget.is` +- **summary**: A nomination target was supplied that was blocked or otherwise not a validator. + +### BoundNotMet +- **interface**: `api.errors.staking.BoundNotMet.is` +- **summary**: Some bound is not met. + +### CancelledSlash +- **interface**: `api.errors.staking.CancelledSlash.is` +- **summary**: The slash has been cancelled and cannot be applied. + +### CannotChillOther +- **interface**: `api.errors.staking.CannotChillOther.is` +- **summary**: The user has enough bond and thus cannot be chilled forcefully by an external person. + +### CannotReapStash +- **interface**: `api.errors.staking.CannotReapStash.is` +- **summary**: Stash could not be reaped as other pallet might depend on it. + +### CannotRestoreLedger +- **interface**: `api.errors.staking.CannotRestoreLedger.is` +- **summary**: Cannot reset a ledger. + +### CommissionTooLow +- **interface**: `api.errors.staking.CommissionTooLow.is` +- **summary**: Commission is too low. Must be at least `MinCommission`. + +### ControllerDeprecated +- **interface**: `api.errors.staking.ControllerDeprecated.is` +- **summary**: Used when attempting to use deprecated controller account logic. + +### DuplicateIndex +- **interface**: `api.errors.staking.DuplicateIndex.is` +- **summary**: Duplicate index. + +### EmptyTargets +- **interface**: `api.errors.staking.EmptyTargets.is` +- **summary**: Targets cannot be empty. + +### EraNotPrunable +- **interface**: `api.errors.staking.EraNotPrunable.is` +- **summary**: The era is not eligible for pruning. + +### EraNotStarted +- **interface**: `api.errors.staking.EraNotStarted.is` +- **summary**: Era not yet started. + +### FundedTarget +- **interface**: `api.errors.staking.FundedTarget.is` +- **summary**: Attempting to target a stash that still has funds. + +### IncorrectHistoryDepth +- **interface**: `api.errors.staking.IncorrectHistoryDepth.is` +- **summary**: Incorrect previous history depth input provided. + +### InsufficientBond +- **interface**: `api.errors.staking.InsufficientBond.is` +- **summary**: Cannot bond, nominate or validate with value less than the minimum defined by governance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the intention, `chill` first to remove one's role as validator/nominator. + +### InvalidEraToReward +- **interface**: `api.errors.staking.InvalidEraToReward.is` +- **summary**: Invalid era to reward. + +### InvalidNumberOfNominations +- **interface**: `api.errors.staking.InvalidNumberOfNominations.is` +- **summary**: Invalid number of nominations. + +### InvalidPage +- **interface**: `api.errors.staking.InvalidPage.is` +- **summary**: No nominators exist on this page. + +### InvalidSlashRecord +- **interface**: `api.errors.staking.InvalidSlashRecord.is` +- **summary**: Slash record not found. + +### NoMoreChunks +- **interface**: `api.errors.staking.NoMoreChunks.is` +- **summary**: Can not schedule more unlock chunks. + +### NotController +- **interface**: `api.errors.staking.NotController.is` +- **summary**: Not a controller account. + +### NotEnoughFunds +- **interface**: `api.errors.staking.NotEnoughFunds.is` +- **summary**: Not enough funds available to withdraw. + +### NotStash +- **interface**: `api.errors.staking.NotStash.is` +- **summary**: Not a stash account. + +### NoUnlockChunk +- **interface**: `api.errors.staking.NoUnlockChunk.is` +- **summary**: Can not rebond without unlocking chunks. + +### Restricted +- **interface**: `api.errors.staking.Restricted.is` +- **summary**: Account is restricted from participation in staking. This may happen if the account is staking in another way already, such as via pool. + +### RewardDestinationRestricted +- **interface**: `api.errors.staking.RewardDestinationRestricted.is` +- **summary**: Provided reward destination is not allowed. + +### TooManyNominators +- **interface**: `api.errors.staking.TooManyNominators.is` +- **summary**: There are too many nominators in the system. Governance needs to adjust the staking settings to keep things safe for the runtime. + +### TooManyTargets +- **interface**: `api.errors.staking.TooManyTargets.is` +- **summary**: Too many nomination targets supplied. + +### TooManyValidators +- **interface**: `api.errors.staking.TooManyValidators.is` +- **summary**: There are too many validator candidates in the system. Governance needs to adjust the staking settings to keep things safe for the runtime. + +### UnappliedSlashesInPreviousEra +- **interface**: `api.errors.staking.UnappliedSlashesInPreviousEra.is` +- **summary**: Unapplied slashes in the recently concluded era is blocking this operation. See `Call::apply_slash` to apply them. + +### VirtualStakerNotAllowed +- **interface**: `api.errors.staking.VirtualStakerNotAllowed.is` +- **summary**: Operation not allowed for virtual stakers. + +___ + + ## stateTrieMigration ### BadChildRoot @@ -1094,6 +2063,10 @@ ___ - **interface**: `api.errors.system.CallFiltered.is` - **summary**: The origin filter prevent the call to be dispatched. +### FailedTask +- **interface**: `api.errors.system.FailedTask.is` +- **summary**: The specified [`Task`] failed during execution. + ### FailedToExtractRuntimeVersion - **interface**: `api.errors.system.FailedToExtractRuntimeVersion.is` - **summary**: Failed to extract the runtime version from the new runtime. @@ -1104,6 +2077,10 @@ ___ - **interface**: `api.errors.system.InvalidSpecName.is` - **summary**: The name of specification does not match between the current runtime and the new runtime. +### InvalidTask +- **interface**: `api.errors.system.InvalidTask.is` +- **summary**: The specified [`Task`] is not valid. + ### MultiBlockMigrationsOngoing - **interface**: `api.errors.system.MultiBlockMigrationsOngoing.is` - **summary**: A multi-block migration is ongoing and prevents the current code from being replaced. @@ -1131,12 +2108,65 @@ ___ ___ +## treasury + +### AlreadyAttempted +- **interface**: `api.errors.treasury.AlreadyAttempted.is` +- **summary**: The payment has already been attempted. + +### EarlyPayout +- **interface**: `api.errors.treasury.EarlyPayout.is` +- **summary**: The spend is not yet eligible for payout. + +### FailedToConvertBalance +- **interface**: `api.errors.treasury.FailedToConvertBalance.is` +- **summary**: The balance of the asset kind is not convertible to the balance of the native asset. + +### Inconclusive +- **interface**: `api.errors.treasury.Inconclusive.is` +- **summary**: The payment has neither failed nor succeeded yet. + +### InsufficientPermission +- **interface**: `api.errors.treasury.InsufficientPermission.is` +- **summary**: The spend origin is valid but the amount it is allowed to spend is lower than the amount to be spent. + +### InvalidIndex +- **interface**: `api.errors.treasury.InvalidIndex.is` +- **summary**: No proposal, bounty or spend at that index. + +### NotAttempted +- **interface**: `api.errors.treasury.NotAttempted.is` +- **summary**: The payout was not yet attempted/claimed. + +### PayoutError +- **interface**: `api.errors.treasury.PayoutError.is` +- **summary**: There was some issue with the mechanism of payment. + +### ProposalNotApproved +- **interface**: `api.errors.treasury.ProposalNotApproved.is` +- **summary**: Proposal has not been approved. + +### SpendExpired +- **interface**: `api.errors.treasury.SpendExpired.is` +- **summary**: The spend has expired and cannot be claimed. + +### TooManyApprovals +- **interface**: `api.errors.treasury.TooManyApprovals.is` +- **summary**: Too many approvals in the queue. + +___ + + ## uniques ### AlreadyExists - **interface**: `api.errors.uniques.AlreadyExists.is` - **summary**: The item ID has already been used for an item. +### AttributeNotFound +- **interface**: `api.errors.uniques.AttributeNotFound.is` +- **summary**: An attribute is not found. + ### BadWitness - **interface**: `api.errors.uniques.BadWitness.is` - **summary**: Invalid witness data given. @@ -1173,6 +2203,10 @@ ___ - **interface**: `api.errors.uniques.NoDelegate.is` - **summary**: There is no delegate approved. +### NoMetadata +- **interface**: `api.errors.uniques.NoMetadata.is` +- **summary**: No metadata is found. + ### NoPermission - **interface**: `api.errors.uniques.NoPermission.is` - **summary**: The signing account has no permission to do the operation. @@ -1197,10 +2231,18 @@ ___ - **interface**: `api.errors.uniques.UnknownItem.is` - **summary**: The given item ID is unknown. +### WrongAttribute +- **interface**: `api.errors.uniques.WrongAttribute.is` +- **summary**: Wrong attribute key/value bytes supplied. + ### WrongDelegate - **interface**: `api.errors.uniques.WrongDelegate.is` - **summary**: The delegate turned out to be different to what was expected. +### WrongMetadata +- **interface**: `api.errors.uniques.WrongMetadata.is` +- **summary**: Wrong metadata key/value bytes supplied. + ### WrongOwner - **interface**: `api.errors.uniques.WrongOwner.is` - **summary**: The owner turned out to be different to what was expected. @@ -1242,6 +2284,44 @@ ___ ___ +## voterList + +### List +- **interface**: `api.errors.voterList.List.is` +- **summary**: A error in the list interface implementation. + +### Locked +- **interface**: `api.errors.voterList.Locked.is` +- **summary**: Could not update a node, because the pallet is locked. + +___ + + +## whitelist + +### CallAlreadyWhitelisted +- **interface**: `api.errors.whitelist.CallAlreadyWhitelisted.is` +- **summary**: The call was already whitelisted; No-Op. + +### CallIsNotWhitelisted +- **interface**: `api.errors.whitelist.CallIsNotWhitelisted.is` +- **summary**: The call was not whitelisted. + +### InvalidCallWeightWitness +- **interface**: `api.errors.whitelist.InvalidCallWeightWitness.is` +- **summary**: The weight of the decoded call was higher than the witness. + +### UnavailablePreImage +- **interface**: `api.errors.whitelist.UnavailablePreImage.is` +- **summary**: The preimage of the call hash could not be loaded. + +### UndecodableCall +- **interface**: `api.errors.whitelist.UndecodableCall.is` +- **summary**: The call could not be decoded. + +___ + + ## xcmpQueue ### AlreadyResumed diff --git a/docs/asset-hub-polkadot/events.md b/docs/asset-hub-polkadot/events.md index a850ef3d0..a93e85089 100644 --- a/docs/asset-hub-polkadot/events.md +++ b/docs/asset-hub-polkadot/events.md @@ -6,36 +6,76 @@ Events are emitted for certain operations on the runtime. The following sections (NOTE: These were generated from a static/snapshot view of a recent default asset-hub-polkadot runtime. Some items may not be available in older nodes, or in any customized implementations.) +- **[ahMigrator](#ahmigrator)** + +- **[ahOps](#ahops)** + - **[assetConversion](#assetconversion)** +- **[assetRate](#assetrate)** + - **[assets](#assets)** - **[assetTxPayment](#assettxpayment)** - **[balances](#balances)** +- **[bounties](#bounties)** + +- **[childBounties](#childbounties)** + +- **[claims](#claims)** + - **[collatorSelection](#collatorselection)** +- **[convictionVoting](#convictionvoting)** + - **[cumulusXcm](#cumulusxcm)** +- **[delegatedStaking](#delegatedstaking)** + - **[foreignAssets](#foreignassets)** +- **[indices](#indices)** + - **[messageQueue](#messagequeue)** +- **[multiBlockElection](#multiblockelection)** + +- **[multiBlockElectionSigned](#multiblockelectionsigned)** + +- **[multiBlockElectionVerifier](#multiblockelectionverifier)** + - **[multisig](#multisig)** - **[nfts](#nfts)** +- **[nominationPools](#nominationpools)** + - **[parachainSystem](#parachainsystem)** +- **[parameters](#parameters)** + - **[polkadotXcm](#polkadotxcm)** - **[poolAssets](#poolassets)** +- **[preimage](#preimage)** + - **[proxy](#proxy)** +- **[referenda](#referenda)** + +- **[scheduler](#scheduler)** + - **[session](#session)** +- **[snowbridgeSystemFrontend](#snowbridgesystemfrontend)** + +- **[staking](#staking)** + +- **[stakingRcClient](#stakingrcclient)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** @@ -44,47 +84,155 @@ Events are emitted for certain operations on the runtime. The following sections - **[transactionPayment](#transactionpayment)** +- **[treasury](#treasury)** + - **[uniques](#uniques)** - **[utility](#utility)** - **[vesting](#vesting)** +- **[voterList](#voterlist)** + +- **[whitelist](#whitelist)** + - **[xcmpQueue](#xcmpqueue)** ___ +## ahMigrator + +### AccountTranslatedParachainSovereign(`AccountId32`, `AccountId32`) +- **interface**: `api.events.ahMigrator.AccountTranslatedParachainSovereign.is` + +### AccountTranslatedParachainSovereignDerived(`AccountId32`, `AccountId32`, `u16`) +- **interface**: `api.events.ahMigrator.AccountTranslatedParachainSovereignDerived.is` + +### AssetHubMigrationFinished() +- **interface**: `api.events.ahMigrator.AssetHubMigrationFinished.is` +- **summary**: The Asset Hub Migration finished. + + This event is equivalent to `StageTransition { new: MigrationDone, .. }` but is easier to understand. The finishing is immediate and affects all events happening afterwards. + +### AssetHubMigrationStarted() +- **interface**: `api.events.ahMigrator.AssetHubMigrationStarted.is` +- **summary**: The Asset Hub Migration started and is active until `AssetHubMigrationFinished` is emitted. + + This event is equivalent to `StageTransition { new: DataMigrationOngoing, .. }` but is easier to understand. The activation is immediate and affects all events happening afterwards. + +### BalancesBeforeRecordConsumed(`u128`, `u128`) +- **interface**: `api.events.ahMigrator.BalancesBeforeRecordConsumed.is` +- **summary**: The balances before the migration were consumed. + +### BalancesBeforeRecordSet(`u128`, `u128`) +- **interface**: `api.events.ahMigrator.BalancesBeforeRecordSet.is` +- **summary**: The balances before the migration were recorded. + +### BatchProcessed(`PalletAhMigratorPalletEventName`, `u32`, `u32`) +- **interface**: `api.events.ahMigrator.BatchProcessed.is` +- **summary**: We processed a batch of messages for this pallet. + +### BatchReceived(`PalletAhMigratorPalletEventName`, `u32`) +- **interface**: `api.events.ahMigrator.BatchReceived.is` +- **summary**: We received a batch of messages that will be integrated into a pallet. + +### DmpQueuePriorityConfigSet(`PalletRcMigratorQueuePriority`, `PalletRcMigratorQueuePriority`) +- **interface**: `api.events.ahMigrator.DmpQueuePriorityConfigSet.is` +- **summary**: The DMP queue priority config was set. + +### DmpQueuePrioritySet(`bool`, `u32`, `u32`) +- **interface**: `api.events.ahMigrator.DmpQueuePrioritySet.is` +- **summary**: Whether the DMP queue was prioritized for the next block. + +### FailedToUnreserveMultisigDeposit(`u128`, `u128`, `AccountId32`) +- **interface**: `api.events.ahMigrator.FailedToUnreserveMultisigDeposit.is` +- **summary**: Failed to unreserve a multisig deposit. + +### FailedToUnreservePreimageDeposit(`u128`, `u128`, `AccountId32`) +- **interface**: `api.events.ahMigrator.FailedToUnreservePreimageDeposit.is` +- **summary**: Failed to unreserve a legacy status preimage deposit. + +### ManagerSet(`Option`, `Option`) +- **interface**: `api.events.ahMigrator.ManagerSet.is` +- **summary**: The manager account id was set. + +### ReferendumCanceled(`u32`) +- **interface**: `api.events.ahMigrator.ReferendumCanceled.is` +- **summary**: A referendum was cancelled because it could not be mapped. + +### StageTransition(`PalletAhMigratorMigrationStage`, `PalletAhMigratorMigrationStage`) +- **interface**: `api.events.ahMigrator.StageTransition.is` +- **summary**: A stage transition has occurred. + +### XcmSent(`StagingXcmV5Location`, `StagingXcmV5Location`, `StagingXcmV5Xcm`, `[u8;32]`) +- **interface**: `api.events.ahMigrator.XcmSent.is` +- **summary**: An XCM message was sent. + +___ + + +## ahOps + +### CrowdloanUnreserveRemaining(`AccountId32`, `u32`, `u128`) +- **interface**: `api.events.ahOps.CrowdloanUnreserveRemaining.is` +- **summary**: Some amount for a crowdloan reserve could not be unreserved and needs manual cleanup. + +### LeaseUnreserveRemaining(`AccountId32`, `u32`, `u128`) +- **interface**: `api.events.ahOps.LeaseUnreserveRemaining.is` +- **summary**: Some lease reserve could not be unreserved and needs manual cleanup. + +### SovereignMigrated(`u32`, `AccountId32`, `AccountId32`, `Option`) +- **interface**: `api.events.ahOps.SovereignMigrated.is` +- **summary**: A sovereign parachain account has been migrated from its child to sibling representation. + +___ + + ## assetConversion -### LiquidityAdded(`AccountId32`, `AccountId32`, `(StagingXcmV4Location,StagingXcmV4Location)`, `u128`, `u128`, `u32`, `u128`) +### LiquidityAdded(`AccountId32`, `AccountId32`, `(StagingXcmV5Location,StagingXcmV5Location)`, `u128`, `u128`, `u32`, `u128`) - **interface**: `api.events.assetConversion.LiquidityAdded.is` - **summary**: A successful call of the `AddLiquidity` extrinsic will create this event. -### LiquidityRemoved(`AccountId32`, `AccountId32`, `(StagingXcmV4Location,StagingXcmV4Location)`, `u128`, `u128`, `u32`, `u128`, `Permill`) +### LiquidityRemoved(`AccountId32`, `AccountId32`, `(StagingXcmV5Location,StagingXcmV5Location)`, `u128`, `u128`, `u32`, `u128`, `Permill`) - **interface**: `api.events.assetConversion.LiquidityRemoved.is` - **summary**: A successful call of the `RemoveLiquidity` extrinsic will create this event. -### PoolCreated(`AccountId32`, `(StagingXcmV4Location,StagingXcmV4Location)`, `AccountId32`, `u32`) +### PoolCreated(`AccountId32`, `(StagingXcmV5Location,StagingXcmV5Location)`, `AccountId32`, `u32`) - **interface**: `api.events.assetConversion.PoolCreated.is` - **summary**: A successful call of the `CreatePool` extrinsic will create this event. -### SwapCreditExecuted(`u128`, `u128`, `Vec<(StagingXcmV4Location,u128)>`) +### SwapCreditExecuted(`u128`, `u128`, `Vec<(StagingXcmV5Location,u128)>`) - **interface**: `api.events.assetConversion.SwapCreditExecuted.is` - **summary**: Assets have been converted from one to another. -### SwapExecuted(`AccountId32`, `AccountId32`, `u128`, `u128`, `Vec<(StagingXcmV4Location,u128)>`) +### SwapExecuted(`AccountId32`, `AccountId32`, `u128`, `u128`, `Vec<(StagingXcmV5Location,u128)>`) - **interface**: `api.events.assetConversion.SwapExecuted.is` - **summary**: Assets have been converted from one to another. Both `SwapExactTokenForToken` and `SwapTokenForExactToken` will generate this event. -### Touched(`(StagingXcmV4Location,StagingXcmV4Location)`, `AccountId32`) +### Touched(`(StagingXcmV5Location,StagingXcmV5Location)`, `AccountId32`) - **interface**: `api.events.assetConversion.Touched.is` - **summary**: Pool has been touched in order to fulfill operational requirements. ___ +## assetRate + +### AssetRateCreated(`PolkadotRuntimeCommonImplsVersionedLocatableAsset`, `u128`) +- **interface**: `api.events.assetRate.AssetRateCreated.is` + +### AssetRateRemoved(`PolkadotRuntimeCommonImplsVersionedLocatableAsset`) +- **interface**: `api.events.assetRate.AssetRateRemoved.is` + +### AssetRateUpdated(`PolkadotRuntimeCommonImplsVersionedLocatableAsset`, `u128`, `u128`) +- **interface**: `api.events.assetRate.AssetRateUpdated.is` + +___ + + ## assets ### AccountsDestroyed(`u32`, `u32`, `u32`) @@ -200,7 +348,7 @@ ___ - **interface**: `api.events.assetTxPayment.AssetRefundFailed.is` - **summary**: A swap of the refund in native currency back to asset failed. -### AssetTxFeePaid(`AccountId32`, `u128`, `u128`, `StagingXcmV4Location`) +### AssetTxFeePaid(`AccountId32`, `u128`, `u128`, `StagingXcmV5Location`) - **interface**: `api.events.assetTxPayment.AssetTxFeePaid.is` - **summary**: A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee, has been paid by `who` in an asset `asset_id`. @@ -281,6 +429,10 @@ ___ - **interface**: `api.events.balances.Transfer.is` - **summary**: Transfer succeeded. +### Unexpected(`PalletBalancesUnexpectedKind`) +- **interface**: `api.events.balances.Unexpected.is` +- **summary**: An unexpected/defensive event was triggered. + ### Unlocked(`AccountId32`, `u128`) - **interface**: `api.events.balances.Unlocked.is` - **summary**: Some balance was unlocked. @@ -300,6 +452,89 @@ ___ ___ +## bounties + +### BountyApproved(`u32`) +- **interface**: `api.events.bounties.BountyApproved.is` +- **summary**: A bounty is approved. + +### BountyAwarded(`u32`, `AccountId32`) +- **interface**: `api.events.bounties.BountyAwarded.is` +- **summary**: A bounty is awarded to a beneficiary. + +### BountyBecameActive(`u32`) +- **interface**: `api.events.bounties.BountyBecameActive.is` +- **summary**: A bounty proposal is funded and became active. + +### BountyCanceled(`u32`) +- **interface**: `api.events.bounties.BountyCanceled.is` +- **summary**: A bounty is cancelled. + +### BountyClaimed(`u32`, `u128`, `AccountId32`) +- **interface**: `api.events.bounties.BountyClaimed.is` +- **summary**: A bounty is claimed by beneficiary. + +### BountyExtended(`u32`) +- **interface**: `api.events.bounties.BountyExtended.is` +- **summary**: A bounty expiry is extended. + +### BountyProposed(`u32`) +- **interface**: `api.events.bounties.BountyProposed.is` +- **summary**: New bounty proposal. + +### BountyRejected(`u32`, `u128`) +- **interface**: `api.events.bounties.BountyRejected.is` +- **summary**: A bounty proposal was rejected; funds were slashed. + +### CuratorAccepted(`u32`, `AccountId32`) +- **interface**: `api.events.bounties.CuratorAccepted.is` +- **summary**: A bounty curator is accepted. + +### CuratorProposed(`u32`, `AccountId32`) +- **interface**: `api.events.bounties.CuratorProposed.is` +- **summary**: A bounty curator is proposed. + +### CuratorUnassigned(`u32`) +- **interface**: `api.events.bounties.CuratorUnassigned.is` +- **summary**: A bounty curator is unassigned. + +### DepositPoked(`u32`, `AccountId32`, `u128`, `u128`) +- **interface**: `api.events.bounties.DepositPoked.is` +- **summary**: A bounty deposit has been poked. + +___ + + +## childBounties + +### Added(`u32`, `u32`) +- **interface**: `api.events.childBounties.Added.is` +- **summary**: A child-bounty is added. + +### Awarded(`u32`, `u32`, `AccountId32`) +- **interface**: `api.events.childBounties.Awarded.is` +- **summary**: A child-bounty is awarded to a beneficiary. + +### Canceled(`u32`, `u32`) +- **interface**: `api.events.childBounties.Canceled.is` +- **summary**: A child-bounty is cancelled. + +### Claimed(`u32`, `u32`, `u128`, `AccountId32`) +- **interface**: `api.events.childBounties.Claimed.is` +- **summary**: A child-bounty is claimed by beneficiary. + +___ + + +## claims + +### Claimed(`AccountId32`, `EthereumAddress`, `u128`) +- **interface**: `api.events.claims.Claimed.is` +- **summary**: Someone claimed some DOTs. + +___ + + ## collatorSelection ### CandidateAdded(`AccountId32`, `u128`) @@ -345,6 +580,31 @@ ___ ___ +## convictionVoting + +### Delegated(`AccountId32`, `AccountId32`) +- **interface**: `api.events.convictionVoting.Delegated.is` +- **summary**: An account has delegated their vote to another account. \[who, target\] + +### Undelegated(`AccountId32`) +- **interface**: `api.events.convictionVoting.Undelegated.is` +- **summary**: An \[account\] has cancelled a previous delegation operation. + +### Voted(`AccountId32`, `PalletConvictionVotingVoteAccountVote`) +- **interface**: `api.events.convictionVoting.Voted.is` +- **summary**: An account has voted + +### VoteRemoved(`AccountId32`, `PalletConvictionVotingVoteAccountVote`) +- **interface**: `api.events.convictionVoting.VoteRemoved.is` +- **summary**: A vote has been removed + +### VoteUnlocked(`AccountId32`, `u16`) +- **interface**: `api.events.convictionVoting.VoteUnlocked.is` +- **summary**: The lockup period of a conviction vote expired, and the funds have been unlocked. + +___ + + ## cumulusXcm ### ExecutedDownward(`[u8;32]`, `StagingXcmV5TraitsOutcome`) @@ -362,115 +622,157 @@ ___ ___ +## delegatedStaking + +### Delegated(`AccountId32`, `AccountId32`, `u128`) +- **interface**: `api.events.delegatedStaking.Delegated.is` +- **summary**: Funds delegated by a delegator. + +### MigratedDelegation(`AccountId32`, `AccountId32`, `u128`) +- **interface**: `api.events.delegatedStaking.MigratedDelegation.is` +- **summary**: Unclaimed delegation funds migrated to delegator. + +### Released(`AccountId32`, `AccountId32`, `u128`) +- **interface**: `api.events.delegatedStaking.Released.is` +- **summary**: Funds released to a delegator. + +### Slashed(`AccountId32`, `AccountId32`, `u128`) +- **interface**: `api.events.delegatedStaking.Slashed.is` +- **summary**: Funds slashed from a delegator. + +___ + + ## foreignAssets -### AccountsDestroyed(`StagingXcmV4Location`, `u32`, `u32`) +### AccountsDestroyed(`StagingXcmV5Location`, `u32`, `u32`) - **interface**: `api.events.foreignAssets.AccountsDestroyed.is` - **summary**: Accounts were destroyed for given asset. -### ApprovalCancelled(`StagingXcmV4Location`, `AccountId32`, `AccountId32`) +### ApprovalCancelled(`StagingXcmV5Location`, `AccountId32`, `AccountId32`) - **interface**: `api.events.foreignAssets.ApprovalCancelled.is` - **summary**: An approval for account `delegate` was cancelled by `owner`. -### ApprovalsDestroyed(`StagingXcmV4Location`, `u32`, `u32`) +### ApprovalsDestroyed(`StagingXcmV5Location`, `u32`, `u32`) - **interface**: `api.events.foreignAssets.ApprovalsDestroyed.is` - **summary**: Approvals were destroyed for given asset. -### ApprovedTransfer(`StagingXcmV4Location`, `AccountId32`, `AccountId32`, `u128`) +### ApprovedTransfer(`StagingXcmV5Location`, `AccountId32`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.ApprovedTransfer.is` - **summary**: (Additional) funds have been approved for transfer to a destination account. -### AssetFrozen(`StagingXcmV4Location`) +### AssetFrozen(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.AssetFrozen.is` - **summary**: Some asset `asset_id` was frozen. -### AssetMinBalanceChanged(`StagingXcmV4Location`, `u128`) +### AssetMinBalanceChanged(`StagingXcmV5Location`, `u128`) - **interface**: `api.events.foreignAssets.AssetMinBalanceChanged.is` - **summary**: The min_balance of an asset has been updated by the asset owner. -### AssetStatusChanged(`StagingXcmV4Location`) +### AssetStatusChanged(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.AssetStatusChanged.is` - **summary**: An asset has had its attributes changed by the `Force` origin. -### AssetThawed(`StagingXcmV4Location`) +### AssetThawed(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.AssetThawed.is` - **summary**: Some asset `asset_id` was thawed. -### Blocked(`StagingXcmV4Location`, `AccountId32`) +### Blocked(`StagingXcmV5Location`, `AccountId32`) - **interface**: `api.events.foreignAssets.Blocked.is` - **summary**: Some account `who` was blocked. -### Burned(`StagingXcmV4Location`, `AccountId32`, `u128`) +### Burned(`StagingXcmV5Location`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.Burned.is` - **summary**: Some assets were destroyed. -### Created(`StagingXcmV4Location`, `AccountId32`, `AccountId32`) +### Created(`StagingXcmV5Location`, `AccountId32`, `AccountId32`) - **interface**: `api.events.foreignAssets.Created.is` - **summary**: Some asset class was created. -### Deposited(`StagingXcmV4Location`, `AccountId32`, `u128`) +### Deposited(`StagingXcmV5Location`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.Deposited.is` - **summary**: Some assets were deposited (e.g. for transaction fees). -### Destroyed(`StagingXcmV4Location`) +### Destroyed(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.Destroyed.is` - **summary**: An asset class was destroyed. -### DestructionStarted(`StagingXcmV4Location`) +### DestructionStarted(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.DestructionStarted.is` - **summary**: An asset class is in the process of being destroyed. -### ForceCreated(`StagingXcmV4Location`, `AccountId32`) +### ForceCreated(`StagingXcmV5Location`, `AccountId32`) - **interface**: `api.events.foreignAssets.ForceCreated.is` - **summary**: Some asset class was force-created. -### Frozen(`StagingXcmV4Location`, `AccountId32`) +### Frozen(`StagingXcmV5Location`, `AccountId32`) - **interface**: `api.events.foreignAssets.Frozen.is` - **summary**: Some account `who` was frozen. -### Issued(`StagingXcmV4Location`, `AccountId32`, `u128`) +### Issued(`StagingXcmV5Location`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.Issued.is` - **summary**: Some assets were issued. -### MetadataCleared(`StagingXcmV4Location`) +### MetadataCleared(`StagingXcmV5Location`) - **interface**: `api.events.foreignAssets.MetadataCleared.is` - **summary**: Metadata has been cleared for an asset. -### MetadataSet(`StagingXcmV4Location`, `Bytes`, `Bytes`, `u8`, `bool`) +### MetadataSet(`StagingXcmV5Location`, `Bytes`, `Bytes`, `u8`, `bool`) - **interface**: `api.events.foreignAssets.MetadataSet.is` - **summary**: New metadata has been set for an asset. -### OwnerChanged(`StagingXcmV4Location`, `AccountId32`) +### OwnerChanged(`StagingXcmV5Location`, `AccountId32`) - **interface**: `api.events.foreignAssets.OwnerChanged.is` - **summary**: The owner changed. -### TeamChanged(`StagingXcmV4Location`, `AccountId32`, `AccountId32`, `AccountId32`) +### TeamChanged(`StagingXcmV5Location`, `AccountId32`, `AccountId32`, `AccountId32`) - **interface**: `api.events.foreignAssets.TeamChanged.is` - **summary**: The management team changed. -### Thawed(`StagingXcmV4Location`, `AccountId32`) +### Thawed(`StagingXcmV5Location`, `AccountId32`) - **interface**: `api.events.foreignAssets.Thawed.is` - **summary**: Some account `who` was thawed. -### Touched(`StagingXcmV4Location`, `AccountId32`, `AccountId32`) +### Touched(`StagingXcmV5Location`, `AccountId32`, `AccountId32`) - **interface**: `api.events.foreignAssets.Touched.is` - **summary**: Some account `who` was created with a deposit from `depositor`. -### Transferred(`StagingXcmV4Location`, `AccountId32`, `AccountId32`, `u128`) +### Transferred(`StagingXcmV5Location`, `AccountId32`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.Transferred.is` - **summary**: Some assets were transferred. -### TransferredApproved(`StagingXcmV4Location`, `AccountId32`, `AccountId32`, `AccountId32`, `u128`) +### TransferredApproved(`StagingXcmV5Location`, `AccountId32`, `AccountId32`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.TransferredApproved.is` - **summary**: An `amount` was transferred in its entirety from `owner` to `destination` by the approved `delegate`. -### Withdrawn(`StagingXcmV4Location`, `AccountId32`, `u128`) +### Withdrawn(`StagingXcmV5Location`, `AccountId32`, `u128`) - **interface**: `api.events.foreignAssets.Withdrawn.is` - **summary**: Some assets were withdrawn from the account (e.g. for transaction fees). ___ +## indices + +### DepositPoked(`AccountId32`, `u32`, `u128`, `u128`) +- **interface**: `api.events.indices.DepositPoked.is` +- **summary**: A deposit to reserve an index has been poked/reconsidered. + +### IndexAssigned(`AccountId32`, `u32`) +- **interface**: `api.events.indices.IndexAssigned.is` +- **summary**: A account index was assigned. + +### IndexFreed(`u32`) +- **interface**: `api.events.indices.IndexFreed.is` +- **summary**: A account index has been freed up (unassigned). + +### IndexFrozen(`u32`, `AccountId32`) +- **interface**: `api.events.indices.IndexFrozen.is` +- **summary**: A account index has been frozen to its current account ID. + +___ + + ## messageQueue ### OverweightEnqueued(`[u8;32]`, `CumulusPrimitivesCoreAggregateMessageOrigin`, `u32`, `u32`) @@ -492,6 +794,75 @@ ___ ___ +## multiBlockElection + +### PhaseTransitioned(`PalletElectionProviderMultiBlockPhase`, `PalletElectionProviderMultiBlockPhase`) +- **interface**: `api.events.multiBlockElection.PhaseTransitioned.is` +- **summary**: A phase transition happened. Only checks major changes in the variants, not minor inner values. + +### UnexpectedTargetSnapshotFailed() +- **interface**: `api.events.multiBlockElection.UnexpectedTargetSnapshotFailed.is` +- **summary**: Target snapshot creation failed + +### UnexpectedVoterSnapshotFailed() +- **interface**: `api.events.multiBlockElection.UnexpectedVoterSnapshotFailed.is` +- **summary**: Voter snapshot creation failed + +___ + + +## multiBlockElectionSigned + +### Bailed(`u32`, `AccountId32`) +- **interface**: `api.events.multiBlockElectionSigned.Bailed.is` +- **summary**: The given account has bailed. + +### Discarded(`u32`, `AccountId32`) +- **interface**: `api.events.multiBlockElectionSigned.Discarded.is` +- **summary**: The given account has been discarded. + +### Ejected(`u32`, `AccountId32`) +- **interface**: `api.events.multiBlockElectionSigned.Ejected.is` +- **summary**: The given solution, for the given round, was ejected. + +### Registered(`u32`, `AccountId32`, `SpNposElectionsElectionScore`) +- **interface**: `api.events.multiBlockElectionSigned.Registered.is` +- **summary**: Upcoming submission has been registered for the given account, with the given score. + +### Rewarded(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.multiBlockElectionSigned.Rewarded.is` +- **summary**: The given account has been rewarded with the given amount. + +### Slashed(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.multiBlockElectionSigned.Slashed.is` +- **summary**: The given account has been slashed with the given amount. + +### Stored(`u32`, `AccountId32`, `u32`) +- **interface**: `api.events.multiBlockElectionSigned.Stored.is` +- **summary**: A page of solution solution with the given index has been stored for the given account. + +___ + + +## multiBlockElectionVerifier + +### Queued(`SpNposElectionsElectionScore`, `Option`) +- **interface**: `api.events.multiBlockElectionVerifier.Queued.is` +- **summary**: A solution with the given score has replaced our current best solution. + +### VerificationFailed(`u32`, `PalletElectionProviderMultiBlockVerifierFeasibilityError`) +- **interface**: `api.events.multiBlockElectionVerifier.VerificationFailed.is` +- **summary**: A verification failed at the given page. + + NOTE: if the index is 0, then this could mean either the feasibility of the last page was wrong, or the final checks of `finalize_verification` failed. + +### Verified(`u32`, `u32`) +- **interface**: `api.events.multiBlockElectionVerifier.Verified.is` +- **summary**: The given page of a solution has been verified, with the given number of winners being found in it. + +___ + + ## multisig ### DepositPoked(`AccountId32`, `[u8;32]`, `u128`, `u128`) @@ -674,6 +1045,115 @@ ___ ___ +## nominationPools + +### Bonded(`AccountId32`, `u32`, `u128`, `bool`) +- **interface**: `api.events.nominationPools.Bonded.is` +- **summary**: A member has became bonded in a pool. + +### Created(`AccountId32`, `u32`) +- **interface**: `api.events.nominationPools.Created.is` +- **summary**: A pool has been created. + +### Destroyed(`u32`) +- **interface**: `api.events.nominationPools.Destroyed.is` +- **summary**: A pool has been destroyed. + +### GlobalParamsUpdated(`u128`, `u128`, `Option`, `Option`, `Option`, `Option`) +- **interface**: `api.events.nominationPools.GlobalParamsUpdated.is` +- **summary**: Global parameters regulating nomination pools have been updated. + +### MemberClaimPermissionUpdated(`AccountId32`, `PalletNominationPoolsClaimPermission`) +- **interface**: `api.events.nominationPools.MemberClaimPermissionUpdated.is` +- **summary**: A pool member's claim permission has been updated. + +### MemberRemoved(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.nominationPools.MemberRemoved.is` +- **summary**: A member has been removed from a pool. + + The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked). Any funds that are still delegated (i.e. dangling delegation) are released and are represented by `released_balance`. + +### MetadataUpdated(`u32`, `AccountId32`) +- **interface**: `api.events.nominationPools.MetadataUpdated.is` +- **summary**: A pool's metadata was updated. + +### MinBalanceDeficitAdjusted(`u32`, `u128`) +- **interface**: `api.events.nominationPools.MinBalanceDeficitAdjusted.is` +- **summary**: Topped up deficit in frozen ED of the reward pool. + +### MinBalanceExcessAdjusted(`u32`, `u128`) +- **interface**: `api.events.nominationPools.MinBalanceExcessAdjusted.is` +- **summary**: Claimed excess frozen ED of af the reward pool. + +### PaidOut(`AccountId32`, `u32`, `u128`) +- **interface**: `api.events.nominationPools.PaidOut.is` +- **summary**: A payout has been made to a member. + +### PoolCommissionChangeRateUpdated(`u32`, `PalletNominationPoolsCommissionChangeRate`) +- **interface**: `api.events.nominationPools.PoolCommissionChangeRateUpdated.is` +- **summary**: A pool's commission `change_rate` has been changed. + +### PoolCommissionClaimed(`u32`, `u128`) +- **interface**: `api.events.nominationPools.PoolCommissionClaimed.is` +- **summary**: Pool commission has been claimed. + +### PoolCommissionClaimPermissionUpdated(`u32`, `Option`) +- **interface**: `api.events.nominationPools.PoolCommissionClaimPermissionUpdated.is` +- **summary**: Pool commission claim permission has been updated. + +### PoolCommissionUpdated(`u32`, `Option<(Perbill,AccountId32)>`) +- **interface**: `api.events.nominationPools.PoolCommissionUpdated.is` +- **summary**: A pool's commission setting has been changed. + +### PoolMaxCommissionUpdated(`u32`, `Perbill`) +- **interface**: `api.events.nominationPools.PoolMaxCommissionUpdated.is` +- **summary**: A pool's maximum commission setting has been changed. + +### PoolNominationMade(`u32`, `AccountId32`) +- **interface**: `api.events.nominationPools.PoolNominationMade.is` +- **summary**: A pool's nominating account (or the pool's root account) has nominated a validator set on behalf of the pool. + +### PoolNominatorChilled(`u32`, `AccountId32`) +- **interface**: `api.events.nominationPools.PoolNominatorChilled.is` +- **summary**: The pool is chilled i.e. no longer nominating. + +### PoolSlashed(`u32`, `u128`) +- **interface**: `api.events.nominationPools.PoolSlashed.is` +- **summary**: The active balance of pool `pool_id` has been slashed to `balance`. + +### RolesUpdated(`Option`, `Option`, `Option`) +- **interface**: `api.events.nominationPools.RolesUpdated.is` +- **summary**: The roles of a pool have been updated to the given new roles. Note that the depositor can never change. + +### StateChanged(`u32`, `PalletNominationPoolsPoolState`) +- **interface**: `api.events.nominationPools.StateChanged.is` +- **summary**: The state of a pool has changed + +### Unbonded(`AccountId32`, `u32`, `u128`, `u128`, `u32`) +- **interface**: `api.events.nominationPools.Unbonded.is` +- **summary**: A member has unbonded from their pool. + + - `balance` is the corresponding balance of the number of points that has been requested to be unbonded (the argument of the `unbond` transaction) from the bonded pool. + + - `points` is the number of points that are issued as a result of `balance` being dissolved into the corresponding unbonding pool. + + - `era` is the era in which the balance will be unbonded. In the absence of slashing, these values will match. In the presence of slashing, the number of points that are issued in the unbonding pool will be less than the amount requested to be unbonded. + +### UnbondingPoolSlashed(`u32`, `u32`, `u128`) +- **interface**: `api.events.nominationPools.UnbondingPoolSlashed.is` +- **summary**: The unbond pool at `era` of pool `pool_id` has been slashed to `balance`. + +### Withdrawn(`AccountId32`, `u32`, `u128`, `u128`) +- **interface**: `api.events.nominationPools.Withdrawn.is` +- **summary**: A member has withdrawn from their pool. + + The given number of `points` have been dissolved in return of `balance`. + + Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance will be 1. + +___ + + ## parachainSystem ### DownwardMessagesProcessed(`SpWeightsWeightV2Weight`, `H256`) @@ -703,6 +1183,17 @@ ___ ___ +## parameters + +### Updated(`AssetHubPolkadotRuntimeRuntimeParametersKey`, `Option`, `Option`) +- **interface**: `api.events.parameters.Updated.is` +- **summary**: A Parameter was set. + + Is also emitted when the value was not changed. + +___ + + ## polkadotXcm ### AliasAuthorizationRemoved(`StagingXcmV5Location`, `StagingXcmV5Location`) @@ -939,6 +1430,23 @@ ___ ___ +## preimage + +### Cleared(`H256`) +- **interface**: `api.events.preimage.Cleared.is` +- **summary**: A preimage has ben cleared. + +### Noted(`H256`) +- **interface**: `api.events.preimage.Noted.is` +- **summary**: A preimage has been noted. + +### Requested(`H256`) +- **interface**: `api.events.preimage.Requested.is` +- **summary**: A preimage has been requested. + +___ + + ## proxy ### Announced(`AccountId32`, `AccountId32`, `H256`) @@ -964,12 +1472,132 @@ ___ ### PureCreated(`AccountId32`, `AccountId32`, `AssetHubPolkadotRuntimeProxyType`, `u16`) - **interface**: `api.events.proxy.PureCreated.is` - **summary**: A pure account has been created by new proxy with given disambiguation index and proxy type. + +### PureKilled(`AccountId32`, `AccountId32`, `AssetHubPolkadotRuntimeProxyType`, `u16`) +- **interface**: `api.events.proxy.PureKilled.is` +- **summary**: A pure proxy was killed by its spawner. + +___ + + +## referenda + +### Approved(`u32`) +- **interface**: `api.events.referenda.Approved.is` +- **summary**: A referendum has been approved and its proposal has been scheduled. + +### Cancelled(`u32`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.Cancelled.is` +- **summary**: A referendum has been cancelled. + +### ConfirmAborted(`u32`) +- **interface**: `api.events.referenda.ConfirmAborted.is` + +### Confirmed(`u32`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.Confirmed.is` +- **summary**: A referendum has ended its confirmation phase and is ready for approval. + +### ConfirmStarted(`u32`) +- **interface**: `api.events.referenda.ConfirmStarted.is` + +### DecisionDepositPlaced(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.referenda.DecisionDepositPlaced.is` +- **summary**: The decision deposit has been placed. + +### DecisionDepositRefunded(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.referenda.DecisionDepositRefunded.is` +- **summary**: The decision deposit has been refunded. + +### DecisionStarted(`u32`, `u16`, `FrameSupportPreimagesBounded`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.DecisionStarted.is` +- **summary**: A referendum has moved into the deciding phase. + +### DepositSlashed(`AccountId32`, `u128`) +- **interface**: `api.events.referenda.DepositSlashed.is` +- **summary**: A deposit has been slashed. + +### Killed(`u32`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.Killed.is` +- **summary**: A referendum has been killed. + +### MetadataCleared(`u32`, `H256`) +- **interface**: `api.events.referenda.MetadataCleared.is` +- **summary**: Metadata for a referendum has been cleared. + +### MetadataSet(`u32`, `H256`) +- **interface**: `api.events.referenda.MetadataSet.is` +- **summary**: Metadata for a referendum has been set. + +### Rejected(`u32`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.Rejected.is` +- **summary**: A proposal has been rejected by referendum. + +### SubmissionDepositRefunded(`u32`, `AccountId32`, `u128`) +- **interface**: `api.events.referenda.SubmissionDepositRefunded.is` +- **summary**: The submission deposit has been refunded. + +### Submitted(`u32`, `u16`, `FrameSupportPreimagesBounded`) +- **interface**: `api.events.referenda.Submitted.is` +- **summary**: A referendum has been submitted. + +### TimedOut(`u32`, `PalletConvictionVotingTally`) +- **interface**: `api.events.referenda.TimedOut.is` +- **summary**: A referendum has been timed out without being decided. + +___ + + +## scheduler + +### AgendaIncomplete(`u32`) +- **interface**: `api.events.scheduler.AgendaIncomplete.is` +- **summary**: Agenda is incomplete from `when`. + +### CallUnavailable(`(u32,u32)`, `Option<[u8;32]>`) +- **interface**: `api.events.scheduler.CallUnavailable.is` +- **summary**: The call for the provided hash was not found so the task has been aborted. + +### Canceled(`u32`, `u32`) +- **interface**: `api.events.scheduler.Canceled.is` +- **summary**: Canceled some task. + +### Dispatched(`(u32,u32)`, `Option<[u8;32]>`, `Result`) +- **interface**: `api.events.scheduler.Dispatched.is` +- **summary**: Dispatched some task. + +### PeriodicFailed(`(u32,u32)`, `Option<[u8;32]>`) +- **interface**: `api.events.scheduler.PeriodicFailed.is` +- **summary**: The given task was unable to be renewed since the agenda is full at that block. + +### PermanentlyOverweight(`(u32,u32)`, `Option<[u8;32]>`) +- **interface**: `api.events.scheduler.PermanentlyOverweight.is` +- **summary**: The given task can never be executed since it is overweight. + +### RetryCancelled(`(u32,u32)`, `Option<[u8;32]>`) +- **interface**: `api.events.scheduler.RetryCancelled.is` +- **summary**: Cancel a retry configuration for some task. + +### RetryFailed(`(u32,u32)`, `Option<[u8;32]>`) +- **interface**: `api.events.scheduler.RetryFailed.is` +- **summary**: The given task was unable to be retried since the agenda is full at that block or there was not enough weight to reschedule it. + +### RetrySet(`(u32,u32)`, `Option<[u8;32]>`, `u32`, `u8`) +- **interface**: `api.events.scheduler.RetrySet.is` +- **summary**: Set a retry configuration for some task. + +### Scheduled(`u32`, `u32`) +- **interface**: `api.events.scheduler.Scheduled.is` +- **summary**: Scheduled some task. ___ ## session +### NewQueued() +- **interface**: `api.events.session.NewQueued.is` +- **summary**: The `NewSession` event in the current block also implies a new validator set to be queued. + ### NewSession(`u32`) - **interface**: `api.events.session.NewSession.is` - **summary**: New session has happened. Note that the argument is the session index, not the block number as the type might suggest. @@ -985,6 +1613,148 @@ ___ ___ +## snowbridgeSystemFrontend + +### ExportOperatingModeChanged(`SnowbridgeCoreOperatingModeBasicOperatingMode`) +- **interface**: `api.events.snowbridgeSystemFrontend.ExportOperatingModeChanged.is` +- **summary**: Set OperatingMode + +### MessageSent(`StagingXcmV5Location`, `StagingXcmV5Location`, `StagingXcmV5Xcm`, `[u8;32]`) +- **interface**: `api.events.snowbridgeSystemFrontend.MessageSent.is` +- **summary**: An XCM was sent + +___ + + +## staking + +### Bonded(`AccountId32`, `u128`) +- **interface**: `api.events.staking.Bonded.is` +- **summary**: An account has bonded this amount. \[stash, amount\] + + NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably, it will not be emitted for staking rewards when they are added to stake. + +### Chilled(`AccountId32`) +- **interface**: `api.events.staking.Chilled.is` +- **summary**: An account has stopped participating as either a validator or nominator. + +### ControllerBatchDeprecated(`u32`) +- **interface**: `api.events.staking.ControllerBatchDeprecated.is` +- **summary**: Report of a controller batch deprecation. + +### CurrencyMigrated(`AccountId32`, `u128`) +- **interface**: `api.events.staking.CurrencyMigrated.is` +- **summary**: Staking balance migrated from locks to holds, with any balance that could not be held is force withdrawn. + +### EraPaid(`u32`, `u128`, `u128`) +- **interface**: `api.events.staking.EraPaid.is` +- **summary**: The era payout has been set; the first balance is the validator-payout; the second is the remainder from the maximum amount of reward. + +### EraPruned(`u32`) +- **interface**: `api.events.staking.EraPruned.is` +- **summary**: An old era with the given index was pruned. + +### ForceEra(`PalletStakingAsyncForcing`) +- **interface**: `api.events.staking.ForceEra.is` + +### Kicked(`AccountId32`, `AccountId32`) +- **interface**: `api.events.staking.Kicked.is` +- **summary**: A nominator has been kicked from a validator. + +### OffenceReported(`u32`, `AccountId32`, `Perbill`) +- **interface**: `api.events.staking.OffenceReported.is` +- **summary**: An offence for the given validator, for the given percentage of their stake, at the given era as been reported. + +### OffenceTooOld(`u32`, `AccountId32`, `Perbill`) +- **interface**: `api.events.staking.OffenceTooOld.is` +- **summary**: An offence was reported that was too old to be processed, and thus was dropped. + +### OldSlashingReportDiscarded(`u32`) +- **interface**: `api.events.staking.OldSlashingReportDiscarded.is` +- **summary**: An old slashing report from a prior era was discarded because it could not be processed. + +### PagedElectionProceeded(`u32`, `Result`) +- **interface**: `api.events.staking.PagedElectionProceeded.is` +- **summary**: A page from a multi-page election was fetched. A number of these are followed by `StakersElected`. + + `Ok(count)` indicates the give number of stashes were added. `Err(index)` indicates that the stashes after index were dropped. `Err(0)` indicates that an error happened but no stashes were dropped nor added. + + The error indicates that a number of validators were dropped due to excess size, but the overall election will continue. + +### PayoutStarted(`u32`, `AccountId32`, `u32`, `Option`) +- **interface**: `api.events.staking.PayoutStarted.is` +- **summary**: A Page of stakers rewards are getting paid. `next` is `None` if all pages are claimed. + +### Rewarded(`AccountId32`, `PalletStakingAsyncRewardDestination`, `u128`) +- **interface**: `api.events.staking.Rewarded.is` +- **summary**: The nominator has been rewarded by this amount to this destination. + +### SessionRotated(`u32`, `u32`, `u32`) +- **interface**: `api.events.staking.SessionRotated.is` +- **summary**: Session change has been triggered. + + If planned_era is one era ahead of active_era, it implies new era is being planned and election is ongoing. + +### SlashCancelled(`u32`, `AccountId32`) +- **interface**: `api.events.staking.SlashCancelled.is` +- **summary**: An unapplied slash has been cancelled. + +### SlashComputed(`u32`, `u32`, `AccountId32`, `u32`) +- **interface**: `api.events.staking.SlashComputed.is` +- **summary**: An offence has been processed and the corresponding slash has been computed. + +### Slashed(`AccountId32`, `u128`) +- **interface**: `api.events.staking.Slashed.is` +- **summary**: A staker (validator or nominator) has been slashed by the given amount. + +### SnapshotTargetsSizeExceeded(`u32`) +- **interface**: `api.events.staking.SnapshotTargetsSizeExceeded.is` +- **summary**: Targets size limit reached. + +### SnapshotVotersSizeExceeded(`u32`) +- **interface**: `api.events.staking.SnapshotVotersSizeExceeded.is` +- **summary**: Voters size limit reached. + +### StakerRemoved(`AccountId32`) +- **interface**: `api.events.staking.StakerRemoved.is` +- **summary**: A subsequent event of `Withdrawn`, indicating that `stash` was fully removed from the system. + +### Unbonded(`AccountId32`, `u128`) +- **interface**: `api.events.staking.Unbonded.is` +- **summary**: An account has unbonded this amount. + +### Unexpected(`PalletStakingAsyncPalletUnexpectedKind`) +- **interface**: `api.events.staking.Unexpected.is` +- **summary**: Something occurred that should never happen under normal operation. Logged as an event for fail-safe observability. + +### ValidatorPrefsSet(`AccountId32`, `PalletStakingAsyncValidatorPrefs`) +- **interface**: `api.events.staking.ValidatorPrefsSet.is` +- **summary**: A validator has set their preferences. + +### Withdrawn(`AccountId32`, `u128`) +- **interface**: `api.events.staking.Withdrawn.is` +- **summary**: An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance` from the unlocking queue. + +___ + + +## stakingRcClient + +### OffenceReceived(`u32`, `u32`) +- **interface**: `api.events.stakingRcClient.OffenceReceived.is` +- **summary**: A new offence was reported. + +### SessionReportReceived(`u32`, `Option<(u64,u32)>`, `u32`, `bool`) +- **interface**: `api.events.stakingRcClient.SessionReportReceived.is` +- **summary**: A said session report was received. + +### Unexpected(`PalletStakingAsyncRcClientUnexpectedKind`) +- **interface**: `api.events.stakingRcClient.Unexpected.is` +- **summary**: Something occurred that should never happen under normal operation. Logged as an event for fail-safe observability. + +___ + + ## stateTrieMigration ### AutoMigrationFinished() @@ -1036,6 +1806,18 @@ ___ - **interface**: `api.events.system.Remarked.is` - **summary**: On on-chain remark happened. +### TaskCompleted(`AssetHubPolkadotRuntimeRuntimeTask`) +- **interface**: `api.events.system.TaskCompleted.is` +- **summary**: A [`Task`] has finished executing. + +### TaskFailed(`AssetHubPolkadotRuntimeRuntimeTask`, `SpRuntimeDispatchError`) +- **interface**: `api.events.system.TaskFailed.is` +- **summary**: A [`Task`] failed during execution. + +### TaskStarted(`AssetHubPolkadotRuntimeRuntimeTask`) +- **interface**: `api.events.system.TaskStarted.is` +- **summary**: A [`Task`] has started executing + ### UpgradeAuthorized(`H256`, `bool`) - **interface**: `api.events.system.UpgradeAuthorized.is` - **summary**: An upgrade was authorized. @@ -1065,6 +1847,59 @@ ___ ___ +## treasury + +### AssetSpendApproved(`u32`, `PolkadotRuntimeCommonImplsVersionedLocatableAsset`, `u128`, `ParachainsCommonPayVersionedLocatableAccount`, `u32`, `u32`) +- **interface**: `api.events.treasury.AssetSpendApproved.is` +- **summary**: A new asset spend proposal has been approved. + +### AssetSpendVoided(`u32`) +- **interface**: `api.events.treasury.AssetSpendVoided.is` +- **summary**: An approved spend was voided. + +### Awarded(`u32`, `u128`, `AccountId32`) +- **interface**: `api.events.treasury.Awarded.is` +- **summary**: Some funds have been allocated. + +### Burnt(`u128`) +- **interface**: `api.events.treasury.Burnt.is` +- **summary**: Some of our funds have been burnt. + +### Deposit(`u128`) +- **interface**: `api.events.treasury.Deposit.is` +- **summary**: Some funds have been deposited. + +### Paid(`u32`, `u64`) +- **interface**: `api.events.treasury.Paid.is` +- **summary**: A payment happened. + +### PaymentFailed(`u32`, `u64`) +- **interface**: `api.events.treasury.PaymentFailed.is` +- **summary**: A payment failed and can be retried. + +### Rollover(`u128`) +- **interface**: `api.events.treasury.Rollover.is` +- **summary**: Spending has finished; this is the amount that rolls over until next spend. + +### SpendApproved(`u32`, `u128`, `AccountId32`) +- **interface**: `api.events.treasury.SpendApproved.is` +- **summary**: A new spend proposal has been approved. + +### Spending(`u128`) +- **interface**: `api.events.treasury.Spending.is` +- **summary**: We have ended a spend period and will now allocate funds. + +### SpendProcessed(`u32`) +- **interface**: `api.events.treasury.SpendProcessed.is` +- **summary**: A spend was processed and removed from the storage. It might have been successfully paid or it may have expired. + +### UpdatedInactive(`u128`, `u128`) +- **interface**: `api.events.treasury.UpdatedInactive.is` +- **summary**: The inactive funds of the pallet have been updated. + +___ + + ## uniques ### ApprovalCancelled(`u32`, `u32`, `AccountId32`, `AccountId32`) @@ -1221,6 +2056,10 @@ ___ - **interface**: `api.events.vesting.VestingCompleted.is` - **summary**: An \[account\] has become fully vested. +### VestingCreated(`AccountId32`, `u32`) +- **interface**: `api.events.vesting.VestingCreated.is` +- **summary**: A vesting schedule has been created. + ### VestingUpdated(`AccountId32`, `u128`) - **interface**: `api.events.vesting.VestingUpdated.is` - **summary**: The amount vested has been updated. This could indicate a change in funds available. The balance given is the amount which is left unvested (and thus locked). @@ -1228,6 +2067,33 @@ ___ ___ +## voterList + +### Rebagged(`AccountId32`, `u64`, `u64`) +- **interface**: `api.events.voterList.Rebagged.is` +- **summary**: Moved an account from one bag to another. + +### ScoreUpdated(`AccountId32`, `u64`) +- **interface**: `api.events.voterList.ScoreUpdated.is` +- **summary**: Updated the score of some account to the given amount. + +___ + + +## whitelist + +### CallWhitelisted(`H256`) +- **interface**: `api.events.whitelist.CallWhitelisted.is` + +### WhitelistedCallDispatched(`H256`, `Result`) +- **interface**: `api.events.whitelist.WhitelistedCallDispatched.is` + +### WhitelistedCallRemoved(`H256`) +- **interface**: `api.events.whitelist.WhitelistedCallRemoved.is` + +___ + + ## xcmpQueue ### XcmpMessageSent(`[u8;32]`) diff --git a/docs/asset-hub-polkadot/extrinsics.md b/docs/asset-hub-polkadot/extrinsics.md index a8d78a432..c12aaf50b 100644 --- a/docs/asset-hub-polkadot/extrinsics.md +++ b/docs/asset-hub-polkadot/extrinsics.md @@ -6,36 +6,76 @@ The following sections contain Extrinsics methods are part of the default asset- (NOTE: These were generated from a static/snapshot view of a recent default asset-hub-polkadot runtime. Some items may not be available in older nodes, or in any customized implementations.) +- **[ahMigrator](#ahmigrator)** + +- **[ahOps](#ahops)** + - **[assetConversion](#assetconversion)** +- **[assetRate](#assetrate)** + - **[assets](#assets)** - **[balances](#balances)** +- **[bounties](#bounties)** + +- **[childBounties](#childbounties)** + +- **[claims](#claims)** + - **[collatorSelection](#collatorselection)** +- **[convictionVoting](#convictionvoting)** + - **[cumulusXcm](#cumulusxcm)** - **[foreignAssets](#foreignassets)** +- **[indices](#indices)** + - **[messageQueue](#messagequeue)** +- **[multiBlockElection](#multiblockelection)** + +- **[multiBlockElectionSigned](#multiblockelectionsigned)** + +- **[multiBlockElectionUnsigned](#multiblockelectionunsigned)** + +- **[multiBlockElectionVerifier](#multiblockelectionverifier)** + - **[multisig](#multisig)** - **[nfts](#nfts)** +- **[nominationPools](#nominationpools)** + - **[parachainInfo](#parachaininfo)** - **[parachainSystem](#parachainsystem)** +- **[parameters](#parameters)** + - **[polkadotXcm](#polkadotxcm)** - **[poolAssets](#poolassets)** +- **[preimage](#preimage)** + - **[proxy](#proxy)** +- **[referenda](#referenda)** + +- **[scheduler](#scheduler)** + - **[session](#session)** +- **[snowbridgeSystemFrontend](#snowbridgesystemfrontend)** + +- **[staking](#staking)** + +- **[stakingRcClient](#stakingrcclient)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** @@ -44,21 +84,196 @@ The following sections contain Extrinsics methods are part of the default asset- - **[toKusamaXcmRouter](#tokusamaxcmrouter)** +- **[treasury](#treasury)** + - **[uniques](#uniques)** - **[utility](#utility)** - **[vesting](#vesting)** +- **[voterList](#voterlist)** + +- **[whitelist](#whitelist)** + - **[xcmpQueue](#xcmpqueue)** ___ +## ahMigrator + +### finishMigration(data: `Option`, cool_off_end_at: `u32`) +- **interface**: `api.tx.ahMigrator.finishMigration` +- **summary**: Finish the migration. + + This is typically called by the Relay Chain to signal the migration has finished. + + The `data` parameter might be `None` if we are running the migration for a second time for some pallets and have already performed the checking account balance correction, so we do not need to do it this time. + +### forceSetStage(stage: `PalletAhMigratorMigrationStage`) +- **interface**: `api.tx.ahMigrator.forceSetStage` +- **summary**: Set the migration stage. + + This call is intended for emergency use only and is guarded by the [`Config::AdminOrigin`]. + +### receiveAccounts(accounts: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveAccounts` +- **summary**: Receive accounts from the Relay Chain. + + The accounts sent with `pallet_rc_migrator::Pallet::migrate_accounts` function. + +### receiveAssetRates(rates: `Vec<(PolkadotRuntimeCommonImplsVersionedLocatableAsset,u128)>`) +- **interface**: `api.tx.ahMigrator.receiveAssetRates` + +### receiveBagsListMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveBagsListMessages` + +### receiveBountiesMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveBountiesMessages` + +### receiveChildBountiesMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveChildBountiesMessages` + +### receiveClaims(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveClaims` + +### receiveConvictionVotingMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveConvictionVotingMessages` + +### receiveCrowdloanMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveCrowdloanMessages` + +### receiveDelegatedStakingMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveDelegatedStakingMessages` + +### receiveIndices(indices: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveIndices` + +### receiveMultisigs(accounts: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveMultisigs` +- **summary**: Receive multisigs from the Relay Chain. + + This will be called from an XCM `Transact` inside a DMP from the relay chain. The multisigs were prepared by `pallet_rc_migrator::multisig::MultisigMigrator::migrate_many`. + +### receiveNomPoolsMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveNomPoolsMessages` + +### receivePreimageChunks(chunks: `Vec`) +- **interface**: `api.tx.ahMigrator.receivePreimageChunks` + +### receivePreimageLegacyStatus(legacy_status: `Vec`) +- **interface**: `api.tx.ahMigrator.receivePreimageLegacyStatus` + +### receivePreimageRequestStatus(request_status: `Vec`) +- **interface**: `api.tx.ahMigrator.receivePreimageRequestStatus` + +### receiveProxyAnnouncements(announcements: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveProxyAnnouncements` +- **summary**: Receive proxy announcements from the Relay Chain. + +### receiveProxyProxies(proxies: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveProxyProxies` +- **summary**: Receive proxies from the Relay Chain. + +### receiveReferendaMetadata(metadata: `Vec<(u32,H256)>`) +- **interface**: `api.tx.ahMigrator.receiveReferendaMetadata` + +### receiveReferendaValues(values: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveReferendaValues` +- **summary**: Receive referendum counts, deciding counts, votes for the track queue. + +### receiveReferendums(referendums: `Vec<(u32,PalletReferendaReferendumInfoRcPalletsOrigin)>`) +- **interface**: `api.tx.ahMigrator.receiveReferendums` +- **summary**: Receive referendums from the Relay Chain. + +### receiveSchedulerAgendaMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveSchedulerAgendaMessages` + +### receiveSchedulerMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveSchedulerMessages` + +### receiveStakingMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveStakingMessages` + +### receiveTreasuryMessages(messages: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveTreasuryMessages` + +### receiveVestingSchedules(schedules: `Vec`) +- **interface**: `api.tx.ahMigrator.receiveVestingSchedules` + +### sendXcmMessage(dest: `XcmVersionedLocation`, message: `XcmVersionedXcm`) +- **interface**: `api.tx.ahMigrator.sendXcmMessage` +- **summary**: XCM send call identical to the [`pallet_xcm::Pallet::send`] call but with the [Config::SendXcm] router which will be able to send messages to the Relay Chain during the migration. + +### setDmpQueuePriority(new: `PalletRcMigratorQueuePriority`) +- **interface**: `api.tx.ahMigrator.setDmpQueuePriority` +- **summary**: Set the DMP queue priority configuration. + + Can only be called by the `AdminOrigin`. + +### setManager(new: `Option`) +- **interface**: `api.tx.ahMigrator.setManager` +- **summary**: Set the manager account id. + + The manager has the similar to [`Config::AdminOrigin`] privileges except that it can not set the manager account id via `set_manager` call. + +### startMigration() +- **interface**: `api.tx.ahMigrator.startMigration` +- **summary**: Start the data migration. + + This is typically called by the Relay Chain to start the migration on the Asset Hub and receive a handshake message indicating the Asset Hub's readiness. + +___ + + +## ahOps + +### transferToPostMigrationTreasury(asset_id: `StagingXcmV5Location`) +- **interface**: `api.tx.ahOps.transferToPostMigrationTreasury` +- **summary**: Transfer the balance from the pre-migration treasury account to the post-migration treasury account. + + This call can only be called after the migration is completed. + +### unreserveCrowdloanReserve(block: `u32`, depositor: `Option`, para_id: `u32`) +- **interface**: `api.tx.ahOps.unreserveCrowdloanReserve` +- **summary**: Unreserve the deposit that was taken for creating a crowdloan. + + This can be called once either: + + - The crowdloan failed to win an auction and timed out + + - Won an auction, all leases expired and all contributions are withdrawn + + Can be called by any signed origin. The condition that all contributions are withdrawn is in place since the reserve acts as a storage deposit. + +### unreserveLeaseDeposit(block: `u32`, depositor: `Option`, para_id: `u32`) +- **interface**: `api.tx.ahOps.unreserveLeaseDeposit` +- **summary**: Unreserve the deposit that was taken for creating a crowdloan. + + This can be called by any signed origin. It unreserves the lease deposit on the account that won the lease auction. It can be unreserved once all leases expired. Note that it will be called automatically from `withdraw_crowdloan_contribution` for the matching crowdloan account. + + Solo bidder accounts that won lease auctions can use this to unreserve their amount. + +### withdrawCrowdloanContribution(block: `u32`, depositor: `Option`, para_id: `u32`) +- **interface**: `api.tx.ahOps.withdrawCrowdloanContribution` +- **summary**: Withdraw the contribution of a finished crowdloan. + + A crowdloan contribution can be withdrawn if either: + + - The crowdloan failed to in an auction and timed out + + - Won an auction and all leases expired + + Can be called by any signed origin. + +___ + + ## assetConversion -### addLiquidity(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`, amount1_desired: `u128`, amount2_desired: `u128`, amount1_min: `u128`, amount2_min: `u128`, mint_to: `AccountId32`) +### addLiquidity(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`, amount1_desired: `u128`, amount2_desired: `u128`, amount1_min: `u128`, amount2_min: `u128`, mint_to: `AccountId32`) - **interface**: `api.tx.assetConversion.addLiquidity` - **summary**: Provide liquidity into the pool of `asset1` and `asset2`. NOTE: an optimal amount of asset1 and asset2 will be calculated and might be different than the provided `amount1_desired`/`amount2_desired` thus you should provide the min amount you're happy to provide. Params `amount1_min`/`amount2_min` represent that. `mint_to` will be sent the liquidity tokens that represent this share of the pool. @@ -66,29 +281,29 @@ ___ Once liquidity is added, someone may successfully call [`Pallet::swap_exact_tokens_for_tokens`]. -### createPool(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`) +### createPool(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`) - **interface**: `api.tx.assetConversion.createPool` - **summary**: Creates an empty liquidity pool and an associated new `lp_token` asset (the id of which is returned in the `Event::PoolCreated` event). Once a pool is created, someone may [`Pallet::add_liquidity`] to it. -### removeLiquidity(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`, lp_token_burn: `u128`, amount1_min_receive: `u128`, amount2_min_receive: `u128`, withdraw_to: `AccountId32`) +### removeLiquidity(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`, lp_token_burn: `u128`, amount1_min_receive: `u128`, amount2_min_receive: `u128`, withdraw_to: `AccountId32`) - **interface**: `api.tx.assetConversion.removeLiquidity` - **summary**: Allows you to remove liquidity by providing the `lp_token_burn` tokens that will be burned in the process. With the usage of `amount1_min_receive`/`amount2_min_receive` it's possible to control the min amount of returned tokens you're happy with. -### swapExactTokensForTokens(path: `Vec`, amount_in: `u128`, amount_out_min: `u128`, send_to: `AccountId32`, keep_alive: `bool`) +### swapExactTokensForTokens(path: `Vec`, amount_in: `u128`, amount_out_min: `u128`, send_to: `AccountId32`, keep_alive: `bool`) - **interface**: `api.tx.assetConversion.swapExactTokensForTokens` - **summary**: Swap the exact amount of `asset1` into `asset2`. `amount_out_min` param allows you to specify the min amount of the `asset2` you're happy to receive. [`AssetConversionApi::quote_price_exact_tokens_for_tokens`] runtime call can be called for a quote. -### swapTokensForExactTokens(path: `Vec`, amount_out: `u128`, amount_in_max: `u128`, send_to: `AccountId32`, keep_alive: `bool`) +### swapTokensForExactTokens(path: `Vec`, amount_out: `u128`, amount_in_max: `u128`, send_to: `AccountId32`, keep_alive: `bool`) - **interface**: `api.tx.assetConversion.swapTokensForExactTokens` - **summary**: Swap any amount of `asset1` to get the exact amount of `asset2`. `amount_in_max` param allows to specify the max amount of the `asset1` you're happy to provide. [`AssetConversionApi::quote_price_tokens_for_exact_tokens`] runtime call can be called for a quote. -### touch(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`) +### touch(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`) - **interface**: `api.tx.assetConversion.touch` - **summary**: Touch an existing pool to fulfill prerequisites before providing liquidity, such as ensuring that the pool's accounts are in place. It is typically useful when a pool creator removes the pool's accounts and does not provide a liquidity. This action may involve holding assets from the caller as a deposit for creating the pool's accounts. @@ -103,6 +318,35 @@ ___ ___ +## assetRate + +### create(asset_kind: `PolkadotRuntimeCommonImplsVersionedLocatableAsset`, rate: `u128`) +- **interface**: `api.tx.assetRate.create` +- **summary**: Initialize a conversion rate to native balance for the given asset. + + #### Complexity + + - O(1) + +### remove(asset_kind: `PolkadotRuntimeCommonImplsVersionedLocatableAsset`) +- **interface**: `api.tx.assetRate.remove` +- **summary**: Remove an existing conversion rate to native balance for the given asset. + + #### Complexity + + - O(1) + +### update(asset_kind: `PolkadotRuntimeCommonImplsVersionedLocatableAsset`, rate: `u128`) +- **interface**: `api.tx.assetRate.update` +- **summary**: Update the conversion rate to native balance for the given asset. + + #### Complexity + + - O(1) + +___ + + ## assets ### approveTransfer(id: `Compact`, delegate: `MultiAddress`, amount: `Compact`) @@ -701,2392 +945,3973 @@ ___ ___ -## collatorSelection - -### addInvulnerable(who: `AccountId32`) -- **interface**: `api.tx.collatorSelection.addInvulnerable` -- **summary**: Add a new account `who` to the list of `Invulnerables` collators. `who` must have registered session keys. If `who` is a candidate, they will be removed. - - The origin for this call must be the `UpdateOrigin`. +## bounties -### leaveIntent() -- **interface**: `api.tx.collatorSelection.leaveIntent` -- **summary**: Deregister `origin` as a collator candidate. Note that the collator can only leave on session change. The `CandidacyBond` will be unreserved immediately. +### acceptCurator(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.acceptCurator` +- **summary**: Accept the curator role for a bounty. A deposit will be reserved from curator and refund upon successful payout. - This call will fail if the total number of candidates would drop below `MinEligibleCollators`. - -### registerAsCandidate() -- **interface**: `api.tx.collatorSelection.registerAsCandidate` -- **summary**: Register this account as a collator candidate. The account must (a) already have registered session keys and (b) be able to reserve the `CandidacyBond`. + May only be called from the curator. - This call is not available to `Invulnerable` collators. - -### removeInvulnerable(who: `AccountId32`) -- **interface**: `api.tx.collatorSelection.removeInvulnerable` -- **summary**: Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must be sorted. + #### Complexity - The origin for this call must be the `UpdateOrigin`. + - O(1). -### setCandidacyBond(bond: `u128`) -- **interface**: `api.tx.collatorSelection.setCandidacyBond` -- **summary**: Set the candidacy bond amount. +### approveBounty(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.approveBounty` +- **summary**: Approve a bounty proposal. At a later time, the bounty will be funded and become active and the original deposit will be returned. - If the candidacy bond is increased by this call, all current candidates which have a deposit lower than the new bond will be kicked from the list and get their deposits back. + May only be called from `T::SpendOrigin`. - The origin for this call must be the `UpdateOrigin`. - -### setDesiredCandidates(max: `u32`) -- **interface**: `api.tx.collatorSelection.setDesiredCandidates` -- **summary**: Set the ideal number of non-invulnerable collators. If lowering this number, then the number of running collators could be higher than this figure. Aside from that edge case, there should be no other way to have more candidates than the desired number. + #### Complexity - The origin for this call must be the `UpdateOrigin`. + - O(1). -### setInvulnerables(new: `Vec`) -- **interface**: `api.tx.collatorSelection.setInvulnerables` -- **summary**: Set the list of invulnerable (fixed) collators. These collators must do some preparation, namely to have registered session keys. - - The call will remove any accounts that have not registered keys from the set. That is, it is non-atomic; the caller accepts all `AccountId`s passed in `new` _individually_ as acceptable Invulnerables, and is not proposing a _set_ of new Invulnerables. +### approveBountyWithCurator(bounty_id: `Compact`, curator: `MultiAddress`, fee: `Compact`) +- **interface**: `api.tx.bounties.approveBountyWithCurator` +- **summary**: Approve bountry and propose a curator simultaneously. This call is a shortcut to calling `approve_bounty` and `propose_curator` separately. - This call does not maintain mutual exclusivity of `Invulnerables` and `Candidates`. It is recommended to use a batch of `add_invulnerable` and `remove_invulnerable` instead. A `batch_all` can also be used to enforce atomicity. If any candidates are included in `new`, they should be removed with `remove_invulnerable_candidate` after execution. + May only be called from `T::SpendOrigin`. - Must be called by the `UpdateOrigin`. - -### takeCandidateSlot(deposit: `u128`, target: `AccountId32`) -- **interface**: `api.tx.collatorSelection.takeCandidateSlot` -- **summary**: The caller `origin` replaces a candidate `target` in the collator candidate list by reserving `deposit`. The amount `deposit` reserved by the caller must be greater than the existing bond of the target it is trying to replace. + - `bounty_id`: Bounty ID to approve. - This call will fail if the caller is already a collator candidate or invulnerable, the caller does not have registered session keys, the target is not a collator candidate, and/or the `deposit` amount cannot be reserved. - -### updateBond(new_deposit: `u128`) -- **interface**: `api.tx.collatorSelection.updateBond` -- **summary**: Update the candidacy bond of collator candidate `origin` to a new amount `new_deposit`. + - `curator`: The curator account whom will manage this bounty. - Setting a `new_deposit` that is lower than the current deposit while `origin` is occupying a top-`DesiredCandidates` slot is not allowed. + - `fee`: The curator fee. - This call will fail if `origin` is not a collator candidate, the updated bond is lower than the minimum candidacy bond, and/or the amount cannot be reserved. + #### Complexity -___ + - O(1). + +### awardBounty(bounty_id: `Compact`, beneficiary: `MultiAddress`) +- **interface**: `api.tx.bounties.awardBounty` +- **summary**: Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay. + The dispatch origin for this call must be the curator of this bounty. -## cumulusXcm + - `bounty_id`: Bounty ID to award. -___ + - `beneficiary`: The beneficiary account whom will receive the payout. + #### Complexity -## foreignAssets + - O(1). -### approveTransfer(id: `StagingXcmV4Location`, delegate: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.approveTransfer` -- **summary**: Approve an amount of asset for transfer by a delegated third-party account. +### claimBounty(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.claimBounty` +- **summary**: Claim the payout from an awarded bounty after payout delay. - Origin must be Signed. + The dispatch origin for this call must be the beneficiary of this bounty. - Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account to `delegate`, then it is topped up or unreserved to meet the right value. + - `bounty_id`: Bounty ID to claim. - NOTE: The signing account does not need to own `amount` of assets at the point of making this call. + #### Complexity - - `id`: The identifier of the asset. + - O(1). + +### closeBounty(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.closeBounty` +- **summary**: Cancel a proposed or active bounty. All the funds will be sent to treasury and the curator deposit will be unreserved if possible. - - `delegate`: The account to delegate permission to transfer asset. + Only `T::RejectOrigin` is able to cancel a bounty. - - `amount`: The amount of asset that may be transferred by `delegate`. If there is already an approval in place, then this acts additively. + - `bounty_id`: Bounty ID to cancel. - Emits `ApprovedTransfer` on success. + #### Complexity - Weight: `O(1)` + - O(1). -### block(id: `StagingXcmV4Location`, who: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.block` -- **summary**: Disallow further unprivileged transfers of an asset `id` to and from an account `who`. +### extendBountyExpiry(bounty_id: `Compact`, remark: `Bytes`) +- **interface**: `api.tx.bounties.extendBountyExpiry` +- **summary**: Extend the expiry time of an active bounty. - Origin must be Signed and the sender should be the Freezer of the asset `id`. + The dispatch origin for this call must be the curator of this bounty. - - `id`: The identifier of the account's asset. + - `bounty_id`: Bounty ID to extend. - - `who`: The account to be unblocked. + - `remark`: additional information. - Emits `Blocked`. + #### Complexity - Weight: `O(1)` + - O(1). -### burn(id: `StagingXcmV4Location`, who: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.burn` -- **summary**: Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. +### pokeDeposit(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.pokeDeposit` +- **summary**: Poke the deposit reserved for creating a bounty proposal. - Origin must be Signed and the sender should be the Manager of the asset `id`. + This can be used by accounts to update their reserved amount. - Bails with `NoAccount` if the `who` is already dead. + The dispatch origin for this call must be _Signed_. - - `id`: The identifier of the asset to have some amount burned. + Parameters: - - `who`: The account to be debited from. + - `bounty_id`: The bounty id for which to adjust the deposit. - - `amount`: The maximum amount by which `who`'s balance should be reduced. + If the deposit is updated, the difference will be reserved/unreserved from the proposer's account. - Emits `Burned` with the actual amount burned. If this takes the balance to below the minimum for the asset, then the amount burned is increased to take it to zero. + The transaction is made free if the deposit is updated and paid otherwise. - Weight: `O(1)` Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. + Emits `DepositPoked` if the deposit is updated. -### cancelApproval(id: `StagingXcmV4Location`, delegate: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.cancelApproval` -- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. +### proposeBounty(value: `Compact`, description: `Bytes`) +- **interface**: `api.tx.bounties.proposeBounty` +- **summary**: Propose a new bounty. - Origin must be Signed and there must be an approval in place between signer and `delegate`. + The dispatch origin for this call must be _Signed_. - Unreserves any deposit previously reserved by `approve_transfer` for the approval. + Payment: `TipReportDepositBase` will be reserved from the origin account, as well as `DataDepositPerByte` for each byte in `reason`. It will be unreserved upon approval, or slashed when rejected. - - `id`: The identifier of the asset. + - `curator`: The curator account whom will manage this bounty. - - `delegate`: The account delegated permission to transfer asset. + - `fee`: The curator fee. - Emits `ApprovalCancelled` on success. + - `value`: The total payment amount of this bounty, curator fee included. - Weight: `O(1)` + - `description`: The description of this bounty. -### clearMetadata(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.clearMetadata` -- **summary**: Clear the metadata for an asset. - - Origin must be Signed and the sender should be the Owner of the asset `id`. - - Any deposit is freed for the asset owner. +### proposeCurator(bounty_id: `Compact`, curator: `MultiAddress`, fee: `Compact`) +- **interface**: `api.tx.bounties.proposeCurator` +- **summary**: Propose a curator to a funded bounty. - - `id`: The identifier of the asset to clear. + May only be called from `T::SpendOrigin`. - Emits `MetadataCleared`. + #### Complexity - Weight: `O(1)` + - O(1). -### create(id: `StagingXcmV4Location`, admin: `MultiAddress`, min_balance: `u128`) -- **interface**: `api.tx.foreignAssets.create` -- **summary**: Issue a new class of fungible assets from a public origin. +### unassignCurator(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.unassignCurator` +- **summary**: Unassign curator from a bounty. - This new asset class has no assets initially and its owner is the origin. + This function can only be called by the `RejectOrigin` a signed origin. - The origin must conform to the configured `CreateOrigin` and have sufficient funds free. + If this function is called by the `RejectOrigin`, we assume that the curator is malicious or inactive. As a result, we will slash the curator when possible. - Funds of sender are reserved by `AssetDeposit`. + If the origin is the curator, we take this as a sign they are unable to do their job and they willingly give up. We could slash them, but for now we allow them to recover their deposit and exit without issue. (We may want to change this if it is abused.) - Parameters: + Finally, the origin can be anyone if and only if the curator is "inactive". This allows anyone in the community to call out that a curator is not doing their due diligence, and we should pick a new curator. In this case the curator should also be slashed. - - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + #### Complexity - - `admin`: The admin of this class of assets. The admin is the initial address of each member of the asset class's admin team. + - O(1). - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. +___ - Emits `Created` event when successful. - Weight: `O(1)` +## childBounties -### destroyAccounts(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.destroyAccounts` -- **summary**: Destroy all accounts associated with a given asset. +### acceptCurator(parent_bounty_id: `Compact`, child_bounty_id: `Compact`) +- **interface**: `api.tx.childBounties.acceptCurator` +- **summary**: Accept the curator role for the child-bounty. - `destroy_accounts` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + The dispatch origin for this call must be the curator of this child-bounty. - Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time. + A deposit will be reserved from the curator and refund upon successful payout or cancellation. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + Fee for curator is deducted from curator fee of parent bounty. - Each call emits the `Event::DestroyedAccounts` event. + Parent bounty must be in active state, for this child-bounty call to work. + + Child-bounty must be in "CuratorProposed" state, for processing the call. And state of child-bounty is moved to "Active" on successful call completion. + + - `parent_bounty_id`: Index of parent bounty. + + - `child_bounty_id`: Index of child bounty. -### destroyApprovals(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.destroyApprovals` -- **summary**: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit). +### addChildBounty(parent_bounty_id: `Compact`, value: `Compact`, description: `Bytes`) +- **interface**: `api.tx.childBounties.addChildBounty` +- **summary**: Add a new child-bounty. - `destroy_approvals` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + The dispatch origin for this call must be the curator of parent bounty and the parent bounty must be in "active" state. - Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time. + Child-bounty gets added successfully & fund gets transferred from parent bounty to child-bounty account, if parent bounty has enough funds, else the call fails. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + Upper bound to maximum number of active child bounties that can be added are managed via runtime trait config [`Config::MaxActiveChildBountyCount`]. - Each call emits the `Event::DestroyedApprovals` event. - -### finishDestroy(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.finishDestroy` -- **summary**: Complete destroying asset and unreserve currency. + If the call is success, the status of child-bounty is updated to "Added". - `finish_destroy` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. All accounts or approvals should be destroyed before hand. + - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + - `value`: Value for executing the proposal. - Each successful call emits the `Event::Destroyed` event. + - `description`: Text description for the child-bounty. -### forceAssetStatus(id: `StagingXcmV4Location`, owner: `MultiAddress`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`, min_balance: `Compact`, is_sufficient: `bool`, is_frozen: `bool`) -- **interface**: `api.tx.foreignAssets.forceAssetStatus` -- **summary**: Alter the attributes of a given asset. +### awardChildBounty(parent_bounty_id: `Compact`, child_bounty_id: `Compact`, beneficiary: `MultiAddress`) +- **interface**: `api.tx.childBounties.awardChildBounty` +- **summary**: Award child-bounty to a beneficiary. - Origin must be `ForceOrigin`. + The beneficiary will be able to claim the funds after a delay. - - `id`: The identifier of the asset. + The dispatch origin for this call must be the parent curator or curator of this child-bounty. - - `owner`: The new Owner of this asset. + Parent bounty must be in active state, for this child-bounty call to work. - - `issuer`: The new Issuer of this asset. + Child-bounty must be in active state, for processing the call. And state of child-bounty is moved to "PendingPayout" on successful call completion. - - `admin`: The new Admin of this asset. + - `parent_bounty_id`: Index of parent bounty. - - `freezer`: The new Freezer of this asset. + - `child_bounty_id`: Index of child bounty. - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + - `beneficiary`: Beneficiary account. + +### claimChildBounty(parent_bounty_id: `Compact`, child_bounty_id: `Compact`) +- **interface**: `api.tx.childBounties.claimChildBounty` +- **summary**: Claim the payout from an awarded child-bounty after payout delay. - - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient value to account for the state bloat associated with its balance storage. If set to `true`, then non-zero balances may be stored without a `consumer` reference (and thus an ED in the Balances pallet or whatever else is used to control user-account state growth). + The dispatch origin for this call may be any signed origin. - - `is_frozen`: Whether this asset class is frozen except for permissioned/admin instructions. + Call works independent of parent bounty state, No need for parent bounty to be in active state. - Emits `AssetStatusChanged` with the identity of the asset. + The Beneficiary is paid out with agreed bounty value. Curator fee is paid & curator deposit is unreserved. - Weight: `O(1)` + Child-bounty must be in "PendingPayout" state, for processing the call. And instance of child-bounty is removed from the state on successful call completion. + + - `parent_bounty_id`: Index of parent bounty. + + - `child_bounty_id`: Index of child bounty. -### forceCancelApproval(id: `StagingXcmV4Location`, owner: `MultiAddress`, delegate: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.forceCancelApproval` -- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. +### closeChildBounty(parent_bounty_id: `Compact`, child_bounty_id: `Compact`) +- **interface**: `api.tx.childBounties.closeChildBounty` +- **summary**: Cancel a proposed or active child-bounty. Child-bounty account funds are transferred to parent bounty account. The child-bounty curator deposit may be unreserved if possible. - Origin must be either ForceOrigin or Signed origin with the signer being the Admin account of the asset `id`. + The dispatch origin for this call must be either parent curator or `T::RejectOrigin`. - Unreserves any deposit previously reserved by `approve_transfer` for the approval. + If the state of child-bounty is `Active`, curator deposit is unreserved. - - `id`: The identifier of the asset. + If the state of child-bounty is `PendingPayout`, call fails & returns `PendingPayout` error. - - `delegate`: The account delegated permission to transfer asset. + For the origin other than T::RejectOrigin, parent bounty must be in active state, for this child-bounty call to work. For origin T::RejectOrigin execution is forced. - Emits `ApprovalCancelled` on success. + Instance of child-bounty is removed from the state on successful call completion. - Weight: `O(1)` + - `parent_bounty_id`: Index of parent bounty. + + - `child_bounty_id`: Index of child bounty. -### forceClearMetadata(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.forceClearMetadata` -- **summary**: Clear the metadata for an asset. +### proposeCurator(parent_bounty_id: `Compact`, child_bounty_id: `Compact`, curator: `MultiAddress`, fee: `Compact`) +- **interface**: `api.tx.childBounties.proposeCurator` +- **summary**: Propose curator for funded child-bounty. - Origin must be ForceOrigin. + The dispatch origin for this call must be curator of parent bounty. - Any deposit is returned. + Parent bounty must be in active state, for this child-bounty call to work. - - `id`: The identifier of the asset to clear. + Child-bounty must be in "Added" state, for processing the call. And state of child-bounty is moved to "CuratorProposed" on successful call completion. - Emits `MetadataCleared`. + - `parent_bounty_id`: Index of parent bounty. - Weight: `O(1)` + - `child_bounty_id`: Index of child bounty. + + - `curator`: Address of child-bounty curator. + + - `fee`: payment fee to child-bounty curator for execution. -### forceCreate(id: `StagingXcmV4Location`, owner: `MultiAddress`, is_sufficient: `bool`, min_balance: `Compact`) -- **interface**: `api.tx.foreignAssets.forceCreate` -- **summary**: Issue a new class of fungible assets from a privileged origin. +### unassignCurator(parent_bounty_id: `Compact`, child_bounty_id: `Compact`) +- **interface**: `api.tx.childBounties.unassignCurator` +- **summary**: Unassign curator from a child-bounty. - This new asset class has no assets initially. + The dispatch origin for this call can be either `RejectOrigin`, or the curator of the parent bounty, or any signed origin. - The origin must conform to `ForceOrigin`. + For the origin other than T::RejectOrigin and the child-bounty curator, parent bounty must be in active state, for this call to work. We allow child-bounty curator and T::RejectOrigin to execute this call irrespective of the parent bounty state. - Unlike `create`, no funds are reserved. + If this function is called by the `RejectOrigin` or the parent bounty curator, we assume that the child-bounty curator is malicious or inactive. As a result, child-bounty curator deposit is slashed. - - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + If the origin is the child-bounty curator, we take this as a sign that they are unable to do their job, and are willingly giving up. We could slash the deposit, but for now we allow them to unreserve their deposit and exit without issue. (We may want to change this if it is abused.) - - `owner`: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions using `transfer_ownership` and `set_team`. + Finally, the origin can be anyone iff the child-bounty curator is "inactive". Expiry update due of parent bounty is used to estimate inactive state of child-bounty curator. - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + This allows anyone in the community to call out that a child-bounty curator is not doing their due diligence, and we should pick a new one. In this case the child-bounty curator deposit is slashed. - Emits `ForceCreated` event when successful. + State of child-bounty is moved to Added state on successful call completion. - Weight: `O(1)` - -### forceSetMetadata(id: `StagingXcmV4Location`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`, is_frozen: `bool`) -- **interface**: `api.tx.foreignAssets.forceSetMetadata` -- **summary**: Force the metadata for an asset to some value. + - `parent_bounty_id`: Index of parent bounty. - Origin must be ForceOrigin. + - `child_bounty_id`: Index of child bounty. - Any deposit is left alone. +___ - - `id`: The identifier of the asset to update. - - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. +## claims + +### attest(statement: `Bytes`) +- **interface**: `api.tx.claims.attest` +- **summary**: Attest to a statement, needed to finalize the claims process. - - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. + WARNING: Insecure unless your chain includes `PrevalidateAttests` as a `TransactionExtension`. - - `decimals`: The number of decimals this asset uses to represent one unit. + Unsigned Validation: A call to attest is deemed valid if the sender has a `Preclaim` registered and provides a `statement` which is expected for the account. - Emits `MetadataSet`. + Parameters: - Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. + - `statement`: The identity of the statement which is being attested to in the signature. + + -### forceTransfer(id: `StagingXcmV4Location`, source: `MultiAddress`, dest: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.forceTransfer` -- **summary**: Move some assets from one account to another. +### claim(dest: `AccountId32`, ethereum_signature: `PolkadotRuntimeCommonClaimsEcdsaSignature`) +- **interface**: `api.tx.claims.claim` +- **summary**: Make a claim to collect your DOTs. - Origin must be Signed and the sender should be the Admin of the asset `id`. + The dispatch origin for this call must be _None_. - - `id`: The identifier of the asset to have some amount transferred. + Unsigned Validation: A call to claim is deemed valid if the signature provided matches the expected signed message of: - - `source`: The account to be debited. + > Ethereum Signed Message: > (configured prefix string)(address) - - `dest`: The account to be credited. + and `address` matches the `dest` account. - - `amount`: The amount by which the `source`'s balance of assets should be reduced and `dest`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the `source` balance above zero but below the minimum balance. Must be greater than zero. + Parameters: - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + - `dest`: The destination account to payout the claim. - Weight: `O(1)` Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of `dest`. + - `ethereum_signature`: The signature of an ethereum signed message matching the format described above. + + -### freeze(id: `StagingXcmV4Location`, who: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.freeze` -- **summary**: Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` must already exist as an entry in `Account`s of the asset. If you want to freeze an account that does not have an entry, use `touch_other` first. +### claimAttest(dest: `AccountId32`, ethereum_signature: `PolkadotRuntimeCommonClaimsEcdsaSignature`, statement: `Bytes`) +- **interface**: `api.tx.claims.claimAttest` +- **summary**: Make a claim to collect your DOTs by signing a statement. - Origin must be Signed and the sender should be the Freezer of the asset `id`. + The dispatch origin for this call must be _None_. - - `id`: The identifier of the asset to be frozen. + Unsigned Validation: A call to `claim_attest` is deemed valid if the signature provided matches the expected signed message of: - - `who`: The account to be frozen. + > Ethereum Signed Message: > (configured prefix string)(address)(statement) - Emits `Frozen`. + and `address` matches the `dest` account; the `statement` must match that which is expected according to your purchase arrangement. - Weight: `O(1)` - -### freezeAsset(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.freezeAsset` -- **summary**: Disallow further unprivileged transfers for the asset class. + Parameters: - Origin must be Signed and the sender should be the Freezer of the asset `id`. + - `dest`: The destination account to payout the claim. - - `id`: The identifier of the asset to be frozen. + - `ethereum_signature`: The signature of an ethereum signed message matching the format described above. - Emits `Frozen`. + - `statement`: The identity of the statement which is being attested to in the signature. - Weight: `O(1)` + -### mint(id: `StagingXcmV4Location`, beneficiary: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.mint` -- **summary**: Mint assets of a particular class. +### mintClaim(who: `EthereumAddress`, value: `u128`, vesting_schedule: `Option<(u128,u128,u32)>`, statement: `Option`) +- **interface**: `api.tx.claims.mintClaim` +- **summary**: Mint a new claim to collect DOTs. - The origin must be Signed and the sender must be the Issuer of the asset `id`. + The dispatch origin for this call must be _Root_. - - `id`: The identifier of the asset to have some amount minted. + Parameters: - - `beneficiary`: The account to be credited with the minted assets. + - `who`: The Ethereum address allowed to collect this claim. - - `amount`: The amount of the asset to be minted. + - `value`: The number of DOTs that will be claimed. - Emits `Issued` event when successful. + - `vesting_schedule`: An optional vesting schedule for these DOTs. - Weight: `O(1)` Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. + -### refund(id: `StagingXcmV4Location`, allow_burn: `bool`) -- **interface**: `api.tx.foreignAssets.refund` -- **summary**: Return the deposit (if any) of an asset account or a consumer reference (if any) of an account. +### moveClaim(old: `EthereumAddress`, new: `EthereumAddress`, maybe_preclaim: `Option`) +- **interface**: `api.tx.claims.moveClaim` - The origin must be Signed. - - - `id`: The identifier of the asset for which the caller would like the deposit refunded. +___ - - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund. - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. +## collatorSelection + +### addInvulnerable(who: `AccountId32`) +- **interface**: `api.tx.collatorSelection.addInvulnerable` +- **summary**: Add a new account `who` to the list of `Invulnerables` collators. `who` must have registered session keys. If `who` is a candidate, they will be removed. - Emits `Refunded` event when successful. + The origin for this call must be the `UpdateOrigin`. -### refundOther(id: `StagingXcmV4Location`, who: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.refundOther` -- **summary**: Return the deposit (if any) of a target asset account. Useful if you are the depositor. +### leaveIntent() +- **interface**: `api.tx.collatorSelection.leaveIntent` +- **summary**: Deregister `origin` as a collator candidate. Note that the collator can only leave on session change. The `CandidacyBond` will be unreserved immediately. - The origin must be Signed and either the account owner, depositor, or asset `Admin`. In order to burn a non-zero balance of the asset, the caller must be the account and should use `refund`. + This call will fail if the total number of candidates would drop below `MinEligibleCollators`. + +### registerAsCandidate() +- **interface**: `api.tx.collatorSelection.registerAsCandidate` +- **summary**: Register this account as a collator candidate. The account must (a) already have registered session keys and (b) be able to reserve the `CandidacyBond`. - - `id`: The identifier of the asset for the account holding a deposit. + This call is not available to `Invulnerable` collators. + +### removeInvulnerable(who: `AccountId32`) +- **interface**: `api.tx.collatorSelection.removeInvulnerable` +- **summary**: Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must be sorted. - - `who`: The account to refund. + The origin for this call must be the `UpdateOrigin`. + +### setCandidacyBond(bond: `u128`) +- **interface**: `api.tx.collatorSelection.setCandidacyBond` +- **summary**: Set the candidacy bond amount. - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. + If the candidacy bond is increased by this call, all current candidates which have a deposit lower than the new bond will be kicked from the list and get their deposits back. - Emits `Refunded` event when successful. + The origin for this call must be the `UpdateOrigin`. -### setMetadata(id: `StagingXcmV4Location`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`) -- **interface**: `api.tx.foreignAssets.setMetadata` -- **summary**: Set the metadata for an asset. +### setDesiredCandidates(max: `u32`) +- **interface**: `api.tx.collatorSelection.setDesiredCandidates` +- **summary**: Set the ideal number of non-invulnerable collators. If lowering this number, then the number of running collators could be higher than this figure. Aside from that edge case, there should be no other way to have more candidates than the desired number. - Origin must be Signed and the sender should be the Owner of the asset `id`. + The origin for this call must be the `UpdateOrigin`. + +### setInvulnerables(new: `Vec`) +- **interface**: `api.tx.collatorSelection.setInvulnerables` +- **summary**: Set the list of invulnerable (fixed) collators. These collators must do some preparation, namely to have registered session keys. - Funds of sender are reserved according to the formula: `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into account any already reserved funds. + The call will remove any accounts that have not registered keys from the set. That is, it is non-atomic; the caller accepts all `AccountId`s passed in `new` _individually_ as acceptable Invulnerables, and is not proposing a _set_ of new Invulnerables. - - `id`: The identifier of the asset to update. + This call does not maintain mutual exclusivity of `Invulnerables` and `Candidates`. It is recommended to use a batch of `add_invulnerable` and `remove_invulnerable` instead. A `batch_all` can also be used to enforce atomicity. If any candidates are included in `new`, they should be removed with `remove_invulnerable_candidate` after execution. - - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. + Must be called by the `UpdateOrigin`. + +### takeCandidateSlot(deposit: `u128`, target: `AccountId32`) +- **interface**: `api.tx.collatorSelection.takeCandidateSlot` +- **summary**: The caller `origin` replaces a candidate `target` in the collator candidate list by reserving `deposit`. The amount `deposit` reserved by the caller must be greater than the existing bond of the target it is trying to replace. - - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. + This call will fail if the caller is already a collator candidate or invulnerable, the caller does not have registered session keys, the target is not a collator candidate, and/or the `deposit` amount cannot be reserved. + +### updateBond(new_deposit: `u128`) +- **interface**: `api.tx.collatorSelection.updateBond` +- **summary**: Update the candidacy bond of collator candidate `origin` to a new amount `new_deposit`. - - `decimals`: The number of decimals this asset uses to represent one unit. + Setting a `new_deposit` that is lower than the current deposit while `origin` is occupying a top-`DesiredCandidates` slot is not allowed. - Emits `MetadataSet`. + This call will fail if `origin` is not a collator candidate, the updated bond is lower than the minimum candidacy bond, and/or the amount cannot be reserved. - Weight: `O(1)` - -### setMinBalance(id: `StagingXcmV4Location`, min_balance: `u128`) -- **interface**: `api.tx.foreignAssets.setMinBalance` -- **summary**: Sets the minimum balance of an asset. +___ - Only works if there aren't any accounts that are holding the asset or if the new value of `min_balance` is less than the old one. - Origin must be Signed and the sender has to be the Owner of the asset `id`. +## convictionVoting + +### delegate(class: `u16`, to: `MultiAddress`, conviction: `PalletConvictionVotingConviction`, balance: `u128`) +- **interface**: `api.tx.convictionVoting.delegate` +- **summary**: Delegate the voting power (with some given conviction) of the sending account for a particular class of polls. - - `id`: The identifier of the asset. + The balance delegated is locked for as long as it's delegated, and thereafter for the time appropriate for the conviction's lock period. - - `min_balance`: The new value of `min_balance`. + The dispatch origin of this call must be _Signed_, and the signing account must either: - Emits `AssetMinBalanceChanged` event when successful. - -### setTeam(id: `StagingXcmV4Location`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.setTeam` -- **summary**: Change the Issuer, Admin and Freezer of an asset. + - be delegating already; or - Origin must be Signed and the sender should be the Owner of the asset `id`. + - have no voting activity (if there is, then it will need to be removed through `remove_vote`). - - `id`: The identifier of the asset to be frozen. + - `to`: The account whose voting the `target` account's voting power will follow. - - `issuer`: The new Issuer of this asset. + - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls to this function are required. - - `admin`: The new Admin of this asset. + - `conviction`: The conviction that will be attached to the delegated votes. When the account is undelegated, the funds will be locked for the corresponding period. - - `freezer`: The new Freezer of this asset. + - `balance`: The amount of the account's balance to be used in delegating. This must not be more than the account's current balance. - Emits `TeamChanged`. + Emits `Delegated`. - Weight: `O(1)` + Weight: `O(R)` where R is the number of polls the voter delegating to has voted on. Weight is initially charged as if maximum votes, but is refunded later. -### startDestroy(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.startDestroy` -- **summary**: Start the process of destroying a fungible asset class. +### removeOtherVote(target: `MultiAddress`, class: `u16`, index: `u32`) +- **interface**: `api.tx.convictionVoting.removeOtherVote` +- **summary**: Remove a vote for a poll. - `start_destroy` is the first in a series of extrinsics that should be called, to allow destruction of an asset class. + If the `target` is equal to the signer, then this function is exactly equivalent to `remove_vote`. If not equal to the signer, then the vote must have expired, either because the poll was cancelled, because the voter lost the poll or because the conviction period is over. - The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`. + The dispatch origin of this call must be _Signed_. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + - `target`: The account of the vote to be removed; this account must have voted for poll `index`. - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if an account contains holds or freezes in place. - -### thaw(id: `StagingXcmV4Location`, who: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.thaw` -- **summary**: Allow unprivileged transfers to and from an account again. + - `index`: The index of poll of the vote to be removed. - Origin must be Signed and the sender should be the Admin of the asset `id`. + - `class`: The class of the poll. - - `id`: The identifier of the asset to be frozen. + Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. Weight is calculated for the maximum number of vote. + +### removeVote(class: `Option`, index: `u32`) +- **interface**: `api.tx.convictionVoting.removeVote` +- **summary**: Remove a vote for a poll. - - `who`: The account to be unfrozen. + If: - Emits `Thawed`. + - the poll was cancelled, or - Weight: `O(1)` - -### thawAsset(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.thawAsset` -- **summary**: Allow unprivileged transfers for the asset again. + - the poll is ongoing, or - Origin must be Signed and the sender should be the Admin of the asset `id`. + - the poll has ended such that - - `id`: The identifier of the asset to be thawed. + - the vote of the account was in opposition to the result; or - Emits `Thawed`. + - there was no conviction to the account's vote; or - Weight: `O(1)` - -### touch(id: `StagingXcmV4Location`) -- **interface**: `api.tx.foreignAssets.touch` -- **summary**: Create an asset account for non-provider assets. + - the account made a split vote ...then the vote is removed cleanly and a following call to `unlock` may result in more funds being available. - A deposit will be taken from the signer account. + If, however, the poll has ended and: - - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit to be taken. + - it finished corresponding to the vote of the account, and - - `id`: The identifier of the asset for the account to be created. + - the account made a standard vote with conviction, and - Emits `Touched` event when successful. - -### touchOther(id: `StagingXcmV4Location`, who: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.touchOther` -- **summary**: Create an asset account for `who`. + - the lock period of the conviction is not over ...then the lock will be aggregated into the overall account's lock, which may involve - A deposit will be taken from the signer account. + *overlocking* (where the two locks are combined into a single lock that is the maximum of both the amount locked and the time is it locked for). - - `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account must have sufficient funds for a deposit to be taken. + The dispatch origin of this call must be _Signed_, and the signer must have a vote registered for poll `index`. - - `id`: The identifier of the asset for the account to be created. + - `index`: The index of poll of the vote to be removed. - - `who`: The account to be created. + - `class`: Optional parameter, if given it indicates the class of the poll. For polls which have finished or are cancelled, this must be `Some`. - Emits `Touched` event when successful. + Weight: `O(R + log R)` where R is the number of polls that `target` has voted on. Weight is calculated for the maximum number of vote. -### transfer(id: `StagingXcmV4Location`, target: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.transfer` -- **summary**: Move some assets from the sender account to another. - - Origin must be Signed. +### undelegate(class: `u16`) +- **interface**: `api.tx.convictionVoting.undelegate` +- **summary**: Undelegate the voting power of the sending account for a particular class of polls. - - `id`: The identifier of the asset to have some amount transferred. + Tokens may be unlocked following once an amount of time consistent with the lock period of the conviction with which the delegation was issued has passed. - - `target`: The account to be credited. + The dispatch origin of this call must be _Signed_ and the signing account must be currently delegating. - - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. + - `class`: The class of polls to remove the delegation from. - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + Emits `Undelegated`. - Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. + Weight: `O(R)` where R is the number of polls the voter delegating to has voted on. Weight is initially charged as if maximum votes, but is refunded later. -### transferAll(id: `StagingXcmV4Location`, dest: `MultiAddress`, keep_alive: `bool`) -- **interface**: `api.tx.foreignAssets.transferAll` -- **summary**: Transfer the entire transferable balance from the caller asset account. +### unlock(class: `u16`, target: `MultiAddress`) +- **interface**: `api.tx.convictionVoting.unlock` +- **summary**: Remove the lock caused by prior voting/delegating which has expired within a particular class. - NOTE: This function only attempts to transfer _transferable_ balances. This means that any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... - - The dispatch origin of this call must be Signed. + The dispatch origin of this call must be _Signed_. - - `id`: The identifier of the asset for the account holding a deposit. + - `class`: The class of polls to unlock. - - `dest`: The recipient of the transfer. + - `target`: The account to remove the lock on. - - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the asset account has, causing the sender asset account to be killed (false), or transfer everything except at least the minimum balance, which will guarantee to keep the sender asset account alive (true). + Weight: `O(R)` with R number of vote of target. -### transferApproved(id: `StagingXcmV4Location`, owner: `MultiAddress`, destination: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.transferApproved` -- **summary**: Transfer some asset balance from a previously delegated account to some third-party account. +### vote(poll_index: `Compact`, vote: `PalletConvictionVotingVoteAccountVote`) +- **interface**: `api.tx.convictionVoting.vote` +- **summary**: Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal; otherwise it is a vote to keep the status quo. - Origin must be Signed and there must be an approval in place by the `owner` to the signer. + The dispatch origin of this call must be _Signed_. - If the entire amount approved for transfer is transferred, then any deposit previously reserved by `approve_transfer` is unreserved. + - `poll_index`: The index of the poll to vote for. - - `id`: The identifier of the asset. + - `vote`: The vote configuration. - - `owner`: The account which previously approved for a transfer of at least `amount` and from which the asset balance will be withdrawn. + Weight: `O(R)` where R is the number of polls the voter has voted on. - - `destination`: The account to which the asset balance of `amount` will be transferred. +___ - - `amount`: The amount of assets to transfer. - Emits `TransferredApproved` on success. +## cumulusXcm - Weight: `O(1)` - -### transferKeepAlive(id: `StagingXcmV4Location`, target: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.foreignAssets.transferKeepAlive` -- **summary**: Move some assets from the sender account to another, keeping the sender account alive. +___ + + +## foreignAssets + +### approveTransfer(id: `StagingXcmV5Location`, delegate: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.approveTransfer` +- **summary**: Approve an amount of asset for transfer by a delegated third-party account. Origin must be Signed. - - `id`: The identifier of the asset to have some amount transferred. + Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account to `delegate`, then it is topped up or unreserved to meet the right value. - - `target`: The account to be credited. + NOTE: The signing account does not need to own `amount` of assets at the point of making this call. - - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. + - `id`: The identifier of the asset. - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + - `delegate`: The account to delegate permission to transfer asset. - Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. + - `amount`: The amount of asset that may be transferred by `delegate`. If there is already an approval in place, then this acts additively. + + Emits `ApprovedTransfer` on success. + + Weight: `O(1)` -### transferOwnership(id: `StagingXcmV4Location`, owner: `MultiAddress`) -- **interface**: `api.tx.foreignAssets.transferOwnership` -- **summary**: Change the Owner of an asset. +### block(id: `StagingXcmV5Location`, who: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.block` +- **summary**: Disallow further unprivileged transfers of an asset `id` to and from an account `who`. - Origin must be Signed and the sender should be the Owner of the asset `id`. + Origin must be Signed and the sender should be the Freezer of the asset `id`. - - `id`: The identifier of the asset. + - `id`: The identifier of the account's asset. - - `owner`: The new Owner of this asset. + - `who`: The account to be unblocked. - Emits `OwnerChanged`. + Emits `Blocked`. Weight: `O(1)` + +### burn(id: `StagingXcmV5Location`, who: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.burn` +- **summary**: Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. -___ + Origin must be Signed and the sender should be the Manager of the asset `id`. + Bails with `NoAccount` if the `who` is already dead. -## messageQueue - -### executeOverweight(message_origin: `CumulusPrimitivesCoreAggregateMessageOrigin`, page: `u32`, index: `u32`, weight_limit: `SpWeightsWeightV2Weight`) -- **interface**: `api.tx.messageQueue.executeOverweight` -- **summary**: Execute an overweight message. + - `id`: The identifier of the asset to have some amount burned. - Temporary processing errors will be propagated whereas permanent errors are treated as success condition. + - `who`: The account to be debited from. - - `origin`: Must be `Signed`. + - `amount`: The maximum amount by which `who`'s balance should be reduced. - - `message_origin`: The origin from which the message to be executed arrived. + Emits `Burned` with the actual amount burned. If this takes the balance to below the minimum for the asset, then the amount burned is increased to take it to zero. - - `page`: The page in the queue in which the message to be executed is sitting. + Weight: `O(1)` Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. + +### cancelApproval(id: `StagingXcmV5Location`, delegate: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.cancelApproval` +- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. - - `index`: The index into the queue of the message to be executed. + Origin must be Signed and there must be an approval in place between signer and `delegate`. - - `weight_limit`: The maximum amount of weight allowed to be consumed in the execution of the message. + Unreserves any deposit previously reserved by `approve_transfer` for the approval. - Benchmark complexity considerations: O(index + weight_limit). - -### reapPage(message_origin: `CumulusPrimitivesCoreAggregateMessageOrigin`, page_index: `u32`) -- **interface**: `api.tx.messageQueue.reapPage` -- **summary**: Remove a page which has no more messages remaining to be processed or is stale. + - `id`: The identifier of the asset. -___ + - `delegate`: The account delegated permission to transfer asset. + Emits `ApprovalCancelled` on success. -## multisig + Weight: `O(1)` -### approveAsMulti(threshold: `u16`, other_signatories: `Vec`, maybe_timepoint: `Option`, call_hash: `[u8;32]`, max_weight: `SpWeightsWeightV2Weight`) -- **interface**: `api.tx.multisig.approveAsMulti` -- **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. +### clearMetadata(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.clearMetadata` +- **summary**: Clear the metadata for an asset. - Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. + Origin must be Signed and the sender should be the Owner of the asset `id`. - The dispatch origin for this call must be _Signed_. + Any deposit is freed for the asset owner. - - `threshold`: The total number of approvals for this dispatch before it is executed. + - `id`: The identifier of the asset to clear. - - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. + Emits `MetadataCleared`. - - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. + Weight: `O(1)` + +### create(id: `StagingXcmV5Location`, admin: `MultiAddress`, min_balance: `u128`) +- **interface**: `api.tx.foreignAssets.create` +- **summary**: Issue a new class of fungible assets from a public origin. - - `call_hash`: The hash of the call to be executed. + This new asset class has no assets initially and its owner is the origin. - NOTE: If this is the final approval, you will want to use `as_multi` instead. + The origin must conform to the configured `CreateOrigin` and have sufficient funds free. - #### Complexity + Funds of sender are reserved by `AssetDeposit`. - - `O(S)`. + Parameters: - - Up to one balance-reserve or unreserve operation. + - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. - - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + - `admin`: The admin of this class of assets. The admin is the initial address of each member of the asset class's admin team. - - One encode & hash, both of complexity `O(S)`. + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. - - Up to one binary search and insert (`O(logS + S)`). + Emits `Created` event when successful. - - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + Weight: `O(1)` + +### destroyAccounts(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.destroyAccounts` +- **summary**: Destroy all accounts associated with a given asset. - - One event. + `destroy_accounts` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. - - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`. - -### asMulti(threshold: `u16`, other_signatories: `Vec`, maybe_timepoint: `Option`, call: `Call`, max_weight: `SpWeightsWeightV2Weight`) -- **interface**: `api.tx.multisig.asMulti` -- **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. + Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time. - If there are enough, then dispatch the call. + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. - Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. + Each call emits the `Event::DestroyedAccounts` event. + +### destroyApprovals(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.destroyApprovals` +- **summary**: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit). - The dispatch origin for this call must be _Signed_. + `destroy_approvals` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. - - `threshold`: The total number of approvals for this dispatch before it is executed. + Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time. - - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. - - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. + Each call emits the `Event::DestroyedApprovals` event. + +### finishDestroy(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.finishDestroy` +- **summary**: Complete destroying asset and unreserve currency. - - `call`: The call to be executed. + `finish_destroy` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. All accounts or approvals should be destroyed before hand. - NOTE: Unless this is the final approval, you will generally want to use `approve_as_multi` instead, since it only requires a hash of the call. + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. - Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise on success, result is `Ok` and the result from the interior call, if it was executed, may be found in the deposited `MultisigExecuted` event. + Each successful call emits the `Event::Destroyed` event. + +### forceAssetStatus(id: `StagingXcmV5Location`, owner: `MultiAddress`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`, min_balance: `Compact`, is_sufficient: `bool`, is_frozen: `bool`) +- **interface**: `api.tx.foreignAssets.forceAssetStatus` +- **summary**: Alter the attributes of a given asset. - #### Complexity + Origin must be `ForceOrigin`. - - `O(S + Z + Call)`. + - `id`: The identifier of the asset. - - Up to one balance-reserve or unreserve operation. + - `owner`: The new Owner of this asset. - - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + - `issuer`: The new Issuer of this asset. - - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. + - `admin`: The new Admin of this asset. - - One encode & hash, both of complexity `O(S)`. + - `freezer`: The new Freezer of this asset. - - Up to one binary search and insert (`O(logS + S)`). + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. - - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. + - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient value to account for the state bloat associated with its balance storage. If set to `true`, then non-zero balances may be stored without a `consumer` reference (and thus an ED in the Balances pallet or whatever else is used to control user-account state growth). - - One event. + - `is_frozen`: Whether this asset class is frozen except for permissioned/admin instructions. - - The weight of the `call`. + Emits `AssetStatusChanged` with the identity of the asset. - - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`. + Weight: `O(1)` -### asMultiThreshold1(other_signatories: `Vec`, call: `Call`) -- **interface**: `api.tx.multisig.asMultiThreshold1` -- **summary**: Immediately dispatch a multi-signature call using a single approval from the caller. +### forceCancelApproval(id: `StagingXcmV5Location`, owner: `MultiAddress`, delegate: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.forceCancelApproval` +- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. - The dispatch origin for this call must be _Signed_. + Origin must be either ForceOrigin or Signed origin with the signer being the Admin account of the asset `id`. - - `other_signatories`: The accounts (other than the sender) who are part of the multi-signature, but do not participate in the approval process. + Unreserves any deposit previously reserved by `approve_transfer` for the approval. - - `call`: The call to be executed. + - `id`: The identifier of the asset. - Result is equivalent to the dispatched result. + - `delegate`: The account delegated permission to transfer asset. - #### Complexity O(Z + C) where Z is the length of the call and C its execution weight. + Emits `ApprovalCancelled` on success. + + Weight: `O(1)` -### cancelAsMulti(threshold: `u16`, other_signatories: `Vec`, timepoint: `PalletMultisigTimepoint`, call_hash: `[u8;32]`) -- **interface**: `api.tx.multisig.cancelAsMulti` -- **summary**: Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously for this operation will be unreserved on success. +### forceClearMetadata(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.forceClearMetadata` +- **summary**: Clear the metadata for an asset. - The dispatch origin for this call must be _Signed_. + Origin must be ForceOrigin. - - `threshold`: The total number of approvals for this dispatch before it is executed. + Any deposit is returned. - - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. + - `id`: The identifier of the asset to clear. - - `timepoint`: The timepoint (block number and transaction index) of the first approval transaction for this dispatch. + Emits `MetadataCleared`. - - `call_hash`: The hash of the call to be executed. + Weight: `O(1)` + +### forceCreate(id: `StagingXcmV5Location`, owner: `MultiAddress`, is_sufficient: `bool`, min_balance: `Compact`) +- **interface**: `api.tx.foreignAssets.forceCreate` +- **summary**: Issue a new class of fungible assets from a privileged origin. - #### Complexity + This new asset class has no assets initially. - - `O(S)`. + The origin must conform to `ForceOrigin`. - - Up to one balance-reserve or unreserve operation. + Unlike `create`, no funds are reserved. - - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. + - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. - - One encode & hash, both of complexity `O(S)`. + - `owner`: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions using `transfer_ownership` and `set_team`. - - One event. + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. - - I/O: 1 read `O(S)`, one remove. + Emits `ForceCreated` event when successful. - - Storage: removes one item. + Weight: `O(1)` -### pokeDeposit(threshold: `u16`, other_signatories: `Vec`, call_hash: `[u8;32]`) -- **interface**: `api.tx.multisig.pokeDeposit` -- **summary**: Poke the deposit reserved for an existing multisig operation. - - The dispatch origin for this call must be _Signed_ and must be the original depositor of the multisig operation. +### forceSetMetadata(id: `StagingXcmV5Location`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`, is_frozen: `bool`) +- **interface**: `api.tx.foreignAssets.forceSetMetadata` +- **summary**: Force the metadata for an asset to some value. - The transaction fee is waived if the deposit amount has changed. + Origin must be ForceOrigin. - - `threshold`: The total number of approvals needed for this multisig. + Any deposit is left alone. - - `other_signatories`: The accounts (other than the sender) who are part of the multisig. + - `id`: The identifier of the asset to update. - - `call_hash`: The hash of the call this deposit is reserved for. + - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. - Emits `DepositPoked` if successful. + - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. -___ + - `decimals`: The number of decimals this asset uses to represent one unit. + Emits `MetadataSet`. -## nfts + Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. -### approveItemAttributes(collection: `u32`, item: `u32`, delegate: `MultiAddress`) -- **interface**: `api.tx.nfts.approveItemAttributes` -- **summary**: Approve item's attributes to be changed by a delegated third-party account. +### forceTransfer(id: `StagingXcmV5Location`, source: `MultiAddress`, dest: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.forceTransfer` +- **summary**: Move some assets from one account to another. - Origin must be Signed and must be an owner of the `item`. + Origin must be Signed and the sender should be the Admin of the asset `id`. - - `collection`: A collection of the item. + - `id`: The identifier of the asset to have some amount transferred. - - `item`: The item that holds attributes. + - `source`: The account to be debited. - - `delegate`: The account to delegate permission to change attributes of the item. + - `dest`: The account to be credited. - Emits `ItemAttributesApprovalAdded` on success. - -### approveTransfer(collection: `u32`, item: `u32`, delegate: `MultiAddress`, maybe_deadline: `Option`) -- **interface**: `api.tx.nfts.approveTransfer` -- **summary**: Approve an item to be transferred by a delegated third-party account. + - `amount`: The amount by which the `source`'s balance of assets should be reduced and `dest`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the `source` balance above zero but below the minimum balance. Must be greater than zero. - Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the `item`. + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. - - `collection`: The collection of the item to be approved for delegated transfer. + Weight: `O(1)` Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of `dest`. + +### freeze(id: `StagingXcmV5Location`, who: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.freeze` +- **summary**: Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` must already exist as an entry in `Account`s of the asset. If you want to freeze an account that does not have an entry, use `touch_other` first. - - `item`: The item to be approved for delegated transfer. + Origin must be Signed and the sender should be the Freezer of the asset `id`. - - `delegate`: The account to delegate permission to transfer the item. + - `id`: The identifier of the asset to be frozen. - - `maybe_deadline`: Optional deadline for the approval. Specified by providing the number of blocks after which the approval will expire + - `who`: The account to be frozen. - Emits `TransferApproved` on success. + Emits `Frozen`. Weight: `O(1)` -### burn(collection: `u32`, item: `u32`) -- **interface**: `api.tx.nfts.burn` -- **summary**: Destroy a single item. - - The origin must conform to `ForceOrigin` or must be Signed and the signing account must be the owner of the `item`. +### freezeAsset(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.freezeAsset` +- **summary**: Disallow further unprivileged transfers for the asset class. - - `collection`: The collection of the item to be burned. + Origin must be Signed and the sender should be the Freezer of the asset `id`. - - `item`: The item to be burned. + - `id`: The identifier of the asset to be frozen. - Emits `Burned`. + Emits `Frozen`. Weight: `O(1)` -### buyItem(collection: `u32`, item: `u32`, bid_price: `u128`) -- **interface**: `api.tx.nfts.buyItem` -- **summary**: Allows to buy an item if it's up for sale. +### mint(id: `StagingXcmV5Location`, beneficiary: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.mint` +- **summary**: Mint assets of a particular class. - Origin must be Signed and must not be the owner of the `item`. + The origin must be Signed and the sender must be the Issuer of the asset `id`. - - `collection`: The collection of the item. + - `id`: The identifier of the asset to have some amount minted. - - `item`: The item the sender wants to buy. + - `beneficiary`: The account to be credited with the minted assets. - - `bid_price`: The price the sender is willing to pay. + - `amount`: The amount of the asset to be minted. - Emits `ItemBought` on success. + Emits `Issued` event when successful. + + Weight: `O(1)` Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. -### cancelApproval(collection: `u32`, item: `u32`, delegate: `MultiAddress`) -- **interface**: `api.tx.nfts.cancelApproval` -- **summary**: Cancel one of the transfer approvals for a specific item. +### refund(id: `StagingXcmV5Location`, allow_burn: `bool`) +- **interface**: `api.tx.foreignAssets.refund` +- **summary**: Return the deposit (if any) of an asset account or a consumer reference (if any) of an account. - Origin must be either: + The origin must be Signed. - - the `Force` origin; + - `id`: The identifier of the asset for which the caller would like the deposit refunded. - - `Signed` with the signer being the Owner of the `item`; + - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund. - Arguments: + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. - - `collection`: The collection of the item of whose approval will be cancelled. + Emits `Refunded` event when successful. + +### refundOther(id: `StagingXcmV5Location`, who: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.refundOther` +- **summary**: Return the deposit (if any) of a target asset account. Useful if you are the depositor. - - `item`: The item of the collection of whose approval will be cancelled. + The origin must be Signed and either the account owner, depositor, or asset `Admin`. In order to burn a non-zero balance of the asset, the caller must be the account and should use `refund`. - - `delegate`: The account that is going to loose their approval. + - `id`: The identifier of the asset for the account holding a deposit. - Emits `ApprovalCancelled` on success. + - `who`: The account to refund. - Weight: `O(1)` - -### cancelItemAttributesApproval(collection: `u32`, item: `u32`, delegate: `MultiAddress`, witness: `PalletNftsCancelAttributesApprovalWitness`) -- **interface**: `api.tx.nfts.cancelItemAttributesApproval` -- **summary**: Cancel the previously provided approval to change item's attributes. All the previously set attributes by the `delegate` will be removed. + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. - Origin must be Signed and must be an owner of the `item`. + Emits `Refunded` event when successful. + +### setMetadata(id: `StagingXcmV5Location`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`) +- **interface**: `api.tx.foreignAssets.setMetadata` +- **summary**: Set the metadata for an asset. - - `collection`: Collection that the item is contained within. + Origin must be Signed and the sender should be the Owner of the asset `id`. - - `item`: The item that holds attributes. + Funds of sender are reserved according to the formula: `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into account any already reserved funds. - - `delegate`: The previously approved account to remove. + - `id`: The identifier of the asset to update. - Emits `ItemAttributesApprovalRemoved` on success. - -### cancelSwap(offered_collection: `u32`, offered_item: `u32`) -- **interface**: `api.tx.nfts.cancelSwap` -- **summary**: Cancel an atomic swap. + - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. - Origin must be Signed. Origin must be an owner of the `item` if the deadline hasn't expired. + - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. - - `collection`: The collection of the item. + - `decimals`: The number of decimals this asset uses to represent one unit. - - `item`: The item an owner wants to give. + Emits `MetadataSet`. - Emits `SwapCancelled` on success. + Weight: `O(1)` -### claimSwap(send_collection: `u32`, send_item: `u32`, receive_collection: `u32`, receive_item: `u32`, witness_price: `Option`) -- **interface**: `api.tx.nfts.claimSwap` -- **summary**: Claim an atomic swap. This method executes a pending swap, that was created by a counterpart before. - - Origin must be Signed and must be an owner of the `item`. - - - `send_collection`: The collection of the item to be sent. +### setMinBalance(id: `StagingXcmV5Location`, min_balance: `u128`) +- **interface**: `api.tx.foreignAssets.setMinBalance` +- **summary**: Sets the minimum balance of an asset. - - `send_item`: The item to be sent. + Only works if there aren't any accounts that are holding the asset or if the new value of `min_balance` is less than the old one. - - `receive_collection`: The collection of the item to be received. + Origin must be Signed and the sender has to be the Owner of the asset `id`. - - `receive_item`: The item to be received. + - `id`: The identifier of the asset. - - `witness_price`: A price that was previously agreed on. + - `min_balance`: The new value of `min_balance`. - Emits `SwapClaimed` on success. + Emits `AssetMinBalanceChanged` event when successful. -### clearAllTransferApprovals(collection: `u32`, item: `u32`) -- **interface**: `api.tx.nfts.clearAllTransferApprovals` -- **summary**: Cancel all the approvals of a specific item. - - Origin must be either: +### setTeam(id: `StagingXcmV5Location`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.setTeam` +- **summary**: Change the Issuer, Admin and Freezer of an asset. - - the `Force` origin; + Origin must be Signed and the sender should be the Owner of the asset `id`. - - `Signed` with the signer being the Owner of the `item`; + - `id`: The identifier of the asset to be frozen. - Arguments: + - `issuer`: The new Issuer of this asset. - - `collection`: The collection of the item of whose approvals will be cleared. + - `admin`: The new Admin of this asset. - - `item`: The item of the collection of whose approvals will be cleared. + - `freezer`: The new Freezer of this asset. - Emits `AllApprovalsCancelled` on success. + Emits `TeamChanged`. Weight: `O(1)` -### clearAttribute(collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`) -- **interface**: `api.tx.nfts.clearAttribute` -- **summary**: Clear an attribute for a collection or item. +### startDestroy(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.startDestroy` +- **summary**: Start the process of destroying a fungible asset class. - Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the attribute. + `start_destroy` is the first in a series of extrinsics that should be called, to allow destruction of an asset class. - Any deposit is freed for the collection's owner. + The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`. - - `collection`: The identifier of the collection whose item's metadata to clear. + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. - - `maybe_item`: The identifier of the item whose metadata to clear. + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if an account contains holds or freezes in place. + +### thaw(id: `StagingXcmV5Location`, who: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.thaw` +- **summary**: Allow unprivileged transfers to and from an account again. - - `namespace`: Attribute's namespace. + Origin must be Signed and the sender should be the Admin of the asset `id`. - - `key`: The key of the attribute. + - `id`: The identifier of the asset to be frozen. - Emits `AttributeCleared`. + - `who`: The account to be unfrozen. + + Emits `Thawed`. Weight: `O(1)` -### clearCollectionMetadata(collection: `u32`) -- **interface**: `api.tx.nfts.clearCollectionMetadata` -- **summary**: Clear the metadata for a collection. - - Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of the `collection`. +### thawAsset(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.thawAsset` +- **summary**: Allow unprivileged transfers for the asset again. - Any deposit is freed for the collection's owner. + Origin must be Signed and the sender should be the Admin of the asset `id`. - - `collection`: The identifier of the collection whose metadata to clear. + - `id`: The identifier of the asset to be thawed. - Emits `CollectionMetadataCleared`. + Emits `Thawed`. Weight: `O(1)` -### clearMetadata(collection: `u32`, item: `u32`) -- **interface**: `api.tx.nfts.clearMetadata` -- **summary**: Clear the metadata for an item. - - Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. - - Any deposit is freed for the collection's owner. +### touch(id: `StagingXcmV5Location`) +- **interface**: `api.tx.foreignAssets.touch` +- **summary**: Create an asset account for non-provider assets. - - `collection`: The identifier of the collection whose item's metadata to clear. + A deposit will be taken from the signer account. - - `item`: The identifier of the item whose metadata to clear. + - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit to be taken. - Emits `ItemMetadataCleared`. + - `id`: The identifier of the asset for the account to be created. - Weight: `O(1)` + Emits `Touched` event when successful. -### create(admin: `MultiAddress`, config: `PalletNftsCollectionConfig`) -- **interface**: `api.tx.nfts.create` -- **summary**: Issue a new collection of non-fungible items from a public origin. +### touchOther(id: `StagingXcmV5Location`, who: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.touchOther` +- **summary**: Create an asset account for `who`. - This new collection has no items initially and its owner is the origin. + A deposit will be taken from the signer account. - The origin must be Signed and the sender must have sufficient funds free. + - `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account must have sufficient funds for a deposit to be taken. - `CollectionDeposit` funds of sender are reserved. + - `id`: The identifier of the asset for the account to be created. - Parameters: + - `who`: The account to be created. - - `admin`: The admin of this collection. The admin is the initial address of each member of the collection's admin team. + Emits `Touched` event when successful. + +### transfer(id: `StagingXcmV5Location`, target: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.transfer` +- **summary**: Move some assets from the sender account to another. - Emits `Created` event when successful. + Origin must be Signed. - Weight: `O(1)` - -### createSwap(offered_collection: `u32`, offered_item: `u32`, desired_collection: `u32`, maybe_desired_item: `Option`, maybe_price: `Option`, duration: `u32`) -- **interface**: `api.tx.nfts.createSwap` -- **summary**: Register a new atomic swap, declaring an intention to send an `item` in exchange for `desired_item` from origin to target on the current blockchain. The target can execute the swap during the specified `duration` of blocks (if set). Additionally, the price could be set for the desired `item`. + - `id`: The identifier of the asset to have some amount transferred. - Origin must be Signed and must be an owner of the `item`. + - `target`: The account to be credited. - - `collection`: The collection of the item. + - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. - - `item`: The item an owner wants to give. + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. - - `desired_collection`: The collection of the desired item. + Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. + +### transferAll(id: `StagingXcmV5Location`, dest: `MultiAddress`, keep_alive: `bool`) +- **interface**: `api.tx.foreignAssets.transferAll` +- **summary**: Transfer the entire transferable balance from the caller asset account. - - `desired_item`: The desired item an owner wants to receive. + NOTE: This function only attempts to transfer _transferable_ balances. This means that any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... - - `maybe_price`: The price an owner is willing to pay or receive for the desired `item`. + The dispatch origin of this call must be Signed. - - `duration`: A deadline for the swap. Specified by providing the number of blocks after which the swap will expire. + - `id`: The identifier of the asset for the account holding a deposit. - Emits `SwapCreated` on success. + - `dest`: The recipient of the transfer. + + - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the asset account has, causing the sender asset account to be killed (false), or transfer everything except at least the minimum balance, which will guarantee to keep the sender asset account alive (true). -### destroy(collection: `u32`, witness: `PalletNftsDestroyWitness`) -- **interface**: `api.tx.nfts.destroy` -- **summary**: Destroy a collection of fungible items. +### transferApproved(id: `StagingXcmV5Location`, owner: `MultiAddress`, destination: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.transferApproved` +- **summary**: Transfer some asset balance from a previously delegated account to some third-party account. - The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the owner of the `collection`. + Origin must be Signed and there must be an approval in place by the `owner` to the signer. - NOTE: The collection must have 0 items to be destroyed. + If the entire amount approved for transfer is transferred, then any deposit previously reserved by `approve_transfer` is unreserved. - - `collection`: The identifier of the collection to be destroyed. + - `id`: The identifier of the asset. - - `witness`: Information on the items minted in the collection. This must be correct. + - `owner`: The account which previously approved for a transfer of at least `amount` and from which the asset balance will be withdrawn. - Emits `Destroyed` event when successful. - - Weight: `O(m + c + a)` where: + - `destination`: The account to which the asset balance of `amount` will be transferred. - - `m = witness.item_metadatas` + - `amount`: The amount of assets to transfer. - - `c = witness.item_configs` + Emits `TransferredApproved` on success. - - `a = witness.attributes` + Weight: `O(1)` -### forceCollectionConfig(collection: `u32`, config: `PalletNftsCollectionConfig`) -- **interface**: `api.tx.nfts.forceCollectionConfig` -- **summary**: Change the config of a collection. +### transferKeepAlive(id: `StagingXcmV5Location`, target: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.foreignAssets.transferKeepAlive` +- **summary**: Move some assets from the sender account to another, keeping the sender account alive. - Origin must be `ForceOrigin`. + Origin must be Signed. - - `collection`: The identifier of the collection. + - `id`: The identifier of the asset to have some amount transferred. - - `config`: The new config of this collection. + - `target`: The account to be credited. - Emits `CollectionConfigChanged`. + - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. - Weight: `O(1)` + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + + Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. -### forceCollectionOwner(collection: `u32`, owner: `MultiAddress`) -- **interface**: `api.tx.nfts.forceCollectionOwner` -- **summary**: Change the Owner of a collection. +### transferOwnership(id: `StagingXcmV5Location`, owner: `MultiAddress`) +- **interface**: `api.tx.foreignAssets.transferOwnership` +- **summary**: Change the Owner of an asset. - Origin must be `ForceOrigin`. + Origin must be Signed and the sender should be the Owner of the asset `id`. - - `collection`: The identifier of the collection. + - `id`: The identifier of the asset. - - `owner`: The new Owner of this collection. + - `owner`: The new Owner of this asset. Emits `OwnerChanged`. Weight: `O(1)` - -### forceCreate(owner: `MultiAddress`, config: `PalletNftsCollectionConfig`) -- **interface**: `api.tx.nfts.forceCreate` -- **summary**: Issue a new collection of non-fungible items from a privileged origin. - - This new collection has no items initially. - The origin must conform to `ForceOrigin`. +___ - Unlike `create`, no funds are reserved. - - `owner`: The owner of this collection of items. The owner has full superuser permissions over this item, but may later change and configure the permissions using `transfer_ownership` and `set_team`. +## indices + +### claim(index: `u32`) +- **interface**: `api.tx.indices.claim` +- **summary**: Assign an previously unassigned index. - Emits `ForceCreated` event when successful. + Payment: `Deposit` is reserved from the sender account. - Weight: `O(1)` - -### forceMint(collection: `u32`, item: `u32`, mint_to: `MultiAddress`, item_config: `PalletNftsItemConfig`) -- **interface**: `api.tx.nfts.forceMint` -- **summary**: Mint an item of a particular collection from a privileged origin. + The dispatch origin for this call must be _Signed_. - The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the Issuer of the `collection`. + - `index`: the index to be claimed. This must not be in use. - - `collection`: The collection of the item to be minted. + Emits `IndexAssigned` if successful. - - `item`: An identifier of the new item. + #### Complexity - - `mint_to`: Account into which the item will be minted. + - `O(1)`. + +### forceTransfer(new: `MultiAddress`, index: `u32`, freeze: `bool`) +- **interface**: `api.tx.indices.forceTransfer` +- **summary**: Force an index to an account. This doesn't require a deposit. If the index is already held, then any deposit is reimbursed to its current owner. - - `item_config`: A config of the new item. + The dispatch origin for this call must be _Root_. - Emits `Issued` event when successful. + - `index`: the index to be (re-)assigned. - Weight: `O(1)` - -### forceSetAttribute(set_as: `Option`, collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`, value: `Bytes`) -- **interface**: `api.tx.nfts.forceSetAttribute` -- **summary**: Force-set an attribute for a collection or item. + - `new`: the new owner of the index. This function is a no-op if it is equal to sender. - Origin must be `ForceOrigin`. + - `freeze`: if set to `true`, will freeze the index so it cannot be transferred. - If the attribute already exists and it was set by another account, the deposit will be returned to the previous owner. + Emits `IndexAssigned` if successful. - - `set_as`: An optional owner of the attribute. + #### Complexity - - `collection`: The identifier of the collection whose item's metadata to set. + - `O(1)`. + +### free(index: `u32`) +- **interface**: `api.tx.indices.free` +- **summary**: Free up an index owned by the sender. - - `maybe_item`: The identifier of the item whose metadata to set. + Payment: Any previous deposit placed for the index is unreserved in the sender account. - - `namespace`: Attribute's namespace. + The dispatch origin for this call must be _Signed_ and the sender must own the index. - - `key`: The key of the attribute. + - `index`: the index to be freed. This must be owned by the sender. - - `value`: The value to which to set the attribute. + Emits `IndexFreed` if successful. - Emits `AttributeSet`. + #### Complexity - Weight: `O(1)` + - `O(1)`. -### lockCollection(collection: `u32`, lock_settings: `u64`) -- **interface**: `api.tx.nfts.lockCollection` -- **summary**: Disallows specified settings for the whole collection. - - Origin must be Signed and the sender should be the Owner of the `collection`. +### freeze(index: `u32`) +- **interface**: `api.tx.indices.freeze` +- **summary**: Freeze an index so it will always point to the sender account. This consumes the deposit. - - `collection`: The collection to be locked. + The dispatch origin for this call must be _Signed_ and the signing account must have a non-frozen account `index`. - - `lock_settings`: The settings to be locked. + - `index`: the index to be frozen in place. - Note: it's possible to only lock(set) the setting, but not to unset it. + Emits `IndexFrozen` if successful. - Emits `CollectionLocked`. + #### Complexity - Weight: `O(1)` + - `O(1)`. -### lockItemProperties(collection: `u32`, item: `u32`, lock_metadata: `bool`, lock_attributes: `bool`) -- **interface**: `api.tx.nfts.lockItemProperties` -- **summary**: Disallows changing the metadata or attributes of the item. +### pokeDeposit(index: `u32`) +- **interface**: `api.tx.indices.pokeDeposit` +- **summary**: Poke the deposit reserved for an index. - Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. + The dispatch origin for this call must be _Signed_ and the signing account must have a non-frozen account `index`. - - `collection`: The collection if the `item`. + The transaction fees is waived if the deposit is changed after poking/reconsideration. - - `item`: An item to be locked. + - `index`: the index whose deposit is to be poked/reconsidered. - - `lock_metadata`: Specifies whether the metadata should be locked. + Emits `DepositPoked` if successful. + +### transfer(new: `MultiAddress`, index: `u32`) +- **interface**: `api.tx.indices.transfer` +- **summary**: Assign an index already owned by the sender to another account. The balance reservation is effectively transferred to the new account. - - `lock_attributes`: Specifies whether the attributes in the `CollectionOwner` namespace should be locked. + The dispatch origin for this call must be _Signed_. - Note: `lock_attributes` affects the attributes in the `CollectionOwner` namespace only. When the metadata or attributes are locked, it won't be possible the unlock them. + - `index`: the index to be re-assigned. This must be owned by the sender. - Emits `ItemPropertiesLocked`. + - `new`: the new owner of the index. This function is a no-op if it is equal to sender. - Weight: `O(1)` - -### lockItemTransfer(collection: `u32`, item: `u32`) -- **interface**: `api.tx.nfts.lockItemTransfer` -- **summary**: Disallow further unprivileged transfer of an item. + Emits `IndexAssigned` if successful. - Origin must be Signed and the sender should be the Freezer of the `collection`. + #### Complexity - - `collection`: The collection of the item to be changed. + - `O(1)`. - - `item`: The item to become non-transferable. +___ - Emits `ItemTransferLocked`. - Weight: `O(1)` +## messageQueue -### mint(collection: `u32`, item: `u32`, mint_to: `MultiAddress`, witness_data: `Option`) -- **interface**: `api.tx.nfts.mint` -- **summary**: Mint an item of a particular collection. - - The origin must be Signed and the sender must comply with the `mint_settings` rules. +### executeOverweight(message_origin: `CumulusPrimitivesCoreAggregateMessageOrigin`, page: `u32`, index: `u32`, weight_limit: `SpWeightsWeightV2Weight`) +- **interface**: `api.tx.messageQueue.executeOverweight` +- **summary**: Execute an overweight message. - - `collection`: The collection of the item to be minted. + Temporary processing errors will be propagated whereas permanent errors are treated as success condition. - - `item`: An identifier of the new item. + - `origin`: Must be `Signed`. - - `mint_to`: Account into which the item will be minted. + - `message_origin`: The origin from which the message to be executed arrived. - - `witness_data`: When the mint type is `HolderOf(collection_id)`, then the owned item_id from that collection needs to be provided within the witness data object. If the mint price is set, then it should be additionally confirmed in the `witness_data`. + - `page`: The page in the queue in which the message to be executed is sitting. - Note: the deposit will be taken from the `origin` and not the `owner` of the `item`. + - `index`: The index into the queue of the message to be executed. - Emits `Issued` event when successful. + - `weight_limit`: The maximum amount of weight allowed to be consumed in the execution of the message. - Weight: `O(1)` + Benchmark complexity considerations: O(index + weight_limit). -### mintPreSigned(mint_data: `PalletNftsPreSignedMint`, signature: `SpRuntimeMultiSignature`, signer: `AccountId32`) -- **interface**: `api.tx.nfts.mintPreSigned` -- **summary**: Mint an item by providing the pre-signed approval. +### reapPage(message_origin: `CumulusPrimitivesCoreAggregateMessageOrigin`, page_index: `u32`) +- **interface**: `api.tx.messageQueue.reapPage` +- **summary**: Remove a page which has no more messages remaining to be processed or is stale. - Origin must be Signed. +___ - - `mint_data`: The pre-signed approval that consists of the information about the item, its metadata, attributes, who can mint it (`None` for anyone) and until what block number. - - `signature`: The signature of the `data` object. +## multiBlockElection + +### manage(op: `PalletElectionProviderMultiBlockAdminOperation`) +- **interface**: `api.tx.multiBlockElection.manage` +- **summary**: Manage this pallet. - - `signer`: The `data` object's signer. Should be an Issuer of the collection. + The origin of this call must be [`Config::AdminOrigin`]. - Emits `Issued` on success. Emits `AttributeSet` if the attributes were provided. Emits `ItemMetadataSet` if the metadata was not empty. - -### payTips(tips: `Vec`) -- **interface**: `api.tx.nfts.payTips` -- **summary**: Allows to pay the tips. + See [`AdminOperation`] for various operations that are possible. - Origin must be Signed. +___ - - `tips`: Tips array. - Emits `TipSent` on every tip transfer. +## multiBlockElectionSigned -### redeposit(collection: `u32`, items: `Vec`) -- **interface**: `api.tx.nfts.redeposit` -- **summary**: Re-evaluate the deposits on some items. - - Origin must be Signed and the sender should be the Owner of the `collection`. +### bail() +- **interface**: `api.tx.multiBlockElectionSigned.bail` +- **summary**: Retract a submission. - - `collection`: The collection of the items to be reevaluated. + A portion of the deposit may be returned, based on the [`Config::BailoutGraceRatio`]. - - `items`: The items of the collection whose deposits will be reevaluated. + This will fully remove the solution from storage. + +### clearOldRoundData(round: `u32`, witness_pages: `u32`) +- **interface**: `api.tx.multiBlockElectionSigned.clearOldRoundData` +- **summary**: Clear the data of a submitter form an old round. - NOTE: This exists as a best-effort function. Any items which are unknown or in the case that the owner account does not have reservable funds to pay for a deposit increase are ignored. Generally the owner isn't going to call this on items whose existing deposit is less than the refreshed deposit as it would only cost them, so it's of little consequence. + The dispatch origin of this call must be signed, and the original submitter. - It will still return an error in the case that the collection is unknown or the signer is not permitted to call it. + This can only be called for submissions that end up being discarded, as in they are not processed and they end up lingering in the queue. + +### register(claimed_score: `SpNposElectionsElectionScore`) +- **interface**: `api.tx.multiBlockElectionSigned.register` +- **summary**: Register oneself for an upcoming signed election. + +### setInvulnerables(inv: `Vec`) +- **interface**: `api.tx.multiBlockElectionSigned.setInvulnerables` +- **summary**: Set the invulnerable list. - Weight: `O(items.len())` + Dispatch origin must the the same as [`crate::Config::AdminOrigin`]. -### setAcceptOwnership(maybe_collection: `Option`) -- **interface**: `api.tx.nfts.setAcceptOwnership` -- **summary**: Set (or reset) the acceptance of ownership for a particular account. +### submitPage(page: `u32`, maybe_solution: `Option`) +- **interface**: `api.tx.multiBlockElectionSigned.submitPage` +- **summary**: Submit a single page of a solution. - Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a provider reference. + Must always come after [`Pallet::register`]. - - `maybe_collection`: The identifier of the collection whose ownership the signer is willing to accept, or if `None`, an indication that the signer is willing to accept no ownership transferal. + `maybe_solution` can be set to `None` to erase the page. - Emits `OwnershipAcceptanceChanged`. - -### setAttribute(collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`, value: `Bytes`) -- **interface**: `api.tx.nfts.setAttribute` -- **summary**: Set an attribute for a collection or item. + Collects deposits from the signed origin based on [`Config::DepositBase`] and [`Config::DepositPerPage`]. - Origin must be Signed and must conform to the namespace ruleset: +___ - - `CollectionOwner` namespace could be modified by the `collection` Admin only; - - `ItemOwner` namespace could be modified by the `maybe_item` owner only. `maybe_item` should be set in that case; +## multiBlockElectionUnsigned + +### submitUnsigned(paged_solution: `PalletElectionProviderMultiBlockPagedRawSolution`) +- **interface**: `api.tx.multiBlockElectionUnsigned.submitUnsigned` +- **summary**: Submit an unsigned solution. - - `Account(AccountId)` namespace could be modified only when the `origin` was given a permission to do so; + This works very much like an inherent, as only the validators are permitted to submit anything. By default validators will compute this call in their `offchain_worker` hook and try and submit it back. - The funds of `origin` are reserved according to the formula: `AttributeDepositBase + DepositPerByte * (key.len + value.len)` taking into account any already reserved funds. + This is different from signed page submission mainly in that the solution page is verified on the fly. - - `collection`: The identifier of the collection whose item's metadata to set. + The `paged_solution` may contain at most [`Config::MinerPages`] pages. They are interpreted as msp -> lsp, as per [`crate::Pallet::msp_range_for`]. - - `maybe_item`: The identifier of the item whose metadata to set. + For example, if `Pages = 4`, and `MinerPages = 2`, our full snapshot range would be [0, 1, 2, 3], with 3 being msp. But, in this case, then the `paged_raw_solution.pages` is expected to correspond to `[snapshot(2), snapshot(3)]`. - - `namespace`: Attribute's namespace. +___ - - `key`: The key of the attribute. - - `value`: The value to which to set the attribute. +## multiBlockElectionVerifier - Emits `AttributeSet`. +___ - Weight: `O(1)` + +## multisig -### setAttributesPreSigned(data: `PalletNftsPreSignedAttributes`, signature: `SpRuntimeMultiSignature`, signer: `AccountId32`) -- **interface**: `api.tx.nfts.setAttributesPreSigned` -- **summary**: Set attributes for an item by providing the pre-signed approval. +### approveAsMulti(threshold: `u16`, other_signatories: `Vec`, maybe_timepoint: `Option`, call_hash: `[u8;32]`, max_weight: `SpWeightsWeightV2Weight`) +- **interface**: `api.tx.multisig.approveAsMulti` +- **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. - Origin must be Signed and must be an owner of the `data.item`. + Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. - - `data`: The pre-signed approval that consists of the information about the item, attributes to update and until what block number. + The dispatch origin for this call must be _Signed_. - - `signature`: The signature of the `data` object. + - `threshold`: The total number of approvals for this dispatch before it is executed. - - `signer`: The `data` object's signer. Should be an Admin of the collection for the `CollectionOwner` namespace. + - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. - Emits `AttributeSet` for each provided attribute. Emits `ItemAttributesApprovalAdded` if the approval wasn't set before. Emits `PreSignedAttributesSet` on success. - -### setCollectionMaxSupply(collection: `u32`, max_supply: `u32`) -- **interface**: `api.tx.nfts.setCollectionMaxSupply` -- **summary**: Set the maximum number of items a collection could have. + - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. - Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of the `collection`. + - `call_hash`: The hash of the call to be executed. - - `collection`: The identifier of the collection to change. + NOTE: If this is the final approval, you will want to use `as_multi` instead. - - `max_supply`: The maximum number of items a collection could have. + #### Complexity - Emits `CollectionMaxSupplySet` event when successful. - -### setCollectionMetadata(collection: `u32`, data: `Bytes`) -- **interface**: `api.tx.nfts.setCollectionMetadata` -- **summary**: Set the metadata for a collection. + - `O(S)`. - Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of the `collection`. + - Up to one balance-reserve or unreserve operation. - If the origin is `Signed`, then funds of signer are reserved according to the formula: `MetadataDepositBase + DepositPerByte * data.len` taking into account any already reserved funds. + - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. - - `collection`: The identifier of the item whose metadata to update. + - One encode & hash, both of complexity `O(S)`. - - `data`: The general information of this item. Limited in length by `StringLimit`. + - Up to one binary search and insert (`O(logS + S)`). - Emits `CollectionMetadataSet`. + - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. - Weight: `O(1)` + - One event. + + - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`. -### setMetadata(collection: `u32`, item: `u32`, data: `Bytes`) -- **interface**: `api.tx.nfts.setMetadata` -- **summary**: Set the metadata for an item. - - Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. +### asMulti(threshold: `u16`, other_signatories: `Vec`, maybe_timepoint: `Option`, call: `Call`, max_weight: `SpWeightsWeightV2Weight`) +- **interface**: `api.tx.multisig.asMulti` +- **summary**: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of `threshold - 1` of `other_signatories`. - If the origin is Signed, then funds of signer are reserved according to the formula: `MetadataDepositBase + DepositPerByte * data.len` taking into account any already reserved funds. + If there are enough, then dispatch the call. - - `collection`: The identifier of the collection whose item's metadata to set. + Payment: `DepositBase` will be reserved if this is the first approval, plus `threshold` times `DepositFactor`. It is returned once this dispatch happens or is cancelled. - - `item`: The identifier of the item whose metadata to set. + The dispatch origin for this call must be _Signed_. - - `data`: The general information of this item. Limited in length by `StringLimit`. + - `threshold`: The total number of approvals for this dispatch before it is executed. - Emits `ItemMetadataSet`. + - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. - Weight: `O(1)` - -### setPrice(collection: `u32`, item: `u32`, price: `Option`, whitelisted_buyer: `Option`) -- **interface**: `api.tx.nfts.setPrice` -- **summary**: Set (or reset) the price for an item. + - `maybe_timepoint`: If this is the first approval, then this must be `None`. If it is not the first approval, then it must be `Some`, with the timepoint (block number and transaction index) of the first approval transaction. - Origin must be Signed and must be the owner of the `item`. + - `call`: The call to be executed. - - `collection`: The collection of the item. + NOTE: Unless this is the final approval, you will generally want to use `approve_as_multi` instead, since it only requires a hash of the call. - - `item`: The item to set the price for. + Result is equivalent to the dispatched result if `threshold` is exactly `1`. Otherwise on success, result is `Ok` and the result from the interior call, if it was executed, may be found in the deposited `MultisigExecuted` event. - - `price`: The price for the item. Pass `None`, to reset the price. + #### Complexity - - `buyer`: Restricts the buy operation to a specific account. + - `O(S + Z + Call)`. - Emits `ItemPriceSet` on success if the price is not `None`. Emits `ItemPriceRemoved` on success if the price is `None`. - -### setTeam(collection: `u32`, issuer: `Option`, admin: `Option`, freezer: `Option`) -- **interface**: `api.tx.nfts.setTeam` -- **summary**: Change the Issuer, Admin and Freezer of a collection. + - Up to one balance-reserve or unreserve operation. - Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the `collection`. + - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. - Note: by setting the role to `None` only the `ForceOrigin` will be able to change it after to `Some(account)`. + - One call encode & hash, both of complexity `O(Z)` where `Z` is tx-len. - - `collection`: The collection whose team should be changed. + - One encode & hash, both of complexity `O(S)`. - - `issuer`: The new Issuer of this collection. + - Up to one binary search and insert (`O(logS + S)`). - - `admin`: The new Admin of this collection. + - I/O: 1 read `O(S)`, up to 1 mutate `O(S)`. Up to one remove. - - `freezer`: The new Freezer of this collection. + - One event. - Emits `TeamChanged`. + - The weight of the `call`. - Weight: `O(1)` + - Storage: inserts one item, value size bounded by `MaxSignatories`, with a deposit taken for its lifetime of `DepositBase + threshold * DepositFactor`. -### transfer(collection: `u32`, item: `u32`, dest: `MultiAddress`) -- **interface**: `api.tx.nfts.transfer` -- **summary**: Move an item from the sender account to another. - - Origin must be Signed and the signing account must be either: +### asMultiThreshold1(other_signatories: `Vec`, call: `Call`) +- **interface**: `api.tx.multisig.asMultiThreshold1` +- **summary**: Immediately dispatch a multi-signature call using a single approval from the caller. - - the Owner of the `item`; + The dispatch origin for this call must be _Signed_. - - the approved delegate for the `item` (in this case, the approval is reset). + - `other_signatories`: The accounts (other than the sender) who are part of the multi-signature, but do not participate in the approval process. - Arguments: + - `call`: The call to be executed. - - `collection`: The collection of the item to be transferred. + Result is equivalent to the dispatched result. - - `item`: The item to be transferred. + #### Complexity O(Z + C) where Z is the length of the call and C its execution weight. + +### cancelAsMulti(threshold: `u16`, other_signatories: `Vec`, timepoint: `PalletMultisigTimepoint`, call_hash: `[u8;32]`) +- **interface**: `api.tx.multisig.cancelAsMulti` +- **summary**: Cancel a pre-existing, on-going multisig transaction. Any deposit reserved previously for this operation will be unreserved on success. - - `dest`: The account to receive ownership of the item. + The dispatch origin for this call must be _Signed_. - Emits `Transferred`. + - `threshold`: The total number of approvals for this dispatch before it is executed. - Weight: `O(1)` - -### transferOwnership(collection: `u32`, new_owner: `MultiAddress`) -- **interface**: `api.tx.nfts.transferOwnership` -- **summary**: Change the Owner of a collection. + - `other_signatories`: The accounts (other than the sender) who can approve this dispatch. May not be empty. - Origin must be Signed and the sender should be the Owner of the `collection`. + - `timepoint`: The timepoint (block number and transaction index) of the first approval transaction for this dispatch. - - `collection`: The collection whose owner should be changed. + - `call_hash`: The hash of the call to be executed. - - `owner`: The new Owner of this collection. They must have called `set_accept_ownership` with `collection` in order for this operation to succeed. + #### Complexity - Emits `OwnerChanged`. + - `O(S)`. - Weight: `O(1)` - -### unlockItemTransfer(collection: `u32`, item: `u32`) -- **interface**: `api.tx.nfts.unlockItemTransfer` -- **summary**: Re-allow unprivileged transfer of an item. + - Up to one balance-reserve or unreserve operation. - Origin must be Signed and the sender should be the Freezer of the `collection`. + - One passthrough operation, one insert, both `O(S)` where `S` is the number of signatories. `S` is capped by `MaxSignatories`, with weight being proportional. - - `collection`: The collection of the item to be changed. + - One encode & hash, both of complexity `O(S)`. - - `item`: The item to become transferable. + - One event. - Emits `ItemTransferUnlocked`. + - I/O: 1 read `O(S)`, one remove. - Weight: `O(1)` + - Storage: removes one item. -### updateMintSettings(collection: `u32`, mint_settings: `PalletNftsMintSettings`) -- **interface**: `api.tx.nfts.updateMintSettings` -- **summary**: Update mint settings. - - Origin must be either `ForceOrigin` or `Signed` and the sender should be the Issuer of the `collection`. +### pokeDeposit(threshold: `u16`, other_signatories: `Vec`, call_hash: `[u8;32]`) +- **interface**: `api.tx.multisig.pokeDeposit` +- **summary**: Poke the deposit reserved for an existing multisig operation. - - `collection`: The identifier of the collection to change. + The dispatch origin for this call must be _Signed_ and must be the original depositor of the multisig operation. - - `mint_settings`: The new mint settings. + The transaction fee is waived if the deposit amount has changed. - Emits `CollectionMintSettingsUpdated` event when successful. + - `threshold`: The total number of approvals needed for this multisig. -___ + - `other_signatories`: The accounts (other than the sender) who are part of the multisig. + - `call_hash`: The hash of the call this deposit is reserved for. -## parachainInfo + Emits `DepositPoked` if successful. ___ -## parachainSystem +## nfts -### setValidationData(data: `CumulusPrimitivesParachainInherentParachainInherentData`) -- **interface**: `api.tx.parachainSystem.setValidationData` -- **summary**: Set the current validation data. - - This should be invoked exactly once per block. It will panic at the finalization phase if the call was not invoked. +### approveItemAttributes(collection: `u32`, item: `u32`, delegate: `MultiAddress`) +- **interface**: `api.tx.nfts.approveItemAttributes` +- **summary**: Approve item's attributes to be changed by a delegated third-party account. - The dispatch origin for this call must be `Inherent` + Origin must be Signed and must be an owner of the `item`. - As a side effect, this function upgrades the current validation function if the appropriate time has come. - -### sudoSendUpwardMessage(message: `Bytes`) -- **interface**: `api.tx.parachainSystem.sudoSendUpwardMessage` + - `collection`: A collection of the item. -___ + - `item`: The item that holds attributes. + - `delegate`: The account to delegate permission to change attributes of the item. -## polkadotXcm + Emits `ItemAttributesApprovalAdded` on success. -### addAuthorizedAlias(aliaser: `XcmVersionedLocation`, expires: `Option`) -- **interface**: `api.tx.polkadotXcm.addAuthorizedAlias` -- **summary**: Authorize another `aliaser` location to alias into the local `origin` making this call. The `aliaser` is only authorized until the provided `expiry` block number. The call can also be used for a previously authorized alias in order to update its `expiry` block number. +### approveTransfer(collection: `u32`, item: `u32`, delegate: `MultiAddress`, maybe_deadline: `Option`) +- **interface**: `api.tx.nfts.approveTransfer` +- **summary**: Approve an item to be transferred by a delegated third-party account. - Usually useful to allow your local account to be aliased into from a remote location also under your control (like your account on another chain). + Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the `item`. - WARNING: make sure the caller `origin` (you) trusts the `aliaser` location to act in their/your name. Once authorized using this call, the `aliaser` can freely impersonate `origin` in XCM programs executed on the local chain. - -### claimAssets(assets: `XcmVersionedAssets`, beneficiary: `XcmVersionedLocation`) -- **interface**: `api.tx.polkadotXcm.claimAssets` -- **summary**: Claims assets trapped on this pallet because of leftover assets during XCM execution. + - `collection`: The collection of the item to be approved for delegated transfer. - - `origin`: Anyone can call this extrinsic. + - `item`: The item to be approved for delegated transfer. - - `assets`: The exact assets that were trapped. Use the version to specify what version was the latest when they were trapped. + - `delegate`: The account to delegate permission to transfer the item. - - `beneficiary`: The location/account where the claimed assets will be deposited. - -### execute(message: `XcmVersionedXcm`, max_weight: `SpWeightsWeightV2Weight`) -- **interface**: `api.tx.polkadotXcm.execute` -- **summary**: Execute an XCM message from a local, signed, origin. + - `maybe_deadline`: Optional deadline for the approval. Specified by providing the number of blocks after which the approval will expire - An event is deposited indicating whether `msg` could be executed completely or only partially. + Emits `TransferApproved` on success. - No more than `max_weight` will be used in its attempted execution. If this is less than the maximum amount of weight that the message could take to be executed, then no execution attempt will be made. + Weight: `O(1)` -### forceDefaultXcmVersion(maybe_xcm_version: `Option`) -- **interface**: `api.tx.polkadotXcm.forceDefaultXcmVersion` -- **summary**: Set a safe XCM version (the version that XCM should be encoded with if the most recent version a destination can accept is unknown). - - - `origin`: Must be an origin specified by AdminOrigin. +### burn(collection: `u32`, item: `u32`) +- **interface**: `api.tx.nfts.burn` +- **summary**: Destroy a single item. - - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. - -### forceSubscribeVersionNotify(location: `XcmVersionedLocation`) -- **interface**: `api.tx.polkadotXcm.forceSubscribeVersionNotify` -- **summary**: Ask a location to notify us regarding their XCM version and any changes to it. + The origin must conform to `ForceOrigin` or must be Signed and the signing account must be the owner of the `item`. - - `origin`: Must be an origin specified by AdminOrigin. + - `collection`: The collection of the item to be burned. - - `location`: The location to which we should subscribe for XCM version notifications. - -### forceSuspension(suspended: `bool`) -- **interface**: `api.tx.polkadotXcm.forceSuspension` -- **summary**: Set or unset the global suspension state of the XCM executor. + - `item`: The item to be burned. - - `origin`: Must be an origin specified by AdminOrigin. + Emits `Burned`. - - `suspended`: `true` to suspend, `false` to resume. + Weight: `O(1)` -### forceUnsubscribeVersionNotify(location: `XcmVersionedLocation`) -- **interface**: `api.tx.polkadotXcm.forceUnsubscribeVersionNotify` -- **summary**: Require that a particular destination should no longer notify us regarding any XCM version changes. +### buyItem(collection: `u32`, item: `u32`, bid_price: `u128`) +- **interface**: `api.tx.nfts.buyItem` +- **summary**: Allows to buy an item if it's up for sale. - - `origin`: Must be an origin specified by AdminOrigin. + Origin must be Signed and must not be the owner of the `item`. - - `location`: The location to which we are currently subscribed for XCM version notifications which we no longer desire. - -### forceXcmVersion(location: `StagingXcmV5Location`, version: `u32`) -- **interface**: `api.tx.polkadotXcm.forceXcmVersion` -- **summary**: Extoll that a particular destination can be communicated with through a particular version of XCM. + - `collection`: The collection of the item. - - `origin`: Must be an origin specified by AdminOrigin. + - `item`: The item the sender wants to buy. - - `location`: The destination that is being described. + - `bid_price`: The price the sender is willing to pay. - - `xcm_version`: The latest version of XCM that `location` supports. + Emits `ItemBought` on success. -### limitedReserveTransferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) -- **interface**: `api.tx.polkadotXcm.limitedReserveTransferAssets` -- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve. +### cancelApproval(collection: `u32`, item: `u32`, delegate: `MultiAddress`) +- **interface**: `api.tx.nfts.cancelApproval` +- **summary**: Cancel one of the transfer approvals for a specific item. - `assets` must have same reserve location and may not be teleportable to `dest`. + Origin must be either: - - `assets` have local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + - the `Force` origin; - - `assets` have destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + - `Signed` with the signer being the Owner of the `item`; - - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + Arguments: - Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + - `collection`: The collection of the item of whose approval will be cancelled. - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + - `item`: The item of the collection of whose approval will be cancelled. - - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + - `delegate`: The account that is going to loose their approval. - - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + Emits `ApprovalCancelled` on success. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + Weight: `O(1)` + +### cancelItemAttributesApproval(collection: `u32`, item: `u32`, delegate: `MultiAddress`, witness: `PalletNftsCancelAttributesApprovalWitness`) +- **interface**: `api.tx.nfts.cancelItemAttributesApproval` +- **summary**: Cancel the previously provided approval to change item's attributes. All the previously set attributes by the `delegate` will be removed. - - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + Origin must be Signed and must be an owner of the `item`. - - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + - `collection`: Collection that the item is contained within. + + - `item`: The item that holds attributes. + + - `delegate`: The previously approved account to remove. + + Emits `ItemAttributesApprovalRemoved` on success. + +### cancelSwap(offered_collection: `u32`, offered_item: `u32`) +- **interface**: `api.tx.nfts.cancelSwap` +- **summary**: Cancel an atomic swap. + + Origin must be Signed. Origin must be an owner of the `item` if the deadline hasn't expired. + + - `collection`: The collection of the item. + + - `item`: The item an owner wants to give. + + Emits `SwapCancelled` on success. + +### claimSwap(send_collection: `u32`, send_item: `u32`, receive_collection: `u32`, receive_item: `u32`, witness_price: `Option`) +- **interface**: `api.tx.nfts.claimSwap` +- **summary**: Claim an atomic swap. This method executes a pending swap, that was created by a counterpart before. + + Origin must be Signed and must be an owner of the `item`. + + - `send_collection`: The collection of the item to be sent. + + - `send_item`: The item to be sent. + + - `receive_collection`: The collection of the item to be received. + + - `receive_item`: The item to be received. + + - `witness_price`: A price that was previously agreed on. + + Emits `SwapClaimed` on success. + +### clearAllTransferApprovals(collection: `u32`, item: `u32`) +- **interface**: `api.tx.nfts.clearAllTransferApprovals` +- **summary**: Cancel all the approvals of a specific item. + + Origin must be either: + + - the `Force` origin; + + - `Signed` with the signer being the Owner of the `item`; + + Arguments: + + - `collection`: The collection of the item of whose approvals will be cleared. + + - `item`: The item of the collection of whose approvals will be cleared. + + Emits `AllApprovalsCancelled` on success. + + Weight: `O(1)` + +### clearAttribute(collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`) +- **interface**: `api.tx.nfts.clearAttribute` +- **summary**: Clear an attribute for a collection or item. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the attribute. + + Any deposit is freed for the collection's owner. + + - `collection`: The identifier of the collection whose item's metadata to clear. + + - `maybe_item`: The identifier of the item whose metadata to clear. + + - `namespace`: Attribute's namespace. + + - `key`: The key of the attribute. + + Emits `AttributeCleared`. + + Weight: `O(1)` + +### clearCollectionMetadata(collection: `u32`) +- **interface**: `api.tx.nfts.clearCollectionMetadata` +- **summary**: Clear the metadata for a collection. + + Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of the `collection`. + + Any deposit is freed for the collection's owner. + + - `collection`: The identifier of the collection whose metadata to clear. + + Emits `CollectionMetadataCleared`. + + Weight: `O(1)` + +### clearMetadata(collection: `u32`, item: `u32`) +- **interface**: `api.tx.nfts.clearMetadata` +- **summary**: Clear the metadata for an item. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. + + Any deposit is freed for the collection's owner. + + - `collection`: The identifier of the collection whose item's metadata to clear. + + - `item`: The identifier of the item whose metadata to clear. + + Emits `ItemMetadataCleared`. + + Weight: `O(1)` + +### create(admin: `MultiAddress`, config: `PalletNftsCollectionConfig`) +- **interface**: `api.tx.nfts.create` +- **summary**: Issue a new collection of non-fungible items from a public origin. + + This new collection has no items initially and its owner is the origin. + + The origin must be Signed and the sender must have sufficient funds free. + + `CollectionDeposit` funds of sender are reserved. + + Parameters: + + - `admin`: The admin of this collection. The admin is the initial address of each member of the collection's admin team. + + Emits `Created` event when successful. + + Weight: `O(1)` + +### createSwap(offered_collection: `u32`, offered_item: `u32`, desired_collection: `u32`, maybe_desired_item: `Option`, maybe_price: `Option`, duration: `u32`) +- **interface**: `api.tx.nfts.createSwap` +- **summary**: Register a new atomic swap, declaring an intention to send an `item` in exchange for `desired_item` from origin to target on the current blockchain. The target can execute the swap during the specified `duration` of blocks (if set). Additionally, the price could be set for the desired `item`. + + Origin must be Signed and must be an owner of the `item`. + + - `collection`: The collection of the item. + + - `item`: The item an owner wants to give. + + - `desired_collection`: The collection of the desired item. + + - `desired_item`: The desired item an owner wants to receive. + + - `maybe_price`: The price an owner is willing to pay or receive for the desired `item`. + + - `duration`: A deadline for the swap. Specified by providing the number of blocks after which the swap will expire. + + Emits `SwapCreated` on success. + +### destroy(collection: `u32`, witness: `PalletNftsDestroyWitness`) +- **interface**: `api.tx.nfts.destroy` +- **summary**: Destroy a collection of fungible items. + + The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the owner of the `collection`. + + NOTE: The collection must have 0 items to be destroyed. + + - `collection`: The identifier of the collection to be destroyed. + + - `witness`: Information on the items minted in the collection. This must be correct. + + Emits `Destroyed` event when successful. + + Weight: `O(m + c + a)` where: + + - `m = witness.item_metadatas` + + - `c = witness.item_configs` + + - `a = witness.attributes` + +### forceCollectionConfig(collection: `u32`, config: `PalletNftsCollectionConfig`) +- **interface**: `api.tx.nfts.forceCollectionConfig` +- **summary**: Change the config of a collection. + + Origin must be `ForceOrigin`. + + - `collection`: The identifier of the collection. + + - `config`: The new config of this collection. + + Emits `CollectionConfigChanged`. + + Weight: `O(1)` + +### forceCollectionOwner(collection: `u32`, owner: `MultiAddress`) +- **interface**: `api.tx.nfts.forceCollectionOwner` +- **summary**: Change the Owner of a collection. + + Origin must be `ForceOrigin`. + + - `collection`: The identifier of the collection. + + - `owner`: The new Owner of this collection. + + Emits `OwnerChanged`. + + Weight: `O(1)` + +### forceCreate(owner: `MultiAddress`, config: `PalletNftsCollectionConfig`) +- **interface**: `api.tx.nfts.forceCreate` +- **summary**: Issue a new collection of non-fungible items from a privileged origin. + + This new collection has no items initially. + + The origin must conform to `ForceOrigin`. + + Unlike `create`, no funds are reserved. + + - `owner`: The owner of this collection of items. The owner has full superuser permissions over this item, but may later change and configure the permissions using `transfer_ownership` and `set_team`. + + Emits `ForceCreated` event when successful. + + Weight: `O(1)` + +### forceMint(collection: `u32`, item: `u32`, mint_to: `MultiAddress`, item_config: `PalletNftsItemConfig`) +- **interface**: `api.tx.nfts.forceMint` +- **summary**: Mint an item of a particular collection from a privileged origin. + + The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be the Issuer of the `collection`. + + - `collection`: The collection of the item to be minted. + + - `item`: An identifier of the new item. + + - `mint_to`: Account into which the item will be minted. + + - `item_config`: A config of the new item. + + Emits `Issued` event when successful. + + Weight: `O(1)` + +### forceSetAttribute(set_as: `Option`, collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`, value: `Bytes`) +- **interface**: `api.tx.nfts.forceSetAttribute` +- **summary**: Force-set an attribute for a collection or item. + + Origin must be `ForceOrigin`. + + If the attribute already exists and it was set by another account, the deposit will be returned to the previous owner. + + - `set_as`: An optional owner of the attribute. + + - `collection`: The identifier of the collection whose item's metadata to set. + + - `maybe_item`: The identifier of the item whose metadata to set. + + - `namespace`: Attribute's namespace. + + - `key`: The key of the attribute. + + - `value`: The value to which to set the attribute. + + Emits `AttributeSet`. + + Weight: `O(1)` + +### lockCollection(collection: `u32`, lock_settings: `u64`) +- **interface**: `api.tx.nfts.lockCollection` +- **summary**: Disallows specified settings for the whole collection. + + Origin must be Signed and the sender should be the Owner of the `collection`. + + - `collection`: The collection to be locked. + + - `lock_settings`: The settings to be locked. + + Note: it's possible to only lock(set) the setting, but not to unset it. + + Emits `CollectionLocked`. + + Weight: `O(1)` + +### lockItemProperties(collection: `u32`, item: `u32`, lock_metadata: `bool`, lock_attributes: `bool`) +- **interface**: `api.tx.nfts.lockItemProperties` +- **summary**: Disallows changing the metadata or attributes of the item. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. + + - `collection`: The collection if the `item`. + + - `item`: An item to be locked. + + - `lock_metadata`: Specifies whether the metadata should be locked. + + - `lock_attributes`: Specifies whether the attributes in the `CollectionOwner` namespace should be locked. + + Note: `lock_attributes` affects the attributes in the `CollectionOwner` namespace only. When the metadata or attributes are locked, it won't be possible the unlock them. + + Emits `ItemPropertiesLocked`. + + Weight: `O(1)` + +### lockItemTransfer(collection: `u32`, item: `u32`) +- **interface**: `api.tx.nfts.lockItemTransfer` +- **summary**: Disallow further unprivileged transfer of an item. + + Origin must be Signed and the sender should be the Freezer of the `collection`. + + - `collection`: The collection of the item to be changed. + + - `item`: The item to become non-transferable. + + Emits `ItemTransferLocked`. + + Weight: `O(1)` + +### mint(collection: `u32`, item: `u32`, mint_to: `MultiAddress`, witness_data: `Option`) +- **interface**: `api.tx.nfts.mint` +- **summary**: Mint an item of a particular collection. + + The origin must be Signed and the sender must comply with the `mint_settings` rules. + + - `collection`: The collection of the item to be minted. + + - `item`: An identifier of the new item. + + - `mint_to`: Account into which the item will be minted. + + - `witness_data`: When the mint type is `HolderOf(collection_id)`, then the owned item_id from that collection needs to be provided within the witness data object. If the mint price is set, then it should be additionally confirmed in the `witness_data`. + + Note: the deposit will be taken from the `origin` and not the `owner` of the `item`. + + Emits `Issued` event when successful. + + Weight: `O(1)` + +### mintPreSigned(mint_data: `PalletNftsPreSignedMint`, signature: `SpRuntimeMultiSignature`, signer: `AccountId32`) +- **interface**: `api.tx.nfts.mintPreSigned` +- **summary**: Mint an item by providing the pre-signed approval. + + Origin must be Signed. + + - `mint_data`: The pre-signed approval that consists of the information about the item, its metadata, attributes, who can mint it (`None` for anyone) and until what block number. + + - `signature`: The signature of the `data` object. + + - `signer`: The `data` object's signer. Should be an Issuer of the collection. + + Emits `Issued` on success. Emits `AttributeSet` if the attributes were provided. Emits `ItemMetadataSet` if the metadata was not empty. + +### payTips(tips: `Vec`) +- **interface**: `api.tx.nfts.payTips` +- **summary**: Allows to pay the tips. + + Origin must be Signed. + + - `tips`: Tips array. + + Emits `TipSent` on every tip transfer. + +### redeposit(collection: `u32`, items: `Vec`) +- **interface**: `api.tx.nfts.redeposit` +- **summary**: Re-evaluate the deposits on some items. + + Origin must be Signed and the sender should be the Owner of the `collection`. + + - `collection`: The collection of the items to be reevaluated. + + - `items`: The items of the collection whose deposits will be reevaluated. + + NOTE: This exists as a best-effort function. Any items which are unknown or in the case that the owner account does not have reservable funds to pay for a deposit increase are ignored. Generally the owner isn't going to call this on items whose existing deposit is less than the refreshed deposit as it would only cost them, so it's of little consequence. + + It will still return an error in the case that the collection is unknown or the signer is not permitted to call it. + + Weight: `O(items.len())` + +### setAcceptOwnership(maybe_collection: `Option`) +- **interface**: `api.tx.nfts.setAcceptOwnership` +- **summary**: Set (or reset) the acceptance of ownership for a particular account. + + Origin must be `Signed` and if `maybe_collection` is `Some`, then the signer must have a provider reference. + + - `maybe_collection`: The identifier of the collection whose ownership the signer is willing to accept, or if `None`, an indication that the signer is willing to accept no ownership transferal. + + Emits `OwnershipAcceptanceChanged`. + +### setAttribute(collection: `u32`, maybe_item: `Option`, namespace: `PalletNftsAttributeNamespace`, key: `Bytes`, value: `Bytes`) +- **interface**: `api.tx.nfts.setAttribute` +- **summary**: Set an attribute for a collection or item. + + Origin must be Signed and must conform to the namespace ruleset: + + - `CollectionOwner` namespace could be modified by the `collection` Admin only; + + - `ItemOwner` namespace could be modified by the `maybe_item` owner only. `maybe_item` should be set in that case; + + - `Account(AccountId)` namespace could be modified only when the `origin` was given a permission to do so; + + The funds of `origin` are reserved according to the formula: `AttributeDepositBase + DepositPerByte * (key.len + value.len)` taking into account any already reserved funds. + + - `collection`: The identifier of the collection whose item's metadata to set. + + - `maybe_item`: The identifier of the item whose metadata to set. + + - `namespace`: Attribute's namespace. + + - `key`: The key of the attribute. + + - `value`: The value to which to set the attribute. + + Emits `AttributeSet`. + + Weight: `O(1)` + +### setAttributesPreSigned(data: `PalletNftsPreSignedAttributes`, signature: `SpRuntimeMultiSignature`, signer: `AccountId32`) +- **interface**: `api.tx.nfts.setAttributesPreSigned` +- **summary**: Set attributes for an item by providing the pre-signed approval. + + Origin must be Signed and must be an owner of the `data.item`. + + - `data`: The pre-signed approval that consists of the information about the item, attributes to update and until what block number. + + - `signature`: The signature of the `data` object. + + - `signer`: The `data` object's signer. Should be an Admin of the collection for the `CollectionOwner` namespace. + + Emits `AttributeSet` for each provided attribute. Emits `ItemAttributesApprovalAdded` if the approval wasn't set before. Emits `PreSignedAttributesSet` on success. + +### setCollectionMaxSupply(collection: `u32`, max_supply: `u32`) +- **interface**: `api.tx.nfts.setCollectionMaxSupply` +- **summary**: Set the maximum number of items a collection could have. + + Origin must be either `ForceOrigin` or `Signed` and the sender should be the Owner of the `collection`. + + - `collection`: The identifier of the collection to change. + + - `max_supply`: The maximum number of items a collection could have. + + Emits `CollectionMaxSupplySet` event when successful. + +### setCollectionMetadata(collection: `u32`, data: `Bytes`) +- **interface**: `api.tx.nfts.setCollectionMetadata` +- **summary**: Set the metadata for a collection. + + Origin must be either `ForceOrigin` or `Signed` and the sender should be the Admin of the `collection`. + + If the origin is `Signed`, then funds of signer are reserved according to the formula: `MetadataDepositBase + DepositPerByte * data.len` taking into account any already reserved funds. + + - `collection`: The identifier of the item whose metadata to update. + + - `data`: The general information of this item. Limited in length by `StringLimit`. + + Emits `CollectionMetadataSet`. + + Weight: `O(1)` + +### setMetadata(collection: `u32`, item: `u32`, data: `Bytes`) +- **interface**: `api.tx.nfts.setMetadata` +- **summary**: Set the metadata for an item. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Admin of the `collection`. + + If the origin is Signed, then funds of signer are reserved according to the formula: `MetadataDepositBase + DepositPerByte * data.len` taking into account any already reserved funds. + + - `collection`: The identifier of the collection whose item's metadata to set. + + - `item`: The identifier of the item whose metadata to set. + + - `data`: The general information of this item. Limited in length by `StringLimit`. + + Emits `ItemMetadataSet`. + + Weight: `O(1)` + +### setPrice(collection: `u32`, item: `u32`, price: `Option`, whitelisted_buyer: `Option`) +- **interface**: `api.tx.nfts.setPrice` +- **summary**: Set (or reset) the price for an item. + + Origin must be Signed and must be the owner of the `item`. + + - `collection`: The collection of the item. + + - `item`: The item to set the price for. + + - `price`: The price for the item. Pass `None`, to reset the price. + + - `buyer`: Restricts the buy operation to a specific account. + + Emits `ItemPriceSet` on success if the price is not `None`. Emits `ItemPriceRemoved` on success if the price is `None`. + +### setTeam(collection: `u32`, issuer: `Option`, admin: `Option`, freezer: `Option`) +- **interface**: `api.tx.nfts.setTeam` +- **summary**: Change the Issuer, Admin and Freezer of a collection. + + Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the `collection`. + + Note: by setting the role to `None` only the `ForceOrigin` will be able to change it after to `Some(account)`. + + - `collection`: The collection whose team should be changed. + + - `issuer`: The new Issuer of this collection. + + - `admin`: The new Admin of this collection. + + - `freezer`: The new Freezer of this collection. + + Emits `TeamChanged`. + + Weight: `O(1)` + +### transfer(collection: `u32`, item: `u32`, dest: `MultiAddress`) +- **interface**: `api.tx.nfts.transfer` +- **summary**: Move an item from the sender account to another. + + Origin must be Signed and the signing account must be either: + + - the Owner of the `item`; + + - the approved delegate for the `item` (in this case, the approval is reset). + + Arguments: + + - `collection`: The collection of the item to be transferred. + + - `item`: The item to be transferred. + + - `dest`: The account to receive ownership of the item. + + Emits `Transferred`. + + Weight: `O(1)` + +### transferOwnership(collection: `u32`, new_owner: `MultiAddress`) +- **interface**: `api.tx.nfts.transferOwnership` +- **summary**: Change the Owner of a collection. + + Origin must be Signed and the sender should be the Owner of the `collection`. + + - `collection`: The collection whose owner should be changed. + + - `owner`: The new Owner of this collection. They must have called `set_accept_ownership` with `collection` in order for this operation to succeed. + + Emits `OwnerChanged`. + + Weight: `O(1)` + +### unlockItemTransfer(collection: `u32`, item: `u32`) +- **interface**: `api.tx.nfts.unlockItemTransfer` +- **summary**: Re-allow unprivileged transfer of an item. + + Origin must be Signed and the sender should be the Freezer of the `collection`. + + - `collection`: The collection of the item to be changed. + + - `item`: The item to become transferable. + + Emits `ItemTransferUnlocked`. + + Weight: `O(1)` + +### updateMintSettings(collection: `u32`, mint_settings: `PalletNftsMintSettings`) +- **interface**: `api.tx.nfts.updateMintSettings` +- **summary**: Update mint settings. + + Origin must be either `ForceOrigin` or `Signed` and the sender should be the Issuer of the `collection`. + + - `collection`: The identifier of the collection to change. + + - `mint_settings`: The new mint settings. + + Emits `CollectionMintSettingsUpdated` event when successful. + +___ + + +## nominationPools + +### adjustPoolDeposit(pool_id: `u32`) +- **interface**: `api.tx.nominationPools.adjustPoolDeposit` +- **summary**: Top up the deficit or withdraw the excess ED from the pool. + + When a pool is created, the pool depositor transfers ED to the reward account of the pool. ED is subject to change and over time, the deposit in the reward account may be insufficient to cover the ED deficit of the pool or vice-versa where there is excess deposit to the pool. This call allows anyone to adjust the ED deposit of the pool by either topping up the deficit or claiming the excess. + +### applySlash(member_account: `MultiAddress`) +- **interface**: `api.tx.nominationPools.applySlash` +- **summary**: Apply a pending slash on a member. + + Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type: [`adapter::StakeStrategyType::Delegate`]. + + The pending slash amount of the member must be equal or more than `ExistentialDeposit`. This call can be dispatched permissionlessly (i.e. by any account). If the execution is successful, fee is refunded and caller may be rewarded with a part of the slash based on the [`crate::pallet::Config::StakeAdapter`] configuration. + +### bondExtra(extra: `PalletNominationPoolsBondExtra`) +- **interface**: `api.tx.nominationPools.bondExtra` +- **summary**: Bond `extra` more funds from `origin` into the pool to which they already belong. + + Additional funds can come from either the free balance of the account, of from the accumulated rewards, see [`BondExtra`]. + + Bonding extra funds implies an automatic payout of all pending rewards as well. See `bond_extra_other` to bond pending rewards of `other` members. + +### bondExtraOther(member: `MultiAddress`, extra: `PalletNominationPoolsBondExtra`) +- **interface**: `api.tx.nominationPools.bondExtraOther` +- **summary**: `origin` bonds funds from `extra` for some pool member `member` into their respective pools. + + `origin` can bond extra funds from free balance or pending rewards when `origin == other`. + + In the case of `origin != other`, `origin` can only bond extra pending rewards of `other` members assuming set_claim_permission for the given member is `PermissionlessCompound` or `PermissionlessAll`. + +### chill(pool_id: `u32`) +- **interface**: `api.tx.nominationPools.chill` +- **summary**: Chill on behalf of the pool. + + The dispatch origin of this call can be signed by the pool nominator or the pool root role, same as [`Pallet::nominate`]. + + This directly forwards the call to an implementation of `StakingInterface` (e.g., `pallet-staking`) through [`Config::StakeAdapter`], on behalf of the bonded pool. + + Under certain conditions, this call can be dispatched permissionlessly (i.e. by any account). + + #### Conditions for a permissionless dispatch: + + * When pool depositor has less than `MinNominatorBond` staked, otherwise pool members are unable to unbond. + + #### Conditions for permissioned dispatch: + + * The caller is the pool's nominator or root. + +### claimCommission(pool_id: `u32`) +- **interface**: `api.tx.nominationPools.claimCommission` +- **summary**: Claim pending commission. + + The `root` role of the pool is _always_ allowed to claim the pool's commission. + + If the pool has set `CommissionClaimPermission::Permissionless`, then any account can trigger the process of claiming the pool's commission. + + If the pool has set its `CommissionClaimPermission` to `Account(acc)`, then only accounts + + * `acc`, and + + * the pool's root account + + may call this extrinsic on behalf of the pool. + + Pending commissions are paid out and added to the total claimed commission. The total pending commission is reset to zero. + +### claimPayout() +- **interface**: `api.tx.nominationPools.claimPayout` +- **summary**: A bonded member can use this to claim their payout based on the rewards that the pool has accumulated since their last claimed payout (OR since joining if this is their first time claiming rewards). The payout will be transferred to the member's account. + + The member will earn rewards pro rata based on the members stake vs the sum of the members in the pools stake. Rewards do not "expire". + + See `claim_payout_other` to claim rewards on behalf of some `other` pool member. + +### claimPayoutOther(other: `AccountId32`) +- **interface**: `api.tx.nominationPools.claimPayoutOther` +- **summary**: `origin` can claim payouts on some pool member `other`'s behalf. + + Pool member `other` must have a `PermissionlessWithdraw` or `PermissionlessAll` claim permission for this call to be successful. + +### create(amount: `Compact`, root: `MultiAddress`, nominator: `MultiAddress`, bouncer: `MultiAddress`) +- **interface**: `api.tx.nominationPools.create` +- **summary**: Create a new delegation pool. + + #### Arguments + + * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of deposit since the pools creator cannot fully unbond funds until the pool is being destroyed. + + * `index` - A disambiguation index for creating the account. Likely only useful when creating multiple pools in the same extrinsic. + + * `root` - The account to set as [`PoolRoles::root`]. + + * `nominator` - The account to set as the [`PoolRoles::nominator`]. + + * `bouncer` - The account to set as the [`PoolRoles::bouncer`]. + + #### Note + + In addition to `amount`, the caller will transfer the existential deposit; so the caller needs at have at least `amount + existential_deposit` transferable. + +### createWithPoolId(amount: `Compact`, root: `MultiAddress`, nominator: `MultiAddress`, bouncer: `MultiAddress`, pool_id: `u32`) +- **interface**: `api.tx.nominationPools.createWithPoolId` +- **summary**: Create a new delegation pool with a previously used pool id + + #### Arguments + + same as `create` with the inclusion of + + * `pool_id` - `A valid PoolId. + +### join(amount: `Compact`, pool_id: `u32`) +- **interface**: `api.tx.nominationPools.join` +- **summary**: Stake funds with a pool. The amount to bond is delegated (or transferred based on [`adapter::StakeStrategyType`]) from the member to the pool account and immediately increases the pool's bond. + + The method of transferring the amount to the pool account is determined by [`adapter::StakeStrategyType`]. If the pool is configured to use [`adapter::StakeStrategyType::Delegate`], the funds remain in the account of the `origin`, while the pool gains the right to use these funds for staking. + + #### Note + + * An account can only be a member of a single pool. + + * An account cannot join the same pool multiple times. + + * This call will *not* dust the member account, so the member must have at least `existential deposit + amount` in their account. + + * Only a pool with [`PoolState::Open`] can be joined + +### migrateDelegation(member_account: `MultiAddress`) +- **interface**: `api.tx.nominationPools.migrateDelegation` +- **summary**: Migrates delegated funds from the pool account to the `member_account`. + + Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type: [`adapter::StakeStrategyType::Delegate`]. + + This is a permission-less call and refunds any fee if claim is successful. + + If the pool has migrated to delegation based staking, the staked tokens of pool members can be moved and held in their own account. See [`adapter::DelegateStake`] + +### migratePoolToDelegateStake(pool_id: `u32`) +- **interface**: `api.tx.nominationPools.migratePoolToDelegateStake` +- **summary**: Migrate pool from [`adapter::StakeStrategyType::Transfer`] to [`adapter::StakeStrategyType::Delegate`]. + + Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type: [`adapter::StakeStrategyType::Delegate`]. + + This call can be dispatched permissionlessly, and refunds any fee if successful. + + If the pool has already migrated to delegation based staking, this call will fail. + +### nominate(pool_id: `u32`, validators: `Vec`) +- **interface**: `api.tx.nominationPools.nominate` +- **summary**: Nominate on behalf of the pool. + + The dispatch origin of this call must be signed by the pool nominator or the pool root role. + + This directly forwards the call to an implementation of `StakingInterface` (e.g., `pallet-staking`) through [`Config::StakeAdapter`], on behalf of the bonded pool. + + #### Note + + In addition to a `root` or `nominator` role of `origin`, the pool's depositor needs to have at least `depositor_min_bond` in the pool to start nominating. + +### poolWithdrawUnbonded(pool_id: `u32`, num_slashing_spans: `u32`) +- **interface**: `api.tx.nominationPools.poolWithdrawUnbonded` +- **summary**: Call `withdraw_unbonded` for the pools account. This call can be made by any account. + + This is useful if there are too many unlocking chunks to call `unbond`, and some can be cleared by withdrawing. In the case there are too many unlocking chunks, the user would probably see an error like `NoMoreChunks` emitted from the staking system when they attempt to unbond. + +### setClaimPermission(permission: `PalletNominationPoolsClaimPermission`) +- **interface**: `api.tx.nominationPools.setClaimPermission` +- **summary**: Allows a pool member to set a claim permission to allow or disallow permissionless bonding and withdrawing. + + #### Arguments + + * `origin` - Member of a pool. + + * `permission` - The permission to be applied. + +### setCommission(pool_id: `u32`, new_commission: `Option<(Perbill,AccountId32)>`) +- **interface**: `api.tx.nominationPools.setCommission` +- **summary**: Set the commission of a pool. Both a commission percentage and a commission payee must be provided in the `current` tuple. Where a `current` of `None` is provided, any current commission will be removed. + + - If a `None` is supplied to `new_commission`, existing commission will be removed. + +### setCommissionChangeRate(pool_id: `u32`, change_rate: `PalletNominationPoolsCommissionChangeRate`) +- **interface**: `api.tx.nominationPools.setCommissionChangeRate` +- **summary**: Set the commission change rate for a pool. + + Initial change rate is not bounded, whereas subsequent updates can only be more restrictive than the current. + +### setCommissionClaimPermission(pool_id: `u32`, permission: `Option`) +- **interface**: `api.tx.nominationPools.setCommissionClaimPermission` +- **summary**: Set or remove a pool's commission claim permission. + + Determines who can claim the pool's pending commission. Only the `Root` role of the pool is able to configure commission claim permissions. + +### setCommissionMax(pool_id: `u32`, max_commission: `Perbill`) +- **interface**: `api.tx.nominationPools.setCommissionMax` +- **summary**: Set the maximum commission of a pool. + + - Initial max can be set to any `Perbill`, and only smaller values thereafter. + + - Current commission will be lowered in the event it is higher than a new max commission. + +### setConfigs(min_join_bond: `PalletNominationPoolsConfigOpU128`, min_create_bond: `PalletNominationPoolsConfigOpU128`, max_pools: `PalletNominationPoolsConfigOpU32`, max_members: `PalletNominationPoolsConfigOpU32`, max_members_per_pool: `PalletNominationPoolsConfigOpU32`, global_max_commission: `PalletNominationPoolsConfigOpPerbill`) +- **interface**: `api.tx.nominationPools.setConfigs` +- **summary**: Update configurations for the nomination pools. The origin for this call must be [`Config::AdminOrigin`]. + + #### Arguments + + * `min_join_bond` - Set [`MinJoinBond`]. + + * `min_create_bond` - Set [`MinCreateBond`]. + + * `max_pools` - Set [`MaxPools`]. + + * `max_members` - Set [`MaxPoolMembers`]. + + * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`]. + + * `global_max_commission` - Set [`GlobalMaxCommission`]. + +### setMetadata(pool_id: `u32`, metadata: `Bytes`) +- **interface**: `api.tx.nominationPools.setMetadata` +- **summary**: Set a new metadata for the pool. + + The dispatch origin of this call must be signed by the bouncer, or the root role of the pool. + +### setState(pool_id: `u32`, state: `PalletNominationPoolsPoolState`) +- **interface**: `api.tx.nominationPools.setState` +- **summary**: Set a new state for the pool. + + If a pool is already in the `Destroying` state, then under no condition can its state change again. + + The dispatch origin of this call must be either: + + 1. signed by the bouncer, or the root role of the pool, 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and then the state of the pool can be permissionlessly changed to `Destroying`. + +### unbond(member_account: `MultiAddress`, unbonding_points: `Compact`) +- **interface**: `api.tx.nominationPools.unbond` +- **summary**: Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It implicitly collects the rewards one last time, since not doing so would mean some rewards would be forfeited. + + Under certain conditions, this call can be dispatched permissionlessly (i.e. by any account). + + #### Conditions for a permissionless dispatch. + + * The pool is blocked and the caller is either the root or bouncer. This is refereed to as a kick. + + * The pool is destroying and the member is not the depositor. + + * The pool is destroying, the member is the depositor and no other members are in the pool. + + #### Conditions for permissioned dispatch (i.e. the caller is also the `member_account`): + + * The caller is not the depositor. + + * The caller is the depositor, the pool is destroying and no other members are in the pool. + + #### Note + + If there are too many unlocking chunks to unbond with the pool account, [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. The [`StakingInterface::unbond`] will implicitly call [`Call::pool_withdraw_unbonded`] to try to free chunks if necessary (ie. if unbound was called and no unlocking chunks are available). However, it may not be possible to release the current unlocking chunks, in which case, the result of this call will likely be the `NoMoreChunks` error from the staking system. + +### updateRoles(pool_id: `u32`, new_root: `PalletNominationPoolsConfigOpAccountId32`, new_nominator: `PalletNominationPoolsConfigOpAccountId32`, new_bouncer: `PalletNominationPoolsConfigOpAccountId32`) +- **interface**: `api.tx.nominationPools.updateRoles` +- **summary**: Update the roles of the pool. + + The root is the only entity that can change any of the roles, including itself, excluding the depositor, who can never change. + + It emits an event, notifying UIs of the role change. This event is quite relevant to most pool members and they should be informed of changes to pool roles. + +### withdrawUnbonded(member_account: `MultiAddress`, num_slashing_spans: `u32`) +- **interface**: `api.tx.nominationPools.withdrawUnbonded` +- **summary**: Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an error is returned. + + Under certain conditions, this call can be dispatched permissionlessly (i.e. by any account). + + #### Conditions for a permissionless dispatch + + * The pool is in destroy mode and the target is not the depositor. + + * The target is the depositor and they are the only member in the sub pools. + + * The pool is blocked and the caller is either the root or bouncer. + + #### Conditions for permissioned dispatch + + * The caller is the target and they are not the depositor. + + #### Note + + - If the target is the depositor, the pool will be destroyed. + + - If the pool has any pending slash, we also try to slash the member before letting them withdraw. This calculation adds some weight overhead and is only defensive. In reality, pool slashes must have been already applied via permissionless [`Call::apply_slash`]. + +___ + + +## parachainInfo + +___ + + +## parachainSystem + +### setValidationData(data: `CumulusPalletParachainSystemParachainInherentBasicParachainInherentData`, inbound_messages_data: `CumulusPalletParachainSystemParachainInherentInboundMessagesData`) +- **interface**: `api.tx.parachainSystem.setValidationData` +- **summary**: Set the current validation data. + + This should be invoked exactly once per block. It will panic at the finalization phase if the call was not invoked. + + The dispatch origin for this call must be `Inherent` + + As a side effect, this function upgrades the current validation function if the appropriate time has come. + +### sudoSendUpwardMessage(message: `Bytes`) +- **interface**: `api.tx.parachainSystem.sudoSendUpwardMessage` + +___ + + +## parameters + +### setParameter(key_value: `AssetHubPolkadotRuntimeRuntimeParameters`) +- **interface**: `api.tx.parameters.setParameter` +- **summary**: Set the value of a parameter. + + The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be deleted by setting them to `None`. + +___ + + +## polkadotXcm + +### addAuthorizedAlias(aliaser: `XcmVersionedLocation`, expires: `Option`) +- **interface**: `api.tx.polkadotXcm.addAuthorizedAlias` +- **summary**: Authorize another `aliaser` location to alias into the local `origin` making this call. The `aliaser` is only authorized until the provided `expiry` block number. The call can also be used for a previously authorized alias in order to update its `expiry` block number. + + Usually useful to allow your local account to be aliased into from a remote location also under your control (like your account on another chain). + + WARNING: make sure the caller `origin` (you) trusts the `aliaser` location to act in their/your name. Once authorized using this call, the `aliaser` can freely impersonate `origin` in XCM programs executed on the local chain. + +### claimAssets(assets: `XcmVersionedAssets`, beneficiary: `XcmVersionedLocation`) +- **interface**: `api.tx.polkadotXcm.claimAssets` +- **summary**: Claims assets trapped on this pallet because of leftover assets during XCM execution. + + - `origin`: Anyone can call this extrinsic. + + - `assets`: The exact assets that were trapped. Use the version to specify what version was the latest when they were trapped. + + - `beneficiary`: The location/account where the claimed assets will be deposited. + +### execute(message: `XcmVersionedXcm`, max_weight: `SpWeightsWeightV2Weight`) +- **interface**: `api.tx.polkadotXcm.execute` +- **summary**: Execute an XCM message from a local, signed, origin. + + An event is deposited indicating whether `msg` could be executed completely or only partially. + + No more than `max_weight` will be used in its attempted execution. If this is less than the maximum amount of weight that the message could take to be executed, then no execution attempt will be made. + +### forceDefaultXcmVersion(maybe_xcm_version: `Option`) +- **interface**: `api.tx.polkadotXcm.forceDefaultXcmVersion` +- **summary**: Set a safe XCM version (the version that XCM should be encoded with if the most recent version a destination can accept is unknown). + + - `origin`: Must be an origin specified by AdminOrigin. + + - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable. + +### forceSubscribeVersionNotify(location: `XcmVersionedLocation`) +- **interface**: `api.tx.polkadotXcm.forceSubscribeVersionNotify` +- **summary**: Ask a location to notify us regarding their XCM version and any changes to it. + + - `origin`: Must be an origin specified by AdminOrigin. + + - `location`: The location to which we should subscribe for XCM version notifications. + +### forceSuspension(suspended: `bool`) +- **interface**: `api.tx.polkadotXcm.forceSuspension` +- **summary**: Set or unset the global suspension state of the XCM executor. + + - `origin`: Must be an origin specified by AdminOrigin. + + - `suspended`: `true` to suspend, `false` to resume. + +### forceUnsubscribeVersionNotify(location: `XcmVersionedLocation`) +- **interface**: `api.tx.polkadotXcm.forceUnsubscribeVersionNotify` +- **summary**: Require that a particular destination should no longer notify us regarding any XCM version changes. + + - `origin`: Must be an origin specified by AdminOrigin. + + - `location`: The location to which we are currently subscribed for XCM version notifications which we no longer desire. + +### forceXcmVersion(location: `StagingXcmV5Location`, version: `u32`) +- **interface**: `api.tx.polkadotXcm.forceXcmVersion` +- **summary**: Extoll that a particular destination can be communicated with through a particular version of XCM. + + - `origin`: Must be an origin specified by AdminOrigin. + + - `location`: The destination that is being described. + + - `xcm_version`: The latest version of XCM that `location` supports. + +### limitedReserveTransferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) +- **interface**: `api.tx.polkadotXcm.limitedReserveTransferAssets` +- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve. + + `assets` must have same reserve location and may not be teleportable to `dest`. + + - `assets` have local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + - `assets` have destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + + - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + + - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + + - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + + - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + +### limitedTeleportAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) +- **interface**: `api.tx.polkadotXcm.limitedTeleportAssets` +- **summary**: Teleport some assets from the local chain to some destination chain. + + Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + + - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` chain. + + - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + + - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + +### removeAllAuthorizedAliases() +- **interface**: `api.tx.polkadotXcm.removeAllAuthorizedAliases` +- **summary**: Remove all previously authorized `aliaser`s that can alias into the local `origin` making this call. + +### removeAuthorizedAlias(aliaser: `XcmVersionedLocation`) +- **interface**: `api.tx.polkadotXcm.removeAuthorizedAlias` +- **summary**: Remove a previously authorized `aliaser` from the list of locations that can alias into the local `origin` making this call. + +### reserveTransferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`) +- **interface**: `api.tx.polkadotXcm.reserveTransferAssets` +- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve. + + `assets` must have same reserve location and may not be teleportable to `dest`. + + - `assets` have local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + - `assets` have destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + + - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + **This function is deprecated: Use `limited_reserve_transfer_assets` instead.** + + Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, with all fees taken as needed from the asset. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + + - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + + - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + +### send(dest: `XcmVersionedLocation`, message: `XcmVersionedXcm`) +- **interface**: `api.tx.polkadotXcm.send` + +### teleportAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`) +- **interface**: `api.tx.polkadotXcm.teleportAssets` +- **summary**: Teleport some assets from the local chain to some destination chain. + + **This function is deprecated: Use `limited_teleport_assets` instead.** + + Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, with all fees taken as needed from the asset. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + + - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` chain. + + - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + +### transferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) +- **interface**: `api.tx.polkadotXcm.transferAssets` +- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve, or through teleports. + + Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + + `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable to `dest`, no limitations imposed on `fees`. + + - for local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + - for destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + + - for remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + - for teleports: burn local assets and forward XCM to `dest` chain to mint/teleport assets and deposit them to `beneficiary`. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + + - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + + - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + + - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + +### transferAssetsUsingTypeAndThen(dest: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, assets_transfer_type: `StagingXcmExecutorAssetTransferTransferType`, remote_fees_id: `XcmVersionedAssetId`, fees_transfer_type: `StagingXcmExecutorAssetTransferTransferType`, custom_xcm_on_dest: `XcmVersionedXcm`, weight_limit: `XcmV3WeightLimit`) +- **interface**: `api.tx.polkadotXcm.transferAssetsUsingTypeAndThen` +- **summary**: Transfer assets from the local chain to the destination chain using explicit transfer types for assets and fees. + + `assets` must have same reserve location or may be teleportable to `dest`. Caller must provide the `assets_transfer_type` to be used for `assets`: + + - `TransferType::LocalReserve`: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + + - `TransferType::DestinationReserve`: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + + - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve` chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically the remote `reserve` is Asset Hub. + + - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to mint/teleport assets and deposit them to `beneficiary`. + + On the destination chain, as well as any intermediary hops, `BuyExecution` is used to buy execution using transferred `assets` identified by `remote_fees_id`. Make sure enough of the specified `remote_fees_id` asset is included in the given list of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + + `remote_fees_id` may use different transfer type than rest of `assets` and can be specified through `fees_transfer_type`. + + The caller needs to specify what should happen to the transferred assets once they reach the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which contains the instructions to execute on `dest` as a final step. This is usually as simple as: `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`, but could be something more exotic like sending the `assets` even further. + + - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + + - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from parachain across a bridge to another ecosystem destination. + + - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + + - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`. + + - `remote_fees_id`: One of the included `assets` to be used to pay fees. + + - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets. + + - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the transfer, which also determines what happens to the assets on the destination chain. + + - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + +___ + + +## poolAssets + +### approveTransfer(id: `u32`, delegate: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.approveTransfer` +- **summary**: Approve an amount of asset for transfer by a delegated third-party account. + + Origin must be Signed. + + Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account to `delegate`, then it is topped up or unreserved to meet the right value. + + NOTE: The signing account does not need to own `amount` of assets at the point of making this call. + + - `id`: The identifier of the asset. + + - `delegate`: The account to delegate permission to transfer asset. + + - `amount`: The amount of asset that may be transferred by `delegate`. If there is already an approval in place, then this acts additively. + + Emits `ApprovedTransfer` on success. + + Weight: `O(1)` + +### block(id: `u32`, who: `MultiAddress`) +- **interface**: `api.tx.poolAssets.block` +- **summary**: Disallow further unprivileged transfers of an asset `id` to and from an account `who`. + + Origin must be Signed and the sender should be the Freezer of the asset `id`. + + - `id`: The identifier of the account's asset. + + - `who`: The account to be unblocked. + + Emits `Blocked`. + + Weight: `O(1)` + +### burn(id: `u32`, who: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.burn` +- **summary**: Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. + + Origin must be Signed and the sender should be the Manager of the asset `id`. + + Bails with `NoAccount` if the `who` is already dead. + + - `id`: The identifier of the asset to have some amount burned. + + - `who`: The account to be debited from. + + - `amount`: The maximum amount by which `who`'s balance should be reduced. + + Emits `Burned` with the actual amount burned. If this takes the balance to below the minimum for the asset, then the amount burned is increased to take it to zero. + + Weight: `O(1)` Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. + +### cancelApproval(id: `u32`, delegate: `MultiAddress`) +- **interface**: `api.tx.poolAssets.cancelApproval` +- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. + + Origin must be Signed and there must be an approval in place between signer and `delegate`. + + Unreserves any deposit previously reserved by `approve_transfer` for the approval. + + - `id`: The identifier of the asset. + + - `delegate`: The account delegated permission to transfer asset. + + Emits `ApprovalCancelled` on success. + + Weight: `O(1)` + +### clearMetadata(id: `u32`) +- **interface**: `api.tx.poolAssets.clearMetadata` +- **summary**: Clear the metadata for an asset. + + Origin must be Signed and the sender should be the Owner of the asset `id`. + + Any deposit is freed for the asset owner. + + - `id`: The identifier of the asset to clear. + + Emits `MetadataCleared`. + + Weight: `O(1)` + +### create(id: `u32`, admin: `MultiAddress`, min_balance: `u128`) +- **interface**: `api.tx.poolAssets.create` +- **summary**: Issue a new class of fungible assets from a public origin. + + This new asset class has no assets initially and its owner is the origin. + + The origin must conform to the configured `CreateOrigin` and have sufficient funds free. + + Funds of sender are reserved by `AssetDeposit`. + + Parameters: + + - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + + - `admin`: The admin of this class of assets. The admin is the initial address of each member of the asset class's admin team. + + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + + Emits `Created` event when successful. + + Weight: `O(1)` + +### destroyAccounts(id: `u32`) +- **interface**: `api.tx.poolAssets.destroyAccounts` +- **summary**: Destroy all accounts associated with a given asset. + + `destroy_accounts` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + + Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time. + + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + + Each call emits the `Event::DestroyedAccounts` event. + +### destroyApprovals(id: `u32`) +- **interface**: `api.tx.poolAssets.destroyApprovals` +- **summary**: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit). + + `destroy_approvals` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + + Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time. + + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + + Each call emits the `Event::DestroyedApprovals` event. + +### finishDestroy(id: `u32`) +- **interface**: `api.tx.poolAssets.finishDestroy` +- **summary**: Complete destroying asset and unreserve currency. + + `finish_destroy` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. All accounts or approvals should be destroyed before hand. + + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + + Each successful call emits the `Event::Destroyed` event. + +### forceAssetStatus(id: `u32`, owner: `MultiAddress`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`, min_balance: `Compact`, is_sufficient: `bool`, is_frozen: `bool`) +- **interface**: `api.tx.poolAssets.forceAssetStatus` +- **summary**: Alter the attributes of a given asset. + + Origin must be `ForceOrigin`. + + - `id`: The identifier of the asset. + + - `owner`: The new Owner of this asset. + + - `issuer`: The new Issuer of this asset. + + - `admin`: The new Admin of this asset. + + - `freezer`: The new Freezer of this asset. + + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + + - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient value to account for the state bloat associated with its balance storage. If set to `true`, then non-zero balances may be stored without a `consumer` reference (and thus an ED in the Balances pallet or whatever else is used to control user-account state growth). + + - `is_frozen`: Whether this asset class is frozen except for permissioned/admin instructions. + + Emits `AssetStatusChanged` with the identity of the asset. + + Weight: `O(1)` -### limitedTeleportAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) -- **interface**: `api.tx.polkadotXcm.limitedTeleportAssets` -- **summary**: Teleport some assets from the local chain to some destination chain. +### forceCancelApproval(id: `u32`, owner: `MultiAddress`, delegate: `MultiAddress`) +- **interface**: `api.tx.poolAssets.forceCancelApproval` +- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. - Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + Origin must be either ForceOrigin or Signed origin with the signer being the Admin account of the asset `id`. - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + Unreserves any deposit previously reserved by `approve_transfer` for the approval. - - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + - `id`: The identifier of the asset. - - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + - `delegate`: The account delegated permission to transfer asset. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` chain. + Emits `ApprovalCancelled` on success. - - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + Weight: `O(1)` + +### forceClearMetadata(id: `u32`) +- **interface**: `api.tx.poolAssets.forceClearMetadata` +- **summary**: Clear the metadata for an asset. - - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + Origin must be ForceOrigin. + + Any deposit is returned. + + - `id`: The identifier of the asset to clear. + + Emits `MetadataCleared`. + + Weight: `O(1)` -### removeAllAuthorizedAliases() -- **interface**: `api.tx.polkadotXcm.removeAllAuthorizedAliases` -- **summary**: Remove all previously authorized `aliaser`s that can alias into the local `origin` making this call. +### forceCreate(id: `u32`, owner: `MultiAddress`, is_sufficient: `bool`, min_balance: `Compact`) +- **interface**: `api.tx.poolAssets.forceCreate` +- **summary**: Issue a new class of fungible assets from a privileged origin. + + This new asset class has no assets initially. + + The origin must conform to `ForceOrigin`. + + Unlike `create`, no funds are reserved. + + - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + + - `owner`: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions using `transfer_ownership` and `set_team`. + + - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + + Emits `ForceCreated` event when successful. + + Weight: `O(1)` -### removeAuthorizedAlias(aliaser: `XcmVersionedLocation`) -- **interface**: `api.tx.polkadotXcm.removeAuthorizedAlias` -- **summary**: Remove a previously authorized `aliaser` from the list of locations that can alias into the local `origin` making this call. +### forceSetMetadata(id: `u32`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`, is_frozen: `bool`) +- **interface**: `api.tx.poolAssets.forceSetMetadata` +- **summary**: Force the metadata for an asset to some value. + + Origin must be ForceOrigin. + + Any deposit is left alone. + + - `id`: The identifier of the asset to update. + + - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. + + - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. + + - `decimals`: The number of decimals this asset uses to represent one unit. + + Emits `MetadataSet`. + + Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. -### reserveTransferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`) -- **interface**: `api.tx.polkadotXcm.reserveTransferAssets` -- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve. +### forceTransfer(id: `u32`, source: `MultiAddress`, dest: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.forceTransfer` +- **summary**: Move some assets from one account to another. - `assets` must have same reserve location and may not be teleportable to `dest`. + Origin must be Signed and the sender should be the Admin of the asset `id`. - - `assets` have local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + - `id`: The identifier of the asset to have some amount transferred. - - `assets` have destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + - `source`: The account to be debited. - - `assets` have remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + - `dest`: The account to be credited. - **This function is deprecated: Use `limited_reserve_transfer_assets` instead.** + - `amount`: The amount by which the `source`'s balance of assets should be reduced and `dest`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the `source` balance above zero but below the minimum balance. Must be greater than zero. - Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, with all fees taken as needed from the asset. + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + Weight: `O(1)` Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of `dest`. + +### freeze(id: `u32`, who: `MultiAddress`) +- **interface**: `api.tx.poolAssets.freeze` +- **summary**: Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` must already exist as an entry in `Account`s of the asset. If you want to freeze an account that does not have an entry, use `touch_other` first. - - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + Origin must be Signed and the sender should be the Freezer of the asset `id`. - - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + - `id`: The identifier of the asset to be frozen. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + - `who`: The account to be frozen. - - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + Emits `Frozen`. + + Weight: `O(1)` -### send(dest: `XcmVersionedLocation`, message: `XcmVersionedXcm`) -- **interface**: `api.tx.polkadotXcm.send` +### freezeAsset(id: `u32`) +- **interface**: `api.tx.poolAssets.freezeAsset` +- **summary**: Disallow further unprivileged transfers for the asset class. + + Origin must be Signed and the sender should be the Freezer of the asset `id`. + + - `id`: The identifier of the asset to be frozen. + + Emits `Frozen`. + + Weight: `O(1)` -### teleportAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`) -- **interface**: `api.tx.polkadotXcm.teleportAssets` -- **summary**: Teleport some assets from the local chain to some destination chain. +### mint(id: `u32`, beneficiary: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.mint` +- **summary**: Mint assets of a particular class. - **This function is deprecated: Use `limited_teleport_assets` instead.** + The origin must be Signed and the sender must be the Issuer of the asset `id`. - Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited, with all fees taken as needed from the asset. + - `id`: The identifier of the asset to have some amount minted. + + - `beneficiary`: The account to be credited with the minted assets. + + - `amount`: The amount of the asset to be minted. + + Emits `Issued` event when successful. + + Weight: `O(1)` Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. + +### refund(id: `u32`, allow_burn: `bool`) +- **interface**: `api.tx.poolAssets.refund` +- **summary**: Return the deposit (if any) of an asset account or a consumer reference (if any) of an account. + + The origin must be Signed. + + - `id`: The identifier of the asset for which the caller would like the deposit refunded. + + - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund. + + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. + + Emits `Refunded` event when successful. + +### refundOther(id: `u32`, who: `MultiAddress`) +- **interface**: `api.tx.poolAssets.refundOther` +- **summary**: Return the deposit (if any) of a target asset account. Useful if you are the depositor. + + The origin must be Signed and either the account owner, depositor, or asset `Admin`. In order to burn a non-zero balance of the asset, the caller must be the account and should use `refund`. + + - `id`: The identifier of the asset for the account holding a deposit. + + - `who`: The account to refund. + + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. + + Emits `Refunded` event when successful. + +### setMetadata(id: `u32`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`) +- **interface**: `api.tx.poolAssets.setMetadata` +- **summary**: Set the metadata for an asset. + + Origin must be Signed and the sender should be the Owner of the asset `id`. + + Funds of sender are reserved according to the formula: `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into account any already reserved funds. + + - `id`: The identifier of the asset to update. + + - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. + + - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. + + - `decimals`: The number of decimals this asset uses to represent one unit. + + Emits `MetadataSet`. + + Weight: `O(1)` + +### setMinBalance(id: `u32`, min_balance: `u128`) +- **interface**: `api.tx.poolAssets.setMinBalance` +- **summary**: Sets the minimum balance of an asset. + + Only works if there aren't any accounts that are holding the asset or if the new value of `min_balance` is less than the old one. + + Origin must be Signed and the sender has to be the Owner of the asset `id`. + + - `id`: The identifier of the asset. + + - `min_balance`: The new value of `min_balance`. + + Emits `AssetMinBalanceChanged` event when successful. + +### setTeam(id: `u32`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`) +- **interface**: `api.tx.poolAssets.setTeam` +- **summary**: Change the Issuer, Admin and Freezer of an asset. + + Origin must be Signed and the sender should be the Owner of the asset `id`. + + - `id`: The identifier of the asset to be frozen. + + - `issuer`: The new Issuer of this asset. + + - `admin`: The new Admin of this asset. + + - `freezer`: The new Freezer of this asset. + + Emits `TeamChanged`. + + Weight: `O(1)` + +### startDestroy(id: `u32`) +- **interface**: `api.tx.poolAssets.startDestroy` +- **summary**: Start the process of destroying a fungible asset class. + + `start_destroy` is the first in a series of extrinsics that should be called, to allow destruction of an asset class. + + The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`. + + - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + + It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if an account contains holds or freezes in place. + +### thaw(id: `u32`, who: `MultiAddress`) +- **interface**: `api.tx.poolAssets.thaw` +- **summary**: Allow unprivileged transfers to and from an account again. + + Origin must be Signed and the sender should be the Admin of the asset `id`. + + - `id`: The identifier of the asset to be frozen. + + - `who`: The account to be unfrozen. + + Emits `Thawed`. + + Weight: `O(1)` + +### thawAsset(id: `u32`) +- **interface**: `api.tx.poolAssets.thawAsset` +- **summary**: Allow unprivileged transfers for the asset again. + + Origin must be Signed and the sender should be the Admin of the asset `id`. + + - `id`: The identifier of the asset to be thawed. + + Emits `Thawed`. - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + Weight: `O(1)` + +### touch(id: `u32`) +- **interface**: `api.tx.poolAssets.touch` +- **summary**: Create an asset account for non-provider assets. - - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain. + A deposit will be taken from the signer account. - - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit to be taken. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` chain. + - `id`: The identifier of the asset for the account to be created. - - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + Emits `Touched` event when successful. -### transferAssets(dest: `XcmVersionedLocation`, beneficiary: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, fee_asset_item: `u32`, weight_limit: `XcmV3WeightLimit`) -- **interface**: `api.tx.polkadotXcm.transferAssets` -- **summary**: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve, or through teleports. - - Fee payment on the destination side is made from the asset in the `assets` vector of index `fee_asset_item` (hence referred to as `fees`), up to enough to pay for `weight_limit` of weight. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. +### touchOther(id: `u32`, who: `MultiAddress`) +- **interface**: `api.tx.poolAssets.touchOther` +- **summary**: Create an asset account for `who`. - `assets` (excluding `fees`) must have same reserve location or otherwise be teleportable to `dest`, no limitations imposed on `fees`. + A deposit will be taken from the signer account. - - for local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + - `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account must have sufficient funds for a deposit to be taken. - - for destination reserve: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + - `id`: The identifier of the asset for the account to be created. - - for remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + - `who`: The account to be created. - - for teleports: burn local assets and forward XCM to `dest` chain to mint/teleport assets and deposit them to `beneficiary`. + Emits `Touched` event when successful. + +### transfer(id: `u32`, target: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.transfer` +- **summary**: Move some assets from the sender account to another. - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + Origin must be Signed. - - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send from parachain to parachain, or `X1(Parachain(..))` to send from relay to parachain. + - `id`: The identifier of the asset to have some amount transferred. - - `beneficiary`: A beneficiary location for the assets in the context of `dest`. Will generally be an `AccountId32` value. + - `target`: The account to be credited. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. - - `fee_asset_item`: The index into `assets` of the item which should be used to pay fees. + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. - - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. -### transferAssetsUsingTypeAndThen(dest: `XcmVersionedLocation`, assets: `XcmVersionedAssets`, assets_transfer_type: `StagingXcmExecutorAssetTransferTransferType`, remote_fees_id: `XcmVersionedAssetId`, fees_transfer_type: `StagingXcmExecutorAssetTransferTransferType`, custom_xcm_on_dest: `XcmVersionedXcm`, weight_limit: `XcmV3WeightLimit`) -- **interface**: `api.tx.polkadotXcm.transferAssetsUsingTypeAndThen` -- **summary**: Transfer assets from the local chain to the destination chain using explicit transfer types for assets and fees. +### transferAll(id: `u32`, dest: `MultiAddress`, keep_alive: `bool`) +- **interface**: `api.tx.poolAssets.transferAll` +- **summary**: Transfer the entire transferable balance from the caller asset account. - `assets` must have same reserve location or may be teleportable to `dest`. Caller must provide the `assets_transfer_type` to be used for `assets`: + NOTE: This function only attempts to transfer _transferable_ balances. This means that any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... - - `TransferType::LocalReserve`: transfer assets to sovereign account of destination chain and forward a notification XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. + The dispatch origin of this call must be Signed. - - `TransferType::DestinationReserve`: burn local assets and forward a notification to `dest` chain to withdraw the reserve assets from this chain's sovereign account and deposit them to `beneficiary`. + - `id`: The identifier of the asset for the account holding a deposit. - - `TransferType::RemoteReserve(reserve)`: burn local assets, forward XCM to `reserve` chain to move reserves from this chain's SA to `dest` chain's SA, and forward another XCM to `dest` to mint and deposit reserve-based assets to `beneficiary`. Typically the remote `reserve` is Asset Hub. + - `dest`: The recipient of the transfer. - - `TransferType::Teleport`: burn local assets and forward XCM to `dest` chain to mint/teleport assets and deposit them to `beneficiary`. + - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the asset account has, causing the sender asset account to be killed (false), or transfer everything except at least the minimum balance, which will guarantee to keep the sender asset account alive (true). + +### transferApproved(id: `u32`, owner: `MultiAddress`, destination: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.transferApproved` +- **summary**: Transfer some asset balance from a previously delegated account to some third-party account. - On the destination chain, as well as any intermediary hops, `BuyExecution` is used to buy execution using transferred `assets` identified by `remote_fees_id`. Make sure enough of the specified `remote_fees_id` asset is included in the given list of `assets`. `remote_fees_id` should be enough to pay for `weight_limit`. If more weight is needed than `weight_limit`, then the operation will fail and the sent assets may be at risk. + Origin must be Signed and there must be an approval in place by the `owner` to the signer. - `remote_fees_id` may use different transfer type than rest of `assets` and can be specified through `fees_transfer_type`. + If the entire amount approved for transfer is transferred, then any deposit previously reserved by `approve_transfer` is unreserved. - The caller needs to specify what should happen to the transferred assets once they reach the `dest` chain. This is done through the `custom_xcm_on_dest` parameter, which contains the instructions to execute on `dest` as a final step. This is usually as simple as: `Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])`, but could be something more exotic like sending the `assets` even further. + - `id`: The identifier of the asset. - - `origin`: Must be capable of withdrawing the `assets` and executing XCM. + - `owner`: The account which previously approved for a transfer of at least `amount` and from which the asset balance will be withdrawn. - - `dest`: Destination context for the assets. Will typically be `[Parent, Parachain(..)]` to send from parachain to parachain, or `[Parachain(..)]` to send from relay to parachain, or `(parents: 2, (GlobalConsensus(..), ..))` to send from parachain across a bridge to another ecosystem destination. + - `destination`: The account to which the asset balance of `amount` will be transferred. - - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the `dest` (and possibly reserve) chains. + - `amount`: The amount of assets to transfer. - - `assets_transfer_type`: The XCM `TransferType` used to transfer the `assets`. + Emits `TransferredApproved` on success. - - `remote_fees_id`: One of the included `assets` to be used to pay fees. + Weight: `O(1)` + +### transferKeepAlive(id: `u32`, target: `MultiAddress`, amount: `Compact`) +- **interface**: `api.tx.poolAssets.transferKeepAlive` +- **summary**: Move some assets from the sender account to another, keeping the sender account alive. - - `fees_transfer_type`: The XCM `TransferType` used to transfer the `fees` assets. + Origin must be Signed. - - `custom_xcm_on_dest`: The XCM to be executed on `dest` chain as the last step of the transfer, which also determines what happens to the assets on the destination chain. + - `id`: The identifier of the asset to have some amount transferred. - - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase. + - `target`: The account to be credited. -___ + - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. + Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. -## poolAssets + Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. -### approveTransfer(id: `u32`, delegate: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.approveTransfer` -- **summary**: Approve an amount of asset for transfer by a delegated third-party account. - - Origin must be Signed. - - Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account to `delegate`, then it is topped up or unreserved to meet the right value. +### transferOwnership(id: `u32`, owner: `MultiAddress`) +- **interface**: `api.tx.poolAssets.transferOwnership` +- **summary**: Change the Owner of an asset. - NOTE: The signing account does not need to own `amount` of assets at the point of making this call. + Origin must be Signed and the sender should be the Owner of the asset `id`. - `id`: The identifier of the asset. - - `delegate`: The account to delegate permission to transfer asset. - - - `amount`: The amount of asset that may be transferred by `delegate`. If there is already an approval in place, then this acts additively. + - `owner`: The new Owner of this asset. - Emits `ApprovedTransfer` on success. + Emits `OwnerChanged`. Weight: `O(1)` - -### block(id: `u32`, who: `MultiAddress`) -- **interface**: `api.tx.poolAssets.block` -- **summary**: Disallow further unprivileged transfers of an asset `id` to and from an account `who`. - Origin must be Signed and the sender should be the Freezer of the asset `id`. +___ - - `id`: The identifier of the account's asset. - - `who`: The account to be unblocked. +## preimage + +### ensureUpdated(hashes: `Vec`) +- **interface**: `api.tx.preimage.ensureUpdated` +- **summary**: Ensure that the bulk of pre-images is upgraded. - Emits `Blocked`. + The caller pays no fee if at least 90% of pre-images were successfully updated. + +### notePreimage(bytes: `Bytes`) +- **interface**: `api.tx.preimage.notePreimage` +- **summary**: Register a preimage on-chain. - Weight: `O(1)` + If the preimage was previously requested, no fees or deposits are taken for providing the preimage. Otherwise, a deposit is taken proportional to the size of the preimage. -### burn(id: `u32`, who: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.burn` -- **summary**: Reduce the balance of `who` by as much as possible up to `amount` assets of `id`. +### requestPreimage(hash: `H256`) +- **interface**: `api.tx.preimage.requestPreimage` +- **summary**: Request a preimage be uploaded to the chain without paying any fees or deposits. - Origin must be Signed and the sender should be the Manager of the asset `id`. + If the preimage requests has already been provided on-chain, we unreserve any deposit a user may have paid, and take the control of the preimage out of their hands. + +### unnotePreimage(hash: `H256`) +- **interface**: `api.tx.preimage.unnotePreimage` +- **summary**: Clear an unrequested preimage from the runtime storage. - Bails with `NoAccount` if the `who` is already dead. + If `len` is provided, then it will be a much cheaper operation. - - `id`: The identifier of the asset to have some amount burned. + - `hash`: The hash of the preimage to be removed from the store. - - `who`: The account to be debited from. + - `len`: The length of the preimage of `hash`. + +### unrequestPreimage(hash: `H256`) +- **interface**: `api.tx.preimage.unrequestPreimage` +- **summary**: Clear a previously made request for a preimage. - - `amount`: The maximum amount by which `who`'s balance should be reduced. + NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`. - Emits `Burned` with the actual amount burned. If this takes the balance to below the minimum for the asset, then the amount burned is increased to take it to zero. +___ - Weight: `O(1)` Modes: Post-existence of `who`; Pre & post Zombie-status of `who`. - -### cancelApproval(id: `u32`, delegate: `MultiAddress`) -- **interface**: `api.tx.poolAssets.cancelApproval` -- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. - Origin must be Signed and there must be an approval in place between signer and `delegate`. +## proxy + +### addProxy(delegate: `MultiAddress`, proxy_type: `AssetHubPolkadotRuntimeProxyType`, delay: `u32`) +- **interface**: `api.tx.proxy.addProxy` +- **summary**: Register a proxy account for the sender that is able to make calls on its behalf. - Unreserves any deposit previously reserved by `approve_transfer` for the approval. + The dispatch origin for this call must be _Signed_. - - `id`: The identifier of the asset. + Parameters: - - `delegate`: The account delegated permission to transfer asset. + - `proxy`: The account that the `caller` would like to make a proxy. - Emits `ApprovalCancelled` on success. + - `proxy_type`: The permissions allowed for this proxy account. - Weight: `O(1)` + - `delay`: The announcement period required of the initial proxy. Will generally be zero. -### clearMetadata(id: `u32`) -- **interface**: `api.tx.poolAssets.clearMetadata` -- **summary**: Clear the metadata for an asset. +### announce(real: `MultiAddress`, call_hash: `H256`) +- **interface**: `api.tx.proxy.announce` +- **summary**: Publish the hash of a proxy-call that will be made in the future. - Origin must be Signed and the sender should be the Owner of the asset `id`. + This must be called some number of blocks before the corresponding `proxy` is attempted if the delay associated with the proxy relationship is greater than zero. - Any deposit is freed for the asset owner. + No more than `MaxPending` announcements may be made at any one time. - - `id`: The identifier of the asset to clear. + This will take a deposit of `AnnouncementDepositFactor` as well as `AnnouncementDepositBase` if there are no other pending announcements. - Emits `MetadataCleared`. + The dispatch origin for this call must be _Signed_ and a proxy of `real`. - Weight: `O(1)` + Parameters: + + - `real`: The account that the proxy will make a call on behalf of. + + - `call_hash`: The hash of the call to be made by the `real` account. -### create(id: `u32`, admin: `MultiAddress`, min_balance: `u128`) -- **interface**: `api.tx.poolAssets.create` -- **summary**: Issue a new class of fungible assets from a public origin. +### createPure(proxy_type: `AssetHubPolkadotRuntimeProxyType`, delay: `u32`, index: `u16`) +- **interface**: `api.tx.proxy.createPure` +- **summary**: Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and initialize it with a proxy of `proxy_type` for `origin` sender. - This new asset class has no assets initially and its owner is the origin. + Requires a `Signed` origin. - The origin must conform to the configured `CreateOrigin` and have sufficient funds free. + - `proxy_type`: The type of the proxy that the sender will be registered as over the new account. This will almost always be the most permissive `ProxyType` possible to allow for maximum flexibility. - Funds of sender are reserved by `AssetDeposit`. + - `index`: A disambiguation index, in case this is called multiple times in the same transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just want to use `0`. - Parameters: + - `delay`: The announcement period required of the initial proxy. Will generally be zero. - - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + Fails with `Duplicate` if this has already been called in this transaction, from the same sender, with the same parameters. - - `admin`: The admin of this class of assets. The admin is the initial address of each member of the asset class's admin team. + Fails if there are insufficient funds to pay for deposit. + +### killPure(spawner: `MultiAddress`, proxy_type: `AssetHubPolkadotRuntimeProxyType`, index: `u16`, height: `Compact`, ext_index: `Compact`) +- **interface**: `api.tx.proxy.killPure` +- **summary**: Removes a previously spawned pure proxy. - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + WARNING: **All access to this account will be lost.** Any funds held in it will be inaccessible. - Emits `Created` event when successful. + Requires a `Signed` origin, and the sender account must have been created by a call to `create_pure` with corresponding parameters. - Weight: `O(1)` - -### destroyAccounts(id: `u32`) -- **interface**: `api.tx.poolAssets.destroyAccounts` -- **summary**: Destroy all accounts associated with a given asset. + - `spawner`: The account that originally called `create_pure` to create this account. - `destroy_accounts` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + - `index`: The disambiguation index originally passed to `create_pure`. Probably `0`. - Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time. + - `proxy_type`: The proxy type originally passed to `create_pure`. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + - `height`: The height of the chain when the call to `create_pure` was processed. - Each call emits the `Event::DestroyedAccounts` event. - -### destroyApprovals(id: `u32`) -- **interface**: `api.tx.poolAssets.destroyApprovals` -- **summary**: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit). + - `ext_index`: The extrinsic index in which the call to `create_pure` was processed. - `destroy_approvals` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. + Fails with `NoPermission` in case the caller is not a previously created pure account whose `create_pure` call has corresponding parameters. + +### pokeDeposit() +- **interface**: `api.tx.proxy.pokeDeposit` +- **summary**: Poke / Adjust deposits made for proxies and announcements based on current values. This can be used by accounts to possibly lower their locked amount. - Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time. + The dispatch origin for this call must be _Signed_. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + The transaction fee is waived if the deposit amount has changed. - Each call emits the `Event::DestroyedApprovals` event. + Emits `DepositPoked` if successful. -### finishDestroy(id: `u32`) -- **interface**: `api.tx.poolAssets.finishDestroy` -- **summary**: Complete destroying asset and unreserve currency. +### proxy(real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`) +- **interface**: `api.tx.proxy.proxy` +- **summary**: Dispatch the given `call` from an account that the sender is authorised for through `add_proxy`. - `finish_destroy` should only be called after `start_destroy` has been called, and the asset is in a `Destroying` state. All accounts or approvals should be destroyed before hand. + The dispatch origin for this call must be _Signed_. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + Parameters: - Each successful call emits the `Event::Destroyed` event. + - `real`: The account that the proxy will make a call on behalf of. + + - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + + - `call`: The call to be made by the `real` account. -### forceAssetStatus(id: `u32`, owner: `MultiAddress`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`, min_balance: `Compact`, is_sufficient: `bool`, is_frozen: `bool`) -- **interface**: `api.tx.poolAssets.forceAssetStatus` -- **summary**: Alter the attributes of a given asset. +### proxyAnnounced(delegate: `MultiAddress`, real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`) +- **interface**: `api.tx.proxy.proxyAnnounced` +- **summary**: Dispatch the given `call` from an account that the sender is authorized for through `add_proxy`. - Origin must be `ForceOrigin`. + Removes any corresponding announcement(s). - - `id`: The identifier of the asset. + The dispatch origin for this call must be _Signed_. - - `owner`: The new Owner of this asset. + Parameters: - - `issuer`: The new Issuer of this asset. + - `real`: The account that the proxy will make a call on behalf of. - - `admin`: The new Admin of this asset. + - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. - - `freezer`: The new Freezer of this asset. + - `call`: The call to be made by the `real` account. + +### rejectAnnouncement(delegate: `MultiAddress`, call_hash: `H256`) +- **interface**: `api.tx.proxy.rejectAnnouncement` +- **summary**: Remove the given announcement of a delegate. - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + May be called by a target (proxied) account to remove a call that one of their delegates (`delegate`) has announced they want to execute. The deposit is returned. - - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient value to account for the state bloat associated with its balance storage. If set to `true`, then non-zero balances may be stored without a `consumer` reference (and thus an ED in the Balances pallet or whatever else is used to control user-account state growth). + The dispatch origin for this call must be _Signed_. - - `is_frozen`: Whether this asset class is frozen except for permissioned/admin instructions. + Parameters: - Emits `AssetStatusChanged` with the identity of the asset. + - `delegate`: The account that previously announced the call. - Weight: `O(1)` + - `call_hash`: The hash of the call to be made. -### forceCancelApproval(id: `u32`, owner: `MultiAddress`, delegate: `MultiAddress`) -- **interface**: `api.tx.poolAssets.forceCancelApproval` -- **summary**: Cancel all of some asset approved for delegated transfer by a third-party account. +### removeAnnouncement(real: `MultiAddress`, call_hash: `H256`) +- **interface**: `api.tx.proxy.removeAnnouncement` +- **summary**: Remove a given announcement. - Origin must be either ForceOrigin or Signed origin with the signer being the Admin account of the asset `id`. + May be called by a proxy account to remove a call they previously announced and return the deposit. - Unreserves any deposit previously reserved by `approve_transfer` for the approval. + The dispatch origin for this call must be _Signed_. - - `id`: The identifier of the asset. + Parameters: - - `delegate`: The account delegated permission to transfer asset. + - `real`: The account that the proxy will make a call on behalf of. - Emits `ApprovalCancelled` on success. + - `call_hash`: The hash of the call to be made by the `real` account. + +### removeProxies() +- **interface**: `api.tx.proxy.removeProxies` +- **summary**: Unregister all proxy accounts for the sender. - Weight: `O(1)` + The dispatch origin for this call must be _Signed_. + + WARNING: This may be called on accounts created by `create_pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** -### forceClearMetadata(id: `u32`) -- **interface**: `api.tx.poolAssets.forceClearMetadata` -- **summary**: Clear the metadata for an asset. +### removeProxy(delegate: `MultiAddress`, proxy_type: `AssetHubPolkadotRuntimeProxyType`, delay: `u32`) +- **interface**: `api.tx.proxy.removeProxy` +- **summary**: Unregister a proxy account for the sender. - Origin must be ForceOrigin. + The dispatch origin for this call must be _Signed_. - Any deposit is returned. + Parameters: - - `id`: The identifier of the asset to clear. + - `proxy`: The account that the `caller` would like to remove as a proxy. - Emits `MetadataCleared`. + - `proxy_type`: The permissions currently enabled for the removed proxy account. - Weight: `O(1)` +___ + + +## referenda -### forceCreate(id: `u32`, owner: `MultiAddress`, is_sufficient: `bool`, min_balance: `Compact`) -- **interface**: `api.tx.poolAssets.forceCreate` -- **summary**: Issue a new class of fungible assets from a privileged origin. +### cancel(index: `u32`) +- **interface**: `api.tx.referenda.cancel` +- **summary**: Cancel an ongoing referendum. - This new asset class has no assets initially. + - `origin`: must be the `CancelOrigin`. - The origin must conform to `ForceOrigin`. + - `index`: The index of the referendum to be cancelled. - Unlike `create`, no funds are reserved. + Emits `Cancelled`. + +### kill(index: `u32`) +- **interface**: `api.tx.referenda.kill` +- **summary**: Cancel an ongoing referendum and slash the deposits. - - `id`: The identifier of the new asset. This must not be currently in use to identify an existing asset. If [`NextAssetId`] is set, then this must be equal to it. + - `origin`: must be the `KillOrigin`. - - `owner`: The owner of this class of assets. The owner has full superuser permissions over this asset, but may later change and configure the permissions using `transfer_ownership` and `set_team`. + - `index`: The index of the referendum to be cancelled. - - `min_balance`: The minimum balance of this new asset that any single account must have. If an account's balance is reduced below this, then it collapses to zero. + Emits `Killed` and `DepositSlashed`. + +### nudgeReferendum(index: `u32`) +- **interface**: `api.tx.referenda.nudgeReferendum` +- **summary**: Advance a referendum onto its next logical state. Only used internally. - Emits `ForceCreated` event when successful. + - `origin`: must be `Root`. - Weight: `O(1)` + - `index`: the referendum to be advanced. -### forceSetMetadata(id: `u32`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`, is_frozen: `bool`) -- **interface**: `api.tx.poolAssets.forceSetMetadata` -- **summary**: Force the metadata for an asset to some value. +### oneFewerDeciding(track: `u16`) +- **interface**: `api.tx.referenda.oneFewerDeciding` +- **summary**: Advance a track onto its next logical state. Only used internally. - Origin must be ForceOrigin. + - `origin`: must be `Root`. - Any deposit is left alone. + - `track`: the track to be advanced. - - `id`: The identifier of the asset to update. + Action item for when there is now one fewer referendum in the deciding phase and the `DecidingCount` is not yet updated. This means that we should either: - - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. + - begin deciding another referendum (and leave `DecidingCount` alone); or - - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. + - decrement `DecidingCount`. + +### placeDecisionDeposit(index: `u32`) +- **interface**: `api.tx.referenda.placeDecisionDeposit` +- **summary**: Post the Decision Deposit for a referendum. - - `decimals`: The number of decimals this asset uses to represent one unit. + - `origin`: must be `Signed` and the account must have funds available for the referendum's track's Decision Deposit. - Emits `MetadataSet`. + - `index`: The index of the submitted referendum whose Decision Deposit is yet to be posted. - Weight: `O(N + S)` where N and S are the length of the name and symbol respectively. + Emits `DecisionDepositPlaced`. -### forceTransfer(id: `u32`, source: `MultiAddress`, dest: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.forceTransfer` -- **summary**: Move some assets from one account to another. - - Origin must be Signed and the sender should be the Admin of the asset `id`. +### refundDecisionDeposit(index: `u32`) +- **interface**: `api.tx.referenda.refundDecisionDeposit` +- **summary**: Refund the Decision Deposit for a closed referendum back to the depositor. - - `id`: The identifier of the asset to have some amount transferred. + - `origin`: must be `Signed` or `Root`. - - `source`: The account to be debited. + - `index`: The index of a closed referendum whose Decision Deposit has not yet been refunded. - - `dest`: The account to be credited. + Emits `DecisionDepositRefunded`. + +### refundSubmissionDeposit(index: `u32`) +- **interface**: `api.tx.referenda.refundSubmissionDeposit` +- **summary**: Refund the Submission Deposit for a closed referendum back to the depositor. - - `amount`: The amount by which the `source`'s balance of assets should be reduced and `dest`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the `source` balance above zero but below the minimum balance. Must be greater than zero. + - `origin`: must be `Signed` or `Root`. - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + - `index`: The index of a closed referendum whose Submission Deposit has not yet been refunded. - Weight: `O(1)` Modes: Pre-existence of `dest`; Post-existence of `source`; Account pre-existence of `dest`. + Emits `SubmissionDepositRefunded`. -### freeze(id: `u32`, who: `MultiAddress`) -- **interface**: `api.tx.poolAssets.freeze` -- **summary**: Disallow further unprivileged transfers of an asset `id` from an account `who`. `who` must already exist as an entry in `Account`s of the asset. If you want to freeze an account that does not have an entry, use `touch_other` first. - - Origin must be Signed and the sender should be the Freezer of the asset `id`. +### setMetadata(index: `u32`, maybe_hash: `Option`) +- **interface**: `api.tx.referenda.setMetadata` +- **summary**: Set or clear metadata of a referendum. - - `id`: The identifier of the asset to be frozen. + Parameters: - - `who`: The account to be frozen. + - `origin`: Must be `Signed` by a creator of a referendum or by anyone to clear a metadata of a finished referendum. - Emits `Frozen`. + - `index`: The index of a referendum to set or clear metadata for. - Weight: `O(1)` + - `maybe_hash`: The hash of an on-chain stored preimage. `None` to clear a metadata. -### freezeAsset(id: `u32`) -- **interface**: `api.tx.poolAssets.freezeAsset` -- **summary**: Disallow further unprivileged transfers for the asset class. +### submit(proposal_origin: `AssetHubPolkadotRuntimeOriginCaller`, proposal: `FrameSupportPreimagesBounded`, enactment_moment: `FrameSupportScheduleDispatchTime`) +- **interface**: `api.tx.referenda.submit` +- **summary**: Propose a referendum on a privileged action. - Origin must be Signed and the sender should be the Freezer of the asset `id`. + - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds available. - - `id`: The identifier of the asset to be frozen. + - `proposal_origin`: The origin from which the proposal should be executed. - Emits `Frozen`. + - `proposal`: The proposal. - Weight: `O(1)` - -### mint(id: `u32`, beneficiary: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.mint` -- **summary**: Mint assets of a particular class. + - `enactment_moment`: The moment that the proposal should be enacted. - The origin must be Signed and the sender must be the Issuer of the asset `id`. + Emits `Submitted`. - - `id`: The identifier of the asset to have some amount minted. +___ - - `beneficiary`: The account to be credited with the minted assets. - - `amount`: The amount of the asset to be minted. +## scheduler + +### cancel(when: `u32`, index: `u32`) +- **interface**: `api.tx.scheduler.cancel` +- **summary**: Cancel an anonymously scheduled task. + +### cancelNamed(id: `[u8;32]`) +- **interface**: `api.tx.scheduler.cancelNamed` +- **summary**: Cancel a named scheduled task. + +### cancelRetry(task: `(u32,u32)`) +- **interface**: `api.tx.scheduler.cancelRetry` +- **summary**: Removes the retry configuration of a task. + +### cancelRetryNamed(id: `[u8;32]`) +- **interface**: `api.tx.scheduler.cancelRetryNamed` +- **summary**: Cancel the retry configuration of a named task. + +### schedule(when: `u32`, maybe_periodic: `Option<(u32,u32)>`, priority: `u8`, call: `Call`) +- **interface**: `api.tx.scheduler.schedule` +- **summary**: Anonymously schedule a task. + +### scheduleAfter(after: `u32`, maybe_periodic: `Option<(u32,u32)>`, priority: `u8`, call: `Call`) +- **interface**: `api.tx.scheduler.scheduleAfter` +- **summary**: Anonymously schedule a task after a delay. + +### scheduleNamed(id: `[u8;32]`, when: `u32`, maybe_periodic: `Option<(u32,u32)>`, priority: `u8`, call: `Call`) +- **interface**: `api.tx.scheduler.scheduleNamed` +- **summary**: Schedule a named task. + +### scheduleNamedAfter(id: `[u8;32]`, after: `u32`, maybe_periodic: `Option<(u32,u32)>`, priority: `u8`, call: `Call`) +- **interface**: `api.tx.scheduler.scheduleNamedAfter` +- **summary**: Schedule a named task after a delay. + +### setRetry(task: `(u32,u32)`, retries: `u8`, period: `u32`) +- **interface**: `api.tx.scheduler.setRetry` +- **summary**: Set a retry configuration for a task so that, in case its scheduled run fails, it will be retried after `period` blocks, for a total amount of `retries` retries or until it succeeds. - Emits `Issued` event when successful. + Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. - Weight: `O(1)` Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`. + Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`. -### refund(id: `u32`, allow_burn: `bool`) -- **interface**: `api.tx.poolAssets.refund` -- **summary**: Return the deposit (if any) of an asset account or a consumer reference (if any) of an account. +### setRetryNamed(id: `[u8;32]`, retries: `u8`, period: `u32`) +- **interface**: `api.tx.scheduler.setRetryNamed` +- **summary**: Set a retry configuration for a named task so that, in case its scheduled run fails, it will be retried after `period` blocks, for a total amount of `retries` retries or until it succeeds. - The origin must be Signed. + Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. - - `id`: The identifier of the asset for which the caller would like the deposit refunded. + Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`. - - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund. +___ - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. - Emits `Refunded` event when successful. +## session -### refundOther(id: `u32`, who: `MultiAddress`) -- **interface**: `api.tx.poolAssets.refundOther` -- **summary**: Return the deposit (if any) of a target asset account. Useful if you are the depositor. - - The origin must be Signed and either the account owner, depositor, or asset `Admin`. In order to burn a non-zero balance of the asset, the caller must be the account and should use `refund`. +### purgeKeys() +- **interface**: `api.tx.session.purgeKeys` +- **summary**: Removes any session key(s) of the function caller. - - `id`: The identifier of the asset for the account holding a deposit. + This doesn't take effect until the next session. - - `who`: The account to refund. + The dispatch origin of this function must be Signed and the account must be either be convertible to a validator ID using the chain's typical addressing system (this usually means being a controller account) or directly convertible into a validator ID (which usually means being a stash account). - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if the asset account contains holds or freezes in place. + #### Complexity - Emits `Refunded` event when successful. + - `O(1)` in number of key types. Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. -### setMetadata(id: `u32`, name: `Bytes`, symbol: `Bytes`, decimals: `u8`) -- **interface**: `api.tx.poolAssets.setMetadata` -- **summary**: Set the metadata for an asset. +### setKeys(keys: `AssetHubPolkadotRuntimeSessionKeys`, proof: `Bytes`) +- **interface**: `api.tx.session.setKeys` +- **summary**: 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. - Origin must be Signed and the sender should be the Owner of the asset `id`. + The dispatch origin of this function must be signed. - Funds of sender are reserved according to the formula: `MetadataDepositBase + MetadataDepositPerByte * (name.len + symbol.len)` taking into account any already reserved funds. + #### Complexity - - `id`: The identifier of the asset to update. + - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. - - `name`: The user friendly name of this asset. Limited in length by `StringLimit`. +___ - - `symbol`: The exchange symbol for this asset. Limited in length by `StringLimit`. - - `decimals`: The number of decimals this asset uses to represent one unit. +## snowbridgeSystemFrontend + +### addTip(message_id: `SnowbridgeCoreRewardMessageId`, asset: `StagingXcmV5Asset`) +- **interface**: `api.tx.snowbridgeSystemFrontend.addTip` +- **summary**: Add an additional relayer tip for a committed message identified by `message_id`. The tip asset will be swapped for ether. + +### registerToken(asset_id: `XcmVersionedLocation`, metadata: `SnowbridgeCoreAssetMetadata`, fee_asset: `StagingXcmV5Asset`) +- **interface**: `api.tx.snowbridgeSystemFrontend.registerToken` +- **summary**: Initiates the registration for a Polkadot-native token as a wrapped ERC20 token on Ethereum. - Emits `MetadataSet`. + - `asset_id`: Location of the asset - Weight: `O(1)` + - `metadata`: Metadata to include in the instantiated ERC20 contract on Ethereum + + All origins are allowed, however `asset_id` must be a location nested within the origin consensus system. -### setMinBalance(id: `u32`, min_balance: `u128`) -- **interface**: `api.tx.poolAssets.setMinBalance` -- **summary**: Sets the minimum balance of an asset. +### setOperatingMode(mode: `SnowbridgeCoreOperatingModeBasicOperatingMode`) +- **interface**: `api.tx.snowbridgeSystemFrontend.setOperatingMode` +- **summary**: Set the operating mode for exporting messages to Ethereum. - Only works if there aren't any accounts that are holding the asset or if the new value of `min_balance` is less than the old one. +___ - Origin must be Signed and the sender has to be the Owner of the asset `id`. - - `id`: The identifier of the asset. +## staking + +### applySlash(slash_era: `u32`, slash_key: `(AccountId32,Perbill,u32)`) +- **interface**: `api.tx.staking.applySlash` +- **summary**: Manually and permissionlessly applies a deferred slash for a given era. - - `min_balance`: The new value of `min_balance`. + Normally, slashes are automatically applied shortly after the start of the `slash_era`. The automatic application of slashes is handled by the pallet's internal logic, and it tries to apply one slash page per block of the era. If for some reason, one era is not enough for applying all slash pages, the remaining slashes need to be manually (permissionlessly) applied. - Emits `AssetMinBalanceChanged` event when successful. - -### setTeam(id: `u32`, issuer: `MultiAddress`, admin: `MultiAddress`, freezer: `MultiAddress`) -- **interface**: `api.tx.poolAssets.setTeam` -- **summary**: Change the Issuer, Admin and Freezer of an asset. + For a given era x, if at era x+1, slashes are still unapplied, all withdrawals get blocked, and these need to be manually applied by calling this function. This function exists as a **fallback mechanism** for this extreme situation, but we never expect to encounter this in normal scenarios. - Origin must be Signed and the sender should be the Owner of the asset `id`. + The parameters for this call can be queried by looking at the `UnappliedSlashes` storage for eras older than the active era. - - `id`: The identifier of the asset to be frozen. + #### Parameters - - `issuer`: The new Issuer of this asset. + - `slash_era`: The staking era in which the slash was originally scheduled. - - `admin`: The new Admin of this asset. + - `slash_key`: A unique identifier for the slash, represented as a tuple: - - `freezer`: The new Freezer of this asset. + - `stash`: The stash account of the validator being slashed. - Emits `TeamChanged`. + - `slash_fraction`: The fraction of the stake that was slashed. - Weight: `O(1)` - -### startDestroy(id: `u32`) -- **interface**: `api.tx.poolAssets.startDestroy` -- **summary**: Start the process of destroying a fungible asset class. + - `page_index`: The index of the exposure page being processed. - `start_destroy` is the first in a series of extrinsics that should be called, to allow destruction of an asset class. + #### Behavior - The origin must conform to `ForceOrigin` or must be `Signed` by the asset's `owner`. + - The function is **permissionless**—anyone can call it. - - `id`: The identifier of the asset to be destroyed. This must identify an existing asset. + - The `slash_era` **must be the current era or a past era**. If it is in the future, the call fails with `EraNotStarted`. - It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if an account contains holds or freezes in place. - -### thaw(id: `u32`, who: `MultiAddress`) -- **interface**: `api.tx.poolAssets.thaw` -- **summary**: Allow unprivileged transfers to and from an account again. + - The fee is waived if the slash is successfully applied. - Origin must be Signed and the sender should be the Admin of the asset `id`. + #### Future Improvement - - `id`: The identifier of the asset to be frozen. + - Implement an **off-chain worker (OCW) task** to automatically apply slashes when there is unused block space, improving efficiency. + +### bond(value: `Compact`, payee: `PalletStakingAsyncRewardDestination`) +- **interface**: `api.tx.staking.bond` +- **summary**: Take the origin account as a stash and lock up `value` of its balance. `controller` will be the account that controls it. - - `who`: The account to be unfrozen. + `value` must be more than the `minimum_balance` specified by `T::Currency`. - Emits `Thawed`. + The dispatch origin for this call must be _Signed_ by the stash account. - Weight: `O(1)` - -### thawAsset(id: `u32`) -- **interface**: `api.tx.poolAssets.thawAsset` -- **summary**: Allow unprivileged transfers for the asset again. + Emits `Bonded`. - Origin must be Signed and the sender should be the Admin of the asset `id`. + NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned unless the `origin` falls below _existential deposit_ (or equal to 0) and gets removed as dust. + +### bondExtra(max_additional: `Compact`) +- **interface**: `api.tx.staking.bondExtra` +- **summary**: Add some extra amount that have appeared in the stash `free_balance` into the balance up for staking. - - `id`: The identifier of the asset to be thawed. + The dispatch origin for this call must be _Signed_ by the stash, not the controller. - Emits `Thawed`. + Use this if there are additional funds in your stash account that you wish to bond. Unlike [`bond`](Self::bond) or [`unbond`](Self::unbond) this function does not impose any limitation on the amount that can be added. - Weight: `O(1)` + Emits `Bonded`. -### touch(id: `u32`) -- **interface**: `api.tx.poolAssets.touch` -- **summary**: Create an asset account for non-provider assets. +### cancelDeferredSlash(era: `u32`, validator_slashes: `Vec<(AccountId32,Perbill)>`) +- **interface**: `api.tx.staking.cancelDeferredSlash` +- **summary**: Cancels scheduled slashes for a given era before they are applied. - A deposit will be taken from the signer account. + This function allows `T::AdminOrigin` to cancel pending slashes for specified validators in a given era. The cancelled slashes are stored and will be checked when applying slashes. - - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit to be taken. + #### Parameters - - `id`: The identifier of the asset for the account to be created. + - `era`: The staking era for which slashes should be cancelled. This is the era where the slash would be applied, not the era in which the offence was committed. - Emits `Touched` event when successful. + - `validator_slashes`: A list of validator stash accounts and their slash fractions to be cancelled. -### touchOther(id: `u32`, who: `MultiAddress`) -- **interface**: `api.tx.poolAssets.touchOther` -- **summary**: Create an asset account for `who`. +### chill() +- **interface**: `api.tx.staking.chill` +- **summary**: Declare no desire to either validate or nominate. - A deposit will be taken from the signer account. + Effects will be felt at the beginning of the next era. - - `origin`: Must be Signed by `Freezer` or `Admin` of the asset `id`; the signer account must have sufficient funds for a deposit to be taken. + The dispatch origin for this call must be _Signed_ by the controller, not the stash. - - `id`: The identifier of the asset for the account to be created. + #### Complexity - - `who`: The account to be created. + - Independent of the arguments. Insignificant complexity. - Emits `Touched` event when successful. - -### transfer(id: `u32`, target: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.transfer` -- **summary**: Move some assets from the sender account to another. + - Contains one read. - Origin must be Signed. + - Writes are limited to the `origin` account key. + +### chillOther(stash: `AccountId32`) +- **interface**: `api.tx.staking.chillOther` +- **summary**: Declare a `controller` to stop participating as either a validator or nominator. - - `id`: The identifier of the asset to have some amount transferred. + Effects will be felt at the beginning of the next era. - - `target`: The account to be credited. + The dispatch origin for this call must be _Signed_, but can be called by anyone. - - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. + If the caller is the same as the controller being targeted, then no further checks are enforced, and this function behaves just like `chill`. - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + If the caller is different than the controller being targeted, the following conditions must be met: - Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. - -### transferAll(id: `u32`, dest: `MultiAddress`, keep_alive: `bool`) -- **interface**: `api.tx.poolAssets.transferAll` -- **summary**: Transfer the entire transferable balance from the caller asset account. + * `controller` must belong to a nominator who has become non-decodable, - NOTE: This function only attempts to transfer _transferable_ balances. This means that any held, frozen, or minimum balance (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... + Or: - The dispatch origin of this call must be Signed. + * A `ChillThreshold` must be set and checked which defines how close to the max nominators or validators we must reach before users can start chilling one-another. - - `id`: The identifier of the asset for the account holding a deposit. + * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine how close we are to the threshold. - - `dest`: The recipient of the transfer. + * A `MinNominatorBond` and `MinValidatorBond` must be set and checked, which determines if this is a person that should be chilled because they have not met the threshold bond required. - - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the asset account has, causing the sender asset account to be killed (false), or transfer everything except at least the minimum balance, which will guarantee to keep the sender asset account alive (true). + This can be helpful if bond requirements are updated, and we need to remove old users who do not satisfy these requirements. -### transferApproved(id: `u32`, owner: `MultiAddress`, destination: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.transferApproved` -- **summary**: Transfer some asset balance from a previously delegated account to some third-party account. +### deprecateControllerBatch(controllers: `Vec`) +- **interface**: `api.tx.staking.deprecateControllerBatch` +- **summary**: Updates a batch of controller accounts to their corresponding stash account if they are not the same. Ignores any controller accounts that do not exist, and does not operate if the stash and controller are already the same. - Origin must be Signed and there must be an approval in place by the `owner` to the signer. + Effects will be felt instantly (as soon as this function is completed successfully). - If the entire amount approved for transfer is transferred, then any deposit previously reserved by `approve_transfer` is unreserved. + The dispatch origin must be `T::AdminOrigin`. + +### forceApplyMinCommission(validator_stash: `AccountId32`) +- **interface**: `api.tx.staking.forceApplyMinCommission` +- **summary**: Force a validator to have at least the minimum commission. This will not affect a validator who already has a commission greater than or equal to the minimum. Any account can call this. + +### forceNewEra() +- **interface**: `api.tx.staking.forceNewEra` +- **summary**: Force there to be a new era at the end of the next session. After this, it will be reset to normal (non-forced) behaviour. - - `id`: The identifier of the asset. + The dispatch origin must be Root. - - `owner`: The account which previously approved for a transfer of at least `amount` and from which the asset balance will be withdrawn. + #### Warning - - `destination`: The account to which the asset balance of `amount` will be transferred. + The election process starts multiple blocks before the end of the era. If this is called just before a new era is triggered, the election process may not have enough blocks to get a result. + +### forceNewEraAlways() +- **interface**: `api.tx.staking.forceNewEraAlways` +- **summary**: Force there to be a new era at the end of sessions indefinitely. - - `amount`: The amount of assets to transfer. + The dispatch origin must be Root. - Emits `TransferredApproved` on success. + #### Warning - Weight: `O(1)` + The election process starts multiple blocks before the end of the era. If this is called just before a new era is triggered, the election process may not have enough blocks to get a result. -### transferKeepAlive(id: `u32`, target: `MultiAddress`, amount: `Compact`) -- **interface**: `api.tx.poolAssets.transferKeepAlive` -- **summary**: Move some assets from the sender account to another, keeping the sender account alive. +### forceNoEras() +- **interface**: `api.tx.staking.forceNoEras` +- **summary**: Force there to be no new eras indefinitely. - Origin must be Signed. + The dispatch origin must be Root. - - `id`: The identifier of the asset to have some amount transferred. + #### Warning - - `target`: The account to be credited. + The election process starts multiple blocks before the end of the era. Thus the election process may be ongoing when this is called. In this case the election will continue until the next era is triggered. + +### forceUnstake(stash: `AccountId32`, num_slashing_spans: `u32`) +- **interface**: `api.tx.staking.forceUnstake` +- **summary**: Force a current staker to become completely unstaked, immediately. - - `amount`: The amount by which the sender's balance of assets should be reduced and `target`'s balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take the sender balance above zero but below the minimum balance. Must be greater than zero. + The dispatch origin must be Root. #### Parameters - Emits `Transferred` with the actual amount transferred. If this takes the source balance to below the minimum for the asset, then the amount transferred is increased to take it to zero. + - `stash`: The stash account to be unstaked. - Weight: `O(1)` Modes: Pre-existence of `target`; Post-existence of sender; Account pre-existence of `target`. + - `num_slashing_spans`: **Deprecated**. This parameter is retained for backward compatibility. It no longer has any effect. -### transferOwnership(id: `u32`, owner: `MultiAddress`) -- **interface**: `api.tx.poolAssets.transferOwnership` -- **summary**: Change the Owner of an asset. +### increaseValidatorCount(additional: `Compact`) +- **interface**: `api.tx.staking.increaseValidatorCount` +- **summary**: Increments the ideal number of validators up to maximum of `T::MaxValidatorSet`. - Origin must be Signed and the sender should be the Owner of the asset `id`. + The dispatch origin must be Root. + +### kick(who: `Vec`) +- **interface**: `api.tx.staking.kick` +- **summary**: Remove the given nominations from the calling validator. - - `id`: The identifier of the asset. + Effects will be felt at the beginning of the next era. - - `owner`: The new Owner of this asset. + The dispatch origin for this call must be _Signed_ by the controller, not the stash. - Emits `OwnerChanged`. + - `who`: A list of nominator stash accounts who are nominating this validator which should no longer be nominating this validator. - Weight: `O(1)` + Note: Making this call only makes sense if you first set the validator preferences to block any further nominations. + +### migrateCurrency(stash: `AccountId32`) +- **interface**: `api.tx.staking.migrateCurrency` +- **summary**: Migrates permissionlessly a stash from locks to holds. -___ + This removes the old lock on the stake and creates a hold on it atomically. If all stake cannot be held, the best effort is made to hold as much as possible. The remaining stake is removed from the ledger. + + The fee is waived if the migration is successful. + +### nominate(targets: `Vec`) +- **interface**: `api.tx.staking.nominate` +- **summary**: Declare the desire to nominate `targets` for the origin controller. + Effects will be felt at the beginning of the next era. -## proxy + The dispatch origin for this call must be _Signed_ by the controller, not the stash. -### addProxy(delegate: `MultiAddress`, proxy_type: `AssetHubPolkadotRuntimeProxyType`, delay: `u32`) -- **interface**: `api.tx.proxy.addProxy` -- **summary**: Register a proxy account for the sender that is able to make calls on its behalf. +### payoutStakers(validator_stash: `AccountId32`, era: `u32`) +- **interface**: `api.tx.staking.payoutStakers` +- **summary**: Pay out next page of the stakers behind a validator for the given era. - The dispatch origin for this call must be _Signed_. + - `validator_stash` is the stash account of the validator. - Parameters: + - `era` may be any era between `[current_era - history_depth; current_era]`. - - `proxy`: The account that the `caller` would like to make a proxy. + The origin of this call must be _Signed_. Any account can call this function, even if it is not one of the stakers. - - `proxy_type`: The permissions allowed for this proxy account. + The reward payout could be paged in case there are too many nominators backing the `validator_stash`. This call will payout unpaid pages in an ascending order. To claim a specific page, use `payout_stakers_by_page`.` - - `delay`: The announcement period required of the initial proxy. Will generally be zero. + If all pages are claimed, it returns an error `InvalidPage`. -### announce(real: `MultiAddress`, call_hash: `H256`) -- **interface**: `api.tx.proxy.announce` -- **summary**: Publish the hash of a proxy-call that will be made in the future. +### payoutStakersByPage(validator_stash: `AccountId32`, era: `u32`, page: `u32`) +- **interface**: `api.tx.staking.payoutStakersByPage` +- **summary**: Pay out a page of the stakers behind a validator for the given era and page. - This must be called some number of blocks before the corresponding `proxy` is attempted if the delay associated with the proxy relationship is greater than zero. + - `validator_stash` is the stash account of the validator. - No more than `MaxPending` announcements may be made at any one time. + - `era` may be any era between `[current_era - history_depth; current_era]`. - This will take a deposit of `AnnouncementDepositFactor` as well as `AnnouncementDepositBase` if there are no other pending announcements. + - `page` is the page index of nominators to pay out with value between 0 and `num_nominators / T::MaxExposurePageSize`. - The dispatch origin for this call must be _Signed_ and a proxy of `real`. + The origin of this call must be _Signed_. Any account can call this function, even if it is not one of the stakers. - Parameters: + If a validator has more than [`Config::MaxExposurePageSize`] nominators backing them, then the list of nominators is paged, with each page being capped at [`Config::MaxExposurePageSize`.] If a validator has more than one page of nominators, the call needs to be made for each page separately in order for all the nominators backing a validator to receive the reward. The nominators are not sorted across pages and so it should not be assumed the highest staker would be on the topmost page and vice versa. If rewards are not claimed in [`Config::HistoryDepth`] eras, they are lost. + +### pruneEraStep(era: `u32`) +- **interface**: `api.tx.staking.pruneEraStep` +- **summary**: Perform one step of era pruning to prevent PoV size exhaustion from unbounded deletions. - - `real`: The account that the proxy will make a call on behalf of. + This extrinsic enables permissionless lazy pruning of era data by performing incremental deletion of storage items. Each call processes a limited number of items based on available block weight to avoid exceeding block limits. - - `call_hash`: The hash of the call to be made by the `real` account. + Returns `Pays::No` when work is performed to incentivize regular maintenance. Anyone can call this to help maintain the chain's storage health. + + The era must be eligible for pruning (older than HistoryDepth + 1). Check `EraPruningState` storage to see if an era needs pruning before calling. -### createPure(proxy_type: `AssetHubPolkadotRuntimeProxyType`, delay: `u32`, index: `u16`) -- **interface**: `api.tx.proxy.createPure` -- **summary**: Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and initialize it with a proxy of `proxy_type` for `origin` sender. +### reapStash(stash: `AccountId32`, num_slashing_spans: `u32`) +- **interface**: `api.tx.staking.reapStash` +- **summary**: Remove all data structures concerning a staker/stash once it is at a state where it can be considered `dust` in the staking system. The requirements are: - Requires a `Signed` origin. + 1. the `total_balance` of the stash is below `min_chilled_bond` or is zero. 2. or, the `ledger.total` of the stash is below `min_chilled_bond` or is zero. - - `proxy_type`: The type of the proxy that the sender will be registered as over the new account. This will almost always be the most permissive `ProxyType` possible to allow for maximum flexibility. + The former can happen in cases like a slash; the latter when a fully unbonded account is still receiving staking rewards in `RewardDestination::Staked`. - - `index`: A disambiguation index, in case this is called multiple times in the same transaction (e.g. with `utility::batch`). Unless you're using `batch` you probably just want to use `0`. + It can be called by anyone, as long as `stash` meets the above requirements. - - `delay`: The announcement period required of the initial proxy. Will generally be zero. + Refunds the transaction fees upon successful execution. - Fails with `Duplicate` if this has already been called in this transaction, from the same sender, with the same parameters. + #### Parameters - Fails if there are insufficient funds to pay for deposit. + - `stash`: The stash account to be reaped. + + - `num_slashing_spans`: **Deprecated**. This parameter is retained for backward compatibility. It no longer has any effect. -### killPure(spawner: `MultiAddress`, proxy_type: `AssetHubPolkadotRuntimeProxyType`, index: `u16`, height: `Compact`, ext_index: `Compact`) -- **interface**: `api.tx.proxy.killPure` -- **summary**: Removes a previously spawned pure proxy. +### rebond(value: `Compact`) +- **interface**: `api.tx.staking.rebond` +- **summary**: Rebond a portion of the stash scheduled to be unlocked. - WARNING: **All access to this account will be lost.** Any funds held in it will be inaccessible. + The dispatch origin must be signed by the controller. + +### restoreLedger(stash: `AccountId32`, maybe_controller: `Option`, maybe_total: `Option`, maybe_unlocking: `Option>`) +- **interface**: `api.tx.staking.restoreLedger` +- **summary**: Restores the state of a ledger which is in an inconsistent state. - Requires a `Signed` origin, and the sender account must have been created by a call to `pure` with corresponding parameters. + The requirements to restore a ledger are the following: - - `spawner`: The account that originally called `pure` to create this account. + * The stash is bonded; or - - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + * The stash is not bonded but it has a staking lock left behind; or - - `proxy_type`: The proxy type originally passed to `pure`. + * If the stash has an associated ledger and its state is inconsistent; or - - `height`: The height of the chain when the call to `pure` was processed. + * If the ledger is not corrupted *but* its staking lock is out of sync. - - `ext_index`: The extrinsic index in which the call to `pure` was processed. + The `maybe_*` input parameters will overwrite the corresponding data and metadata of the ledger associated with the stash. If the input parameters are not set, the ledger will be reset values from on-chain state. + +### scaleValidatorCount(factor: `Percent`) +- **interface**: `api.tx.staking.scaleValidatorCount` +- **summary**: Scale up the ideal number of validators by a factor up to maximum of `T::MaxValidatorSet`. - Fails with `NoPermission` in case the caller is not a previously created pure account whose `pure` call has corresponding parameters. + The dispatch origin must be Root. -### pokeDeposit() -- **interface**: `api.tx.proxy.pokeDeposit` -- **summary**: Poke / Adjust deposits made for proxies and announcements based on current values. This can be used by accounts to possibly lower their locked amount. +### setController() +- **interface**: `api.tx.staking.setController` +- **summary**: (Re-)sets the controller of a stash to the stash itself. This function previously accepted a `controller` argument to set the controller to an account other than the stash itself. This functionality has now been removed, now only setting the controller to the stash, if it is not already. - The dispatch origin for this call must be _Signed_. + Effects will be felt instantly (as soon as this function is completed successfully). - The transaction fee is waived if the deposit amount has changed. + The dispatch origin for this call must be _Signed_ by the stash, not the controller. + +### setInvulnerables(invulnerables: `Vec`) +- **interface**: `api.tx.staking.setInvulnerables` +- **summary**: Set the validators who cannot be slashed (if any). - Emits `DepositPoked` if successful. + The dispatch origin must be Root. -### proxy(real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`) -- **interface**: `api.tx.proxy.proxy` -- **summary**: Dispatch the given `call` from an account that the sender is authorised for through `add_proxy`. +### setMinCommission(new: `Perbill`) +- **interface**: `api.tx.staking.setMinCommission` +- **summary**: Sets the minimum amount of commission that each validators must maintain. - The dispatch origin for this call must be _Signed_. + This call has lower privilege requirements than `set_staking_config` and can be called by the `T::AdminOrigin`. Root can always call this. + +### setPayee(payee: `PalletStakingAsyncRewardDestination`) +- **interface**: `api.tx.staking.setPayee` +- **summary**: (Re-)set the payment target for a controller. - Parameters: + Effects will be felt instantly (as soon as this function is completed successfully). - - `real`: The account that the proxy will make a call on behalf of. + The dispatch origin for this call must be _Signed_ by the controller, not the stash. + +### setStakingConfigs(min_nominator_bond: `PalletStakingAsyncPalletConfigOpU128`, min_validator_bond: `PalletStakingAsyncPalletConfigOpU128`, max_nominator_count: `PalletStakingAsyncPalletConfigOpU32`, max_validator_count: `PalletStakingAsyncPalletConfigOpU32`, chill_threshold: `PalletStakingAsyncPalletConfigOpPercent`, min_commission: `PalletStakingAsyncPalletConfigOpPerbill`, max_staked_rewards: `PalletStakingAsyncPalletConfigOpPercent`) +- **interface**: `api.tx.staking.setStakingConfigs` +- **summary**: Update the various staking configurations . - - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + * `min_nominator_bond`: The minimum active bond needed to be a nominator. - - `call`: The call to be made by the `real` account. - -### proxyAnnounced(delegate: `MultiAddress`, real: `MultiAddress`, force_proxy_type: `Option`, call: `Call`) -- **interface**: `api.tx.proxy.proxyAnnounced` -- **summary**: Dispatch the given `call` from an account that the sender is authorized for through `add_proxy`. + * `min_validator_bond`: The minimum active bond needed to be a validator. - Removes any corresponding announcement(s). + * `max_nominator_count`: The max number of users who can be a nominator at once. When set to `None`, no limit is enforced. - The dispatch origin for this call must be _Signed_. + * `max_validator_count`: The max number of users who can be a validator at once. When set to `None`, no limit is enforced. - Parameters: + * `chill_threshold`: The ratio of `max_nominator_count` or `max_validator_count` which should be filled in order for the `chill_other` transaction to work. - - `real`: The account that the proxy will make a call on behalf of. + * `min_commission`: The minimum amount of commission that each validators must maintain. This is checked only upon calling `validate`. Existing validators are not affected. - - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call. + RuntimeOrigin must be Root to call this function. - - `call`: The call to be made by the `real` account. + NOTE: Existing nominators and validators will not be affected by this update. to kick people under the new limits, `chill_other` should be called. -### rejectAnnouncement(delegate: `MultiAddress`, call_hash: `H256`) -- **interface**: `api.tx.proxy.rejectAnnouncement` -- **summary**: Remove the given announcement of a delegate. - - May be called by a target (proxied) account to remove a call that one of their delegates (`delegate`) has announced they want to execute. The deposit is returned. +### setValidatorCount(new: `Compact`) +- **interface**: `api.tx.staking.setValidatorCount` +- **summary**: Sets the ideal number of validators. - The dispatch origin for this call must be _Signed_. + The dispatch origin must be Root. + +### unbond(value: `Compact`) +- **interface**: `api.tx.staking.unbond` +- **summary**: Schedule a portion of the stash to be unlocked ready for transfer out after the bond period ends. If this leaves an amount actively bonded less than [`asset::existential_deposit`], then it is increased to the full amount. - Parameters: + The dispatch origin for this call must be _Signed_ by the controller, not the stash. - - `delegate`: The account that previously announced the call. + Once the unlock period is done, you can call `withdraw_unbonded` to actually move the funds out of management ready for transfer. - - `call_hash`: The hash of the call to be made. - -### removeAnnouncement(real: `MultiAddress`, call_hash: `H256`) -- **interface**: `api.tx.proxy.removeAnnouncement` -- **summary**: Remove a given announcement. + No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`) can co-exists at the same time. If there are no unlocking chunks slots available [`Call::withdraw_unbonded`] is called to remove some of the chunks (if possible). - May be called by a proxy account to remove a call they previously announced and return the deposit. + If a user encounters the `InsufficientBond` error when calling this extrinsic, they should call `chill` first in order to free up their bonded funds. - The dispatch origin for this call must be _Signed_. + Emits `Unbonded`. - Parameters: + See also [`Call::withdraw_unbonded`]. + +### updatePayee(controller: `AccountId32`) +- **interface**: `api.tx.staking.updatePayee` +- **summary**: Migrates an account's `RewardDestination::Controller` to `RewardDestination::Account(controller)`. - - `real`: The account that the proxy will make a call on behalf of. + Effects will be felt instantly (as soon as this function is completed successfully). - - `call_hash`: The hash of the call to be made by the `real` account. + This will waive the transaction fee if the `payee` is successfully migrated. -### removeProxies() -- **interface**: `api.tx.proxy.removeProxies` -- **summary**: Unregister all proxy accounts for the sender. +### validate(prefs: `PalletStakingAsyncValidatorPrefs`) +- **interface**: `api.tx.staking.validate` +- **summary**: Declare the desire to validate for the origin controller. - The dispatch origin for this call must be _Signed_. + Effects will be felt at the beginning of the next era. - WARNING: This may be called on accounts created by `pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** + The dispatch origin for this call must be _Signed_ by the controller, not the stash. -### removeProxy(delegate: `MultiAddress`, proxy_type: `AssetHubPolkadotRuntimeProxyType`, delay: `u32`) -- **interface**: `api.tx.proxy.removeProxy` -- **summary**: Unregister a proxy account for the sender. - - The dispatch origin for this call must be _Signed_. +### withdrawUnbonded(num_slashing_spans: `u32`) +- **interface**: `api.tx.staking.withdrawUnbonded` +- **summary**: Remove any stake that has been fully unbonded and is ready for withdrawal. - Parameters: + Stake is considered fully unbonded once [`Config::BondingDuration`] has elapsed since the unbonding was initiated. In rare cases—such as when offences for the unbonded era have been reported but not yet processed—withdrawal is restricted to eras for which all offences have been processed. - - `proxy`: The account that the `caller` would like to remove as a proxy. + The unlocked stake will be returned as free balance in the stash account. - - `proxy_type`: The permissions currently enabled for the removed proxy account. + The dispatch origin for this call must be _Signed_ by the controller. -___ + Emits `Withdrawn`. + See also [`Call::unbond`]. -## session - -### purgeKeys() -- **interface**: `api.tx.session.purgeKeys` -- **summary**: Removes any session key(s) of the function caller. + #### Parameters - This doesn't take effect until the next session. + - `num_slashing_spans`: **Deprecated**. Retained only for backward compatibility; this parameter has no effect. - The dispatch origin of this function must be Signed and the account must be either be convertible to a validator ID using the chain's typical addressing system (this usually means being a controller account) or directly convertible into a validator ID (which usually means being a stash account). +___ - #### Complexity - - `O(1)` in number of key types. Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. +## stakingRcClient -### setKeys(keys: `AssetHubPolkadotRuntimeSessionKeys`, proof: `Bytes`) -- **interface**: `api.tx.session.setKeys` -- **summary**: 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. - - The dispatch origin of this function must be signed. - - #### Complexity - - - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is fixed. +### relayNewOffencePaged(offences: `Vec<(u32,PalletStakingAsyncRcClientOffence)>`) +- **interface**: `api.tx.stakingRcClient.relayNewOffencePaged` + +### relaySessionReport(report: `PalletStakingAsyncRcClientSessionReport`) +- **interface**: `api.tx.stakingRcClient.relaySessionReport` +- **summary**: Called to indicate the start of a new session on the relay chain. ___ @@ -3168,6 +4993,9 @@ ___ This call requires Root origin. +### doTask(task: `AssetHubPolkadotRuntimeRuntimeTask`) +- **interface**: `api.tx.system.doTask` + ### killPrefix(prefix: `Bytes`, subkeys: `u32`) - **interface**: `api.tx.system.killPrefix` - **summary**: Kill all storage items with a key that starts with the given prefix. @@ -3243,6 +5071,141 @@ ___ ___ +## treasury + +### checkStatus(index: `u32`) +- **interface**: `api.tx.treasury.checkStatus` +- **summary**: Check the status of the spend and remove it from the storage if processed. + + #### Dispatch Origin + + Must be signed. + + #### Details + + The status check is a prerequisite for retrying a failed payout. If a spend has either succeeded or expired, it is removed from the storage by this function. In such instances, transaction fees are refunded. + + #### Parameters + + - `index`: The spend index. + + #### Events + + Emits [`Event::PaymentFailed`] if the spend payout has failed. Emits [`Event::SpendProcessed`] if the spend payout has succeed. + +### payout(index: `u32`) +- **interface**: `api.tx.treasury.payout` +- **summary**: Claim a spend. + + #### Dispatch Origin + + Must be signed + + #### Details + + Spends must be claimed within some temporal bounds. A spend may be claimed within one [`Config::PayoutPeriod`] from the `valid_from` block. In case of a payout failure, the spend status must be updated with the `check_status` dispatchable before retrying with the current function. + + #### Parameters + + - `index`: The spend index. + + #### Events + + Emits [`Event::Paid`] if successful. + +### removeApproval(proposal_id: `Compact`) +- **interface**: `api.tx.treasury.removeApproval` +- **summary**: Force a previously approved proposal to be removed from the approval queue. + + #### Dispatch Origin + + Must be [`Config::RejectOrigin`]. + + #### Details + + The original deposit will no longer be returned. + + #### Parameters + + - `proposal_id`: The index of a proposal + + #### Complexity + + - O(A) where `A` is the number of approvals + + #### Errors + + - [`Error::ProposalNotApproved`]: The `proposal_id` supplied was not found in the approval queue, i.e., the proposal has not been approved. This could also mean the proposal does not exist altogether, thus there is no way it would have been approved in the first place. + +### spend(asset_kind: `PolkadotRuntimeCommonImplsVersionedLocatableAsset`, amount: `Compact`, beneficiary: `ParachainsCommonPayVersionedLocatableAccount`, valid_from: `Option`) +- **interface**: `api.tx.treasury.spend` +- **summary**: Propose and approve a spend of treasury funds. + + #### Dispatch Origin + + Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount` of `asset_kind` in the native asset. The amount of `asset_kind` is converted for assertion using the [`Config::BalanceConverter`]. + + #### Details + + Create an approved spend for transferring a specific `amount` of `asset_kind` to a designated beneficiary. The spend must be claimed using the `payout` dispatchable within the [`Config::PayoutPeriod`]. + + #### Parameters + + - `asset_kind`: An indicator of the specific asset class to be spent. + + - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + + - `beneficiary`: The beneficiary of the spend. + + - `valid_from`: The block number from which the spend can be claimed. It can refer to the past if the resulting spend has not yet expired according to the [`Config::PayoutPeriod`]. If `None`, the spend can be claimed immediately after approval. + + #### Events + + Emits [`Event::AssetSpendApproved`] if successful. + +### spendLocal(amount: `Compact`, beneficiary: `MultiAddress`) +- **interface**: `api.tx.treasury.spendLocal` +- **summary**: Propose and approve a spend of treasury funds. + + #### Dispatch Origin + + Must be [`Config::SpendOrigin`] with the `Success` value being at least `amount`. + + #### Details NOTE: For record-keeping purposes, the proposer is deemed to be equivalent to the beneficiary. + + #### Parameters + + - `amount`: The amount to be transferred from the treasury to the `beneficiary`. + + - `beneficiary`: The destination account for the transfer. + + #### Events + + Emits [`Event::SpendApproved`] if successful. + +### voidSpend(index: `u32`) +- **interface**: `api.tx.treasury.voidSpend` +- **summary**: Void previously approved spend. + + #### Dispatch Origin + + Must be [`Config::RejectOrigin`]. + + #### Details + + A spend void is only possible if the payout has not been attempted yet. + + #### Parameters + + - `index`: The spend index. + + #### Events + + Emits [`Event::AssetSpendVoided`] if successful. + +___ + + ## uniques ### approveTransfer(collection: `u32`, item: `u32`, delegate: `MultiAddress`) @@ -3902,6 +5865,56 @@ ___ ___ +## voterList + +### putInFrontOf(lighter: `MultiAddress`) +- **interface**: `api.tx.voterList.putInFrontOf` +- **summary**: Move the caller's Id directly in front of `lighter`. + + The dispatch origin for this call must be _Signed_ and can only be called by the Id of the account going in front of `lighter`. Fee is payed by the origin under all circumstances. + + Only works if: + + - both nodes are within the same bag, + + - and `origin` has a greater `Score` than `lighter`. + +### putInFrontOfOther(heavier: `MultiAddress`, lighter: `MultiAddress`) +- **interface**: `api.tx.voterList.putInFrontOfOther` +- **summary**: Same as [`Pallet::put_in_front_of`], but it can be called by anyone. + + Fee is paid by the origin under all circumstances. + +### rebag(dislocated: `MultiAddress`) +- **interface**: `api.tx.voterList.rebag` +- **summary**: Declare that some `dislocated` account has, through rewards or penalties, sufficiently changed its score that it should properly fall into a different bag than its current one. + + Anyone can call this function about any potentially dislocated account. + + Will always update the stored score of `dislocated` to the correct score, based on `ScoreProvider`. + + If `dislocated` does not exists, it returns an error. + +___ + + +## whitelist + +### dispatchWhitelistedCall(call_hash: `H256`, call_encoded_len: `u32`, call_weight_witness: `SpWeightsWeightV2Weight`) +- **interface**: `api.tx.whitelist.dispatchWhitelistedCall` + +### dispatchWhitelistedCallWithPreimage(call: `Call`) +- **interface**: `api.tx.whitelist.dispatchWhitelistedCallWithPreimage` + +### removeWhitelistedCall(call_hash: `H256`) +- **interface**: `api.tx.whitelist.removeWhitelistedCall` + +### whitelistCall(call_hash: `H256`) +- **interface**: `api.tx.whitelist.whitelistCall` + +___ + + ## xcmpQueue ### resumeXcmExecution() diff --git a/docs/asset-hub-polkadot/rpc.md b/docs/asset-hub-polkadot/rpc.md index 6e591b76e..6356c75aa 100644 --- a/docs/asset-hub-polkadot/rpc.md +++ b/docs/asset-hub-polkadot/rpc.md @@ -12,8 +12,6 @@ The following sections contain known RPC methods that may be available on specif - **[dev](#dev)** -- **[engine](#engine)** - - **[offchain](#offchain)** - **[payment](#payment)** @@ -164,21 +162,6 @@ ___ ___ -## engine - -### createBlock(createEmpty: `bool`, finalize: `bool`, parentHash?: `BlockHash`): `CreatedBlock` -- **interface**: `api.rpc.engine.createBlock` -- **jsonrpc**: `engine_createBlock` -- **summary**: Instructs the manual-seal authorship task to create a new block - -### finalizeBlock(hash: `BlockHash`, justification?: `Justification`): `bool` -- **interface**: `api.rpc.engine.finalizeBlock` -- **jsonrpc**: `engine_finalizeBlock` -- **summary**: Instructs the manual-seal authorship task to finalize a block - -___ - - ## offchain ### localStorageClear(kind: `StorageKind`, key: `Bytes`): `Null` diff --git a/docs/asset-hub-polkadot/runtime.md b/docs/asset-hub-polkadot/runtime.md index 4c754fe3a..70713555b 100644 --- a/docs/asset-hub-polkadot/runtime.md +++ b/docs/asset-hub-polkadot/runtime.md @@ -12,6 +12,8 @@ The following section contains known runtime calls that may be available on spec - **[auraUnincludedSegmentApi](#auraunincludedsegmentapi)** +- **[authorizedAliasersApi](#authorizedaliasersapi)** + - **[blockBuilder](#blockbuilder)** - **[collectCollationInfo](#collectcollationinfo)** @@ -24,20 +26,32 @@ The following section contains known runtime calls that may be available on spec - **[genesisBuilder](#genesisbuilder)** +- **[getParachainInfo](#getparachaininfo)** + - **[locationToAccountApi](#locationtoaccountapi)** - **[metadata](#metadata)** +- **[nominationPoolsApi](#nominationpoolsapi)** + - **[offchainWorkerApi](#offchainworkerapi)** +- **[relayParentOffsetApi](#relayparentoffsetapi)** + +- **[runtimeViewFunction](#runtimeviewfunction)** + - **[sessionKeys](#sessionkeys)** +- **[stakingApi](#stakingapi)** + - **[taggedTransactionQueue](#taggedtransactionqueue)** - **[transactionPaymentApi](#transactionpaymentapi)** - **[transactionPaymentCallApi](#transactionpaymentcallapi)** +- **[trustedQueryApi](#trustedqueryapi)** + - **[xcmPaymentApi](#xcmpaymentapi)** @@ -56,17 +70,17 @@ ___ ## assetConversionApi -### getReserves(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`): `Option<(u128,u128)>` +### getReserves(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`): `Option<(u128,u128)>` - **interface**: `api.call.assetConversionApi.getReserves` - **runtime**: `assetConversionApi_get_reserves` - **summary**: Returns the size of the liquidity pool for the given asset pair. -### quotePriceExactTokensForTokens(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`, amount: `u128`, include_fee: `bool`): `Option` +### quotePriceExactTokensForTokens(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`, amount: `u128`, include_fee: `bool`): `Option` - **interface**: `api.call.assetConversionApi.quotePriceExactTokensForTokens` - **runtime**: `assetConversionApi_quote_price_exact_tokens_for_tokens` - **summary**: Provides a quote for [`Pallet::swap_exact_tokens_for_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_out_min` to control slippage.) -### quotePriceTokensForExactTokens(asset1: `StagingXcmV4Location`, asset2: `StagingXcmV4Location`, amount: `u128`, include_fee: `bool`): `Option` +### quotePriceTokensForExactTokens(asset1: `StagingXcmV5Location`, asset2: `StagingXcmV5Location`, amount: `u128`, include_fee: `bool`): `Option` - **interface**: `api.call.assetConversionApi.quotePriceTokensForExactTokens` - **runtime**: `assetConversionApi_quote_price_tokens_for_exact_tokens` - **summary**: Provides a quote for [`Pallet::swap_tokens_for_exact_tokens`].,, Note that the price may have changed by the time the transaction is executed., (Use `amount_in_max` to control slippage.) @@ -99,6 +113,21 @@ ___ ___ +## authorizedAliasersApi + +### authorizedAliasers(target: `XcmVersionedLocation`): `Result, XcmRuntimeApisAuthorizedAliasesError>` +- **interface**: `api.call.authorizedAliasersApi.authorizedAliasers` +- **runtime**: `authorizedAliasersApi_authorized_aliasers` +- **summary**: Returns locations allowed to alias into and act as `target`. + +### isAuthorizedAlias(origin: `XcmVersionedLocation`, target: `XcmVersionedLocation`): `Result` +- **interface**: `api.call.authorizedAliasersApi.isAuthorizedAlias` +- **runtime**: `authorizedAliasersApi_is_authorized_alias` +- **summary**: Returns whether `origin` is allowed to alias into and act as `target`. + +___ + + ## blockBuilder ### applyExtrinsic(extrinsic: `SpRuntimeUncheckedExtrinsic`): `Result, SpRuntimeTransactionValidityTransactionValidityError>` @@ -199,6 +228,16 @@ ___ ___ +## getParachainInfo + +### parachainId(): `PolkadotParachainPrimitivesPrimitivesId` +- **interface**: `api.call.getParachainInfo.parachainId` +- **runtime**: `getParachainInfo_parachain_id` +- **summary**: Retrieve the parachain id used for runtime. + +___ + + ## locationToAccountApi ### convertLocation(location: `XcmVersionedLocation`): `Result` @@ -229,6 +268,61 @@ ___ ___ +## nominationPoolsApi + +### balanceToPoints(pool_id: `u32`, new_funds: `u128`): `u128` +- **interface**: `api.call.nominationPoolsApi.balanceToPoints` +- **runtime**: `nominationPoolsApi_balance_to_points` +- **summary**: Returns the equivalent points of `new_funds` for a given pool. + +### memberNeedsDelegateMigration(member: `SpCoreCryptoAccountId32`): `bool` +- **interface**: `api.call.nominationPoolsApi.memberNeedsDelegateMigration` +- **runtime**: `nominationPoolsApi_member_needs_delegate_migration` +- **summary**: Returns true if the delegated funds of the pool `member` needs migration.,, Once a pool has successfully migrated to the strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake), the funds of the, member can be migrated from pool account to the member's account. Use, [`migrate_delegation`](pallet_nomination_pools::Call::migrate_delegation), to migrate the funds of the pool member. + +### memberPendingSlash(member: `SpCoreCryptoAccountId32`): `u128` +- **interface**: `api.call.nominationPoolsApi.memberPendingSlash` +- **runtime**: `nominationPoolsApi_member_pending_slash` +- **summary**: Returns the pending slash for a given pool member.,, If pending slash of the member exceeds `ExistentialDeposit`, it can be reported on, chain. + +### memberTotalBalance(who: `SpCoreCryptoAccountId32`): `u128` +- **interface**: `api.call.nominationPoolsApi.memberTotalBalance` +- **runtime**: `nominationPoolsApi_member_total_balance` +- **summary**: Returns the total contribution of a pool member including any balance that is unbonding. + +### pendingRewards(who: `SpCoreCryptoAccountId32`): `u128` +- **interface**: `api.call.nominationPoolsApi.pendingRewards` +- **runtime**: `nominationPoolsApi_pending_rewards` +- **summary**: Returns the pending rewards for the member that the AccountId was given for. + +### pointsToBalance(pool_id: `u32`, points: `u128`): `u128` +- **interface**: `api.call.nominationPoolsApi.pointsToBalance` +- **runtime**: `nominationPoolsApi_points_to_balance` +- **summary**: Returns the equivalent balance of `points` for a given pool. + +### poolAccounts(pool_id: `u32`): `(AccountId32,AccountId32)` +- **interface**: `api.call.nominationPoolsApi.poolAccounts` +- **runtime**: `nominationPoolsApi_pool_accounts` +- **summary**: Returns the bonded account and reward account associated with the pool_id. + +### poolBalance(pool_id: `u32`): `u128` +- **interface**: `api.call.nominationPoolsApi.poolBalance` +- **runtime**: `nominationPoolsApi_pool_balance` +- **summary**: Total balance contributed to the pool. + +### poolNeedsDelegateMigration(pool_id: `u32`): `bool` +- **interface**: `api.call.nominationPoolsApi.poolNeedsDelegateMigration` +- **runtime**: `nominationPoolsApi_pool_needs_delegate_migration` +- **summary**: Returns true if the pool with `pool_id` needs migration.,, This can happen when the `pallet-nomination-pools` has switched to using strategy, [`DelegateStake`](pallet_nomination_pools::adapter::DelegateStake) but the pool, still has funds that were staked using the older strategy, [TransferStake](pallet_nomination_pools::adapter::TransferStake). Use, [`migrate_pool_to_delegate_stake`](pallet_nomination_pools::Call::migrate_pool_to_delegate_stake), to migrate the pool. + +### poolPendingSlash(pool_id: `u32`): `u128` +- **interface**: `api.call.nominationPoolsApi.poolPendingSlash` +- **runtime**: `nominationPoolsApi_pool_pending_slash` +- **summary**: Returns the pending slash for a given pool. + +___ + + ## offchainWorkerApi ### offchainWorker(header: `SpRuntimeHeader`): `Null` @@ -239,6 +333,26 @@ ___ ___ +## relayParentOffsetApi + +### relayParentOffset(): `u32` +- **interface**: `api.call.relayParentOffsetApi.relayParentOffset` +- **runtime**: `relayParentOffsetApi_relay_parent_offset` +- **summary**: Fetch the slot offset that is expected from the relay chain. + +___ + + +## runtimeViewFunction + +### executeViewFunction(query_id: `FrameSupportViewFunctionsViewFunctionId`, input: `Bytes`): `Result` +- **interface**: `api.call.runtimeViewFunction.executeViewFunction` +- **runtime**: `runtimeViewFunction_execute_view_function` +- **summary**: Execute a view function query. + +___ + + ## sessionKeys ### decodeSessionKeys(encoded: `Bytes`): `Option>` @@ -254,6 +368,26 @@ ___ ___ +## stakingApi + +### erasStakersPageCount(era: `u32`, account: `SpCoreCryptoAccountId32`): `u32` +- **interface**: `api.call.stakingApi.erasStakersPageCount` +- **runtime**: `stakingApi_eras_stakers_page_count` +- **summary**: Returns the page count of exposures for a validator `account` in a given era. + +### nominationsQuota(balance: `u128`): `u32` +- **interface**: `api.call.stakingApi.nominationsQuota` +- **runtime**: `stakingApi_nominations_quota` +- **summary**: Returns the nominations quota for a nominator with a given balance. + +### pendingRewards(era: `u32`, account: `SpCoreCryptoAccountId32`): `bool` +- **interface**: `api.call.stakingApi.pendingRewards` +- **runtime**: `stakingApi_pending_rewards` +- **summary**: Returns true if validator `account` has pages to be claimed for the given era. + +___ + + ## taggedTransactionQueue ### validateTransaction(source: `SpRuntimeTransactionValidityTransactionSource`, tx: `SpRuntimeUncheckedExtrinsic`, block_hash: `PrimitiveTypesH256`): `Result` @@ -314,6 +448,21 @@ ___ ___ +## trustedQueryApi + +### isTrustedReserve(asset: `XcmVersionedAsset`, location: `XcmVersionedLocation`): `Result` +- **interface**: `api.call.trustedQueryApi.isTrustedReserve` +- **runtime**: `trustedQueryApi_is_trusted_reserve` +- **summary**: Returns if the location is a trusted reserve for the asset.,, # Arguments, * `asset`: `VersionedAsset`., * `location`: `VersionedLocation`. + +### isTrustedTeleporter(asset: `XcmVersionedAsset`, location: `XcmVersionedLocation`): `Result` +- **interface**: `api.call.trustedQueryApi.isTrustedTeleporter` +- **runtime**: `trustedQueryApi_is_trusted_teleporter` +- **summary**: Returns if the asset can be teleported to the location.,, # Arguments, * `asset`: `VersionedAsset`., * `location`: `VersionedLocation`. + +___ + + ## xcmPaymentApi ### queryAcceptablePaymentAssets(xcm_version: `u32`): `Result, XcmRuntimeApisFeesError>` diff --git a/docs/asset-hub-polkadot/storage.md b/docs/asset-hub-polkadot/storage.md index 2787e3cbc..041f28b43 100644 --- a/docs/asset-hub-polkadot/storage.md +++ b/docs/asset-hub-polkadot/storage.md @@ -6,8 +6,14 @@ The following sections contain Storage methods are part of the default asset-hub (NOTE: These were generated from a static/snapshot view of a recent default asset-hub-polkadot runtime. Some items may not be available in older nodes, or in any customized implementations.) +- **[ahMigrator](#ahmigrator)** + +- **[ahOps](#ahops)** + - **[assetConversion](#assetconversion)** +- **[assetRate](#assetrate)** + - **[assets](#assets)** - **[aura](#aura)** @@ -18,28 +24,62 @@ The following sections contain Storage methods are part of the default asset-hub - **[balances](#balances)** +- **[bounties](#bounties)** + +- **[childBounties](#childbounties)** + +- **[claims](#claims)** + - **[collatorSelection](#collatorselection)** +- **[convictionVoting](#convictionvoting)** + +- **[delegatedStaking](#delegatedstaking)** + - **[foreignAssets](#foreignassets)** +- **[indices](#indices)** + - **[messageQueue](#messagequeue)** +- **[multiBlockElection](#multiblockelection)** + +- **[multiBlockElectionSigned](#multiblockelectionsigned)** + +- **[multiBlockElectionVerifier](#multiblockelectionverifier)** + - **[multisig](#multisig)** - **[nfts](#nfts)** +- **[nominationPools](#nominationpools)** + - **[parachainInfo](#parachaininfo)** - **[parachainSystem](#parachainsystem)** +- **[parameters](#parameters)** + - **[polkadotXcm](#polkadotxcm)** - **[poolAssets](#poolassets)** +- **[preimage](#preimage)** + - **[proxy](#proxy)** +- **[referenda](#referenda)** + +- **[scheduler](#scheduler)** + - **[session](#session)** +- **[snowbridgeSystemFrontend](#snowbridgesystemfrontend)** + +- **[staking](#staking)** + +- **[stakingRcClient](#stakingrcclient)** + - **[stateTrieMigration](#statetriemigration)** - **[substrate](#substrate)** @@ -52,29 +92,142 @@ The following sections contain Storage methods are part of the default asset-hub - **[transactionPayment](#transactionpayment)** +- **[treasury](#treasury)** + - **[uniques](#uniques)** - **[vesting](#vesting)** +- **[voterList](#voterlist)** + +- **[whitelist](#whitelist)** + - **[xcmpQueue](#xcmpqueue)** ___ +## ahMigrator + +### ahBalancesBefore(): `PalletAhMigratorBalancesBefore` +- **interface**: `api.query.ahMigrator.ahBalancesBefore` +- **summary**: Helper storage item to store the total balance / total issuance of native token at the start of the migration. Since teleports are disabled during migration, the total issuance will not change for other reason than the migration itself. + +### ahMigrationStage(): `PalletAhMigratorMigrationStage` +- **interface**: `api.query.ahMigrator.ahMigrationStage` +- **summary**: The Asset Hub migration state. + +### dmpQueuePriorityConfig(): `PalletRcMigratorQueuePriority` +- **interface**: `api.query.ahMigrator.dmpQueuePriorityConfig` +- **summary**: The priority of the DMP queue during migration. + + Controls how the DMP (Downward Message Passing) queue is processed relative to other queues during the migration process. This helps ensure timely processing of migration messages. The default priority pattern is defined in the pallet configuration, but can be overridden by a storage value of this type. + +### manager(): `Option` +- **interface**: `api.query.ahMigrator.manager` +- **summary**: An optional account id of a manager. + + This account id has similar privileges to [`Config::AdminOrigin`] except that it can not set the manager account id via `set_manager` call. + +### migrationEndBlock(): `Option` +- **interface**: `api.query.ahMigrator.migrationEndBlock` +- **summary**: Block number when migration finished and extrinsics were unlocked. + + This is set when entering the `MigrationDone` stage hence when `RcMigrationStage::is_finished()` becomes `true`. + +### migrationStartBlock(): `Option` +- **interface**: `api.query.ahMigrator.migrationStartBlock` +- **summary**: The block number at which the migration began and the pallet's extrinsics were locked. + + This value is set when entering the `WaitingForAh` stage, i.e., when `RcMigrationStage::is_ongoing()` becomes `true`. + +### rcAccounts(`AccountId32`): `Option` +- **interface**: `api.query.ahMigrator.rcAccounts` +- **summary**: RC accounts that failed to migrate when were received on the Asset Hub. + + This is unlikely to happen, since we dry run the migration, but we keep it for completeness. + +___ + + +## ahOps + +### rcCrowdloanContribution(`u32, u32, AccountId32`): `Option<(AccountId32,u128)>` +- **interface**: `api.query.ahOps.rcCrowdloanContribution` +- **summary**: Amount of balance that a contributor made towards a crowdloan. + + `withdraw_crowdloan_contribution` can be permissionlessly called once the block number passed to unlock the balance for a specific account. + + The keys are as follows: + + - Block number after which the balance can be unlocked. + + - The para_id of the crowdloan. + + - The account that made the contribution. + + The value is (fund_pot, balance). The contribution pot is the second key in the `RcCrowdloanContribution` storage. + +### rcCrowdloanReserve(`u32, u32, AccountId32`): `Option` +- **interface**: `api.query.ahOps.rcCrowdloanReserve` +- **summary**: The reserve that was taken to create a crowdloan. + + This is normally 500 DOT and can be refunded as last step after all `RcCrowdloanContribution`s of this loan have been withdrawn. + + Keys: + + - Block number after which this can be unreserved + + - The para_id of the crowdloan + + - The account that will have the balance unreserved + +### rcLeaseReserve(`u32, u32, AccountId32`): `Option` +- **interface**: `api.query.ahOps.rcLeaseReserve` +- **summary**: Amount of balance that was reserved for winning a lease auction. + + `unreserve_lease_deposit` can be permissionlessly called once the block number passed to unreserve the deposit. It is implicitly called by `withdraw_crowdloan_contribution`. + + The account here can either be a crowdloan account or a solo bidder. If it is a crowdloan account, then the summed up contributions for it in the contributions map will equate the reserved balance here. + + The keys are as follows: + + - Block number after which the deposit can be unreserved. + + - The para_id of the lease slot. + + - The account that will have the balance unreserved. + + - The balance to be unreserved. + +___ + + ## assetConversion ### nextPoolAssetId(): `Option` - **interface**: `api.query.assetConversion.nextPoolAssetId` - **summary**: Stores the `PoolAssetId` that is going to be used for the next lp token. This gets incremented whenever a new lp pool is created. -### pools(`(StagingXcmV4Location,StagingXcmV4Location)`): `Option` +### pools(`(StagingXcmV5Location,StagingXcmV5Location)`): `Option` - **interface**: `api.query.assetConversion.pools` - **summary**: Map from `PoolAssetId` to `PoolInfo`. This establishes whether a pool has been officially created rather than people sending tokens directly to a pool's public account. ___ +## assetRate + +### conversionRateToNative(`PolkadotRuntimeCommonImplsVersionedLocatableAsset`): `Option` +- **interface**: `api.query.assetRate.conversionRateToNative` +- **summary**: Maps an asset to its fixed point representation in the native balance. + + E.g. `native_amount = asset_amount * ConversionRateToNative::::get(asset_kind)` + +___ + + ## assets ### account(`u32, AccountId32`): `Option` @@ -163,11 +316,11 @@ ___ But this comes with tradeoffs, storing account balances in the system pallet stores `frame_system` data alongside the account data contrary to storing account balances in the `Balances` pallet, which uses a `StorageMap` to store balances data only. NOTE: This is only used in the case that this pallet is used to store balances. -### freezes(`AccountId32`): `Vec` +### freezes(`AccountId32`): `Vec` - **interface**: `api.query.balances.freezes` - **summary**: Freeze locks on account balances. -### holds(`AccountId32`): `Vec<{"id":"AssetHubPolkadotRuntimeRuntimeHoldReason","amount":"u128"}>` +### holds(`AccountId32`): `Vec` - **interface**: `api.query.balances.holds` - **summary**: Holds on account balances. @@ -194,6 +347,87 @@ ___ ___ +## bounties + +### bounties(`u32`): `Option` +- **interface**: `api.query.bounties.bounties` +- **summary**: Bounties that have been made. + +### bountyApprovals(): `Vec` +- **interface**: `api.query.bounties.bountyApprovals` +- **summary**: Bounty indices that have been approved but not yet funded. + +### bountyCount(): `u32` +- **interface**: `api.query.bounties.bountyCount` +- **summary**: Number of bounty proposals that have been made. + +### bountyDescriptions(`u32`): `Option` +- **interface**: `api.query.bounties.bountyDescriptions` +- **summary**: The description of each bounty. + +___ + + +## childBounties + +### childBounties(`u32, u32`): `Option` +- **interface**: `api.query.childBounties.childBounties` +- **summary**: Child bounties that have been added. + +### childBountyCount(): `u32` +- **interface**: `api.query.childBounties.childBountyCount` +- **summary**: DEPRECATED: Replaced with `ParentTotalChildBounties` storage item keeping dedicated counts for each parent bounty. Number of total child bounties. Will be removed in May 2025. + +### childBountyDescriptionsV1(`u32, u32`): `Option` +- **interface**: `api.query.childBounties.childBountyDescriptionsV1` +- **summary**: The description of each child-bounty. Indexed by `(parent_id, child_id)`. + + This item replaces the `ChildBountyDescriptions` storage item from the V0 storage version. + +### childrenCuratorFees(`u32`): `u128` +- **interface**: `api.query.childBounties.childrenCuratorFees` +- **summary**: The cumulative child-bounty curator fee for each parent bounty. + +### parentChildBounties(`u32`): `u32` +- **interface**: `api.query.childBounties.parentChildBounties` +- **summary**: Number of active child bounties per parent bounty. Map of parent bounty index to number of child bounties. + +### parentTotalChildBounties(`u32`): `u32` +- **interface**: `api.query.childBounties.parentTotalChildBounties` +- **summary**: Number of total child bounties per parent bounty, including completed bounties. + +### v0ToV1ChildBountyIds(`u32`): `Option<(u32,u32)>` +- **interface**: `api.query.childBounties.v0ToV1ChildBountyIds` +- **summary**: The mapping of the child bounty ids from storage version `V0` to the new `V1` version. + + The `V0` ids based on total child bounty count [`ChildBountyCount`]`. The `V1` version ids based on the child bounty count per parent bounty [`ParentTotalChildBounties`]. The item intended solely for client convenience and not used in the pallet's core logic. + +___ + + +## claims + +### claims(`EthereumAddress`): `Option` +- **interface**: `api.query.claims.claims` + +### preclaims(`AccountId32`): `Option` +- **interface**: `api.query.claims.preclaims` +- **summary**: Pre-claimed Ethereum accounts, by the Account ID that they are claimed to. + +### signing(`EthereumAddress`): `Option` +- **interface**: `api.query.claims.signing` +- **summary**: The statement kind that must be signed, if any. + +### total(): `u128` +- **interface**: `api.query.claims.total` + +### vesting(`EthereumAddress`): `Option<(u128,u128,u32)>` +- **interface**: `api.query.claims.vesting` +- **summary**: Vesting schedule for a claim. First balance is the total amount that should be held for vesting. Second balance is how much should be unlocked per block. The block number is when the vesting should start. + +___ + + ## collatorSelection ### candidacyBond(): `u128` @@ -225,25 +459,61 @@ ___ ___ +## convictionVoting + +### classLocksFor(`AccountId32`): `Vec<(u16,u128)>` +- **interface**: `api.query.convictionVoting.classLocksFor` +- **summary**: The voting classes which have a non-zero lock requirement and the lock amounts which they require. The actual amount locked on behalf of this pallet should always be the maximum of this list. + +### votingFor(`AccountId32, u16`): `PalletConvictionVotingVoteVoting` +- **interface**: `api.query.convictionVoting.votingFor` +- **summary**: All voting for a particular voter in a particular voting class. We store the balance for the number of votes that we have recorded. + +___ + + +## delegatedStaking + +### agents(`AccountId32`): `Option` +- **interface**: `api.query.delegatedStaking.agents` +- **summary**: Map of `Agent` to their `Ledger`. + +### counterForAgents(): `u32` +- **interface**: `api.query.delegatedStaking.counterForAgents` +- **summary**: Counter for the related counted storage map + +### counterForDelegators(): `u32` +- **interface**: `api.query.delegatedStaking.counterForDelegators` +- **summary**: Counter for the related counted storage map + +### delegators(`AccountId32`): `Option` +- **interface**: `api.query.delegatedStaking.delegators` +- **summary**: Map of Delegators to their `Delegation`. + + Implementation note: We are not using a double map with `delegator` and `agent` account as keys since we want to restrict delegators to delegate only to one account at a time. + +___ + + ## foreignAssets -### account(`StagingXcmV4Location, AccountId32`): `Option` +### account(`StagingXcmV5Location, AccountId32`): `Option` - **interface**: `api.query.foreignAssets.account` - **summary**: The holdings of a specific account for a specific asset. -### approvals(`StagingXcmV4Location, AccountId32, AccountId32`): `Option` +### approvals(`StagingXcmV5Location, AccountId32, AccountId32`): `Option` - **interface**: `api.query.foreignAssets.approvals` - **summary**: Approved balance transfers. First balance is the amount approved for transfer. Second is the amount of `T::Currency` reserved for storing this. First key is the asset ID, second key is the owner and third key is the delegate. -### asset(`StagingXcmV4Location`): `Option` +### asset(`StagingXcmV5Location`): `Option` - **interface**: `api.query.foreignAssets.asset` - **summary**: Details of an asset. -### metadata(`StagingXcmV4Location`): `{"deposit":"u128","name":"Bytes","symbol":"Bytes","decimals":"u8","isFrozen":"bool"}` +### metadata(`StagingXcmV5Location`): `{"deposit":"u128","name":"Bytes","symbol":"Bytes","decimals":"u8","isFrozen":"bool"}` - **interface**: `api.query.foreignAssets.metadata` - **summary**: Metadata of an asset. -### nextAssetId(): `Option` +### nextAssetId(): `Option` - **interface**: `api.query.foreignAssets.nextAssetId` - **summary**: The asset ID enforced for the next asset creation, if any present. Otherwise, this storage item has no effect. @@ -254,6 +524,15 @@ ___ ___ +## indices + +### accounts(`u32`): `Option<(AccountId32,u128,bool)>` +- **interface**: `api.query.indices.accounts` +- **summary**: The lookup from index to account. + +___ + + ## messageQueue ### bookStateFor(`CumulusPrimitivesCoreAggregateMessageOrigin`): `PalletMessageQueueBookState` @@ -271,6 +550,120 @@ ___ ___ +## multiBlockElection + +### currentPhase(): `PalletElectionProviderMultiBlockPhase` +- **interface**: `api.query.multiBlockElection.currentPhase` +- **summary**: Current phase. + +### desiredTargets(`u32`): `Option` +- **interface**: `api.query.multiBlockElection.desiredTargets` +- **summary**: Desired number of targets to elect for this round. + +### pagedTargetSnapshot(`u32, u32`): `Option>` +- **interface**: `api.query.multiBlockElection.pagedTargetSnapshot` +- **summary**: Paginated target snapshot. + + For the time being, since we assume one pages of targets, at most ONE key will exist. + +### pagedTargetSnapshotHash(`u32, u32`): `Option` +- **interface**: `api.query.multiBlockElection.pagedTargetSnapshotHash` +- **summary**: Same as [`PagedTargetSnapshot`], but it will store the hash of the snapshot. + + The hash is generated using [`frame_system::Config::Hashing`]. + +### pagedVoterSnapshot(`u32, u32`): `Option)>>` +- **interface**: `api.query.multiBlockElection.pagedVoterSnapshot` +- **summary**: Paginated voter snapshot. At most [`T::Pages`] keys will exist. + +### pagedVoterSnapshotHash(`u32, u32`): `Option` +- **interface**: `api.query.multiBlockElection.pagedVoterSnapshotHash` +- **summary**: Same as [`PagedVoterSnapshot`], but it will store the hash of the snapshot. + + The hash is generated using [`frame_system::Config::Hashing`]. + +### round(): `u32` +- **interface**: `api.query.multiBlockElection.round` +- **summary**: Internal counter for the number of rounds. + + This is useful for de-duplication of transactions submitted to the pool, and general diagnostics of the pallet. + + This is merely incremented once per every time that an upstream `elect` is called. + +___ + + +## multiBlockElectionSigned + +### invulnerables(): `Vec` +- **interface**: `api.query.multiBlockElectionSigned.invulnerables` +- **summary**: Accounts whitelisted by governance to always submit their solutions. + + They are different in that: + + * They always pay a fixed deposit for submission, specified by [`Config::InvulnerableDeposit`]. They pay no page deposit. + + * If _ejected_ by better solution from [`SortedScores`], they will get their full deposit back. + + * They always get their tx-fee back even if they are _discarded_. + +### sortedScores(`u32`): `Vec<(AccountId32,SpNposElectionsElectionScore)>` +- **interface**: `api.query.multiBlockElectionSigned.sortedScores` + +### submissionMetadataStorage(`u32, AccountId32`): `Option` +- **interface**: `api.query.multiBlockElectionSigned.submissionMetadataStorage` +- **summary**: Map from account to the metadata of their submission. + + invariant: for any Key1 of type `AccountId` in [`Submissions`], this storage map also has a value. + +### submissionStorage(`u32, AccountId32, u32`): `Option` +- **interface**: `api.query.multiBlockElectionSigned.submissionStorage` +- **summary**: Triple map from (round, account, page) to a solution page. + +___ + + +## multiBlockElectionVerifier + +### minimumScore(): `Option` +- **interface**: `api.query.multiBlockElectionVerifier.minimumScore` +- **summary**: The minimum score that each solution must attain in order to be considered feasible. + +### queuedSolutionBackings(`u32, u32`): `Option>` +- **interface**: `api.query.multiBlockElectionVerifier.queuedSolutionBackings` +- **summary**: The `(amount, count)` of backings, divided per page. + + This is stored because in the last block of verification we need them to compute the score, and check `MaxBackersPerWinnerFinal`. + + This can only ever live for the invalid variant of the solution. Once it is valid, we don't need this information anymore; the score is already computed once in [`QueuedSolutionScore`], and the backing counts are checked. + +### queuedSolutionScore(`u32`): `Option` +- **interface**: `api.query.multiBlockElectionVerifier.queuedSolutionScore` +- **summary**: The score of the valid variant of [`QueuedSolution`]. + + This only ever lives for the `valid` variant. + +### queuedSolutionX(`u32, u32`): `Option` +- **interface**: `api.query.multiBlockElectionVerifier.queuedSolutionX` +- **summary**: The `X` variant of the current queued solution. Might be the valid one or not. + + The two variants of this storage item is to avoid the need of copying. Recall that once a `VerifyingSolution` is being processed, it needs to write its partial supports *somewhere*. Writing theses supports on top of a *good* queued supports is wrong, since we might bail. Writing them to a bugger and copying at the ned is slightly better, but expensive. This flag system is best of both worlds. + +### queuedSolutionY(`u32, u32`): `Option` +- **interface**: `api.query.multiBlockElectionVerifier.queuedSolutionY` +- **summary**: The `Y` variant of the current queued solution. Might be the valid one or not. + +### queuedValidVariant(`u32`): `PalletElectionProviderMultiBlockVerifierImplsValidSolution` +- **interface**: `api.query.multiBlockElectionVerifier.queuedValidVariant` +- **summary**: Pointer to the variant of [`QueuedSolutionX`] or [`QueuedSolutionY`] that is currently valid. + +### statusStorage(): `PalletElectionProviderMultiBlockVerifierImplsStatus` +- **interface**: `api.query.multiBlockElectionVerifier.statusStorage` +- **summary**: Storage item for [`Status`]. + +___ + + ## multisig ### multisigs(`AccountId32, [u8;32]`): `Option` @@ -345,6 +738,105 @@ ___ ___ +## nominationPools + +### bondedPools(`u32`): `Option` +- **interface**: `api.query.nominationPools.bondedPools` +- **summary**: Storage for bonded pools. + +### claimPermissions(`AccountId32`): `PalletNominationPoolsClaimPermission` +- **interface**: `api.query.nominationPools.claimPermissions` +- **summary**: Map from a pool member account to their opted claim permission. + +### counterForBondedPools(): `u32` +- **interface**: `api.query.nominationPools.counterForBondedPools` +- **summary**: Counter for the related counted storage map + +### counterForMetadata(): `u32` +- **interface**: `api.query.nominationPools.counterForMetadata` +- **summary**: Counter for the related counted storage map + +### counterForPoolMembers(): `u32` +- **interface**: `api.query.nominationPools.counterForPoolMembers` +- **summary**: Counter for the related counted storage map + +### counterForReversePoolIdLookup(): `u32` +- **interface**: `api.query.nominationPools.counterForReversePoolIdLookup` +- **summary**: Counter for the related counted storage map + +### counterForRewardPools(): `u32` +- **interface**: `api.query.nominationPools.counterForRewardPools` +- **summary**: Counter for the related counted storage map + +### counterForSubPoolsStorage(): `u32` +- **interface**: `api.query.nominationPools.counterForSubPoolsStorage` +- **summary**: Counter for the related counted storage map + +### globalMaxCommission(): `Option` +- **interface**: `api.query.nominationPools.globalMaxCommission` +- **summary**: The maximum commission that can be charged by a pool. Used on commission payouts to bound pool commissions that are > `GlobalMaxCommission`, necessary if a future `GlobalMaxCommission` is lower than some current pool commissions. + +### lastPoolId(): `u32` +- **interface**: `api.query.nominationPools.lastPoolId` +- **summary**: Ever increasing number of all pools created so far. + +### maxPoolMembers(): `Option` +- **interface**: `api.query.nominationPools.maxPoolMembers` +- **summary**: Maximum number of members that can exist in the system. If `None`, then the count members are not bound on a system wide basis. + +### maxPoolMembersPerPool(): `Option` +- **interface**: `api.query.nominationPools.maxPoolMembersPerPool` +- **summary**: Maximum number of members that may belong to pool. If `None`, then the count of members is not bound on a per pool basis. + +### maxPools(): `Option` +- **interface**: `api.query.nominationPools.maxPools` +- **summary**: Maximum number of nomination pools that can exist. If `None`, then an unbounded number of pools can exist. + +### metadata(`u32`): `Bytes` +- **interface**: `api.query.nominationPools.metadata` +- **summary**: Metadata for the pool. + +### minCreateBond(): `u128` +- **interface**: `api.query.nominationPools.minCreateBond` +- **summary**: Minimum bond required to create a pool. + + This is the amount that the depositor must put as their initial stake in the pool, as an indication of "skin in the game". + + This is the value that will always exist in the staking ledger of the pool bonded account while all other accounts leave. + +### minJoinBond(): `u128` +- **interface**: `api.query.nominationPools.minJoinBond` +- **summary**: Minimum amount to bond to join a pool. + +### poolMembers(`AccountId32`): `Option` +- **interface**: `api.query.nominationPools.poolMembers` +- **summary**: Active members. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### reversePoolIdLookup(`AccountId32`): `Option` +- **interface**: `api.query.nominationPools.reversePoolIdLookup` +- **summary**: A reverse lookup from the pool's account id to its id. + + This is only used for slashing and on automatic withdraw update. In all other instances, the pool id is used, and the accounts are deterministically derived from it. + +### rewardPools(`u32`): `Option` +- **interface**: `api.query.nominationPools.rewardPools` +- **summary**: Reward pools. This is where there rewards for each pool accumulate. When a members payout is claimed, the balance comes out of the reward pool. Keyed by the bonded pools account. + +### subPoolsStorage(`u32`): `Option` +- **interface**: `api.query.nominationPools.subPoolsStorage` +- **summary**: Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool, hence the name sub-pools. Keyed by the bonded pools account. + +### totalValueLocked(): `u128` +- **interface**: `api.query.nominationPools.totalValueLocked` +- **summary**: The sum of funds across all pools. + + This might be lower but never higher than the sum of `total_balance` of all [`PoolMembers`] because calling `pool_withdraw_unbonded` might decrease the total stake of the pool's `bonded_account` without adjusting the pallet-internal `UnbondingPool`'s. + +___ + + ## parachainInfo ### parachainId(): `u32` @@ -390,8 +882,6 @@ ___ ### hrmpWatermark(): `u32` - **interface**: `api.query.parachainSystem.hrmpWatermark` - **summary**: HRMP watermark that was set in a block. - - This will be cleared in `on_initialize` of each new block. ### lastDmqMqcHead(): `H256` - **interface**: `api.query.parachainSystem.lastDmqMqcHead` @@ -405,6 +895,18 @@ ___ This value is loaded before and saved after processing inbound downward messages carried by the system inherent. +### lastProcessedDownwardMessage(): `Option` +- **interface**: `api.query.parachainSystem.lastProcessedDownwardMessage` +- **summary**: The last processed downward message. + + We need to keep track of this to filter the messages that have been already processed. + +### lastProcessedHrmpMessage(): `Option` +- **interface**: `api.query.parachainSystem.lastProcessedHrmpMessage` +- **summary**: The last processed HRMP message. + + We need to keep track of this to filter the messages that have been already processed. + ### lastRelayChainBlockNumber(): `u32` - **interface**: `api.query.parachainSystem.lastRelayChainBlockNumber` - **summary**: The relay chain block number associated with the last parachain block. @@ -492,6 +994,15 @@ ___ ___ +## parameters + +### parameters(`AssetHubPolkadotRuntimeRuntimeParametersKey`): `Option` +- **interface**: `api.query.parameters.parameters` +- **summary**: Stored parameters. + +___ + + ## polkadotXcm ### assetTraps(`H256`): `u32` @@ -592,19 +1103,87 @@ ___ ___ +## preimage + +### preimageFor(`(H256,u32)`): `Option` +- **interface**: `api.query.preimage.preimageFor` + +### requestStatusFor(`H256`): `Option` +- **interface**: `api.query.preimage.requestStatusFor` +- **summary**: The request status of a given hash. + +### statusFor(`H256`): `Option` +- **interface**: `api.query.preimage.statusFor` +- **summary**: The request status of a given hash. + +___ + + ## proxy ### announcements(`AccountId32`): `(Vec,u128)` - **interface**: `api.query.proxy.announcements` - **summary**: The announcements made by the proxy (key). -### proxies(`AccountId32`): `(Vec,u128)` +### proxies(`AccountId32`): `(Vec,u128)` - **interface**: `api.query.proxy.proxies` - **summary**: The set of account proxies. Maps the account which has delegated to the accounts which are being delegated to, together with the amount held on deposit. ___ +## referenda + +### decidingCount(`u16`): `u32` +- **interface**: `api.query.referenda.decidingCount` +- **summary**: The number of referenda being decided currently. + +### metadataOf(`u32`): `Option` +- **interface**: `api.query.referenda.metadataOf` +- **summary**: The metadata is a general information concerning the referendum. The `Hash` refers to the preimage of the `Preimages` provider which can be a JSON dump or IPFS hash of a JSON file. + + Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove) large preimages. + +### referendumCount(): `u32` +- **interface**: `api.query.referenda.referendumCount` +- **summary**: The next free referendum index, aka the number of referenda started so far. + +### referendumInfoFor(`u32`): `Option` +- **interface**: `api.query.referenda.referendumInfoFor` +- **summary**: Information concerning any given referendum. + +### trackQueue(`u16`): `Vec<(u32,u128)>` +- **interface**: `api.query.referenda.trackQueue` +- **summary**: The sorted list of referenda ready to be decided but not yet being decided, ordered by conviction-weighted approvals. + + This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`. + +___ + + +## scheduler + +### agenda(`u32`): `Vec>` +- **interface**: `api.query.scheduler.agenda` +- **summary**: Items to be executed, indexed by the block number that they should be executed on. + +### incompleteSince(): `Option` +- **interface**: `api.query.scheduler.incompleteSince` +- **summary**: Block number at which the agenda began incomplete execution. + +### lookup(`[u8;32]`): `Option<(u32,u32)>` +- **interface**: `api.query.scheduler.lookup` +- **summary**: Lookup from a name to the block number and index of the task. + + For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4 identities. + +### retries(`(u32,u32)`): `Option` +- **interface**: `api.query.scheduler.retries` +- **summary**: Retry configurations for items to be executed, indexed by task address. + +___ + + ## session ### currentIndex(): `u32` @@ -640,6 +1219,295 @@ ___ ___ +## snowbridgeSystemFrontend + +### exportOperatingMode(): `SnowbridgeCoreOperatingModeBasicOperatingMode` +- **interface**: `api.query.snowbridgeSystemFrontend.exportOperatingMode` +- **summary**: The current operating mode for exporting to Ethereum. + +___ + + +## staking + +### activeEra(): `Option` +- **interface**: `api.query.staking.activeEra` +- **summary**: The active era information, it holds index and start. + + The active era is the era being currently rewarded. Validator set of this era must be equal to what is RC's session pallet. + +### bonded(`AccountId32`): `Option` +- **interface**: `api.query.staking.bonded` +- **summary**: Map from all locked "stash" accounts to the controller account. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### bondedEras(): `Vec<(u32,u32)>` +- **interface**: `api.query.staking.bondedEras` +- **summary**: A mapping from still-bonded eras to the first session index of that era. + + Must contains information for eras for the range: `[active_era - bounding_duration; active_era]` + +### canceledSlashPayout(): `u128` +- **interface**: `api.query.staking.canceledSlashPayout` +- **summary**: The amount of currency given to reporters of a slash event which was canceled by extraordinary circumstances (e.g. governance). + +### cancelledSlashes(`u32`): `Vec<(AccountId32,Perbill)>` +- **interface**: `api.query.staking.cancelledSlashes` +- **summary**: Cancelled slashes by era and validator with maximum slash fraction to be cancelled. + + When slashes are cancelled by governance, this stores the era and the validators whose slashes should be cancelled, along with the maximum slash fraction that should be cancelled for each validator. + +### chillThreshold(): `Option` +- **interface**: `api.query.staking.chillThreshold` +- **summary**: The threshold for when users can start calling `chill_other` for other validators / nominators. The threshold is compared to the actual number of validators / nominators (`CountFor*`) in the system compared to the configured max (`Max*Count`). + +### claimedRewards(`u32, AccountId32`): `Vec` +- **interface**: `api.query.staking.claimedRewards` +- **summary**: History of claimed paged rewards by era and validator. + + This is keyed by era and validator stash which maps to the set of page indexes which have been claimed. + + It is removed after [`Config::HistoryDepth`] eras. + +### counterForNominators(): `u32` +- **interface**: `api.query.staking.counterForNominators` +- **summary**: Counter for the related counted storage map + +### counterForValidators(): `u32` +- **interface**: `api.query.staking.counterForValidators` +- **summary**: Counter for the related counted storage map + +### counterForVirtualStakers(): `u32` +- **interface**: `api.query.staking.counterForVirtualStakers` +- **summary**: Counter for the related counted storage map + +### currentEra(): `Option` +- **interface**: `api.query.staking.currentEra` +- **summary**: The current planned era index. + + This is the latest planned era, depending on how the Session pallet queues the validator set, it might be active or not. + +### electableStashes(): `BTreeSet` +- **interface**: `api.query.staking.electableStashes` +- **summary**: A bounded list of the "electable" stashes that resulted from a successful election. + +### eraPruningState(`u32`): `Option` +- **interface**: `api.query.staking.eraPruningState` +- **summary**: Tracks the current step of era pruning process for each era being lazily pruned. + +### erasRewardPoints(`u32`): `PalletStakingAsyncEraRewardPoints` +- **interface**: `api.query.staking.erasRewardPoints` +- **summary**: Rewards for the last [`Config::HistoryDepth`] eras. If reward hasn't been set or has been removed then 0 reward is returned. + +### erasStakersOverview(`u32, AccountId32`): `Option` +- **interface**: `api.query.staking.erasStakersOverview` +- **summary**: Summary of validator exposure at a given era. + + This contains the total stake in support of the validator and their own stake. In addition, it can also be used to get the number of nominators backing this validator and the number of exposure pages they are divided into. The page count is useful to determine the number of pages of rewards that needs to be claimed. + + This is keyed first by the era index to allow bulk deletion and then the stash account. Should only be accessed through `Eras`. + + Is it removed after [`Config::HistoryDepth`] eras. If stakers hasn't been set or has been removed then empty overview is returned. + +### erasStakersPaged(`u32, AccountId32, u32`): `Option` +- **interface**: `api.query.staking.erasStakersPaged` +- **summary**: Paginated exposure of a validator at given era. + + This is keyed first by the era index to allow bulk deletion, then stash account and finally the page. Should only be accessed through `Eras`. + + This is cleared after [`Config::HistoryDepth`] eras. + +### erasTotalStake(`u32`): `u128` +- **interface**: `api.query.staking.erasTotalStake` +- **summary**: The total amount staked for the last [`Config::HistoryDepth`] eras. If total hasn't been set or has been removed then 0 stake is returned. + +### erasValidatorPrefs(`u32, AccountId32`): `PalletStakingAsyncValidatorPrefs` +- **interface**: `api.query.staking.erasValidatorPrefs` +- **summary**: Exposure of validator at era with the preferences of validators. + + This is keyed first by the era index to allow bulk deletion and then the stash account. + + Is it removed after [`Config::HistoryDepth`] eras. + +### erasValidatorReward(`u32`): `Option` +- **interface**: `api.query.staking.erasValidatorReward` +- **summary**: The total validator era payout for the last [`Config::HistoryDepth`] eras. + + Eras that haven't finished yet or has been removed doesn't have reward. + +### forceEra(): `PalletStakingAsyncForcing` +- **interface**: `api.query.staking.forceEra` +- **summary**: Mode of era forcing. + +### invulnerables(): `Vec` +- **interface**: `api.query.staking.invulnerables` +- **summary**: Any validators that may never be slashed or forcibly kicked. It's a Vec since they're easy to initialize and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets. + +### ledger(`AccountId32`): `Option` +- **interface**: `api.query.staking.ledger` +- **summary**: Map from all (unlocked) "controller" accounts to the info regarding the staking. + + Note: All the reads and mutations to this storage *MUST* be done through the methods exposed by [`StakingLedger`] to ensure data and lock consistency. + +### maxNominatorsCount(): `Option` +- **interface**: `api.query.staking.maxNominatorsCount` +- **summary**: The maximum nominator count before we stop allowing new validators to join. + + When this value is not set, no limits are enforced. + +### maxStakedRewards(): `Option` +- **interface**: `api.query.staking.maxStakedRewards` +- **summary**: Maximum staked rewards, i.e. the percentage of the era inflation that is used for stake rewards. See [Era payout](./index.html#era-payout). + +### maxValidatorsCount(): `Option` +- **interface**: `api.query.staking.maxValidatorsCount` +- **summary**: The maximum validator count before we stop allowing new validators to join. + + When this value is not set, no limits are enforced. + +### minCommission(): `Perbill` +- **interface**: `api.query.staking.minCommission` +- **summary**: The minimum amount of commission that validators can set. + + If set to `0`, no limit exists. + +### minimumActiveStake(): `u128` +- **interface**: `api.query.staking.minimumActiveStake` +- **summary**: The minimum active nominator stake of the last successful election. + +### minNominatorBond(): `u128` +- **interface**: `api.query.staking.minNominatorBond` +- **summary**: The minimum active bond to become and maintain the role of a nominator. + +### minValidatorBond(): `u128` +- **interface**: `api.query.staking.minValidatorBond` +- **summary**: The minimum active bond to become and maintain the role of a validator. + +### nextElectionPage(): `Option` +- **interface**: `api.query.staking.nextElectionPage` +- **summary**: Keeps track of an ongoing multi-page election solution request. + + If `Some(_)``, it is the next page that we intend to elect. If `None`, we are not in the election process. + + This is only set in multi-block elections. Should always be `None` otherwise. + +### nominators(`AccountId32`): `Option` +- **interface**: `api.query.staking.nominators` +- **summary**: The map from nominator stash key to their nomination preferences, namely the validators that they wish to support. + + Note that the keys of this storage map might become non-decodable in case the account's [`NominationsQuota::MaxNominations`] configuration is decreased. In this rare case, these nominators are still existent in storage, their key is correct and retrievable (i.e. `contains_key` indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable nominators will effectively not-exist, until they re-submit their preferences such that it is within the bounds of the newly set `Config::MaxNominations`. + + This implies that `::iter_keys().count()` and `::iter().count()` might return different values for this map. Moreover, the main `::count()` is aligned with the former, namely the number of keys that exist. + + Lastly, if any of the nominators become non-decodable, they can be chilled immediately via [`Call::chill_other`] dispatchable by anyone. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### offenceQueue(`u32, AccountId32`): `Option` +- **interface**: `api.query.staking.offenceQueue` +- **summary**: Stores reported offences in a queue until they are processed in subsequent blocks. + + Each offence is recorded under the corresponding era index and the offending validator's account. If an offence spans multiple pages, only one page is processed at a time. Offences are handled sequentially, with their associated slashes computed and stored in `UnappliedSlashes`. These slashes are then applied in a future era as determined by `SlashDeferDuration`. + + Any offences tied to an era older than `BondingDuration` are automatically dropped. Processing always prioritizes the oldest era first. + +### offenceQueueEras(): `Option>` +- **interface**: `api.query.staking.offenceQueueEras` +- **summary**: Tracks the eras that contain offences in `OffenceQueue`, sorted from **earliest to latest**. + + - This ensures efficient retrieval of the oldest offence without iterating through `OffenceQueue`. + + - When a new offence is added to `OffenceQueue`, its era is **inserted in sorted order** if not already present. + + - When all offences for an era are processed, it is **removed** from this list. + + - The maximum length of this vector is bounded by `BondingDuration`. + + This eliminates the need for expensive iteration and sorting when fetching the next offence to process. + +### payee(`AccountId32`): `Option` +- **interface**: `api.query.staking.payee` +- **summary**: Where the reward payment should be made. Keyed by stash. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### processingOffence(): `Option<(u32,AccountId32,PalletStakingAsyncSlashingOffenceRecord)>` +- **interface**: `api.query.staking.processingOffence` +- **summary**: Tracks the currently processed offence record from the `OffenceQueue`. + + - When processing offences, an offence record is **popped** from the oldest era in `OffenceQueue` and stored here. + + - The function `process_offence` reads from this storage, processing one page of exposure at a time. + + - After processing a page, the `exposure_page` count is **decremented** until it reaches zero. + + - Once fully processed, the offence record is removed from this storage. + + This ensures that offences are processed incrementally, preventing excessive computation in a single block while maintaining correct slashing behavior. + +### slashRewardFraction(): `Perbill` +- **interface**: `api.query.staking.slashRewardFraction` +- **summary**: The percentage of the slash that is distributed to reporters. + + The rest of the slashed value is handled by the `Slash`. + +### unappliedSlashes(`u32, (AccountId32,Perbill,u32)`): `Option` +- **interface**: `api.query.staking.unappliedSlashes` +- **summary**: All unapplied slashes that are queued for later. + +### validatorCount(): `u32` +- **interface**: `api.query.staking.validatorCount` +- **summary**: The ideal number of active validators. + +### validators(`AccountId32`): `PalletStakingAsyncValidatorPrefs` +- **interface**: `api.query.staking.validators` +- **summary**: The map from (wannabe) validator stash key to the preferences of that validator. + + TWOX-NOTE: SAFE since `AccountId` is a secure hash. + +### validatorSlashInEra(`u32, AccountId32`): `Option<(Perbill,u128)>` +- **interface**: `api.query.staking.validatorSlashInEra` +- **summary**: All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era. + +### virtualStakers(`AccountId32`): `Option` +- **interface**: `api.query.staking.virtualStakers` +- **summary**: Stakers whose funds are managed by other pallets. + + This pallet does not apply any locks on them, therefore they are only virtually bonded. They are expected to be keyless accounts and hence should not be allowed to mutate their ledger directly via this pallet. Instead, these accounts are managed by other pallets and accessed via low level apis. We keep track of them to do minimal integrity checks. + +### voterSnapshotStatus(): `PalletStakingAsyncSnapshotStatus` +- **interface**: `api.query.staking.voterSnapshotStatus` +- **summary**: Voter snapshot progress status. + + If the status is `Ongoing`, it keeps a cursor of the last voter retrieved to proceed when creating the next snapshot page. + +___ + + +## stakingRcClient + +### incompleteSessionReport(): `Option` +- **interface**: `api.query.stakingRcClient.incompleteSessionReport` +- **summary**: An incomplete incoming session report that we have not acted upon yet. + +### lastSessionReportEndingIndex(): `Option` +- **interface**: `api.query.stakingRcClient.lastSessionReportEndingIndex` +- **summary**: The last session report's `end_index` that we have acted upon. + + This allows this pallet to ensure a sequentially increasing sequence of session reports passed to staking. + + Note that with the XCM being the backbone of communication, we have a guarantee on the ordering of messages. As long as the RC sends session reports in order, we _eventually_ receive them in the same correct order as well. + +### outgoingValidatorSet(): `Option<(PalletStakingAsyncRcClientValidatorSetReport,u32)>` +- **interface**: `api.query.stakingRcClient.outgoingValidatorSet` +- **summary**: A validator set that is outgoing, and should be sent. + + This will be attempted to be sent, possibly on every `on_initialize` call, until it is sent, or the second value reaches zero, at which point we drop it. + +___ + + ## stateTrieMigration ### autoLimits(): `Option` @@ -836,6 +1704,45 @@ ___ ___ +## treasury + +### approvals(): `Vec` +- **interface**: `api.query.treasury.approvals` +- **summary**: DEPRECATED: associated with `spend_local` call and will be removed in May 2025. Refer to for migration to `spend`. + + Proposal indices that have been approved but not yet awarded. + +### deactivated(): `u128` +- **interface**: `api.query.treasury.deactivated` +- **summary**: The amount which has been reported as inactive to Currency. + +### lastSpendPeriod(): `Option` +- **interface**: `api.query.treasury.lastSpendPeriod` +- **summary**: The blocknumber for the last triggered spend period. + +### proposalCount(): `u32` +- **interface**: `api.query.treasury.proposalCount` +- **summary**: DEPRECATED: associated with `spend_local` call and will be removed in May 2025. Refer to for migration to `spend`. + + Number of proposals that have been made. + +### proposals(`u32`): `Option` +- **interface**: `api.query.treasury.proposals` +- **summary**: DEPRECATED: associated with `spend_local` call and will be removed in May 2025. Refer to for migration to `spend`. + + Proposals that have been made. + +### spendCount(): `u32` +- **interface**: `api.query.treasury.spendCount` +- **summary**: The count of spends that have been made. + +### spends(`u32`): `Option` +- **interface**: `api.query.treasury.spends` +- **summary**: Spends that have been approved and being processed. + +___ + + ## uniques ### account(`AccountId32, u32, u32`): `Option` @@ -896,6 +1803,45 @@ ___ ___ +## voterList + +### counterForListNodes(): `u32` +- **interface**: `api.query.voterList.counterForListNodes` +- **summary**: Counter for the related counted storage map + +### listBags(`u64`): `Option` +- **interface**: `api.query.voterList.listBags` +- **summary**: A bag stored in storage. + + Stores a `Bag` struct, which stores head and tail pointers to itself. + +### listNodes(`AccountId32`): `Option` +- **interface**: `api.query.voterList.listNodes` +- **summary**: A single node, within some bag. + + Nodes store links forward and back within their respective bags. + +### lock(): `Option` +- **interface**: `api.query.voterList.lock` +- **summary**: Lock all updates to this pallet. + + If any nodes needs updating, removal or addition due to a temporary lock, the [`Call::rebag`] can be used. + +### nextNodeAutoRebagged(): `Option` +- **interface**: `api.query.voterList.nextNodeAutoRebagged` +- **summary**: Pointer that remembers the next node that will be auto-rebagged. When `None`, the next scan will start from the list head again. + +___ + + +## whitelist + +### whitelistedCall(`H256`): `Option` +- **interface**: `api.query.whitelist.whitelistedCall` + +___ + + ## xcmpQueue ### deliveryFeeFactor(`u32`): `u128` diff --git a/docs/kusama/constants.md b/docs/kusama/constants.md index e0655e751..f4b7e7449 100644 --- a/docs/kusama/constants.md +++ b/docs/kusama/constants.md @@ -42,10 +42,6 @@ The following sections contain the module constants, also known as parameter typ - **[multisig](#multisig)** -- **[nis](#nis)** - -- **[nisCounterpartBalances](#niscounterpartbalances)** - - **[nominationPools](#nominationpools)** - **[onDemandAssignmentProvider](#ondemandassignmentprovider)** @@ -62,6 +58,8 @@ The following sections contain the module constants, also known as parameter typ - **[scheduler](#scheduler)** +- **[session](#session)** + - **[slots](#slots)** - **[society](#society)** @@ -312,9 +310,15 @@ ___ - **interface**: `api.consts.electionProviderMultiPhase.betterSignedThreshold` - **summary**: The minimum amount of improvement to the solution score that defines a solution as "better" in the Signed phase. +### maxBackersPerWinner: `u32` +- **interface**: `api.consts.electionProviderMultiPhase.maxBackersPerWinner` +- **summary**: Maximum number of voters that can support a winner in an election solution. + + This is needed to ensure election computation is bounded. + ### maxWinners: `u32` - **interface**: `api.consts.electionProviderMultiPhase.maxWinners` -- **summary**: The maximum number of winners that can be elected by this `ElectionProvider` implementation. +- **summary**: Maximum number of winners that an election supports. Note: This must always be greater or equal to `T::DataProvider::desired_targets()`. @@ -483,88 +487,6 @@ ___ ___ -## nis - -### basePeriod: `u32` -- **interface**: `api.consts.nis.basePeriod` -- **summary**: The base period for the duration queues. This is the common multiple across all supported freezing durations that can be bid upon. - -### fifoQueueLen: `u32` -- **interface**: `api.consts.nis.fifoQueueLen` -- **summary**: Portion of the queue which is free from ordering and just a FIFO. - - Must be no greater than `MaxQueueLen`. - -### intakePeriod: `u32` -- **interface**: `api.consts.nis.intakePeriod` -- **summary**: The number of blocks between consecutive attempts to dequeue bids and create receipts. - - A larger value results in fewer storage hits each block, but a slower period to get to the target. - -### maxIntakeWeight: `SpWeightsWeightV2Weight` -- **interface**: `api.consts.nis.maxIntakeWeight` -- **summary**: The maximum amount of bids that can consolidated into receipts in a single intake. A larger value here means less of the block available for transactions should there be a glut of bids. - -### maxQueueLen: `u32` -- **interface**: `api.consts.nis.maxQueueLen` -- **summary**: Maximum number of items that may be in each duration queue. - - Must be larger than zero. - -### minBid: `u128` -- **interface**: `api.consts.nis.minBid` -- **summary**: The minimum amount of funds that may be placed in a bid. Note that this does not actually limit the amount which may be represented in a receipt since bids may be split up by the system. - - It should be at least big enough to ensure that there is no possible storage spam attack or queue-filling attack. - -### minReceipt: `Perquintill` -- **interface**: `api.consts.nis.minReceipt` -- **summary**: The minimum amount of funds which may intentionally be left remaining under a single receipt. - -### palletId: `FrameSupportPalletId` -- **interface**: `api.consts.nis.palletId` -- **summary**: The treasury's pallet id, used for deriving its sovereign account ID. - -### queueCount: `u32` -- **interface**: `api.consts.nis.queueCount` -- **summary**: Number of duration queues in total. This sets the maximum duration supported, which is this value multiplied by `Period`. - -### thawThrottle: `(Perquintill,u32)` -- **interface**: `api.consts.nis.thawThrottle` -- **summary**: The maximum proportion which may be thawed and the period over which it is reset. - -___ - - -## nisCounterpartBalances - -### existentialDeposit: `u128` -- **interface**: `api.consts.nisCounterpartBalances.existentialDeposit` -- **summary**: The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO! - - If you *really* need it to be zero, you can enable the feature `insecure_zero_ed` for this pallet. However, you do so at your own risk: this will open up a major DoS vector. In case you have multiple sources of provider references, you may also get unexpected behaviour if you set this to zero. - - Bottom line: Do yourself a favour and make it at least one! - -### maxFreezes: `u32` -- **interface**: `api.consts.nisCounterpartBalances.maxFreezes` -- **summary**: The maximum number of individual freeze locks that can exist on an account at any time. - -### maxLocks: `u32` -- **interface**: `api.consts.nisCounterpartBalances.maxLocks` -- **summary**: The maximum number of locks that should exist on an account. Not strictly enforced, but used for weight estimation. - - Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` - -### maxReserves: `u32` -- **interface**: `api.consts.nisCounterpartBalances.maxReserves` -- **summary**: The maximum number of named reserves that can exist on an account. - - Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` - -___ - - ## nominationPools ### maxPointsToBalance: `u8` @@ -734,6 +656,15 @@ ___ ___ +## session + +### keyDeposit: `u128` +- **interface**: `api.consts.session.keyDeposit` +- **summary**: The amount to be held when setting keys. + +___ + + ## slots ### leaseOffset: `u32` @@ -751,11 +682,11 @@ ___ ### challengePeriod: `u32` - **interface**: `api.consts.society.challengePeriod` -- **summary**: The number of blocks between membership challenges. +- **summary**: The number of [Config::BlockNumberProvider] blocks between membership challenges. ### claimPeriod: `u32` - **interface**: `api.consts.society.claimPeriod` -- **summary**: The number of blocks on which new candidates can claim their membership and be the named head. +- **summary**: The number of [Config::BlockNumberProvider] blocks on which new candidates can claim their membership and be the named head. ### graceStrikes: `u32` - **interface**: `api.consts.society.graceStrikes` @@ -783,7 +714,7 @@ ___ ### votingPeriod: `u32` - **interface**: `api.consts.society.votingPeriod` -- **summary**: The number of blocks on which new candidates should be voted on. Together with `ClaimPeriod`, this sums to the number of blocks between candidate intake periods. +- **summary**: The number of [Config::BlockNumberProvider] blocks on which new candidates should be voted on. Together with `ClaimPeriod`, this sums to the number of blocks between candidate intake periods. ___ @@ -822,6 +753,10 @@ ___ Note: `MaxUnlockingChunks` is used as the upper bound for the `BoundedVec` item `StakingLedger.unlocking`. Setting this value lower than the existing value can lead to inconsistencies in the `StakingLedger` and will need to be handled properly in a runtime migration. The test `reducing_max_unlocking_chunks_abrupt` shows this effect. +### maxValidatorSet: `u32` +- **interface**: `api.consts.staking.maxValidatorSet` +- **summary**: The absolute maximum of winner validators this pallet should return. + ### sessionsPerEra: `u32` - **interface**: `api.consts.staking.sessionsPerEra` - **summary**: Number of sessions per era. @@ -983,6 +918,12 @@ ___ #### Migration In the event that this list ever changes, a copy of the old bags list must be retained. With that `List::migrate` can be called, which will perform the appropriate migration. + +### maxAutoRebagPerBlock: `u32` +- **interface**: `api.consts.voterList.maxAutoRebagPerBlock` +- **summary**: Maximum number of accounts that may be re-bagged automatically in `on_idle`. + + A value of `0` (obtained by configuring `type MaxAutoRebagPerBlock = ();`) disables the feature. ___ @@ -992,3 +933,15 @@ ___ ### advertisedXcmVersion: `u32` - **interface**: `api.consts.xcmPallet.advertisedXcmVersion` - **summary**: The latest supported version that we advertise. Generally just set it to `pallet_xcm::CurrentXcmVersion`. + +### maxLockers: `u32` +- **interface**: `api.consts.xcmPallet.maxLockers` +- **summary**: The maximum number of local XCM locks that a single account may have. + +### maxRemoteLockConsumers: `u32` +- **interface**: `api.consts.xcmPallet.maxRemoteLockConsumers` +- **summary**: The maximum number of consumers a single remote lock may have. + +### universalLocation: `StagingXcmV5Junctions` +- **interface**: `api.consts.xcmPallet.universalLocation` +- **summary**: This chain's Universal Location. diff --git a/docs/kusama/errors.md b/docs/kusama/errors.md index 85a137374..6ffbf9841 100644 --- a/docs/kusama/errors.md +++ b/docs/kusama/errors.md @@ -52,10 +52,6 @@ This page lists the errors that can be encountered in the different modules. - **[multisig](#multisig)** -- **[nis](#nis)** - -- **[nisCounterpartBalances](#niscounterpartbalances)** - - **[nominationPools](#nominationpools)** - **[onDemandAssignmentProvider](#ondemandassignmentprovider)** @@ -74,6 +70,8 @@ This page lists the errors that can be encountered in the different modules. - **[proxy](#proxy)** +- **[rcMigrator](#rcmigrator)** + - **[recovery](#recovery)** - **[referenda](#referenda)** @@ -90,6 +88,8 @@ This page lists the errors that can be encountered in the different modules. - **[staking](#staking)** +- **[stakingAhClient](#stakingahclient)** + - **[system](#system)** - **[treasury](#treasury)** @@ -287,6 +287,10 @@ ___ - **interface**: `api.errors.bounties.InvalidValue.is` - **summary**: Invalid bounty value. +### NotProposer +- **interface**: `api.errors.bounties.NotProposer.is` +- **summary**: User is not the proposer of the bounty. + ### PendingPayout - **interface**: `api.errors.bounties.PendingPayout.is` - **summary**: A bounty payout is pending. To cancel the bounty, you must unassign and slash the curator. @@ -1058,124 +1062,6 @@ ___ ___ -## nis - -### AlreadyCommunal -- **interface**: `api.errors.nis.AlreadyCommunal.is` -- **summary**: The receipt is already communal. - -### AlreadyFunded -- **interface**: `api.errors.nis.AlreadyFunded.is` -- **summary**: There are enough funds for what is required. - -### AlreadyPrivate -- **interface**: `api.errors.nis.AlreadyPrivate.is` -- **summary**: The receipt is already private. - -### AmountTooSmall -- **interface**: `api.errors.nis.AmountTooSmall.is` -- **summary**: The amount of the bid is less than the minimum allowed. - -### BidTooLow -- **interface**: `api.errors.nis.BidTooLow.is` -- **summary**: The queue for the bid's duration is full and the amount bid is too low to get in through replacing an existing bid. - -### DurationTooBig -- **interface**: `api.errors.nis.DurationTooBig.is` -- **summary**: The duration is the bid is greater than the number of queues. - -### DurationTooSmall -- **interface**: `api.errors.nis.DurationTooSmall.is` -- **summary**: The duration of the bid is less than one. - -### MakesDust -- **interface**: `api.errors.nis.MakesDust.is` -- **summary**: The operation would result in a receipt worth an insignificant value. - -### NotExpired -- **interface**: `api.errors.nis.NotExpired.is` -- **summary**: Bond not yet at expiry date. - -### NotOwner -- **interface**: `api.errors.nis.NotOwner.is` -- **summary**: Not the owner of the receipt. - -### PortionTooBig -- **interface**: `api.errors.nis.PortionTooBig.is` -- **summary**: The portion supplied is beyond the value of the receipt. - -### Throttled -- **interface**: `api.errors.nis.Throttled.is` -- **summary**: The thaw throttle has been reached for this period. - -### Unfunded -- **interface**: `api.errors.nis.Unfunded.is` -- **summary**: Not enough funds are held to pay out. - -### UnknownBid -- **interface**: `api.errors.nis.UnknownBid.is` -- **summary**: The given bid for retraction is not found. - -### UnknownReceipt -- **interface**: `api.errors.nis.UnknownReceipt.is` -- **summary**: Receipt index is unknown. - -___ - - -## nisCounterpartBalances - -### DeadAccount -- **interface**: `api.errors.nisCounterpartBalances.DeadAccount.is` -- **summary**: Beneficiary account must pre-exist. - -### DeltaZero -- **interface**: `api.errors.nisCounterpartBalances.DeltaZero.is` -- **summary**: The delta cannot be zero. - -### ExistentialDeposit -- **interface**: `api.errors.nisCounterpartBalances.ExistentialDeposit.is` -- **summary**: Value too low to create account due to existential deposit. - -### ExistingVestingSchedule -- **interface**: `api.errors.nisCounterpartBalances.ExistingVestingSchedule.is` -- **summary**: A vesting schedule already exists for this account. - -### Expendability -- **interface**: `api.errors.nisCounterpartBalances.Expendability.is` -- **summary**: Transfer/payment would kill account. - -### InsufficientBalance -- **interface**: `api.errors.nisCounterpartBalances.InsufficientBalance.is` -- **summary**: Balance too low to send value. - -### IssuanceDeactivated -- **interface**: `api.errors.nisCounterpartBalances.IssuanceDeactivated.is` -- **summary**: The issuance cannot be modified since it is already deactivated. - -### LiquidityRestrictions -- **interface**: `api.errors.nisCounterpartBalances.LiquidityRestrictions.is` -- **summary**: Account liquidity restrictions prevent withdrawal. - -### TooManyFreezes -- **interface**: `api.errors.nisCounterpartBalances.TooManyFreezes.is` -- **summary**: Number of freezes exceed `MaxFreezes`. - -### TooManyHolds -- **interface**: `api.errors.nisCounterpartBalances.TooManyHolds.is` -- **summary**: Number of holds exceed `VariantCountOf`. - -### TooManyReserves -- **interface**: `api.errors.nisCounterpartBalances.TooManyReserves.is` -- **summary**: Number of named reserves exceed `MaxReserves`. - -### VestingBalance -- **interface**: `api.errors.nisCounterpartBalances.VestingBalance.is` -- **summary**: Vesting balance too high to send value. - -___ - - ## nominationPools ### AccountBelongsToOtherPool @@ -1468,10 +1354,18 @@ ___ - **interface**: `api.errors.paras.CannotUpgradeCode.is` - **summary**: Parachain cannot currently schedule a code upgrade. +### InvalidBlockNumber +- **interface**: `api.errors.paras.InvalidBlockNumber.is` +- **summary**: Invalid block number. + ### InvalidCode - **interface**: `api.errors.paras.InvalidCode.is` - **summary**: Invalid validation code size. +### NothingAuthorized +- **interface**: `api.errors.paras.NothingAuthorized.is` +- **summary**: No upgrade authorized. + ### NotRegistered - **interface**: `api.errors.paras.NotRegistered.is` - **summary**: Para is not registered in our system. @@ -1499,6 +1393,10 @@ ___ ### PvfCheckValidatorIndexOutOfBounds - **interface**: `api.errors.paras.PvfCheckValidatorIndexOutOfBounds.is` - **summary**: Claimed validator index is out of bounds. + +### Unauthorized +- **interface**: `api.errors.paras.Unauthorized.is` +- **summary**: The submitted code is not authorized. ___ @@ -1647,6 +1545,83 @@ ___ ___ +## rcMigrator + +### AccountReferenced +- **interface**: `api.errors.rcMigrator.AccountReferenced.is` +- **summary**: The account is referenced by some other pallet. It might have freezes or holds. + +### AhUmpQueuePriorityAlreadySet +- **interface**: `api.errors.rcMigrator.AhUmpQueuePriorityAlreadySet.is` +- **summary**: The AH UMP queue priority configuration is already set. + +### BadXcmVersion +- **interface**: `api.errors.rcMigrator.BadXcmVersion.is` +- **summary**: The XCM version is invalid. + +### BalanceOverflow +- **interface**: `api.errors.rcMigrator.BalanceOverflow.is` +- **summary**: Balance accounting overflow. + +### BalanceUnderflow +- **interface**: `api.errors.rcMigrator.BalanceUnderflow.is` +- **summary**: Balance accounting underflow. + +### EraEndsTooSoon +- **interface**: `api.errors.rcMigrator.EraEndsTooSoon.is` +- **summary**: Indicates that there is not enough time for staking to lock. + + Schedule the migration at least two sessions before the current era ends. + +### FailedToWithdrawAccount +- **interface**: `api.errors.rcMigrator.FailedToWithdrawAccount.is` +- **summary**: Failed to withdraw account from RC for migration to AH. + +### InvalidOrigin +- **interface**: `api.errors.rcMigrator.InvalidOrigin.is` +- **summary**: The origin is invalid. + +### InvalidParameter +- **interface**: `api.errors.rcMigrator.InvalidParameter.is` +- **summary**: Invalid parameter. + +### InvalidQueryResponse +- **interface**: `api.errors.rcMigrator.InvalidQueryResponse.is` +- **summary**: The query response is invalid. + +### InvalidStageTransition +- **interface**: `api.errors.rcMigrator.InvalidStageTransition.is` +- **summary**: The stage transition is invalid. + +### OutOfWeight +- **interface**: `api.errors.rcMigrator.OutOfWeight.is` + +### PastBlockNumber +- **interface**: `api.errors.rcMigrator.PastBlockNumber.is` +- **summary**: Indicates that the specified block number is in the past. + +### QueryNotFound +- **interface**: `api.errors.rcMigrator.QueryNotFound.is` +- **summary**: The xcm query was not found. + +### Unreachable +- **interface**: `api.errors.rcMigrator.Unreachable.is` + +### UnreachableStage +- **interface**: `api.errors.rcMigrator.UnreachableStage.is` +- **summary**: The migration stage is not reachable from the current stage. + +### XcmError +- **interface**: `api.errors.rcMigrator.XcmError.is` +- **summary**: Failed to send XCM message to AH. + +### XcmSendError +- **interface**: `api.errors.rcMigrator.XcmSendError.is` +- **summary**: Failed to send XCM message. + +___ + + ## recovery ### AlreadyProxy @@ -1967,6 +1942,10 @@ ___ - **interface**: `api.errors.society.NoDefender.is` - **summary**: There is no defender currently. +### NoDeposit +- **interface**: `api.errors.society.NoDeposit.is` +- **summary**: There is no deposit associated with a bid. + ### NoPayout - **interface**: `api.errors.society.NoPayout.is` - **summary**: Nothing to payout. @@ -2175,6 +2154,15 @@ ___ ___ +## stakingAhClient + +### Blocked +- **interface**: `api.errors.stakingAhClient.Blocked.is` +- **summary**: Could not process incoming message because incoming messages are blocked. + +___ + + ## system ### CallFiltered @@ -2306,6 +2294,10 @@ ___ ### List - **interface**: `api.errors.voterList.List.is` - **summary**: A error in the list interface implementation. + +### Locked +- **interface**: `api.errors.voterList.Locked.is` +- **summary**: Could not update a node, because the pallet is locked. ___ @@ -2405,6 +2397,10 @@ ___ - **interface**: `api.errors.xcmPallet.LocalExecutionIncomplete.is` - **summary**: Local XCM execution incomplete. +### LocalExecutionIncompleteWithError +- **interface**: `api.errors.xcmPallet.LocalExecutionIncompleteWithError.is` +- **summary**: Local XCM execution incomplete with the actual XCM error and the index of the instruction that caused the error. + ### LockNotFound - **interface**: `api.errors.xcmPallet.LockNotFound.is` - **summary**: A remote lock with the corresponding data could not be found. diff --git a/docs/kusama/events.md b/docs/kusama/events.md index 13b1deda1..b82ae9b36 100644 --- a/docs/kusama/events.md +++ b/docs/kusama/events.md @@ -36,6 +36,8 @@ Events are emitted for certain operations on the runtime. The following sections - **[grandpa](#grandpa)** +- **[historical](#historical)** + - **[hrmp](#hrmp)** - **[indices](#indices)** @@ -44,10 +46,6 @@ Events are emitted for certain operations on the runtime. The following sections - **[multisig](#multisig)** -- **[nis](#nis)** - -- **[nisCounterpartBalances](#niscounterpartbalances)** - - **[nominationPools](#nominationpools)** - **[offences](#offences)** @@ -66,6 +64,8 @@ Events are emitted for certain operations on the runtime. The following sections - **[proxy](#proxy)** +- **[rcMigrator](#rcmigrator)** + - **[recovery](#recovery)** - **[referenda](#referenda)** @@ -82,6 +82,8 @@ Events are emitted for certain operations on the runtime. The following sections - **[staking](#staking)** +- **[stakingAhClient](#stakingahclient)** + - **[system](#system)** - **[transactionPayment](#transactionpayment)** @@ -223,6 +225,10 @@ ___ - **interface**: `api.events.balances.Transfer.is` - **summary**: Transfer succeeded. +### Unexpected(`PalletBalancesUnexpectedKind`) +- **interface**: `api.events.balances.Unexpected.is` +- **summary**: An unexpected/defensive event was triggered. + ### Unlocked(`AccountId32`, `u128`) - **interface**: `api.events.balances.Unlocked.is` - **summary**: Some balance was unlocked. @@ -287,6 +293,10 @@ ___ ### CuratorUnassigned(`u32`) - **interface**: `api.events.bounties.CuratorUnassigned.is` - **summary**: A bounty curator is unassigned. + +### DepositPoked(`u32`, `AccountId32`, `u128`, `u128`) +- **interface**: `api.events.bounties.DepositPoked.is` +- **summary**: A bounty deposit has been poked. ___ @@ -594,6 +604,19 @@ ___ ___ +## historical + +### RootsPruned(`u32`) +- **interface**: `api.events.historical.RootsPruned.is` +- **summary**: The merkle roots of up to this session index were pruned + +### RootStored(`u32`) +- **interface**: `api.events.historical.RootStored.is` +- **summary**: The merkle root of the validators of the said session were stored + +___ + + ## hrmp ### ChannelClosed(`u32`, `PolkadotParachainPrimitivesPrimitivesHrmpChannelId`) @@ -694,132 +717,6 @@ ___ ___ -## nis - -### BidDropped(`AccountId32`, `u128`, `u32`) -- **interface**: `api.events.nis.BidDropped.is` -- **summary**: A bid was dropped from a queue because of another, more substantial, bid was present. - -### BidPlaced(`AccountId32`, `u128`, `u32`) -- **interface**: `api.events.nis.BidPlaced.is` -- **summary**: A bid was successfully placed. - -### BidRetracted(`AccountId32`, `u128`, `u32`) -- **interface**: `api.events.nis.BidRetracted.is` -- **summary**: A bid was successfully removed (before being accepted). - -### Funded(`u128`) -- **interface**: `api.events.nis.Funded.is` -- **summary**: An automatic funding of the deficit was made. - -### Issued(`u32`, `u32`, `AccountId32`, `Perquintill`, `u128`) -- **interface**: `api.events.nis.Issued.is` -- **summary**: A bid was accepted. The balance may not be released until expiry. - -### Thawed(`u32`, `AccountId32`, `Perquintill`, `u128`, `bool`) -- **interface**: `api.events.nis.Thawed.is` -- **summary**: An receipt has been (at least partially) thawed. - -### Transferred(`AccountId32`, `AccountId32`, `u32`) -- **interface**: `api.events.nis.Transferred.is` -- **summary**: A receipt was transferred. - -___ - - -## nisCounterpartBalances - -### BalanceSet(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.BalanceSet.is` -- **summary**: A balance was set by root. - -### Burned(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Burned.is` -- **summary**: Some amount was burned from an account. - -### Deposit(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Deposit.is` -- **summary**: Some amount was deposited (e.g. for transaction fees). - -### DustLost(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.DustLost.is` -- **summary**: An account was removed whose balance was non-zero but below ExistentialDeposit, resulting in an outright loss. - -### Endowed(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Endowed.is` -- **summary**: An account was created with some free balance. - -### Frozen(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Frozen.is` -- **summary**: Some balance was frozen. - -### Issued(`u128`) -- **interface**: `api.events.nisCounterpartBalances.Issued.is` -- **summary**: Total issuance was increased by `amount`, creating a credit to be balanced. - -### Locked(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Locked.is` -- **summary**: Some balance was locked. - -### Minted(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Minted.is` -- **summary**: Some amount was minted into an account. - -### Rescinded(`u128`) -- **interface**: `api.events.nisCounterpartBalances.Rescinded.is` -- **summary**: Total issuance was decreased by `amount`, creating a debt to be balanced. - -### Reserved(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Reserved.is` -- **summary**: Some balance was reserved (moved from free to reserved). - -### ReserveRepatriated(`AccountId32`, `AccountId32`, `u128`, `FrameSupportTokensMiscBalanceStatus`) -- **interface**: `api.events.nisCounterpartBalances.ReserveRepatriated.is` -- **summary**: Some balance was moved from the reserve of the first account to the second account. Final argument indicates the destination balance type. - -### Restored(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Restored.is` -- **summary**: Some amount was restored into an account. - -### Slashed(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Slashed.is` -- **summary**: Some amount was removed from the account (e.g. for misbehavior). - -### Suspended(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Suspended.is` -- **summary**: Some amount was suspended from an account (it can be restored later). - -### Thawed(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Thawed.is` -- **summary**: Some balance was thawed. - -### TotalIssuanceForced(`u128`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.TotalIssuanceForced.is` -- **summary**: The `TotalIssuance` was forcefully changed. - -### Transfer(`AccountId32`, `AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Transfer.is` -- **summary**: Transfer succeeded. - -### Unlocked(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Unlocked.is` -- **summary**: Some balance was unlocked. - -### Unreserved(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Unreserved.is` -- **summary**: Some balance was unreserved (moved from reserved to free). - -### Upgraded(`AccountId32`) -- **interface**: `api.events.nisCounterpartBalances.Upgraded.is` -- **summary**: An account was upgraded. - -### Withdraw(`AccountId32`, `u128`) -- **interface**: `api.events.nisCounterpartBalances.Withdraw.is` -- **summary**: Some amount was withdrawn from the account (e.g. for transaction fees). - -___ - - ## nominationPools ### Bonded(`AccountId32`, `u32`, `u128`, `bool`) @@ -993,6 +890,10 @@ ___ - **interface**: `api.events.paras.ActionQueued.is` - **summary**: A para has been queued to execute pending actions. `para_id` +### CodeAuthorized(`u32`, `H256`, `u32`) +- **interface**: `api.events.paras.CodeAuthorized.is` +- **summary**: A new code hash has been authorized for a Para. + ### CodeUpgradeScheduled(`u32`) - **interface**: `api.events.paras.CodeUpgradeScheduled.is` - **summary**: A code upgrade has been scheduled for a Para. `para_id` @@ -1020,6 +921,10 @@ ___ ### PvfCheckStarted(`H256`, `u32`) - **interface**: `api.events.paras.PvfCheckStarted.is` - **summary**: The given para either initiated or subscribed to a PVF check for the given validation code. `code_hash` `para_id` + +### UpgradeCooldownRemoved(`u32`) +- **interface**: `api.events.paras.UpgradeCooldownRemoved.is` +- **summary**: The upgrade cooldown was removed. ___ @@ -1083,6 +988,99 @@ ___ ### PureCreated(`AccountId32`, `AccountId32`, `KusamaRuntimeConstantsProxyProxyType`, `u16`) - **interface**: `api.events.proxy.PureCreated.is` - **summary**: A pure account has been created by new proxy with given disambiguation index and proxy type. + +### PureKilled(`AccountId32`, `AccountId32`, `KusamaRuntimeConstantsProxyProxyType`, `u16`) +- **interface**: `api.events.proxy.PureKilled.is` +- **summary**: A pure proxy was killed by its spawner. + +___ + + +## rcMigrator + +### AccountsPreserved(`Vec`) +- **interface**: `api.events.rcMigrator.AccountsPreserved.is` +- **summary**: The accounts to be preserved on Relay Chain were set. + +### AhUmpQueuePriorityConfigSet(`PalletRcMigratorQueuePriority`, `PalletRcMigratorQueuePriority`) +- **interface**: `api.events.rcMigrator.AhUmpQueuePriorityConfigSet.is` +- **summary**: The AH UMP queue priority config was set. + +### AhUmpQueuePrioritySet(`bool`, `u32`, `u32`) +- **interface**: `api.events.rcMigrator.AhUmpQueuePrioritySet.is` +- **summary**: Whether the AH UMP queue was prioritized for the next block. + +### AssetHubMigrationFinished() +- **interface**: `api.events.rcMigrator.AssetHubMigrationFinished.is` +- **summary**: The Asset Hub Migration finished. + + This event is equivalent to `StageTransition { new: MigrationDone, .. }` but is easier to understand. The finishing is immediate and affects all events happening afterwards. + +### AssetHubMigrationStarted() +- **interface**: `api.events.rcMigrator.AssetHubMigrationStarted.is` +- **summary**: The Asset Hub Migration started and is active until `AssetHubMigrationFinished` is emitted. + + This event is equivalent to `StageTransition { new: Initializing, .. }` but is easier to understand. The activation is immediate and affects all events happening afterwards. + +### CancellerSet(`Option`, `Option`) +- **interface**: `api.events.rcMigrator.CancellerSet.is` +- **summary**: The canceller account id was set. + +### ManagerMultisigDispatched(`Result`) +- **interface**: `api.events.rcMigrator.ManagerMultisigDispatched.is` +- **summary**: The manager multisig dispatched something. + +### ManagerMultisigVoted(`u32`) +- **interface**: `api.events.rcMigrator.ManagerMultisigVoted.is` +- **summary**: The manager multisig received a vote. + +### ManagerSet(`Option`, `Option`) +- **interface**: `api.events.rcMigrator.ManagerSet.is` +- **summary**: The manager account id was set. + +### MigratedBalanceConsumed(`u128`, `u128`) +- **interface**: `api.events.rcMigrator.MigratedBalanceConsumed.is` +- **summary**: The RC kept balance was consumed. + +### MigratedBalanceRecordSet(`u128`, `u128`) +- **interface**: `api.events.rcMigrator.MigratedBalanceRecordSet.is` +- **summary**: The total issuance was recorded. + +### MigrationCancelled() +- **interface**: `api.events.rcMigrator.MigrationCancelled.is` +- **summary**: The migration was cancelled. + +### MigrationPaused(`PalletRcMigratorMigrationStage`) +- **interface**: `api.events.rcMigrator.MigrationPaused.is` +- **summary**: The migration was paused. + +### PureAccountsIndexed(`u32`) +- **interface**: `api.events.rcMigrator.PureAccountsIndexed.is` +- **summary**: Some pure accounts were indexed for possibly receiving free `Any` proxies. + +### QueryResponseReceived(`u64`, `XcmV3MaybeErrorCode`) +- **interface**: `api.events.rcMigrator.QueryResponseReceived.is` +- **summary**: A query response has been received. + +### StageTransition(`PalletRcMigratorMigrationStage`, `PalletRcMigratorMigrationStage`) +- **interface**: `api.events.rcMigrator.StageTransition.is` +- **summary**: A stage transition has occurred. + +### StakingElectionsPaused() +- **interface**: `api.events.rcMigrator.StakingElectionsPaused.is` +- **summary**: The staking elections were paused. + +### UnprocessedMsgBufferSet(`u32`, `u32`) +- **interface**: `api.events.rcMigrator.UnprocessedMsgBufferSet.is` +- **summary**: The unprocessed message buffer size has been set. + +### XcmResendAttempt(`u64`, `Option`) +- **interface**: `api.events.rcMigrator.XcmResendAttempt.is` +- **summary**: A XCM message has been resent. + +### XcmSent(`StagingXcmV5Location`, `StagingXcmV5Location`, `StagingXcmV5Xcm`, `[u8;32]`) +- **interface**: `api.events.rcMigrator.XcmSent.is` +- **summary**: An XCM message was sent. ___ @@ -1093,6 +1091,10 @@ ___ - **interface**: `api.events.recovery.AccountRecovered.is` - **summary**: Lost account has been successfully recovered by rescuer account. +### DepositPoked(`AccountId32`, `PalletRecoveryDepositKind`, `u128`, `u128`) +- **interface**: `api.events.recovery.DepositPoked.is` +- **summary**: A deposit has been updated. + ### RecoveryClosed(`AccountId32`, `AccountId32`) - **interface**: `api.events.recovery.RecoveryClosed.is` - **summary**: A recovery process for lost account by rescuer account has been closed. @@ -1247,6 +1249,10 @@ ___ ## session +### NewQueued() +- **interface**: `api.events.session.NewQueued.is` +- **summary**: The `NewSession` event in the current block also implies a new validator set to be queued. + ### NewSession(`u32`) - **interface**: `api.events.session.NewSession.is` - **summary**: New session has happened. Note that the argument is the session index, not the block number as the type might suggest. @@ -1301,6 +1307,10 @@ ___ - **interface**: `api.events.society.Deposit.is` - **summary**: Some funds were deposited into the society account. +### DepositPoked(`AccountId32`, `u128`, `u128`) +- **interface**: `api.events.society.DepositPoked.is` +- **summary**: A deposit was poked / adjusted. + ### Elevated(`AccountId32`, `u32`) - **interface**: `api.events.society.Elevated.is` - **summary**: A \[member\] got elevated to \[rank\]. @@ -1431,6 +1441,29 @@ ___ ___ +## stakingAhClient + +### CouldNotMergeAndDropped() +- **interface**: `api.events.stakingAhClient.CouldNotMergeAndDropped.is` +- **summary**: We could not merge, and therefore dropped a buffered message. + + Note that this event is more resembling an error, but we use an event because in this pallet we need to mutate storage upon some failures. + +### SetTooSmallAndDropped() +- **interface**: `api.events.stakingAhClient.SetTooSmallAndDropped.is` +- **summary**: The validator set received is way too small, as per [`Config::MinimumValidatorSetSize`]. + +### Unexpected(`PalletStakingAsyncAhClientUnexpectedKind`) +- **interface**: `api.events.stakingAhClient.Unexpected.is` +- **summary**: Something occurred that should never happen under normal operation. Logged as an event for fail-safe observability. + +### ValidatorSetReceived(`u32`, `u32`, `Option`, `bool`) +- **interface**: `api.events.stakingAhClient.ValidatorSetReceived.is` +- **summary**: A new validator set has been received. + +___ + + ## system ### CodeUpdated() @@ -1573,6 +1606,10 @@ ___ - **interface**: `api.events.vesting.VestingCompleted.is` - **summary**: An \[account\] has become fully vested. +### VestingCreated(`AccountId32`, `u32`) +- **interface**: `api.events.vesting.VestingCreated.is` +- **summary**: A vesting schedule has been created. + ### VestingUpdated(`AccountId32`, `u128`) - **interface**: `api.events.vesting.VestingUpdated.is` - **summary**: The amount vested has been updated. This could indicate a change in funds available. The balance given is the amount which is left unvested (and thus locked). diff --git a/docs/kusama/extrinsics.md b/docs/kusama/extrinsics.md index a6498a2eb..76faa3684 100644 --- a/docs/kusama/extrinsics.md +++ b/docs/kusama/extrinsics.md @@ -50,10 +50,6 @@ The following sections contain Extrinsics methods are part of the default Kusama - **[multisig](#multisig)** -- **[nis](#nis)** - -- **[nisCounterpartBalances](#niscounterpartbalances)** - - **[nominationPools](#nominationpools)** - **[onDemandAssignmentProvider](#ondemandassignmentprovider)** @@ -76,6 +72,8 @@ The following sections contain Extrinsics methods are part of the default Kusama - **[proxy](#proxy)** +- **[rcMigrator](#rcmigrator)** + - **[recovery](#recovery)** - **[referenda](#referenda)** @@ -92,6 +90,8 @@ The following sections contain Extrinsics methods are part of the default Kusama - **[staking](#staking)** +- **[stakingAhClient](#stakingahclient)** + - **[system](#system)** - **[timestamp](#timestamp)** @@ -397,6 +397,24 @@ ___ - O(1). +### pokeDeposit(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.pokeDeposit` +- **summary**: Poke the deposit reserved for creating a bounty proposal. + + This can be used by accounts to update their reserved amount. + + The dispatch origin for this call must be _Signed_. + + Parameters: + + - `bounty_id`: The bounty id for which to adjust the deposit. + + If the deposit is updated, the difference will be reserved/unreserved from the proposer's account. + + The transaction is made free if the deposit is updated and paid otherwise. + + Emits `DepositPoked` if the deposit is updated. + ### proposeBounty(value: `Compact`, description: `Bytes`) - **interface**: `api.tx.bounties.proposeBounty` - **summary**: Propose a new bounty. @@ -1076,7 +1094,7 @@ ___ ## electionProviderMultiPhase -### governanceFallback(maybe_max_voters: `Option`, maybe_max_targets: `Option`) +### governanceFallback() - **interface**: `api.tx.electionProviderMultiPhase.governanceFallback` - **summary**: Trigger the governance fallback. @@ -1780,142 +1798,6 @@ ___ ___ -## nis - -### communify(index: `Compact`) -- **interface**: `api.tx.nis.communify` -- **summary**: Make a private receipt communal and create fungible counterparts for its owner. - -### fundDeficit() -- **interface**: `api.tx.nis.fundDeficit` -- **summary**: Ensure we have sufficient funding for all potential payouts. - - - `origin`: Must be accepted by `FundOrigin`. - -### placeBid(amount: `Compact`, duration: `u32`) -- **interface**: `api.tx.nis.placeBid` -- **summary**: Place a bid. - - Origin must be Signed, and account must have at least `amount` in free balance. - - - `amount`: The amount of the bid; these funds will be reserved, and if/when consolidated, removed. Must be at least `MinBid`. - - - `duration`: The number of periods before which the newly consolidated bid may be thawed. Must be greater than 1 and no more than `QueueCount`. - - Complexities: - - - `Queues[duration].len()` (just take max). - -### privatize(index: `Compact`) -- **interface**: `api.tx.nis.privatize` -- **summary**: Make a communal receipt private and burn fungible counterparts from its owner. - -### retractBid(amount: `Compact`, duration: `u32`) -- **interface**: `api.tx.nis.retractBid` -- **summary**: Retract a previously placed bid. - - Origin must be Signed, and the account should have previously issued a still-active bid of `amount` for `duration`. - - - `amount`: The amount of the previous bid. - - - `duration`: The duration of the previous bid. - -### thawCommunal(index: `Compact`) -- **interface**: `api.tx.nis.thawCommunal` -- **summary**: Reduce or remove an outstanding receipt, placing the according proportion of funds into the account of the owner. - - - `origin`: Must be Signed and the account must be the owner of the fungible counterpart for receipt `index`. - - - `index`: The index of the receipt. - -### thawPrivate(index: `Compact`, maybe_proportion: `Option`) -- **interface**: `api.tx.nis.thawPrivate` -- **summary**: Reduce or remove an outstanding receipt, placing the according proportion of funds into the account of the owner. - - - `origin`: Must be Signed and the account must be the owner of the receipt `index` as well as any fungible counterpart. - - - `index`: The index of the receipt. - - - `portion`: If `Some`, then only the given portion of the receipt should be thawed. If `None`, then all of it should be. - -___ - - -## nisCounterpartBalances - -### burn(value: `Compact`, keep_alive: `bool`) -- **interface**: `api.tx.nisCounterpartBalances.burn` -- **summary**: 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_. - -### forceAdjustTotalIssuance(direction: `PalletBalancesAdjustmentDirection`, delta: `Compact`) -- **interface**: `api.tx.nisCounterpartBalances.forceAdjustTotalIssuance` -- **summary**: Adjust the total issuance in a saturating way. - - Can only be called by root and always needs a positive `delta`. - - #### Example - -### forceSetBalance(who: `MultiAddress`, new_free: `Compact`) -- **interface**: `api.tx.nisCounterpartBalances.forceSetBalance` -- **summary**: Set the regular balance of a given account. - - The dispatch origin for this call is `root`. - -### forceTransfer(source: `MultiAddress`, dest: `MultiAddress`, value: `Compact`) -- **interface**: `api.tx.nisCounterpartBalances.forceTransfer` -- **summary**: Exactly as `transfer_allow_death`, except the origin must be root and the source account may be specified. - -### forceUnreserve(who: `MultiAddress`, amount: `u128`) -- **interface**: `api.tx.nisCounterpartBalances.forceUnreserve` -- **summary**: Unreserve some balance from a user by force. - - Can only be called by ROOT. - -### transferAll(dest: `MultiAddress`, keep_alive: `bool`) -- **interface**: `api.tx.nisCounterpartBalances.transferAll` -- **summary**: Transfer the entire transferable balance from the caller account. - - NOTE: This function only attempts to transfer _transferable_ balances. This means that any locked, reserved, or existential deposits (when `keep_alive` is `true`), will not be transferred by this function. To ensure that this function results in a killed account, you might need to prepare the account by removing any reference counters, storage deposits, etc... - - The dispatch origin of this call must be Signed. - - - `dest`: The recipient of the transfer. - - - `keep_alive`: A boolean to determine if the `transfer_all` operation should send all of the funds the account has, causing the sender account to be killed (false), or transfer everything except at least the existential deposit, which will guarantee to keep the sender account alive (true). - -### transferAllowDeath(dest: `MultiAddress`, value: `Compact`) -- **interface**: `api.tx.nisCounterpartBalances.transferAllowDeath` -- **summary**: Transfer some liquid free balance to another account. - - `transfer_allow_death` will set the `FreeBalance` of the sender and receiver. If the sender's account is below the existential deposit as a result of the transfer, the account will be reaped. - - The dispatch origin for this call must be `Signed` by the transactor. - -### transferKeepAlive(dest: `MultiAddress`, value: `Compact`) -- **interface**: `api.tx.nisCounterpartBalances.transferKeepAlive` -- **summary**: Same as the [`transfer_allow_death`] call, but with a check that the transfer will not kill the origin account. - - 99% of the time you want [`transfer_allow_death`] instead. - - [`transfer_allow_death`]: struct.Pallet.html#method.transfer - -### upgradeAccounts(who: `Vec`) -- **interface**: `api.tx.nisCounterpartBalances.upgradeAccounts` -- **summary**: Upgrade a specified account. - - - `origin`: Must be `Signed`. - - - `who`: The account to be upgraded. - - This will waive the transaction fee if at least all but 10% of the accounts needed to be upgraded. (We let some not have to be upgraded just in order to allow for the possibility of churn). - -___ - - ## nominationPools ### adjustPoolDeposit(pool_id: `u32`) @@ -2325,6 +2207,20 @@ ___ This function is mainly meant to be used for upgrading parachains that do not follow the go-ahead signal while the PVF pre-checking feature is enabled. +### applyAuthorizedForceSetCurrentCode(para: `u32`, new_code: `Bytes`) +- **interface**: `api.tx.paras.applyAuthorizedForceSetCurrentCode` +- **summary**: Applies the already authorized current code for the parachain, triggering the same functionality as `force_set_current_code`. + +### authorizeForceSetCurrentCodeHash(para: `u32`, new_code_hash: `H256`, valid_period: `u32`) +- **interface**: `api.tx.paras.authorizeForceSetCurrentCodeHash` +- **summary**: Sets the storage for the authorized current code hash of the parachain. If not applied, it will be removed at the `System::block_number() + valid_period` block. + + This can be useful, when triggering `Paras::force_set_current_code(para, code)` from a different chain than the one where the `Paras` pallet is deployed. + + The main purpose is to avoid transferring the entire `code` Wasm blob between chains. Instead, we authorize `code_hash` with `root`, which can later be applied by `Paras::apply_authorized_force_set_current_code(para, code)` by anyone. + + Authorizations are stored in an **overwriting manner**. + ### forceNoteNewHead(para: `u32`, new_head: `Bytes`) - **interface**: `api.tx.paras.forceNoteNewHead` - **summary**: Note a new block head for para within the context of the current block. @@ -2358,6 +2254,12 @@ ___ - **summary**: Remove the validation code from the storage iff the reference count is 0. This is better than removing the storage directly, because it will not remove the code that was suddenly got used by some parachain while this dispatchable was pending dispatching. + +### removeUpgradeCooldown(para: `u32`) +- **interface**: `api.tx.paras.removeUpgradeCooldown` +- **summary**: Remove an upgrade cooldown for a parachain. + + The cost for removing the cooldown earlier depends on the time left for the cooldown multiplied by [`Config::CooldownRemovalMultiplier`]. The paid tokens are burned. ___ @@ -2377,7 +2279,7 @@ ___ ## parasSlashing -### reportDisputeLostUnsigned(dispute_proof: `PolkadotPrimitivesV8SlashingDisputeProof`, key_owner_proof: `SpSessionMembershipProof`) +### reportDisputeLostUnsigned(dispute_proof: `PolkadotPrimitivesVstagingDisputeProof`, key_owner_proof: `SpSessionMembershipProof`) - **interface**: `api.tx.parasSlashing.reportDisputeLostUnsigned` ___ @@ -2478,19 +2380,19 @@ ___ WARNING: **All access to this account will be lost.** Any funds held in it will be inaccessible. - Requires a `Signed` origin, and the sender account must have been created by a call to `pure` with corresponding parameters. + Requires a `Signed` origin, and the sender account must have been created by a call to `create_pure` with corresponding parameters. - - `spawner`: The account that originally called `pure` to create this account. + - `spawner`: The account that originally called `create_pure` to create this account. - - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + - `index`: The disambiguation index originally passed to `create_pure`. Probably `0`. - - `proxy_type`: The proxy type originally passed to `pure`. + - `proxy_type`: The proxy type originally passed to `create_pure`. - - `height`: The height of the chain when the call to `pure` was processed. + - `height`: The height of the chain when the call to `create_pure` was processed. - - `ext_index`: The extrinsic index in which the call to `pure` was processed. + - `ext_index`: The extrinsic index in which the call to `create_pure` was processed. - Fails with `NoPermission` in case the caller is not a previously created pure account whose `pure` call has corresponding parameters. + Fails with `NoPermission` in case the caller is not a previously created pure account whose `create_pure` call has corresponding parameters. ### pokeDeposit() - **interface**: `api.tx.proxy.pokeDeposit` @@ -2566,7 +2468,7 @@ ___ The dispatch origin for this call must be _Signed_. - WARNING: This may be called on accounts created by `pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** + WARNING: This may be called on accounts created by `create_pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** ### removeProxy(delegate: `MultiAddress`, proxy_type: `KusamaRuntimeConstantsProxyProxyType`, delay: `u32`) - **interface**: `api.tx.proxy.removeProxy` @@ -2583,6 +2485,103 @@ ___ ___ +## rcMigrator + +### cancelMigration() +- **interface**: `api.tx.rcMigrator.cancelMigration` +- **summary**: Cancel the migration. + + Migration can only be cancelled if it is in the [`MigrationStage::Scheduled`] state. + +### forceSetStage(stage: `PalletRcMigratorMigrationStage`) +- **interface**: `api.tx.rcMigrator.forceSetStage` +- **summary**: Set the migration stage. + + This call is intended for emergency use only and is guarded by the [`Config::AdminOrigin`]. + +### pauseMigration() +- **interface**: `api.tx.rcMigrator.pauseMigration` +- **summary**: Pause the migration. + +### preserveAccounts(accounts: `Vec`) +- **interface**: `api.tx.rcMigrator.preserveAccounts` +- **summary**: Set the accounts to be preserved on Relay Chain during the migration. + + The accounts must have no consumers references. + +### receiveQueryResponse(query_id: `u64`, response: `StagingXcmV5Response`) +- **interface**: `api.tx.rcMigrator.receiveQueryResponse` +- **summary**: Receive a query response from the Asset Hub for a previously sent xcm message. + +### resendXcm(query_id: `u64`) +- **interface**: `api.tx.rcMigrator.resendXcm` +- **summary**: Resend a previously sent and unconfirmed XCM message. + +### scheduleMigration(start: `FrameSupportScheduleDispatchTime`, warm_up: `FrameSupportScheduleDispatchTime`, cool_off: `FrameSupportScheduleDispatchTime`, unsafe_ignore_staking_lock_check: `bool`) +- **interface**: `api.tx.rcMigrator.scheduleMigration` +- **summary**: Schedule the migration to start at a given moment. + + #### Parameters: + + - `start`: The block number at which the migration will start. `DispatchTime` calculated at the moment of the extrinsic execution. + + - `warm_up`: Duration or timepoint that will be used to prepare for the migration. Calls are filtered during this period. It is intended to give enough time for UMP and DMP queues to empty. `DispatchTime` calculated at the moment of the transition to the warm-up stage. + + - `cool_off`: The block number at which the post migration cool-off period will end. The `DispatchTime` calculated at the moment of the transition to the cool-off stage. + + - `unsafe_ignore_staking_lock_check`: ONLY FOR TESTING. Ignore the check whether the scheduled time point is far enough in the future. + + Note: If the staking election for next era is already complete, and the next validator set is queued in `pallet-session`, we want to avoid starting the data migration at this point as it can lead to some missed validator rewards. To address this, we stop staking election at the start of migration and must wait atleast 1 session (set via warm_up) before starting the data migration. + + Read [`MigrationStage::Scheduled`] documentation for more details. + +### sendXcmMessage(dest: `XcmVersionedLocation`, message: `XcmVersionedXcm`) +- **interface**: `api.tx.rcMigrator.sendXcmMessage` +- **summary**: XCM send call identical to the [`pallet_xcm::Pallet::send`] call but with the [Config::SendXcm] router which will be able to send messages to the Asset Hub during the migration. + +### setAhUmpQueuePriority(new: `PalletRcMigratorQueuePriority`) +- **interface**: `api.tx.rcMigrator.setAhUmpQueuePriority` +- **summary**: Set the AH UMP queue priority configuration. + + Can only be called by the `AdminOrigin`. + +### setCanceller(new: `Option`) +- **interface**: `api.tx.rcMigrator.setCanceller` +- **summary**: Set the canceller account id. + + The canceller can only stop scheduled migration. + +### setManager(new: `Option`) +- **interface**: `api.tx.rcMigrator.setManager` +- **summary**: Set the manager account id. + + The manager has the similar to [`Config::AdminOrigin`] privileges except that it can not set the manager account id via `set_manager` call. + +### setUnprocessedMsgBuffer(new: `Option`) +- **interface**: `api.tx.rcMigrator.setUnprocessedMsgBuffer` +- **summary**: Set the unprocessed message buffer size. + + `None` means to use the configuration value. + +### startDataMigration() +- **interface**: `api.tx.rcMigrator.startDataMigration` +- **summary**: Start the data migration. + + This is typically called by the Asset Hub to indicate it's readiness to receive the migration data. + +### voteManagerMultisig(payload: `PalletRcMigratorManagerMultisigVote`, sig: `SpRuntimeMultiSignature`) +- **interface**: `api.tx.rcMigrator.voteManagerMultisig` +- **summary**: Vote on behalf of any of the members in `MultisigMembers`. + + Unsigned extrinsic, requiring the `payload` to be signed. + + Upon each call, a new entry is created in `ManagerMultisigs` map the `payload.call` to be dispatched. Once `MultisigThreshold` is reached, the entire map is deleted, and we move on to the next round. + + The round system ensures that signatures from older round cannot be reused. + +___ + + ## recovery ### asRecovered(account: `MultiAddress`, call: `Call`) @@ -2657,6 +2656,30 @@ ___ - `account`: The lost account that you want to recover. This account needs to be recoverable (i.e. have a recovery configuration). +### pokeDeposit(maybe_account: `Option`) +- **interface**: `api.tx.recovery.pokeDeposit` +- **summary**: Poke deposits for recovery configurations and / or active recoveries. + + This can be used by accounts to possibly lower their locked amount. + + The dispatch origin for this call must be _Signed_. + + Parameters: + + - `maybe_account`: Optional recoverable account for which you have an active recovery and want to adjust the deposit for the active recovery. + + This function checks both recovery configuration deposit and active recovery deposits of the caller: + + - If the caller has created a recovery configuration, checks and adjusts its deposit + + - If the caller has initiated any active recoveries, and provides the account in `maybe_account`, checks and adjusts those deposits + + If any deposit is updated, the difference will be reserved/unreserved from the caller's account. + + The transaction is made free if any deposit is updated and paid otherwise. + + Emits `DepositPoked` if any deposit is updated. Multiple events may be emitted in case both types of deposits are updated. + ### removeRecovery() - **interface**: `api.tx.recovery.removeRecovery` - **summary**: Remove the recovery process for your account. Recovered accounts are still accessible. @@ -3107,6 +3130,16 @@ ___ The dispatch origin for this call must be _Signed_ and a member with payouts remaining. +### pokeDeposit() +- **interface**: `api.tx.society.pokeDeposit` +- **summary**: Poke the deposit reserved when bidding. + + The dispatch origin for this call must be _Signed_ and must be the bidder. + + The transaction fee is waived if the deposit is changed after poking/reconsideration. + + Emits `DepositPoked` if successful. + ### punishSkeptic() - **interface**: `api.tx.society.punishSkeptic` - **summary**: Punish the skeptic with a strike if they did not vote on a candidate. Callable by the candidate. @@ -3230,7 +3263,7 @@ ___ Can be called by the `T::AdminOrigin`. - Parameters: era and indices of the slashes for that era to kill. + Parameters: era and indices of the slashes for that era to kill. They **must** be sorted in ascending order, *and* unique. ### chill() - **interface**: `api.tx.staking.chill` @@ -3566,6 +3599,8 @@ ___ - **interface**: `api.tx.staking.unbond` - **summary**: Schedule a portion of the stash to be unlocked ready for transfer out after the bond period ends. If this leaves an amount actively bonded less than [`asset::existential_deposit`], then it is increased to the full amount. + The stash may be chilled if the ledger total amount falls to 0 after unbonding. + The dispatch origin for this call must be _Signed_ by the controller, not the stash. Once the unlock period is done, you can call `withdraw_unbonded` to actually move the funds out of management ready for transfer. @@ -3615,6 +3650,22 @@ ___ ___ +## stakingAhClient + +### forceOnMigrationEnd() +- **interface**: `api.tx.stakingAhClient.forceOnMigrationEnd` +- **summary**: manually do what this pallet was meant to do at the end of the migration. + +### setMode(mode: `PalletStakingAsyncAhClientOperatingMode`) +- **interface**: `api.tx.stakingAhClient.setMode` +- **summary**: Allows governance to force set the operating mode of the pallet. + +### validatorSet(report: `PalletStakingAsyncRcClientValidatorSetReport`) +- **interface**: `api.tx.stakingAhClient.validatorSet` + +___ + + ## system ### applyAuthorizedUpgrade(code: `Bytes`) diff --git a/docs/kusama/storage.md b/docs/kusama/storage.md index 646ef07c3..5b2198598 100644 --- a/docs/kusama/storage.md +++ b/docs/kusama/storage.md @@ -64,10 +64,6 @@ The following sections contain Storage methods are part of the default Kusama ru - **[multisig](#multisig)** -- **[nis](#nis)** - -- **[nisCounterpartBalances](#niscounterpartbalances)** - - **[nominationPools](#nominationpools)** - **[offences](#offences)** @@ -96,6 +92,8 @@ The following sections contain Storage methods are part of the default Kusama ru - **[proxy](#proxy)** +- **[rcMigrator](#rcmigrator)** + - **[recovery](#recovery)** - **[referenda](#referenda)** @@ -112,6 +110,8 @@ The following sections contain Storage methods are part of the default Kusama ru - **[staking](#staking)** +- **[stakingAhClient](#stakingahclient)** + - **[substrate](#substrate)** - **[system](#system)** @@ -295,11 +295,11 @@ ___ But this comes with tradeoffs, storing account balances in the system pallet stores `frame_system` data alongside the account data contrary to storing account balances in the `Balances` pallet, which uses a `StorageMap` to store balances data only. NOTE: This is only used in the case that this pallet is used to store balances. -### freezes(`AccountId32`): `Vec<{"id":"StagingKusamaRuntimeRuntimeFreezeReason","amount":"u128"}>` +### freezes(`AccountId32`): `Vec` - **interface**: `api.query.balances.freezes` - **summary**: Freeze locks on account balances. -### holds(`AccountId32`): `Vec<{"id":"StagingKusamaRuntimeRuntimeHoldReason","amount":"u128"}>` +### holds(`AccountId32`): `Vec` - **interface**: `api.query.balances.holds` - **summary**: Holds on account balances. @@ -935,78 +935,6 @@ ___ ___ -## nis - -### queues(`u32`): `Vec` -- **interface**: `api.query.nis.queues` -- **summary**: The queues of bids. Indexed by duration (in `Period`s). - -### queueTotals(): `Vec<(u32,u128)>` -- **interface**: `api.query.nis.queueTotals` -- **summary**: The totals of items and balances within each queue. Saves a lot of storage reads in the case of sparsely packed queues. - - The vector is indexed by duration in `Period`s, offset by one, so information on the queue whose duration is one `Period` would be storage `0`. - -### receipts(`u32`): `Option` -- **interface**: `api.query.nis.receipts` -- **summary**: The currently outstanding receipts, indexed according to the order of creation. - -### summary(): `PalletNisSummaryRecord` -- **interface**: `api.query.nis.summary` -- **summary**: Summary information over the general state. - -___ - - -## nisCounterpartBalances - -### account(`AccountId32`): `PalletBalancesAccountData` -- **interface**: `api.query.nisCounterpartBalances.account` -- **summary**: The Balances pallet example of storing the balance of an account. - - #### Example - - ```nocompile impl pallet_balances::Config for Runtime { type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData> } ``` - - You can also store the balance of an account in the `System` pallet. - - #### Example - - ```nocompile impl pallet_balances::Config for Runtime { type AccountStore = System } ``` - - But this comes with tradeoffs, storing account balances in the system pallet stores `frame_system` data alongside the account data contrary to storing account balances in the `Balances` pallet, which uses a `StorageMap` to store balances data only. NOTE: This is only used in the case that this pallet is used to store balances. - -### freezes(`AccountId32`): `Vec` -- **interface**: `api.query.nisCounterpartBalances.freezes` -- **summary**: Freeze locks on account balances. - -### holds(`AccountId32`): `Vec<{"id":"StagingKusamaRuntimeRuntimeHoldReason","amount":"u128"}>` -- **interface**: `api.query.nisCounterpartBalances.holds` -- **summary**: Holds on account balances. - -### inactiveIssuance(): `u128` -- **interface**: `api.query.nisCounterpartBalances.inactiveIssuance` -- **summary**: The total units of outstanding deactivated balance in the system. - -### locks(`AccountId32`): `Vec` -- **interface**: `api.query.nisCounterpartBalances.locks` -- **summary**: Any liquidity locks on some account balances. NOTE: Should only be accessed when setting, changing and freeing a lock. - - Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/` - -### reserves(`AccountId32`): `Vec` -- **interface**: `api.query.nisCounterpartBalances.reserves` -- **summary**: Named reserves on some account balances. - - Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/` - -### totalIssuance(): `u128` -- **interface**: `api.query.nisCounterpartBalances.totalIssuance` -- **summary**: The total units issued in the system. - -___ - - ## nominationPools ### bondedPools(`u32`): `Option` @@ -1189,6 +1117,10 @@ ___ - **interface**: `api.query.paras.actionsQueue` - **summary**: The actions to perform during the start of a specific session index. +### authorizedCodeHash(`u32`): `Option` +- **interface**: `api.query.paras.authorizedCodeHash` +- **summary**: The code hash authorizations for a para which will expire `expire_at` `BlockNumberFor`. + ### codeByHash(`H256`): `Option` - **interface**: `api.query.paras.codeByHash` - **summary**: Validation code stored by its hash. @@ -1402,7 +1334,7 @@ ___ ## parasSlashing -### unappliedSlashes(`u32, H256`): `Option` +### unappliedSlashes(`u32, H256`): `Option` - **interface**: `api.query.parasSlashing.unappliedSlashes` - **summary**: Validators pending dispute slashes. @@ -1442,6 +1374,109 @@ ___ ___ +## rcMigrator + +### ahUmpQueuePriorityConfig(): `PalletRcMigratorQueuePriority` +- **interface**: `api.query.rcMigrator.ahUmpQueuePriorityConfig` +- **summary**: The priority of the Asset Hub UMP queue during migration. + + Controls how the Asset Hub UMP (Upward Message Passing) queue is processed relative to other queues during the migration process. This helps ensure timely processing of migration messages. The default priority pattern is defined in the pallet configuration, but can be overridden by a storage value of this type. + +### canceller(): `Option` +- **interface**: `api.query.rcMigrator.canceller` +- **summary**: An optional account id of a canceller. + + This account id can only stop scheduled migration. + +### coolOffPeriod(): `Option` +- **interface**: `api.query.rcMigrator.coolOffPeriod` +- **summary**: The duration of the post migration cool-off period. + + This is the duration of the cool-off period after the data migration is finished. During this period, the migration will be still in ongoing state and the concerned extrinsics will be locked. + +### counterForPendingXcmMessages(): `u32` +- **interface**: `api.query.rcMigrator.counterForPendingXcmMessages` +- **summary**: Counter for the related counted storage map + +### counterForRcAccounts(): `u32` +- **interface**: `api.query.rcMigrator.counterForRcAccounts` +- **summary**: Counter for the related counted storage map + +### manager(): `Option` +- **interface**: `api.query.rcMigrator.manager` +- **summary**: An optional account id of a manager. + + This account id has similar privileges to [`Config::AdminOrigin`] except that it can not set the manager account id via `set_manager` call. + +### managerMultisigRound(): `u32` +- **interface**: `api.query.rcMigrator.managerMultisigRound` + +### managerMultisigs(`Call`): `Vec` +- **interface**: `api.query.rcMigrator.managerMultisigs` + +### migrationEndBlock(): `Option` +- **interface**: `api.query.rcMigrator.migrationEndBlock` +- **summary**: Block number when migration finished and extrinsics were unlocked. + + This is set when entering the `MigrationDone` stage hence when `RcMigrationStage::is_finished()` becomes `true`. + +### migrationStartBlock(): `Option` +- **interface**: `api.query.rcMigrator.migrationStartBlock` +- **summary**: The block number at which the migration began and the pallet's extrinsics were locked. + + This value is set when entering the `WaitingForAh` stage, i.e., when `RcMigrationStage::is_ongoing()` becomes `true`. + +### pendingXcmMessages(`H256`): `Option` +- **interface**: `api.query.rcMigrator.pendingXcmMessages` +- **summary**: The pending XCM messages. + + Contains data messages that have been sent to the Asset Hub but not yet confirmed. + + Unconfirmed messages can be resent by calling the [`Pallet::resend_xcm`] function. + +### pendingXcmQueries(`u64`): `Option` +- **interface**: `api.query.rcMigrator.pendingXcmQueries` +- **summary**: The pending XCM response queries and their XCM hash referencing the message in the [`PendingXcmMessages`] storage. + + The `QueryId` is the identifier from the [`pallet_xcm`] query handler registry. The XCM pallet will notify about the status of the message by calling the [`Pallet::receive_query_response`] function with the `QueryId` and the response. + +### pureProxyCandidatesMigrated(`AccountId32`): `Option` +- **interface**: `api.query.rcMigrator.pureProxyCandidatesMigrated` +- **summary**: Accounts that use the proxy pallet to delegate permissions and have no nonce. + + Boolean value is whether they have been migrated to the Asset Hub. Needed for idempotency. + +### rcAccounts(`AccountId32`): `Option` +- **interface**: `api.query.rcMigrator.rcAccounts` +- **summary**: Helper storage item to obtain and store the known accounts that should be kept partially or fully on Relay Chain. + +### rcMigratedBalance(): `PalletRcMigratorAccountsMigratedBalances` +- **interface**: `api.query.rcMigrator.rcMigratedBalance` +- **summary**: Helper storage item to store the total balance that should be kept on Relay Chain. + +### rcMigratedBalanceArchive(): `PalletRcMigratorAccountsMigratedBalances` +- **interface**: `api.query.rcMigrator.rcMigratedBalanceArchive` +- **summary**: Helper storage item to store the total balance that should be kept on Relay Chain after it is consumed from the `RcMigratedBalance` storage item and sent to the Asset Hub. + + This let us to take the value from the `RcMigratedBalance` storage item and keep the `SignalMigrationFinish` stage to be idempotent while preserving these values for tests and later discoveries. + +### rcMigrationStage(): `PalletRcMigratorMigrationStage` +- **interface**: `api.query.rcMigrator.rcMigrationStage` +- **summary**: The Relay Chain migration state. + +### unprocessedMsgBuffer(): `Option` +- **interface**: `api.query.rcMigrator.unprocessedMsgBuffer` +- **summary**: Manual override for `type UnprocessedMsgBuffer: Get`. Look there for docs. + +### warmUpPeriod(): `Option` +- **interface**: `api.query.rcMigrator.warmUpPeriod` +- **summary**: The duration of the pre migration warm-up period. + + This is the duration of the warm-up period before the data migration starts. During this period, the migration will be in ongoing state and the concerned extrinsics will be locked. + +___ + + ## recovery ### activeRecoveries(`AccountId32, AccountId32`): `Option` @@ -1629,10 +1664,18 @@ ___ - **interface**: `api.query.society.members` - **summary**: The current members and their rank. Doesn't include `SuspendedMembers`. +### nextChallengeAt(): `Option` +- **interface**: `api.query.society.nextChallengeAt` +- **summary**: Next challenge rotation scheduled with [Config::BlockNumberProvider]. + ### nextHead(): `Option` - **interface**: `api.query.society.nextHead` - **summary**: At the end of the claim period, this contains the most recently approved members (along with their bid and round ID) who is from the most recent round with the lowest bid. They will become the new `Head`. +### nextIntakeAt(): `Option` +- **interface**: `api.query.society.nextIntakeAt` +- **summary**: Next intake rotation scheduled with [Config::BlockNumberProvider]. + ### parameters(): `Option` - **interface**: `api.query.society.parameters` - **summary**: The max number of members for the society at one time. @@ -1917,6 +1960,61 @@ ___ ___ +## stakingAhClient + +### incompleteValidatorSetReport(): `Option` +- **interface**: `api.query.stakingAhClient.incompleteValidatorSetReport` +- **summary**: An incomplete validator set report. + +### mode(): `PalletStakingAsyncAhClientOperatingMode` +- **interface**: `api.query.stakingAhClient.mode` +- **summary**: Indicates the current operating mode of the pallet. + + This value determines how the pallet behaves in response to incoming and outgoing messages, particularly whether it should execute logic directly, defer it, or delegate it entirely. + +### nextSessionChangesValidators(): `Option` +- **interface**: `api.query.stakingAhClient.nextSessionChangesValidators` +- **summary**: A storage value that is set when a `new_session` gives a new validator set to the session pallet, and is cleared on the next call. + + The inner u32 is the id of the said activated validator set. While not relevant here, good to know this is the planning era index of staking-async on AH. + + Once cleared, we know a validator set has been activated, and therefore we can send a timestamp to AH. + +### offenceSendQueueCursor(): `u32` +- **interface**: `api.query.stakingAhClient.offenceSendQueueCursor` +- **summary**: Internal storage item of [`OffenceSendQueue`]. Should not be used manually. + +### offenceSendQueueOffences(`u32`): `Vec<(u32,PalletStakingAsyncRcClientOffence)>` +- **interface**: `api.query.stakingAhClient.offenceSendQueueOffences` +- **summary**: Internal storage item of [`OffenceSendQueue`]. Should not be used manually. + +### outgoingSessionReport(): `Option<(PalletStakingAsyncRcClientSessionReport,u32)>` +- **interface**: `api.query.stakingAhClient.outgoingSessionReport` +- **summary**: A session report that is outgoing, and should be sent. + + This will be attempted to be sent, possibly on every `on_initialize` call, until it is sent, or the second value reaches zero, at which point we drop it. + +### validatorPoints(`AccountId32`): `u32` +- **interface**: `api.query.stakingAhClient.validatorPoints` +- **summary**: All of the points of the validators. + + This is populated during a session, and is flushed and sent over via [`SendToAssetHub`] at each session end. + +### validatorSet(): `Option<(u32,Vec)>` +- **interface**: `api.query.stakingAhClient.validatorSet` +- **summary**: The queued validator sets for a given planning session index. + + This is received via a call from AssetHub. + +### validatorSetAppliedAt(): `Option` +- **interface**: `api.query.stakingAhClient.validatorSetAppliedAt` +- **summary**: The session index at which the latest elected validator set was applied. + + This is used to determine if an offence, given a session index, is in the current active era or not. + +___ + + ## substrate _These are well-known keys that are always available to the runtime implementation of any Substrate-based network._ @@ -2150,6 +2248,16 @@ ___ - **summary**: A single node, within some bag. Nodes store links forward and back within their respective bags. + +### lock(): `Option` +- **interface**: `api.query.voterList.lock` +- **summary**: Lock all updates to this pallet. + + If any nodes needs updating, removal or addition due to a temporary lock, the [`Call::rebag`] can be used. + +### nextNodeAutoRebagged(): `Option` +- **interface**: `api.query.voterList.nextNodeAutoRebagged` +- **summary**: Pointer that remembers the next node that will be auto-rebagged. When `None`, the next scan will start from the list head again. ___ diff --git a/docs/polkadot/constants.md b/docs/polkadot/constants.md index eb3c07a95..ac27294f2 100644 --- a/docs/polkadot/constants.md +++ b/docs/polkadot/constants.md @@ -54,6 +54,8 @@ The following sections contain the module constants, also known as parameter typ - **[scheduler](#scheduler)** +- **[session](#session)** + - **[slots](#slots)** - **[staking](#staking)** @@ -304,9 +306,15 @@ ___ - **interface**: `api.consts.electionProviderMultiPhase.betterSignedThreshold` - **summary**: The minimum amount of improvement to the solution score that defines a solution as "better" in the Signed phase. +### maxBackersPerWinner: `u32` +- **interface**: `api.consts.electionProviderMultiPhase.maxBackersPerWinner` +- **summary**: Maximum number of voters that can support a winner in an election solution. + + This is needed to ensure election computation is bounded. + ### maxWinners: `u32` - **interface**: `api.consts.electionProviderMultiPhase.maxWinners` -- **summary**: The maximum number of winners that can be elected by this `ElectionProvider` implementation. +- **summary**: Maximum number of winners that an election supports. Note: This must always be greater or equal to `T::DataProvider::desired_targets()`. @@ -588,6 +596,15 @@ ___ ___ +## session + +### keyDeposit: `u128` +- **interface**: `api.consts.session.keyDeposit` +- **summary**: The amount to be held when setting keys. + +___ + + ## slots ### leaseOffset: `u32` @@ -635,6 +652,10 @@ ___ Note: `MaxUnlockingChunks` is used as the upper bound for the `BoundedVec` item `StakingLedger.unlocking`. Setting this value lower than the existing value can lead to inconsistencies in the `StakingLedger` and will need to be handled properly in a runtime migration. The test `reducing_max_unlocking_chunks_abrupt` shows this effect. +### maxValidatorSet: `u32` +- **interface**: `api.consts.staking.maxValidatorSet` +- **summary**: The absolute maximum of winner validators this pallet should return. + ### sessionsPerEra: `u32` - **interface**: `api.consts.staking.sessionsPerEra` - **summary**: Number of sessions per era. @@ -821,6 +842,12 @@ ___ #### Migration In the event that this list ever changes, a copy of the old bags list must be retained. With that `List::migrate` can be called, which will perform the appropriate migration. + +### maxAutoRebagPerBlock: `u32` +- **interface**: `api.consts.voterList.maxAutoRebagPerBlock` +- **summary**: Maximum number of accounts that may be re-bagged automatically in `on_idle`. + + A value of `0` (obtained by configuring `type MaxAutoRebagPerBlock = ();`) disables the feature. ___ @@ -830,3 +857,15 @@ ___ ### advertisedXcmVersion: `u32` - **interface**: `api.consts.xcmPallet.advertisedXcmVersion` - **summary**: The latest supported version that we advertise. Generally just set it to `pallet_xcm::CurrentXcmVersion`. + +### maxLockers: `u32` +- **interface**: `api.consts.xcmPallet.maxLockers` +- **summary**: The maximum number of local XCM locks that a single account may have. + +### maxRemoteLockConsumers: `u32` +- **interface**: `api.consts.xcmPallet.maxRemoteLockConsumers` +- **summary**: The maximum number of consumers a single remote lock may have. + +### universalLocation: `StagingXcmV5Junctions` +- **interface**: `api.consts.xcmPallet.universalLocation` +- **summary**: This chain's Universal Location. diff --git a/docs/polkadot/errors.md b/docs/polkadot/errors.md index 2574fb3d3..40be009a7 100644 --- a/docs/polkadot/errors.md +++ b/docs/polkadot/errors.md @@ -66,6 +66,8 @@ This page lists the errors that can be encountered in the different modules. - **[proxy](#proxy)** +- **[rcMigrator](#rcmigrator)** + - **[referenda](#referenda)** - **[registrar](#registrar)** @@ -78,6 +80,8 @@ This page lists the errors that can be encountered in the different modules. - **[staking](#staking)** +- **[stakingAhClient](#stakingahclient)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** @@ -277,6 +281,10 @@ ___ - **interface**: `api.errors.bounties.InvalidValue.is` - **summary**: Invalid bounty value. +### NotProposer +- **interface**: `api.errors.bounties.NotProposer.is` +- **summary**: User is not the proposer of the bounty. + ### PendingPayout - **interface**: `api.errors.bounties.PendingPayout.is` - **summary**: A bounty payout is pending. To cancel the bounty, you must unassign and slash the curator. @@ -1230,10 +1238,18 @@ ___ - **interface**: `api.errors.paras.CannotUpgradeCode.is` - **summary**: Parachain cannot currently schedule a code upgrade. +### InvalidBlockNumber +- **interface**: `api.errors.paras.InvalidBlockNumber.is` +- **summary**: Invalid block number. + ### InvalidCode - **interface**: `api.errors.paras.InvalidCode.is` - **summary**: Invalid validation code size. +### NothingAuthorized +- **interface**: `api.errors.paras.NothingAuthorized.is` +- **summary**: No upgrade authorized. + ### NotRegistered - **interface**: `api.errors.paras.NotRegistered.is` - **summary**: Para is not registered in our system. @@ -1261,6 +1277,10 @@ ___ ### PvfCheckValidatorIndexOutOfBounds - **interface**: `api.errors.paras.PvfCheckValidatorIndexOutOfBounds.is` - **summary**: Claimed validator index is out of bounds. + +### Unauthorized +- **interface**: `api.errors.paras.Unauthorized.is` +- **summary**: The submitted code is not authorized. ___ @@ -1409,6 +1429,87 @@ ___ ___ +## rcMigrator + +### AccountReferenced +- **interface**: `api.errors.rcMigrator.AccountReferenced.is` +- **summary**: The account is referenced by some other pallet. It might have freezes or holds. + +### AhUmpQueuePriorityAlreadySet +- **interface**: `api.errors.rcMigrator.AhUmpQueuePriorityAlreadySet.is` +- **summary**: The AH UMP queue priority configuration is already set. + +### BadXcmVersion +- **interface**: `api.errors.rcMigrator.BadXcmVersion.is` +- **summary**: The XCM version is invalid. + +### BalanceOverflow +- **interface**: `api.errors.rcMigrator.BalanceOverflow.is` +- **summary**: Balance accounting overflow. + +### BalanceUnderflow +- **interface**: `api.errors.rcMigrator.BalanceUnderflow.is` +- **summary**: Balance accounting underflow. + +### EraEndsTooSoon +- **interface**: `api.errors.rcMigrator.EraEndsTooSoon.is` +- **summary**: Indicates that there is not enough time for staking to lock. + + Schedule the migration at least two sessions before the current era ends. + +### FailedToWithdrawAccount +- **interface**: `api.errors.rcMigrator.FailedToWithdrawAccount.is` +- **summary**: Failed to withdraw account from RC for migration to AH. + +### InvalidOrigin +- **interface**: `api.errors.rcMigrator.InvalidOrigin.is` +- **summary**: The origin is invalid. + +### InvalidParameter +- **interface**: `api.errors.rcMigrator.InvalidParameter.is` +- **summary**: Invalid parameter. + +### InvalidQueryResponse +- **interface**: `api.errors.rcMigrator.InvalidQueryResponse.is` +- **summary**: The query response is invalid. + +### InvalidStageTransition +- **interface**: `api.errors.rcMigrator.InvalidStageTransition.is` +- **summary**: The stage transition is invalid. + +### OutOfWeight +- **interface**: `api.errors.rcMigrator.OutOfWeight.is` + +### PastBlockNumber +- **interface**: `api.errors.rcMigrator.PastBlockNumber.is` +- **summary**: Indicates that the specified block number is in the past. + +### QueryNotFound +- **interface**: `api.errors.rcMigrator.QueryNotFound.is` +- **summary**: The xcm query was not found. + +### Unreachable +- **interface**: `api.errors.rcMigrator.Unreachable.is` + +### UnreachableStage +- **interface**: `api.errors.rcMigrator.UnreachableStage.is` +- **summary**: The migration stage is not reachable from the current stage. + +### UnsignedValidationFailed +- **interface**: `api.errors.rcMigrator.UnsignedValidationFailed.is` +- **summary**: Unsigned validation failed. + +### XcmError +- **interface**: `api.errors.rcMigrator.XcmError.is` +- **summary**: Failed to send XCM message to AH. + +### XcmSendError +- **interface**: `api.errors.rcMigrator.XcmSendError.is` +- **summary**: Failed to send XCM message. + +___ + + ## referenda ### BadReferendum @@ -1735,6 +1836,15 @@ ___ ___ +## stakingAhClient + +### Blocked +- **interface**: `api.errors.stakingAhClient.Blocked.is` +- **summary**: Could not process incoming message because incoming messages are blocked. + +___ + + ## stateTrieMigration ### BadChildRoot @@ -1897,6 +2007,10 @@ ___ ### List - **interface**: `api.errors.voterList.List.is` - **summary**: A error in the list interface implementation. + +### Locked +- **interface**: `api.errors.voterList.Locked.is` +- **summary**: Could not update a node, because the pallet is locked. ___ @@ -1996,6 +2110,10 @@ ___ - **interface**: `api.errors.xcmPallet.LocalExecutionIncomplete.is` - **summary**: Local XCM execution incomplete. +### LocalExecutionIncompleteWithError +- **interface**: `api.errors.xcmPallet.LocalExecutionIncompleteWithError.is` +- **summary**: Local XCM execution incomplete with the actual XCM error and the index of the instruction that caused the error. + ### LockNotFound - **interface**: `api.errors.xcmPallet.LockNotFound.is` - **summary**: A remote lock with the corresponding data could not be found. diff --git a/docs/polkadot/events.md b/docs/polkadot/events.md index 84138be3f..191f117cd 100644 --- a/docs/polkadot/events.md +++ b/docs/polkadot/events.md @@ -32,6 +32,8 @@ Events are emitted for certain operations on the runtime. The following sections - **[grandpa](#grandpa)** +- **[historical](#historical)** + - **[hrmp](#hrmp)** - **[indices](#indices)** @@ -56,6 +58,8 @@ Events are emitted for certain operations on the runtime. The following sections - **[proxy](#proxy)** +- **[rcMigrator](#rcmigrator)** + - **[referenda](#referenda)** - **[registrar](#registrar)** @@ -68,6 +72,8 @@ Events are emitted for certain operations on the runtime. The following sections - **[staking](#staking)** +- **[stakingAhClient](#stakingahclient)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** @@ -211,6 +217,10 @@ ___ - **interface**: `api.events.balances.Transfer.is` - **summary**: Transfer succeeded. +### Unexpected(`PalletBalancesUnexpectedKind`) +- **interface**: `api.events.balances.Unexpected.is` +- **summary**: An unexpected/defensive event was triggered. + ### Unlocked(`AccountId32`, `u128`) - **interface**: `api.events.balances.Unlocked.is` - **summary**: Some balance was unlocked. @@ -275,6 +285,10 @@ ___ ### CuratorUnassigned(`u32`) - **interface**: `api.events.bounties.CuratorUnassigned.is` - **summary**: A bounty curator is unassigned. + +### DepositPoked(`u32`, `AccountId32`, `u128`, `u128`) +- **interface**: `api.events.bounties.DepositPoked.is` +- **summary**: A bounty deposit has been poked. ___ @@ -490,6 +504,19 @@ ___ ___ +## historical + +### RootsPruned(`u32`) +- **interface**: `api.events.historical.RootsPruned.is` +- **summary**: The merkle roots of up to this session index were pruned + +### RootStored(`u32`) +- **interface**: `api.events.historical.RootStored.is` +- **summary**: The merkle root of the validators of the said session were stored + +___ + + ## hrmp ### ChannelClosed(`u32`, `PolkadotParachainPrimitivesPrimitivesHrmpChannelId`) @@ -752,6 +779,10 @@ ___ - **interface**: `api.events.paras.ActionQueued.is` - **summary**: A para has been queued to execute pending actions. `para_id` +### CodeAuthorized(`u32`, `H256`, `u32`) +- **interface**: `api.events.paras.CodeAuthorized.is` +- **summary**: A new code hash has been authorized for a Para. + ### CodeUpgradeScheduled(`u32`) - **interface**: `api.events.paras.CodeUpgradeScheduled.is` - **summary**: A code upgrade has been scheduled for a Para. `para_id` @@ -779,6 +810,10 @@ ___ ### PvfCheckStarted(`H256`, `u32`) - **interface**: `api.events.paras.PvfCheckStarted.is` - **summary**: The given para either initiated or subscribed to a PVF check for the given validation code. `code_hash` `para_id` + +### UpgradeCooldownRemoved(`u32`) +- **interface**: `api.events.paras.UpgradeCooldownRemoved.is` +- **summary**: The upgrade cooldown was removed. ___ @@ -842,6 +877,103 @@ ___ ### PureCreated(`AccountId32`, `AccountId32`, `PolkadotRuntimeConstantsProxyProxyType`, `u16`) - **interface**: `api.events.proxy.PureCreated.is` - **summary**: A pure account has been created by new proxy with given disambiguation index and proxy type. + +### PureKilled(`AccountId32`, `AccountId32`, `PolkadotRuntimeConstantsProxyProxyType`, `u16`) +- **interface**: `api.events.proxy.PureKilled.is` +- **summary**: A pure proxy was killed by its spawner. + +___ + + +## rcMigrator + +### AccountsPreserved(`Vec`) +- **interface**: `api.events.rcMigrator.AccountsPreserved.is` +- **summary**: The accounts to be preserved on Relay Chain were set. + +### AhUmpQueuePriorityConfigSet(`PalletRcMigratorQueuePriority`, `PalletRcMigratorQueuePriority`) +- **interface**: `api.events.rcMigrator.AhUmpQueuePriorityConfigSet.is` +- **summary**: The AH UMP queue priority config was set. + +### AhUmpQueuePrioritySet(`bool`, `u32`, `u32`) +- **interface**: `api.events.rcMigrator.AhUmpQueuePrioritySet.is` +- **summary**: Whether the AH UMP queue was prioritized for the next block. + +### AssetHubMigrationFinished() +- **interface**: `api.events.rcMigrator.AssetHubMigrationFinished.is` +- **summary**: The Asset Hub Migration finished. + + This event is equivalent to `StageTransition { new: MigrationDone, .. }` but is easier to understand. The finishing is immediate and affects all events happening afterwards. + +### AssetHubMigrationStarted() +- **interface**: `api.events.rcMigrator.AssetHubMigrationStarted.is` +- **summary**: The Asset Hub Migration started and is active until `AssetHubMigrationFinished` is emitted. + + This event is equivalent to `StageTransition { new: Initializing, .. }` but is easier to understand. The activation is immediate and affects all events happening afterwards. + +### CancellerSet(`Option`, `Option`) +- **interface**: `api.events.rcMigrator.CancellerSet.is` +- **summary**: The canceller account id was set. + +### ManagerMultisigDispatched(`Result`) +- **interface**: `api.events.rcMigrator.ManagerMultisigDispatched.is` +- **summary**: The manager multisig dispatched something. + +### ManagerMultisigVoted(`u32`) +- **interface**: `api.events.rcMigrator.ManagerMultisigVoted.is` +- **summary**: The manager multisig received a vote. + +### ManagerSet(`Option`, `Option`) +- **interface**: `api.events.rcMigrator.ManagerSet.is` +- **summary**: The manager account id was set. + +### MigratedBalanceConsumed(`u128`, `u128`) +- **interface**: `api.events.rcMigrator.MigratedBalanceConsumed.is` +- **summary**: The RC kept balance was consumed. + +### MigratedBalanceRecordSet(`u128`, `u128`) +- **interface**: `api.events.rcMigrator.MigratedBalanceRecordSet.is` +- **summary**: The total issuance was recorded. + +### MigrationCancelled() +- **interface**: `api.events.rcMigrator.MigrationCancelled.is` +- **summary**: The migration was cancelled. + +### MigrationPaused(`PalletRcMigratorMigrationStage`) +- **interface**: `api.events.rcMigrator.MigrationPaused.is` +- **summary**: The migration was paused. + +### MigrationSettingsSet(`Option`, `Option`) +- **interface**: `api.events.rcMigrator.MigrationSettingsSet.is` +- **summary**: The migration settings were set. + +### PureAccountsIndexed(`u32`) +- **interface**: `api.events.rcMigrator.PureAccountsIndexed.is` +- **summary**: Some pure accounts were indexed for possibly receiving free `Any` proxies. + +### QueryResponseReceived(`u64`, `XcmV3MaybeErrorCode`) +- **interface**: `api.events.rcMigrator.QueryResponseReceived.is` +- **summary**: A query response has been received. + +### StageTransition(`PalletRcMigratorMigrationStage`, `PalletRcMigratorMigrationStage`) +- **interface**: `api.events.rcMigrator.StageTransition.is` +- **summary**: A stage transition has occurred. + +### StakingElectionsPaused() +- **interface**: `api.events.rcMigrator.StakingElectionsPaused.is` +- **summary**: The staking elections were paused. + +### UnprocessedMsgBufferSet(`u32`, `u32`) +- **interface**: `api.events.rcMigrator.UnprocessedMsgBufferSet.is` +- **summary**: The unprocessed message buffer size has been set. + +### XcmResendAttempt(`u64`, `Option`) +- **interface**: `api.events.rcMigrator.XcmResendAttempt.is` +- **summary**: A XCM message has been resent. + +### XcmSent(`StagingXcmV5Location`, `StagingXcmV5Location`, `StagingXcmV5Xcm`, `[u8;32]`) +- **interface**: `api.events.rcMigrator.XcmSent.is` +- **summary**: An XCM message was sent. ___ @@ -977,6 +1109,10 @@ ___ ## session +### NewQueued() +- **interface**: `api.events.session.NewQueued.is` +- **summary**: The `NewSession` event in the current block also implies a new validator set to be queued. + ### NewSession(`u32`) - **interface**: `api.events.session.NewSession.is` - **summary**: New session has happened. Note that the argument is the session index, not the block number as the type might suggest. @@ -1088,6 +1224,29 @@ ___ ___ +## stakingAhClient + +### CouldNotMergeAndDropped() +- **interface**: `api.events.stakingAhClient.CouldNotMergeAndDropped.is` +- **summary**: We could not merge, and therefore dropped a buffered message. + + Note that this event is more resembling an error, but we use an event because in this pallet we need to mutate storage upon some failures. + +### SetTooSmallAndDropped() +- **interface**: `api.events.stakingAhClient.SetTooSmallAndDropped.is` +- **summary**: The validator set received is way too small, as per [`Config::MinimumValidatorSetSize`]. + +### Unexpected(`PalletStakingAsyncAhClientUnexpectedKind`) +- **interface**: `api.events.stakingAhClient.Unexpected.is` +- **summary**: Something occurred that should never happen under normal operation. Logged as an event for fail-safe observability. + +### ValidatorSetReceived(`u32`, `u32`, `Option`, `bool`) +- **interface**: `api.events.stakingAhClient.ValidatorSetReceived.is` +- **summary**: A new validator set has been received. + +___ + + ## stateTrieMigration ### AutoMigrationFinished() @@ -1251,6 +1410,10 @@ ___ - **interface**: `api.events.vesting.VestingCompleted.is` - **summary**: An \[account\] has become fully vested. +### VestingCreated(`AccountId32`, `u32`) +- **interface**: `api.events.vesting.VestingCreated.is` +- **summary**: A vesting schedule has been created. + ### VestingUpdated(`AccountId32`, `u128`) - **interface**: `api.events.vesting.VestingUpdated.is` - **summary**: The amount vested has been updated. This could indicate a change in funds available. The balance given is the amount which is left unvested (and thus locked). diff --git a/docs/polkadot/extrinsics.md b/docs/polkadot/extrinsics.md index 4f51830a0..79ce55618 100644 --- a/docs/polkadot/extrinsics.md +++ b/docs/polkadot/extrinsics.md @@ -66,6 +66,8 @@ The following sections contain Extrinsics methods are part of the default Polkad - **[proxy](#proxy)** +- **[rcMigrator](#rcmigrator)** + - **[referenda](#referenda)** - **[registrar](#registrar)** @@ -78,6 +80,8 @@ The following sections contain Extrinsics methods are part of the default Polkad - **[staking](#staking)** +- **[stakingAhClient](#stakingahclient)** + - **[stateTrieMigration](#statetriemigration)** - **[system](#system)** @@ -385,6 +389,24 @@ ___ - O(1). +### pokeDeposit(bounty_id: `Compact`) +- **interface**: `api.tx.bounties.pokeDeposit` +- **summary**: Poke the deposit reserved for creating a bounty proposal. + + This can be used by accounts to update their reserved amount. + + The dispatch origin for this call must be _Signed_. + + Parameters: + + - `bounty_id`: The bounty id for which to adjust the deposit. + + If the deposit is updated, the difference will be reserved/unreserved from the proposer's account. + + The transaction is made free if the deposit is updated and paid otherwise. + + Emits `DepositPoked` if the deposit is updated. + ### proposeBounty(value: `Compact`, description: `Bytes`) - **interface**: `api.tx.bounties.proposeBounty` - **summary**: Propose a new bounty. @@ -1064,7 +1086,7 @@ ___ ## electionProviderMultiPhase -### governanceFallback(maybe_max_voters: `Option`, maybe_max_targets: `Option`) +### governanceFallback() - **interface**: `api.tx.electionProviderMultiPhase.governanceFallback` - **summary**: Trigger the governance fallback. @@ -1978,6 +2000,20 @@ ___ This function is mainly meant to be used for upgrading parachains that do not follow the go-ahead signal while the PVF pre-checking feature is enabled. +### applyAuthorizedForceSetCurrentCode(para: `u32`, new_code: `Bytes`) +- **interface**: `api.tx.paras.applyAuthorizedForceSetCurrentCode` +- **summary**: Applies the already authorized current code for the parachain, triggering the same functionality as `force_set_current_code`. + +### authorizeForceSetCurrentCodeHash(para: `u32`, new_code_hash: `H256`, valid_period: `u32`) +- **interface**: `api.tx.paras.authorizeForceSetCurrentCodeHash` +- **summary**: Sets the storage for the authorized current code hash of the parachain. If not applied, it will be removed at the `System::block_number() + valid_period` block. + + This can be useful, when triggering `Paras::force_set_current_code(para, code)` from a different chain than the one where the `Paras` pallet is deployed. + + The main purpose is to avoid transferring the entire `code` Wasm blob between chains. Instead, we authorize `code_hash` with `root`, which can later be applied by `Paras::apply_authorized_force_set_current_code(para, code)` by anyone. + + Authorizations are stored in an **overwriting manner**. + ### forceNoteNewHead(para: `u32`, new_head: `Bytes`) - **interface**: `api.tx.paras.forceNoteNewHead` - **summary**: Note a new block head for para within the context of the current block. @@ -2011,6 +2047,12 @@ ___ - **summary**: Remove the validation code from the storage iff the reference count is 0. This is better than removing the storage directly, because it will not remove the code that was suddenly got used by some parachain while this dispatchable was pending dispatching. + +### removeUpgradeCooldown(para: `u32`) +- **interface**: `api.tx.paras.removeUpgradeCooldown` +- **summary**: Remove an upgrade cooldown for a parachain. + + The cost for removing the cooldown earlier depends on the time left for the cooldown multiplied by [`Config::CooldownRemovalMultiplier`]. The paid tokens are burned. ___ @@ -2030,7 +2072,7 @@ ___ ## parasSlashing -### reportDisputeLostUnsigned(dispute_proof: `PolkadotPrimitivesV8SlashingDisputeProof`, key_owner_proof: `SpSessionMembershipProof`) +### reportDisputeLostUnsigned(dispute_proof: `PolkadotPrimitivesVstagingDisputeProof`, key_owner_proof: `SpSessionMembershipProof`) - **interface**: `api.tx.parasSlashing.reportDisputeLostUnsigned` ___ @@ -2131,19 +2173,19 @@ ___ WARNING: **All access to this account will be lost.** Any funds held in it will be inaccessible. - Requires a `Signed` origin, and the sender account must have been created by a call to `pure` with corresponding parameters. + Requires a `Signed` origin, and the sender account must have been created by a call to `create_pure` with corresponding parameters. - - `spawner`: The account that originally called `pure` to create this account. + - `spawner`: The account that originally called `create_pure` to create this account. - - `index`: The disambiguation index originally passed to `pure`. Probably `0`. + - `index`: The disambiguation index originally passed to `create_pure`. Probably `0`. - - `proxy_type`: The proxy type originally passed to `pure`. + - `proxy_type`: The proxy type originally passed to `create_pure`. - - `height`: The height of the chain when the call to `pure` was processed. + - `height`: The height of the chain when the call to `create_pure` was processed. - - `ext_index`: The extrinsic index in which the call to `pure` was processed. + - `ext_index`: The extrinsic index in which the call to `create_pure` was processed. - Fails with `NoPermission` in case the caller is not a previously created pure account whose `pure` call has corresponding parameters. + Fails with `NoPermission` in case the caller is not a previously created pure account whose `create_pure` call has corresponding parameters. ### pokeDeposit() - **interface**: `api.tx.proxy.pokeDeposit` @@ -2219,7 +2261,7 @@ ___ The dispatch origin for this call must be _Signed_. - WARNING: This may be called on accounts created by `pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** + WARNING: This may be called on accounts created by `create_pure`, however if done, then the unreserved fees will be inaccessible. **All access to this account will be lost.** ### removeProxy(delegate: `MultiAddress`, proxy_type: `PolkadotRuntimeConstantsProxyProxyType`, delay: `u32`) - **interface**: `api.tx.proxy.removeProxy` @@ -2236,6 +2278,107 @@ ___ ___ +## rcMigrator + +### cancelMigration() +- **interface**: `api.tx.rcMigrator.cancelMigration` +- **summary**: Cancel the migration. + + Migration can only be cancelled if it is in the [`MigrationStage::Scheduled`] state. + +### forceSetStage(stage: `PalletRcMigratorMigrationStage`) +- **interface**: `api.tx.rcMigrator.forceSetStage` +- **summary**: Set the migration stage. + + This call is intended for emergency use only and is guarded by the [`Config::AdminOrigin`]. + +### pauseMigration() +- **interface**: `api.tx.rcMigrator.pauseMigration` +- **summary**: Pause the migration. + +### preserveAccounts(accounts: `Vec`) +- **interface**: `api.tx.rcMigrator.preserveAccounts` +- **summary**: Set the accounts to be preserved on Relay Chain during the migration. + + The accounts must have no consumers references. + +### receiveQueryResponse(query_id: `u64`, response: `StagingXcmV5Response`) +- **interface**: `api.tx.rcMigrator.receiveQueryResponse` +- **summary**: Receive a query response from the Asset Hub for a previously sent xcm message. + +### resendXcm(query_id: `u64`) +- **interface**: `api.tx.rcMigrator.resendXcm` +- **summary**: Resend a previously sent and unconfirmed XCM message. + +### scheduleMigration(start: `FrameSupportScheduleDispatchTime`, warm_up: `FrameSupportScheduleDispatchTime`, cool_off: `FrameSupportScheduleDispatchTime`, unsafe_ignore_staking_lock_check: `bool`) +- **interface**: `api.tx.rcMigrator.scheduleMigration` +- **summary**: Schedule the migration to start at a given moment. + + #### Parameters: + + - `start`: The block number at which the migration will start. `DispatchTime` calculated at the moment of the extrinsic execution. + + - `warm_up`: Duration or timepoint that will be used to prepare for the migration. Calls are filtered during this period. It is intended to give enough time for UMP and DMP queues to empty. `DispatchTime` calculated at the moment of the transition to the warm-up stage. + + - `cool_off`: The block number at which the post migration cool-off period will end. The `DispatchTime` calculated at the moment of the transition to the cool-off stage. + + - `unsafe_ignore_staking_lock_check`: ONLY FOR TESTING. Ignore the check whether the scheduled time point is far enough in the future. + + Note: If the staking election for next era is already complete, and the next validator set is queued in `pallet-session`, we want to avoid starting the data migration at this point as it can lead to some missed validator rewards. To address this, we stop staking election at the start of migration and must wait atleast 1 session (set via warm_up) before starting the data migration. + + Read [`MigrationStage::Scheduled`] documentation for more details. + +### sendXcmMessage(dest: `XcmVersionedLocation`, message: `XcmVersionedXcm`) +- **interface**: `api.tx.rcMigrator.sendXcmMessage` +- **summary**: XCM send call identical to the [`pallet_xcm::Pallet::send`] call but with the [Config::SendXcm] router which will be able to send messages to the Asset Hub during the migration. + +### setAhUmpQueuePriority(new: `PalletRcMigratorQueuePriority`) +- **interface**: `api.tx.rcMigrator.setAhUmpQueuePriority` +- **summary**: Set the AH UMP queue priority configuration. + + Can only be called by the `AdminOrigin`. + +### setCanceller(new: `Option`) +- **interface**: `api.tx.rcMigrator.setCanceller` +- **summary**: Set the canceller account id. + + The canceller can only stop scheduled migration. + +### setManager(new: `Option`) +- **interface**: `api.tx.rcMigrator.setManager` +- **summary**: Set the manager account id. + + The manager has the similar to [`Config::AdminOrigin`] privileges except that it can not set the manager account id via `set_manager` call. + +### setSettings(settings: `Option`) +- **interface**: `api.tx.rcMigrator.setSettings` +- **summary**: Set the migration settings. Can only be done by admin or manager. + +### setUnprocessedMsgBuffer(new: `Option`) +- **interface**: `api.tx.rcMigrator.setUnprocessedMsgBuffer` +- **summary**: Set the unprocessed message buffer size. + + `None` means to use the configuration value. + +### startDataMigration() +- **interface**: `api.tx.rcMigrator.startDataMigration` +- **summary**: Start the data migration. + + This is typically called by the Asset Hub to indicate it's readiness to receive the migration data. + +### voteManagerMultisig(payload: `PalletRcMigratorManagerMultisigVote`, sig: `SpRuntimeMultiSignature`) +- **interface**: `api.tx.rcMigrator.voteManagerMultisig` +- **summary**: Vote on behalf of any of the members in `MultisigMembers`. + + Unsigned extrinsic, requiring the `payload` to be signed. + + Upon each call, a new entry is created in `ManagerMultisigs` map the `payload.call` to be dispatched. Once `MultisigThreshold` is reached, the entire map is deleted, and we move on to the next round. + + The round system ensures that signatures from older round cannot be reused. + +___ + + ## referenda ### cancel(index: `u32`) @@ -2577,7 +2720,7 @@ ___ Can be called by the `T::AdminOrigin`. - Parameters: era and indices of the slashes for that era to kill. + Parameters: era and indices of the slashes for that era to kill. They **must** be sorted in ascending order, *and* unique. ### chill() - **interface**: `api.tx.staking.chill` @@ -2913,6 +3056,8 @@ ___ - **interface**: `api.tx.staking.unbond` - **summary**: Schedule a portion of the stash to be unlocked ready for transfer out after the bond period ends. If this leaves an amount actively bonded less than [`asset::existential_deposit`], then it is increased to the full amount. + The stash may be chilled if the ledger total amount falls to 0 after unbonding. + The dispatch origin for this call must be _Signed_ by the controller, not the stash. Once the unlock period is done, you can call `withdraw_unbonded` to actually move the funds out of management ready for transfer. @@ -2962,6 +3107,22 @@ ___ ___ +## stakingAhClient + +### forceOnMigrationEnd() +- **interface**: `api.tx.stakingAhClient.forceOnMigrationEnd` +- **summary**: manually do what this pallet was meant to do at the end of the migration. + +### setMode(mode: `PalletStakingAsyncAhClientOperatingMode`) +- **interface**: `api.tx.stakingAhClient.setMode` +- **summary**: Allows governance to force set the operating mode of the pallet. + +### validatorSet(report: `PalletStakingAsyncRcClientValidatorSetReport`) +- **interface**: `api.tx.stakingAhClient.validatorSet` + +___ + + ## stateTrieMigration ### continueMigrate(limits: `PalletStateTrieMigrationMigrationLimits`, real_size_upper: `u32`, witness_task: `PalletStateTrieMigrationMigrationTask`) diff --git a/docs/polkadot/runtime.md b/docs/polkadot/runtime.md index 30f807519..74e86e40a 100644 --- a/docs/polkadot/runtime.md +++ b/docs/polkadot/runtime.md @@ -38,6 +38,8 @@ The following section contains known runtime calls that may be available on spec - **[parachainHost](#parachainhost)** +- **[runtimeViewFunction](#runtimeviewfunction)** + - **[sessionKeys](#sessionkeys)** - **[stakingApi](#stakingapi)** @@ -579,6 +581,16 @@ ___ ___ +## runtimeViewFunction + +### executeViewFunction(query_id: `FrameSupportViewFunctionsViewFunctionId`, input: `Bytes`): `Result` +- **interface**: `api.call.runtimeViewFunction.executeViewFunction` +- **runtime**: `runtimeViewFunction_execute_view_function` +- **summary**: Execute a view function query. + +___ + + ## sessionKeys ### decodeSessionKeys(encoded: `Bytes`): `Option>` diff --git a/docs/polkadot/storage.md b/docs/polkadot/storage.md index 54b2b8281..9b4828007 100644 --- a/docs/polkadot/storage.md +++ b/docs/polkadot/storage.md @@ -86,6 +86,8 @@ The following sections contain Storage methods are part of the default Polkadot - **[proxy](#proxy)** +- **[rcMigrator](#rcmigrator)** + - **[referenda](#referenda)** - **[registrar](#registrar)** @@ -98,6 +100,8 @@ The following sections contain Storage methods are part of the default Polkadot - **[staking](#staking)** +- **[stakingAhClient](#stakingahclient)** + - **[stateTrieMigration](#statetriemigration)** - **[substrate](#substrate)** @@ -1039,6 +1043,10 @@ ___ - **interface**: `api.query.paras.actionsQueue` - **summary**: The actions to perform during the start of a specific session index. +### authorizedCodeHash(`u32`): `Option` +- **interface**: `api.query.paras.authorizedCodeHash` +- **summary**: The code hash authorizations for a para which will expire `expire_at` `BlockNumberFor`. + ### codeByHash(`H256`): `Option` - **interface**: `api.query.paras.codeByHash` - **summary**: Validation code stored by its hash. @@ -1252,7 +1260,7 @@ ___ ## parasSlashing -### unappliedSlashes(`u32, H256`): `Option` +### unappliedSlashes(`u32, H256`): `Option` - **interface**: `api.query.parasSlashing.unappliedSlashes` - **summary**: Validators pending dispute slashes. @@ -1292,6 +1300,123 @@ ___ ___ +## rcMigrator + +### ahUmpQueuePriorityConfig(): `PalletRcMigratorQueuePriority` +- **interface**: `api.query.rcMigrator.ahUmpQueuePriorityConfig` +- **summary**: The priority of the Asset Hub UMP queue during migration. + + Controls how the Asset Hub UMP (Upward Message Passing) queue is processed relative to other queues during the migration process. This helps ensure timely processing of migration messages. The default priority pattern is defined in the pallet configuration, but can be overridden by a storage value of this type. + +### canceller(): `Option` +- **interface**: `api.query.rcMigrator.canceller` +- **summary**: An optional account id of a canceller. + + This account id can only stop scheduled migration. + +### coolOffPeriod(): `Option` +- **interface**: `api.query.rcMigrator.coolOffPeriod` +- **summary**: The duration of the post migration cool-off period. + + This is the duration of the cool-off period after the data migration is finished. During this period, the migration will be still in ongoing state and the concerned extrinsics will be locked. + +### counterForPendingXcmMessages(): `u32` +- **interface**: `api.query.rcMigrator.counterForPendingXcmMessages` +- **summary**: Counter for the related counted storage map + +### counterForRcAccounts(): `u32` +- **interface**: `api.query.rcMigrator.counterForRcAccounts` +- **summary**: Counter for the related counted storage map + +### manager(): `Option` +- **interface**: `api.query.rcMigrator.manager` +- **summary**: An optional account id of a manager. + + This account id has similar privileges to [`Config::AdminOrigin`] except that it can not set the manager account id via `set_manager` call. + +### managerMultisigRound(): `u32` +- **interface**: `api.query.rcMigrator.managerMultisigRound` +- **summary**: The current round of the multisig voting. + + Votes are only valid for the current round. + +### managerMultisigs(`Call`): `Vec` +- **interface**: `api.query.rcMigrator.managerMultisigs` +- **summary**: The multisig AccountIDs that votes to execute a specific call. + +### managerVotesInCurrentRound(`AccountId32`): `u32` +- **interface**: `api.query.rcMigrator.managerVotesInCurrentRound` +- **summary**: How often each participant voted in the current round. + + Will be cleared at the end of each round. + +### migrationEndBlock(): `Option` +- **interface**: `api.query.rcMigrator.migrationEndBlock` +- **summary**: Block number when migration finished and extrinsics were unlocked. + + This is set when entering the `MigrationDone` stage hence when `RcMigrationStage::is_finished()` becomes `true`. + +### migrationStartBlock(): `Option` +- **interface**: `api.query.rcMigrator.migrationStartBlock` +- **summary**: The block number at which the migration began and the pallet's extrinsics were locked. + + This value is set when entering the `WaitingForAh` stage, i.e., when `RcMigrationStage::is_ongoing()` becomes `true`. + +### pendingXcmMessages(`(u64,H256)`): `Option` +- **interface**: `api.query.rcMigrator.pendingXcmMessages` +- **summary**: The pending XCM messages. + + Contains data messages that have been sent to the Asset Hub but not yet confirmed. + + Unconfirmed messages can be resent by calling the [`Pallet::resend_xcm`] function. + +### pendingXcmQueries(`u64`): `Option` +- **interface**: `api.query.rcMigrator.pendingXcmQueries` +- **summary**: The pending XCM response queries and their XCM hash referencing the message in the [`PendingXcmMessages`] storage. + + The `QueryId` is the identifier from the [`pallet_xcm`] query handler registry. The XCM pallet will notify about the status of the message by calling the [`Pallet::receive_query_response`] function with the `QueryId` and the response. + +### pureProxyCandidatesMigrated(`AccountId32`): `Option` +- **interface**: `api.query.rcMigrator.pureProxyCandidatesMigrated` +- **summary**: Accounts that use the proxy pallet to delegate permissions and have no nonce. + + Boolean value is whether they have been migrated to the Asset Hub. Needed for idempotency. + +### rcAccounts(`AccountId32`): `Option` +- **interface**: `api.query.rcMigrator.rcAccounts` +- **summary**: Helper storage item to obtain and store the known accounts that should be kept partially or fully on Relay Chain. + +### rcMigratedBalance(): `PalletRcMigratorAccountsMigratedBalances` +- **interface**: `api.query.rcMigrator.rcMigratedBalance` +- **summary**: Helper storage item to store the total balance that should be kept on Relay Chain. + +### rcMigratedBalanceArchive(): `PalletRcMigratorAccountsMigratedBalances` +- **interface**: `api.query.rcMigrator.rcMigratedBalanceArchive` +- **summary**: Helper storage item to store the total balance that should be kept on Relay Chain after it is consumed from the `RcMigratedBalance` storage item and sent to the Asset Hub. + + This let us to take the value from the `RcMigratedBalance` storage item and keep the `SignalMigrationFinish` stage to be idempotent while preserving these values for tests and later discoveries. + +### rcMigrationStage(): `PalletRcMigratorMigrationStage` +- **interface**: `api.query.rcMigrator.rcMigrationStage` +- **summary**: The Relay Chain migration state. + +### settings(): `Option` +- **interface**: `api.query.rcMigrator.settings` +- **summary**: The migration settings. + +### unprocessedMsgBuffer(): `Option` +- **interface**: `api.query.rcMigrator.unprocessedMsgBuffer` +- **summary**: Manual override for `type UnprocessedMsgBuffer: Get`. Look there for docs. + +### warmUpPeriod(): `Option` +- **interface**: `api.query.rcMigrator.warmUpPeriod` +- **summary**: The duration of the pre migration warm-up period. + + This is the duration of the warm-up period before the data migration starts. During this period, the migration will be in ongoing state and the concerned extrinsics will be locked. + +___ + + ## referenda ### decidingCount(`u16`): `u32` @@ -1662,6 +1787,61 @@ ___ ___ +## stakingAhClient + +### incompleteValidatorSetReport(): `Option` +- **interface**: `api.query.stakingAhClient.incompleteValidatorSetReport` +- **summary**: An incomplete validator set report. + +### mode(): `PalletStakingAsyncAhClientOperatingMode` +- **interface**: `api.query.stakingAhClient.mode` +- **summary**: Indicates the current operating mode of the pallet. + + This value determines how the pallet behaves in response to incoming and outgoing messages, particularly whether it should execute logic directly, defer it, or delegate it entirely. + +### nextSessionChangesValidators(): `Option` +- **interface**: `api.query.stakingAhClient.nextSessionChangesValidators` +- **summary**: A storage value that is set when a `new_session` gives a new validator set to the session pallet, and is cleared on the next call. + + The inner u32 is the id of the said activated validator set. While not relevant here, good to know this is the planning era index of staking-async on AH. + + Once cleared, we know a validator set has been activated, and therefore we can send a timestamp to AH. + +### offenceSendQueueCursor(): `u32` +- **interface**: `api.query.stakingAhClient.offenceSendQueueCursor` +- **summary**: Internal storage item of [`OffenceSendQueue`]. Should not be used manually. + +### offenceSendQueueOffences(`u32`): `Vec<(u32,PalletStakingAsyncRcClientOffence)>` +- **interface**: `api.query.stakingAhClient.offenceSendQueueOffences` +- **summary**: Internal storage item of [`OffenceSendQueue`]. Should not be used manually. + +### outgoingSessionReport(): `Option<(PalletStakingAsyncRcClientSessionReport,u32)>` +- **interface**: `api.query.stakingAhClient.outgoingSessionReport` +- **summary**: A session report that is outgoing, and should be sent. + + This will be attempted to be sent, possibly on every `on_initialize` call, until it is sent, or the second value reaches zero, at which point we drop it. + +### validatorPoints(`AccountId32`): `u32` +- **interface**: `api.query.stakingAhClient.validatorPoints` +- **summary**: All of the points of the validators. + + This is populated during a session, and is flushed and sent over via [`SendToAssetHub`] at each session end. + +### validatorSet(): `Option<(u32,Vec)>` +- **interface**: `api.query.stakingAhClient.validatorSet` +- **summary**: The queued validator sets for a given planning session index. + + This is received via a call from AssetHub. + +### validatorSetAppliedAt(): `Option` +- **interface**: `api.query.stakingAhClient.validatorSetAppliedAt` +- **summary**: The session index at which the latest elected validator set was applied. + + This is used to determine if an offence, given a session index, is in the current active era or not. + +___ + + ## stateTrieMigration ### autoLimits(): `Option` @@ -1918,6 +2098,16 @@ ___ - **summary**: A single node, within some bag. Nodes store links forward and back within their respective bags. + +### lock(): `Option` +- **interface**: `api.query.voterList.lock` +- **summary**: Lock all updates to this pallet. + + If any nodes needs updating, removal or addition due to a temporary lock, the [`Call::rebag`] can be used. + +### nextNodeAutoRebagged(): `Option` +- **interface**: `api.query.voterList.nextNodeAutoRebagged` +- **summary**: Pointer that remembers the next node that will be auto-rebagged. When `None`, the next scan will start from the list head again. ___ diff --git a/package.json b/package.json index 720855702..8f9424f1a 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@docusaurus/preset-classic": "2.4.3", "@mdx-js/react": "^1.6.22", "@polkadot/dev": "^0.83.3", - "@polkadot/typegen": "^16.4.6", + "@polkadot/typegen": "^16.5.1", "clsx": "^2.1.1", "comment-parser": "^1.4.1", "react": "^18.2.0", diff --git a/yarn.lock b/yarn.lock index 80e396ff1..f7497743c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2806,74 +2806,74 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-augment@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/api-augment@npm:16.4.6" - dependencies: - "@polkadot/api-base": "npm:16.4.6" - "@polkadot/rpc-augment": "npm:16.4.6" - "@polkadot/types": "npm:16.4.6" - "@polkadot/types-augment": "npm:16.4.6" - "@polkadot/types-codec": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" +"@polkadot/api-augment@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/api-augment@npm:16.5.1" + dependencies: + "@polkadot/api-base": "npm:16.5.1" + "@polkadot/rpc-augment": "npm:16.5.1" + "@polkadot/types": "npm:16.5.1" + "@polkadot/types-augment": "npm:16.5.1" + "@polkadot/types-codec": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" tslib: "npm:^2.8.1" - checksum: 10/eeac05b87873e2abb86aead4c9003ce56cdf3ba33e496b569d71bc6cc62112100a080639f4da4adfd077fd2c3d5e098c0e538b69471a0a877a83c4440d72a922 + checksum: 10/b019ba18f91455d883a6ffab54dba3b37673245b91726c45f4c3dac57b12c1ee8e8e6b8df898818beebc50349668c8bbfdd0b502769471c1aa11d2c27d4eccda languageName: node linkType: hard -"@polkadot/api-base@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/api-base@npm:16.4.6" +"@polkadot/api-base@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/api-base@npm:16.5.1" dependencies: - "@polkadot/rpc-core": "npm:16.4.6" - "@polkadot/types": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" + "@polkadot/rpc-core": "npm:16.5.1" + "@polkadot/types": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" rxjs: "npm:^7.8.1" tslib: "npm:^2.8.1" - checksum: 10/29f190545e73b8def9185a37486c97b4146e5a44ee7826f7f6bc658023ca336563b08703da5863bf2a06291c302f5ee9f640f09faed0fade995b48ca5787d738 + checksum: 10/a1ece4d198437cde0c7fc50e92b4cd07c5711a5a755f5df39111b9d86f31019a31f43d3772a58e3fe3cf768a99133b17a940c580800bd29d9da751642676115c languageName: node linkType: hard -"@polkadot/api-derive@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/api-derive@npm:16.4.6" +"@polkadot/api-derive@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/api-derive@npm:16.5.1" dependencies: - "@polkadot/api": "npm:16.4.6" - "@polkadot/api-augment": "npm:16.4.6" - "@polkadot/api-base": "npm:16.4.6" - "@polkadot/rpc-core": "npm:16.4.6" - "@polkadot/types": "npm:16.4.6" - "@polkadot/types-codec": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" - "@polkadot/util-crypto": "npm:^13.5.6" + "@polkadot/api": "npm:16.5.1" + "@polkadot/api-augment": "npm:16.5.1" + "@polkadot/api-base": "npm:16.5.1" + "@polkadot/rpc-core": "npm:16.5.1" + "@polkadot/types": "npm:16.5.1" + "@polkadot/types-codec": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" + "@polkadot/util-crypto": "npm:^13.5.7" rxjs: "npm:^7.8.1" tslib: "npm:^2.8.1" - checksum: 10/677475de15d1a38af57fea144f1cabcde522bc3d3abe6652ba9fd6e7c788197b08fd8774fda1991d6ff51ffa88398f6acb0974bd0eaf1b57293609357383309f - languageName: node - linkType: hard - -"@polkadot/api@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/api@npm:16.4.6" - dependencies: - "@polkadot/api-augment": "npm:16.4.6" - "@polkadot/api-base": "npm:16.4.6" - "@polkadot/api-derive": "npm:16.4.6" - "@polkadot/keyring": "npm:^13.5.6" - "@polkadot/rpc-augment": "npm:16.4.6" - "@polkadot/rpc-core": "npm:16.4.6" - "@polkadot/rpc-provider": "npm:16.4.6" - "@polkadot/types": "npm:16.4.6" - "@polkadot/types-augment": "npm:16.4.6" - "@polkadot/types-codec": "npm:16.4.6" - "@polkadot/types-create": "npm:16.4.6" - "@polkadot/types-known": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" - "@polkadot/util-crypto": "npm:^13.5.6" + checksum: 10/befa244073a684052f5c4316a43e38a4c28e7071c4c232a911bb1df5524d70c7259d9a67c1dc755611803066bfc60be8e13f849015a158b5d877e42de461e2ff + languageName: node + linkType: hard + +"@polkadot/api@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/api@npm:16.5.1" + dependencies: + "@polkadot/api-augment": "npm:16.5.1" + "@polkadot/api-base": "npm:16.5.1" + "@polkadot/api-derive": "npm:16.5.1" + "@polkadot/keyring": "npm:^13.5.7" + "@polkadot/rpc-augment": "npm:16.5.1" + "@polkadot/rpc-core": "npm:16.5.1" + "@polkadot/rpc-provider": "npm:16.5.1" + "@polkadot/types": "npm:16.5.1" + "@polkadot/types-augment": "npm:16.5.1" + "@polkadot/types-codec": "npm:16.5.1" + "@polkadot/types-create": "npm:16.5.1" + "@polkadot/types-known": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" + "@polkadot/util-crypto": "npm:^13.5.7" eventemitter3: "npm:^5.0.1" rxjs: "npm:^7.8.1" tslib: "npm:^2.8.1" - checksum: 10/d5391f9bf21c3d6e27e640a03e1ab44c26e6ce9362abc6e2921533604374ba871b4c6891ea2c148e62a9753eed9700dc73de2ed72d31d1735c6ae67efe8f5aef + checksum: 10/63b11b5d41bab33a910e8ffc956dcbd8a86bf37aebd544e5dde652e435e3c73f16d498a70a8c445fd204c6fdf42c1ac9db0db7af1c506c1ff2120f0c50059983 languageName: node linkType: hard @@ -2973,70 +2973,70 @@ __metadata: languageName: node linkType: hard -"@polkadot/keyring@npm:^13.5.6": - version: 13.5.6 - resolution: "@polkadot/keyring@npm:13.5.6" +"@polkadot/keyring@npm:^13.5.7": + version: 13.5.7 + resolution: "@polkadot/keyring@npm:13.5.7" dependencies: - "@polkadot/util": "npm:13.5.6" - "@polkadot/util-crypto": "npm:13.5.6" + "@polkadot/util": "npm:13.5.7" + "@polkadot/util-crypto": "npm:13.5.7" tslib: "npm:^2.8.0" peerDependencies: - "@polkadot/util": 13.5.6 - "@polkadot/util-crypto": 13.5.6 - checksum: 10/c6b6ed89694eaf3ba082435d966a204d5fcc0de3cfcb57b1069aef8dd245e01fc5bf9372c256464e0b11eaf002fa40f5046a260f02eca8dff98d31da0739e3f3 + "@polkadot/util": 13.5.7 + "@polkadot/util-crypto": 13.5.7 + checksum: 10/c19aaef9facb2e7af8b1e677767bab22c98cffaab07869f76563dedc658f0c5315c0f8d7cc063179611cfed33181639b4728f76b71092d9d170a860677c673af languageName: node linkType: hard -"@polkadot/networks@npm:13.5.6, @polkadot/networks@npm:^13.5.6": - version: 13.5.6 - resolution: "@polkadot/networks@npm:13.5.6" +"@polkadot/networks@npm:13.5.7, @polkadot/networks@npm:^13.5.7": + version: 13.5.7 + resolution: "@polkadot/networks@npm:13.5.7" dependencies: - "@polkadot/util": "npm:13.5.6" + "@polkadot/util": "npm:13.5.7" "@substrate/ss58-registry": "npm:^1.51.0" tslib: "npm:^2.8.0" - checksum: 10/3f1063588db7872477ee4949f2841a8f98e46a759482d3476887f0e96ec0aa5aff2e9cc954093b0b3b9ee162568c1aaedce2fdbce6dabcc002c60b55926889e5 + checksum: 10/3a9cf6ae053b81ede50d2a1c6bf6d65bd6de712316784a1b7a2f51cc4afc26b14e1b9d1c4a6904425655edf7f6de0e7e6b6936e42ec7fc19d983cefc44b05291 languageName: node linkType: hard -"@polkadot/rpc-augment@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/rpc-augment@npm:16.4.6" +"@polkadot/rpc-augment@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/rpc-augment@npm:16.5.1" dependencies: - "@polkadot/rpc-core": "npm:16.4.6" - "@polkadot/types": "npm:16.4.6" - "@polkadot/types-codec": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" + "@polkadot/rpc-core": "npm:16.5.1" + "@polkadot/types": "npm:16.5.1" + "@polkadot/types-codec": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" tslib: "npm:^2.8.1" - checksum: 10/ef2559b4807bc8340f5ec14725924fe5a4946c387b05c73f3c7353297a5487e55f1027d659bea4b3dacb3b8d3c5f578a06d541722fba3a712caac08a7a3d61f4 + checksum: 10/55213239976740df317b3007d37a4c60ff52d027ed2e169062889c208964aa8cb0d14629d11b95be43a7d8eebb11e1a94aee51e5100bf4e46fe608a892007618 languageName: node linkType: hard -"@polkadot/rpc-core@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/rpc-core@npm:16.4.6" +"@polkadot/rpc-core@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/rpc-core@npm:16.5.1" dependencies: - "@polkadot/rpc-augment": "npm:16.4.6" - "@polkadot/rpc-provider": "npm:16.4.6" - "@polkadot/types": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" + "@polkadot/rpc-augment": "npm:16.5.1" + "@polkadot/rpc-provider": "npm:16.5.1" + "@polkadot/types": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" rxjs: "npm:^7.8.1" tslib: "npm:^2.8.1" - checksum: 10/b0d6afcb389b335ada3d5306463dad6fb79985bccd2bca541de422ceb537ed576ea876529560f06693be095e4fd5db3fda07723da0e6105d40b0427540e4b8e4 + checksum: 10/22d0066676c4222c3e6f27e6ab9d00f5b8193bd73bba1cbd4cad116d7abb3a13c4f811e18573aa3f3ff9b4858b13faf18777a5292df1098dea962ba0209048b0 languageName: node linkType: hard -"@polkadot/rpc-provider@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/rpc-provider@npm:16.4.6" +"@polkadot/rpc-provider@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/rpc-provider@npm:16.5.1" dependencies: - "@polkadot/keyring": "npm:^13.5.6" - "@polkadot/types": "npm:16.4.6" - "@polkadot/types-support": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" - "@polkadot/util-crypto": "npm:^13.5.6" - "@polkadot/x-fetch": "npm:^13.5.6" - "@polkadot/x-global": "npm:^13.5.6" - "@polkadot/x-ws": "npm:^13.5.6" + "@polkadot/keyring": "npm:^13.5.7" + "@polkadot/types": "npm:16.5.1" + "@polkadot/types-support": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" + "@polkadot/util-crypto": "npm:^13.5.7" + "@polkadot/x-fetch": "npm:^13.5.7" + "@polkadot/x-global": "npm:^13.5.7" + "@polkadot/x-ws": "npm:^13.5.7" "@substrate/connect": "npm:0.8.11" eventemitter3: "npm:^5.0.1" mock-socket: "npm:^9.3.1" @@ -3045,27 +3045,27 @@ __metadata: dependenciesMeta: "@substrate/connect": optional: true - checksum: 10/7e90de9be86f866359dddbab7bb2b814f1bc705d7420e0e23aecbe19a42b283938e1113a3fe81b13c4f6b0963f27384a6f4318d3a761ce796cdfa428cd3a41d7 - languageName: node - linkType: hard - -"@polkadot/typegen@npm:^16.4.6": - version: 16.4.6 - resolution: "@polkadot/typegen@npm:16.4.6" - dependencies: - "@polkadot/api": "npm:16.4.6" - "@polkadot/api-augment": "npm:16.4.6" - "@polkadot/api-derive": "npm:16.4.6" - "@polkadot/rpc-augment": "npm:16.4.6" - "@polkadot/rpc-provider": "npm:16.4.6" - "@polkadot/types": "npm:16.4.6" - "@polkadot/types-augment": "npm:16.4.6" - "@polkadot/types-codec": "npm:16.4.6" - "@polkadot/types-create": "npm:16.4.6" - "@polkadot/types-support": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" - "@polkadot/util-crypto": "npm:^13.5.6" - "@polkadot/x-ws": "npm:^13.5.6" + checksum: 10/f849a95577bde6f1f109de48ebb9035a0b301bf68c52ac4364b9ec288e0de61c53f382bad8b7080ca58df63e544485d0497ab544d7a0ff8c7269bbf8dbf66dc5 + languageName: node + linkType: hard + +"@polkadot/typegen@npm:^16.5.1": + version: 16.5.1 + resolution: "@polkadot/typegen@npm:16.5.1" + dependencies: + "@polkadot/api": "npm:16.5.1" + "@polkadot/api-augment": "npm:16.5.1" + "@polkadot/api-derive": "npm:16.5.1" + "@polkadot/rpc-augment": "npm:16.5.1" + "@polkadot/rpc-provider": "npm:16.5.1" + "@polkadot/types": "npm:16.5.1" + "@polkadot/types-augment": "npm:16.5.1" + "@polkadot/types-codec": "npm:16.5.1" + "@polkadot/types-create": "npm:16.5.1" + "@polkadot/types-support": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" + "@polkadot/util-crypto": "npm:^13.5.7" + "@polkadot/x-ws": "npm:^13.5.7" comment-parser: "npm:^1.4.1" handlebars: "npm:^4.7.8" tslib: "npm:^2.8.1" @@ -3076,116 +3076,116 @@ __metadata: polkadot-types-from-defs: scripts/polkadot-types-from-defs.mjs polkadot-types-internal-interfaces: scripts/polkadot-types-internal-interfaces.mjs polkadot-types-internal-metadata: scripts/polkadot-types-internal-metadata.mjs - checksum: 10/7b4252db900da80cc935a1d5c793ff2d9fee6a77d8a4192f3ded705f1f7a88e65aedbe12871aaeb0e0b64d3a2b204f1422610578aa7aa5a14b118f25dbfd1b1e + checksum: 10/304830ec4a41d3061aaaaf8529c39a9c57c9a78dde678d8cf68da53bff859e94607e055e8334474d6be64fc7219c99cddf3d76e0ba6ca098bb3b47750a579b09 languageName: node linkType: hard -"@polkadot/types-augment@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/types-augment@npm:16.4.6" +"@polkadot/types-augment@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/types-augment@npm:16.5.1" dependencies: - "@polkadot/types": "npm:16.4.6" - "@polkadot/types-codec": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" + "@polkadot/types": "npm:16.5.1" + "@polkadot/types-codec": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" tslib: "npm:^2.8.1" - checksum: 10/c8c7b8065a0b11de05eaf62550ca87e3423455fd8c345ce4e547f99337ff1634508716ce397fb68d7c038b265ac82d07c7860fb69212f3df1c15e02dcc876844 + checksum: 10/62078657c7370f9bfc534423592281cfffddb4ebb5ae1e4a2119745a41c156e6837266227f5d6bd9094536e9f931a6292bfaccd46d44cbc6ce2f70f7b7afe81a languageName: node linkType: hard -"@polkadot/types-codec@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/types-codec@npm:16.4.6" +"@polkadot/types-codec@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/types-codec@npm:16.5.1" dependencies: - "@polkadot/util": "npm:^13.5.6" - "@polkadot/x-bigint": "npm:^13.5.6" + "@polkadot/util": "npm:^13.5.7" + "@polkadot/x-bigint": "npm:^13.5.7" tslib: "npm:^2.8.1" - checksum: 10/73a728a5da522188a1aa8d9a241a9445d6dbdc116323ce5f0a7a83f8c355c84a6f12ce2a37c60d706b9e3f1cab63f39dcbfb8dc80ba8ffd8558b55ca004c9e8e + checksum: 10/2c4ca230a75e34fc44ef121d3b21cacdf2e744523d65b80895a3d90bb504827f99d25df9aee671d5d37b864c220866235afed703a6551dfc02a91133d29754c8 languageName: node linkType: hard -"@polkadot/types-create@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/types-create@npm:16.4.6" +"@polkadot/types-create@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/types-create@npm:16.5.1" dependencies: - "@polkadot/types-codec": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" + "@polkadot/types-codec": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" tslib: "npm:^2.8.1" - checksum: 10/a47c6f7b9895f1864ccec134c710bd593e1662faf85172e1e606f6e8946a130879fd1e2b842d9de8a2ded87665fef9fe08decac19813402e71179c70040edc6f + checksum: 10/0af6c2737802979d9629bad53f23435f8c4351ba89f41bfc1026d23ff1e701c58f95b1119c88d7daf702ae0fd2b125e19cc2f6c1ef8a84f3ca58fe6460de7c30 languageName: node linkType: hard -"@polkadot/types-known@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/types-known@npm:16.4.6" +"@polkadot/types-known@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/types-known@npm:16.5.1" dependencies: - "@polkadot/networks": "npm:^13.5.6" - "@polkadot/types": "npm:16.4.6" - "@polkadot/types-codec": "npm:16.4.6" - "@polkadot/types-create": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" + "@polkadot/networks": "npm:^13.5.7" + "@polkadot/types": "npm:16.5.1" + "@polkadot/types-codec": "npm:16.5.1" + "@polkadot/types-create": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" tslib: "npm:^2.8.1" - checksum: 10/f512322c76883a8c3fab4050fd986ad90a68152d912598db391313934680097eaa20e81055c6fb0a7a7bd7834b0943335859465dc19b843febec8ba30cb9cc3d + checksum: 10/7165bfc279b7fd1a3b6a55d6e83397a07eb48fbba9c160ecaaa2ef553b58cce3cd8b78494a63e1e37422e7f6686152682529e77387f2951319b66faf1b85d037 languageName: node linkType: hard -"@polkadot/types-support@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/types-support@npm:16.4.6" +"@polkadot/types-support@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/types-support@npm:16.5.1" dependencies: - "@polkadot/util": "npm:^13.5.6" + "@polkadot/util": "npm:^13.5.7" tslib: "npm:^2.8.1" - checksum: 10/d6cc870ab18f2cad098e3677903004ce31fa135ad214ad287ff90d6546666235eafbe0ae619e5bd420ee6e9ca7cd60c6819aa55f30fbc25bd4a2f9e470f15a0e + checksum: 10/133ea1d2817f598ce2b30869e7e9d64000ee2a1cbe9233e890011e0f82c2f831815601aa3505d1b8e99db48cb0503b525e69808dcbb749a4207cf107f85e8068 languageName: node linkType: hard -"@polkadot/types@npm:16.4.6": - version: 16.4.6 - resolution: "@polkadot/types@npm:16.4.6" +"@polkadot/types@npm:16.5.1": + version: 16.5.1 + resolution: "@polkadot/types@npm:16.5.1" dependencies: - "@polkadot/keyring": "npm:^13.5.6" - "@polkadot/types-augment": "npm:16.4.6" - "@polkadot/types-codec": "npm:16.4.6" - "@polkadot/types-create": "npm:16.4.6" - "@polkadot/util": "npm:^13.5.6" - "@polkadot/util-crypto": "npm:^13.5.6" + "@polkadot/keyring": "npm:^13.5.7" + "@polkadot/types-augment": "npm:16.5.1" + "@polkadot/types-codec": "npm:16.5.1" + "@polkadot/types-create": "npm:16.5.1" + "@polkadot/util": "npm:^13.5.7" + "@polkadot/util-crypto": "npm:^13.5.7" rxjs: "npm:^7.8.1" tslib: "npm:^2.8.1" - checksum: 10/1a02ff3733f665147cbfa6016a74a2392c5c2883fc13743627f49bfd886cacd3caee5966b287b35a1bde7f02198248650ea38cf28bb651cef15d9cc38388a96b + checksum: 10/017be57cf111c5e114b7cde4d2b6ee1564559e88b2056953b2bf38b5fafb997c0dd6eeb7ebba6a14f83f5a537eb702ce5df920149db78e3cf684f8411a0e6bed languageName: node linkType: hard -"@polkadot/util-crypto@npm:13.5.6, @polkadot/util-crypto@npm:^13.5.6": - version: 13.5.6 - resolution: "@polkadot/util-crypto@npm:13.5.6" +"@polkadot/util-crypto@npm:13.5.7, @polkadot/util-crypto@npm:^13.5.7": + version: 13.5.7 + resolution: "@polkadot/util-crypto@npm:13.5.7" dependencies: "@noble/curves": "npm:^1.3.0" "@noble/hashes": "npm:^1.3.3" - "@polkadot/networks": "npm:13.5.6" - "@polkadot/util": "npm:13.5.6" + "@polkadot/networks": "npm:13.5.7" + "@polkadot/util": "npm:13.5.7" "@polkadot/wasm-crypto": "npm:^7.5.1" "@polkadot/wasm-util": "npm:^7.5.1" - "@polkadot/x-bigint": "npm:13.5.6" - "@polkadot/x-randomvalues": "npm:13.5.6" + "@polkadot/x-bigint": "npm:13.5.7" + "@polkadot/x-randomvalues": "npm:13.5.7" "@scure/base": "npm:^1.1.7" tslib: "npm:^2.8.0" peerDependencies: - "@polkadot/util": 13.5.6 - checksum: 10/42c888e459b40fbc84de0a810947f55412c22af26a5cf81dbebc5197f5485aaae7cc5cae7b4d2ca6a1fe09b2df831b9ad98e00cd858cce189ea3e587b2fb83cf + "@polkadot/util": 13.5.7 + checksum: 10/5a924916b4ed613cca2f2576c2dab872544f975906cc536b9980ebdf9a48d3c4b5959f006c660020c658394559ab6fa33d94c193b22479a1953dde8c76576231 languageName: node linkType: hard -"@polkadot/util@npm:13.5.6, @polkadot/util@npm:^13.5.6": - version: 13.5.6 - resolution: "@polkadot/util@npm:13.5.6" +"@polkadot/util@npm:13.5.7, @polkadot/util@npm:^13.5.7": + version: 13.5.7 + resolution: "@polkadot/util@npm:13.5.7" dependencies: - "@polkadot/x-bigint": "npm:13.5.6" - "@polkadot/x-global": "npm:13.5.6" - "@polkadot/x-textdecoder": "npm:13.5.6" - "@polkadot/x-textencoder": "npm:13.5.6" + "@polkadot/x-bigint": "npm:13.5.7" + "@polkadot/x-global": "npm:13.5.7" + "@polkadot/x-textdecoder": "npm:13.5.7" + "@polkadot/x-textencoder": "npm:13.5.7" "@types/bn.js": "npm:^5.1.6" bn.js: "npm:^5.2.1" tslib: "npm:^2.8.0" - checksum: 10/a99f767a62579b9ca082d671cb731fbfda56046058282f884534a9dfdeb97774ca017bbbf35ebd91e39873ac31ebabe75a545da2474f03ef80773e9158122562 + checksum: 10/66a03ec05aaf8642809a46f6adf0c9b4b843b2f8fce6520dc4db9da607af96a25baf166e09595b26d3d419cf55f55494d51985d5a90f55bc66d061b1fbaf9e99 languageName: node linkType: hard @@ -3269,77 +3269,77 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-bigint@npm:13.5.6, @polkadot/x-bigint@npm:^13.5.6": - version: 13.5.6 - resolution: "@polkadot/x-bigint@npm:13.5.6" +"@polkadot/x-bigint@npm:13.5.7, @polkadot/x-bigint@npm:^13.5.7": + version: 13.5.7 + resolution: "@polkadot/x-bigint@npm:13.5.7" dependencies: - "@polkadot/x-global": "npm:13.5.6" + "@polkadot/x-global": "npm:13.5.7" tslib: "npm:^2.8.0" - checksum: 10/a4aef1e1baf38c7ce2f41c3464fb1f59cf3b41de5cc466ebdc25ee99966ffaebfffb4897d5ea1bc0b5c526c3504d434908819080e6f03450bc100fd18c28ec04 + checksum: 10/a890310186d457e234f03e05e5ade4a591d210002691c6c52f9eb75b3624d8e5c11c333817cdd8b3f627dc6eee685fa6a44d666c3d24ed5d5d545936b870e230 languageName: node linkType: hard -"@polkadot/x-fetch@npm:^13.5.6": - version: 13.5.6 - resolution: "@polkadot/x-fetch@npm:13.5.6" +"@polkadot/x-fetch@npm:^13.5.7": + version: 13.5.7 + resolution: "@polkadot/x-fetch@npm:13.5.7" dependencies: - "@polkadot/x-global": "npm:13.5.6" + "@polkadot/x-global": "npm:13.5.7" node-fetch: "npm:^3.3.2" tslib: "npm:^2.8.0" - checksum: 10/64c6e7584dd5d2046fa36c91cf5e86379272577f923a0ecefe78191cd1760fc412f40f63965132a370f0acffce226afe65f363a09fc0dddad23a912eb17dab17 + checksum: 10/8c3ba3ce3b229c7106d3e3c77daba8676d857d39889ecbd1646dbc36d6d528c4d77e951785067fbc4efb7a6e94fc7a1346e90f7fac332b1e35d17ea4b01e4a93 languageName: node linkType: hard -"@polkadot/x-global@npm:13.5.6, @polkadot/x-global@npm:^13.5.6": - version: 13.5.6 - resolution: "@polkadot/x-global@npm:13.5.6" +"@polkadot/x-global@npm:13.5.7, @polkadot/x-global@npm:^13.5.7": + version: 13.5.7 + resolution: "@polkadot/x-global@npm:13.5.7" dependencies: tslib: "npm:^2.8.0" - checksum: 10/050cb02e1405a37c92b8ab9202b3a1187d6ba7f5193d93126420a283c7ba3796b4fa6ae349b3f25335c905af4355b97cc6c74c29f267b5a0de0cff6cea667c11 + checksum: 10/756532b29565c0c72e6e911a8dc36b7256b55771119e9ee8fe8979a8cc0b09726b12d7708ea9459f72ae2843e0cdaca724d484b8faefcd43b3d24e5fa222ba6d languageName: node linkType: hard -"@polkadot/x-randomvalues@npm:13.5.6": - version: 13.5.6 - resolution: "@polkadot/x-randomvalues@npm:13.5.6" +"@polkadot/x-randomvalues@npm:13.5.7": + version: 13.5.7 + resolution: "@polkadot/x-randomvalues@npm:13.5.7" dependencies: - "@polkadot/x-global": "npm:13.5.6" + "@polkadot/x-global": "npm:13.5.7" tslib: "npm:^2.8.0" peerDependencies: - "@polkadot/util": 13.5.6 + "@polkadot/util": 13.5.7 "@polkadot/wasm-util": "*" - checksum: 10/47dbb4380b8e48fd0b9828d40a9c60bb21ac188dba5b1ebe9cef71f0c49af479f21b8025f3eb5cc3147ef452d4f18c416f59d28ff518f4caa2c3da6ac788a0c6 + checksum: 10/49bd20e2140fa1905374e730726d9882ce4f651d3a10e7c705b1a7d6530190ea913b05165c6d19355e24284f872b2afd0a54042c3d33479e983016c30f1ccd11 languageName: node linkType: hard -"@polkadot/x-textdecoder@npm:13.5.6": - version: 13.5.6 - resolution: "@polkadot/x-textdecoder@npm:13.5.6" +"@polkadot/x-textdecoder@npm:13.5.7": + version: 13.5.7 + resolution: "@polkadot/x-textdecoder@npm:13.5.7" dependencies: - "@polkadot/x-global": "npm:13.5.6" + "@polkadot/x-global": "npm:13.5.7" tslib: "npm:^2.8.0" - checksum: 10/7f04ba6d544acac05b6ea0b20b85ac31415c662b4d306b30cf5e7ba1bee387c36a5eee0abe889134048f3e6175528608b11c8540440343a8108440dfc4564156 + checksum: 10/4a53a3cef1e978a9a86ab08850dd45f11971b56f6735b310f63900722cdb9cb605fadf2e9dc4bb15959e96778a47842257f363b02779bb65cc3156999ced82a3 languageName: node linkType: hard -"@polkadot/x-textencoder@npm:13.5.6": - version: 13.5.6 - resolution: "@polkadot/x-textencoder@npm:13.5.6" +"@polkadot/x-textencoder@npm:13.5.7": + version: 13.5.7 + resolution: "@polkadot/x-textencoder@npm:13.5.7" dependencies: - "@polkadot/x-global": "npm:13.5.6" + "@polkadot/x-global": "npm:13.5.7" tslib: "npm:^2.8.0" - checksum: 10/0f8d433d2825bb9193c49262fd2ace2253cac76b87eb37e051a3db108445c92ed5832f8a02631a616a9ea2ea3f719576b179c38bdad8747002a8f54e7753761f + checksum: 10/b88e13db070c94fe20aed8c739d1740ecd6545921316efe0e4dbea6f0c489c849bbcf7ce6e1a81405885a90b359af812b78a5d06cfbdb555fb0ae9602b2357e9 languageName: node linkType: hard -"@polkadot/x-ws@npm:^13.5.6": - version: 13.5.6 - resolution: "@polkadot/x-ws@npm:13.5.6" +"@polkadot/x-ws@npm:^13.5.7": + version: 13.5.7 + resolution: "@polkadot/x-ws@npm:13.5.7" dependencies: - "@polkadot/x-global": "npm:13.5.6" + "@polkadot/x-global": "npm:13.5.7" tslib: "npm:^2.8.0" ws: "npm:^8.18.0" - checksum: 10/7746aa886ae2799700e5b7c65a0e1d8c032dcc6da10c80a79bad994240fe626b760c00bae9f5f57dc784ff2329232c42abdfb444b4c15feb3b3a2a2390e9c4ea + checksum: 10/1c8da2d1dd0e08dd08a77badf4a89d8d4b7e6de45669feeb75bf718725c40d03ffabfb60a9ea35ca6d230f31f6874e62e30b343f4f3000d62e0ba5945a38c073 languageName: node linkType: hard @@ -11930,7 +11930,7 @@ __metadata: "@docusaurus/preset-classic": "npm:2.4.3" "@mdx-js/react": "npm:^1.6.22" "@polkadot/dev": "npm:^0.83.3" - "@polkadot/typegen": "npm:^16.4.6" + "@polkadot/typegen": "npm:^16.5.1" clsx: "npm:^2.1.1" comment-parser: "npm:^1.4.1" react: "npm:^18.2.0"