@dedot/api 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chaintypes/substrate/consts.d.ts +81 -11
- package/chaintypes/substrate/errors.d.ts +230 -2
- package/chaintypes/substrate/events.d.ts +335 -85
- package/chaintypes/substrate/query.d.ts +132 -19
- package/chaintypes/substrate/runtime.d.ts +92 -11
- package/chaintypes/substrate/tx.d.ts +559 -27
- package/chaintypes/substrate/types.d.ts +1752 -258
- package/cjs/extrinsic/submittable/BaseSubmittableExtrinsic.js +28 -3
- package/cjs/extrinsic/submittable/SubmittableExtrinsic.js +30 -22
- package/cjs/extrinsic/submittable/SubmittableExtrinsicV2.js +31 -22
- package/cjs/extrinsic/submittable/errors.js +10 -1
- package/cjs/extrinsic/submittable/utils.js +39 -1
- package/extrinsic/submittable/BaseSubmittableExtrinsic.d.ts +7 -7
- package/extrinsic/submittable/BaseSubmittableExtrinsic.js +29 -4
- package/extrinsic/submittable/SubmittableExtrinsic.d.ts +4 -4
- package/extrinsic/submittable/SubmittableExtrinsic.js +31 -23
- package/extrinsic/submittable/SubmittableExtrinsicV2.d.ts +3 -4
- package/extrinsic/submittable/SubmittableExtrinsicV2.js +32 -23
- package/extrinsic/submittable/errors.d.ts +6 -0
- package/extrinsic/submittable/errors.js +8 -0
- package/extrinsic/submittable/utils.d.ts +8 -2
- package/extrinsic/submittable/utils.js +38 -1
- package/package.json +9 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AccountId32Like, BytesLike, Data, Extrinsic, FixedBytes, FixedU128, FixedU64, H160, H256, MultiAddressLike, Perbill, Percent, Perquintill } from '@dedot/codecs';
|
|
2
2
|
import type { GenericChainTx, GenericTxCall, IRuntimeTxCall, ISubmittableExtrinsic, ISubmittableExtrinsicLegacy, ISubmittableResult, RpcV2, RpcVersion } from '@dedot/types';
|
|
3
|
-
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSystemEventRecord, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeRuntimeCallLike, KitchensinkRuntimeRuntimeParameters, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletBalancesAdjustmentDirection, PalletBrokerConfigRecord, PalletBrokerCoreMask, PalletBrokerFinality, PalletBrokerOnDemandRevenueRecord, PalletBrokerRegionId, PalletBrokerScheduleItem, PalletContractsWasmDeterminism, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletCoreFellowshipParamsType, PalletCoreFellowshipParamsTypeOption, PalletCoreFellowshipWish, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityJudgement, PalletIdentityLegacyIdentityInfo, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMigrationsHistoricCleanupSelector, PalletMigrationsMigrationCursor, PalletMixnetRegistration, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsBitFlags, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsConfigOp, PalletNominationPoolsConfigOp004, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOp, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyForkVotingProof, SpConsensusBeefyFutureBlockVotingProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpMixnetAppSignature, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from './types.js';
|
|
3
|
+
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, FrameSupportTokensFungibleUnionOfNativeOrWithId, FrameSystemEventRecord, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeRuntimeCallLike, KitchensinkRuntimeRuntimeParameters, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletBalancesAdjustmentDirection, PalletBrokerConfigRecord, PalletBrokerCoreMask, PalletBrokerFinality, PalletBrokerOnDemandRevenueRecord, PalletBrokerRegionId, PalletBrokerScheduleItem, PalletContractsWasmDeterminism, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletCoreFellowshipParamsType, PalletCoreFellowshipParamsTypeOption, PalletCoreFellowshipWish, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityJudgement, PalletIdentityLegacyIdentityInfo, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMetaTxMetaTx, PalletMigrationsHistoricCleanupSelector, PalletMigrationsMigrationCursor, PalletMixnetRegistration, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsBitFlags, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsCommissionClaimPermission, PalletNominationPoolsConfigOp, PalletNominationPoolsConfigOp004, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOp, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingUnlockChunk, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyDoubleVotingProof, SpConsensusBeefyForkVotingProof, SpConsensusBeefyFutureBlockVotingProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpMixnetAppSignature, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from './types.js';
|
|
4
4
|
export type ChainSubmittableExtrinsic<Rv extends RpcVersion, T extends IRuntimeTxCall = KitchensinkRuntimeRuntimeCallLike> = Extrinsic<MultiAddressLike, T, SpRuntimeMultiSignature, any[]> & (Rv extends RpcV2 ? ISubmittableExtrinsic<ISubmittableResult<FrameSystemEventRecord>> : ISubmittableExtrinsicLegacy<ISubmittableResult<FrameSystemEventRecord>>);
|
|
5
5
|
export type TxCall<Rv extends RpcVersion> = (...args: any[]) => ChainSubmittableExtrinsic<Rv>;
|
|
6
6
|
export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCall<Rv>> {
|
|
@@ -352,6 +352,64 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
352
352
|
};
|
|
353
353
|
};
|
|
354
354
|
}>>;
|
|
355
|
+
/**
|
|
356
|
+
* Dispatch a fallback call in the event the main call fails to execute.
|
|
357
|
+
* May be called from any origin except `None`.
|
|
358
|
+
*
|
|
359
|
+
* This function first attempts to dispatch the `main` call.
|
|
360
|
+
* If the `main` call fails, the `fallback` is attemted.
|
|
361
|
+
* if the fallback is successfully dispatched, the weights of both calls
|
|
362
|
+
* are accumulated and an event containing the main call error is deposited.
|
|
363
|
+
*
|
|
364
|
+
* In the event of a fallback failure the whole call fails
|
|
365
|
+
* with the weights returned.
|
|
366
|
+
*
|
|
367
|
+
* - `main`: The main call to be dispatched. This is the primary action to execute.
|
|
368
|
+
* - `fallback`: The fallback call to be dispatched in case the `main` call fails.
|
|
369
|
+
*
|
|
370
|
+
* ## Dispatch Logic
|
|
371
|
+
* - If the origin is `root`, both the main and fallback calls are executed without
|
|
372
|
+
* applying any origin filters.
|
|
373
|
+
* - If the origin is not `root`, the origin filter is applied to both the `main` and
|
|
374
|
+
* `fallback` calls.
|
|
375
|
+
*
|
|
376
|
+
* ## Use Case
|
|
377
|
+
* - Some use cases might involve submitting a `batch` type call in either main, fallback
|
|
378
|
+
* or both.
|
|
379
|
+
*
|
|
380
|
+
* @param {KitchensinkRuntimeRuntimeCallLike} main
|
|
381
|
+
* @param {KitchensinkRuntimeRuntimeCallLike} fallback
|
|
382
|
+
**/
|
|
383
|
+
ifElse: GenericTxCall<Rv, (main: KitchensinkRuntimeRuntimeCallLike, fallback: KitchensinkRuntimeRuntimeCallLike) => ChainSubmittableExtrinsic<Rv, {
|
|
384
|
+
pallet: 'Utility';
|
|
385
|
+
palletCall: {
|
|
386
|
+
name: 'IfElse';
|
|
387
|
+
params: {
|
|
388
|
+
main: KitchensinkRuntimeRuntimeCallLike;
|
|
389
|
+
fallback: KitchensinkRuntimeRuntimeCallLike;
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
}>>;
|
|
393
|
+
/**
|
|
394
|
+
* Dispatches a function call with a provided origin.
|
|
395
|
+
*
|
|
396
|
+
* Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call.
|
|
397
|
+
*
|
|
398
|
+
* The dispatch origin for this call must be _Root_.
|
|
399
|
+
*
|
|
400
|
+
* @param {KitchensinkRuntimeOriginCaller} asOrigin
|
|
401
|
+
* @param {KitchensinkRuntimeRuntimeCallLike} call
|
|
402
|
+
**/
|
|
403
|
+
dispatchAsFallible: GenericTxCall<Rv, (asOrigin: KitchensinkRuntimeOriginCaller, call: KitchensinkRuntimeRuntimeCallLike) => ChainSubmittableExtrinsic<Rv, {
|
|
404
|
+
pallet: 'Utility';
|
|
405
|
+
palletCall: {
|
|
406
|
+
name: 'DispatchAsFallible';
|
|
407
|
+
params: {
|
|
408
|
+
asOrigin: KitchensinkRuntimeOriginCaller;
|
|
409
|
+
call: KitchensinkRuntimeRuntimeCallLike;
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
}>>;
|
|
355
413
|
/**
|
|
356
414
|
* Generic pallet tx call
|
|
357
415
|
**/
|
|
@@ -602,6 +660,29 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
602
660
|
};
|
|
603
661
|
};
|
|
604
662
|
}>>;
|
|
663
|
+
/**
|
|
664
|
+
* Poke the deposit reserved for an index.
|
|
665
|
+
*
|
|
666
|
+
* The dispatch origin for this call must be _Signed_ and the signing account must have a
|
|
667
|
+
* non-frozen account `index`.
|
|
668
|
+
*
|
|
669
|
+
* The transaction fees is waived if the deposit is changed after poking/reconsideration.
|
|
670
|
+
*
|
|
671
|
+
* - `index`: the index whose deposit is to be poked/reconsidered.
|
|
672
|
+
*
|
|
673
|
+
* Emits `DepositPoked` if successful.
|
|
674
|
+
*
|
|
675
|
+
* @param {number} index
|
|
676
|
+
**/
|
|
677
|
+
pokeDeposit: GenericTxCall<Rv, (index: number) => ChainSubmittableExtrinsic<Rv, {
|
|
678
|
+
pallet: 'Indices';
|
|
679
|
+
palletCall: {
|
|
680
|
+
name: 'PokeDeposit';
|
|
681
|
+
params: {
|
|
682
|
+
index: number;
|
|
683
|
+
};
|
|
684
|
+
};
|
|
685
|
+
}>>;
|
|
605
686
|
/**
|
|
606
687
|
* Generic pallet tx call
|
|
607
688
|
**/
|
|
@@ -1666,6 +1747,64 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
1666
1747
|
};
|
|
1667
1748
|
};
|
|
1668
1749
|
}>>;
|
|
1750
|
+
/**
|
|
1751
|
+
* Removes the legacy Staking locks if they exist.
|
|
1752
|
+
*
|
|
1753
|
+
* This removes the legacy lock on the stake with [`Config::OldCurrency`] and creates a
|
|
1754
|
+
* hold on it if needed. If all stake cannot be held, the best effort is made to hold as
|
|
1755
|
+
* much as possible. The remaining stake is forced withdrawn from the ledger.
|
|
1756
|
+
*
|
|
1757
|
+
* The fee is waived if the migration is successful.
|
|
1758
|
+
*
|
|
1759
|
+
* @param {AccountId32Like} stash
|
|
1760
|
+
**/
|
|
1761
|
+
migrateCurrency: GenericTxCall<Rv, (stash: AccountId32Like) => ChainSubmittableExtrinsic<Rv, {
|
|
1762
|
+
pallet: 'Staking';
|
|
1763
|
+
palletCall: {
|
|
1764
|
+
name: 'MigrateCurrency';
|
|
1765
|
+
params: {
|
|
1766
|
+
stash: AccountId32Like;
|
|
1767
|
+
};
|
|
1768
|
+
};
|
|
1769
|
+
}>>;
|
|
1770
|
+
/**
|
|
1771
|
+
* This function allows governance to manually slash a validator and is a
|
|
1772
|
+
* **fallback mechanism**.
|
|
1773
|
+
*
|
|
1774
|
+
* The dispatch origin must be `T::AdminOrigin`.
|
|
1775
|
+
*
|
|
1776
|
+
* ## Parameters
|
|
1777
|
+
* - `validator_stash` - The stash account of the validator to slash.
|
|
1778
|
+
* - `era` - The era in which the validator was in the active set.
|
|
1779
|
+
* - `slash_fraction` - The percentage of the stake to slash, expressed as a Perbill.
|
|
1780
|
+
*
|
|
1781
|
+
* ## Behavior
|
|
1782
|
+
*
|
|
1783
|
+
* The slash will be applied using the standard slashing mechanics, respecting the
|
|
1784
|
+
* configured `SlashDeferDuration`.
|
|
1785
|
+
*
|
|
1786
|
+
* This means:
|
|
1787
|
+
* - If the validator was already slashed by a higher percentage for the same era, this
|
|
1788
|
+
* slash will have no additional effect.
|
|
1789
|
+
* - If the validator was previously slashed by a lower percentage, only the difference
|
|
1790
|
+
* will be applied.
|
|
1791
|
+
* - The slash will be deferred by `SlashDeferDuration` eras before being enacted.
|
|
1792
|
+
*
|
|
1793
|
+
* @param {AccountId32Like} validatorStash
|
|
1794
|
+
* @param {number} era
|
|
1795
|
+
* @param {Perbill} slashFraction
|
|
1796
|
+
**/
|
|
1797
|
+
manualSlash: GenericTxCall<Rv, (validatorStash: AccountId32Like, era: number, slashFraction: Perbill) => ChainSubmittableExtrinsic<Rv, {
|
|
1798
|
+
pallet: 'Staking';
|
|
1799
|
+
palletCall: {
|
|
1800
|
+
name: 'ManualSlash';
|
|
1801
|
+
params: {
|
|
1802
|
+
validatorStash: AccountId32Like;
|
|
1803
|
+
era: number;
|
|
1804
|
+
slashFraction: Perbill;
|
|
1805
|
+
};
|
|
1806
|
+
};
|
|
1807
|
+
}>>;
|
|
1669
1808
|
/**
|
|
1670
1809
|
* Generic pallet tx call
|
|
1671
1810
|
**/
|
|
@@ -4694,7 +4833,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
4694
4833
|
};
|
|
4695
4834
|
}>>;
|
|
4696
4835
|
/**
|
|
4697
|
-
* Allow ROOT to bypass the recovery process and set
|
|
4836
|
+
* Allow ROOT to bypass the recovery process and set a rescuer account
|
|
4698
4837
|
* for a lost account directly.
|
|
4699
4838
|
*
|
|
4700
4839
|
* The dispatch origin for this call must be _ROOT_.
|
|
@@ -5440,7 +5579,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
5440
5579
|
};
|
|
5441
5580
|
}>>;
|
|
5442
5581
|
/**
|
|
5443
|
-
* Ensure that the
|
|
5582
|
+
* Ensure that the bulk of pre-images is upgraded.
|
|
5444
5583
|
*
|
|
5445
5584
|
* The caller pays no fee if at least 90% of pre-images were successfully updated.
|
|
5446
5585
|
*
|
|
@@ -5737,6 +5876,23 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
5737
5876
|
};
|
|
5738
5877
|
};
|
|
5739
5878
|
}>>;
|
|
5879
|
+
/**
|
|
5880
|
+
* Poke / Adjust deposits made for proxies and announcements based on current values.
|
|
5881
|
+
* This can be used by accounts to possibly lower their locked amount.
|
|
5882
|
+
*
|
|
5883
|
+
* The dispatch origin for this call must be _Signed_.
|
|
5884
|
+
*
|
|
5885
|
+
* The transaction fee is waived if the deposit amount has changed.
|
|
5886
|
+
*
|
|
5887
|
+
* Emits `DepositPoked` if successful.
|
|
5888
|
+
*
|
|
5889
|
+
**/
|
|
5890
|
+
pokeDeposit: GenericTxCall<Rv, () => ChainSubmittableExtrinsic<Rv, {
|
|
5891
|
+
pallet: 'Proxy';
|
|
5892
|
+
palletCall: {
|
|
5893
|
+
name: 'PokeDeposit';
|
|
5894
|
+
};
|
|
5895
|
+
}>>;
|
|
5740
5896
|
/**
|
|
5741
5897
|
* Generic pallet tx call
|
|
5742
5898
|
**/
|
|
@@ -5924,6 +6080,36 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
5924
6080
|
};
|
|
5925
6081
|
};
|
|
5926
6082
|
}>>;
|
|
6083
|
+
/**
|
|
6084
|
+
* Poke the deposit reserved for an existing multisig operation.
|
|
6085
|
+
*
|
|
6086
|
+
* The dispatch origin for this call must be _Signed_ and must be the original depositor of
|
|
6087
|
+
* the multisig operation.
|
|
6088
|
+
*
|
|
6089
|
+
* The transaction fee is waived if the deposit amount has changed.
|
|
6090
|
+
*
|
|
6091
|
+
* - `threshold`: The total number of approvals needed for this multisig.
|
|
6092
|
+
* - `other_signatories`: The accounts (other than the sender) who are part of the
|
|
6093
|
+
* multisig.
|
|
6094
|
+
* - `call_hash`: The hash of the call this deposit is reserved for.
|
|
6095
|
+
*
|
|
6096
|
+
* Emits `DepositPoked` if successful.
|
|
6097
|
+
*
|
|
6098
|
+
* @param {number} threshold
|
|
6099
|
+
* @param {Array<AccountId32Like>} otherSignatories
|
|
6100
|
+
* @param {FixedBytes<32>} callHash
|
|
6101
|
+
**/
|
|
6102
|
+
pokeDeposit: GenericTxCall<Rv, (threshold: number, otherSignatories: Array<AccountId32Like>, callHash: FixedBytes<32>) => ChainSubmittableExtrinsic<Rv, {
|
|
6103
|
+
pallet: 'Multisig';
|
|
6104
|
+
palletCall: {
|
|
6105
|
+
name: 'PokeDeposit';
|
|
6106
|
+
params: {
|
|
6107
|
+
threshold: number;
|
|
6108
|
+
otherSignatories: Array<AccountId32Like>;
|
|
6109
|
+
callHash: FixedBytes<32>;
|
|
6110
|
+
};
|
|
6111
|
+
};
|
|
6112
|
+
}>>;
|
|
5927
6113
|
/**
|
|
5928
6114
|
* Generic pallet tx call
|
|
5929
6115
|
**/
|
|
@@ -6457,6 +6643,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
6457
6643
|
* - `id`: The identifier of the asset to be destroyed. This must identify an existing
|
|
6458
6644
|
* asset.
|
|
6459
6645
|
*
|
|
6646
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
6647
|
+
* an account contains holds or freezes in place.
|
|
6648
|
+
*
|
|
6460
6649
|
* @param {number} id
|
|
6461
6650
|
**/
|
|
6462
6651
|
startDestroy: GenericTxCall<Rv, (id: number) => ChainSubmittableExtrinsic<Rv, {
|
|
@@ -7193,6 +7382,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
7193
7382
|
* refunded.
|
|
7194
7383
|
* - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.
|
|
7195
7384
|
*
|
|
7385
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
7386
|
+
* the asset account contains holds or freezes in place.
|
|
7387
|
+
*
|
|
7196
7388
|
* Emits `Refunded` event when successful.
|
|
7197
7389
|
*
|
|
7198
7390
|
* @param {number} id
|
|
@@ -7270,6 +7462,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
7270
7462
|
* - `id`: The identifier of the asset for the account holding a deposit.
|
|
7271
7463
|
* - `who`: The account to refund.
|
|
7272
7464
|
*
|
|
7465
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
7466
|
+
* the asset account contains holds or freezes in place.
|
|
7467
|
+
*
|
|
7273
7468
|
* Emits `Refunded` event when successful.
|
|
7274
7469
|
*
|
|
7275
7470
|
* @param {number} id
|
|
@@ -7437,6 +7632,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
7437
7632
|
* - `id`: The identifier of the asset to be destroyed. This must identify an existing
|
|
7438
7633
|
* asset.
|
|
7439
7634
|
*
|
|
7635
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
7636
|
+
* an account contains holds or freezes in place.
|
|
7637
|
+
*
|
|
7440
7638
|
* @param {number} id
|
|
7441
7639
|
**/
|
|
7442
7640
|
startDestroy: GenericTxCall<Rv, (id: number) => ChainSubmittableExtrinsic<Rv, {
|
|
@@ -8173,6 +8371,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
8173
8371
|
* refunded.
|
|
8174
8372
|
* - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.
|
|
8175
8373
|
*
|
|
8374
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
8375
|
+
* the asset account contains holds or freezes in place.
|
|
8376
|
+
*
|
|
8176
8377
|
* Emits `Refunded` event when successful.
|
|
8177
8378
|
*
|
|
8178
8379
|
* @param {number} id
|
|
@@ -8250,6 +8451,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
8250
8451
|
* - `id`: The identifier of the asset for the account holding a deposit.
|
|
8251
8452
|
* - `who`: The account to refund.
|
|
8252
8453
|
*
|
|
8454
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
8455
|
+
* the asset account contains holds or freezes in place.
|
|
8456
|
+
*
|
|
8253
8457
|
* Emits `Refunded` event when successful.
|
|
8254
8458
|
*
|
|
8255
8459
|
* @param {number} id
|
|
@@ -11031,11 +11235,11 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
11031
11235
|
};
|
|
11032
11236
|
}>>;
|
|
11033
11237
|
/**
|
|
11034
|
-
* Introduce an already-ranked individual of the collective into this pallet.
|
|
11035
|
-
* still be zero.
|
|
11238
|
+
* Introduce an already-ranked individual of the collective into this pallet.
|
|
11036
11239
|
*
|
|
11037
|
-
* This resets `last_proof` to the current block and
|
|
11038
|
-
* thereby delaying any automatic demotion but
|
|
11240
|
+
* The rank may still be zero. This resets `last_proof` to the current block and
|
|
11241
|
+
* `last_promotion` will be set to zero, thereby delaying any automatic demotion but
|
|
11242
|
+
* allowing immediate promotion.
|
|
11039
11243
|
*
|
|
11040
11244
|
* - `origin`: A signed origin of a ranked, but not tracked, account.
|
|
11041
11245
|
*
|
|
@@ -11046,6 +11250,29 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
11046
11250
|
name: 'Import';
|
|
11047
11251
|
};
|
|
11048
11252
|
}>>;
|
|
11253
|
+
/**
|
|
11254
|
+
* Introduce an already-ranked individual of the collective into this pallet.
|
|
11255
|
+
*
|
|
11256
|
+
* The rank may still be zero. Can be called by anyone on any collective member - including
|
|
11257
|
+
* the sender.
|
|
11258
|
+
*
|
|
11259
|
+
* This resets `last_proof` to the current block and `last_promotion` will be set to zero,
|
|
11260
|
+
* thereby delaying any automatic demotion but allowing immediate promotion.
|
|
11261
|
+
*
|
|
11262
|
+
* - `origin`: A signed origin of a ranked, but not tracked, account.
|
|
11263
|
+
* - `who`: The account ID of the collective member to be inducted.
|
|
11264
|
+
*
|
|
11265
|
+
* @param {AccountId32Like} who
|
|
11266
|
+
**/
|
|
11267
|
+
importMember: GenericTxCall<Rv, (who: AccountId32Like) => ChainSubmittableExtrinsic<Rv, {
|
|
11268
|
+
pallet: 'CoreFellowship';
|
|
11269
|
+
palletCall: {
|
|
11270
|
+
name: 'ImportMember';
|
|
11271
|
+
params: {
|
|
11272
|
+
who: AccountId32Like;
|
|
11273
|
+
};
|
|
11274
|
+
};
|
|
11275
|
+
}>>;
|
|
11049
11276
|
/**
|
|
11050
11277
|
* Set the parameters partially.
|
|
11051
11278
|
*
|
|
@@ -12646,8 +12873,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
12646
12873
|
**/
|
|
12647
12874
|
nominationPools: {
|
|
12648
12875
|
/**
|
|
12649
|
-
* Stake funds with a pool. The amount to bond is
|
|
12650
|
-
*
|
|
12876
|
+
* Stake funds with a pool. The amount to bond is delegated (or transferred based on
|
|
12877
|
+
* [`adapter::StakeStrategyType`]) from the member to the pool account and immediately
|
|
12878
|
+
* increases the pool's bond.
|
|
12651
12879
|
*
|
|
12652
12880
|
* The method of transferring the amount to the pool account is determined by
|
|
12653
12881
|
* [`adapter::StakeStrategyType`]. If the pool is configured to use
|
|
@@ -12885,13 +13113,13 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
12885
13113
|
* The dispatch origin of this call must be signed by the pool nominator or the pool
|
|
12886
13114
|
* root role.
|
|
12887
13115
|
*
|
|
12888
|
-
* This directly
|
|
12889
|
-
*
|
|
13116
|
+
* This directly forwards the call to an implementation of `StakingInterface` (e.g.,
|
|
13117
|
+
* `pallet-staking`) through [`Config::StakeAdapter`], on behalf of the bonded pool.
|
|
12890
13118
|
*
|
|
12891
13119
|
* # Note
|
|
12892
13120
|
*
|
|
12893
|
-
* In addition to a `root` or `nominator` role of `origin`, pool's depositor needs to
|
|
12894
|
-
* at least `depositor_min_bond` in the pool to start nominating.
|
|
13121
|
+
* In addition to a `root` or `nominator` role of `origin`, the pool's depositor needs to
|
|
13122
|
+
* have at least `depositor_min_bond` in the pool to start nominating.
|
|
12895
13123
|
*
|
|
12896
13124
|
* @param {number} poolId
|
|
12897
13125
|
* @param {Array<AccountId32Like>} validators
|
|
@@ -13016,6 +13244,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
13016
13244
|
* The dispatch origin of this call can be signed by the pool nominator or the pool
|
|
13017
13245
|
* root role, same as [`Pallet::nominate`].
|
|
13018
13246
|
*
|
|
13247
|
+
* This directly forwards the call to an implementation of `StakingInterface` (e.g.,
|
|
13248
|
+
* `pallet-staking`) through [`Config::StakeAdapter`], on behalf of the bonded pool.
|
|
13249
|
+
*
|
|
13019
13250
|
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
|
|
13020
13251
|
* account).
|
|
13021
13252
|
*
|
|
@@ -13024,9 +13255,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
13024
13255
|
* are unable to unbond.
|
|
13025
13256
|
*
|
|
13026
13257
|
* # Conditions for permissioned dispatch:
|
|
13027
|
-
* * The caller
|
|
13028
|
-
* This directly forward the call to the staking pallet, on behalf of the pool bonded
|
|
13029
|
-
* account.
|
|
13258
|
+
* * The caller is the pool's nominator or root.
|
|
13030
13259
|
*
|
|
13031
13260
|
* @param {number} poolId
|
|
13032
13261
|
**/
|
|
@@ -13162,9 +13391,20 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
13162
13391
|
/**
|
|
13163
13392
|
* Claim pending commission.
|
|
13164
13393
|
*
|
|
13165
|
-
* The
|
|
13166
|
-
*
|
|
13167
|
-
*
|
|
13394
|
+
* The `root` role of the pool is _always_ allowed to claim the pool's commission.
|
|
13395
|
+
*
|
|
13396
|
+
* If the pool has set `CommissionClaimPermission::Permissionless`, then any account can
|
|
13397
|
+
* trigger the process of claiming the pool's commission.
|
|
13398
|
+
*
|
|
13399
|
+
* If the pool has set its `CommissionClaimPermission` to `Account(acc)`, then only
|
|
13400
|
+
* accounts
|
|
13401
|
+
* * `acc`, and
|
|
13402
|
+
* * the pool's root account
|
|
13403
|
+
*
|
|
13404
|
+
* may call this extrinsic on behalf of the pool.
|
|
13405
|
+
*
|
|
13406
|
+
* Pending commissions are paid out and added to the total claimed commission.
|
|
13407
|
+
* The total pending commission is reset to zero.
|
|
13168
13408
|
*
|
|
13169
13409
|
* @param {number} poolId
|
|
13170
13410
|
**/
|
|
@@ -13222,8 +13462,10 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
13222
13462
|
* Fails unless [`crate::pallet::Config::StakeAdapter`] is of strategy type:
|
|
13223
13463
|
* [`adapter::StakeStrategyType::Delegate`].
|
|
13224
13464
|
*
|
|
13225
|
-
*
|
|
13226
|
-
*
|
|
13465
|
+
* The pending slash amount of the member must be equal or more than `ExistentialDeposit`.
|
|
13466
|
+
* This call can be dispatched permissionlessly (i.e. by any account). If the execution
|
|
13467
|
+
* is successful, fee is refunded and caller may be rewarded with a part of the slash
|
|
13468
|
+
* based on the [`crate::pallet::Config::StakeAdapter`] configuration.
|
|
13227
13469
|
*
|
|
13228
13470
|
* @param {MultiAddressLike} memberAccount
|
|
13229
13471
|
**/
|
|
@@ -14307,6 +14549,9 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
14307
14549
|
/**
|
|
14308
14550
|
* Reserve a core for a workload.
|
|
14309
14551
|
*
|
|
14552
|
+
* The workload will be given a reservation, but two sale period boundaries must pass
|
|
14553
|
+
* before the core is actually assigned.
|
|
14554
|
+
*
|
|
14310
14555
|
* - `origin`: Must be Root or pass `AdminOrigin`.
|
|
14311
14556
|
* - `workload`: The workload which should be permanently placed on a core.
|
|
14312
14557
|
*
|
|
@@ -14745,6 +14990,67 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
14745
14990
|
};
|
|
14746
14991
|
};
|
|
14747
14992
|
}>>;
|
|
14993
|
+
/**
|
|
14994
|
+
* Reserve a core for a workload immediately.
|
|
14995
|
+
*
|
|
14996
|
+
* - `origin`: Must be Root or pass `AdminOrigin`.
|
|
14997
|
+
* - `workload`: The workload which should be permanently placed on a core starting
|
|
14998
|
+
* immediately.
|
|
14999
|
+
* - `core`: The core to which the assignment should be made until the reservation takes
|
|
15000
|
+
* effect. It is left to the caller to either add this new core or reassign any other
|
|
15001
|
+
* tasks to this existing core.
|
|
15002
|
+
*
|
|
15003
|
+
* This reserves the workload and then injects the workload into the Workplan for the next
|
|
15004
|
+
* two sale periods. This overwrites any existing assignments for this core at the start of
|
|
15005
|
+
* the next sale period.
|
|
15006
|
+
*
|
|
15007
|
+
* @param {Array<PalletBrokerScheduleItem>} workload
|
|
15008
|
+
* @param {number} core
|
|
15009
|
+
**/
|
|
15010
|
+
forceReserve: GenericTxCall<Rv, (workload: Array<PalletBrokerScheduleItem>, core: number) => ChainSubmittableExtrinsic<Rv, {
|
|
15011
|
+
pallet: 'Broker';
|
|
15012
|
+
palletCall: {
|
|
15013
|
+
name: 'ForceReserve';
|
|
15014
|
+
params: {
|
|
15015
|
+
workload: Array<PalletBrokerScheduleItem>;
|
|
15016
|
+
core: number;
|
|
15017
|
+
};
|
|
15018
|
+
};
|
|
15019
|
+
}>>;
|
|
15020
|
+
/**
|
|
15021
|
+
* Remove a lease.
|
|
15022
|
+
*
|
|
15023
|
+
* - `origin`: Must be Root or pass `AdminOrigin`.
|
|
15024
|
+
* - `task`: The task id of the lease which should be removed.
|
|
15025
|
+
*
|
|
15026
|
+
* @param {number} task
|
|
15027
|
+
**/
|
|
15028
|
+
removeLease: GenericTxCall<Rv, (task: number) => ChainSubmittableExtrinsic<Rv, {
|
|
15029
|
+
pallet: 'Broker';
|
|
15030
|
+
palletCall: {
|
|
15031
|
+
name: 'RemoveLease';
|
|
15032
|
+
params: {
|
|
15033
|
+
task: number;
|
|
15034
|
+
};
|
|
15035
|
+
};
|
|
15036
|
+
}>>;
|
|
15037
|
+
/**
|
|
15038
|
+
* Remove an assignment from the Workplan.
|
|
15039
|
+
*
|
|
15040
|
+
* - `origin`: Must be Root or pass `AdminOrigin`.
|
|
15041
|
+
* - `region_id`: The Region to be removed from the workplan.
|
|
15042
|
+
*
|
|
15043
|
+
* @param {PalletBrokerRegionId} regionId
|
|
15044
|
+
**/
|
|
15045
|
+
removeAssignment: GenericTxCall<Rv, (regionId: PalletBrokerRegionId) => ChainSubmittableExtrinsic<Rv, {
|
|
15046
|
+
pallet: 'Broker';
|
|
15047
|
+
palletCall: {
|
|
15048
|
+
name: 'RemoveAssignment';
|
|
15049
|
+
params: {
|
|
15050
|
+
regionId: PalletBrokerRegionId;
|
|
15051
|
+
};
|
|
15052
|
+
};
|
|
15053
|
+
}>>;
|
|
14748
15054
|
/**
|
|
14749
15055
|
*
|
|
14750
15056
|
* @param {number} id
|
|
@@ -14853,7 +15159,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
14853
15159
|
*
|
|
14854
15160
|
* # Parameters
|
|
14855
15161
|
*
|
|
14856
|
-
* * `payload`: The
|
|
15162
|
+
* * `payload`: The encoded [`crate::evm::TransactionSigned`].
|
|
14857
15163
|
* * `gas_limit`: The gas limit enforced during contract execution.
|
|
14858
15164
|
* * `storage_deposit_limit`: The maximum balance that can be charged to the caller for
|
|
14859
15165
|
* storage usage.
|
|
@@ -14866,17 +15172,13 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
14866
15172
|
* signer and validating the transaction.
|
|
14867
15173
|
*
|
|
14868
15174
|
* @param {BytesLike} payload
|
|
14869
|
-
* @param {SpWeightsWeightV2Weight} gasLimit
|
|
14870
|
-
* @param {bigint} storageDepositLimit
|
|
14871
15175
|
**/
|
|
14872
|
-
ethTransact: GenericTxCall<Rv, (payload: BytesLike
|
|
15176
|
+
ethTransact: GenericTxCall<Rv, (payload: BytesLike) => ChainSubmittableExtrinsic<Rv, {
|
|
14873
15177
|
pallet: 'Revive';
|
|
14874
15178
|
palletCall: {
|
|
14875
15179
|
name: 'EthTransact';
|
|
14876
15180
|
params: {
|
|
14877
15181
|
payload: BytesLike;
|
|
14878
|
-
gasLimit: SpWeightsWeightV2Weight;
|
|
14879
|
-
storageDepositLimit: bigint;
|
|
14880
15182
|
};
|
|
14881
15183
|
};
|
|
14882
15184
|
}>>;
|
|
@@ -15113,4 +15415,234 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
15113
15415
|
**/
|
|
15114
15416
|
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
15115
15417
|
};
|
|
15418
|
+
/**
|
|
15419
|
+
* Pallet `AssetRewards`'s transaction calls
|
|
15420
|
+
**/
|
|
15421
|
+
assetRewards: {
|
|
15422
|
+
/**
|
|
15423
|
+
* Create a new reward pool.
|
|
15424
|
+
*
|
|
15425
|
+
* Parameters:
|
|
15426
|
+
* - `origin`: must be `Config::CreatePoolOrigin`;
|
|
15427
|
+
* - `staked_asset_id`: the asset to be staked in the pool;
|
|
15428
|
+
* - `reward_asset_id`: the asset to be distributed as rewards;
|
|
15429
|
+
* - `reward_rate_per_block`: the amount of reward tokens distributed per block;
|
|
15430
|
+
* - `expiry`: the block number at which the pool will cease to accumulate rewards. The
|
|
15431
|
+
* [`DispatchTime::After`] variant evaluated at the execution time.
|
|
15432
|
+
* - `admin`: the account allowed to extend the pool expiration, increase the rewards rate
|
|
15433
|
+
* and receive the unutilized reward tokens back after the pool completion. If `None`,
|
|
15434
|
+
* the caller is set as an admin.
|
|
15435
|
+
*
|
|
15436
|
+
* @param {FrameSupportTokensFungibleUnionOfNativeOrWithId} stakedAssetId
|
|
15437
|
+
* @param {FrameSupportTokensFungibleUnionOfNativeOrWithId} rewardAssetId
|
|
15438
|
+
* @param {bigint} rewardRatePerBlock
|
|
15439
|
+
* @param {FrameSupportScheduleDispatchTime} expiry
|
|
15440
|
+
* @param {AccountId32Like | undefined} admin
|
|
15441
|
+
**/
|
|
15442
|
+
createPool: GenericTxCall<Rv, (stakedAssetId: FrameSupportTokensFungibleUnionOfNativeOrWithId, rewardAssetId: FrameSupportTokensFungibleUnionOfNativeOrWithId, rewardRatePerBlock: bigint, expiry: FrameSupportScheduleDispatchTime, admin: AccountId32Like | undefined) => ChainSubmittableExtrinsic<Rv, {
|
|
15443
|
+
pallet: 'AssetRewards';
|
|
15444
|
+
palletCall: {
|
|
15445
|
+
name: 'CreatePool';
|
|
15446
|
+
params: {
|
|
15447
|
+
stakedAssetId: FrameSupportTokensFungibleUnionOfNativeOrWithId;
|
|
15448
|
+
rewardAssetId: FrameSupportTokensFungibleUnionOfNativeOrWithId;
|
|
15449
|
+
rewardRatePerBlock: bigint;
|
|
15450
|
+
expiry: FrameSupportScheduleDispatchTime;
|
|
15451
|
+
admin: AccountId32Like | undefined;
|
|
15452
|
+
};
|
|
15453
|
+
};
|
|
15454
|
+
}>>;
|
|
15455
|
+
/**
|
|
15456
|
+
* Stake additional tokens in a pool.
|
|
15457
|
+
*
|
|
15458
|
+
* A freeze is placed on the staked tokens.
|
|
15459
|
+
*
|
|
15460
|
+
* @param {number} poolId
|
|
15461
|
+
* @param {bigint} amount
|
|
15462
|
+
**/
|
|
15463
|
+
stake: GenericTxCall<Rv, (poolId: number, amount: bigint) => ChainSubmittableExtrinsic<Rv, {
|
|
15464
|
+
pallet: 'AssetRewards';
|
|
15465
|
+
palletCall: {
|
|
15466
|
+
name: 'Stake';
|
|
15467
|
+
params: {
|
|
15468
|
+
poolId: number;
|
|
15469
|
+
amount: bigint;
|
|
15470
|
+
};
|
|
15471
|
+
};
|
|
15472
|
+
}>>;
|
|
15473
|
+
/**
|
|
15474
|
+
* Unstake tokens from a pool.
|
|
15475
|
+
*
|
|
15476
|
+
* Removes the freeze on the staked tokens.
|
|
15477
|
+
*
|
|
15478
|
+
* Parameters:
|
|
15479
|
+
* - origin: must be the `staker` if the pool is still active. Otherwise, any account.
|
|
15480
|
+
* - pool_id: the pool to unstake from.
|
|
15481
|
+
* - amount: the amount of tokens to unstake.
|
|
15482
|
+
* - staker: the account to unstake from. If `None`, the caller is used.
|
|
15483
|
+
*
|
|
15484
|
+
* @param {number} poolId
|
|
15485
|
+
* @param {bigint} amount
|
|
15486
|
+
* @param {AccountId32Like | undefined} staker
|
|
15487
|
+
**/
|
|
15488
|
+
unstake: GenericTxCall<Rv, (poolId: number, amount: bigint, staker: AccountId32Like | undefined) => ChainSubmittableExtrinsic<Rv, {
|
|
15489
|
+
pallet: 'AssetRewards';
|
|
15490
|
+
palletCall: {
|
|
15491
|
+
name: 'Unstake';
|
|
15492
|
+
params: {
|
|
15493
|
+
poolId: number;
|
|
15494
|
+
amount: bigint;
|
|
15495
|
+
staker: AccountId32Like | undefined;
|
|
15496
|
+
};
|
|
15497
|
+
};
|
|
15498
|
+
}>>;
|
|
15499
|
+
/**
|
|
15500
|
+
* Harvest unclaimed pool rewards.
|
|
15501
|
+
*
|
|
15502
|
+
* Parameters:
|
|
15503
|
+
* - origin: must be the `staker` if the pool is still active. Otherwise, any account.
|
|
15504
|
+
* - pool_id: the pool to harvest from.
|
|
15505
|
+
* - staker: the account for which to harvest rewards. If `None`, the caller is used.
|
|
15506
|
+
*
|
|
15507
|
+
* @param {number} poolId
|
|
15508
|
+
* @param {AccountId32Like | undefined} staker
|
|
15509
|
+
**/
|
|
15510
|
+
harvestRewards: GenericTxCall<Rv, (poolId: number, staker: AccountId32Like | undefined) => ChainSubmittableExtrinsic<Rv, {
|
|
15511
|
+
pallet: 'AssetRewards';
|
|
15512
|
+
palletCall: {
|
|
15513
|
+
name: 'HarvestRewards';
|
|
15514
|
+
params: {
|
|
15515
|
+
poolId: number;
|
|
15516
|
+
staker: AccountId32Like | undefined;
|
|
15517
|
+
};
|
|
15518
|
+
};
|
|
15519
|
+
}>>;
|
|
15520
|
+
/**
|
|
15521
|
+
* Modify a pool reward rate.
|
|
15522
|
+
*
|
|
15523
|
+
* Currently the reward rate can only be increased.
|
|
15524
|
+
*
|
|
15525
|
+
* Only the pool admin may perform this operation.
|
|
15526
|
+
*
|
|
15527
|
+
* @param {number} poolId
|
|
15528
|
+
* @param {bigint} newRewardRatePerBlock
|
|
15529
|
+
**/
|
|
15530
|
+
setPoolRewardRatePerBlock: GenericTxCall<Rv, (poolId: number, newRewardRatePerBlock: bigint) => ChainSubmittableExtrinsic<Rv, {
|
|
15531
|
+
pallet: 'AssetRewards';
|
|
15532
|
+
palletCall: {
|
|
15533
|
+
name: 'SetPoolRewardRatePerBlock';
|
|
15534
|
+
params: {
|
|
15535
|
+
poolId: number;
|
|
15536
|
+
newRewardRatePerBlock: bigint;
|
|
15537
|
+
};
|
|
15538
|
+
};
|
|
15539
|
+
}>>;
|
|
15540
|
+
/**
|
|
15541
|
+
* Modify a pool admin.
|
|
15542
|
+
*
|
|
15543
|
+
* Only the pool admin may perform this operation.
|
|
15544
|
+
*
|
|
15545
|
+
* @param {number} poolId
|
|
15546
|
+
* @param {AccountId32Like} newAdmin
|
|
15547
|
+
**/
|
|
15548
|
+
setPoolAdmin: GenericTxCall<Rv, (poolId: number, newAdmin: AccountId32Like) => ChainSubmittableExtrinsic<Rv, {
|
|
15549
|
+
pallet: 'AssetRewards';
|
|
15550
|
+
palletCall: {
|
|
15551
|
+
name: 'SetPoolAdmin';
|
|
15552
|
+
params: {
|
|
15553
|
+
poolId: number;
|
|
15554
|
+
newAdmin: AccountId32Like;
|
|
15555
|
+
};
|
|
15556
|
+
};
|
|
15557
|
+
}>>;
|
|
15558
|
+
/**
|
|
15559
|
+
* Set when the pool should expire.
|
|
15560
|
+
*
|
|
15561
|
+
* Currently the expiry block can only be extended.
|
|
15562
|
+
*
|
|
15563
|
+
* Only the pool admin may perform this operation.
|
|
15564
|
+
*
|
|
15565
|
+
* @param {number} poolId
|
|
15566
|
+
* @param {FrameSupportScheduleDispatchTime} newExpiry
|
|
15567
|
+
**/
|
|
15568
|
+
setPoolExpiryBlock: GenericTxCall<Rv, (poolId: number, newExpiry: FrameSupportScheduleDispatchTime) => ChainSubmittableExtrinsic<Rv, {
|
|
15569
|
+
pallet: 'AssetRewards';
|
|
15570
|
+
palletCall: {
|
|
15571
|
+
name: 'SetPoolExpiryBlock';
|
|
15572
|
+
params: {
|
|
15573
|
+
poolId: number;
|
|
15574
|
+
newExpiry: FrameSupportScheduleDispatchTime;
|
|
15575
|
+
};
|
|
15576
|
+
};
|
|
15577
|
+
}>>;
|
|
15578
|
+
/**
|
|
15579
|
+
* Convenience method to deposit reward tokens into a pool.
|
|
15580
|
+
*
|
|
15581
|
+
* This method is not strictly necessary (tokens could be transferred directly to the
|
|
15582
|
+
* pool pot address), but is provided for convenience so manual derivation of the
|
|
15583
|
+
* account id is not required.
|
|
15584
|
+
*
|
|
15585
|
+
* @param {number} poolId
|
|
15586
|
+
* @param {bigint} amount
|
|
15587
|
+
**/
|
|
15588
|
+
depositRewardTokens: GenericTxCall<Rv, (poolId: number, amount: bigint) => ChainSubmittableExtrinsic<Rv, {
|
|
15589
|
+
pallet: 'AssetRewards';
|
|
15590
|
+
palletCall: {
|
|
15591
|
+
name: 'DepositRewardTokens';
|
|
15592
|
+
params: {
|
|
15593
|
+
poolId: number;
|
|
15594
|
+
amount: bigint;
|
|
15595
|
+
};
|
|
15596
|
+
};
|
|
15597
|
+
}>>;
|
|
15598
|
+
/**
|
|
15599
|
+
* Cleanup a pool.
|
|
15600
|
+
*
|
|
15601
|
+
* Origin must be the pool admin.
|
|
15602
|
+
*
|
|
15603
|
+
* Cleanup storage, release any associated storage cost and return the remaining reward
|
|
15604
|
+
* tokens to the admin.
|
|
15605
|
+
*
|
|
15606
|
+
* @param {number} poolId
|
|
15607
|
+
**/
|
|
15608
|
+
cleanupPool: GenericTxCall<Rv, (poolId: number) => ChainSubmittableExtrinsic<Rv, {
|
|
15609
|
+
pallet: 'AssetRewards';
|
|
15610
|
+
palletCall: {
|
|
15611
|
+
name: 'CleanupPool';
|
|
15612
|
+
params: {
|
|
15613
|
+
poolId: number;
|
|
15614
|
+
};
|
|
15615
|
+
};
|
|
15616
|
+
}>>;
|
|
15617
|
+
/**
|
|
15618
|
+
* Generic pallet tx call
|
|
15619
|
+
**/
|
|
15620
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
15621
|
+
};
|
|
15622
|
+
/**
|
|
15623
|
+
* Pallet `MetaTx`'s transaction calls
|
|
15624
|
+
**/
|
|
15625
|
+
metaTx: {
|
|
15626
|
+
/**
|
|
15627
|
+
* Dispatch a given meta transaction.
|
|
15628
|
+
*
|
|
15629
|
+
* - `_origin`: Can be any kind of origin.
|
|
15630
|
+
* - `meta_tx`: Meta Transaction with a target call to be dispatched.
|
|
15631
|
+
*
|
|
15632
|
+
* @param {PalletMetaTxMetaTx} metaTx
|
|
15633
|
+
**/
|
|
15634
|
+
dispatch: GenericTxCall<Rv, (metaTx: PalletMetaTxMetaTx) => ChainSubmittableExtrinsic<Rv, {
|
|
15635
|
+
pallet: 'MetaTx';
|
|
15636
|
+
palletCall: {
|
|
15637
|
+
name: 'Dispatch';
|
|
15638
|
+
params: {
|
|
15639
|
+
metaTx: PalletMetaTxMetaTx;
|
|
15640
|
+
};
|
|
15641
|
+
};
|
|
15642
|
+
}>>;
|
|
15643
|
+
/**
|
|
15644
|
+
* Generic pallet tx call
|
|
15645
|
+
**/
|
|
15646
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
15647
|
+
};
|
|
15116
15648
|
}
|