Extrinsics
The following sections contain Extrinsics methods are part of the default asset-hub-polkadot runtime. On the api, these are exposed via api.tx.<module>.<method>.
(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.)
assetConversion
addLiquidity(asset1: StagingXcmV4Location, asset2: StagingXcmV4Location, amount1_desired: u128, amount2_desired: u128, amount1_min: u128, amount2_min: u128, mint_to: AccountId32)
interface:
api.tx.assetConversion.addLiquiditysummary: Provide liquidity into the pool of
asset1andasset2. NOTE: an optimal amount of asset1 and asset2 will be calculated and might be different than the providedamount1_desired/amount2_desiredthus you should provide the min amount you're happy to provide. Paramsamount1_min/amount2_minrepresent that.mint_towill be sent the liquidity tokens that represent this share of the pool.NOTE: when encountering an incorrect exchange rate and non-withdrawable pool liquidity, batch an atomic call with [
Pallet::add_liquidity] and [Pallet::swap_exact_tokens_for_tokens] or [Pallet::swap_tokens_for_exact_tokens] calls to render the liquidity withdrawable and rectify the exchange rate.Once liquidity is added, someone may successfully call [
Pallet::swap_exact_tokens_for_tokens].
createPool(asset1: StagingXcmV4Location, asset2: StagingXcmV4Location)
interface:
api.tx.assetConversion.createPoolsummary: Creates an empty liquidity pool and an associated new
lp_tokenasset (the id of which is returned in theEvent::PoolCreatedevent).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)
- interface:
api.tx.assetConversion.removeLiquidity - summary: Allows you to remove liquidity by providing the
lp_token_burntokens that will be burned in the process. With the usage ofamount1_min_receive/amount2_min_receiveit's possible to control the min amount of returned tokens you're happy with.
swapExactTokensForTokens(path: Vec<StagingXcmV4Location>, amount_in: u128, amount_out_min: u128, send_to: AccountId32, keep_alive: bool)
interface:
api.tx.assetConversion.swapExactTokensForTokenssummary: Swap the exact amount of
asset1intoasset2.amount_out_minparam allows you to specify the min amount of theasset2you're happy to receive.[
AssetConversionApi::quote_price_exact_tokens_for_tokens] runtime call can be called for a quote.
swapTokensForExactTokens(path: Vec<StagingXcmV4Location>, amount_out: u128, amount_in_max: u128, send_to: AccountId32, keep_alive: bool)
interface:
api.tx.assetConversion.swapTokensForExactTokenssummary: Swap any amount of
asset1to get the exact amount ofasset2.amount_in_maxparam allows to specify the max amount of theasset1you're happy to provide.[
AssetConversionApi::quote_price_tokens_for_exact_tokens] runtime call can be called for a quote.
touch(asset1: StagingXcmV4Location, asset2: StagingXcmV4Location)
interface:
api.tx.assetConversion.touchsummary: 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.
The origin must be Signed.
asset1: The asset ID of an existing pool with a pair (asset1, asset2).asset2: The asset ID of an existing pool with a pair (asset1, asset2).Emits
Touchedevent when successful.
assets
approveTransfer(id: Compact<u32>, delegate: MultiAddress, amount: Compact<u128>)
interface:
api.tx.assets.approveTransfersummary: Approve an amount of asset for transfer by a delegated third-party account.
Origin must be Signed.
Ensures that
ApprovalDepositworth ofCurrencyis reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account todelegate, then it is topped up or unreserved to meet the right value.NOTE: The signing account does not need to own
amountof 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 bydelegate. If there is already an approval in place, then this acts additively.Emits
ApprovedTransferon success.Weight:
O(1)
block(id: Compact<u32>, who: MultiAddress)
interface:
api.tx.assets.blocksummary: Disallow further unprivileged transfers of an asset
idto and from an accountwho.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: Compact<u32>, who: MultiAddress, amount: Compact<u128>)
interface:
api.tx.assets.burnsummary: Reduce the balance of
whoby as much as possible up toamountassets ofid.Origin must be Signed and the sender should be the Manager of the asset
id.Bails with
NoAccountif thewhois 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 whichwho's balance should be reduced.Emits
Burnedwith 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 ofwho; Pre & post Zombie-status ofwho.
cancelApproval(id: Compact<u32>, delegate: MultiAddress)
interface:
api.tx.assets.cancelApprovalsummary: 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_transferfor the approval.id: The identifier of the asset.delegate: The account delegated permission to transfer asset.Emits
ApprovalCancelledon success.Weight:
O(1)
clearMetadata(id: Compact<u32>)
interface:
api.tx.assets.clearMetadatasummary: 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: Compact<u32>, admin: MultiAddress, min_balance: u128)
interface:
api.tx.assets.createsummary: 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
CreateOriginand 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
Createdevent when successful.Weight:
O(1)
destroyAccounts(id: Compact<u32>)
interface:
api.tx.assets.destroyAccountssummary: Destroy all accounts associated with a given asset.
destroy_accountsshould only be called afterstart_destroyhas been called, and the asset is in aDestroyingstate.Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy
RemoveItemsLimitaccounts at a time.id: The identifier of the asset to be destroyed. This must identify an existing asset.Each call emits the
Event::DestroyedAccountsevent.
destroyApprovals(id: Compact<u32>)
interface:
api.tx.assets.destroyApprovalssummary: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit).
destroy_approvalsshould only be called afterstart_destroyhas been called, and the asset is in aDestroyingstate.Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy
RemoveItemsLimitapprovals at a time.id: The identifier of the asset to be destroyed. This must identify an existing asset.Each call emits the
Event::DestroyedApprovalsevent.
finishDestroy(id: Compact<u32>)
interface:
api.tx.assets.finishDestroysummary: Complete destroying asset and unreserve currency.
finish_destroyshould only be called afterstart_destroyhas been called, and the asset is in aDestroyingstate. 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::Destroyedevent.
forceAssetStatus(id: Compact<u32>, owner: MultiAddress, issuer: MultiAddress, admin: MultiAddress, freezer: MultiAddress, min_balance: Compact<u128>, is_sufficient: bool, is_frozen: bool)
interface:
api.tx.assets.forceAssetStatussummary: 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 totrue, then non-zero balances may be stored without aconsumerreference (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
AssetStatusChangedwith the identity of the asset.Weight:
O(1)
forceCancelApproval(id: Compact<u32>, owner: MultiAddress, delegate: MultiAddress)
interface:
api.tx.assets.forceCancelApprovalsummary: 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_transferfor the approval.id: The identifier of the asset.delegate: The account delegated permission to transfer asset.Emits
ApprovalCancelledon success.Weight:
O(1)
forceClearMetadata(id: Compact<u32>)
interface:
api.tx.assets.forceClearMetadatasummary: 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: Compact<u32>, owner: MultiAddress, is_sufficient: bool, min_balance: Compact<u128>)
interface:
api.tx.assets.forceCreatesummary: 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 usingtransfer_ownershipandset_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
ForceCreatedevent when successful.Weight:
O(1)
forceSetMetadata(id: Compact<u32>, name: Bytes, symbol: Bytes, decimals: u8, is_frozen: bool)
interface:
api.tx.assets.forceSetMetadatasummary: 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 byStringLimit.symbol: The exchange symbol for this asset. Limited in length byStringLimit.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: Compact<u32>, source: MultiAddress, dest: MultiAddress, amount: Compact<u128>)
interface:
api.tx.assets.forceTransfersummary: 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 thesource's balance of assets should be reduced anddest's balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take thesourcebalance above zero but below the minimum balance. Must be greater than zero.Emits
Transferredwith 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 ofdest; Post-existence ofsource; Account pre-existence ofdest.
freeze(id: Compact<u32>, who: MultiAddress)
interface:
api.tx.assets.freezesummary: Disallow further unprivileged transfers of an asset
idfrom an accountwho.whomust already exist as an entry inAccounts of the asset. If you want to freeze an account that does not have an entry, usetouch_otherfirst.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: Compact<u32>)
interface:
api.tx.assets.freezeAssetsummary: 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: Compact<u32>, beneficiary: MultiAddress, amount: Compact<u128>)
interface:
api.tx.assets.mintsummary: 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
Issuedevent when successful.Weight:
O(1)Modes: Pre-existing balance ofbeneficiary; Account pre-existence ofbeneficiary.
refund(id: Compact<u32>, allow_burn: bool)
interface:
api.tx.assets.refundsummary: 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: Iftruethen 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
Refundedevent when successful.
refundOther(id: Compact<u32>, who: MultiAddress)
interface:
api.tx.assets.refundOthersummary: 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 userefund.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
Refundedevent when successful.
setMetadata(id: Compact<u32>, name: Bytes, symbol: Bytes, decimals: u8)
interface:
api.tx.assets.setMetadatasummary: 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 byStringLimit.symbol: The exchange symbol for this asset. Limited in length byStringLimit.decimals: The number of decimals this asset uses to represent one unit.Emits
MetadataSet.Weight:
O(1)
setMinBalance(id: Compact<u32>, min_balance: u128)
interface:
api.tx.assets.setMinBalancesummary: 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_balanceis 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 ofmin_balance.Emits
AssetMinBalanceChangedevent when successful.
setTeam(id: Compact<u32>, issuer: MultiAddress, admin: MultiAddress, freezer: MultiAddress)
interface:
api.tx.assets.setTeamsummary: 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: Compact<u32>)
interface:
api.tx.assets.startDestroysummary: Start the process of destroying a fungible asset class.
start_destroyis the first in a series of extrinsics that should be called, to allow destruction of an asset class.The origin must conform to
ForceOriginor must beSignedby the asset'sowner.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: Compact<u32>, who: MultiAddress)
interface:
api.tx.assets.thawsummary: 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: Compact<u32>)
interface:
api.tx.assets.thawAssetsummary: 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.Weight:
O(1)
touch(id: Compact<u32>)
interface:
api.tx.assets.touchsummary: Create an asset account for non-provider assets.
A deposit will be taken from the signer account.
origin: Must be Signed; the signer account must have sufficient funds for a deposit to be taken.id: The identifier of the asset for the account to be created.Emits
Touchedevent when successful.
touchOther(id: Compact<u32>, who: MultiAddress)
interface:
api.tx.assets.touchOthersummary: Create an asset account for
who.A deposit will be taken from the signer account.
origin: Must be Signed byFreezerorAdminof the assetid; the signer account must have sufficient funds for a deposit to be taken.id: The identifier of the asset for the account to be created.who: The account to be created.Emits
Touchedevent when successful.
transfer(id: Compact<u32>, target: MultiAddress, amount: Compact<u128>)
interface:
api.tx.assets.transfersummary: Move some assets from the sender account to another.
Origin must be Signed.
id: The identifier of the asset to have some amount transferred.target: The account to be credited.amount: The amount by which the sender's balance of assets should be reduced andtarget'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
Transferredwith 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 oftarget; Post-existence of sender; Account pre-existence oftarget.
transferAll(id: Compact<u32>, dest: MultiAddress, keep_alive: bool)
interface:
api.tx.assets.transferAllsummary: Transfer the entire transferable balance from the caller asset account.
NOTE: This function only attempts to transfer transferable balances. This means that any held, frozen, or minimum balance (when
keep_aliveistrue), 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.
id: The identifier of the asset for the account holding a deposit.dest: The recipient of the transfer.keep_alive: A boolean to determine if thetransfer_alloperation 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: Compact<u32>, owner: MultiAddress, destination: MultiAddress, amount: Compact<u128>)
interface:
api.tx.assets.transferApprovedsummary: Transfer some asset balance from a previously delegated account to some third-party account.
Origin must be Signed and there must be an approval in place by the
ownerto the signer.If the entire amount approved for transfer is transferred, then any deposit previously reserved by
approve_transferis unreserved.id: The identifier of the asset.owner: The account which previously approved for a transfer of at leastamountand from which the asset balance will be withdrawn.destination: The account to which the asset balance ofamountwill be transferred.amount: The amount of assets to transfer.Emits
TransferredApprovedon success.Weight:
O(1)
transferKeepAlive(id: Compact<u32>, target: MultiAddress, amount: Compact<u128>)
interface:
api.tx.assets.transferKeepAlivesummary: Move some assets from the sender account to another, keeping the sender account alive.
Origin must be Signed.
id: The identifier of the asset to have some amount transferred.target: The account to be credited.amount: The amount by which the sender's balance of assets should be reduced andtarget'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
Transferredwith 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 oftarget; Post-existence of sender; Account pre-existence oftarget.
transferOwnership(id: Compact<u32>, owner: MultiAddress)
interface:
api.tx.assets.transferOwnershipsummary: 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.owner: The new Owner of this asset.Emits
OwnerChanged.Weight:
O(1)
balances
burn(value: Compact<u128>, keep_alive: bool)
interface:
api.tx.balances.burnsummary: 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_aliveis false, the account will be reaped.Unlike sending funds to a burn address, which merely makes the funds inaccessible, this
burnoperation will reduce total issuance by the amount burned.
forceAdjustTotalIssuance(direction: PalletBalancesAdjustmentDirection, delta: Compact<u128>)
interface:
api.tx.balances.forceAdjustTotalIssuancesummary: 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<u128>)
interface:
api.tx.balances.forceSetBalancesummary: Set the regular balance of a given account.
The dispatch origin for this call is
root.
forceTransfer(source: MultiAddress, dest: MultiAddress, value: Compact<u128>)
- interface:
api.tx.balances.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.balances.forceUnreservesummary: Unreserve some balance from a user by force.
Can only be called by ROOT.
transferAll(dest: MultiAddress, keep_alive: bool)
interface:
api.tx.balances.transferAllsummary: 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_aliveistrue), 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 thetransfer_alloperation 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<u128>)
interface:
api.tx.balances.transferAllowDeathsummary: Transfer some liquid free balance to another account.
transfer_allow_deathwill set theFreeBalanceof 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
Signedby the transactor.
transferKeepAlive(dest: MultiAddress, value: Compact<u128>)
interface:
api.tx.balances.transferKeepAlivesummary: Same as the
transfer_allow_deathcall, but with a check that the transfer will not kill the origin account.99% of the time you want
transfer_allow_deathinstead.
upgradeAccounts(who: Vec<AccountId32>)
interface:
api.tx.balances.upgradeAccountssummary: Upgrade a specified account.
origin: Must beSigned.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).
collatorSelection
addInvulnerable(who: AccountId32)
interface:
api.tx.collatorSelection.addInvulnerablesummary: Add a new account
whoto the list ofInvulnerablescollators.whomust have registered session keys. Ifwhois a candidate, they will be removed.The origin for this call must be the
UpdateOrigin.
leaveIntent()
interface:
api.tx.collatorSelection.leaveIntentsummary: Deregister
originas a collator candidate. Note that the collator can only leave on session change. TheCandidacyBondwill be unreserved immediately.This call will fail if the total number of candidates would drop below
MinEligibleCollators.
registerAsCandidate()
interface:
api.tx.collatorSelection.registerAsCandidatesummary: Register this account as a collator candidate. The account must (a) already have registered session keys and (b) be able to reserve the
CandidacyBond.This call is not available to
Invulnerablecollators.
removeInvulnerable(who: AccountId32)
interface:
api.tx.collatorSelection.removeInvulnerablesummary: Remove an account
whofrom the list ofInvulnerablescollators.Invulnerablesmust be sorted.The origin for this call must be the
UpdateOrigin.
setCandidacyBond(bond: u128)
interface:
api.tx.collatorSelection.setCandidacyBondsummary: Set the candidacy bond amount.
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.
The origin for this call must be the
UpdateOrigin.
setDesiredCandidates(max: u32)
interface:
api.tx.collatorSelection.setDesiredCandidatessummary: 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.
The origin for this call must be the
UpdateOrigin.
setInvulnerables(new: Vec<AccountId32>)
interface:
api.tx.collatorSelection.setInvulnerablessummary: 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
AccountIds passed innewindividually as acceptable Invulnerables, and is not proposing a set of new Invulnerables.This call does not maintain mutual exclusivity of
InvulnerablesandCandidates. It is recommended to use a batch ofadd_invulnerableandremove_invulnerableinstead. Abatch_allcan also be used to enforce atomicity. If any candidates are included innew, they should be removed withremove_invulnerable_candidateafter execution.Must be called by the
UpdateOrigin.
takeCandidateSlot(deposit: u128, target: AccountId32)
interface:
api.tx.collatorSelection.takeCandidateSlotsummary: The caller
originreplaces a candidatetargetin the collator candidate list by reservingdeposit. The amountdepositreserved by the caller must be greater than the existing bond of the target it is trying to replace.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
depositamount cannot be reserved.
updateBond(new_deposit: u128)
interface:
api.tx.collatorSelection.updateBondsummary: Update the candidacy bond of collator candidate
originto a new amountnew_deposit.Setting a
new_depositthat is lower than the current deposit whileoriginis occupying a top-DesiredCandidatesslot is not allowed.This call will fail if
originis not a collator candidate, the updated bond is lower than the minimum candidacy bond, and/or the amount cannot be reserved.
cumulusXcm
foreignAssets
approveTransfer(id: StagingXcmV4Location, delegate: MultiAddress, amount: Compact<u128>)
interface:
api.tx.foreignAssets.approveTransfersummary: Approve an amount of asset for transfer by a delegated third-party account.
Origin must be Signed.
Ensures that
ApprovalDepositworth ofCurrencyis reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account todelegate, then it is topped up or unreserved to meet the right value.NOTE: The signing account does not need to own
amountof 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 bydelegate. If there is already an approval in place, then this acts additively.Emits
ApprovedTransferon success.Weight:
O(1)
block(id: StagingXcmV4Location, who: MultiAddress)
interface:
api.tx.foreignAssets.blocksummary: Disallow further unprivileged transfers of an asset
idto and from an accountwho.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: StagingXcmV4Location, who: MultiAddress, amount: Compact<u128>)
interface:
api.tx.foreignAssets.burnsummary: Reduce the balance of
whoby as much as possible up toamountassets ofid.Origin must be Signed and the sender should be the Manager of the asset
id.Bails with
NoAccountif thewhois 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 whichwho's balance should be reduced.Emits
Burnedwith 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 ofwho; Pre & post Zombie-status ofwho.
cancelApproval(id: StagingXcmV4Location, delegate: MultiAddress)
interface:
api.tx.foreignAssets.cancelApprovalsummary: 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_transferfor the approval.id: The identifier of the asset.delegate: The account delegated permission to transfer asset.Emits
ApprovalCancelledon success.Weight:
O(1)
clearMetadata(id: StagingXcmV4Location)
interface:
api.tx.foreignAssets.clearMetadatasummary: 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: StagingXcmV4Location, admin: MultiAddress, min_balance: u128)
interface:
api.tx.foreignAssets.createsummary: 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
CreateOriginand 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
Createdevent when successful.Weight:
O(1)
destroyAccounts(id: StagingXcmV4Location)
interface:
api.tx.foreignAssets.destroyAccountssummary: Destroy all accounts associated with a given asset.
destroy_accountsshould only be called afterstart_destroyhas been called, and the asset is in aDestroyingstate.Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy
RemoveItemsLimitaccounts at a time.id: The identifier of the asset to be destroyed. This must identify an existing asset.Each call emits the
Event::DestroyedAccountsevent.
destroyApprovals(id: StagingXcmV4Location)
interface:
api.tx.foreignAssets.destroyApprovalssummary: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit).
destroy_approvalsshould only be called afterstart_destroyhas been called, and the asset is in aDestroyingstate.Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy
RemoveItemsLimitapprovals at a time.id: The identifier of the asset to be destroyed. This must identify an existing asset.Each call emits the
Event::DestroyedApprovalsevent.
finishDestroy(id: StagingXcmV4Location)
interface:
api.tx.foreignAssets.finishDestroysummary: Complete destroying asset and unreserve currency.
finish_destroyshould only be called afterstart_destroyhas been called, and the asset is in aDestroyingstate. 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::Destroyedevent.
forceAssetStatus(id: StagingXcmV4Location, owner: MultiAddress, issuer: MultiAddress, admin: MultiAddress, freezer: MultiAddress, min_balance: Compact<u128>, is_sufficient: bool, is_frozen: bool)
interface:
api.tx.foreignAssets.forceAssetStatussummary: 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 totrue, then non-zero balances may be stored without aconsumerreference (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
AssetStatusChangedwith the identity of the asset.Weight:
O(1)
forceCancelApproval(id: StagingXcmV4Location, owner: MultiAddress, delegate: MultiAddress)
interface:
api.tx.foreignAssets.forceCancelApprovalsummary: 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_transferfor the approval.id: The identifier of the asset.delegate: The account delegated permission to transfer asset.Emits
ApprovalCancelledon success.Weight:
O(1)
forceClearMetadata(id: StagingXcmV4Location)
interface:
api.tx.foreignAssets.forceClearMetadatasummary: 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: StagingXcmV4Location, owner: MultiAddress, is_sufficient: bool, min_balance: Compact<u128>)
interface:
api.tx.foreignAssets.forceCreatesummary: 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 usingtransfer_ownershipandset_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
ForceCreatedevent when successful.Weight:
O(1)
forceSetMetadata(id: StagingXcmV4Location, name: Bytes, symbol: Bytes, decimals: u8, is_frozen: bool)
interface:
api.tx.foreignAssets.forceSetMetadatasummary: 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 byStringLimit.symbol: The exchange symbol for this asset. Limited in length byStringLimit.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: StagingXcmV4Location, source: MultiAddress, dest: MultiAddress, amount: Compact<u128>)
interface:
api.tx.foreignAssets.forceTransfersummary: 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 thesource's balance of assets should be reduced anddest's balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take thesourcebalance above zero but below the minimum balance. Must be greater than zero.Emits
Transferredwith 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 ofdest; Post-existence ofsource; Account pre-existence ofdest.
freeze(id: StagingXcmV4Location, who: MultiAddress)
interface:
api.tx.foreignAssets.freezesummary: Disallow further unprivileged transfers of an asset
idfrom an accountwho.whomust already exist as an entry inAccounts of the asset. If you want to freeze an account that does not have an entry, usetouch_otherfirst.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: StagingXcmV4Location)
interface:
api.tx.foreignAssets.freezeAssetsummary: 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: StagingXcmV4Location, beneficiary: MultiAddress, amount: Compact<u128>)
interface:
api.tx.foreignAssets.mintsummary: 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
Issuedevent when successful.Weight:
O(1)Modes: Pre-existing balance ofbeneficiary; Account pre-existence ofbeneficiary.
refund(id: StagingXcmV4Location, allow_burn: bool)
interface:
api.tx.foreignAssets.refundsummary: 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: Iftruethen 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
Refundedevent when successful.
refundOther(id: StagingXcmV4Location, who: MultiAddress)
interface:
api.tx.foreignAssets.refundOthersummary: 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 userefund.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
Refundedevent when successful.
setMetadata(id: StagingXcmV4Location, name: Bytes, symbol: Bytes, decimals: u8)
interface:
api.tx.foreignAssets.setMetadatasummary: 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 byStringLimit.symbol: The exchange symbol for this asset. Limited in length byStringLimit.decimals: The number of decimals this asset uses to represent one unit.Emits
MetadataSet.Weight:
O(1)
setMinBalance(id: StagingXcmV4Location, min_balance: u128)
interface:
api.tx.foreignAssets.setMinBalancesummary: 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_balanceis 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 ofmin_balance.Emits
AssetMinBalanceChangedevent when successful.
setTeam(id: StagingXcmV4Location, issuer: MultiAddress, admin: MultiAddress, freezer: MultiAddress)
interface:
api.tx.foreignAssets.setTeamsummary: 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: StagingXcmV4Location)
interface:
api.tx.foreignAssets.startDestroysummary: Start the process of destroying a fungible asset class.
start_destroyis the first in a series of extrinsics that should be called, to allow destruction of an asset class.The origin must conform to
ForceOriginor must beSignedby the asset'sowner.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: StagingXcmV4Location, who: MultiAddress)
interface:
api.tx.foreignAssets.thawsummary: 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: StagingXcmV4Location)
interface:
api.tx.foreignAssets.thawAssetsummary: 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.Weight:
O(1)
touch(id: StagingXcmV4Location)
interface:
api.tx.foreignAssets.touchsummary: Create an asset account for non-provider assets.
A deposit will be taken from the signer account.
origin: Must be Signed; the signer account must have sufficient funds for a deposit to be taken.id: The identifier of the asset for the account to be created.Emits
Touchedevent when successful.
touchOther(id: StagingXcmV4Location, who: MultiAddress)
interface:
api.tx.foreignAssets.touchOthersummary: Create an asset account for
who.A deposit will be taken from the signer account.
origin: Must be Signed byFreezerorAdminof the assetid; the signer account must have sufficient funds for a deposit to be taken.id: The identifier of the asset for the account to be created.who: The account to be created.Emits
Touchedevent when successful.
transfer(id: StagingXcmV4Location, target: MultiAddress, amount: Compact<u128>)
interface:
api.tx.foreignAssets.transfersummary: Move some assets from the sender account to another.
Origin must be Signed.
id: The identifier of the asset to have some amount transferred.target: The account to be credited.amount: The amount by which the sender's balance of assets should be reduced andtarget'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
Transferredwith 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 oftarget; Post-existence of sender; Account pre-existence oftarget.
transferAll(id: StagingXcmV4Location, dest: MultiAddress, keep_alive: bool)
interface:
api.tx.foreignAssets.transferAllsummary: Transfer the entire transferable balance from the caller asset account.
NOTE: This function only attempts to transfer transferable balances. This means that any held, frozen, or minimum balance (when
keep_aliveistrue), 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.
id: The identifier of the asset for the account holding a deposit.dest: The recipient of the transfer.keep_alive: A boolean to determine if thetransfer_alloperation 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: StagingXcmV4Location, owner: MultiAddress, destination: MultiAddress, amount: Compact<u128>)
interface:
api.tx.foreignAssets.transferApprovedsummary: Transfer some asset balance from a previously delegated account to some third-party account.
Origin must be Signed and there must be an approval in place by the
ownerto the signer.If the entire amount approved for transfer is transferred, then any deposit previously reserved by
approve_transferis unreserved.id: The identifier of the asset.owner: The account which previously approved for a transfer of at leastamountand from which the asset balance will be withdrawn.destination: The account to which the asset balance ofamountwill be transferred.amount: The amount of assets to transfer.Emits
TransferredApprovedon success.Weight:
O(1)
transferKeepAlive(id: StagingXcmV4Location, target: MultiAddress, amount: Compact<u128>)
interface:
api.tx.foreignAssets.transferKeepAlivesummary: Move some assets from the sender account to another, keeping the sender account alive.
Origin must be Signed.
id: The identifier of the asset to have some amount transferred.target: The account to be credited.amount: The amount by which the sender's balance of assets should be reduced andtarget'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
Transferredwith 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 oftarget; Post-existence of sender; Account pre-existence oftarget.
transferOwnership(id: StagingXcmV4Location, owner: MultiAddress)
interface:
api.tx.foreignAssets.transferOwnershipsummary: 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.owner: The new Owner of this asset.Emits
OwnerChanged.Weight:
O(1)
messageQueue
executeOverweight(message_origin: CumulusPrimitivesCoreAggregateMessageOrigin, page: u32, index: u32, weight_limit: SpWeightsWeightV2Weight)
interface:
api.tx.messageQueue.executeOverweightsummary: Execute an overweight message.
Temporary processing errors will be propagated whereas permanent errors are treated as success condition.
origin: Must beSigned.message_origin: The origin from which the message to be executed arrived.page: The page in the queue in which the message to be executed is sitting.index: The index into the queue of the message to be executed.weight_limit: The maximum amount of weight allowed to be consumed in the execution of the message.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.
multisig
approveAsMulti(threshold: u16, other_signatories: Vec<AccountId32>, maybe_timepoint: Option<PalletMultisigTimepoint>, call_hash: [u8;32], max_weight: SpWeightsWeightV2Weight)
interface:
api.tx.multisig.approveAsMultisummary: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of
threshold - 1ofother_signatories.Payment:
DepositBasewill be reserved if this is the first approval, plusthresholdtimesDepositFactor. 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 beNone. If it is not the first approval, then it must beSome, 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_multiinstead.Complexity
O(S).Up to one balance-reserve or unreserve operation.
One passthrough operation, one insert, both
O(S)whereSis the number of signatories.Sis capped byMaxSignatories, 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 mutateO(S). Up to one remove.One event.
Storage: inserts one item, value size bounded by
MaxSignatories, with a deposit taken for its lifetime ofDepositBase + threshold * DepositFactor.
asMulti(threshold: u16, other_signatories: Vec<AccountId32>, maybe_timepoint: Option<PalletMultisigTimepoint>, call: Call, max_weight: SpWeightsWeightV2Weight)
interface:
api.tx.multisig.asMultisummary: Register approval for a dispatch to be made from a deterministic composite account if approved by a total of
threshold - 1ofother_signatories.If there are enough, then dispatch the call.
Payment:
DepositBasewill be reserved if this is the first approval, plusthresholdtimesDepositFactor. 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 beNone. If it is not the first approval, then it must beSome, 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_multiinstead, since it only requires a hash of the call.Result is equivalent to the dispatched result if
thresholdis exactly1. Otherwise on success, result isOkand the result from the interior call, if it was executed, may be found in the depositedMultisigExecutedevent.Complexity
O(S + Z + Call).Up to one balance-reserve or unreserve operation.
One passthrough operation, one insert, both
O(S)whereSis the number of signatories.Sis capped byMaxSignatories, with weight being proportional.One call encode & hash, both of complexity
O(Z)whereZis 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 mutateO(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 ofDepositBase + threshold * DepositFactor.
asMultiThreshold1(other_signatories: Vec<AccountId32>, call: Call)
interface:
api.tx.multisig.asMultiThreshold1summary: 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<AccountId32>, timepoint: PalletMultisigTimepoint, call_hash: [u8;32])
interface:
api.tx.multisig.cancelAsMultisummary: 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)whereSis the number of signatories.Sis capped byMaxSignatories, 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<AccountId32>, call_hash: [u8;32])
interface:
api.tx.multisig.pokeDepositsummary: 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
DepositPokedif successful.
nfts
approveItemAttributes(collection: u32, item: u32, delegate: MultiAddress)
interface:
api.tx.nfts.approveItemAttributessummary: 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
ItemAttributesApprovalAddedon success.
approveTransfer(collection: u32, item: u32, delegate: MultiAddress, maybe_deadline: Option<u32>)
interface:
api.tx.nfts.approveTransfersummary: Approve an item to be transferred by a delegated third-party account.
Origin must be either
ForceOriginor Signed and the sender should be the Owner of theitem.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 expireEmits
TransferApprovedon success.Weight:
O(1)
burn(collection: u32, item: u32)
interface:
api.tx.nfts.burnsummary: Destroy a single item.
The origin must conform to
ForceOriginor must be Signed and the signing account must be the owner of theitem.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.buyItemsummary: 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
ItemBoughton success.
cancelApproval(collection: u32, item: u32, delegate: MultiAddress)
interface:
api.tx.nfts.cancelApprovalsummary: Cancel one of the transfer approvals for a specific item.
Origin must be either:
the
Forceorigin;Signedwith the signer being the Owner of theitem;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
ApprovalCancelledon success.Weight:
O(1)
cancelItemAttributesApproval(collection: u32, item: u32, delegate: MultiAddress, witness: PalletNftsCancelAttributesApprovalWitness)
interface:
api.tx.nfts.cancelItemAttributesApprovalsummary: Cancel the previously provided approval to change item's attributes. All the previously set attributes by the
delegatewill 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
ItemAttributesApprovalRemovedon success.
cancelSwap(offered_collection: u32, offered_item: u32)
interface:
api.tx.nfts.cancelSwapsummary: Cancel an atomic swap.
Origin must be Signed. Origin must be an owner of the
itemif the deadline hasn't expired.collection: The collection of the item.item: The item an owner wants to give.Emits
SwapCancelledon success.
claimSwap(send_collection: u32, send_item: u32, receive_collection: u32, receive_item: u32, witness_price: Option<PalletNftsPriceWithDirection>)
interface:
api.tx.nfts.claimSwapsummary: 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
SwapClaimedon success.
clearAllTransferApprovals(collection: u32, item: u32)
interface:
api.tx.nfts.clearAllTransferApprovalssummary: Cancel all the approvals of a specific item.
Origin must be either:
the
Forceorigin;Signedwith the signer being the Owner of theitem;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
AllApprovalsCancelledon success.Weight:
O(1)
clearAttribute(collection: u32, maybe_item: Option<u32>, namespace: PalletNftsAttributeNamespace, key: Bytes)
interface:
api.tx.nfts.clearAttributesummary: Clear an attribute for a collection or item.
Origin must be either
ForceOriginor 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.clearCollectionMetadatasummary: Clear the metadata for a collection.
Origin must be either
ForceOriginorSignedand the sender should be the Admin of thecollection.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.clearMetadatasummary: Clear the metadata for an item.
Origin must be either
ForceOriginor Signed and the sender should be the Admin of thecollection.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.createsummary: 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.
CollectionDepositfunds 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
Createdevent when successful.Weight:
O(1)
createSwap(offered_collection: u32, offered_item: u32, desired_collection: u32, maybe_desired_item: Option<u32>, maybe_price: Option<PalletNftsPriceWithDirection>, duration: u32)
interface:
api.tx.nfts.createSwapsummary: Register a new atomic swap, declaring an intention to send an
itemin exchange fordesired_itemfrom origin to target on the current blockchain. The target can execute the swap during the specifieddurationof blocks (if set). Additionally, the price could be set for the desireditem.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 desireditem.duration: A deadline for the swap. Specified by providing the number of blocks after which the swap will expire.Emits
SwapCreatedon success.
destroy(collection: u32, witness: PalletNftsDestroyWitness)
interface:
api.tx.nfts.destroysummary: Destroy a collection of fungible items.
The origin must conform to
ForceOriginor must beSignedand the sender must be the owner of thecollection.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
Destroyedevent when successful.Weight:
O(m + c + a)where:m = witness.item_metadatasc = witness.item_configsa = witness.attributes
forceCollectionConfig(collection: u32, config: PalletNftsCollectionConfig)
interface:
api.tx.nfts.forceCollectionConfigsummary: 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.forceCollectionOwnersummary: 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.forceCreatesummary: 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 usingtransfer_ownershipandset_team.Emits
ForceCreatedevent when successful.Weight:
O(1)
forceMint(collection: u32, item: u32, mint_to: MultiAddress, item_config: PalletNftsItemConfig)
interface:
api.tx.nfts.forceMintsummary: Mint an item of a particular collection from a privileged origin.
The origin must conform to
ForceOriginor must beSignedand the sender must be the Issuer of thecollection.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
Issuedevent when successful.Weight:
O(1)
forceSetAttribute(set_as: Option<AccountId32>, collection: u32, maybe_item: Option<u32>, namespace: PalletNftsAttributeNamespace, key: Bytes, value: Bytes)
interface:
api.tx.nfts.forceSetAttributesummary: 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.lockCollectionsummary: 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.lockItemPropertiessummary: Disallows changing the metadata or attributes of the item.
Origin must be either
ForceOriginor Signed and the sender should be the Admin of thecollection.collection: The collection if theitem.item: An item to be locked.lock_metadata: Specifies whether the metadata should be locked.lock_attributes: Specifies whether the attributes in theCollectionOwnernamespace should be locked.Note:
lock_attributesaffects the attributes in theCollectionOwnernamespace 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.lockItemTransfersummary: 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<PalletNftsMintWitness>)
interface:
api.tx.nfts.mintsummary: Mint an item of a particular collection.
The origin must be Signed and the sender must comply with the
mint_settingsrules.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 isHolderOf(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 thewitness_data.Note: the deposit will be taken from the
originand not theownerof theitem.Emits
Issuedevent when successful.Weight:
O(1)
mintPreSigned(mint_data: PalletNftsPreSignedMint, signature: SpRuntimeMultiSignature, signer: AccountId32)
interface:
api.tx.nfts.mintPreSignedsummary: 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 (Nonefor anyone) and until what block number.signature: The signature of thedataobject.signer: Thedataobject's signer. Should be an Issuer of the collection.Emits
Issuedon success. EmitsAttributeSetif the attributes were provided. EmitsItemMetadataSetif the metadata was not empty.
payTips(tips: Vec<PalletNftsItemTip>)
interface:
api.tx.nfts.payTipssummary: Allows to pay the tips.
Origin must be Signed.
tips: Tips array.Emits
TipSenton every tip transfer.
redeposit(collection: u32, items: Vec<u32>)
interface:
api.tx.nfts.redepositsummary: 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<u32>)
interface:
api.tx.nfts.setAcceptOwnershipsummary: Set (or reset) the acceptance of ownership for a particular account.
Origin must be
Signedand ifmaybe_collectionisSome, then the signer must have a provider reference.maybe_collection: The identifier of the collection whose ownership the signer is willing to accept, or ifNone, an indication that the signer is willing to accept no ownership transferal.Emits
OwnershipAcceptanceChanged.
setAttribute(collection: u32, maybe_item: Option<u32>, namespace: PalletNftsAttributeNamespace, key: Bytes, value: Bytes)
interface:
api.tx.nfts.setAttributesummary: Set an attribute for a collection or item.
Origin must be Signed and must conform to the namespace ruleset:
CollectionOwnernamespace could be modified by thecollectionAdmin only;ItemOwnernamespace could be modified by themaybe_itemowner only.maybe_itemshould be set in that case;Account(AccountId)namespace could be modified only when theoriginwas given a permission to do so;The funds of
originare 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.setAttributesPreSignedsummary: 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 thedataobject.signer: Thedataobject's signer. Should be an Admin of the collection for theCollectionOwnernamespace.Emits
AttributeSetfor each provided attribute. EmitsItemAttributesApprovalAddedif the approval wasn't set before. EmitsPreSignedAttributesSeton success.
setCollectionMaxSupply(collection: u32, max_supply: u32)
interface:
api.tx.nfts.setCollectionMaxSupplysummary: Set the maximum number of items a collection could have.
Origin must be either
ForceOriginorSignedand the sender should be the Owner of thecollection.collection: The identifier of the collection to change.max_supply: The maximum number of items a collection could have.Emits
CollectionMaxSupplySetevent when successful.
setCollectionMetadata(collection: u32, data: Bytes)
interface:
api.tx.nfts.setCollectionMetadatasummary: Set the metadata for a collection.
Origin must be either
ForceOriginorSignedand the sender should be the Admin of thecollection.If the origin is
Signed, then funds of signer are reserved according to the formula:MetadataDepositBase + DepositPerByte * data.lentaking 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 byStringLimit.Emits
CollectionMetadataSet.Weight:
O(1)
setMetadata(collection: u32, item: u32, data: Bytes)
interface:
api.tx.nfts.setMetadatasummary: Set the metadata for an item.
Origin must be either
ForceOriginor Signed and the sender should be the Admin of thecollection.If the origin is Signed, then funds of signer are reserved according to the formula:
MetadataDepositBase + DepositPerByte * data.lentaking 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 byStringLimit.Emits
ItemMetadataSet.Weight:
O(1)
setPrice(collection: u32, item: u32, price: Option<u128>, whitelisted_buyer: Option<MultiAddress>)
interface:
api.tx.nfts.setPricesummary: 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. PassNone, to reset the price.buyer: Restricts the buy operation to a specific account.Emits
ItemPriceSeton success if the price is notNone. EmitsItemPriceRemovedon success if the price isNone.
setTeam(collection: u32, issuer: Option<MultiAddress>, admin: Option<MultiAddress>, freezer: Option<MultiAddress>)
interface:
api.tx.nfts.setTeamsummary: Change the Issuer, Admin and Freezer of a collection.
Origin must be either
ForceOriginor Signed and the sender should be the Owner of thecollection.Note: by setting the role to
Noneonly theForceOriginwill be able to change it after toSome(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.transfersummary: 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.transferOwnershipsummary: 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 calledset_accept_ownershipwithcollectionin order for this operation to succeed.Emits
OwnerChanged.Weight:
O(1)
unlockItemTransfer(collection: u32, item: u32)
interface:
api.tx.nfts.unlockItemTransfersummary: 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.updateMintSettingssummary: Update mint settings.
Origin must be either
ForceOriginorSignedand the sender should be the Issuer of thecollection.collection: The identifier of the collection to change.mint_settings: The new mint settings.Emits
CollectionMintSettingsUpdatedevent when successful.
parachainInfo
parachainSystem
setValidationData(data: CumulusPrimitivesParachainInherentParachainInherentData)
interface:
api.tx.parachainSystem.setValidationDatasummary: 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
InherentAs a side effect, this function upgrades the current validation function if the appropriate time has come.
sudoSendUpwardMessage(message: Bytes)
- interface:
api.tx.parachainSystem.sudoSendUpwardMessage
polkadotXcm
addAuthorizedAlias(aliaser: XcmVersionedLocation, expires: Option<u64>)
interface:
api.tx.polkadotXcm.addAuthorizedAliassummary: Authorize another
aliaserlocation to alias into the localoriginmaking this call. Thealiaseris only authorized until the providedexpiryblock number. The call can also be used for a previously authorized alias in order to update itsexpiryblock 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 thealiaserlocation to act in their/your name. Once authorized using this call, thealiasercan freely impersonateoriginin XCM programs executed on the local chain.
claimAssets(assets: XcmVersionedAssets, beneficiary: XcmVersionedLocation)
interface:
api.tx.polkadotXcm.claimAssetssummary: 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.executesummary: Execute an XCM message from a local, signed, origin.
An event is deposited indicating whether
msgcould be executed completely or only partially.No more than
max_weightwill 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<u32>)
interface:
api.tx.polkadotXcm.forceDefaultXcmVersionsummary: 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, orNoneto disable.
forceSubscribeVersionNotify(location: XcmVersionedLocation)
interface:
api.tx.polkadotXcm.forceSubscribeVersionNotifysummary: 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.forceSuspensionsummary: Set or unset the global suspension state of the XCM executor.
origin: Must be an origin specified by AdminOrigin.suspended:trueto suspend,falseto resume.
forceUnsubscribeVersionNotify(location: XcmVersionedLocation)
interface:
api.tx.polkadotXcm.forceUnsubscribeVersionNotifysummary: 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.forceXcmVersionsummary: 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 thatlocationsupports.
limitedReserveTransferAssets(dest: XcmVersionedLocation, beneficiary: XcmVersionedLocation, assets: XcmVersionedAssets, fee_asset_item: u32, weight_limit: XcmV3WeightLimit)
interface:
api.tx.polkadotXcm.limitedReserveTransferAssetssummary: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve.
assetsmust have same reserve location and may not be teleportable todest.assetshave local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM todestto mint and deposit reserve-based assets tobeneficiary.assetshave destination reserve: burn local assets and forward a notification todestchain to withdraw the reserve assets from this chain's sovereign account and deposit them tobeneficiary.assetshave remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA todestchain's SA, and forward another XCM todestto mint and deposit reserve-based assets tobeneficiary.Fee payment on the destination side is made from the asset in the
assetsvector of indexfee_asset_item, up to enough to pay forweight_limitof weight. If more weight is needed thanweight_limit, then the operation will fail and the sent assets may be at risk.origin: Must be capable of withdrawing theassetsand 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 ofdest. Will generally be anAccountId32value.assets: The assets to be withdrawn. This should include the assets used to pay the fee on thedest(and possibly reserve) chains.fee_asset_item: The index intoassetsof 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.limitedTeleportAssetssummary: Teleport some assets from the local chain to some destination chain.
Fee payment on the destination side is made from the asset in the
assetsvector of indexfee_asset_item, up to enough to pay forweight_limitof weight. If more weight is needed thanweight_limit, then the operation will fail and the sent assets may be at risk.origin: Must be capable of withdrawing theassetsand 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 ofdest. Will generally be anAccountId32value.assets: The assets to be withdrawn. This should include the assets used to pay the fee on thedestchain.fee_asset_item: The index intoassetsof 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
aliasers that can alias into the localoriginmaking this call.
removeAuthorizedAlias(aliaser: XcmVersionedLocation)
- interface:
api.tx.polkadotXcm.removeAuthorizedAlias - summary: Remove a previously authorized
aliaserfrom the list of locations that can alias into the localoriginmaking this call.
reserveTransferAssets(dest: XcmVersionedLocation, beneficiary: XcmVersionedLocation, assets: XcmVersionedAssets, fee_asset_item: u32)
interface:
api.tx.polkadotXcm.reserveTransferAssetssummary: Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve.
assetsmust have same reserve location and may not be teleportable todest.assetshave local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM todestto mint and deposit reserve-based assets tobeneficiary.assetshave destination reserve: burn local assets and forward a notification todestchain to withdraw the reserve assets from this chain's sovereign account and deposit them tobeneficiary.assetshave remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA todestchain's SA, and forward another XCM todestto mint and deposit reserve-based assets tobeneficiary.This function is deprecated: Use
limited_reserve_transfer_assetsinstead.Fee payment on the destination side is made from the asset in the
assetsvector of indexfee_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 theassetsand 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 ofdest. Will generally be anAccountId32value.assets: The assets to be withdrawn. This should include the assets used to pay the fee on thedest(and possibly reserve) chains.fee_asset_item: The index intoassetsof 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.teleportAssetssummary: Teleport some assets from the local chain to some destination chain.
This function is deprecated: Use
limited_teleport_assetsinstead.Fee payment on the destination side is made from the asset in the
assetsvector of indexfee_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 theassetsand 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 ofdest. Will generally be anAccountId32value.assets: The assets to be withdrawn. This should include the assets used to pay the fee on thedestchain.fee_asset_item: The index intoassetsof 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.transferAssetssummary: 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
assetsvector of indexfee_asset_item(hence referred to asfees), up to enough to pay forweight_limitof weight. If more weight is needed thanweight_limit, then the operation will fail and the sent assets may be at risk.assets(excludingfees) must have same reserve location or otherwise be teleportable todest, no limitations imposed onfees.for local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to
destto mint and deposit reserve-based assets tobeneficiary.for destination reserve: burn local assets and forward a notification to
destchain to withdraw the reserve assets from this chain's sovereign account and deposit them tobeneficiary.for remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain's SA to
destchain's SA, and forward another XCM todestto mint and deposit reserve-based assets tobeneficiary.for teleports: burn local assets and forward XCM to
destchain to mint/teleport assets and deposit them tobeneficiary.origin: Must be capable of withdrawing theassetsand executing XCM.dest: Destination context for the assets. Will typically beX2(Parent, Parachain(..))to send from parachain to parachain, orX1(Parachain(..))to send from relay to parachain.beneficiary: A beneficiary location for the assets in the context ofdest. Will generally be anAccountId32value.assets: The assets to be withdrawn. This should include the assets used to pay the fee on thedest(and possibly reserve) chains.fee_asset_item: The index intoassetsof 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.transferAssetsUsingTypeAndThensummary: Transfer assets from the local chain to the destination chain using explicit transfer types for assets and fees.
assetsmust have same reserve location or may be teleportable todest. Caller must provide theassets_transfer_typeto be used forassets:TransferType::LocalReserve: transfer assets to sovereign account of destination chain and forward a notification XCM todestto mint and deposit reserve-based assets tobeneficiary.TransferType::DestinationReserve: burn local assets and forward a notification todestchain to withdraw the reserve assets from this chain's sovereign account and deposit them tobeneficiary.TransferType::RemoteReserve(reserve): burn local assets, forward XCM toreservechain to move reserves from this chain's SA todestchain's SA, and forward another XCM todestto mint and deposit reserve-based assets tobeneficiary. Typically the remotereserveis Asset Hub.TransferType::Teleport: burn local assets and forward XCM todestchain to mint/teleport assets and deposit them tobeneficiary.On the destination chain, as well as any intermediary hops,
BuyExecutionis used to buy execution using transferredassetsidentified byremote_fees_id. Make sure enough of the specifiedremote_fees_idasset is included in the given list ofassets.remote_fees_idshould be enough to pay forweight_limit. If more weight is needed thanweight_limit, then the operation will fail and the sent assets may be at risk.remote_fees_idmay use different transfer type than rest ofassetsand can be specified throughfees_transfer_type.The caller needs to specify what should happen to the transferred assets once they reach the
destchain. This is done through thecustom_xcm_on_destparameter, which contains the instructions to execute ondestas 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 theassetseven further.origin: Must be capable of withdrawing theassetsand 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 thedest(and possibly reserve) chains.assets_transfer_type: The XCMTransferTypeused to transfer theassets.remote_fees_id: One of the includedassetsto be used to pay fees.fees_transfer_type: The XCMTransferTypeused to transfer thefeesassets.custom_xcm_on_dest: The XCM to be executed ondestchain 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<u128>)
interface:
api.tx.poolAssets.approveTransfersummary: Approve an amount of asset for transfer by a delegated third-party account.
Origin must be Signed.
Ensures that
ApprovalDepositworth ofCurrencyis reserved from signing account for the purpose of holding the approval. If some non-zero amount of assets is already approved from signing account todelegate, then it is topped up or unreserved to meet the right value.NOTE: The signing account does not need to own
amountof 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 bydelegate. If there is already an approval in place, then this acts additively.Emits
ApprovedTransferon success.Weight:
O(1)
block(id: u32, who: MultiAddress)
interface:
api.tx.poolAssets.blocksummary: Disallow further unprivileged transfers of an asset
idto and from an accountwho.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<u128>)
interface:
api.tx.poolAssets.burnsummary: Reduce the balance of
whoby as much as possible up toamountassets ofid.Origin must be Signed and the sender should be the Manager of the asset
id.Bails with
NoAccountif thewhois 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 whichwho's balance should be reduced.Emits
Burnedwith 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 ofwho; Pre & post Zombie-status ofwho.
cancelApproval(id: u32, delegate: MultiAddress)
interface:
api.tx.poolAssets.cancelApprovalsummary: 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_transferfor the approval.id: The identifier of the asset.delegate: The account delegated permission to transfer asset.Emits
ApprovalCancelledon success.Weight:
O(1)
clearMetadata(id: u32)
interface:
api.tx.poolAssets.clearMetadatasummary: 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.createsummary: 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
CreateOriginand 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
Createdevent when successful.Weight:
O(1)
destroyAccounts(id: u32)
interface:
api.tx.poolAssets.destroyAccountssummary: Destroy all accounts associated with a given asset.
destroy_accountsshould only be called afterstart_destroyhas been called, and the asset is in aDestroyingstate.Due to weight restrictions, this function may need to be called multiple times to fully destroy all accounts. It will destroy
RemoveItemsLimitaccounts at a time.id: The identifier of the asset to be destroyed. This must identify an existing asset.Each call emits the
Event::DestroyedAccountsevent.
destroyApprovals(id: u32)
interface:
api.tx.poolAssets.destroyApprovalssummary: Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit).
destroy_approvalsshould only be called afterstart_destroyhas been called, and the asset is in aDestroyingstate.Due to weight restrictions, this function may need to be called multiple times to fully destroy all approvals. It will destroy
RemoveItemsLimitapprovals at a time.id: The identifier of the asset to be destroyed. This must identify an existing asset.Each call emits the
Event::DestroyedApprovalsevent.
finishDestroy(id: u32)
interface:
api.tx.poolAssets.finishDestroysummary: Complete destroying asset and unreserve currency.
finish_destroyshould only be called afterstart_destroyhas been called, and the asset is in aDestroyingstate. 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::Destroyedevent.
forceAssetStatus(id: u32, owner: MultiAddress, issuer: MultiAddress, admin: MultiAddress, freezer: MultiAddress, min_balance: Compact<u128>, is_sufficient: bool, is_frozen: bool)
interface:
api.tx.poolAssets.forceAssetStatussummary: 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 totrue, then non-zero balances may be stored without aconsumerreference (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
AssetStatusChangedwith the identity of the asset.Weight:
O(1)
forceCancelApproval(id: u32, owner: MultiAddress, delegate: MultiAddress)
interface:
api.tx.poolAssets.forceCancelApprovalsummary: 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_transferfor the approval.id: The identifier of the asset.delegate: The account delegated permission to transfer asset.Emits
ApprovalCancelledon success.Weight:
O(1)
forceClearMetadata(id: u32)
interface:
api.tx.poolAssets.forceClearMetadatasummary: 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<u128>)
interface:
api.tx.poolAssets.forceCreatesummary: 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 usingtransfer_ownershipandset_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
ForceCreatedevent when successful.Weight:
O(1)
forceSetMetadata(id: u32, name: Bytes, symbol: Bytes, decimals: u8, is_frozen: bool)
interface:
api.tx.poolAssets.forceSetMetadatasummary: 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 byStringLimit.symbol: The exchange symbol for this asset. Limited in length byStringLimit.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<u128>)
interface:
api.tx.poolAssets.forceTransfersummary: 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 thesource's balance of assets should be reduced anddest's balance increased. The amount actually transferred may be slightly greater in the case that the transfer would otherwise take thesourcebalance above zero but below the minimum balance. Must be greater than zero.Emits
Transferredwith 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 ofdest; Post-existence ofsource; Account pre-existence ofdest.
freeze(id: u32, who: MultiAddress)
interface:
api.tx.poolAssets.freezesummary: Disallow further unprivileged transfers of an asset
idfrom an accountwho.whomust already exist as an entry inAccounts of the asset. If you want to freeze an account that does not have an entry, usetouch_otherfirst.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.freezeAssetsummary: 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<u128>)
interface:
api.tx.poolAssets.mintsummary: 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
Issuedevent when successful.Weight:
O(1)Modes: Pre-existing balance ofbeneficiary; Account pre-existence ofbeneficiary.
refund(id: u32, allow_burn: bool)
interface:
api.tx.poolAssets.refundsummary: 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: Iftruethen 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
Refundedevent when successful.
refundOther(id: u32, who: MultiAddress)
interface:
api.tx.poolAssets.refundOthersummary: 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 userefund.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
Refundedevent when successful.
setMetadata(id: u32, name: Bytes, symbol: Bytes, decimals: u8)
interface:
api.tx.poolAssets.setMetadatasummary: 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 byStringLimit.symbol: The exchange symbol for this asset. Limited in length byStringLimit.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.setMinBalancesummary: 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_balanceis 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 ofmin_balance.Emits
AssetMinBalanceChangedevent when successful.
setTeam(id: u32, issuer: MultiAddress, admin: MultiAddress, freezer: MultiAddress)
interface:
api.tx.poolAssets.setTeamsummary: 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.startDestroysummary: Start the process of destroying a fungible asset class.
start_destroyis the first in a series of extrinsics that should be called, to allow destruction of an asset class.The origin must conform to
ForceOriginor must beSignedby the asset'sowner.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.thawsummary: 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.thawAssetsummary: 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.Weight:
O(1)
touch(id: u32)
interface:
api.tx.poolAssets.touchsummary: Create an asset account for non-provider assets.
A deposit will be taken from the signer account.
origin: Must be Signed; the signer account must have sufficient funds for a deposit to be taken.id: The identifier of the asset for the account to be created.Emits
Touchedevent when successful.
touchOther(id: u32, who: MultiAddress)
interface:
api.tx.poolAssets.touchOthersummary: Create an asset account for
who.A deposit will be taken from the signer account.
origin: Must be Signed byFreezerorAdminof the assetid; the signer account must have sufficient funds for a deposit to be taken.id: The identifier of the asset for the account to be created.who: The account to be created.Emits
Touchedevent when successful.
transfer(id: u32, target: MultiAddress, amount: Compact<u128>)
interface:
api.tx.poolAssets.transfersummary: Move some assets from the sender account to another.
Origin must be Signed.
id: The identifier of the asset to have some amount transferred.target: The account to be credited.amount: The amount by which the sender's balance of assets should be reduced andtarget'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
Transferredwith 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 oftarget; Post-existence of sender; Account pre-existence oftarget.
transferAll(id: u32, dest: MultiAddress, keep_alive: bool)
interface:
api.tx.poolAssets.transferAllsummary: Transfer the entire transferable balance from the caller asset account.
NOTE: This function only attempts to transfer transferable balances. This means that any held, frozen, or minimum balance (when
keep_aliveistrue), 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.
id: The identifier of the asset for the account holding a deposit.dest: The recipient of the transfer.keep_alive: A boolean to determine if thetransfer_alloperation 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<u128>)
interface:
api.tx.poolAssets.transferApprovedsummary: Transfer some asset balance from a previously delegated account to some third-party account.
Origin must be Signed and there must be an approval in place by the
ownerto the signer.If the entire amount approved for transfer is transferred, then any deposit previously reserved by
approve_transferis unreserved.id: The identifier of the asset.owner: The account which previously approved for a transfer of at leastamountand from which the asset balance will be withdrawn.destination: The account to which the asset balance ofamountwill be transferred.amount: The amount of assets to transfer.Emits
TransferredApprovedon success.Weight:
O(1)
transferKeepAlive(id: u32, target: MultiAddress, amount: Compact<u128>)
interface:
api.tx.poolAssets.transferKeepAlivesummary: Move some assets from the sender account to another, keeping the sender account alive.
Origin must be Signed.
id: The identifier of the asset to have some amount transferred.target: The account to be credited.amount: The amount by which the sender's balance of assets should be reduced andtarget'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
Transferredwith 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 oftarget; Post-existence of sender; Account pre-existence oftarget.
transferOwnership(id: u32, owner: MultiAddress)
interface:
api.tx.poolAssets.transferOwnershipsummary: 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.owner: The new Owner of this asset.Emits
OwnerChanged.Weight:
O(1)
proxy
addProxy(delegate: MultiAddress, proxy_type: AssetHubPolkadotRuntimeProxyType, delay: u32)
interface:
api.tx.proxy.addProxysummary: 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:
proxy: The account that thecallerwould like to make a proxy.proxy_type: The permissions allowed for this proxy account.delay: The announcement period required of the initial proxy. Will generally be zero.
announce(real: MultiAddress, call_hash: H256)
interface:
api.tx.proxy.announcesummary: Publish the hash of a proxy-call that will be made in the future.
This must be called some number of blocks before the corresponding
proxyis attempted if the delay associated with the proxy relationship is greater than zero.No more than
MaxPendingannouncements may be made at any one time.This will take a deposit of
AnnouncementDepositFactoras well asAnnouncementDepositBaseif there are no other pending announcements.The dispatch origin for this call must be Signed and a proxy of
real.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 therealaccount.
createPure(proxy_type: AssetHubPolkadotRuntimeProxyType, delay: u32, index: u16)
interface:
api.tx.proxy.createPuresummary: Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and initialize it with a proxy of
proxy_typefororiginsender.Requires a
Signedorigin.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 permissiveProxyTypepossible to allow for maximum flexibility.index: A disambiguation index, in case this is called multiple times in the same transaction (e.g. withutility::batch). Unless you're usingbatchyou probably just want to use0.delay: The announcement period required of the initial proxy. Will generally be zero.Fails with
Duplicateif this has already been called in this transaction, from the same sender, with the same parameters.Fails if there are insufficient funds to pay for deposit.
killPure(spawner: MultiAddress, proxy_type: AssetHubPolkadotRuntimeProxyType, index: u16, height: Compact<u32>, ext_index: Compact<u32>)
interface:
api.tx.proxy.killPuresummary: Removes a previously spawned pure proxy.
WARNING: All access to this account will be lost. Any funds held in it will be inaccessible.
Requires a
Signedorigin, and the sender account must have been created by a call topurewith corresponding parameters.spawner: The account that originally calledpureto create this account.index: The disambiguation index originally passed topure. Probably0.proxy_type: The proxy type originally passed topure.height: The height of the chain when the call topurewas processed.ext_index: The extrinsic index in which the call topurewas processed.Fails with
NoPermissionin case the caller is not a previously created pure account whosepurecall has corresponding parameters.
pokeDeposit()
interface:
api.tx.proxy.pokeDepositsummary: Poke / Adjust deposits made for proxies and announcements based on current values. This can be used by accounts to possibly lower their locked amount.
The dispatch origin for this call must be Signed.
The transaction fee is waived if the deposit amount has changed.
Emits
DepositPokedif successful.
proxy(real: MultiAddress, force_proxy_type: Option<AssetHubPolkadotRuntimeProxyType>, call: Call)
interface:
api.tx.proxy.proxysummary: Dispatch the given
callfrom an account that the sender is authorised for throughadd_proxy.The dispatch origin for this call must be Signed.
Parameters:
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 therealaccount.
proxyAnnounced(delegate: MultiAddress, real: MultiAddress, force_proxy_type: Option<AssetHubPolkadotRuntimeProxyType>, call: Call)
interface:
api.tx.proxy.proxyAnnouncedsummary: Dispatch the given
callfrom an account that the sender is authorized for throughadd_proxy.Removes any corresponding announcement(s).
The dispatch origin for this call must be Signed.
Parameters:
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 therealaccount.
rejectAnnouncement(delegate: MultiAddress, call_hash: H256)
interface:
api.tx.proxy.rejectAnnouncementsummary: 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.The dispatch origin for this call must be Signed.
Parameters:
delegate: The account that previously announced the call.call_hash: The hash of the call to be made.
removeAnnouncement(real: MultiAddress, call_hash: H256)
interface:
api.tx.proxy.removeAnnouncementsummary: Remove a given announcement.
May be called by a proxy account to remove a call they previously announced and return the deposit.
The dispatch origin for this call must be Signed.
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 therealaccount.
removeProxies()
interface:
api.tx.proxy.removeProxiessummary: Unregister all proxy accounts for the sender.
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.
removeProxy(delegate: MultiAddress, proxy_type: AssetHubPolkadotRuntimeProxyType, delay: u32)
interface:
api.tx.proxy.removeProxysummary: Unregister a proxy account for the sender.
The dispatch origin for this call must be Signed.
Parameters:
proxy: The account that thecallerwould like to remove as a proxy.proxy_type: The permissions currently enabled for the removed proxy account.
session
purgeKeys()
interface:
api.tx.session.purgeKeyssummary: Removes any session key(s) of the function caller.
This doesn't take effect until the next session.
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 ofT::Keys::key_ids()which is fixed.
setKeys(keys: AssetHubPolkadotRuntimeSessionKeys, proof: Bytes)
interface:
api.tx.session.setKeyssummary: 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 ofT::Keys::key_ids()which is fixed.
stateTrieMigration
continueMigrate(limits: PalletStateTrieMigrationMigrationLimits, real_size_upper: u32, witness_task: PalletStateTrieMigrationMigrationTask)
interface:
api.tx.stateTrieMigration.continueMigratesummary: Continue the migration for the given
limits.The dispatch origin of this call can be any signed account.
This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit, Upon successful execution, the transaction fee is returned.
The (potentially over-estimated) of the byte length of all the data read must be provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing that executing the current
MigrationTaskwith the givenlimitswill not exceedreal_size_upperbytes of read data.The
witness_taskis merely a helper to prevent the caller from being slashed or generally trigger a migration that they do not intend. This parameter is just a message from caller, saying that they believedwitness_taskwas the last state of the migration, and they only wish for their transaction to do anything, if this assumption holds. In casewitness_taskdoes not match, the transaction fails.Based on the documentation of [
MigrationTask::migrate_until_exhaustion], the recommended way of doing this is to pass alimitthat only boundscount, as thesizelimit can always be overwritten.
controlAutoMigration(maybe_config: Option<PalletStateTrieMigrationMigrationLimits>)
interface:
api.tx.stateTrieMigration.controlAutoMigrationsummary: Control the automatic migration.
The dispatch origin of this call must be [
Config::ControlOrigin].
forceSetProgress(progress_top: PalletStateTrieMigrationProgress, progress_child: PalletStateTrieMigrationProgress)
interface:
api.tx.stateTrieMigration.forceSetProgresssummary: Forcefully set the progress the running migration.
This is only useful in one case: the next key to migrate is too big to be migrated with a signed account, in a parachain context, and we simply want to skip it. A reasonable example of this would be
:code:, which is both very expensive to migrate, and commonly used, so probably it is already migrated.In case you mess things up, you can also, in principle, use this to reset the migration process.
migrateCustomChild(root: Bytes, child_keys: Vec<Bytes>, total_size: u32)
interface:
api.tx.stateTrieMigration.migrateCustomChildsummary: Migrate the list of child keys by iterating each of them one by one.
All of the given child keys must be present under one
child_root.This does not affect the global migration process tracker ([
MigrationProcess]), and should only be used in case any keys are leftover due to a bug.
migrateCustomTop(keys: Vec<Bytes>, witness_size: u32)
interface:
api.tx.stateTrieMigration.migrateCustomTopsummary: Migrate the list of top keys by iterating each of them one by one.
This does not affect the global migration process tracker ([
MigrationProcess]), and should only be used in case any keys are leftover due to a bug.
setSignedMaxLimits(limits: PalletStateTrieMigrationMigrationLimits)
- interface:
api.tx.stateTrieMigration.setSignedMaxLimits - summary: Set the maximum limit of the signed migration.
system
applyAuthorizedUpgrade(code: Bytes)
interface:
api.tx.system.applyAuthorizedUpgradesummary: Provide the preimage (runtime binary)
codefor an upgrade that has been authorized.If the authorization required a version check, this call will ensure the spec name remains unchanged and that the spec version has increased.
Depending on the runtime's
OnSetCodeconfiguration, this function may directly apply the newcodein the same block or attempt to schedule the upgrade.All origins are allowed.
authorizeUpgrade(code_hash: H256)
interface:
api.tx.system.authorizeUpgradesummary: Authorize an upgrade to a given
code_hashfor the runtime. The runtime can be supplied later.This call requires Root origin.
authorizeUpgradeWithoutChecks(code_hash: H256)
interface:
api.tx.system.authorizeUpgradeWithoutCheckssummary: Authorize an upgrade to a given
code_hashfor the runtime. The runtime can be supplied later.WARNING: This authorizes an upgrade that will take place without any safety checks, for example that the spec name remains the same and that the version number increases. Not recommended for normal use. Use
authorize_upgradeinstead.This call requires Root origin.
killPrefix(prefix: Bytes, subkeys: u32)
interface:
api.tx.system.killPrefixsummary: Kill all storage items with a key that starts with the given prefix.
NOTE: We rely on the Root origin to provide us the number of subkeys under the prefix we are removing to accurately calculate the weight of this function.
killStorage(keys: Vec<Bytes>)
- interface:
api.tx.system.killStorage - summary: Kill some items from storage.
remark(remark: Bytes)
interface:
api.tx.system.remarksummary: Make some on-chain remark.
Can be executed by every
origin.
remarkWithEvent(remark: Bytes)
- interface:
api.tx.system.remarkWithEvent - summary: Make some on-chain remark and emit event.
setCode(code: Bytes)
- interface:
api.tx.system.setCode - summary: Set the new runtime code.
setCodeWithoutChecks(code: Bytes)
interface:
api.tx.system.setCodeWithoutCheckssummary: Set the new runtime code without doing any checks of the given
code.Note that runtime upgrades will not run if this is called with a not-increasing spec version!
setHeapPages(pages: u64)
- interface:
api.tx.system.setHeapPages - summary: Set the number of pages in the WebAssembly environment's heap.
setStorage(items: Vec<(Bytes,Bytes)>)
- interface:
api.tx.system.setStorage - summary: Set some items of storage.
timestamp
set(now: Compact<u64>)
interface:
api.tx.timestamp.setsummary: Set the current time.
This call should be invoked exactly once per block. It will panic at the finalization phase, if this call hasn't been invoked by that time.
The timestamp should be greater than the previous one by the amount specified by [
Config::MinimumPeriod].The dispatch origin for this call must be None.
This dispatch class is Mandatory to ensure it gets executed in the block. Be aware that changing the complexity of this call could result exhausting the resources in a block to execute any other calls.
Complexity
O(1)(Note that implementations ofOnTimestampSetmust also beO(1))1 storage read and 1 storage mutation (codec
O(1)because ofDidUpdate::takeinon_finalize)1 event handler
on_timestamp_set. Must beO(1).
toKusamaXcmRouter
reportBridgeStatus(bridge_id: H256, is_congested: bool)
- interface:
api.tx.toKusamaXcmRouter.reportBridgeStatus - summary: Notification about congested bridge queue.
uniques
approveTransfer(collection: u32, item: u32, delegate: MultiAddress)
interface:
api.tx.uniques.approveTransfersummary: Approve an item to be transferred by a delegated third-party account.
The origin must conform to
ForceOriginor must beSignedand the sender must be either the owner of theitemor the admin of the collection.collection: The collection of the item to be approved for delegated transfer.item: The item of the item to be approved for delegated transfer.delegate: The account to delegate permission to transfer the item.Important NOTE: The
approvedaccount gets reset after each transfer.Emits
ApprovedTransferon success.Weight:
O(1)
burn(collection: u32, item: u32, check_owner: Option<MultiAddress>)
interface:
api.tx.uniques.burnsummary: Destroy a single item.
Origin must be Signed and the signing account must be either:
the Admin of the
collection;the Owner of the
item;collection: The collection of the item to be burned.item: The item of the item to be burned.check_owner: IfSomethen the operation will fail withWrongOwnerunless the item is owned by this value.Emits
Burnedwith the actual amount burned.Weight:
O(1)Modes:check_owner.is_some().
buyItem(collection: u32, item: u32, bid_price: u128)
interface:
api.tx.uniques.buyItemsummary: 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
ItemBoughton success.
cancelApproval(collection: u32, item: u32, maybe_check_delegate: Option<MultiAddress>)
interface:
api.tx.uniques.cancelApprovalsummary: Cancel the prior approval for the transfer of an item by a delegate.
Origin must be either:
the
Forceorigin;Signedwith the signer being the Admin of thecollection;Signedwith the signer being the Owner of theitem;Arguments:
collection: The collection of the item of whose approval will be cancelled.item: The item of the item of whose approval will be cancelled.maybe_check_delegate: IfSomewill ensure that the given account is the one to which permission of transfer is delegated.Emits
ApprovalCancelledon success.Weight:
O(1)
clearAttribute(collection: u32, maybe_item: Option<u32>, key: Bytes)
interface:
api.tx.uniques.clearAttributesummary: Clear an attribute for a collection or item.
Origin must be either
ForceOriginor Signed and the sender should be the Owner of thecollection.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.key: The key of the attribute.Emits
AttributeCleared.Weight:
O(1)
clearCollectionMetadata(collection: u32)
interface:
api.tx.uniques.clearCollectionMetadatasummary: Clear the metadata for a collection.
Origin must be either
ForceOriginorSignedand the sender should be the Owner of thecollection.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.uniques.clearMetadatasummary: Clear the metadata for an item.
Origin must be either
ForceOriginor Signed and the sender should be the Owner of theitem.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
MetadataCleared.Weight:
O(1)
create(collection: u32, admin: MultiAddress)
interface:
api.tx.uniques.createsummary: 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 conform to the configured
CreateOriginand have sufficient funds free.ItemDepositfunds of sender are reserved.Parameters:
collection: The identifier of the new collection. This must not be currently in use.admin: The admin of this collection. The admin is the initial address of each member of the collection's admin team.Emits
Createdevent when successful.Weight:
O(1)
destroy(collection: u32, witness: PalletUniquesDestroyWitness)
interface:
api.tx.uniques.destroysummary: Destroy a collection of fungible items.
The origin must conform to
ForceOriginor must beSignedand the sender must be the owner of thecollection.collection: The identifier of the collection to be destroyed.witness: Information on the items minted in the collection. This must be correct.Emits
Destroyedevent when successful.Weight:
O(n + m)where:n = witness.itemsm = witness.item_metadatasa = witness.attributes
forceCreate(collection: u32, owner: MultiAddress, free_holding: bool)
interface:
api.tx.uniques.forceCreatesummary: 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.collection: The identifier of the new item. This must not be currently 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 usingtransfer_ownershipandset_team.Emits
ForceCreatedevent when successful.Weight:
O(1)
forceItemStatus(collection: u32, owner: MultiAddress, issuer: MultiAddress, admin: MultiAddress, freezer: MultiAddress, free_holding: bool, is_frozen: bool)
interface:
api.tx.uniques.forceItemStatussummary: Alter the attributes of a given item.
Origin must be
ForceOrigin.collection: The identifier of the item.owner: The new Owner of this item.issuer: The new Issuer of this item.admin: The new Admin of this item.freezer: The new Freezer of this item.free_holding: Whether a deposit is taken for holding an item of this collection.is_frozen: Whether this collection is frozen except for permissioned/admin instructions.Emits
ItemStatusChangedwith the identity of the item.Weight:
O(1)
freeze(collection: u32, item: u32)
interface:
api.tx.uniques.freezesummary: 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 frozen.item: The item of the item to be frozen.Emits
Frozen.Weight:
O(1)
freezeCollection(collection: u32)
interface:
api.tx.uniques.freezeCollectionsummary: Disallow further unprivileged transfers for a whole collection.
Origin must be Signed and the sender should be the Freezer of the
collection.collection: The collection to be frozen.Emits
CollectionFrozen.Weight:
O(1)
mint(collection: u32, item: u32, owner: MultiAddress)
interface:
api.tx.uniques.mintsummary: Mint an item of a particular collection.
The origin must be Signed and the sender must be the Issuer of the
collection.collection: The collection of the item to be minted.item: The item value of the item to be minted.beneficiary: The initial owner of the minted item.Emits
Issuedevent when successful.Weight:
O(1)
redeposit(collection: u32, items: Vec<u32>)
interface:
api.tx.uniques.redepositsummary: Reevaluate the deposits on some items.
Origin must be Signed and the sender should be the Owner of the
collection.collection: The collection to be frozen.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 of the signer is not permitted to call it.
Weight:
O(items.len())
setAcceptOwnership(maybe_collection: Option<u32>)
interface:
api.tx.uniques.setAcceptOwnershipsummary: Set (or reset) the acceptance of ownership for a particular account.
Origin must be
Signedand ifmaybe_collectionisSome, then the signer must have a provider reference.maybe_collection: The identifier of the collection whose ownership the signer is willing to accept, or ifNone, an indication that the signer is willing to accept no ownership transferal.Emits
OwnershipAcceptanceChanged.
setAttribute(collection: u32, maybe_item: Option<u32>, key: Bytes, value: Bytes)
interface:
api.tx.uniques.setAttributesummary: Set an attribute for a collection or item.
Origin must be either
ForceOriginor Signed and the sender should be the Owner of thecollection.If the origin is Signed, then funds of signer are reserved according to the formula:
MetadataDepositBase + 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.key: The key of the attribute.value: The value to which to set the attribute.Emits
AttributeSet.Weight:
O(1)
setCollectionMaxSupply(collection: u32, max_supply: u32)
interface:
api.tx.uniques.setCollectionMaxSupplysummary: Set the maximum amount of items a collection could have.
Origin must be either
ForceOriginorSignedand the sender should be the Owner of thecollection.Note: This function can only succeed once per collection.
collection: The identifier of the collection to change.max_supply: The maximum amount of items a collection could have.Emits
CollectionMaxSupplySetevent when successful.
setCollectionMetadata(collection: u32, data: Bytes, is_frozen: bool)
interface:
api.tx.uniques.setCollectionMetadatasummary: Set the metadata for a collection.
Origin must be either
ForceOriginorSignedand the sender should be the Owner of thecollection.If the origin is
Signed, then funds of signer are reserved according to the formula:MetadataDepositBase + DepositPerByte * data.lentaking 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 byStringLimit.is_frozen: Whether the metadata should be frozen against further changes.Emits
CollectionMetadataSet.Weight:
O(1)
setMetadata(collection: u32, item: u32, data: Bytes, is_frozen: bool)
interface:
api.tx.uniques.setMetadatasummary: Set the metadata for an item.
Origin must be either
ForceOriginor Signed and the sender should be the Owner of thecollection.If the origin is Signed, then funds of signer are reserved according to the formula:
MetadataDepositBase + DepositPerByte * data.lentaking 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 byStringLimit.is_frozen: Whether the metadata should be frozen against further changes.Emits
MetadataSet.Weight:
O(1)
setPrice(collection: u32, item: u32, price: Option<u128>, whitelisted_buyer: Option<MultiAddress>)
interface:
api.tx.uniques.setPricesummary: Set (or reset) the price for an item.
Origin must be Signed and must be the owner of the asset
item.collection: The collection of the item.item: The item to set the price for.price: The price for the item. PassNone, to reset the price.buyer: Restricts the buy operation to a specific account.Emits
ItemPriceSeton success if the price is notNone. EmitsItemPriceRemovedon success if the price isNone.
setTeam(collection: u32, issuer: MultiAddress, admin: MultiAddress, freezer: MultiAddress)
interface:
api.tx.uniques.setTeamsummary: Change the Issuer, Admin and Freezer of a collection.
Origin must be Signed and the sender should be the Owner of the
collection.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)
thaw(collection: u32, item: u32)
interface:
api.tx.uniques.thawsummary: 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 thawed.item: The item of the item to be thawed.Emits
Thawed.Weight:
O(1)
thawCollection(collection: u32)
interface:
api.tx.uniques.thawCollectionsummary: Re-allow unprivileged transfers for a whole collection.
Origin must be Signed and the sender should be the Admin of the
collection.collection: The collection to be thawed.Emits
CollectionThawed.Weight:
O(1)
transfer(collection: u32, item: u32, dest: MultiAddress)
interface:
api.tx.uniques.transfersummary: Move an item from the sender account to another.
This resets the approved account of the item.
Origin must be Signed and the signing account must be either:
the Admin of the
collection;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 of 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.uniques.transferOwnershipsummary: 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 calledset_accept_ownershipwithcollectionin order for this operation to succeed.Emits
OwnerChanged.Weight:
O(1)
utility
asDerivative(index: u16, call: Call)
interface:
api.tx.utility.asDerivativesummary: Send a call through an indexed pseudonym of the sender.
Filter from origin are passed along. The call will be dispatched with an origin which use the same filter as the origin of this call.
NOTE: If you need to ensure that any account-based filtering is not honored (i.e. because you expect
proxyto have been used prior in the call stack and you do not want the call restrictions to apply to any sub-accounts), then useas_multi_threshold_1in the Multisig pallet instead.NOTE: Prior to version *12, this was called
as_limited_sub.The dispatch origin for this call must be Signed.
batch(calls: Vec<Call>)
interface:
api.tx.utility.batchsummary: Send a batch of dispatch calls.
May be called from any origin except
None.calls: The calls to be dispatched from the same origin. The number of call must not exceed the constant:batched_calls_limit(available in constant metadata).If origin is root then the calls are dispatched without checking origin filter. (This includes bypassing
frame_system::Config::BaseCallFilter).Complexity
O(C) where C is the number of calls to be batched.
This will return
Okin all circumstances. To determine the success of the batch, an event is deposited. If a call failed and the batch was interrupted, then theBatchInterruptedevent is deposited, along with the number of successful calls made and the error of the failed call. If all were successful, then theBatchCompletedevent is deposited.
batchAll(calls: Vec<Call>)
interface:
api.tx.utility.batchAllsummary: Send a batch of dispatch calls and atomically execute them. The whole transaction will rollback and fail if any of the calls failed.
May be called from any origin except
None.calls: The calls to be dispatched from the same origin. The number of call must not exceed the constant:batched_calls_limit(available in constant metadata).If origin is root then the calls are dispatched without checking origin filter. (This includes bypassing
frame_system::Config::BaseCallFilter).Complexity
O(C) where C is the number of calls to be batched.
dispatchAs(as_origin: AssetHubPolkadotRuntimeOriginCaller, call: Call)
interface:
api.tx.utility.dispatchAssummary: Dispatches a function call with a provided origin.
The dispatch origin for this call must be Root.
Complexity
- O(1).
dispatchAsFallible(as_origin: AssetHubPolkadotRuntimeOriginCaller, call: Call)
interface:
api.tx.utility.dispatchAsFalliblesummary: Dispatches a function call with a provided origin.
Almost the same as [
Pallet::dispatch_as] but forwards any error of the inner call.The dispatch origin for this call must be Root.
forceBatch(calls: Vec<Call>)
interface:
api.tx.utility.forceBatchsummary: Send a batch of dispatch calls. Unlike
batch, it allows errors and won't interrupt.May be called from any origin except
None.calls: The calls to be dispatched from the same origin. The number of call must not exceed the constant:batched_calls_limit(available in constant metadata).If origin is root then the calls are dispatch without checking origin filter. (This includes bypassing
frame_system::Config::BaseCallFilter).Complexity
O(C) where C is the number of calls to be batched.
ifElse(main: Call, fallback: Call)
interface:
api.tx.utility.ifElsesummary: Dispatch a fallback call in the event the main call fails to execute. May be called from any origin except
None.This function first attempts to dispatch the
maincall. If themaincall fails, thefallbackis attemted. if the fallback is successfully dispatched, the weights of both calls are accumulated and an event containing the main call error is deposited.In the event of a fallback failure the whole call fails with the weights returned.
main: The main call to be dispatched. This is the primary action to execute.fallback: The fallback call to be dispatched in case themaincall fails.Dispatch Logic
If the origin is
root, both the main and fallback calls are executed without applying any origin filters.If the origin is not
root, the origin filter is applied to both themainandfallbackcalls.Use Case
Some use cases might involve submitting a
batchtype call in either main, fallback or both.
withWeight(call: Call, weight: SpWeightsWeightV2Weight)
interface:
api.tx.utility.withWeightsummary: Dispatch a function call with a specified weight.
This function does not check the weight of the call, and instead allows the Root origin to specify the weight of the call.
The dispatch origin for this call must be Root.
vesting
forceRemoveVestingSchedule(target: MultiAddress, schedule_index: u32)
interface:
api.tx.vesting.forceRemoveVestingSchedulesummary: Force remove a vesting schedule
The dispatch origin for this call must be Root.
target: An account that has a vesting scheduleschedule_index: The vesting schedule index that should be removed
forceVestedTransfer(source: MultiAddress, target: MultiAddress, schedule: PalletVestingVestingInfo)
interface:
api.tx.vesting.forceVestedTransfersummary: Force a vested transfer.
The dispatch origin for this call must be Root.
source: The account whose funds should be transferred.target: The account that should be transferred the vested funds.schedule: The vesting schedule attached to the transfer.Emits
VestingCreated.NOTE: This will unlock all schedules through the current block.
Complexity
O(1).
mergeSchedules(schedule1_index: u32, schedule2_index: u32)
interface:
api.tx.vesting.mergeSchedulessummary: Merge two vesting schedules together, creating a new vesting schedule that unlocks over the highest possible start and end blocks. If both schedules have already started the current block will be used as the schedule start; with the caveat that if one schedule is finished by the current block, the other will be treated as the new merged schedule, unmodified.
NOTE: If
schedule1_index == schedule2_indexthis is a no-op. NOTE: This will unlock all schedules through the current block prior to merging. NOTE: If both schedules have ended by the current block, no new schedule will be created and both will be removed.Merged schedule attributes:
starting_block:MAX(schedule1.starting_block, scheduled2.starting_block, current_block).ending_block:MAX(schedule1.ending_block, schedule2.ending_block).locked:schedule1.locked_at(current_block) + schedule2.locked_at(current_block).The dispatch origin for this call must be Signed.
schedule1_index: index of the first schedule to merge.schedule2_index: index of the second schedule to merge.
vest()
interface:
api.tx.vesting.vestsummary: Unlock any vested funds of the sender account.
The dispatch origin for this call must be Signed and the sender must have funds still locked under this pallet.
Emits either
VestingCompletedorVestingUpdated.Complexity
O(1).
vestOther(target: MultiAddress)
interface:
api.tx.vesting.vestOthersummary: Unlock any vested funds of a
targetaccount.The dispatch origin for this call must be Signed.
target: The account whose vested funds should be unlocked. Must have funds still locked under this pallet.Emits either
VestingCompletedorVestingUpdated.Complexity
O(1).
vestedTransfer(target: MultiAddress, schedule: PalletVestingVestingInfo)
interface:
api.tx.vesting.vestedTransfersummary: Create a vested transfer.
The dispatch origin for this call must be Signed.
target: The account receiving the vested funds.schedule: The vesting schedule attached to the transfer.Emits
VestingCreated.NOTE: This will unlock all schedules through the current block.
Complexity
O(1).
xcmpQueue
resumeXcmExecution()
interface:
api.tx.xcmpQueue.resumeXcmExecutionsummary: Resumes all XCM executions for the XCMP queue.
Note that this function doesn't change the status of the in/out bound channels.
origin: Must passControllerOrigin.
suspendXcmExecution()
interface:
api.tx.xcmpQueue.suspendXcmExecutionsummary: Suspends all XCM executions for the XCMP queue, regardless of the sender's origin.
origin: Must passControllerOrigin.
updateDropThreshold(new: u32)
interface:
api.tx.xcmpQueue.updateDropThresholdsummary: Overwrites the number of pages which must be in the queue after which we drop any further messages from the channel.
origin: Must passRoot.new: Desired value forQueueConfigData.drop_threshold
updateResumeThreshold(new: u32)
interface:
api.tx.xcmpQueue.updateResumeThresholdsummary: Overwrites the number of pages which the queue must be reduced to before it signals that message sending may recommence after it has been suspended.
origin: Must passRoot.new: Desired value forQueueConfigData.resume_threshold
updateSuspendThreshold(new: u32)
interface:
api.tx.xcmpQueue.updateSuspendThresholdsummary: Overwrites the number of pages which must be in the queue for the other side to be told to suspend their sending.
origin: Must passRoot.new: Desired value forQueueConfigData.suspend_value