@polkadot/api-augment 16.2.2 → 16.3.1
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/assetHubKusama/consts.d.ts +95 -2
- package/assetHubKusama/errors.d.ts +254 -10
- package/assetHubKusama/events.d.ts +103 -3
- package/assetHubKusama/query.d.ts +72 -6
- package/assetHubKusama/runtime.d.ts +113 -4
- package/assetHubKusama/tx.d.ts +278 -1
- package/cjs/assetHubKusama/consts.d.ts +95 -2
- package/cjs/assetHubKusama/errors.d.ts +254 -10
- package/cjs/assetHubKusama/events.d.ts +103 -3
- package/cjs/assetHubKusama/query.d.ts +72 -6
- package/cjs/assetHubKusama/runtime.d.ts +113 -4
- package/cjs/assetHubKusama/tx.d.ts +278 -1
- package/cjs/packageInfo.js +1 -1
- package/cjs/polkadot/consts.d.ts +27 -5
- package/cjs/polkadot/errors.d.ts +41 -2
- package/cjs/polkadot/events.d.ts +167 -4
- package/cjs/polkadot/query.d.ts +31 -12
- package/cjs/polkadot/runtime.d.ts +10 -2
- package/cjs/polkadot/tx.d.ts +204 -25
- package/cjs/substrate/runtime.d.ts +7 -7
- package/package.json +7 -7
- package/packageInfo.js +1 -1
- package/polkadot/consts.d.ts +27 -5
- package/polkadot/errors.d.ts +41 -2
- package/polkadot/events.d.ts +167 -4
- package/polkadot/query.d.ts +31 -12
- package/polkadot/runtime.d.ts +10 -2
- package/polkadot/tx.d.ts +204 -25
- package/substrate/runtime.d.ts +7 -7
package/assetHubKusama/tx.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import '@polkadot/api-base/types/submittable';
|
|
|
2
2
|
import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types';
|
|
3
3
|
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
|
4
4
|
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
|
5
|
-
import type { AccountId32, Call, H256, MultiAddress } from '@polkadot/types/interfaces/runtime';
|
|
5
|
+
import type { AccountId32, Call, H160, H256, MultiAddress } from '@polkadot/types/interfaces/runtime';
|
|
6
6
|
import type { AssetHubKusamaRuntimeOriginCaller, AssetHubKusamaRuntimeProxyType, AssetHubKusamaRuntimeSessionKeys, CumulusPrimitivesCoreAggregateMessageOrigin, CumulusPrimitivesParachainInherentParachainInherentData, PalletBalancesAdjustmentDirection, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletRemoteProxyRemoteProxyProof, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpRuntimeMultiSignature, SpWeightsWeightV2Weight, StagingXcmExecutorAssetTransferTransferType, StagingXcmV4Location, StagingXcmV5Location, XcmV3WeightLimit, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
|
7
7
|
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
|
8
8
|
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
|
@@ -585,6 +585,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
585
585
|
* refunded.
|
|
586
586
|
* - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.
|
|
587
587
|
*
|
|
588
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
589
|
+
* the asset account contains holds or freezes in place.
|
|
590
|
+
*
|
|
588
591
|
* Emits `Refunded` event when successful.
|
|
589
592
|
**/
|
|
590
593
|
refund: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, allowBurn: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, bool]>;
|
|
@@ -598,6 +601,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
598
601
|
* - `id`: The identifier of the asset for the account holding a deposit.
|
|
599
602
|
* - `who`: The account to refund.
|
|
600
603
|
*
|
|
604
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
605
|
+
* the asset account contains holds or freezes in place.
|
|
606
|
+
*
|
|
601
607
|
* Emits `Refunded` event when successful.
|
|
602
608
|
**/
|
|
603
609
|
refundOther: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, who: MultiAddress | {
|
|
@@ -700,6 +706,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
700
706
|
*
|
|
701
707
|
* - `id`: The identifier of the asset to be destroyed. This must identify an existing
|
|
702
708
|
* asset.
|
|
709
|
+
*
|
|
710
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
711
|
+
* an account contains holds or freezes in place.
|
|
703
712
|
**/
|
|
704
713
|
startDestroy: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
|
705
714
|
/**
|
|
@@ -1718,6 +1727,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
1718
1727
|
* refunded.
|
|
1719
1728
|
* - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.
|
|
1720
1729
|
*
|
|
1730
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
1731
|
+
* the asset account contains holds or freezes in place.
|
|
1732
|
+
*
|
|
1721
1733
|
* Emits `Refunded` event when successful.
|
|
1722
1734
|
**/
|
|
1723
1735
|
refund: AugmentedSubmittable<(id: StagingXcmV4Location | {
|
|
@@ -1734,6 +1746,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
1734
1746
|
* - `id`: The identifier of the asset for the account holding a deposit.
|
|
1735
1747
|
* - `who`: The account to refund.
|
|
1736
1748
|
*
|
|
1749
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
1750
|
+
* the asset account contains holds or freezes in place.
|
|
1751
|
+
*
|
|
1737
1752
|
* Emits `Refunded` event when successful.
|
|
1738
1753
|
**/
|
|
1739
1754
|
refundOther: AugmentedSubmittable<(id: StagingXcmV4Location | {
|
|
@@ -1848,6 +1863,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
1848
1863
|
*
|
|
1849
1864
|
* - `id`: The identifier of the asset to be destroyed. This must identify an existing
|
|
1850
1865
|
* asset.
|
|
1866
|
+
*
|
|
1867
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
1868
|
+
* an account contains holds or freezes in place.
|
|
1851
1869
|
**/
|
|
1852
1870
|
startDestroy: AugmentedSubmittable<(id: StagingXcmV4Location | {
|
|
1853
1871
|
parents?: any;
|
|
@@ -2281,6 +2299,22 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
2281
2299
|
height?: any;
|
|
2282
2300
|
index?: any;
|
|
2283
2301
|
} | string | Uint8Array, callHash: U8aFixed | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, PalletMultisigTimepoint, U8aFixed]>;
|
|
2302
|
+
/**
|
|
2303
|
+
* Poke the deposit reserved for an existing multisig operation.
|
|
2304
|
+
*
|
|
2305
|
+
* The dispatch origin for this call must be _Signed_ and must be the original depositor of
|
|
2306
|
+
* the multisig operation.
|
|
2307
|
+
*
|
|
2308
|
+
* The transaction fee is waived if the deposit amount has changed.
|
|
2309
|
+
*
|
|
2310
|
+
* - `threshold`: The total number of approvals needed for this multisig.
|
|
2311
|
+
* - `other_signatories`: The accounts (other than the sender) who are part of the
|
|
2312
|
+
* multisig.
|
|
2313
|
+
* - `call_hash`: The hash of the call this deposit is reserved for.
|
|
2314
|
+
*
|
|
2315
|
+
* Emits `DepositPoked` if successful.
|
|
2316
|
+
**/
|
|
2317
|
+
pokeDeposit: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], callHash: U8aFixed | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, U8aFixed]>;
|
|
2284
2318
|
/**
|
|
2285
2319
|
* Generic tx
|
|
2286
2320
|
**/
|
|
@@ -3247,6 +3281,26 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
3247
3281
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
3248
3282
|
};
|
|
3249
3283
|
polkadotXcm: {
|
|
3284
|
+
/**
|
|
3285
|
+
* Authorize another `aliaser` location to alias into the local `origin` making this call.
|
|
3286
|
+
* The `aliaser` is only authorized until the provided `expiry` block number.
|
|
3287
|
+
* The call can also be used for a previously authorized alias in order to update its
|
|
3288
|
+
* `expiry` block number.
|
|
3289
|
+
*
|
|
3290
|
+
* Usually useful to allow your local account to be aliased into from a remote location
|
|
3291
|
+
* also under your control (like your account on another chain).
|
|
3292
|
+
*
|
|
3293
|
+
* WARNING: make sure the caller `origin` (you) trusts the `aliaser` location to act in
|
|
3294
|
+
* their/your name. Once authorized using this call, the `aliaser` can freely impersonate
|
|
3295
|
+
* `origin` in XCM programs executed on the local chain.
|
|
3296
|
+
**/
|
|
3297
|
+
addAuthorizedAlias: AugmentedSubmittable<(aliaser: XcmVersionedLocation | {
|
|
3298
|
+
V3: any;
|
|
3299
|
+
} | {
|
|
3300
|
+
V4: any;
|
|
3301
|
+
} | {
|
|
3302
|
+
V5: any;
|
|
3303
|
+
} | string | Uint8Array, expires: Option<u64> | null | Uint8Array | u64 | AnyNumber) => SubmittableExtrinsic<ApiType>, [XcmVersionedLocation, Option<u64>]>;
|
|
3250
3304
|
/**
|
|
3251
3305
|
* Claims assets trapped on this pallet because of leftover assets during XCM execution.
|
|
3252
3306
|
*
|
|
@@ -3441,6 +3495,22 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
3441
3495
|
} | {
|
|
3442
3496
|
Limited: any;
|
|
3443
3497
|
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedLocation, XcmVersionedLocation, XcmVersionedAssets, u32, XcmV3WeightLimit]>;
|
|
3498
|
+
/**
|
|
3499
|
+
* Remove all previously authorized `aliaser`s that can alias into the local `origin`
|
|
3500
|
+
* making this call.
|
|
3501
|
+
**/
|
|
3502
|
+
removeAllAuthorizedAliases: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
3503
|
+
/**
|
|
3504
|
+
* Remove a previously authorized `aliaser` from the list of locations that can alias into
|
|
3505
|
+
* the local `origin` making this call.
|
|
3506
|
+
**/
|
|
3507
|
+
removeAuthorizedAlias: AugmentedSubmittable<(aliaser: XcmVersionedLocation | {
|
|
3508
|
+
V3: any;
|
|
3509
|
+
} | {
|
|
3510
|
+
V4: any;
|
|
3511
|
+
} | {
|
|
3512
|
+
V5: any;
|
|
3513
|
+
} | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedLocation]>;
|
|
3444
3514
|
/**
|
|
3445
3515
|
* Transfer some assets from the local chain to the destination chain through their local,
|
|
3446
3516
|
* destination or remote reserve.
|
|
@@ -4180,6 +4250,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
4180
4250
|
* refunded.
|
|
4181
4251
|
* - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.
|
|
4182
4252
|
*
|
|
4253
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
4254
|
+
* the asset account contains holds or freezes in place.
|
|
4255
|
+
*
|
|
4183
4256
|
* Emits `Refunded` event when successful.
|
|
4184
4257
|
**/
|
|
4185
4258
|
refund: AugmentedSubmittable<(id: u32 | AnyNumber | Uint8Array, allowBurn: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, bool]>;
|
|
@@ -4193,6 +4266,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
4193
4266
|
* - `id`: The identifier of the asset for the account holding a deposit.
|
|
4194
4267
|
* - `who`: The account to refund.
|
|
4195
4268
|
*
|
|
4269
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
4270
|
+
* the asset account contains holds or freezes in place.
|
|
4271
|
+
*
|
|
4196
4272
|
* Emits `Refunded` event when successful.
|
|
4197
4273
|
**/
|
|
4198
4274
|
refundOther: AugmentedSubmittable<(id: u32 | AnyNumber | Uint8Array, who: MultiAddress | {
|
|
@@ -4295,6 +4371,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
4295
4371
|
*
|
|
4296
4372
|
* - `id`: The identifier of the asset to be destroyed. This must identify an existing
|
|
4297
4373
|
* asset.
|
|
4374
|
+
*
|
|
4375
|
+
* It will fail with either [`Error::ContainsHolds`] or [`Error::ContainsFreezes`] if
|
|
4376
|
+
* an account contains holds or freezes in place.
|
|
4298
4377
|
**/
|
|
4299
4378
|
startDestroy: AugmentedSubmittable<(id: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
|
4300
4379
|
/**
|
|
@@ -4628,6 +4707,17 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
4628
4707
|
} | {
|
|
4629
4708
|
Address20: any;
|
|
4630
4709
|
} | string | Uint8Array, proxyType: AssetHubKusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'CancelProxy' | 'Assets' | 'AssetOwner' | 'AssetManager' | 'Collator' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, AssetHubKusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
|
4710
|
+
/**
|
|
4711
|
+
* Poke / Adjust deposits made for proxies and announcements based on current values.
|
|
4712
|
+
* This can be used by accounts to possibly lower their locked amount.
|
|
4713
|
+
*
|
|
4714
|
+
* The dispatch origin for this call must be _Signed_.
|
|
4715
|
+
*
|
|
4716
|
+
* The transaction fee is waived if the deposit amount has changed.
|
|
4717
|
+
*
|
|
4718
|
+
* Emits `DepositPoked` if successful.
|
|
4719
|
+
**/
|
|
4720
|
+
pokeDeposit: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
4631
4721
|
/**
|
|
4632
4722
|
* Dispatch the given `call` from an account that the sender is authorised for through
|
|
4633
4723
|
* `add_proxy`.
|
|
@@ -4854,6 +4944,153 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
4854
4944
|
**/
|
|
4855
4945
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
4856
4946
|
};
|
|
4947
|
+
revive: {
|
|
4948
|
+
/**
|
|
4949
|
+
* Makes a call to an account, optionally transferring some balance.
|
|
4950
|
+
*
|
|
4951
|
+
* # Parameters
|
|
4952
|
+
*
|
|
4953
|
+
* * `dest`: Address of the contract to call.
|
|
4954
|
+
* * `value`: The balance to transfer from the `origin` to `dest`.
|
|
4955
|
+
* * `gas_limit`: The gas limit enforced when executing the constructor.
|
|
4956
|
+
* * `storage_deposit_limit`: The maximum amount of balance that can be charged from the
|
|
4957
|
+
* caller to pay for the storage consumed.
|
|
4958
|
+
* * `data`: The input data to pass to the contract.
|
|
4959
|
+
*
|
|
4960
|
+
* * If the account is a smart-contract account, the associated code will be
|
|
4961
|
+
* executed and any value will be transferred.
|
|
4962
|
+
* * If the account is a regular account, any value will be transferred.
|
|
4963
|
+
* * If no account exists and the call value is not less than `existential_deposit`,
|
|
4964
|
+
* a regular account will be created and any value will be transferred.
|
|
4965
|
+
**/
|
|
4966
|
+
call: AugmentedSubmittable<(dest: H160 | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: SpWeightsWeightV2Weight | {
|
|
4967
|
+
refTime?: any;
|
|
4968
|
+
proofSize?: any;
|
|
4969
|
+
} | string | Uint8Array, storageDepositLimit: Compact<u128> | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, Compact<u128>, SpWeightsWeightV2Weight, Compact<u128>, Bytes]>;
|
|
4970
|
+
/**
|
|
4971
|
+
* Dispatch an `call` with the origin set to the callers fallback address.
|
|
4972
|
+
*
|
|
4973
|
+
* Every `AccountId32` can control its corresponding fallback account. The fallback account
|
|
4974
|
+
* is the `AccountId20` with the last 12 bytes set to `0xEE`. This is essentially a
|
|
4975
|
+
* recovery function in case an `AccountId20` was used without creating a mapping first.
|
|
4976
|
+
**/
|
|
4977
|
+
dispatchAsFallbackAccount: AugmentedSubmittable<(call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
|
|
4978
|
+
/**
|
|
4979
|
+
* A raw EVM transaction, typically dispatched by an Ethereum JSON-RPC server.
|
|
4980
|
+
*
|
|
4981
|
+
* # Parameters
|
|
4982
|
+
*
|
|
4983
|
+
* * `payload`: The encoded [`crate::evm::TransactionSigned`].
|
|
4984
|
+
* * `gas_limit`: The gas limit enforced during contract execution.
|
|
4985
|
+
* * `storage_deposit_limit`: The maximum balance that can be charged to the caller for
|
|
4986
|
+
* storage usage.
|
|
4987
|
+
*
|
|
4988
|
+
* # Note
|
|
4989
|
+
*
|
|
4990
|
+
* This call cannot be dispatched directly; attempting to do so will result in a failed
|
|
4991
|
+
* transaction. It serves as a wrapper for an Ethereum transaction. When submitted, the
|
|
4992
|
+
* runtime converts it into a [`sp_runtime::generic::CheckedExtrinsic`] by recovering the
|
|
4993
|
+
* signer and validating the transaction.
|
|
4994
|
+
**/
|
|
4995
|
+
ethTransact: AugmentedSubmittable<(payload: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
|
4996
|
+
/**
|
|
4997
|
+
* Instantiates a contract from a previously deployed wasm binary.
|
|
4998
|
+
*
|
|
4999
|
+
* This function is identical to [`Self::instantiate_with_code`] but without the
|
|
5000
|
+
* code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary
|
|
5001
|
+
* must be supplied.
|
|
5002
|
+
**/
|
|
5003
|
+
instantiate: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: SpWeightsWeightV2Weight | {
|
|
5004
|
+
refTime?: any;
|
|
5005
|
+
proofSize?: any;
|
|
5006
|
+
} | string | Uint8Array, storageDepositLimit: Compact<u128> | AnyNumber | Uint8Array, codeHash: H256 | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Option<U8aFixed> | null | Uint8Array | U8aFixed | string) => SubmittableExtrinsic<ApiType>, [Compact<u128>, SpWeightsWeightV2Weight, Compact<u128>, H256, Bytes, Option<U8aFixed>]>;
|
|
5007
|
+
/**
|
|
5008
|
+
* Instantiates a new contract from the supplied `code` optionally transferring
|
|
5009
|
+
* some balance.
|
|
5010
|
+
*
|
|
5011
|
+
* This dispatchable has the same effect as calling [`Self::upload_code`] +
|
|
5012
|
+
* [`Self::instantiate`]. Bundling them together provides efficiency gains. Please
|
|
5013
|
+
* also check the documentation of [`Self::upload_code`].
|
|
5014
|
+
*
|
|
5015
|
+
* # Parameters
|
|
5016
|
+
*
|
|
5017
|
+
* * `value`: The balance to transfer from the `origin` to the newly created contract.
|
|
5018
|
+
* * `gas_limit`: The gas limit enforced when executing the constructor.
|
|
5019
|
+
* * `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved
|
|
5020
|
+
* from the caller to pay for the storage consumed.
|
|
5021
|
+
* * `code`: The contract code to deploy in raw bytes.
|
|
5022
|
+
* * `data`: The input data to pass to the contract constructor.
|
|
5023
|
+
* * `salt`: Used for the address derivation. If `Some` is supplied then `CREATE2`
|
|
5024
|
+
* semantics are used. If `None` then `CRATE1` is used.
|
|
5025
|
+
*
|
|
5026
|
+
*
|
|
5027
|
+
* Instantiation is executed as follows:
|
|
5028
|
+
*
|
|
5029
|
+
* - The supplied `code` is deployed, and a `code_hash` is created for that code.
|
|
5030
|
+
* - If the `code_hash` already exists on the chain the underlying `code` will be shared.
|
|
5031
|
+
* - The destination address is computed based on the sender, code_hash and the salt.
|
|
5032
|
+
* - The smart-contract account is created at the computed address.
|
|
5033
|
+
* - The `value` is transferred to the new account.
|
|
5034
|
+
* - The `deploy` function is executed in the context of the newly-created account.
|
|
5035
|
+
**/
|
|
5036
|
+
instantiateWithCode: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: SpWeightsWeightV2Weight | {
|
|
5037
|
+
refTime?: any;
|
|
5038
|
+
proofSize?: any;
|
|
5039
|
+
} | string | Uint8Array, storageDepositLimit: Compact<u128> | AnyNumber | Uint8Array, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Option<U8aFixed> | null | Uint8Array | U8aFixed | string) => SubmittableExtrinsic<ApiType>, [Compact<u128>, SpWeightsWeightV2Weight, Compact<u128>, Bytes, Bytes, Option<U8aFixed>]>;
|
|
5040
|
+
/**
|
|
5041
|
+
* Register the callers account id so that it can be used in contract interactions.
|
|
5042
|
+
*
|
|
5043
|
+
* This will error if the origin is already mapped or is a eth native `Address20`. It will
|
|
5044
|
+
* take a deposit that can be released by calling [`Self::unmap_account`].
|
|
5045
|
+
**/
|
|
5046
|
+
mapAccount: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
5047
|
+
/**
|
|
5048
|
+
* Remove the code stored under `code_hash` and refund the deposit to its owner.
|
|
5049
|
+
*
|
|
5050
|
+
* A code can only be removed by its original uploader (its owner) and only if it is
|
|
5051
|
+
* not used by any contract.
|
|
5052
|
+
**/
|
|
5053
|
+
removeCode: AugmentedSubmittable<(codeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
|
5054
|
+
/**
|
|
5055
|
+
* Privileged function that changes the code of an existing contract.
|
|
5056
|
+
*
|
|
5057
|
+
* This takes care of updating refcounts and all other necessary operations. Returns
|
|
5058
|
+
* an error if either the `code_hash` or `dest` do not exist.
|
|
5059
|
+
*
|
|
5060
|
+
* # Note
|
|
5061
|
+
*
|
|
5062
|
+
* This does **not** change the address of the contract in question. This means
|
|
5063
|
+
* that the contract address is no longer derived from its code hash after calling
|
|
5064
|
+
* this dispatchable.
|
|
5065
|
+
**/
|
|
5066
|
+
setCode: AugmentedSubmittable<(dest: H160 | string | Uint8Array, codeHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H160, H256]>;
|
|
5067
|
+
/**
|
|
5068
|
+
* Unregister the callers account id in order to free the deposit.
|
|
5069
|
+
*
|
|
5070
|
+
* There is no reason to ever call this function other than freeing up the deposit.
|
|
5071
|
+
* This is only useful when the account should no longer be used.
|
|
5072
|
+
**/
|
|
5073
|
+
unmapAccount: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
|
5074
|
+
/**
|
|
5075
|
+
* Upload new `code` without instantiating a contract from it.
|
|
5076
|
+
*
|
|
5077
|
+
* If the code does not already exist a deposit is reserved from the caller
|
|
5078
|
+
* and unreserved only when [`Self::remove_code`] is called. The size of the reserve
|
|
5079
|
+
* depends on the size of the supplied `code`.
|
|
5080
|
+
*
|
|
5081
|
+
* # Note
|
|
5082
|
+
*
|
|
5083
|
+
* Anyone can instantiate a contract from any uploaded code and thus prevent its removal.
|
|
5084
|
+
* To avoid this situation a constructor could employ access control so that it can
|
|
5085
|
+
* only be instantiated by permissioned entities. The same is true when uploading
|
|
5086
|
+
* through [`Self::instantiate_with_code`].
|
|
5087
|
+
**/
|
|
5088
|
+
uploadCode: AugmentedSubmittable<(code: Bytes | string | Uint8Array, storageDepositLimit: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Compact<u128>]>;
|
|
5089
|
+
/**
|
|
5090
|
+
* Generic tx
|
|
5091
|
+
**/
|
|
5092
|
+
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
5093
|
+
};
|
|
4857
5094
|
session: {
|
|
4858
5095
|
/**
|
|
4859
5096
|
* Removes any session key(s) of the function caller.
|
|
@@ -5760,6 +5997,20 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
5760
5997
|
} | {
|
|
5761
5998
|
CumulusXcm: any;
|
|
5762
5999
|
} | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AssetHubKusamaRuntimeOriginCaller, Call]>;
|
|
6000
|
+
/**
|
|
6001
|
+
* Dispatches a function call with a provided origin.
|
|
6002
|
+
*
|
|
6003
|
+
* Almost the same as [`Pallet::dispatch_as`] but forwards any error of the inner call.
|
|
6004
|
+
*
|
|
6005
|
+
* The dispatch origin for this call must be _Root_.
|
|
6006
|
+
**/
|
|
6007
|
+
dispatchAsFallible: AugmentedSubmittable<(asOrigin: AssetHubKusamaRuntimeOriginCaller | {
|
|
6008
|
+
system: any;
|
|
6009
|
+
} | {
|
|
6010
|
+
PolkadotXcm: any;
|
|
6011
|
+
} | {
|
|
6012
|
+
CumulusXcm: any;
|
|
6013
|
+
} | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AssetHubKusamaRuntimeOriginCaller, Call]>;
|
|
5763
6014
|
/**
|
|
5764
6015
|
* Send a batch of dispatch calls.
|
|
5765
6016
|
* Unlike `batch`, it allows errors and won't interrupt.
|
|
@@ -5776,6 +6027,32 @@ declare module '@polkadot/api-base/types/submittable' {
|
|
|
5776
6027
|
* - O(C) where C is the number of calls to be batched.
|
|
5777
6028
|
**/
|
|
5778
6029
|
forceBatch: AugmentedSubmittable<(calls: Vec<Call> | (Call | IMethod | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<Call>]>;
|
|
6030
|
+
/**
|
|
6031
|
+
* Dispatch a fallback call in the event the main call fails to execute.
|
|
6032
|
+
* May be called from any origin except `None`.
|
|
6033
|
+
*
|
|
6034
|
+
* This function first attempts to dispatch the `main` call.
|
|
6035
|
+
* If the `main` call fails, the `fallback` is attemted.
|
|
6036
|
+
* if the fallback is successfully dispatched, the weights of both calls
|
|
6037
|
+
* are accumulated and an event containing the main call error is deposited.
|
|
6038
|
+
*
|
|
6039
|
+
* In the event of a fallback failure the whole call fails
|
|
6040
|
+
* with the weights returned.
|
|
6041
|
+
*
|
|
6042
|
+
* - `main`: The main call to be dispatched. This is the primary action to execute.
|
|
6043
|
+
* - `fallback`: The fallback call to be dispatched in case the `main` call fails.
|
|
6044
|
+
*
|
|
6045
|
+
* ## Dispatch Logic
|
|
6046
|
+
* - If the origin is `root`, both the main and fallback calls are executed without
|
|
6047
|
+
* applying any origin filters.
|
|
6048
|
+
* - If the origin is not `root`, the origin filter is applied to both the `main` and
|
|
6049
|
+
* `fallback` calls.
|
|
6050
|
+
*
|
|
6051
|
+
* ## Use Case
|
|
6052
|
+
* - Some use cases might involve submitting a `batch` type call in either main, fallback
|
|
6053
|
+
* or both.
|
|
6054
|
+
**/
|
|
6055
|
+
ifElse: AugmentedSubmittable<(main: Call | IMethod | string | Uint8Array, fallback: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Call]>;
|
|
5779
6056
|
/**
|
|
5780
6057
|
* Dispatch a function call with a specified weight.
|
|
5781
6058
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '@polkadot/api-base/types/consts';
|
|
2
2
|
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
|
3
|
-
import type { Bytes, Option, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
|
3
|
+
import type { Bytes, Option, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
|
4
4
|
import type { Codec } from '@polkadot/types-codec/types';
|
|
5
|
-
import type { Permill } from '@polkadot/types/interfaces/runtime';
|
|
5
|
+
import type { AccountId32, Perbill, Permill } from '@polkadot/types/interfaces/runtime';
|
|
6
6
|
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight, StagingXcmV4Location } from '@polkadot/types/lookup';
|
|
7
7
|
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
|
8
8
|
declare module '@polkadot/api-base/types/consts' {
|
|
@@ -126,6 +126,37 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
126
126
|
**/
|
|
127
127
|
[key: string]: Codec;
|
|
128
128
|
};
|
|
129
|
+
collatorSelection: {
|
|
130
|
+
kickThreshold: u32 & AugmentedConst<ApiType>;
|
|
131
|
+
/**
|
|
132
|
+
* Maximum number of candidates that we should have.
|
|
133
|
+
*
|
|
134
|
+
* This does not take into account the invulnerables.
|
|
135
|
+
**/
|
|
136
|
+
maxCandidates: u32 & AugmentedConst<ApiType>;
|
|
137
|
+
/**
|
|
138
|
+
* Maximum number of invulnerables.
|
|
139
|
+
**/
|
|
140
|
+
maxInvulnerables: u32 & AugmentedConst<ApiType>;
|
|
141
|
+
/**
|
|
142
|
+
* Minimum number eligible collators. Should always be greater than zero. This includes
|
|
143
|
+
* Invulnerable collators. This ensures that there will always be one collator who can
|
|
144
|
+
* produce a block.
|
|
145
|
+
**/
|
|
146
|
+
minEligibleCollators: u32 & AugmentedConst<ApiType>;
|
|
147
|
+
/**
|
|
148
|
+
* Gets this pallet's derived pot account.
|
|
149
|
+
**/
|
|
150
|
+
potAccount: AccountId32 & AugmentedConst<ApiType>;
|
|
151
|
+
/**
|
|
152
|
+
* Account Identifier from which the internal Pot is generated.
|
|
153
|
+
**/
|
|
154
|
+
potId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
|
155
|
+
/**
|
|
156
|
+
* Generic const
|
|
157
|
+
**/
|
|
158
|
+
[key: string]: Codec;
|
|
159
|
+
};
|
|
129
160
|
foreignAssets: {
|
|
130
161
|
/**
|
|
131
162
|
* The amount of funds that must be reserved when creating a new approval.
|
|
@@ -326,6 +357,17 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
326
357
|
**/
|
|
327
358
|
[key: string]: Codec;
|
|
328
359
|
};
|
|
360
|
+
polkadotXcm: {
|
|
361
|
+
/**
|
|
362
|
+
* The latest supported version that we advertise. Generally just set it to
|
|
363
|
+
* `pallet_xcm::CurrentXcmVersion`.
|
|
364
|
+
**/
|
|
365
|
+
advertisedXcmVersion: u32 & AugmentedConst<ApiType>;
|
|
366
|
+
/**
|
|
367
|
+
* Generic const
|
|
368
|
+
**/
|
|
369
|
+
[key: string]: Codec;
|
|
370
|
+
};
|
|
329
371
|
poolAssets: {
|
|
330
372
|
/**
|
|
331
373
|
* The amount of funds that must be reserved when creating a new approval.
|
|
@@ -407,6 +449,57 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
407
449
|
**/
|
|
408
450
|
[key: string]: Codec;
|
|
409
451
|
};
|
|
452
|
+
revive: {
|
|
453
|
+
/**
|
|
454
|
+
* The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID.
|
|
455
|
+
*
|
|
456
|
+
* This is a unique identifier assigned to each blockchain network,
|
|
457
|
+
* preventing replay attacks.
|
|
458
|
+
**/
|
|
459
|
+
chainId: u64 & AugmentedConst<ApiType>;
|
|
460
|
+
/**
|
|
461
|
+
* The percentage of the storage deposit that should be held for using a code hash.
|
|
462
|
+
* Instantiating a contract, protects the code from being removed. In order to prevent
|
|
463
|
+
* abuse these actions are protected with a percentage of the code deposit.
|
|
464
|
+
**/
|
|
465
|
+
codeHashLockupDepositPercent: Perbill & AugmentedConst<ApiType>;
|
|
466
|
+
/**
|
|
467
|
+
* The amount of balance a caller has to pay for each byte of storage.
|
|
468
|
+
*
|
|
469
|
+
* # Note
|
|
470
|
+
*
|
|
471
|
+
* It is safe to change this value on a live chain as all refunds are pro rata.
|
|
472
|
+
**/
|
|
473
|
+
depositPerByte: u128 & AugmentedConst<ApiType>;
|
|
474
|
+
/**
|
|
475
|
+
* The amount of balance a caller has to pay for each storage item.
|
|
476
|
+
*
|
|
477
|
+
* # Note
|
|
478
|
+
*
|
|
479
|
+
* It is safe to change this value on a live chain as all refunds are pro rata.
|
|
480
|
+
**/
|
|
481
|
+
depositPerItem: u128 & AugmentedConst<ApiType>;
|
|
482
|
+
/**
|
|
483
|
+
* The ratio between the decimal representation of the native token and the ETH token.
|
|
484
|
+
**/
|
|
485
|
+
nativeToEthRatio: u32 & AugmentedConst<ApiType>;
|
|
486
|
+
/**
|
|
487
|
+
* Make contract callable functions marked as `#[unstable]` available.
|
|
488
|
+
*
|
|
489
|
+
* Contracts that use `#[unstable]` functions won't be able to be uploaded unless
|
|
490
|
+
* this is set to `true`. This is only meant for testnets and dev nodes in order to
|
|
491
|
+
* experiment with new features.
|
|
492
|
+
*
|
|
493
|
+
* # Warning
|
|
494
|
+
*
|
|
495
|
+
* Do **not** set to `true` on productions chains.
|
|
496
|
+
**/
|
|
497
|
+
unsafeUnstableInterface: bool & AugmentedConst<ApiType>;
|
|
498
|
+
/**
|
|
499
|
+
* Generic const
|
|
500
|
+
**/
|
|
501
|
+
[key: string]: Codec;
|
|
502
|
+
};
|
|
410
503
|
stateTrieMigration: {
|
|
411
504
|
/**
|
|
412
505
|
* Maximal number of bytes that a key can have.
|