@polkadot/api-augment
Version:
API generated augmentation
917 lines (916 loc) • 550 kB
TypeScript
import '@polkadot/api-base/types/submittable';
import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H160, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, FrameSupportTokensFungibleUnionOfNativeOrWithId, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeRuntimeParameters, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletBalancesAdjustmentDirection, PalletBrokerConfigRecord, PalletBrokerCoreMask, PalletBrokerFinality, PalletBrokerOnDemandRevenueRecord, PalletBrokerRegionId, PalletBrokerScheduleItem, PalletContractsWasmDeterminism, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletCoreFellowshipParamsTypeOption, PalletCoreFellowshipParamsTypeU128, PalletCoreFellowshipWish, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityJudgement, PalletIdentityLegacyIdentityInfo, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMetaTxMetaTx, PalletMigrationsHistoricCleanupSelector, PalletMigrationsMigrationCursor, PalletMixnetRegistration, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyForkVotingProofAncestryProof, SpConsensusBeefyFutureBlockVotingProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpMixnetAppSignature, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
export type __SubmittableExtrinsicFunction<ApiType extends ApiTypes> = SubmittableExtrinsicFunction<ApiType>;
declare module '@polkadot/api-base/types/submittable' {
interface AugmentedSubmittables<ApiType extends ApiTypes> {
alliance: {
/**
* Abdicate one's position as a voting member and just be an Ally. May be used by Fellows
* who do not want to leave the Alliance but do not have the capacity to participate
* operationally for some time.
**/
abdicateFellowStatus: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* Add accounts or websites to the list of unscrupulous items.
**/
addUnscrupulousItems: AugmentedSubmittable<(items: Vec<PalletAllianceUnscrupulousItem> | (PalletAllianceUnscrupulousItem | {
AccountId: any;
} | {
Website: any;
} | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<PalletAllianceUnscrupulousItem>]>;
/**
* Make an announcement of a new IPFS CID about alliance issues.
**/
announce: AugmentedSubmittable<(announcement: PalletAllianceCid | {
version?: any;
codec?: any;
hash_?: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAllianceCid]>;
/**
* Close a vote that is either approved, disapproved, or whose voting period has ended.
*
* Must be called by a Fellow.
**/
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: SpWeightsWeightV2Weight | {
refTime?: any;
proofSize?: any;
} | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, SpWeightsWeightV2Weight, Compact<u32>]>;
/**
* Disband the Alliance, remove all active members and unreserve deposits.
*
* Witness data must be set.
**/
disband: AugmentedSubmittable<(witness: PalletAllianceDisbandWitness | {
fellowMembers?: any;
allyMembers?: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAllianceDisbandWitness]>;
/**
* Elevate an Ally to Fellow.
**/
elevateAlly: AugmentedSubmittable<(ally: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* As a member, give a retirement notice and start a retirement period required to pass in
* order to retire.
**/
giveRetirementNotice: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* Initialize the Alliance, onboard fellows and allies.
*
* The Alliance must be empty, and the call must provide some founding members.
*
* Must be called by the Root origin.
**/
initMembers: AugmentedSubmittable<(fellows: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], allies: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Vec<AccountId32>]>;
/**
* Submit oneself for candidacy. A fixed deposit is reserved.
**/
joinAlliance: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* Kick a member from the Alliance and slash its deposit.
**/
kickMember: AugmentedSubmittable<(who: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* A Fellow can nominate someone to join the alliance as an Ally. There is no deposit
* required from the nominator or nominee.
**/
nominateAlly: AugmentedSubmittable<(who: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Add a new proposal to be voted on.
*
* Must be called by a Fellow.
**/
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
/**
* Remove an announcement.
**/
removeAnnouncement: AugmentedSubmittable<(announcement: PalletAllianceCid | {
version?: any;
codec?: any;
hash_?: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAllianceCid]>;
/**
* Deem some items no longer unscrupulous.
**/
removeUnscrupulousItems: AugmentedSubmittable<(items: Vec<PalletAllianceUnscrupulousItem> | (PalletAllianceUnscrupulousItem | {
AccountId: any;
} | {
Website: any;
} | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<PalletAllianceUnscrupulousItem>]>;
/**
* As a member, retire from the Alliance and unreserve the deposit.
*
* This can only be done once you have called `give_retirement_notice` and the
* `RetirementPeriod` has passed.
**/
retire: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* Set a new IPFS CID to the alliance rule.
**/
setRule: AugmentedSubmittable<(rule: PalletAllianceCid | {
version?: any;
codec?: any;
hash_?: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAllianceCid]>;
/**
* Add an aye or nay vote for the sender to the given proposal.
*
* Must be called by a Fellow.
**/
vote: AugmentedSubmittable<(proposal: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, bool]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
allianceMotion: {
/**
* Close a vote that is either approved, disapproved or whose voting period has ended.
*
* May be called by any signed account in order to finish voting and close the proposal.
*
* If called before the end of the voting period it will only close the vote if it is
* has enough votes to be approved or disapproved.
*
* If called after the end of the voting period abstentions are counted as rejections
* unless there is a prime member set and the prime member cast an approval.
*
* If the close operation completes successfully with disapproval, the transaction fee will
* be waived. Otherwise execution of the approved operation will be charged to the caller.
*
* + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed
* proposal.
* + `length_bound`: The upper bound for the length of the proposal in storage. Checked via
* `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.
*
* ## Complexity
* - `O(B + M + P1 + P2)` where:
* - `B` is `proposal` size in bytes (length-fee-bounded)
* - `M` is members-count (code- and governance-bounded)
* - `P1` is the complexity of `proposal` preimage.
* - `P2` is proposal-count (code-bounded)
**/
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: SpWeightsWeightV2Weight | {
refTime?: any;
proofSize?: any;
} | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, SpWeightsWeightV2Weight, Compact<u32>]>;
/**
* Disapprove a proposal, close, and remove it from the system, regardless of its current
* state.
*
* Must be called by the Root origin.
*
* Parameters:
* * `proposal_hash`: The hash of the proposal that should be disapproved.
*
* ## Complexity
* O(P) where P is the number of max proposals
**/
disapproveProposal: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* Dispatch a proposal from a member using the `Member` origin.
*
* Origin must be a member of the collective.
*
* ## Complexity:
* - `O(B + M + P)` where:
* - `B` is `proposal` size in bytes (length-fee-bounded)
* - `M` members-count (code-bounded)
* - `P` complexity of dispatching `proposal`
**/
execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
/**
* Disapprove the proposal and burn the cost held for storing this proposal.
*
* Parameters:
* - `origin`: must be the `KillOrigin`.
* - `proposal_hash`: The hash of the proposal that should be killed.
*
* Emits `Killed` and `ProposalCostBurned` if any cost was held for a given proposal.
**/
kill: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* Add a new proposal to either be voted on or executed directly.
*
* Requires the sender to be member.
*
* `threshold` determines whether `proposal` is executed directly (`threshold < 2`)
* or put up for voting.
*
* ## Complexity
* - `O(B + M + P1)` or `O(B + M + P2)` where:
* - `B` is `proposal` size in bytes (length-fee-bounded)
* - `M` is members-count (code- and governance-bounded)
* - branching is influenced by `threshold` where:
* - `P1` is proposal execution complexity (`threshold < 2`)
* - `P2` is proposals-count (code-bounded) (`threshold >= 2`)
**/
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
/**
* Release the cost held for storing a proposal once the given proposal is completed.
*
* If there is no associated cost for the given proposal, this call will have no effect.
*
* Parameters:
* - `origin`: must be `Signed` or `Root`.
* - `proposal_hash`: The hash of the proposal.
*
* Emits `ProposalCostReleased` if any cost held for a given proposal.
**/
releaseProposalCost: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* Set the collective's membership.
*
* - `new_members`: The new member list. Be nice to the chain and provide it sorted.
* - `prime`: The prime member whose vote sets the default.
* - `old_count`: The upper bound for the previous number of members in storage. Used for
* weight estimation.
*
* The dispatch of this call must be `SetMembersOrigin`.
*
* NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but
* the weight estimations rely on it to estimate dispatchable weight.
*
* # WARNING:
*
* The `pallet-collective` can also be managed by logic outside of the pallet through the
* implementation of the trait [`ChangeMembers`].
* Any call to `set_members` must be careful that the member set doesn't get out of sync
* with other logic managing the member set.
*
* ## Complexity:
* - `O(MP + N)` where:
* - `M` old-members-count (code- and governance-bounded)
* - `N` new-members-count (code- and governance-bounded)
* - `P` proposals-count (code-bounded)
**/
setMembers: AugmentedSubmittable<(newMembers: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], prime: Option<AccountId32> | null | Uint8Array | AccountId32 | string, oldCount: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Option<AccountId32>, u32]>;
/**
* Add an aye or nay vote for the sender to the given proposal.
*
* Requires the sender to be a member.
*
* Transaction fees will be waived if the member is voting on any particular proposal
* for the first time and the call is successful. Subsequent vote changes will charge a
* fee.
* ## Complexity
* - `O(M)` where `M` is members-count (code- and governance-bounded)
**/
vote: AugmentedSubmittable<(proposal: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, bool]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
assetConversion: {
/**
* Provide liquidity into the pool of `asset1` and `asset2`.
* NOTE: an optimal amount of asset1 and asset2 will be calculated and
* might be different than the provided `amount1_desired`/`amount2_desired`
* thus you should provide the min amount you're happy to provide.
* Params `amount1_min`/`amount2_min` represent that.
* `mint_to` will be sent the liquidity tokens that represent this share of the pool.
*
* 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`].
**/
addLiquidity: AugmentedSubmittable<(asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, amount1Desired: u128 | AnyNumber | Uint8Array, amount2Desired: u128 | AnyNumber | Uint8Array, amount1Min: u128 | AnyNumber | Uint8Array, amount2Min: u128 | AnyNumber | Uint8Array, mintTo: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensFungibleUnionOfNativeOrWithId, u128, u128, u128, u128, AccountId32]>;
/**
* Creates an empty liquidity pool and an associated new `lp_token` asset
* (the id of which is returned in the `Event::PoolCreated` event).
*
* Once a pool is created, someone may [`Pallet::add_liquidity`] to it.
**/
createPool: AugmentedSubmittable<(asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensFungibleUnionOfNativeOrWithId]>;
/**
* Allows you to remove liquidity by providing the `lp_token_burn` tokens that will be
* burned in the process. With the usage of `amount1_min_receive`/`amount2_min_receive`
* it's possible to control the min amount of returned tokens you're happy with.
**/
removeLiquidity: AugmentedSubmittable<(asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, lpTokenBurn: u128 | AnyNumber | Uint8Array, amount1MinReceive: u128 | AnyNumber | Uint8Array, amount2MinReceive: u128 | AnyNumber | Uint8Array, withdrawTo: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensFungibleUnionOfNativeOrWithId, u128, u128, u128, AccountId32]>;
/**
* Swap the exact amount of `asset1` into `asset2`.
* `amount_out_min` param allows you to specify the min amount of the `asset2`
* you're happy to receive.
*
* [`AssetConversionApi::quote_price_exact_tokens_for_tokens`] runtime call can be called
* for a quote.
**/
swapExactTokensForTokens: AugmentedSubmittable<(path: Vec<FrameSupportTokensFungibleUnionOfNativeOrWithId> | (FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array)[], amountIn: u128 | AnyNumber | Uint8Array, amountOutMin: u128 | AnyNumber | Uint8Array, sendTo: AccountId32 | string | Uint8Array, keepAlive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<FrameSupportTokensFungibleUnionOfNativeOrWithId>, u128, u128, AccountId32, bool]>;
/**
* Swap any amount of `asset1` to get the exact amount of `asset2`.
* `amount_in_max` param allows to specify the max amount of the `asset1`
* you're happy to provide.
*
* [`AssetConversionApi::quote_price_tokens_for_exact_tokens`] runtime call can be called
* for a quote.
**/
swapTokensForExactTokens: AugmentedSubmittable<(path: Vec<FrameSupportTokensFungibleUnionOfNativeOrWithId> | (FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array)[], amountOut: u128 | AnyNumber | Uint8Array, amountInMax: u128 | AnyNumber | Uint8Array, sendTo: AccountId32 | string | Uint8Array, keepAlive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<FrameSupportTokensFungibleUnionOfNativeOrWithId>, u128, u128, AccountId32, bool]>;
/**
* 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 `Touched` event when successful.
**/
touch: AugmentedSubmittable<(asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensFungibleUnionOfNativeOrWithId]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
assetConversionMigration: {
/**
* Migrates an existing pool to a new account ID derivation method for a given asset pair.
* If the migration is successful, transaction fees are refunded to the caller.
*
* Must be signed.
**/
migrateToNewAccount: AugmentedSubmittable<(asset1: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, asset2: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensFungibleUnionOfNativeOrWithId]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
assetRate: {
/**
* Initialize a conversion rate to native balance for the given asset.
*
* ## Complexity
* - O(1)
**/
create: AugmentedSubmittable<(assetKind: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, rate: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportTokensFungibleUnionOfNativeOrWithId, u128]>;
/**
* Remove an existing conversion rate to native balance for the given asset.
*
* ## Complexity
* - O(1)
**/
remove: AugmentedSubmittable<(assetKind: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportTokensFungibleUnionOfNativeOrWithId]>;
/**
* Update the conversion rate to native balance for the given asset.
*
* ## Complexity
* - O(1)
**/
update: AugmentedSubmittable<(assetKind: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, rate: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportTokensFungibleUnionOfNativeOrWithId, u128]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
assetRewards: {
/**
* Cleanup a pool.
*
* Origin must be the pool admin.
*
* Cleanup storage, release any associated storage cost and return the remaining reward
* tokens to the admin.
**/
cleanupPool: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Create a new reward pool.
*
* Parameters:
* - `origin`: must be `Config::CreatePoolOrigin`;
* - `staked_asset_id`: the asset to be staked in the pool;
* - `reward_asset_id`: the asset to be distributed as rewards;
* - `reward_rate_per_block`: the amount of reward tokens distributed per block;
* - `expiry`: the block number at which the pool will cease to accumulate rewards. The
* [`DispatchTime::After`] variant evaluated at the execution time.
* - `admin`: the account allowed to extend the pool expiration, increase the rewards rate
* and receive the unutilized reward tokens back after the pool completion. If `None`,
* the caller is set as an admin.
**/
createPool: AugmentedSubmittable<(stakedAssetId: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, rewardAssetId: FrameSupportTokensFungibleUnionOfNativeOrWithId | {
Native: any;
} | {
WithId: any;
} | string | Uint8Array, rewardRatePerBlock: u128 | AnyNumber | Uint8Array, expiry: FrameSupportScheduleDispatchTime | {
At: any;
} | {
After: any;
} | string | Uint8Array, admin: Option<AccountId32> | null | Uint8Array | AccountId32 | string) => SubmittableExtrinsic<ApiType>, [FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSupportTokensFungibleUnionOfNativeOrWithId, u128, FrameSupportScheduleDispatchTime, Option<AccountId32>]>;
/**
* Convenience method to deposit reward tokens into a pool.
*
* This method is not strictly necessary (tokens could be transferred directly to the
* pool pot address), but is provided for convenience so manual derivation of the
* account id is not required.
**/
depositRewardTokens: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u128]>;
/**
* Harvest unclaimed pool rewards.
*
* Parameters:
* - origin: must be the `staker` if the pool is still active. Otherwise, any account.
* - pool_id: the pool to harvest from.
* - staker: the account for which to harvest rewards. If `None`, the caller is used.
**/
harvestRewards: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, staker: Option<AccountId32> | null | Uint8Array | AccountId32 | string) => SubmittableExtrinsic<ApiType>, [u32, Option<AccountId32>]>;
/**
* Modify a pool admin.
*
* Only the pool admin may perform this operation.
**/
setPoolAdmin: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newAdmin: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, AccountId32]>;
/**
* Set when the pool should expire.
*
* Currently the expiry block can only be extended.
*
* Only the pool admin may perform this operation.
**/
setPoolExpiryBlock: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newExpiry: FrameSupportScheduleDispatchTime | {
At: any;
} | {
After: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, FrameSupportScheduleDispatchTime]>;
/**
* Modify a pool reward rate.
*
* Currently the reward rate can only be increased.
*
* Only the pool admin may perform this operation.
**/
setPoolRewardRatePerBlock: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newRewardRatePerBlock: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u128]>;
/**
* Stake additional tokens in a pool.
*
* A freeze is placed on the staked tokens.
**/
stake: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u128]>;
/**
* Unstake tokens from a pool.
*
* Removes the freeze on the staked tokens.
*
* Parameters:
* - origin: must be the `staker` if the pool is still active. Otherwise, any account.
* - pool_id: the pool to unstake from.
* - amount: the amount of tokens to unstake.
* - staker: the account to unstake from. If `None`, the caller is used.
**/
unstake: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array, staker: Option<AccountId32> | null | Uint8Array | AccountId32 | string) => SubmittableExtrinsic<ApiType>, [u32, u128, Option<AccountId32>]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
assets: {
/**
* Approve an amount of asset for transfer by a delegated third-party account.
*
* Origin must be Signed.
*
* Ensures that `ApprovalDeposit` worth of `Currency` is reserved from signing account
* for the purpose of holding the approval. If some non-zero amount of assets is already
* approved from signing account to `delegate`, then it is topped up or unreserved to
* meet the right value.
*
* NOTE: The signing account does not need to own `amount` of assets at the point of
* making this call.
*
* - `id`: The identifier of the asset.
* - `delegate`: The account to delegate permission to transfer asset.
* - `amount`: The amount of asset that may be transferred by `delegate`. If there is
* already an approval in place, then this acts additively.
*
* Emits `ApprovedTransfer` on success.
*
* Weight: `O(1)`
**/
approveTransfer: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, delegate: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array, amount: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, Compact<u128>]>;
/**
* Disallow further unprivileged transfers of an asset `id` to and from an account `who`.
*
* Origin must be Signed and the sender should be the Freezer of the asset `id`.
*
* - `id`: The identifier of the account's asset.
* - `who`: The account to be unblocked.
*
* Emits `Blocked`.
*
* Weight: `O(1)`
**/
block: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, who: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress]>;
/**
* Reduce the balance of `who` by as much as possible up to `amount` assets of `id`.
*
* Origin must be Signed and the sender should be the Manager of the asset `id`.
*
* Bails with `NoAccount` if the `who` is already dead.
*
* - `id`: The identifier of the asset to have some amount burned.
* - `who`: The account to be debited from.
* - `amount`: The maximum amount by which `who`'s balance should be reduced.
*
* Emits `Burned` with the actual amount burned. If this takes the balance to below the
* minimum for the asset, then the amount burned is increased to take it to zero.
*
* Weight: `O(1)`
* Modes: Post-existence of `who`; Pre & post Zombie-status of `who`.
**/
burn: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, who: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array, amount: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, Compact<u128>]>;
/**
* Cancel all of some asset approved for delegated transfer by a third-party account.
*
* Origin must be Signed and there must be an approval in place between signer and
* `delegate`.
*
* Unreserves any deposit previously reserved by `approve_transfer` for the approval.
*
* - `id`: The identifier of the asset.
* - `delegate`: The account delegated permission to transfer asset.
*
* Emits `ApprovalCancelled` on success.
*
* Weight: `O(1)`
**/
cancelApproval: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, delegate: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress]>;
/**
* 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)`
**/
clearMetadata: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Issue a new class of fungible assets from a public origin.
*
* This new asset class has no assets initially and its owner is the origin.
*
* The origin must conform to the configured `CreateOrigin` and have sufficient funds free.
*
* Funds of sender are reserved by `AssetDeposit`.
*
* Parameters:
* - `id`: The identifier of the new asset. This must not be currently in use to identify
* an existing asset. If [`NextAssetId`] is set, then this must be equal to it.
* - `admin`: The admin of this class of assets. The admin is the initial address of each
* member of the asset class's admin team.
* - `min_balance`: The minimum balance of this new asset that any single account must
* have. If an account's balance is reduced below this, then it collapses to zero.
*
* Emits `Created` event when successful.
*
* Weight: `O(1)`
**/
create: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, admin: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array, minBalance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, u128]>;
/**
* Destroy all accounts associated with a given asset.
*
* `destroy_accounts` should only be called after `start_destroy` has been called, and the
* asset is in a `Destroying` state.
*
* Due to weight restrictions, this function may need to be called multiple times to fully
* destroy all accounts. It will destroy `RemoveItemsLimit` accounts at a time.
*
* - `id`: The identifier of the asset to be destroyed. This must identify an existing
* asset.
*
* Each call emits the `Event::DestroyedAccounts` event.
**/
destroyAccounts: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Destroy all approvals associated with a given asset up to the max (T::RemoveItemsLimit).
*
* `destroy_approvals` should only be called after `start_destroy` has been called, and the
* asset is in a `Destroying` state.
*
* Due to weight restrictions, this function may need to be called multiple times to fully
* destroy all approvals. It will destroy `RemoveItemsLimit` approvals at a time.
*
* - `id`: The identifier of the asset to be destroyed. This must identify an existing
* asset.
*
* Each call emits the `Event::DestroyedApprovals` event.
**/
destroyApprovals: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Complete destroying asset and unreserve currency.
*
* `finish_destroy` should only be called after `start_destroy` has been called, and the
* asset is in a `Destroying` state. All accounts or approvals should be destroyed before
* hand.
*
* - `id`: The identifier of the asset to be destroyed. This must identify an existing
* asset.
*
* Each successful call emits the `Event::Destroyed` event.
**/
finishDestroy: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Alter the attributes of a given asset.
*
* Origin must be `ForceOrigin`.
*
* - `id`: The identifier of the asset.
* - `owner`: The new Owner of this asset.
* - `issuer`: The new Issuer of this asset.
* - `admin`: The new Admin of this asset.
* - `freezer`: The new Freezer of this asset.
* - `min_balance`: The minimum balance of this new asset that any single account must
* have. If an account's balance is reduced below this, then it collapses to zero.
* - `is_sufficient`: Whether a non-zero balance of this asset is deposit of sufficient
* value to account for the state bloat associated with its balance storage. If set to
* `true`, then non-zero balances may be stored without a `consumer` reference (and thus
* an ED in the Balances pallet or whatever else is used to control user-account state
* growth).
* - `is_frozen`: Whether this asset class is frozen except for permissioned/admin
* instructions.
*
* Emits `AssetStatusChanged` with the identity of the asset.
*
* Weight: `O(1)`
**/
forceAssetStatus: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array, issuer: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array, admin: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array, freezer: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array, minBalance: Compact<u128> | AnyNumber | Uint8Array, isSufficient: bool | boolean | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, MultiAddress, MultiAddress, MultiAddress, Compact<u128>, bool, bool]>;
/**
* Cancel all of some asset approved for delegated transfer by a third-party account.
*
* Origin must be either ForceOrigin or Signed origin with the signer being the Admin
* account of the asset `id`.
*
* Unreserves any deposit previously reserved by `approve_transfer` for the approval.
*
* - `id`: The identifier of the asset.
* - `delegate`: The account delegated permission to transfer asset.
*
* Emits `ApprovalCancelled` on success.
*
* Weight: `O(1)`
**/
forceCancelApproval: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array, delegate: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {
Address20: any;
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, MultiAddress]>;
/**
* 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)`
**/
forceClearMetadata: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Issue a new class of fungible assets from a privileged origin.
*
* This new asset class has no assets initially.
*
* The origin must conform to `ForceOrigin`.
*
* Unlike `create`, no funds are reserved.
*
* - `id`: The identifier of the new asset. This must not be currently in use to identify
* an existing asset. If [`NextAssetId`] is set, then this must be equal to it.
* - `owner`: The owner of this class of assets. The owner has full superuser permissions
* over this asset, but may later change and configure the permissions using
* `transfer_ownership` and `set_team`.
* - `min_balance`: The minimum balance of this new asset that any single account must
* have. If an account's balance is reduced below this, then it collapses to zero.
*
* Emits `ForceCreated` event when successful.
*
* Weight: `O(1)`
**/
forceCreate: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | {
Id: any;
} | {
Index: any;
} | {
Raw: any;
} | {
Address32: any;
} | {