Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6fe638c5b | ||
|
|
ea72e3eb5b | ||
|
|
45c0e16ecd | ||
|
|
5b1823f7eb | ||
|
|
6e998cce3d | ||
|
|
c46740e4e8 | ||
|
|
4e5b98725b | ||
|
|
fca973cd53 | ||
|
|
d1c9a507d9 | ||
|
|
2cfd2f4d20 | ||
|
|
d3b90c068f | ||
|
|
3127c00d05 | ||
|
|
3cdf3065d7 | ||
|
|
973b1fcffb | ||
|
|
4195833d6f | ||
|
|
8f4e62c278 | ||
|
|
2c294af116 | ||
|
|
0f1f3b88b2 | ||
|
|
56b7697dda | ||
|
|
86d7471c76 | ||
|
|
cb7400710b | ||
|
|
59796067e2 | ||
|
|
7920565b97 | ||
|
|
4f0069cac8 | ||
|
|
835070c44f | ||
|
|
5368733353 | ||
|
|
efda09f279 | ||
|
|
af48f19dfa | ||
|
|
a0dd50b3ba | ||
|
|
3e159891c0 | ||
|
|
4b36fa68a5 | ||
|
|
70c9cfa0f0 | ||
|
|
3ce67375e3 | ||
|
|
10d611ba17 | ||
|
|
00acff5956 | ||
|
|
9857abd061 | ||
|
|
e87c830990 | ||
|
|
71063c93d1 | ||
|
|
e037df89e3 | ||
|
|
564d63ce28 | ||
|
|
69db63b6f9 | ||
|
|
2bd81e9d05 | ||
|
|
d267895dd5 | ||
|
|
190e0fcdb1 | ||
|
|
5e83837c5b | ||
|
|
7f949874e6 | ||
|
|
b024d7f63c | ||
|
|
4bc76bb3e5 | ||
|
|
212b43dda2 | ||
|
|
0ba1b318a7 | ||
|
|
2e8e5a93ca | ||
|
|
6101f82000 | ||
|
|
662aef2033 | ||
|
|
0859c470be | ||
|
|
29fe22da43 | ||
|
|
7eef825b38 | ||
|
|
24808fb55d | ||
|
|
9c06ed7a1c | ||
|
|
9560259f55 | ||
|
|
6236838fc8 | ||
|
|
e14eddfee3 | ||
|
|
0927f9ba8c | ||
|
|
a8775fd69d |
+3
-1
@@ -26,4 +26,6 @@
|
||||
4.16.2
|
||||
|
||||
5.3.2
|
||||
5.5.2
|
||||
5.5.2
|
||||
5.8.2
|
||||
5.8.3
|
||||
@@ -1,5 +1,71 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 5.9.1 Sep 13, 2021
|
||||
|
||||
Upgrade priority: Low. Recommended for chain using Xcm.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Adjust Centrifuge `ProxyType` (Thanks to https://github.com/branan)
|
||||
|
||||
Changes:
|
||||
|
||||
- Additional types for parachain Disputes
|
||||
- Adjust Xcm Error enum types
|
||||
- Add Polkadot 9090 upgrade block
|
||||
- Decoding enhancements with narrowing checks for TS
|
||||
|
||||
|
||||
## 5.8.3 Sep 6, 2021
|
||||
|
||||
Upgrade priority: Low.
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust Statemint, Rococo and Westend Xcm overrides
|
||||
|
||||
|
||||
## 5.8.2 Sep 6, 2021
|
||||
|
||||
Upgrade priority: Low.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Correct Xcm V1 `MultiLocation` definitions (Thanks to https://github.com/apopiak)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust Kusama Xcm overrides
|
||||
|
||||
|
||||
## 5.8.1 Sep 6, 2021
|
||||
|
||||
Upgrade priority: Low.
|
||||
|
||||
Changes:
|
||||
|
||||
- Add `Auction` to Kusama `ProxyType` definition
|
||||
- Adjust Xcm definitions with latest v1 & v2 types
|
||||
- Support for `scale-info` 1.0 `Range` mapping
|
||||
- Bump static metadata for latest Substrate, Polkadot & Kusama
|
||||
|
||||
|
||||
## 5.7.1 Aug 29, 2021
|
||||
|
||||
Upgrade priority: Low.
|
||||
|
||||
Changes:
|
||||
|
||||
- Optimize `Vec` construction (no re-create on new arrays)
|
||||
- Adjust output for enums in `toHuman`
|
||||
- Adjust aliases for new parachain module locations
|
||||
- Support for versioned xcm types (Polkadot master)
|
||||
- Add support for `Range` in `PortableRegistry` (used in Metadata 14)
|
||||
- Adjust balances derive for non-existent instances
|
||||
- Ensure Statemint (current) defaults to xcm v0
|
||||
- Add Kusama 9090 upgrade block
|
||||
|
||||
|
||||
## 5.6.1 Aug 23, 2021
|
||||
|
||||
Upgrade priority: Low. Recommended for users of Xcm, preparing for Kusama/Westend 9100
|
||||
|
||||
+1
-14
@@ -16,18 +16,5 @@ module.exports = {
|
||||
// eslint-disable-next-line sort-keys
|
||||
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
|
||||
},
|
||||
modulePathIgnorePatterns: [
|
||||
'<rootDir>/packages/api/build',
|
||||
'<rootDir>/packages/api-contract/build',
|
||||
'<rootDir>/packages/api-derive/build',
|
||||
'<rootDir>/packages/metadata/build',
|
||||
'<rootDir>/packages/rpc-core/build',
|
||||
'<rootDir>/packages/rpc-provider/build',
|
||||
'<rootDir>/packages/typegen/build',
|
||||
'<rootDir>/packages/types/build',
|
||||
'<rootDir>/packages/types-known/build',
|
||||
'<rootDir>/packages/types-support/build'
|
||||
],
|
||||
testTimeout: 30000,
|
||||
transformIgnorePatterns: ['/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)']
|
||||
testTimeout: 30000
|
||||
};
|
||||
|
||||
+7
-7
@@ -8,7 +8,7 @@
|
||||
"packages/*"
|
||||
],
|
||||
"resolutions": {
|
||||
"typescript": "^4.3.5"
|
||||
"typescript": "^4.4.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn build:interfaces && polkadot-dev-build-ts",
|
||||
@@ -26,15 +26,15 @@
|
||||
"test:watch": "polkadot-dev-run-test --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.15.0",
|
||||
"@babel/core": "^7.15.5",
|
||||
"@babel/register": "^7.15.3",
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/dev": "^0.62.60",
|
||||
"@polkadot/ts": "^0.4.4",
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/dev": "^0.62.66",
|
||||
"@polkadot/ts": "^0.4.7",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^26.0.24",
|
||||
"@types/jest": "^27.0.1",
|
||||
"copyfiles": "^2.4.1"
|
||||
},
|
||||
"version": "5.6.1",
|
||||
"version": "5.9.1",
|
||||
"packageManager": "yarn@3.0.1"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-contract",
|
||||
"version": "5.6.1",
|
||||
"version": "5.9.1",
|
||||
"type": "module",
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"main": "index.js",
|
||||
@@ -19,10 +19,10 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/api": "5.6.1",
|
||||
"@polkadot/types": "5.6.1",
|
||||
"@polkadot/util": "^7.2.1",
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/api": "5.9.1",
|
||||
"@polkadot/types": "5.9.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"rxjs": "^7.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', version: '5.6.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', version: '5.9.1' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-derive",
|
||||
"version": "5.6.1",
|
||||
"version": "5.9.1",
|
||||
"type": "module",
|
||||
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
|
||||
"main": "index.js",
|
||||
@@ -19,16 +19,16 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/api": "5.6.1",
|
||||
"@polkadot/rpc-core": "5.6.1",
|
||||
"@polkadot/types": "5.6.1",
|
||||
"@polkadot/util": "^7.2.1",
|
||||
"@polkadot/util-crypto": "^7.2.1",
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/api": "5.9.1",
|
||||
"@polkadot/rpc-core": "5.9.1",
|
||||
"@polkadot/types": "5.9.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/util-crypto": "^7.3.1",
|
||||
"rxjs": "^7.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^7.2.1",
|
||||
"@polkadot/rpc-provider": "5.6.1"
|
||||
"@polkadot/keyring": "^7.3.1",
|
||||
"@polkadot/rpc-provider": "5.9.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { ApiInterfaceRx, QueryableStorageMultiArg } from '@polkadot/api/types';
|
||||
import type { ApiInterfaceRx, QueryableStorageEntry } from '@polkadot/api/types';
|
||||
import type { AccountData, AccountId, AccountIndex, AccountInfo, Address, Balance, Index } from '@polkadot/types/interfaces';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
import type { DeriveBalancesAccount, DeriveBalancesAccountData } from '../types';
|
||||
|
||||
import { combineLatest, map, of, switchMap } from 'rxjs';
|
||||
|
||||
import { assert, isFunction } from '@polkadot/util';
|
||||
import { isFunction } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util';
|
||||
|
||||
@@ -39,15 +39,11 @@ function getBalance (api: ApiInterfaceRx, [freeBalance, reservedBalance, frozenF
|
||||
};
|
||||
}
|
||||
|
||||
function calcBalances (api: ApiInterfaceRx, [accountId, [accountNonce, balances]]: [AccountId, Result]): DeriveBalancesAccount {
|
||||
const primary = balances[0];
|
||||
|
||||
assert(primary, 'No balances retrieved for account');
|
||||
|
||||
function calcBalances (api: ApiInterfaceRx, [accountId, [accountNonce, [primary, ...additional]]]: [AccountId, Result]): DeriveBalancesAccount {
|
||||
return {
|
||||
accountId,
|
||||
accountNonce,
|
||||
additional: balances.filter((_, index) => index !== 0).map((b) => getBalance(api, b)),
|
||||
additional: additional.map((b) => getBalance(api, b)),
|
||||
...getBalance(api, primary)
|
||||
};
|
||||
}
|
||||
@@ -66,34 +62,44 @@ function queryBalancesFree (api: ApiInterfaceRx, accountId: AccountId): Observab
|
||||
);
|
||||
}
|
||||
|
||||
function querySystemNonce (api: ApiInterfaceRx, accountId: AccountId): Observable<Result> {
|
||||
return api.query.system.accountNonce<Index>(accountId).pipe(
|
||||
map((accountNonce): Result => [
|
||||
accountNonce,
|
||||
[[zeroBalance(api), zeroBalance(api), zeroBalance(api), zeroBalance(api)]]
|
||||
])
|
||||
);
|
||||
function queryNonceOnly (api: ApiInterfaceRx, accountId: AccountId): Observable<Result> {
|
||||
const fill = (nonce: Index): Result => [
|
||||
nonce,
|
||||
[[zeroBalance(api), zeroBalance(api), zeroBalance(api), zeroBalance(api)]]
|
||||
];
|
||||
|
||||
return isFunction(api.query.system.account)
|
||||
? api.query.system.account(accountId).pipe(
|
||||
map(({ nonce }) => fill(nonce))
|
||||
)
|
||||
: isFunction(api.query.system.accountNonce)
|
||||
? api.query.system.accountNonce<Index>(accountId).pipe(
|
||||
map((nonce) => fill(nonce))
|
||||
)
|
||||
: of(fill(api.registry.createType('Index')));
|
||||
}
|
||||
|
||||
function queryBalancesAccount (api: ApiInterfaceRx, accountId: AccountId, modules: string[] = ['balances']): Observable<Result> {
|
||||
const balances = modules.map(
|
||||
(m): QueryableStorageMultiArg<'rxjs'> => [
|
||||
(api.derive as DeriveCustomAccount)[m]?.customAccount || api.query[m].account,
|
||||
accountId
|
||||
]
|
||||
);
|
||||
const balances = modules
|
||||
.map((m): QueryableStorageEntry<'rxjs'> => (api.derive as DeriveCustomAccount)[m]?.customAccount || api.query[m]?.account)
|
||||
.filter((q) => isFunction(q))
|
||||
.map((q): [QueryableStorageEntry<'rxjs'>, AccountId] => [q, accountId]);
|
||||
|
||||
const extract = (data: AccountData[]) =>
|
||||
data.map(({ feeFrozen, free, miscFrozen, reserved }): BalanceResult => [free, reserved, feeFrozen, miscFrozen]);
|
||||
const extract = (nonce: Index, data: AccountData[]): Result => [
|
||||
nonce,
|
||||
data.map(({ feeFrozen, free, miscFrozen, reserved }): BalanceResult => [free, reserved, feeFrozen, miscFrozen])
|
||||
];
|
||||
|
||||
// NOTE this is for the first case where we do have instances specified
|
||||
return isFunction(api.query.system.account)
|
||||
? api.queryMulti<[AccountInfo, ...(AccountData[])]>([[api.query.system.account, accountId], ...balances]).pipe(
|
||||
map(([{ nonce }, ...balances]): Result => [nonce, extract(balances)])
|
||||
)
|
||||
: api.queryMulti<[Index, ...(AccountData[])]>([[api.query.system.accountNonce, accountId], ...balances]).pipe(
|
||||
map(([nonce, ...balances]): Result => [nonce, extract(balances)])
|
||||
);
|
||||
return balances.length
|
||||
? isFunction(api.query.system.account)
|
||||
? api.queryMulti<[AccountInfo, ...(AccountData[])]>([[api.query.system.account, accountId], ...balances]).pipe(
|
||||
map(([{ nonce }, ...balances]) => extract(nonce, balances))
|
||||
)
|
||||
: api.queryMulti<[Index, ...(AccountData[])]>([[api.query.system.accountNonce, accountId], ...balances]).pipe(
|
||||
map(([nonce, ...balances]) => extract(nonce, balances))
|
||||
)
|
||||
: queryNonceOnly(api, accountId);
|
||||
}
|
||||
|
||||
function querySystemAccount (api: ApiInterfaceRx, accountId: AccountId): Observable<Result> {
|
||||
@@ -140,10 +146,6 @@ function querySystemAccount (api: ApiInterfaceRx, accountId: AccountId): Observa
|
||||
*/
|
||||
export function account (instanceId: string, api: ApiInterfaceRx): (address: AccountIndex | AccountId | Address | string) => Observable<DeriveBalancesAccount> {
|
||||
const balanceInstances = api.registry.getModuleInstances(api.runtimeVersion.specName.toString(), 'balances');
|
||||
const empty: Result = [
|
||||
api.registry.createType('Index'),
|
||||
[[zeroBalance(api), zeroBalance(api), zeroBalance(api), zeroBalance(api)]]
|
||||
];
|
||||
|
||||
return memo(instanceId, (address: AccountIndex | AccountId | Address | string): Observable<DeriveBalancesAccount> =>
|
||||
api.derive.accounts.accountId(address).pipe(
|
||||
@@ -159,11 +161,12 @@ export function account (instanceId: string, api: ApiInterfaceRx): (address: Acc
|
||||
? queryBalancesAccount(api, accountId)
|
||||
: isFunction(api.query.balances?.freeBalance)
|
||||
? queryBalancesFree(api, accountId)
|
||||
: isFunction(api.query.system?.accountNonce)
|
||||
? querySystemNonce(api, accountId)
|
||||
: of(empty)
|
||||
: queryNonceOnly(api, accountId)
|
||||
])
|
||||
: of([api.registry.createType('AccountId'), empty])
|
||||
: of([api.registry.createType('AccountId'), [
|
||||
api.registry.createType('Index'),
|
||||
[[zeroBalance(api), zeroBalance(api), zeroBalance(api), zeroBalance(api)]]
|
||||
]])
|
||||
)
|
||||
),
|
||||
map((result): DeriveBalancesAccount => calcBalances(api, result))
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', version: '5.6.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', version: '5.9.1' };
|
||||
|
||||
+10
-10
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api",
|
||||
"version": "5.6.1",
|
||||
"version": "5.9.1",
|
||||
"type": "module",
|
||||
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
|
||||
"main": "index.js",
|
||||
@@ -19,15 +19,15 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/api-derive": "5.6.1",
|
||||
"@polkadot/keyring": "^7.2.1",
|
||||
"@polkadot/rpc-core": "5.6.1",
|
||||
"@polkadot/rpc-provider": "5.6.1",
|
||||
"@polkadot/types": "5.6.1",
|
||||
"@polkadot/types-known": "5.6.1",
|
||||
"@polkadot/util": "^7.2.1",
|
||||
"@polkadot/util-crypto": "^7.2.1",
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/api-derive": "5.9.1",
|
||||
"@polkadot/keyring": "^7.3.1",
|
||||
"@polkadot/rpc-core": "5.9.1",
|
||||
"@polkadot/rpc-provider": "5.9.1",
|
||||
"@polkadot/types": "5.9.1",
|
||||
"@polkadot/types-known": "5.9.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/util-crypto": "^7.3.1",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"rxjs": "^7.3.0"
|
||||
}
|
||||
|
||||
@@ -202,8 +202,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
**/
|
||||
cooloffPeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum period of locking and the period between a proposal being approved and
|
||||
* enacted.
|
||||
* The period between a proposal being approved and enacted.
|
||||
*
|
||||
* It should generally be a little more than the unstake period to ensure that
|
||||
* voting stakers have an opportunity to remove themselves from the system in the case
|
||||
@@ -243,6 +242,13 @@ declare module '@polkadot/api/types/consts' {
|
||||
* The amount of balance that must be deposited per byte of preimage stored.
|
||||
**/
|
||||
preimageByteDeposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum period of vote locking.
|
||||
*
|
||||
* It should be no shorter than enactment period to ensure that in the case of an approval,
|
||||
* those successful voters are locked into the consequences that their votes entail.
|
||||
**/
|
||||
voteLockingPeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* How often (in blocks) to check for new votes.
|
||||
**/
|
||||
@@ -859,6 +865,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
vesting: {
|
||||
maxVestingSchedules: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount transferred to call `vested_transfer`.
|
||||
**/
|
||||
|
||||
@@ -1538,13 +1538,22 @@ declare module '@polkadot/api/types/errors' {
|
||||
**/
|
||||
AmountLow: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An existing vesting schedule already exists for this account that cannot be clobbered.
|
||||
* The account already has `MaxVestingSchedules` count of schedules and thus
|
||||
* cannot add another one. Consider merging existing schedules in order to add another.
|
||||
**/
|
||||
ExistingVestingSchedule: AugmentedError<ApiType>;
|
||||
AtMaxVestingSchedules: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Failed to create a new schedule because some parameter was invalid.
|
||||
**/
|
||||
InvalidScheduleParams: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The account given is not vesting.
|
||||
**/
|
||||
NotVesting: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An index was out of bounds of the vesting schedules.
|
||||
**/
|
||||
ScheduleIndexOutOfBounds: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
|
||||
@@ -654,6 +654,10 @@ declare module '@polkadot/api/types/events' {
|
||||
* disambiguation_index\]
|
||||
**/
|
||||
AnonymousCreated: AugmentedEvent<ApiType, [AccountId, AccountId, ProxyType, u16]>;
|
||||
/**
|
||||
* A proxy was added. \[delegator, delegatee, proxy_type, delay\]
|
||||
**/
|
||||
ProxyAdded: AugmentedEvent<ApiType, [AccountId, AccountId, ProxyType, BlockNumber]>;
|
||||
/**
|
||||
* A proxy was executed correctly, with the given \[result\].
|
||||
**/
|
||||
@@ -1127,7 +1131,7 @@ declare module '@polkadot/api/types/events' {
|
||||
**/
|
||||
Frozen: AugmentedEvent<ApiType, [ClassId, InstanceId]>;
|
||||
/**
|
||||
* An asset `instace` was issued. \[ class, instance, owner \]
|
||||
* An asset `instance` was issued. \[ class, instance, owner \]
|
||||
**/
|
||||
Issued: AugmentedEvent<ApiType, [ClassId, InstanceId, AccountId]>;
|
||||
/**
|
||||
@@ -1156,7 +1160,7 @@ declare module '@polkadot/api/types/events' {
|
||||
**/
|
||||
Thawed: AugmentedEvent<ApiType, [ClassId, InstanceId]>;
|
||||
/**
|
||||
* An asset `instace` was transferred. \[ class, instance, from, to \]
|
||||
* An asset `instance` was transferred. \[ class, instance, from, to \]
|
||||
**/
|
||||
Transferred: AugmentedEvent<ApiType, [ClassId, InstanceId, AccountId, AccountId]>;
|
||||
/**
|
||||
@@ -1185,12 +1189,12 @@ declare module '@polkadot/api/types/events' {
|
||||
};
|
||||
vesting: {
|
||||
/**
|
||||
* An \[account\] has become fully vested. No further vesting can happen.
|
||||
* An \[account\] has become fully vested.
|
||||
**/
|
||||
VestingCompleted: AugmentedEvent<ApiType, [AccountId]>;
|
||||
/**
|
||||
* The amount vested has been updated. This could indicate more funds are available. The
|
||||
* balance given is the amount which is left unvested (and thus locked).
|
||||
* The amount vested has been updated. This could indicate a change in funds available.
|
||||
* The balance given is the amount which is left unvested (and thus locked).
|
||||
* \[account, unvested\]
|
||||
**/
|
||||
VestingUpdated: AugmentedEvent<ApiType, [AccountId, Balance]>;
|
||||
|
||||
@@ -1146,6 +1146,9 @@ declare module '@polkadot/api/types/storage' {
|
||||
eventCount: AugmentedQuery<ApiType, () => Observable<EventIndex>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Events deposited for the current block.
|
||||
*
|
||||
* NOTE: This storage item is explicitly unbounded since it is never intended to be read
|
||||
* from within the runtime.
|
||||
**/
|
||||
events: AugmentedQuery<ApiType, () => Observable<Vec<EventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
@@ -1372,10 +1375,16 @@ declare module '@polkadot/api/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
vesting: {
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
*
|
||||
* New networks start with latest version, as determined by the genesis build.
|
||||
**/
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<Releases>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Information regarding the vesting of a given account.
|
||||
**/
|
||||
vesting: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<VestingInfo>>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
|
||||
vesting: AugmentedQuery<ApiType, (arg: AccountId | string | Uint8Array) => Observable<Option<Vec<VestingInfo>>>, [AccountId]> & QueryableStorageEntry<ApiType, [AccountId]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
|
||||
@@ -4391,11 +4391,12 @@ declare module '@polkadot/api/types/submittable' {
|
||||
*
|
||||
* - `source`: The account whose funds should be transferred.
|
||||
* - `target`: The account that should be transferred the vested funds.
|
||||
* - `amount`: The amount of funds to transfer and will be vested.
|
||||
* - `schedule`: The vesting schedule attached to the transfer.
|
||||
*
|
||||
* Emits `VestingCreated`.
|
||||
*
|
||||
* NOTE: This will unlock all schedules through the current block.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(1)`.
|
||||
* - DbWeight: 4 Reads, 4 Writes
|
||||
@@ -4404,6 +4405,30 @@ declare module '@polkadot/api/types/submittable' {
|
||||
* # </weight>
|
||||
**/
|
||||
forceVestedTransfer: AugmentedSubmittable<(source: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, target: LookupSource | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, schedule: VestingInfo | { locked?: any; perBlock?: any; startingBlock?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [LookupSource, LookupSource, VestingInfo]>;
|
||||
/**
|
||||
* Merge two vesting schedules together, creating a new vesting schedule that unlocks over
|
||||
* the highest possible start and end blocks. If both schedules have already started the
|
||||
* current block will be used as the schedule start; with the caveat that if one schedule
|
||||
* is finished by the current block, the other will be treated as the new merged schedule,
|
||||
* unmodified.
|
||||
*
|
||||
* NOTE: If `schedule1_index == schedule2_index` this is a no-op.
|
||||
* NOTE: This will unlock all schedules through the current block prior to merging.
|
||||
* NOTE: If both schedules have ended by the current block, no new schedule will be created
|
||||
* and both will be removed.
|
||||
*
|
||||
* Merged schedule attributes:
|
||||
* - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,
|
||||
* current_block)`.
|
||||
* - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`.
|
||||
* - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`.
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* - `schedule1_index`: index of the first schedule to merge.
|
||||
* - `schedule2_index`: index of the second schedule to merge.
|
||||
**/
|
||||
mergeSchedules: AugmentedSubmittable<(schedule1Index: u32 | AnyNumber | Uint8Array, schedule2Index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
||||
/**
|
||||
* Unlock any vested funds of the sender account.
|
||||
*
|
||||
@@ -4425,12 +4450,13 @@ declare module '@polkadot/api/types/submittable' {
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_.
|
||||
*
|
||||
* - `target`: The account that should be transferred the vested funds.
|
||||
* - `amount`: The amount of funds to transfer and will be vested.
|
||||
* - `target`: The account receiving the vested funds.
|
||||
* - `schedule`: The vesting schedule attached to the transfer.
|
||||
*
|
||||
* Emits `VestingCreated`.
|
||||
*
|
||||
* NOTE: This will unlock all schedules through the current block.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(1)`.
|
||||
* - DbWeight: 3 Reads, 3 Writes
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', version: '5.6.1' };
|
||||
export const packageInfo = { name: '@polkadot/api', version: '5.9.1' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-core",
|
||||
"version": "5.6.1",
|
||||
"version": "5.9.1",
|
||||
"type": "module",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
@@ -19,13 +19,13 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/rpc-provider": "5.6.1",
|
||||
"@polkadot/types": "5.6.1",
|
||||
"@polkadot/util": "^7.2.1",
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/rpc-provider": "5.9.1",
|
||||
"@polkadot/types": "5.9.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"rxjs": "^7.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^7.2.1"
|
||||
"@polkadot/keyring": "^7.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,7 +305,7 @@ export class RpcCore {
|
||||
|
||||
subscriptionPromise = this._createSubscriber({ paramsJson, subName, subType, update }, errorHandler);
|
||||
} catch (error) {
|
||||
errorHandler(error);
|
||||
errorHandler(error as Error);
|
||||
}
|
||||
|
||||
// Teardown logic
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', version: '5.6.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', version: '5.9.1' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-provider",
|
||||
"version": "5.6.1",
|
||||
"version": "5.9.1",
|
||||
"type": "module",
|
||||
"description": "Transport providers for the API",
|
||||
"main": "index.js",
|
||||
@@ -19,19 +19,19 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/types": "5.6.1",
|
||||
"@polkadot/util": "^7.2.1",
|
||||
"@polkadot/util-crypto": "^7.2.1",
|
||||
"@polkadot/x-fetch": "^7.2.1",
|
||||
"@polkadot/x-global": "^7.2.1",
|
||||
"@polkadot/x-ws": "^7.2.1",
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/types": "5.9.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/util-crypto": "^7.3.1",
|
||||
"@polkadot/x-fetch": "^7.3.1",
|
||||
"@polkadot/x-global": "^7.3.1",
|
||||
"@polkadot/x-ws": "^7.3.1",
|
||||
"eventemitter3": "^4.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^7.2.1",
|
||||
"@polkadot/types": "5.6.1",
|
||||
"@polkadot/keyring": "^7.3.1",
|
||||
"@polkadot/types": "5.9.1",
|
||||
"mock-socket": "^9.0.3",
|
||||
"nock": "^13.1.1"
|
||||
"nock": "^13.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', version: '5.6.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', version: '5.9.1' };
|
||||
|
||||
@@ -418,7 +418,7 @@ export class WsProvider implements ProviderInterface {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
handler.callback(error, undefined);
|
||||
handler.callback(error as Error, undefined);
|
||||
}
|
||||
|
||||
delete this.#handlers[response.id];
|
||||
@@ -446,7 +446,7 @@ export class WsProvider implements ProviderInterface {
|
||||
|
||||
handler.callback(null, result);
|
||||
} catch (error) {
|
||||
handler.callback(error, undefined);
|
||||
handler.callback(error as Error, undefined);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ interface ReplyDef {
|
||||
};
|
||||
}
|
||||
|
||||
global.WebSocket = WebSocket;
|
||||
global.WebSocket = WebSocket as typeof global.WebSocket;
|
||||
|
||||
export const TEST_WS_URL = 'ws://localhost:9955';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/typegen",
|
||||
"version": "5.6.1",
|
||||
"version": "5.9.1",
|
||||
"type": "module",
|
||||
"description": "Type generation scripts",
|
||||
"main": "index.js",
|
||||
@@ -26,14 +26,14 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.15.0",
|
||||
"@babel/core": "^7.15.5",
|
||||
"@babel/register": "^7.15.3",
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/api": "5.6.1",
|
||||
"@polkadot/rpc-provider": "5.6.1",
|
||||
"@polkadot/types": "5.6.1",
|
||||
"@polkadot/types-support": "5.6.1",
|
||||
"@polkadot/util": "^7.2.1",
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/api": "5.9.1",
|
||||
"@polkadot/rpc-provider": "5.9.1",
|
||||
"@polkadot/types": "5.9.1",
|
||||
"@polkadot/types-support": "5.9.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"handlebars": "^4.7.7",
|
||||
"websocket": "^1.0.34",
|
||||
"yargs": "^17.1.1"
|
||||
|
||||
@@ -54,7 +54,7 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
|
||||
const keys = (sub as TypeDef[]).map((def, index): string => {
|
||||
const { info, name = `unknown${index}`, type } = def;
|
||||
const getter = stringUpperFirst(stringCamelCase(name.replace(' ', '_')));
|
||||
const isComplex = [TypeDefInfo.Struct, TypeDefInfo.Tuple, TypeDefInfo.Vec, TypeDefInfo.VecFixed].includes(info);
|
||||
const isComplex = [TypeDefInfo.Result, TypeDefInfo.Struct, TypeDefInfo.Tuple, TypeDefInfo.Vec, TypeDefInfo.VecFixed].includes(info);
|
||||
const asGetter = type === 'Null' || info === TypeDefInfo.DoNotConstruct
|
||||
? ''
|
||||
: createGetter(definitions, `as${getter}`, isComplex ? formatType(registry, definitions, info === TypeDefInfo.Struct ? def : type, imports) : type, imports);
|
||||
@@ -65,6 +65,7 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
|
||||
switch (info) {
|
||||
case TypeDefInfo.Compact:
|
||||
case TypeDefInfo.Plain:
|
||||
case TypeDefInfo.Result:
|
||||
case TypeDefInfo.Struct:
|
||||
case TypeDefInfo.Tuple:
|
||||
case TypeDefInfo.Vec:
|
||||
@@ -76,7 +77,7 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
|
||||
return '';
|
||||
|
||||
default:
|
||||
throw new Error(`Enum: ${enumName || 'undefined'}: Unhandled type ${TypeDefInfo[info]}`);
|
||||
throw new Error(`Enum: ${enumName || 'undefined'}: Unhandled nested "${TypeDefInfo[info]}" type`);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/typegen', version: '5.6.1' };
|
||||
export const packageInfo = { name: '@polkadot/typegen', version: '5.9.1' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types-known",
|
||||
"version": "5.6.1",
|
||||
"version": "5.9.1",
|
||||
"type": "module",
|
||||
"description": "Known type definitions",
|
||||
"main": "index.js",
|
||||
@@ -19,9 +19,9 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/networks": "^7.2.1",
|
||||
"@polkadot/types": "5.6.1",
|
||||
"@polkadot/util": "^7.2.1"
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/networks": "^7.3.1",
|
||||
"@polkadot/types": "5.9.1",
|
||||
"@polkadot/util": "^7.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,9 +48,24 @@ const typesModules: Record<string, OverrideModuleType> = {
|
||||
inclusion: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
paraDisputes: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
paraInclusion: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
paraScheduler: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
paraShared: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
parachains: {
|
||||
Id: 'ParaId'
|
||||
},
|
||||
parasDisputes: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
parasInclusion: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-known', version: '5.6.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-known', version: '5.9.1' };
|
||||
|
||||
@@ -66,19 +66,48 @@ const sharedTypes = {
|
||||
RegistryInfo: {
|
||||
fields: 'Vec<Bytes>',
|
||||
ownerCanBurn: 'bool'
|
||||
},
|
||||
|
||||
ProxyType: {
|
||||
_enum: [
|
||||
'Any',
|
||||
'NonTransfer',
|
||||
'Governance',
|
||||
'Staking',
|
||||
'NonProxy'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
const standaloneTypes = {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'LookupSource',
|
||||
LookupSource: 'IndicesLookupSource',
|
||||
Multiplier: 'Fixed64',
|
||||
RefCount: 'RefCountTo259'
|
||||
};
|
||||
|
||||
const versioned: OverrideVersionedType[] = [
|
||||
{
|
||||
minmax: [240, 999],
|
||||
minmax: [240, 243],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'LookupSource',
|
||||
LookupSource: 'IndicesLookupSource',
|
||||
Multiplier: 'Fixed64',
|
||||
RefCount: 'RefCountTo259'
|
||||
...standaloneTypes,
|
||||
ProxyType: {
|
||||
_enum: [
|
||||
'Any',
|
||||
'NonTransfer',
|
||||
'Governance',
|
||||
'Staking',
|
||||
'Vesting'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [244, 999],
|
||||
types: {
|
||||
...standaloneTypes
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ const sharedTypes = {
|
||||
RawSolution: 'RawSolutionWith24',
|
||||
Keys: 'SessionKeys6',
|
||||
ProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy']
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy', 'Auction']
|
||||
}
|
||||
};
|
||||
|
||||
@@ -195,6 +195,9 @@ const versioned: OverrideVersionedType[] = [
|
||||
...sharedTypes,
|
||||
AssetInstance: 'AssetInstanceV0',
|
||||
MultiAsset: 'MultiAssetV0',
|
||||
MultiLocation: 'MultiLocationV0',
|
||||
Response: 'ResponseV0',
|
||||
Xcm: 'XcmV0',
|
||||
XcmOrder: 'XcmOrderV0'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,13 @@ const versioned: OverrideVersionedType[] = [
|
||||
{
|
||||
minmax: [229, undefined],
|
||||
types: {
|
||||
...sharedTypes
|
||||
...sharedTypes,
|
||||
AssetInstance: 'AssetInstanceV0',
|
||||
MultiAsset: 'MultiAssetV0',
|
||||
MultiLocation: 'MultiLocationV0',
|
||||
Response: 'ResponseV0',
|
||||
Xcm: 'XcmV0',
|
||||
XcmOrder: 'XcmOrderV0'
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import type { OverrideVersionedType } from '@polkadot/types/types';
|
||||
|
||||
// these are override types for Polkadot
|
||||
// these are override types for Statemine, Statemint, Westmint
|
||||
const versioned: OverrideVersionedType[] = [
|
||||
{
|
||||
minmax: [0, undefined],
|
||||
@@ -21,7 +21,13 @@ const versioned: OverrideVersionedType[] = [
|
||||
'AssetManager',
|
||||
'Staking'
|
||||
]
|
||||
}
|
||||
},
|
||||
AssetInstance: 'AssetInstanceV0',
|
||||
MultiAsset: 'MultiAssetV0',
|
||||
MultiLocation: 'MultiLocationV0',
|
||||
Response: 'ResponseV0',
|
||||
Xcm: 'XcmV0',
|
||||
XcmOrder: 'XcmOrderV0'
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -94,6 +94,9 @@ const versioned: OverrideVersionedType[] = [
|
||||
...sharedTypes,
|
||||
AssetInstance: 'AssetInstanceV0',
|
||||
MultiAsset: 'MultiAssetV0',
|
||||
MultiLocation: 'MultiLocationV0',
|
||||
Response: 'ResponseV0',
|
||||
Xcm: 'XcmV0',
|
||||
XcmOrder: 'XcmOrderV0'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ const upgrades: ChainUpgradesRaw = [
|
||||
[2962294, 2012], [3240000, 2013], [3274408, 2015], [3323565, 2019], [3534175, 2022],
|
||||
[3860281, 2023], [4143129, 2024], [4401242, 2025], [4841367, 2026], [5961600, 2027],
|
||||
[6137912, 2028], [6561855, 2029], [7100891, 2030], [7468792, 9010], [7668600, 9030],
|
||||
[7812476, 9040], [8010981, 9050], [8073833, 9070], [8555825, 9080]
|
||||
[7812476, 9040], [8010981, 9050], [8073833, 9070], [8555825, 9080], [8945245, 9090]
|
||||
];
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -9,7 +9,7 @@ const upgrades: ChainUpgradesRaw = [
|
||||
[528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17],
|
||||
[1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25], [2436698, 26],
|
||||
[3613564, 27], [3899547, 28], [4345767, 29], [4876134, 30], [5661442, 9050],
|
||||
[6321619, 9080]
|
||||
[6321619, 9080], [6713249, 9090]
|
||||
];
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types-support",
|
||||
"version": "5.6.1",
|
||||
"version": "5.9.1",
|
||||
"type": "module",
|
||||
"description": "Supporting files for types, mostly for testing",
|
||||
"main": "index.js",
|
||||
@@ -19,7 +19,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-support#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/util": "^7.2.1"
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/util": "^7.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
## extraction
|
||||
|
||||
For Substrate & Polkadot (dev chains) -
|
||||
|
||||
`cargo run --release -- purge-chain -y --dev && cargo run --release -- --dev`
|
||||
|
||||
For Kusama -
|
||||
|
||||
`cargo run --release -- purge-chain -y --chain kusama-dev && cargo run --release -- --chain kusama-dev`
|
||||
|
||||
To retrieve the metadata -
|
||||
|
||||
`curl -H "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "state_getMetadata", "params":[]}' http://localhost:9933`
|
||||
File diff suppressed because one or more lines are too long
@@ -130,7 +130,10 @@
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" Events deposited for the current block."
|
||||
" Events deposited for the current block.",
|
||||
"",
|
||||
" NOTE: This storage item is explicitly unbounded since it is never intended to be read",
|
||||
" from within the runtime."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -500,7 +503,7 @@
|
||||
{
|
||||
"name": "Version",
|
||||
"type": "RuntimeVersion",
|
||||
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000822300000000000038df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0100000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a80100000005000000",
|
||||
"value": "0x186b7573616d61347061726974792d6b7573616d61020000008c2300000000000038df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0100000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a80100000005000000",
|
||||
"docs": [
|
||||
" Get the chain's current version."
|
||||
]
|
||||
@@ -4947,8 +4950,7 @@
|
||||
"type": "BlockNumber",
|
||||
"value": "0x00c20100",
|
||||
"docs": [
|
||||
" The minimum period of locking and the period between a proposal being approved and",
|
||||
" enacted.",
|
||||
" The period between a proposal being approved and enacted.",
|
||||
"",
|
||||
" It should generally be a little more than the unstake period to ensure that",
|
||||
" voting stakers have an opportunity to remove themselves from the system in the case",
|
||||
@@ -4971,6 +4973,17 @@
|
||||
" How often (in blocks) to check for new votes."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VoteLockingPeriod",
|
||||
"type": "BlockNumber",
|
||||
"value": "0x00c20100",
|
||||
"docs": [
|
||||
" The minimum period of vote locking.",
|
||||
"",
|
||||
" It should be no shorter than enactment period to ensure that in the case of an approval,",
|
||||
" those successful voters are locked into the consequences that their votes entail."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MinimumDeposit",
|
||||
"type": "BalanceOf",
|
||||
@@ -9804,7 +9817,7 @@
|
||||
"map": {
|
||||
"hasher": "Blake2_128Concat",
|
||||
"key": "AccountId",
|
||||
"value": "VestingInfo",
|
||||
"value": "Vec<VestingInfo>",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
@@ -9812,6 +9825,19 @@
|
||||
"docs": [
|
||||
" Information regarding the vesting of a given account."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "StorageVersion",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"plain": "Releases"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" Storage version of the pallet.",
|
||||
"",
|
||||
" New networks start with latest version, as determined by the genesis build."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -9878,12 +9904,13 @@
|
||||
"",
|
||||
" The dispatch origin for this call must be _Signed_.",
|
||||
"",
|
||||
" - `target`: The account that should be transferred the vested funds.",
|
||||
" - `amount`: The amount of funds to transfer and will be vested.",
|
||||
" - `target`: The account receiving the vested funds.",
|
||||
" - `schedule`: The vesting schedule attached to the transfer.",
|
||||
"",
|
||||
" Emits `VestingCreated`.",
|
||||
"",
|
||||
" NOTE: This will unlock all schedules through the current block.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(1)`.",
|
||||
" - DbWeight: 3 Reads, 3 Writes",
|
||||
@@ -9915,11 +9942,12 @@
|
||||
"",
|
||||
" - `source`: The account whose funds should be transferred.",
|
||||
" - `target`: The account that should be transferred the vested funds.",
|
||||
" - `amount`: The amount of funds to transfer and will be vested.",
|
||||
" - `schedule`: The vesting schedule attached to the transfer.",
|
||||
"",
|
||||
" Emits `VestingCreated`.",
|
||||
"",
|
||||
" NOTE: This will unlock all schedules through the current block.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(1)`.",
|
||||
" - DbWeight: 4 Reads, 4 Writes",
|
||||
@@ -9927,6 +9955,42 @@
|
||||
" - Writes: Vesting Storage, Balances Locks, Target Account, Source Account",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "merge_schedules",
|
||||
"args": [
|
||||
{
|
||||
"name": "schedule1_index",
|
||||
"type": "u32"
|
||||
},
|
||||
{
|
||||
"name": "schedule2_index",
|
||||
"type": "u32"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Merge two vesting schedules together, creating a new vesting schedule that unlocks over",
|
||||
" the highest possible start and end blocks. If both schedules have already started the",
|
||||
" current block will be used as the schedule start; with the caveat that if one schedule",
|
||||
" is finished by the current block, the other will be treated as the new merged schedule,",
|
||||
" unmodified.",
|
||||
"",
|
||||
" NOTE: If `schedule1_index == schedule2_index` this is a no-op.",
|
||||
" NOTE: This will unlock all schedules through the current block prior to merging.",
|
||||
" NOTE: If both schedules have ended by the current block, no new schedule will be created",
|
||||
" and both will be removed.",
|
||||
"",
|
||||
" Merged schedule attributes:",
|
||||
" - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,",
|
||||
" current_block)`.",
|
||||
" - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`.",
|
||||
" - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`.",
|
||||
"",
|
||||
" The dispatch origin for this call must be _Signed_.",
|
||||
"",
|
||||
" - `schedule1_index`: index of the first schedule to merge.",
|
||||
" - `schedule2_index`: index of the second schedule to merge."
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -9937,8 +10001,8 @@
|
||||
"Balance"
|
||||
],
|
||||
"docs": [
|
||||
" The amount vested has been updated. This could indicate more funds are available. The",
|
||||
" balance given is the amount which is left unvested (and thus locked).",
|
||||
" The amount vested has been updated. This could indicate a change in funds available.",
|
||||
" The balance given is the amount which is left unvested (and thus locked).",
|
||||
" \\[account, unvested\\]"
|
||||
]
|
||||
},
|
||||
@@ -9948,7 +10012,7 @@
|
||||
"AccountId"
|
||||
],
|
||||
"docs": [
|
||||
" An \\[account\\] has become fully vested. No further vesting can happen."
|
||||
" An \\[account\\] has become fully vested."
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -9960,6 +10024,12 @@
|
||||
"docs": [
|
||||
" The minimum amount transferred to call `vested_transfer`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MaxVestingSchedules",
|
||||
"type": "u32",
|
||||
"value": "0x1c000000",
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"errors": [
|
||||
@@ -9970,9 +10040,10 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ExistingVestingSchedule",
|
||||
"name": "AtMaxVestingSchedules",
|
||||
"docs": [
|
||||
" An existing vesting schedule already exists for this account that cannot be clobbered."
|
||||
" The account already has `MaxVestingSchedules` count of schedules and thus",
|
||||
" cannot add another one. Consider merging existing schedules in order to add another."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -9980,6 +10051,18 @@
|
||||
"docs": [
|
||||
" Amount being transferred is too low to create a vesting schedule."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ScheduleIndexOutOfBounds",
|
||||
"docs": [
|
||||
" An index was out of bounds of the vesting schedules."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidScheduleParams",
|
||||
"docs": [
|
||||
" Failed to create a new schedule because some parameter was invalid."
|
||||
]
|
||||
}
|
||||
],
|
||||
"index": 28
|
||||
@@ -10710,6 +10793,18 @@
|
||||
"docs": [
|
||||
" An announcement was placed to make a call in the future. \\[real, proxy, call_hash\\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ProxyAdded",
|
||||
"args": [
|
||||
"AccountId",
|
||||
"AccountId",
|
||||
"ProxyType",
|
||||
"BlockNumber"
|
||||
],
|
||||
"docs": [
|
||||
" A proxy was added. \\[delegator, delegatee, proxy_type, delay\\]"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
@@ -13544,7 +13639,7 @@
|
||||
"type": {
|
||||
"map": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key": "ValidatorIndex",
|
||||
"key": "ParaValidatorIndex",
|
||||
"value": "AvailabilityBitfieldRecord",
|
||||
"linked": false
|
||||
}
|
||||
@@ -13846,7 +13941,7 @@
|
||||
"name": "ValidatorGroups",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"plain": "Vec<Vec<ValidatorIndex>>"
|
||||
"plain": "Vec<Vec<ParaValidatorIndex>>"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
@@ -16457,7 +16552,142 @@
|
||||
"name": "XcmPallet",
|
||||
"storage": {
|
||||
"prefix": "XcmPallet",
|
||||
"items": []
|
||||
"items": [
|
||||
{
|
||||
"name": "QueryCounter",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"plain": "QueryId"
|
||||
},
|
||||
"fallback": "0x0000000000000000",
|
||||
"docs": [
|
||||
" The latest available query index."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Queries",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"map": {
|
||||
"hasher": "Blake2_128Concat",
|
||||
"key": "QueryId",
|
||||
"value": "QueryStatus",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" The ongoing queries."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "AssetTraps",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"map": {
|
||||
"hasher": "Identity",
|
||||
"key": "H256",
|
||||
"value": "u32",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
"fallback": "0x00000000",
|
||||
"docs": [
|
||||
" The existing asset traps.",
|
||||
"",
|
||||
" Key is the blake2 256 hash of (origin, versioned `MultiAssets`) pair. Value is the number of",
|
||||
" times this pair has been trapped (usually just 1 if it exists at all)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SafeXcmVersion",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"plain": "XcmVersion"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" Default version to encode XCM when latest version of destination is unknown. If `None`,",
|
||||
" then the destinations whose XCM version is unknown are considered unreachable."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SupportedVersion",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"doubleMap": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key1": "XcmVersion",
|
||||
"key2": "VersionedMultiLocation",
|
||||
"value": "XcmVersion",
|
||||
"key2Hasher": "Blake2_128Concat"
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" Latest versions that we know various locations support."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VersionNotifiers",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"doubleMap": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key1": "XcmVersion",
|
||||
"key2": "VersionedMultiLocation",
|
||||
"value": "QueryId",
|
||||
"key2Hasher": "Blake2_128Concat"
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" All locations that we have requested version notifications from."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VersionNotifyTargets",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"doubleMap": {
|
||||
"hasher": "Twox64Concat",
|
||||
"key1": "XcmVersion",
|
||||
"key2": "VersionedMultiLocation",
|
||||
"value": "(QueryId,u64,XcmVersion)",
|
||||
"key2Hasher": "Blake2_128Concat"
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" The target locations that are subscribed to our version changes, as well as the most recent",
|
||||
" of our versions we informed them of."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VersionDiscoveryQueue",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"plain": "Vec<(VersionedMultiLocation,u32)>"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" Destinations whose latest XCM version we would like to know. Duplicates not allowed, and",
|
||||
" the `u32` counter is the number of times that a send to the destination has been attempted,",
|
||||
" which is used as a prioritization."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CurrentMigration",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"plain": "VersionMigrationStage"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" The current migration's stage, if any."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"calls": [
|
||||
{
|
||||
@@ -16465,11 +16695,11 @@
|
||||
"args": [
|
||||
{
|
||||
"name": "dest",
|
||||
"type": "MultiLocation"
|
||||
"type": "VersionedMultiLocation"
|
||||
},
|
||||
{
|
||||
"name": "message",
|
||||
"type": "Xcm"
|
||||
"type": "VersionedXcm"
|
||||
}
|
||||
],
|
||||
"docs": []
|
||||
@@ -16479,23 +16709,19 @@
|
||||
"args": [
|
||||
{
|
||||
"name": "dest",
|
||||
"type": "MultiLocation"
|
||||
"type": "VersionedMultiLocation"
|
||||
},
|
||||
{
|
||||
"name": "beneficiary",
|
||||
"type": "MultiLocation"
|
||||
"type": "VersionedMultiLocation"
|
||||
},
|
||||
{
|
||||
"name": "assets",
|
||||
"type": "MultiAssets"
|
||||
"type": "VersionedMultiAssets"
|
||||
},
|
||||
{
|
||||
"name": "fee_asset_item",
|
||||
"type": "u32"
|
||||
},
|
||||
{
|
||||
"name": "dest_weight",
|
||||
"type": "Weight"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
@@ -16519,23 +16745,19 @@
|
||||
"args": [
|
||||
{
|
||||
"name": "dest",
|
||||
"type": "MultiLocation"
|
||||
"type": "VersionedMultiLocation"
|
||||
},
|
||||
{
|
||||
"name": "beneficiary",
|
||||
"type": "MultiLocation"
|
||||
"type": "VersionedMultiLocation"
|
||||
},
|
||||
{
|
||||
"name": "assets",
|
||||
"type": "MultiAssets"
|
||||
"type": "VersionedMultiAssets"
|
||||
},
|
||||
{
|
||||
"name": "fee_asset_item",
|
||||
"type": "u32"
|
||||
},
|
||||
{
|
||||
"name": "dest_weight",
|
||||
"type": "Weight"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
@@ -16551,8 +16773,8 @@
|
||||
" an `AccountId32` value.",
|
||||
" - `assets`: The assets to be withdrawn. This should include the assets used to pay the fee on the",
|
||||
" `dest` side.",
|
||||
" - `dest_weight`: Equal to the total weight on `dest` of the XCM message",
|
||||
" `ReserveAssetDeposited { assets, effects: [ BuyExecution{..}, DepositAsset{..} ] }`."
|
||||
" - `fee_asset_item`: The index into `assets` of the item which should be used to pay",
|
||||
" fees."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -16560,7 +16782,7 @@
|
||||
"args": [
|
||||
{
|
||||
"name": "message",
|
||||
"type": "Xcm"
|
||||
"type": "VersionedXcm"
|
||||
},
|
||||
{
|
||||
"name": "max_weight",
|
||||
@@ -16580,6 +16802,75 @@
|
||||
" NOTE: A successful return to this does *not* imply that the `msg` was executed successfully",
|
||||
" to completion; only that *some* of it was executed."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "force_xcm_version",
|
||||
"args": [
|
||||
{
|
||||
"name": "location",
|
||||
"type": "MultiLocation"
|
||||
},
|
||||
{
|
||||
"name": "xcm_version",
|
||||
"type": "XcmVersion"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Extoll that a particular destination can be communicated with through a particular",
|
||||
" version of XCM.",
|
||||
"",
|
||||
" - `origin`: Must be Root.",
|
||||
" - `location`: The destination that is being described.",
|
||||
" - `xcm_version`: The latest version of XCM that `location` supports."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "force_default_xcm_version",
|
||||
"args": [
|
||||
{
|
||||
"name": "maybe_xcm_version",
|
||||
"type": "Option<XcmVersion>"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Set a safe XCM version (the version that XCM should be encoded with if the most recent",
|
||||
" version a destination can accept is unknown).",
|
||||
"",
|
||||
" - `origin`: Must be Root.",
|
||||
" - `maybe_xcm_version`: The default XCM encoding version, or `None` to disable."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "force_subscribe_version_notify",
|
||||
"args": [
|
||||
{
|
||||
"name": "location",
|
||||
"type": "VersionedMultiLocation"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Ask a location to notify us regarding their XCM version and any changes to it.",
|
||||
"",
|
||||
" - `origin`: Must be Root.",
|
||||
" - `location`: The location to which we should subscribe for XCM version notifications."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "force_unsubscribe_version_notify",
|
||||
"args": [
|
||||
{
|
||||
"name": "location",
|
||||
"type": "VersionedMultiLocation"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Require that a particular destination should no longer notify us regarding any XCM",
|
||||
" version changes.",
|
||||
"",
|
||||
" - `origin`: Must be Root.",
|
||||
" - `location`: The location to which we are currently subscribed for XCM version",
|
||||
" notifications which we no longer desire."
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -16588,7 +16879,11 @@
|
||||
"args": [
|
||||
"Outcome"
|
||||
],
|
||||
"docs": []
|
||||
"docs": [
|
||||
" Execution of an XCM message was attempted.",
|
||||
"",
|
||||
" \\[ outcome \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Sent",
|
||||
@@ -16597,18 +16892,224 @@
|
||||
"MultiLocation",
|
||||
"Xcm"
|
||||
],
|
||||
"docs": []
|
||||
"docs": [
|
||||
" A XCM message was sent.",
|
||||
"",
|
||||
" \\[ origin, destination, message \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "UnexpectedResponse",
|
||||
"args": [
|
||||
"MultiLocation",
|
||||
"QueryId"
|
||||
],
|
||||
"docs": [
|
||||
" Query response received which does not match a registered query. This may be because a",
|
||||
" matching query was never registered, it may be because it is a duplicate response, or",
|
||||
" because the query timed out.",
|
||||
"",
|
||||
" \\[ origin location, id \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ResponseReady",
|
||||
"args": [
|
||||
"QueryId",
|
||||
"Response"
|
||||
],
|
||||
"docs": [
|
||||
" Query response has been received and is ready for taking with `take_response`. There is",
|
||||
" no registered notification call.",
|
||||
"",
|
||||
" \\[ id, response \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Notified",
|
||||
"args": [
|
||||
"QueryId",
|
||||
"u8",
|
||||
"u8"
|
||||
],
|
||||
"docs": [
|
||||
" Query response has been received and query is removed. The registered notification has",
|
||||
" been dispatched and executed successfully.",
|
||||
"",
|
||||
" \\[ id, pallet index, call index \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NotifyOverweight",
|
||||
"args": [
|
||||
"QueryId",
|
||||
"u8",
|
||||
"u8",
|
||||
"Weight",
|
||||
"Weight"
|
||||
],
|
||||
"docs": [
|
||||
" Query response has been received and query is removed. The registered notification could",
|
||||
" not be dispatched because the dispatch weight is greater than the maximum weight",
|
||||
" originally budgeted by this runtime for the query result.",
|
||||
"",
|
||||
" \\[ id, pallet index, call index, actual weight, max budgeted weight \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NotifyDispatchError",
|
||||
"args": [
|
||||
"QueryId",
|
||||
"u8",
|
||||
"u8"
|
||||
],
|
||||
"docs": [
|
||||
" Query response has been received and query is removed. There was a general error with",
|
||||
" dispatching the notification call.",
|
||||
"",
|
||||
" \\[ id, pallet index, call index \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NotifyDecodeFailed",
|
||||
"args": [
|
||||
"QueryId",
|
||||
"u8",
|
||||
"u8"
|
||||
],
|
||||
"docs": [
|
||||
" Query response has been received and query is removed. The dispatch was unable to be",
|
||||
" decoded into a `Call`; this might be due to dispatch function having a signature which",
|
||||
" is not `(origin, QueryId, Response)`.",
|
||||
"",
|
||||
" \\[ id, pallet index, call index \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidResponder",
|
||||
"args": [
|
||||
"MultiLocation",
|
||||
"QueryId",
|
||||
"Option<MultiLocation>"
|
||||
],
|
||||
"docs": [
|
||||
" Expected query response has been received but the origin location of the response does",
|
||||
" not match that expected. The query remains registered for a later, valid, response to",
|
||||
" be received and acted upon.",
|
||||
"",
|
||||
" \\[ origin location, id, expected location \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidResponderVersion",
|
||||
"args": [
|
||||
"MultiLocation",
|
||||
"QueryId"
|
||||
],
|
||||
"docs": [
|
||||
" Expected query response has been received but the expected origin location placed in",
|
||||
" storate by this runtime previously cannot be decoded. The query remains registered.",
|
||||
"",
|
||||
" This is unexpected (since a location placed in storage in a previously executing",
|
||||
" runtime should be readable prior to query timeout) and dangerous since the possibly",
|
||||
" valid response will be dropped. Manual governance intervention is probably going to be",
|
||||
" needed.",
|
||||
"",
|
||||
" \\[ origin location, id \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ResponseTaken",
|
||||
"args": [
|
||||
"QueryId"
|
||||
],
|
||||
"docs": [
|
||||
" Received query response has been read and removed.",
|
||||
"",
|
||||
" \\[ id \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "AssetsTrapped",
|
||||
"args": [
|
||||
"H256",
|
||||
"MultiLocation",
|
||||
"VersionedMultiAssets"
|
||||
],
|
||||
"docs": [
|
||||
" Some assets have been placed in an asset trap.",
|
||||
"",
|
||||
" \\[ hash, origin, assets \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VersionChangeNotified",
|
||||
"args": [
|
||||
"MultiLocation",
|
||||
"XcmVersion"
|
||||
],
|
||||
"docs": [
|
||||
" An XCM version change notification message has been attempted to be sent.",
|
||||
"",
|
||||
" \\[ destination, result \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SupportedVersionChanged",
|
||||
"args": [
|
||||
"MultiLocation",
|
||||
"XcmVersion"
|
||||
],
|
||||
"docs": [
|
||||
" The supported version of a location has been changed. This might be through an",
|
||||
" automatic notification or a manual intervention.",
|
||||
"",
|
||||
" \\[ location, XCM version \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NotifyTargetSendFail",
|
||||
"args": [
|
||||
"MultiLocation",
|
||||
"QueryId",
|
||||
"XcmError"
|
||||
],
|
||||
"docs": [
|
||||
" A given location which had a version change subscription was dropped owing to an error",
|
||||
" sending the notification to it.",
|
||||
"",
|
||||
" \\[ location, query ID, error \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NotifyTargetMigrationFail",
|
||||
"args": [
|
||||
"VersionedMultiLocation",
|
||||
"QueryId"
|
||||
],
|
||||
"docs": [
|
||||
" A given location which had a version change subscription was dropped owing to an error",
|
||||
" migrating the location to our new XCM format.",
|
||||
"",
|
||||
" \\[ location, query ID \\]"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [],
|
||||
"errors": [
|
||||
{
|
||||
"name": "Unreachable",
|
||||
"docs": []
|
||||
"docs": [
|
||||
" The desired destination was unreachable, generally because there is a no way of routing",
|
||||
" to it."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SendFailure",
|
||||
"docs": []
|
||||
"docs": [
|
||||
" There was some other issue (i.e. not to do with routing) in sending the message. Perhaps",
|
||||
" a lack of space for buffering the message."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Filtered",
|
||||
@@ -16622,6 +17123,12 @@
|
||||
" The message's weight could not be determined."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DestinationNotInvertible",
|
||||
"docs": [
|
||||
" The destination `MultiLocation` provided cannot be inverted."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Empty",
|
||||
"docs": [
|
||||
@@ -16645,6 +17152,31 @@
|
||||
"docs": [
|
||||
" Origin is invalid for sending."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "BadVersion",
|
||||
"docs": [
|
||||
" The version of the `Versioned` value used is not able to be interpreted."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "BadLocation",
|
||||
"docs": [
|
||||
" The given location could not be used (e.g. because it cannot be expressed in the",
|
||||
" desired version of XCM)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NoSubscription",
|
||||
"docs": [
|
||||
" The referenced subscription could not be found."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "AlreadySubscribed",
|
||||
"docs": [
|
||||
" The location is invalid since it already has a subscription from us."
|
||||
]
|
||||
}
|
||||
],
|
||||
"index": 99
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -130,7 +130,10 @@
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" Events deposited for the current block."
|
||||
" Events deposited for the current block.",
|
||||
"",
|
||||
" NOTE: This storage item is explicitly unbounded since it is never intended to be read",
|
||||
" from within the runtime."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -500,7 +503,7 @@
|
||||
{
|
||||
"name": "Version",
|
||||
"type": "RuntimeVersion",
|
||||
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f7400000000822300000000000038df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0100000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a80100000007000000",
|
||||
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f74000000008c2300000000000038df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0100000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a80100000007000000",
|
||||
"docs": [
|
||||
" Get the chain's current version."
|
||||
]
|
||||
@@ -5258,8 +5261,7 @@
|
||||
"type": "BlockNumber",
|
||||
"value": "0x00270600",
|
||||
"docs": [
|
||||
" The minimum period of locking and the period between a proposal being approved and",
|
||||
" enacted.",
|
||||
" The period between a proposal being approved and enacted.",
|
||||
"",
|
||||
" It should generally be a little more than the unstake period to ensure that",
|
||||
" voting stakers have an opportunity to remove themselves from the system in the case",
|
||||
@@ -5282,6 +5284,17 @@
|
||||
" How often (in blocks) to check for new votes."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VoteLockingPeriod",
|
||||
"type": "BlockNumber",
|
||||
"value": "0x00270600",
|
||||
"docs": [
|
||||
" The minimum period of vote locking.",
|
||||
"",
|
||||
" It should be no shorter than enactment period to ensure that in the case of an approval,",
|
||||
" those successful voters are locked into the consequences that their votes entail."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MinimumDeposit",
|
||||
"type": "BalanceOf",
|
||||
@@ -7690,7 +7703,7 @@
|
||||
"map": {
|
||||
"hasher": "Blake2_128Concat",
|
||||
"key": "AccountId",
|
||||
"value": "VestingInfo",
|
||||
"value": "Vec<VestingInfo>",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
@@ -7698,6 +7711,19 @@
|
||||
"docs": [
|
||||
" Information regarding the vesting of a given account."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "StorageVersion",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"plain": "Releases"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" Storage version of the pallet.",
|
||||
"",
|
||||
" New networks start with latest version, as determined by the genesis build."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -7764,12 +7790,13 @@
|
||||
"",
|
||||
" The dispatch origin for this call must be _Signed_.",
|
||||
"",
|
||||
" - `target`: The account that should be transferred the vested funds.",
|
||||
" - `amount`: The amount of funds to transfer and will be vested.",
|
||||
" - `target`: The account receiving the vested funds.",
|
||||
" - `schedule`: The vesting schedule attached to the transfer.",
|
||||
"",
|
||||
" Emits `VestingCreated`.",
|
||||
"",
|
||||
" NOTE: This will unlock all schedules through the current block.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(1)`.",
|
||||
" - DbWeight: 3 Reads, 3 Writes",
|
||||
@@ -7801,11 +7828,12 @@
|
||||
"",
|
||||
" - `source`: The account whose funds should be transferred.",
|
||||
" - `target`: The account that should be transferred the vested funds.",
|
||||
" - `amount`: The amount of funds to transfer and will be vested.",
|
||||
" - `schedule`: The vesting schedule attached to the transfer.",
|
||||
"",
|
||||
" Emits `VestingCreated`.",
|
||||
"",
|
||||
" NOTE: This will unlock all schedules through the current block.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(1)`.",
|
||||
" - DbWeight: 4 Reads, 4 Writes",
|
||||
@@ -7813,6 +7841,42 @@
|
||||
" - Writes: Vesting Storage, Balances Locks, Target Account, Source Account",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "merge_schedules",
|
||||
"args": [
|
||||
{
|
||||
"name": "schedule1_index",
|
||||
"type": "u32"
|
||||
},
|
||||
{
|
||||
"name": "schedule2_index",
|
||||
"type": "u32"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Merge two vesting schedules together, creating a new vesting schedule that unlocks over",
|
||||
" the highest possible start and end blocks. If both schedules have already started the",
|
||||
" current block will be used as the schedule start; with the caveat that if one schedule",
|
||||
" is finished by the current block, the other will be treated as the new merged schedule,",
|
||||
" unmodified.",
|
||||
"",
|
||||
" NOTE: If `schedule1_index == schedule2_index` this is a no-op.",
|
||||
" NOTE: This will unlock all schedules through the current block prior to merging.",
|
||||
" NOTE: If both schedules have ended by the current block, no new schedule will be created",
|
||||
" and both will be removed.",
|
||||
"",
|
||||
" Merged schedule attributes:",
|
||||
" - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,",
|
||||
" current_block)`.",
|
||||
" - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`.",
|
||||
" - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`.",
|
||||
"",
|
||||
" The dispatch origin for this call must be _Signed_.",
|
||||
"",
|
||||
" - `schedule1_index`: index of the first schedule to merge.",
|
||||
" - `schedule2_index`: index of the second schedule to merge."
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -7823,8 +7887,8 @@
|
||||
"Balance"
|
||||
],
|
||||
"docs": [
|
||||
" The amount vested has been updated. This could indicate more funds are available. The",
|
||||
" balance given is the amount which is left unvested (and thus locked).",
|
||||
" The amount vested has been updated. This could indicate a change in funds available.",
|
||||
" The balance given is the amount which is left unvested (and thus locked).",
|
||||
" \\[account, unvested\\]"
|
||||
]
|
||||
},
|
||||
@@ -7834,7 +7898,7 @@
|
||||
"AccountId"
|
||||
],
|
||||
"docs": [
|
||||
" An \\[account\\] has become fully vested. No further vesting can happen."
|
||||
" An \\[account\\] has become fully vested."
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -7846,6 +7910,12 @@
|
||||
"docs": [
|
||||
" The minimum amount transferred to call `vested_transfer`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MaxVestingSchedules",
|
||||
"type": "u32",
|
||||
"value": "0x1c000000",
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"errors": [
|
||||
@@ -7856,9 +7926,10 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ExistingVestingSchedule",
|
||||
"name": "AtMaxVestingSchedules",
|
||||
"docs": [
|
||||
" An existing vesting schedule already exists for this account that cannot be clobbered."
|
||||
" The account already has `MaxVestingSchedules` count of schedules and thus",
|
||||
" cannot add another one. Consider merging existing schedules in order to add another."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -7866,6 +7937,18 @@
|
||||
"docs": [
|
||||
" Amount being transferred is too low to create a vesting schedule."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ScheduleIndexOutOfBounds",
|
||||
"docs": [
|
||||
" An index was out of bounds of the vesting schedules."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidScheduleParams",
|
||||
"docs": [
|
||||
" Failed to create a new schedule because some parameter was invalid."
|
||||
]
|
||||
}
|
||||
],
|
||||
"index": 25
|
||||
@@ -9160,6 +9243,18 @@
|
||||
"docs": [
|
||||
" An announcement was placed to make a call in the future. \\[real, proxy, call_hash\\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ProxyAdded",
|
||||
"args": [
|
||||
"AccountId",
|
||||
"AccountId",
|
||||
"ProxyType",
|
||||
"BlockNumber"
|
||||
],
|
||||
"docs": [
|
||||
" A proxy was added. \\[delegator, delegatee, proxy_type, delay\\]"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -130,7 +130,10 @@
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" Events deposited for the current block."
|
||||
" Events deposited for the current block.",
|
||||
"",
|
||||
" NOTE: This storage item is explicitly unbounded since it is never intended to be read",
|
||||
" from within the runtime."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -5121,8 +5124,7 @@
|
||||
"type": "BlockNumber",
|
||||
"value": "0x002f0d00",
|
||||
"docs": [
|
||||
" The minimum period of locking and the period between a proposal being approved and",
|
||||
" enacted.",
|
||||
" The period between a proposal being approved and enacted.",
|
||||
"",
|
||||
" It should generally be a little more than the unstake period to ensure that",
|
||||
" voting stakers have an opportunity to remove themselves from the system in the case",
|
||||
@@ -5145,6 +5147,17 @@
|
||||
" How often (in blocks) to check for new votes."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "VoteLockingPeriod",
|
||||
"type": "BlockNumber",
|
||||
"value": "0x002f0d00",
|
||||
"docs": [
|
||||
" The minimum period of vote locking.",
|
||||
"",
|
||||
" It should be no shorter than enactment period to ensure that in the case of an approval,",
|
||||
" those successful voters are locked into the consequences that their votes entail."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MinimumDeposit",
|
||||
"type": "BalanceOf",
|
||||
@@ -7788,7 +7801,7 @@
|
||||
{
|
||||
"name": "Schedule",
|
||||
"type": "Schedule",
|
||||
"value": "0x040000000002000000010000800000001000000000100000000100002000000020000000004000000000020002000000810600004e6202009680030050150000ee180000c2090000cf140000b52600009a000000cc5101005dc002004d090000a206000059080000d80600002b1c0000d41e0000ec0900005ca8b5082d08000043070000e40a00000a0700008d0600000d0600009a0600001f08000010080000be0700008f080000040800004c080000ff07000024080000520800001d080000ac0700003608000029070000ec1f0000881e0000cb200000771e000032080000b7070000f2070000900900000d09000094080000810800001e0800008a25230000000000902e2300000000006c4e22000000000054624900000000008a53220000000000ea3e2200000000003e2c220000000000de18220000000000f04c220000000000ee3a220000000000b2054300000000004e5011000000000050d6650000000000f2030000000000005037410000000000e30100000000000050a02b2000000000587eaf290000000004ece30800000000d4e9550000000000ae7c7f0000000000cabfbe0700000000b90500000000000002af120000000000d2c0170000000000ead5bf07000000009601000000000000d2280c08000000005242e201000000006b03000000000000c2e5520a000000006a36c80f00000000a2c639080000000039010000000000001302000000000000d2b3ac22000000004a010000000000002d02000000000000de0600000000000086ad210000000000a11100000000000080ad220000000000f00b000000000000487b1e0000000000fe0400000000000092fe1e0000000000fe04000000000000",
|
||||
"value": "0x040000000002000000010000800000001000000000100000000100002000000020000000004000000000020002000000eb130000ae310000ab370000ba160000bb2b0000222000008c1a0000c83000005200000021e2020044620400151300005c1000005415000042150000f02600000731000070100000d5e3c402001600004016000011160000fb150000e5150000f815000026160000c01600004a16000070160000ac16000091160000cf160000d3160000eb160000f8150000f21600009d1600007a1600005c160000072f00000e250000d22f0000ad2400007c1a0000831600008716000002170000b51600008916000090160000a81600003ee4140000000000de0715000000000020e9140000000000aadd3b0000000000c4ea1400000000004af614000000000074fe14000000000044f714000000000088d614000000000084ee140000000000065f3100000000006276090000000000f0a6310000000000a504000000000000103d260000000000db020000000000007045df1f0000000028135a290000000056f6e60800000000a4bd4300000000003cfe6f000000000032eac2070000000078070000000000006c0f0c00000000001a3c0e0000000000007eb107000000005303000000000000b275fd0700000000c4bed00100000000170500000000000016ed470a000000003677ec24000000009a5c380800000000df02000000000000a2040000000000002888813700000000df02000000000000a0040000000000008b0800000000000028e015000000000085130000000000008a22170000000000b90d0000000000005cbe120000000000b906000000000000a8d6120000000000ba06000000000000",
|
||||
"docs": [
|
||||
" Cost schedule and limits."
|
||||
]
|
||||
@@ -7875,7 +7888,7 @@
|
||||
{
|
||||
"name": "DeletionQueueDepth",
|
||||
"type": "u32",
|
||||
"value": "0x18040000",
|
||||
"value": "0xed030000",
|
||||
"docs": [
|
||||
" The maximum number of tries that can be queued for deletion."
|
||||
]
|
||||
@@ -10864,7 +10877,7 @@
|
||||
"map": {
|
||||
"hasher": "Blake2_128Concat",
|
||||
"key": "AccountId",
|
||||
"value": "VestingInfo",
|
||||
"value": "Vec<VestingInfo>",
|
||||
"linked": false
|
||||
}
|
||||
},
|
||||
@@ -10872,6 +10885,19 @@
|
||||
"docs": [
|
||||
" Information regarding the vesting of a given account."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "StorageVersion",
|
||||
"modifier": "Default",
|
||||
"type": {
|
||||
"plain": "Releases"
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" Storage version of the pallet.",
|
||||
"",
|
||||
" New networks start with latest version, as determined by the genesis build."
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -10938,12 +10964,13 @@
|
||||
"",
|
||||
" The dispatch origin for this call must be _Signed_.",
|
||||
"",
|
||||
" - `target`: The account that should be transferred the vested funds.",
|
||||
" - `amount`: The amount of funds to transfer and will be vested.",
|
||||
" - `target`: The account receiving the vested funds.",
|
||||
" - `schedule`: The vesting schedule attached to the transfer.",
|
||||
"",
|
||||
" Emits `VestingCreated`.",
|
||||
"",
|
||||
" NOTE: This will unlock all schedules through the current block.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(1)`.",
|
||||
" - DbWeight: 3 Reads, 3 Writes",
|
||||
@@ -10975,11 +11002,12 @@
|
||||
"",
|
||||
" - `source`: The account whose funds should be transferred.",
|
||||
" - `target`: The account that should be transferred the vested funds.",
|
||||
" - `amount`: The amount of funds to transfer and will be vested.",
|
||||
" - `schedule`: The vesting schedule attached to the transfer.",
|
||||
"",
|
||||
" Emits `VestingCreated`.",
|
||||
"",
|
||||
" NOTE: This will unlock all schedules through the current block.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - `O(1)`.",
|
||||
" - DbWeight: 4 Reads, 4 Writes",
|
||||
@@ -10987,6 +11015,42 @@
|
||||
" - Writes: Vesting Storage, Balances Locks, Target Account, Source Account",
|
||||
" # </weight>"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "merge_schedules",
|
||||
"args": [
|
||||
{
|
||||
"name": "schedule1_index",
|
||||
"type": "u32"
|
||||
},
|
||||
{
|
||||
"name": "schedule2_index",
|
||||
"type": "u32"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Merge two vesting schedules together, creating a new vesting schedule that unlocks over",
|
||||
" the highest possible start and end blocks. If both schedules have already started the",
|
||||
" current block will be used as the schedule start; with the caveat that if one schedule",
|
||||
" is finished by the current block, the other will be treated as the new merged schedule,",
|
||||
" unmodified.",
|
||||
"",
|
||||
" NOTE: If `schedule1_index == schedule2_index` this is a no-op.",
|
||||
" NOTE: This will unlock all schedules through the current block prior to merging.",
|
||||
" NOTE: If both schedules have ended by the current block, no new schedule will be created",
|
||||
" and both will be removed.",
|
||||
"",
|
||||
" Merged schedule attributes:",
|
||||
" - `starting_block`: `MAX(schedule1.starting_block, scheduled2.starting_block,",
|
||||
" current_block)`.",
|
||||
" - `ending_block`: `MAX(schedule1.ending_block, schedule2.ending_block)`.",
|
||||
" - `locked`: `schedule1.locked_at(current_block) + schedule2.locked_at(current_block)`.",
|
||||
"",
|
||||
" The dispatch origin for this call must be _Signed_.",
|
||||
"",
|
||||
" - `schedule1_index`: index of the first schedule to merge.",
|
||||
" - `schedule2_index`: index of the second schedule to merge."
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -10997,8 +11061,8 @@
|
||||
"Balance"
|
||||
],
|
||||
"docs": [
|
||||
" The amount vested has been updated. This could indicate more funds are available. The",
|
||||
" balance given is the amount which is left unvested (and thus locked).",
|
||||
" The amount vested has been updated. This could indicate a change in funds available.",
|
||||
" The balance given is the amount which is left unvested (and thus locked).",
|
||||
" \\[account, unvested\\]"
|
||||
]
|
||||
},
|
||||
@@ -11008,7 +11072,7 @@
|
||||
"AccountId"
|
||||
],
|
||||
"docs": [
|
||||
" An \\[account\\] has become fully vested. No further vesting can happen."
|
||||
" An \\[account\\] has become fully vested."
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -11020,6 +11084,12 @@
|
||||
"docs": [
|
||||
" The minimum amount transferred to call `vested_transfer`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MaxVestingSchedules",
|
||||
"type": "u32",
|
||||
"value": "0x1c000000",
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"errors": [
|
||||
@@ -11030,9 +11100,10 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ExistingVestingSchedule",
|
||||
"name": "AtMaxVestingSchedules",
|
||||
"docs": [
|
||||
" An existing vesting schedule already exists for this account that cannot be clobbered."
|
||||
" The account already has `MaxVestingSchedules` count of schedules and thus",
|
||||
" cannot add another one. Consider merging existing schedules in order to add another."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -11040,6 +11111,18 @@
|
||||
"docs": [
|
||||
" Amount being transferred is too low to create a vesting schedule."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ScheduleIndexOutOfBounds",
|
||||
"docs": [
|
||||
" An index was out of bounds of the vesting schedules."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidScheduleParams",
|
||||
"docs": [
|
||||
" Failed to create a new schedule because some parameter was invalid."
|
||||
]
|
||||
}
|
||||
],
|
||||
"index": 28
|
||||
@@ -11770,6 +11853,18 @@
|
||||
"docs": [
|
||||
" An announcement was placed to make a call in the future. \\[real, proxy, call_hash\\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ProxyAdded",
|
||||
"args": [
|
||||
"AccountId",
|
||||
"AccountId",
|
||||
"ProxyType",
|
||||
"BlockNumber"
|
||||
],
|
||||
"docs": [
|
||||
" A proxy was added. \\[delegator, delegatee, proxy_type, delay\\]"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
@@ -15846,7 +15941,7 @@
|
||||
"AccountId"
|
||||
],
|
||||
"docs": [
|
||||
" An asset `instace` was issued. \\[ class, instance, owner \\]"
|
||||
" An asset `instance` was issued. \\[ class, instance, owner \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -15858,7 +15953,7 @@
|
||||
"AccountId"
|
||||
],
|
||||
"docs": [
|
||||
" An asset `instace` was transferred. \\[ class, instance, from, to \\]"
|
||||
" An asset `instance` was transferred. \\[ class, instance, from, to \\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-support', version: '5.6.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-support', version: '5.9.1' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types",
|
||||
"version": "5.6.1",
|
||||
"version": "5.9.1",
|
||||
"type": "module",
|
||||
"description": "Implementation of the Parity codec",
|
||||
"main": "index.js",
|
||||
@@ -19,15 +19,15 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/util": "^7.2.1",
|
||||
"@polkadot/util-crypto": "^7.2.1",
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/util-crypto": "^7.3.1",
|
||||
"rxjs": "^7.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^7.2.1",
|
||||
"@polkadot/types-support": "5.6.1",
|
||||
"@polkadot/keyring": "^7.3.1",
|
||||
"@polkadot/types-support": "5.9.1",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"bn.js": "^4.11.9"
|
||||
"bn.js": "^4.12.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMeta
|
||||
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { Approvals } from '@polkadot/types/interfaces/poll';
|
||||
import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
|
||||
@@ -57,7 +57,7 @@ import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
import type { ClassDetails, ClassId, ClassMetadata, DepositBalance, DepositBalanceOf, DestroyWitness, InstanceDetails, InstanceId, InstanceMetadata } from '@polkadot/types/interfaces/uniques';
|
||||
import type { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
|
||||
import type { VestingInfo } from '@polkadot/types/interfaces/vesting';
|
||||
import type { AssetInstance, AssetInstanceV0, AssetInstanceV1, BodyId, BodyPart, DoubleEncodedCall, Fungibility, InboundStatus, Junction, MultiAsset, MultiAssetFilter, MultiAssetV0, MultiAssetV1, MultiAssets, MultiLocation, NetworkId, OutboundStatus, Outcome, QueueConfigData, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, WildFungibility, WildMultiAsset, Xcm, XcmAssetId, XcmError, XcmOrder, XcmOrderV0, XcmOrderV1, XcmOrigin, XcmOriginKind, XcmResponse, XcmpMessageFormat } from '@polkadot/types/interfaces/xcm';
|
||||
import type { AssetInstance, AssetInstanceV0, AssetInstanceV1, BodyId, BodyPart, DoubleEncodedCall, Fungibility, InboundStatus, InstructionV2, InteriorMultiLocation, Junction, JunctionV0, JunctionV1, JunctionV2, Junctions, JunctionsV1, JunctionsV2, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, MultiAssetV0, MultiAssetV1, MultiAssetV2, MultiAssets, MultiAssetsV1, MultiAssetsV2, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, NetworkId, OriginKindV0, OriginKindV1, OriginKindV2, OutboundStatus, Outcome, QueryId, QueryStatus, QueueConfigData, Response, ResponseV0, ResponseV1, ResponseV2, ResponseV2Error, ResponseV2Result, VersionMigrationStage, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, WildFungibility, WildMultiAsset, WildMultiAssetV1, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, XcmOrder, XcmOrderV0, XcmOrderV1, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, XcmVersion, XcmpMessageFormat } from '@polkadot/types/interfaces/xcm';
|
||||
|
||||
declare module '@polkadot/types/types/registry' {
|
||||
export interface InterfaceTypes {
|
||||
@@ -274,6 +274,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
DispatchResult: DispatchResult;
|
||||
DispatchResultOf: DispatchResultOf;
|
||||
DispatchResultTo198: DispatchResultTo198;
|
||||
DisputeLocation: DisputeLocation;
|
||||
DisputeResult: DisputeResult;
|
||||
DisputeState: DisputeState;
|
||||
DisputeStatement: DisputeStatement;
|
||||
DisputeStatementSet: DisputeStatementSet;
|
||||
DoubleEncodedCall: DoubleEncodedCall;
|
||||
@@ -476,11 +479,19 @@ declare module '@polkadot/types/types/registry' {
|
||||
InstanceMetadata: InstanceMetadata;
|
||||
InstantiateRequest: InstantiateRequest;
|
||||
InstantiateReturnValue: InstantiateReturnValue;
|
||||
InstructionV2: InstructionV2;
|
||||
InstructionWeights: InstructionWeights;
|
||||
InteriorMultiLocation: InteriorMultiLocation;
|
||||
InvalidDisputeStatementKind: InvalidDisputeStatementKind;
|
||||
InvalidTransaction: InvalidTransaction;
|
||||
Json: Json;
|
||||
Junction: Junction;
|
||||
Junctions: Junctions;
|
||||
JunctionsV1: JunctionsV1;
|
||||
JunctionsV2: JunctionsV2;
|
||||
JunctionV0: JunctionV0;
|
||||
JunctionV1: JunctionV1;
|
||||
JunctionV2: JunctionV2;
|
||||
Justification: Justification;
|
||||
JustificationNotification: JustificationNotification;
|
||||
Justifications: Justifications;
|
||||
@@ -548,11 +559,19 @@ declare module '@polkadot/types/types/registry' {
|
||||
MultiAddress: MultiAddress;
|
||||
MultiAsset: MultiAsset;
|
||||
MultiAssetFilter: MultiAssetFilter;
|
||||
MultiAssetFilterV1: MultiAssetFilterV1;
|
||||
MultiAssetFilterV2: MultiAssetFilterV2;
|
||||
MultiAssets: MultiAssets;
|
||||
MultiAssetsV1: MultiAssetsV1;
|
||||
MultiAssetsV2: MultiAssetsV2;
|
||||
MultiAssetV0: MultiAssetV0;
|
||||
MultiAssetV1: MultiAssetV1;
|
||||
MultiAssetV2: MultiAssetV2;
|
||||
MultiDisputeStatementSet: MultiDisputeStatementSet;
|
||||
MultiLocation: MultiLocation;
|
||||
MultiLocationV0: MultiLocationV0;
|
||||
MultiLocationV1: MultiLocationV1;
|
||||
MultiLocationV2: MultiLocationV2;
|
||||
Multiplier: Multiplier;
|
||||
Multisig: Multisig;
|
||||
MultiSignature: MultiSignature;
|
||||
@@ -587,6 +606,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
OperatingMode: OperatingMode;
|
||||
Origin: Origin;
|
||||
OriginCaller: OriginCaller;
|
||||
OriginKindV0: OriginKindV0;
|
||||
OriginKindV1: OriginKindV1;
|
||||
OriginKindV2: OriginKindV2;
|
||||
OutboundHrmpMessage: OutboundHrmpMessage;
|
||||
OutboundLaneData: OutboundLaneData;
|
||||
OutboundMessageFee: OutboundMessageFee;
|
||||
@@ -672,6 +694,8 @@ declare module '@polkadot/types/types/registry' {
|
||||
ProxyDefinition: ProxyDefinition;
|
||||
ProxyState: ProxyState;
|
||||
ProxyType: ProxyType;
|
||||
QueryId: QueryId;
|
||||
QueryStatus: QueryStatus;
|
||||
QueueConfigData: QueueConfigData;
|
||||
QueuedParathread: QueuedParathread;
|
||||
Randomness: Randomness;
|
||||
@@ -722,6 +746,12 @@ declare module '@polkadot/types/types/registry' {
|
||||
ReportIdOf: ReportIdOf;
|
||||
ReserveData: ReserveData;
|
||||
ReserveIdentifier: ReserveIdentifier;
|
||||
Response: Response;
|
||||
ResponseV0: ResponseV0;
|
||||
ResponseV1: ResponseV1;
|
||||
ResponseV2: ResponseV2;
|
||||
ResponseV2Error: ResponseV2Error;
|
||||
ResponseV2Result: ResponseV2Result;
|
||||
Retriable: Retriable;
|
||||
RewardDestination: RewardDestination;
|
||||
RewardPoint: RewardPoint;
|
||||
@@ -943,8 +973,11 @@ declare module '@polkadot/types/types/registry' {
|
||||
ValidityAttestation: ValidityAttestation;
|
||||
VecInboundHrmpMessage: VecInboundHrmpMessage;
|
||||
VersionedMultiAsset: VersionedMultiAsset;
|
||||
VersionedMultiAssets: VersionedMultiAssets;
|
||||
VersionedMultiLocation: VersionedMultiLocation;
|
||||
VersionedResponse: VersionedResponse;
|
||||
VersionedXcm: VersionedXcm;
|
||||
VersionMigrationStage: VersionMigrationStage;
|
||||
VestingInfo: VestingInfo;
|
||||
VestingSchedule: VestingSchedule;
|
||||
Vote: Vote;
|
||||
@@ -964,11 +997,13 @@ declare module '@polkadot/types/types/registry' {
|
||||
VrfOutput: VrfOutput;
|
||||
VrfProof: VrfProof;
|
||||
Weight: Weight;
|
||||
WeightLimitV2: WeightLimitV2;
|
||||
WeightMultiplier: WeightMultiplier;
|
||||
WeightPerClass: WeightPerClass;
|
||||
WeightToFeeCoefficient: WeightToFeeCoefficient;
|
||||
WildFungibility: WildFungibility;
|
||||
WildMultiAsset: WildMultiAsset;
|
||||
WildMultiAssetV1: WildMultiAssetV1;
|
||||
WinnersData: WinnersData;
|
||||
WinnersDataTuple: WinnersDataTuple;
|
||||
WinningData: WinningData;
|
||||
@@ -977,12 +1012,18 @@ declare module '@polkadot/types/types/registry' {
|
||||
Xcm: Xcm;
|
||||
XcmAssetId: XcmAssetId;
|
||||
XcmError: XcmError;
|
||||
XcmErrorV0: XcmErrorV0;
|
||||
XcmErrorV1: XcmErrorV1;
|
||||
XcmErrorV2: XcmErrorV2;
|
||||
XcmOrder: XcmOrder;
|
||||
XcmOrderV0: XcmOrderV0;
|
||||
XcmOrderV1: XcmOrderV1;
|
||||
XcmOrigin: XcmOrigin;
|
||||
XcmOriginKind: XcmOriginKind;
|
||||
XcmpMessageFormat: XcmpMessageFormat;
|
||||
XcmResponse: XcmResponse;
|
||||
XcmV0: XcmV0;
|
||||
XcmV1: XcmV1;
|
||||
XcmV2: XcmV2;
|
||||
XcmVersion: XcmVersion;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,12 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
|
||||
|
||||
public createdAtHash?: Hash;
|
||||
|
||||
protected constructor (registry: Registry, ...values: T[]) {
|
||||
super(...values);
|
||||
protected constructor (registry: Registry, values: T[]) {
|
||||
super(values.length);
|
||||
|
||||
for (let i = 0; i < values.length; i++) {
|
||||
this[i] = values[i];
|
||||
}
|
||||
|
||||
this.registry = registry;
|
||||
}
|
||||
|
||||
@@ -259,14 +259,15 @@ export class Enum implements IEnum {
|
||||
* @description Checks if the Enum points to a [[Null]] type
|
||||
*/
|
||||
public get isNone (): boolean {
|
||||
return this.isNull;
|
||||
return this.#raw instanceof Null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Checks if the Enum points to a [[Null]] type (deprecated, use isNone)
|
||||
* @description Checks if the Enum points to a [[Null]] type
|
||||
* @deprecated use isNone
|
||||
*/
|
||||
public get isNull (): boolean {
|
||||
return this.#raw instanceof Null;
|
||||
return this.isNone;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -331,7 +332,7 @@ export class Enum implements IEnum {
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (isExtended?: boolean): AnyJson {
|
||||
return this.#isBasic
|
||||
return this.#isBasic || this.isNone
|
||||
? this.type
|
||||
: { [this.type]: this.#raw.toHuman(isExtended) };
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -7,7 +7,8 @@ import type { CodecTo } from '../types';
|
||||
|
||||
import { TypeRegistry } from '../create';
|
||||
import { Text, U32 } from '../primitive';
|
||||
import { Struct, Vec } from '.';
|
||||
import { TEST_A } from './Struct.data';
|
||||
import { Enum, Struct, Vec } from '.';
|
||||
|
||||
describe('Struct', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
@@ -84,6 +85,30 @@ describe('Struct', (): void => {
|
||||
expect(s.toString()).toBe('{"foo":[{"bar":"1"},{"bar":"2"}]}');
|
||||
});
|
||||
|
||||
it('decodes a previously problematic input', (): void => {
|
||||
let data;
|
||||
|
||||
try {
|
||||
data = new Struct(registry, {
|
||||
a: 'u32',
|
||||
b: 'H256',
|
||||
c: 'H256',
|
||||
swap: Enum.with({
|
||||
A: 'u256',
|
||||
B: 'u256'
|
||||
}),
|
||||
d: Vec.with('u8'),
|
||||
e: 'u8'
|
||||
}, TEST_A);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
expect(data.get('d')).toHaveLength(50000);
|
||||
});
|
||||
|
||||
it('decodes from a Map input', (): void => {
|
||||
const input = new Struct(registry, {
|
||||
a: U32,
|
||||
|
||||
@@ -61,7 +61,7 @@ export class Tuple extends AbstractArray<Codec> implements ITuple<Codec[]> {
|
||||
? [typeToConstructor(registry, Types)]
|
||||
: mapToTypeMap(registry, Types);
|
||||
|
||||
super(registry, ...decodeTuple(registry, Clazzes, value));
|
||||
super(registry, decodeTuple(registry, Clazzes, value));
|
||||
|
||||
this._Types = Clazzes;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export class Vec<T extends Codec> extends AbstractArray<T> {
|
||||
constructor (registry: Registry, Type: Constructor<T> | string, value: Vec<Codec> | Uint8Array | string | unknown[] = []) {
|
||||
const Clazz = typeToConstructor<T>(registry, Type);
|
||||
|
||||
super(registry, ...Vec.decodeVec(registry, Clazz, value));
|
||||
super(registry, Vec.decodeVec(registry, Clazz, value));
|
||||
|
||||
this._Type = Clazz;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export class VecFixed<T extends Codec> extends AbstractArray<T> {
|
||||
constructor (registry: Registry, Type: Constructor<T> | string, length: number, value: VecFixed<any> | Uint8Array | string | any[] = [] as any[]) {
|
||||
const Clazz = typeToConstructor<T>(registry, Type);
|
||||
|
||||
super(registry, ...decodeVecFixed(registry, Clazz, length, value));
|
||||
super(registry, decodeVecFixed(registry, Clazz, length, value));
|
||||
|
||||
this._Type = Clazz;
|
||||
}
|
||||
|
||||
@@ -208,12 +208,14 @@ export class GenericExtrinsicEra extends Enum implements IExtrinsicEra {
|
||||
/** @internal */
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
private static _decodeExtrinsicEra (value: IExtrinsicEra | MortalMethod | MortalEnumDef | ImmortalEnumDef | Uint8Array | string = new Uint8Array()): Uint8Array | Object | undefined {
|
||||
if (value instanceof GenericExtrinsicEra) {
|
||||
if (!value) {
|
||||
return new Uint8Array([0]);
|
||||
} else if (value instanceof GenericExtrinsicEra) {
|
||||
return GenericExtrinsicEra._decodeExtrinsicEra(value.toU8a());
|
||||
} else if (isHex(value)) {
|
||||
return GenericExtrinsicEra._decodeExtrinsicEra(hexToU8a(value));
|
||||
} else if (!value || isU8a(value)) {
|
||||
return (!value?.length || value[0] === 0)
|
||||
} else if (isU8a(value)) {
|
||||
return (!value.length || value[0] === 0)
|
||||
? new Uint8Array([0])
|
||||
: new Uint8Array([1, value[0], value[1]]);
|
||||
} else if (isObject(value)) {
|
||||
|
||||
@@ -239,7 +239,7 @@ export class GenericPortableRegistry extends Struct {
|
||||
}
|
||||
|
||||
#extract (type: SiType, lookupIndex: number): TypeDef {
|
||||
const path = [...type.path];
|
||||
const namespace = [...type.path].join('::');
|
||||
let typeDef: TypeDef;
|
||||
const primType = getPrimitivePath(type.path);
|
||||
|
||||
@@ -265,21 +265,21 @@ export class GenericPortableRegistry extends Struct {
|
||||
} else if (type.def.isVariant) {
|
||||
typeDef = this.#extractVariant(lookupIndex, type, type.def.asVariant);
|
||||
} else {
|
||||
throw new Error(`Invalid type at index ${lookupIndex}: No handler for ${type.def.toString()}`);
|
||||
throw new Error(`No SiTypeDef handler for ${type.def.toString()}`);
|
||||
}
|
||||
} catch (error) {
|
||||
throw new Error(`PortableRegistry: ${lookupIndex}: Error extracting ${stringify(type)}: ${(error as Error).message}`);
|
||||
throw new Error(`PortableRegistry: ${lookupIndex}${namespace ? ` (${namespace})` : ''}: Error extracting ${stringify(type)}: ${(error as Error).message}`);
|
||||
}
|
||||
|
||||
return {
|
||||
docs: type.docs.map((d) => d.toString()),
|
||||
namespace: path.join('::'),
|
||||
namespace,
|
||||
...typeDef
|
||||
};
|
||||
}
|
||||
|
||||
#extractArray (lookupIndex: number, { len: length, type }: SiTypeDefArray): TypeDef {
|
||||
assert(!length || length.toNumber() <= 256, () => `PortableRegistry: ${lookupIndex}: Only support for [Type; <length>], where length <= 256`);
|
||||
#extractArray (_: number, { len: length, type }: SiTypeDefArray): TypeDef {
|
||||
assert(!length || length.toNumber() <= 256, 'Only support for [Type; <length>], where length <= 256');
|
||||
|
||||
return withTypeString(this.registry, {
|
||||
info: TypeDefInfo.VecFixed,
|
||||
@@ -312,11 +312,23 @@ export class GenericPortableRegistry extends Struct {
|
||||
}
|
||||
|
||||
#extractComposite (lookupIndex: number, { params, path }: SiType, { fields }: SiTypeDefComposite): TypeDef {
|
||||
if (path.length === 1 && path[0].eq('BTreeMap')) {
|
||||
const specialVariant = path[0].toString();
|
||||
|
||||
if (path.length === 1 && specialVariant === 'BTreeMap') {
|
||||
return withTypeString(this.registry, {
|
||||
info: TypeDefInfo.BTreeMap,
|
||||
sub: params.map(({ type }) => this.#createSiDef(type.unwrap()))
|
||||
});
|
||||
} else if (['Range', 'RangeInclusive'].includes(specialVariant)) {
|
||||
return withTypeString(this.registry, {
|
||||
info: TypeDefInfo.Range,
|
||||
sub: fields.map(({ name, type }, index) => ({
|
||||
name: name.isSome
|
||||
? name.unwrap().toString()
|
||||
: ['start', 'end'][index],
|
||||
...this.#createSiDef(type)
|
||||
}))
|
||||
});
|
||||
}
|
||||
|
||||
return SETS.some((p) => matchParts(p, path))
|
||||
@@ -324,8 +336,8 @@ export class GenericPortableRegistry extends Struct {
|
||||
: this.#extractFields(lookupIndex, fields);
|
||||
}
|
||||
|
||||
#extractCompositeSet (lookupIndex: number, params: SiTypeParameter[], fields: SiField[]): TypeDef {
|
||||
assert(params.length === 1 && fields.length === 1, () => `PortableRegistry: ${lookupIndex}: Set handling expects since param and single field`);
|
||||
#extractCompositeSet (_: number, params: SiTypeParameter[], fields: SiField[]): TypeDef {
|
||||
assert(params.length === 1 && fields.length === 1, 'Set handling expects param/field as single entries');
|
||||
|
||||
return withTypeString(this.registry, {
|
||||
info: TypeDefInfo.Set,
|
||||
@@ -347,7 +359,7 @@ export class GenericPortableRegistry extends Struct {
|
||||
]),
|
||||
[true, true]);
|
||||
|
||||
assert(isTuple || isStruct, () => `PortableRegistry: ${lookupIndex}: Invalid fields type detected, expected either Tuple (all unnamed) or Struct (all named)`);
|
||||
assert(isTuple || isStruct, 'Invalid fields type detected, expected either Tuple (all unnamed) or Struct (all named)');
|
||||
|
||||
if (fields.length === 0) {
|
||||
return {
|
||||
@@ -501,9 +513,9 @@ export class GenericPortableRegistry extends Struct {
|
||||
} else if (specialVariant === 'Result') {
|
||||
return withTypeString(this.registry, {
|
||||
info: TypeDefInfo.Result,
|
||||
sub: params.map(({ type }) => this.#createSiDef(type.unwrap())).map((def, index) => ({
|
||||
sub: params.map(({ type }, index) => ({
|
||||
name: ['Ok', 'Error'][index],
|
||||
...def
|
||||
...this.#createSiDef(type.unwrap())
|
||||
}))
|
||||
});
|
||||
} else if (variants.length === 0) {
|
||||
|
||||
@@ -30,10 +30,54 @@ const cumulusTypes = {
|
||||
}
|
||||
};
|
||||
|
||||
const disputeTypes = {
|
||||
DisputeLocation: {
|
||||
_enum: ['Local', 'Remote']
|
||||
},
|
||||
DisputeResult: {
|
||||
_enum: ['Valid', 'Invalid']
|
||||
},
|
||||
DisputeState: {
|
||||
validatorsFor: 'BitVec',
|
||||
validatorsAgainst: 'BitVec',
|
||||
start: 'BlockNumber',
|
||||
concludedAt: 'Option<BlockNumber>'
|
||||
},
|
||||
DisputeStatement: {
|
||||
_enum: {
|
||||
Valid: 'ValidDisputeStatementKind',
|
||||
Invalid: 'InvalidDisputeStatementKind'
|
||||
}
|
||||
},
|
||||
DisputeStatementSet: {
|
||||
candidateHash: 'CandidateHash',
|
||||
session: 'SessionIndex',
|
||||
statements: 'Vec<(DisputeStatement, ParaValidatorIndex, ValidatorSignature)>'
|
||||
},
|
||||
ExplicitDisputeStatement: {
|
||||
valid: 'bool',
|
||||
candidateHash: 'CandidateHash',
|
||||
session: 'SessionIndex'
|
||||
},
|
||||
InvalidDisputeStatementKind: {
|
||||
_enum: ['Explicit']
|
||||
},
|
||||
MultiDisputeStatementSet: 'Vec<DisputeStatementSet>',
|
||||
ValidDisputeStatementKind: {
|
||||
_enum: {
|
||||
Explicit: 'Null',
|
||||
BackingSeconded: 'Hash',
|
||||
BackingValid: 'Hash',
|
||||
ApprovalChecking: 'Null'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
...cumulusTypes,
|
||||
...disputeTypes,
|
||||
...hrmpTypes,
|
||||
...proposeTypes,
|
||||
...slotTypes,
|
||||
@@ -156,36 +200,6 @@ export default {
|
||||
Parachain: 'Null'
|
||||
}
|
||||
},
|
||||
DisputeStatementSet: {
|
||||
candidateHash: 'CandidateHash',
|
||||
session: 'SessionIndex',
|
||||
statements: 'Vec<(DisputeStatement, ParaValidatorIndex, ValidatorSignature)>'
|
||||
},
|
||||
MultiDisputeStatementSet: 'Vec<DisputeStatementSet>',
|
||||
DisputeStatement: {
|
||||
_enum: {
|
||||
Valid: 'ValidDisputeStatementKind',
|
||||
Invalid: 'InvalidDisputeStatementKind'
|
||||
}
|
||||
},
|
||||
ValidDisputeStatementKind: {
|
||||
_enum: {
|
||||
Explicit: 'Null',
|
||||
BackingSeconded: 'Hash',
|
||||
BackingValid: 'Hash',
|
||||
ApprovalChecking: 'Null'
|
||||
}
|
||||
},
|
||||
InvalidDisputeStatementKind: {
|
||||
_enum: [
|
||||
'Explicit'
|
||||
]
|
||||
},
|
||||
ExplicitDisputeStatement: {
|
||||
valid: 'bool',
|
||||
candidateHash: 'CandidateHash',
|
||||
session: 'SessionIndex'
|
||||
},
|
||||
DoubleVoteReport: {
|
||||
identity: 'ValidatorId',
|
||||
first: '(Statement, ValidatorSignature)',
|
||||
|
||||
@@ -176,6 +176,26 @@ export interface CoreOccupied extends Enum {
|
||||
readonly isParachain: boolean;
|
||||
}
|
||||
|
||||
/** @name DisputeLocation */
|
||||
export interface DisputeLocation extends Enum {
|
||||
readonly isLocal: boolean;
|
||||
readonly isRemote: boolean;
|
||||
}
|
||||
|
||||
/** @name DisputeResult */
|
||||
export interface DisputeResult extends Enum {
|
||||
readonly isValid: boolean;
|
||||
readonly isInvalid: boolean;
|
||||
}
|
||||
|
||||
/** @name DisputeState */
|
||||
export interface DisputeState extends Struct {
|
||||
readonly validatorsFor: BitVec;
|
||||
readonly validatorsAgainst: BitVec;
|
||||
readonly start: BlockNumber;
|
||||
readonly concludedAt: Option<BlockNumber>;
|
||||
}
|
||||
|
||||
/** @name DisputeStatement */
|
||||
export interface DisputeStatement extends Enum {
|
||||
readonly isValid: boolean;
|
||||
|
||||
@@ -62,9 +62,6 @@ export default {
|
||||
SiTypeDefComposite: {
|
||||
fields: 'Vec<SiField>'
|
||||
},
|
||||
SiTypeDefVariant: {
|
||||
variants: 'Vec<SiVariant>'
|
||||
},
|
||||
SiTypeDefPrimitive: {
|
||||
_enum: ['Bool', 'Char', 'Str', 'U8', 'U16', 'U32', 'U64', 'U128', 'U256', 'I8', 'I16', 'I32', 'I64', 'I128', 'I256']
|
||||
},
|
||||
@@ -76,6 +73,9 @@ export default {
|
||||
name: 'Text',
|
||||
type: 'Option<SiLookupTypeId>'
|
||||
},
|
||||
SiTypeDefVariant: {
|
||||
variants: 'Vec<SiVariant>'
|
||||
},
|
||||
SiVariant
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -6,161 +6,22 @@
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import { v0 } from './v0';
|
||||
import { v1 } from './v1';
|
||||
import { v2 } from './v2';
|
||||
|
||||
const xcm = {
|
||||
XcmOrigin: {
|
||||
_enum: {
|
||||
Xcm: 'MultiLocation'
|
||||
}
|
||||
},
|
||||
Xcm: {
|
||||
_enum: {
|
||||
WithdrawAsset: {
|
||||
assets: 'MultiAssets',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ReserveAssetDeposit: {
|
||||
assets: 'MultiAssets',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ReceiveTeleportedAsset: {
|
||||
assets: 'MultiAssets',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'XcmResponse'
|
||||
},
|
||||
TransferAsset: {
|
||||
assets: 'MultiAssets',
|
||||
dest: 'MultiLocation'
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
assets: 'MultiAssets',
|
||||
dest: 'MultiLocation',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
Transact: {
|
||||
originType: 'XcmOriginKind',
|
||||
requireWeightAtMost: 'u64',
|
||||
call: 'DoubleEncodedCall'
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
RelayedFrom: {
|
||||
who: 'MultiLocation',
|
||||
message: 'Xcm'
|
||||
}
|
||||
}
|
||||
},
|
||||
Xcm: 'XcmV1',
|
||||
XcmpMessageFormat: {
|
||||
_enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']
|
||||
},
|
||||
VersionedXcm: {
|
||||
_enum: {
|
||||
V0: 'Xcm'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const xmcOrder = {
|
||||
XcmError: 'XcmErrorV1',
|
||||
XcmOrder: 'XcmOrderV1',
|
||||
XcmOrderV0: {
|
||||
_enum: {
|
||||
Null: 'Null',
|
||||
DepositAsset: {
|
||||
assets: 'Vec<MultiAsset>',
|
||||
dest: 'MultiLocation'
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'Vec<MultiAsset>',
|
||||
dest: 'MultiLocation',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'Vec<MultiAsset>',
|
||||
receive: 'Vec<MultiAsset>'
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'Vec<MultiAsset>',
|
||||
reserve: 'MultiLocation',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'Vec<MultiAsset>',
|
||||
dest: 'MultiLocation',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'MultiLocation',
|
||||
assets: 'Vec<MultiAsset>'
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'MultiAsset',
|
||||
weight: 'u64',
|
||||
debt: 'u64',
|
||||
haltOnError: 'bool',
|
||||
xcm: 'Vec<Xcm>'
|
||||
}
|
||||
}
|
||||
},
|
||||
XcmOrderV1: {
|
||||
_enum: {
|
||||
Noop: 'Null',
|
||||
DepositAsset: {
|
||||
assets: 'MultiAssetFilter',
|
||||
maxAssets: 'u32',
|
||||
beneficiary: 'MultiLocation'
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'MultiAssetFilter',
|
||||
maxAssets: 'u32',
|
||||
dest: 'MultiLocation',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'MultiAssetFilter',
|
||||
receive: 'MultiAssets'
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'MultiAssetFilter',
|
||||
reserve: 'MultiLocation',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'MultiAssetFilter',
|
||||
dest: 'MultiLocation',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'MultiLocation',
|
||||
assets: 'MultiAssetFilter'
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'MultiAsset',
|
||||
weight: 'u64',
|
||||
debt: 'u64',
|
||||
haltOnError: 'bool',
|
||||
orders: 'Vec<XcmOrderV1>',
|
||||
instructions: 'Vec<Xcm>'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const multiAsset = {
|
||||
XcmAssetId: {
|
||||
_enum: {
|
||||
Concrete: 'MultiLocation',
|
||||
@@ -168,32 +29,6 @@ const multiAsset = {
|
||||
}
|
||||
},
|
||||
AssetInstance: 'AssetInstanceV1',
|
||||
AssetInstanceV0: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Index8: 'u8',
|
||||
Index16: 'Compact<u16>',
|
||||
Index32: 'Compact<u32>',
|
||||
Index64: 'Compact<u64>',
|
||||
Index128: 'Compact<u128>',
|
||||
Array4: '[u8; 4]',
|
||||
Array8: '[u8; 8]',
|
||||
Array16: '[u8; 16]',
|
||||
Array32: '[u8; 32]',
|
||||
Blob: 'Vec<u8>'
|
||||
}
|
||||
},
|
||||
AssetInstanceV1: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Index: 'Compact<u128>',
|
||||
Array4: '[u8; 4]',
|
||||
Array8: '[u8; 8]',
|
||||
Array16: '[u8; 16]',
|
||||
Array32: '[u8; 32]',
|
||||
Blob: 'Bytes'
|
||||
}
|
||||
},
|
||||
Fungibility: {
|
||||
_enum: {
|
||||
Fungible: 'u128',
|
||||
@@ -206,66 +41,16 @@ const multiAsset = {
|
||||
OutboundStatus: {
|
||||
_enum: ['Ok', 'Suspended']
|
||||
},
|
||||
MultiAssetFilter: {
|
||||
_enum: {
|
||||
Definite: 'MultiAssets',
|
||||
Wild: 'WildMultiAsset'
|
||||
}
|
||||
},
|
||||
MultiAssetFilter: 'MultiAssetFilterV1',
|
||||
MultiAsset: 'MultiAssetV1',
|
||||
MultiAssetV0: {
|
||||
_enum: {
|
||||
None: 'Null',
|
||||
All: 'Null',
|
||||
AllFungible: 'Null',
|
||||
AllNonFungible: 'Null',
|
||||
AllAbstractFungible: 'Vec<u8>',
|
||||
AllAbstractNonFungible: 'Vec<u8>',
|
||||
AllConcreteFungible: 'MultiLocation',
|
||||
AllConcreteNonFungible: 'MultiLocation',
|
||||
AbstractFungible: {
|
||||
id: 'Vec<u8>',
|
||||
instance: 'Compact<u128>'
|
||||
},
|
||||
AbstractNonFungible: {
|
||||
class: 'Vec<u8>',
|
||||
instance: 'AssetInstance'
|
||||
},
|
||||
ConcreteFungible: {
|
||||
id: 'MultiLocation',
|
||||
amount: 'Compact<u128>'
|
||||
},
|
||||
ConcreteNonFungible: {
|
||||
class: 'MultiLocation',
|
||||
instance: 'AssetInstance'
|
||||
}
|
||||
}
|
||||
},
|
||||
MultiAssetV1: {
|
||||
id: 'XcmAssetId',
|
||||
fungibility: 'Fungibility'
|
||||
},
|
||||
MultiAssets: 'Vec<MultiAsset>',
|
||||
VersionedMultiAsset: {
|
||||
_enum: {
|
||||
V0: 'MultiAsset'
|
||||
}
|
||||
},
|
||||
WildFungibility: {
|
||||
_enum: ['Fungible', 'NonFungible']
|
||||
},
|
||||
WildMultiAsset: {
|
||||
_enum: {
|
||||
All: 'Null',
|
||||
AllOf: {
|
||||
id: 'XcmAssetId',
|
||||
fungibility: 'WildFungibility'
|
||||
}
|
||||
}
|
||||
}
|
||||
WildMultiAsset: 'WildMultiAssetV1'
|
||||
};
|
||||
|
||||
const junction = {
|
||||
const location = {
|
||||
BodyId: {
|
||||
_enum: {
|
||||
Unit: 'Null',
|
||||
@@ -295,32 +80,10 @@ const junction = {
|
||||
}
|
||||
}
|
||||
},
|
||||
Junction: {
|
||||
_enum: {
|
||||
Parent: 'Null',
|
||||
Parachain: 'Compact<u32>',
|
||||
AccountId32: {
|
||||
network: 'NetworkId',
|
||||
id: 'AccountId'
|
||||
},
|
||||
AccountIndex64: {
|
||||
network: 'NetworkId',
|
||||
index: 'Compact<u64>'
|
||||
},
|
||||
AccountKey20: {
|
||||
network: 'NetworkId',
|
||||
key: '[u8; 20]'
|
||||
},
|
||||
PalletInstance: 'u8',
|
||||
GeneralIndex: 'Compact<u128>',
|
||||
GeneralKey: 'Vec<u8>',
|
||||
OnlyChild: 'Null',
|
||||
Plurality: {
|
||||
id: 'BodyId',
|
||||
part: 'BodyPart'
|
||||
}
|
||||
}
|
||||
},
|
||||
InteriorMultiLocation: 'Junctions',
|
||||
Junction: 'JunctionV1',
|
||||
Junctions: 'JunctionsV1',
|
||||
MultiLocation: 'MultiLocationV1',
|
||||
NetworkId: {
|
||||
_enum: {
|
||||
Any: 'Null',
|
||||
@@ -334,67 +97,37 @@ const junction = {
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
...junction,
|
||||
...multiAsset,
|
||||
...location,
|
||||
...xcm,
|
||||
...xmcOrder,
|
||||
DoubleEncodedCall: { encoded: 'Vec<u8>' },
|
||||
...v0,
|
||||
...v1,
|
||||
...v2,
|
||||
DoubleEncodedCall: {
|
||||
encoded: 'Vec<u8>'
|
||||
},
|
||||
XcmOriginKind: {
|
||||
_enum: ['Native', 'SovereignAccount', 'Superuser', 'Xcm']
|
||||
},
|
||||
XcmResponse: {
|
||||
_enum: {
|
||||
Assets: 'Vec<MultiAsset>'
|
||||
}
|
||||
},
|
||||
XcmError: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
SendFailed: 'Null', // (#[codec(skip)] &'static str),
|
||||
CannotReachDestination: '(MultiLocation, Xcm)',
|
||||
MultiLocationFull: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null', // (#[codec(skip)] &'static str),
|
||||
WeightLimitReached: 'Weight',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null'
|
||||
}
|
||||
},
|
||||
MultiLocation: {
|
||||
_enum: {
|
||||
Here: 'Null',
|
||||
X1: 'Junction',
|
||||
X2: '(Junction, Junction)',
|
||||
X3: '(Junction, Junction, Junction)',
|
||||
X4: '(Junction, Junction, Junction, Junction)',
|
||||
X5: '(Junction, Junction, Junction, Junction, Junction)',
|
||||
X6: '(Junction, Junction, Junction, Junction, Junction, Junction)',
|
||||
X7: '(Junction, Junction, Junction, Junction, Junction, Junction, Junction)',
|
||||
X8: '(Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction)'
|
||||
}
|
||||
},
|
||||
Response: 'ResponseV1',
|
||||
Outcome: {
|
||||
_enum: {
|
||||
Complete: 'Weight',
|
||||
Incomplete: '(Weight, XcmError)',
|
||||
Error: 'XcmError'
|
||||
Incomplete: '(Weight, XcmErrorV0)',
|
||||
Error: 'XcmErrorV0'
|
||||
}
|
||||
},
|
||||
QueryId: 'u64',
|
||||
QueryStatus: {
|
||||
_enum: {
|
||||
Pending: {
|
||||
responder: 'VersionedMultiLocation',
|
||||
maybeNotify: 'Option<(u8, u8)>',
|
||||
timeout: 'BlockNumber'
|
||||
},
|
||||
Ready: {
|
||||
response: 'VersionedResponse',
|
||||
at: 'BlockNumber'
|
||||
}
|
||||
}
|
||||
},
|
||||
QueueConfigData: {
|
||||
@@ -404,10 +137,47 @@ export default {
|
||||
thresholdWeight: 'Weight',
|
||||
weightRestrictDecay: 'Weight'
|
||||
},
|
||||
VersionMigrationStage: {
|
||||
_enum: {
|
||||
MigrateSupportedVersion: 'Null',
|
||||
MigrateVersionNotifiers: 'Null',
|
||||
NotifyCurrentTargets: 'Option<Bytes>',
|
||||
MigrateAndNotifyOldTargets: 'Null'
|
||||
}
|
||||
},
|
||||
VersionedMultiAsset: {
|
||||
_enum: {
|
||||
V0: 'MultiAssetV0',
|
||||
V1: 'MultiAssetV1',
|
||||
V2: 'MultiAssetV2'
|
||||
}
|
||||
},
|
||||
VersionedMultiAssets: {
|
||||
_enum: {
|
||||
V0: 'Vec<MultiAssetV0>',
|
||||
V1: 'MultiAssetsV1',
|
||||
V2: 'MultiAssetsV2'
|
||||
}
|
||||
},
|
||||
VersionedMultiLocation: {
|
||||
_enum: {
|
||||
V0: 'MultiLocation'
|
||||
V0: 'MultiLocationV0',
|
||||
V1: 'MultiLocationV1',
|
||||
V2: 'MultiLocationV2'
|
||||
}
|
||||
}
|
||||
},
|
||||
VersionedResponse: {
|
||||
V0: 'ResponseV0',
|
||||
V1: 'ResponseV1',
|
||||
V2: 'ResponseV2'
|
||||
},
|
||||
VersionedXcm: {
|
||||
_enum: {
|
||||
V0: 'XcmV0',
|
||||
V1: 'XcmV1',
|
||||
V2: 'XcmV2'
|
||||
}
|
||||
},
|
||||
XcmVersion: 'u32'
|
||||
}
|
||||
} as Definitions;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Bytes, Compact, Enum, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';
|
||||
import type { Bytes, Compact, Enum, Null, Option, Result, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
import type { AccountId, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, BlockNumber, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
|
||||
/** @name AssetInstance */
|
||||
export interface AssetInstance extends AssetInstanceV1 {}
|
||||
@@ -104,8 +104,154 @@ export interface InboundStatus extends Enum {
|
||||
readonly isSuspended: boolean;
|
||||
}
|
||||
|
||||
/** @name InstructionV2 */
|
||||
export interface InstructionV2 extends Enum {
|
||||
readonly isWithdrawAsset: boolean;
|
||||
readonly asWithdrawAsset: MultiAssetsV2;
|
||||
readonly isReserveAssetDeposited: boolean;
|
||||
readonly asReserveAssetDeposited: MultiAssetsV2;
|
||||
readonly isReceiveTeleportedAsset: boolean;
|
||||
readonly asReceiveTeleportedAsset: MultiAssetsV2;
|
||||
readonly isQueryResponse: boolean;
|
||||
readonly asQueryResponse: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly response: ResponseV2;
|
||||
readonly maxWeight: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isTransferAsset: boolean;
|
||||
readonly asTransferAsset: {
|
||||
readonly assets: MultiAssetsV2;
|
||||
readonly beneficiary: MultiLocationV2;
|
||||
} & Struct;
|
||||
readonly isTransferReserveAsset: boolean;
|
||||
readonly asTransferReserveAsset: {
|
||||
readonly assets: MultiAssetsV2;
|
||||
readonly dest: MultiLocationV2;
|
||||
readonly xcm: XcmV2;
|
||||
} & Struct;
|
||||
readonly isTransact: boolean;
|
||||
readonly asTransact: {
|
||||
readonly originType: OriginKindV2;
|
||||
readonly requireWeightAtMost: u64;
|
||||
readonly call: DoubleEncodedCall;
|
||||
} & Struct;
|
||||
readonly isHrmpNewChannelOpenRequest: boolean;
|
||||
readonly asHrmpNewChannelOpenRequest: {
|
||||
readonly sender: Compact<u32>;
|
||||
readonly maxMessageSize: Compact<u32>;
|
||||
readonly maxCapacity: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelAccepted: boolean;
|
||||
readonly asHrmpChannelAccepted: {
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelClosing: boolean;
|
||||
readonly asHrmpChannelClosing: {
|
||||
readonly initiator: Compact<u32>;
|
||||
readonly sender: Compact<u32>;
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isClearOrigin: boolean;
|
||||
readonly isDescendOrigin: boolean;
|
||||
readonly asDescendOrigin: InteriorMultiLocation;
|
||||
readonly isReportError: boolean;
|
||||
readonly asReportError: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly dest: MultiLocationV2;
|
||||
readonly maxResponseWeight: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isDepositAsset: boolean;
|
||||
readonly asDepositAsset: {
|
||||
readonly assets: MultiAssetFilterV2;
|
||||
readonly maxAssets: u32;
|
||||
readonly beneficiary: MultiLocationV2;
|
||||
} & Struct;
|
||||
readonly isDepositReserveAsset: boolean;
|
||||
readonly asDepositReserveAsset: {
|
||||
readonly assets: MultiAssetFilterV2;
|
||||
readonly maxAssets: u32;
|
||||
readonly dest: MultiLocationV2;
|
||||
readonly xcm: XcmV2;
|
||||
} & Struct;
|
||||
readonly isExchangeAsset: boolean;
|
||||
readonly asExchangeAsset: {
|
||||
readonly give: MultiAssetFilterV2;
|
||||
readonly receive: MultiAssetsV2;
|
||||
} & Struct;
|
||||
readonly isInitiateReserveWithdraw: boolean;
|
||||
readonly asInitiateReserveWithdraw: {
|
||||
readonly assets: MultiAssetFilterV2;
|
||||
readonly reserve: MultiLocationV2;
|
||||
readonly xcm: XcmV2;
|
||||
} & Struct;
|
||||
readonly isInitiateTeleport: boolean;
|
||||
readonly asInitiateTeleport: {
|
||||
readonly assets: MultiAssetFilterV2;
|
||||
readonly dest: MultiLocationV2;
|
||||
readonly xcm: XcmV2;
|
||||
} & Struct;
|
||||
readonly isQueryHolding: boolean;
|
||||
readonly asQueryHolding: {
|
||||
readonly query_id: Compact<u64>;
|
||||
readonly dest: MultiLocationV2;
|
||||
readonly assets: MultiAssetFilterV2;
|
||||
readonly maxResponse_Weight: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isBuyExecution: boolean;
|
||||
readonly asBuyExecution: {
|
||||
readonly fees: MultiAssetV2;
|
||||
readonly weightLimit: WeightLimitV2;
|
||||
} & Struct;
|
||||
readonly isRefundSurplus: boolean;
|
||||
readonly isSetErrorHandler: boolean;
|
||||
readonly asSetErrorHandler: XcmV2;
|
||||
readonly isSetAppendix: boolean;
|
||||
readonly asSetAppendix: XcmV2;
|
||||
readonly isClearError: boolean;
|
||||
readonly isClaimAsset: boolean;
|
||||
readonly asClaimAsset: {
|
||||
readonly assets: MultiAssetsV2;
|
||||
readonly ticket: MultiLocationV2;
|
||||
} & Struct;
|
||||
readonly isTrap: boolean;
|
||||
readonly asTrap: u64;
|
||||
}
|
||||
|
||||
/** @name InteriorMultiLocation */
|
||||
export interface InteriorMultiLocation extends Junctions {}
|
||||
|
||||
/** @name Junction */
|
||||
export interface Junction extends Enum {
|
||||
export interface Junction extends JunctionV1 {}
|
||||
|
||||
/** @name Junctions */
|
||||
export interface Junctions extends JunctionsV1 {}
|
||||
|
||||
/** @name JunctionsV1 */
|
||||
export interface JunctionsV1 extends Enum {
|
||||
readonly isHere: boolean;
|
||||
readonly isX1: boolean;
|
||||
readonly asX1: JunctionV1;
|
||||
readonly isX2: boolean;
|
||||
readonly asX2: ITuple<[JunctionV1, JunctionV1]>;
|
||||
readonly isX3: boolean;
|
||||
readonly asX3: ITuple<[JunctionV1, JunctionV1, JunctionV1]>;
|
||||
readonly isX4: boolean;
|
||||
readonly asX4: ITuple<[JunctionV1, JunctionV1, JunctionV1, JunctionV1]>;
|
||||
readonly isX5: boolean;
|
||||
readonly asX5: ITuple<[JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]>;
|
||||
readonly isX6: boolean;
|
||||
readonly asX6: ITuple<[JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]>;
|
||||
readonly isX7: boolean;
|
||||
readonly asX7: ITuple<[JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]>;
|
||||
readonly isX8: boolean;
|
||||
readonly asX8: ITuple<[JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1]>;
|
||||
}
|
||||
|
||||
/** @name JunctionsV2 */
|
||||
export interface JunctionsV2 extends JunctionsV1 {}
|
||||
|
||||
/** @name JunctionV0 */
|
||||
export interface JunctionV0 extends Enum {
|
||||
readonly isParent: boolean;
|
||||
readonly isParachain: boolean;
|
||||
readonly asParachain: Compact<u32>;
|
||||
@@ -138,20 +284,68 @@ export interface Junction extends Enum {
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name JunctionV1 */
|
||||
export interface JunctionV1 extends Enum {
|
||||
readonly isParachain: boolean;
|
||||
readonly asParachain: Compact<u32>;
|
||||
readonly isAccountId32: boolean;
|
||||
readonly asAccountId32: {
|
||||
readonly network: NetworkId;
|
||||
readonly id: AccountId;
|
||||
} & Struct;
|
||||
readonly isAccountIndex64: boolean;
|
||||
readonly asAccountIndex64: {
|
||||
readonly network: NetworkId;
|
||||
readonly index: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isAccountKey20: boolean;
|
||||
readonly asAccountKey20: {
|
||||
readonly network: NetworkId;
|
||||
readonly key: U8aFixed;
|
||||
} & Struct;
|
||||
readonly isPalletInstance: boolean;
|
||||
readonly asPalletInstance: u8;
|
||||
readonly isGeneralIndex: boolean;
|
||||
readonly asGeneralIndex: Compact<u128>;
|
||||
readonly isGeneralKey: boolean;
|
||||
readonly asGeneralKey: Bytes;
|
||||
readonly isOnlyChild: boolean;
|
||||
readonly isPlurality: boolean;
|
||||
readonly asPlurality: {
|
||||
readonly id: BodyId;
|
||||
readonly part: BodyPart;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name JunctionV2 */
|
||||
export interface JunctionV2 extends JunctionV1 {}
|
||||
|
||||
/** @name MultiAsset */
|
||||
export interface MultiAsset extends MultiAssetV1 {}
|
||||
|
||||
/** @name MultiAssetFilter */
|
||||
export interface MultiAssetFilter extends Enum {
|
||||
export interface MultiAssetFilter extends MultiAssetFilterV1 {}
|
||||
|
||||
/** @name MultiAssetFilterV1 */
|
||||
export interface MultiAssetFilterV1 extends Enum {
|
||||
readonly isDefinite: boolean;
|
||||
readonly asDefinite: MultiAssets;
|
||||
readonly asDefinite: MultiAssetsV1;
|
||||
readonly isWild: boolean;
|
||||
readonly asWild: WildMultiAsset;
|
||||
readonly asWild: WildMultiAssetV1;
|
||||
}
|
||||
|
||||
/** @name MultiAssetFilterV2 */
|
||||
export interface MultiAssetFilterV2 extends MultiAssetFilterV1 {}
|
||||
|
||||
/** @name MultiAssets */
|
||||
export interface MultiAssets extends Vec<MultiAsset> {}
|
||||
|
||||
/** @name MultiAssetsV1 */
|
||||
export interface MultiAssetsV1 extends Vec<MultiAssetV1> {}
|
||||
|
||||
/** @name MultiAssetsV2 */
|
||||
export interface MultiAssetsV2 extends MultiAssetsV1 {}
|
||||
|
||||
/** @name MultiAssetV0 */
|
||||
export interface MultiAssetV0 extends Enum {
|
||||
readonly isNone: boolean;
|
||||
@@ -163,9 +357,9 @@ export interface MultiAssetV0 extends Enum {
|
||||
readonly isAllAbstractNonFungible: boolean;
|
||||
readonly asAllAbstractNonFungible: Bytes;
|
||||
readonly isAllConcreteFungible: boolean;
|
||||
readonly asAllConcreteFungible: MultiLocation;
|
||||
readonly asAllConcreteFungible: MultiLocationV0;
|
||||
readonly isAllConcreteNonFungible: boolean;
|
||||
readonly asAllConcreteNonFungible: MultiLocation;
|
||||
readonly asAllConcreteNonFungible: MultiLocationV0;
|
||||
readonly isAbstractFungible: boolean;
|
||||
readonly asAbstractFungible: {
|
||||
readonly id: Bytes;
|
||||
@@ -174,17 +368,17 @@ export interface MultiAssetV0 extends Enum {
|
||||
readonly isAbstractNonFungible: boolean;
|
||||
readonly asAbstractNonFungible: {
|
||||
readonly class: Bytes;
|
||||
readonly instance: AssetInstance;
|
||||
readonly instance: AssetInstanceV0;
|
||||
} & Struct;
|
||||
readonly isConcreteFungible: boolean;
|
||||
readonly asConcreteFungible: {
|
||||
readonly id: MultiLocation;
|
||||
readonly id: MultiLocationV0;
|
||||
readonly amount: Compact<u128>;
|
||||
} & Struct;
|
||||
readonly isConcreteNonFungible: boolean;
|
||||
readonly asConcreteNonFungible: {
|
||||
readonly class: MultiLocation;
|
||||
readonly instance: AssetInstance;
|
||||
readonly class: MultiLocationV0;
|
||||
readonly instance: AssetInstanceV0;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
@@ -194,27 +388,42 @@ export interface MultiAssetV1 extends Struct {
|
||||
readonly fungibility: Fungibility;
|
||||
}
|
||||
|
||||
/** @name MultiAssetV2 */
|
||||
export interface MultiAssetV2 extends MultiAssetV1 {}
|
||||
|
||||
/** @name MultiLocation */
|
||||
export interface MultiLocation extends Enum {
|
||||
export interface MultiLocation extends MultiLocationV1 {}
|
||||
|
||||
/** @name MultiLocationV0 */
|
||||
export interface MultiLocationV0 extends Enum {
|
||||
readonly isHere: boolean;
|
||||
readonly isX1: boolean;
|
||||
readonly asX1: Junction;
|
||||
readonly asX1: JunctionV0;
|
||||
readonly isX2: boolean;
|
||||
readonly asX2: ITuple<[Junction, Junction]>;
|
||||
readonly asX2: ITuple<[JunctionV0, JunctionV0]>;
|
||||
readonly isX3: boolean;
|
||||
readonly asX3: ITuple<[Junction, Junction, Junction]>;
|
||||
readonly asX3: ITuple<[JunctionV0, JunctionV0, JunctionV0]>;
|
||||
readonly isX4: boolean;
|
||||
readonly asX4: ITuple<[Junction, Junction, Junction, Junction]>;
|
||||
readonly asX4: ITuple<[JunctionV0, JunctionV0, JunctionV0, JunctionV0]>;
|
||||
readonly isX5: boolean;
|
||||
readonly asX5: ITuple<[Junction, Junction, Junction, Junction, Junction]>;
|
||||
readonly asX5: ITuple<[JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]>;
|
||||
readonly isX6: boolean;
|
||||
readonly asX6: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction]>;
|
||||
readonly asX6: ITuple<[JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]>;
|
||||
readonly isX7: boolean;
|
||||
readonly asX7: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction, Junction]>;
|
||||
readonly asX7: ITuple<[JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]>;
|
||||
readonly isX8: boolean;
|
||||
readonly asX8: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction]>;
|
||||
readonly asX8: ITuple<[JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0]>;
|
||||
}
|
||||
|
||||
/** @name MultiLocationV1 */
|
||||
export interface MultiLocationV1 extends Struct {
|
||||
readonly parents: u8;
|
||||
readonly interior: JunctionsV1;
|
||||
}
|
||||
|
||||
/** @name MultiLocationV2 */
|
||||
export interface MultiLocationV2 extends MultiLocationV1 {}
|
||||
|
||||
/** @name NetworkId */
|
||||
export interface NetworkId extends Enum {
|
||||
readonly isAny: boolean;
|
||||
@@ -224,6 +433,20 @@ export interface NetworkId extends Enum {
|
||||
readonly isKusama: boolean;
|
||||
}
|
||||
|
||||
/** @name OriginKindV0 */
|
||||
export interface OriginKindV0 extends Enum {
|
||||
readonly isNative: boolean;
|
||||
readonly isSovereignAccount: boolean;
|
||||
readonly isSuperuser: boolean;
|
||||
readonly isXcm: boolean;
|
||||
}
|
||||
|
||||
/** @name OriginKindV1 */
|
||||
export interface OriginKindV1 extends OriginKindV0 {}
|
||||
|
||||
/** @name OriginKindV2 */
|
||||
export interface OriginKindV2 extends OriginKindV1 {}
|
||||
|
||||
/** @name OutboundStatus */
|
||||
export interface OutboundStatus extends Enum {
|
||||
readonly isOk: boolean;
|
||||
@@ -235,9 +458,27 @@ export interface Outcome extends Enum {
|
||||
readonly isComplete: boolean;
|
||||
readonly asComplete: Weight;
|
||||
readonly isIncomplete: boolean;
|
||||
readonly asIncomplete: ITuple<[Weight, XcmError]>;
|
||||
readonly asIncomplete: ITuple<[Weight, XcmErrorV0]>;
|
||||
readonly isError: boolean;
|
||||
readonly asError: XcmError;
|
||||
readonly asError: XcmErrorV0;
|
||||
}
|
||||
|
||||
/** @name QueryId */
|
||||
export interface QueryId extends u64 {}
|
||||
|
||||
/** @name QueryStatus */
|
||||
export interface QueryStatus extends Enum {
|
||||
readonly isPending: boolean;
|
||||
readonly asPending: {
|
||||
readonly responder: VersionedMultiLocation;
|
||||
readonly maybeNotify: Option<ITuple<[u8, u8]>>;
|
||||
readonly timeout: BlockNumber;
|
||||
} & Struct;
|
||||
readonly isReady: boolean;
|
||||
readonly asReady: {
|
||||
readonly response: VersionedResponse;
|
||||
readonly at: BlockNumber;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name QueueConfigData */
|
||||
@@ -249,22 +490,105 @@ export interface QueueConfigData extends Struct {
|
||||
readonly weightRestrictDecay: Weight;
|
||||
}
|
||||
|
||||
/** @name Response */
|
||||
export interface Response extends ResponseV1 {}
|
||||
|
||||
/** @name ResponseV0 */
|
||||
export interface ResponseV0 extends Enum {
|
||||
readonly isAssets: boolean;
|
||||
readonly asAssets: Vec<MultiAssetV0>;
|
||||
}
|
||||
|
||||
/** @name ResponseV1 */
|
||||
export interface ResponseV1 extends Enum {
|
||||
readonly isAssets: boolean;
|
||||
readonly asAssets: MultiAssetsV1;
|
||||
}
|
||||
|
||||
/** @name ResponseV2 */
|
||||
export interface ResponseV2 extends Enum {
|
||||
readonly isNull: boolean;
|
||||
readonly isAssets: boolean;
|
||||
readonly asAssets: MultiAssetsV2;
|
||||
readonly isExecutionResult: boolean;
|
||||
readonly asExecutionResult: ResponseV2Result;
|
||||
}
|
||||
|
||||
/** @name ResponseV2Error */
|
||||
export interface ResponseV2Error extends ITuple<[u32, XcmErrorV2]> {}
|
||||
|
||||
/** @name ResponseV2Result */
|
||||
export interface ResponseV2Result extends Result<Null, ResponseV2Error> {
|
||||
readonly isErr: boolean;
|
||||
readonly asErr: ResponseV2Error;
|
||||
/** @deprecated Use isErr */
|
||||
readonly isError: boolean;
|
||||
/** @deprecated Use asErr */
|
||||
readonly asError: ResponseV2Error;
|
||||
readonly isOk: boolean;
|
||||
}
|
||||
|
||||
/** @name VersionedMultiAsset */
|
||||
export interface VersionedMultiAsset extends Enum {
|
||||
readonly isV0: boolean;
|
||||
readonly asV0: MultiAsset;
|
||||
readonly asV0: MultiAssetV0;
|
||||
readonly isV1: boolean;
|
||||
readonly asV1: MultiAssetV1;
|
||||
readonly isV2: boolean;
|
||||
readonly asV2: MultiAssetV2;
|
||||
}
|
||||
|
||||
/** @name VersionedMultiAssets */
|
||||
export interface VersionedMultiAssets extends Enum {
|
||||
readonly isV0: boolean;
|
||||
readonly asV0: Vec<MultiAssetV0>;
|
||||
readonly isV1: boolean;
|
||||
readonly asV1: MultiAssetsV1;
|
||||
readonly isV2: boolean;
|
||||
readonly asV2: MultiAssetsV2;
|
||||
}
|
||||
|
||||
/** @name VersionedMultiLocation */
|
||||
export interface VersionedMultiLocation extends Enum {
|
||||
readonly isV0: boolean;
|
||||
readonly asV0: MultiLocation;
|
||||
readonly asV0: MultiLocationV0;
|
||||
readonly isV1: boolean;
|
||||
readonly asV1: MultiLocationV1;
|
||||
readonly isV2: boolean;
|
||||
readonly asV2: MultiLocationV2;
|
||||
}
|
||||
|
||||
/** @name VersionedResponse */
|
||||
export interface VersionedResponse extends Struct {
|
||||
readonly V0: ResponseV0;
|
||||
readonly V1: ResponseV1;
|
||||
readonly V2: ResponseV2;
|
||||
}
|
||||
|
||||
/** @name VersionedXcm */
|
||||
export interface VersionedXcm extends Enum {
|
||||
readonly isV0: boolean;
|
||||
readonly asV0: Xcm;
|
||||
readonly asV0: XcmV0;
|
||||
readonly isV1: boolean;
|
||||
readonly asV1: XcmV1;
|
||||
readonly isV2: boolean;
|
||||
readonly asV2: XcmV2;
|
||||
}
|
||||
|
||||
/** @name VersionMigrationStage */
|
||||
export interface VersionMigrationStage extends Enum {
|
||||
readonly isMigrateSupportedVersion: boolean;
|
||||
readonly isMigrateVersionNotifiers: boolean;
|
||||
readonly isNotifyCurrentTargets: boolean;
|
||||
readonly asNotifyCurrentTargets: Option<Bytes>;
|
||||
readonly isMigrateAndNotifyOldTargets: boolean;
|
||||
}
|
||||
|
||||
/** @name WeightLimitV2 */
|
||||
export interface WeightLimitV2 extends Enum {
|
||||
readonly isUnlimited: boolean;
|
||||
readonly isLimited: boolean;
|
||||
readonly asLimited: Compact<u64>;
|
||||
}
|
||||
|
||||
/** @name WildFungibility */
|
||||
@@ -274,7 +598,10 @@ export interface WildFungibility extends Enum {
|
||||
}
|
||||
|
||||
/** @name WildMultiAsset */
|
||||
export interface WildMultiAsset extends Enum {
|
||||
export interface WildMultiAsset extends WildMultiAssetV1 {}
|
||||
|
||||
/** @name WildMultiAssetV1 */
|
||||
export interface WildMultiAssetV1 extends Enum {
|
||||
readonly isAll: boolean;
|
||||
readonly isAllOf: boolean;
|
||||
readonly asAllOf: {
|
||||
@@ -284,66 +611,7 @@ export interface WildMultiAsset extends Enum {
|
||||
}
|
||||
|
||||
/** @name Xcm */
|
||||
export interface Xcm extends Enum {
|
||||
readonly isWithdrawAsset: boolean;
|
||||
readonly asWithdrawAsset: {
|
||||
readonly assets: MultiAssets;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isReserveAssetDeposit: boolean;
|
||||
readonly asReserveAssetDeposit: {
|
||||
readonly assets: MultiAssets;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isReceiveTeleportedAsset: boolean;
|
||||
readonly asReceiveTeleportedAsset: {
|
||||
readonly assets: MultiAssets;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isQueryResponse: boolean;
|
||||
readonly asQueryResponse: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly response: XcmResponse;
|
||||
} & Struct;
|
||||
readonly isTransferAsset: boolean;
|
||||
readonly asTransferAsset: {
|
||||
readonly assets: MultiAssets;
|
||||
readonly dest: MultiLocation;
|
||||
} & Struct;
|
||||
readonly isTransferReserveAsset: boolean;
|
||||
readonly asTransferReserveAsset: {
|
||||
readonly assets: MultiAssets;
|
||||
readonly dest: MultiLocation;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isTransact: boolean;
|
||||
readonly asTransact: {
|
||||
readonly originType: XcmOriginKind;
|
||||
readonly requireWeightAtMost: u64;
|
||||
readonly call: DoubleEncodedCall;
|
||||
} & Struct;
|
||||
readonly isHrmpNewChannelOpenRequest: boolean;
|
||||
readonly asHrmpNewChannelOpenRequest: {
|
||||
readonly sender: Compact<u32>;
|
||||
readonly maxMessageSize: Compact<u32>;
|
||||
readonly maxCapacity: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelAccepted: boolean;
|
||||
readonly asHrmpChannelAccepted: {
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelClosing: boolean;
|
||||
readonly asHrmpChannelClosing: {
|
||||
readonly initiator: Compact<u32>;
|
||||
readonly sender: Compact<u32>;
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isRelayedFrom: boolean;
|
||||
readonly asRelayedFrom: {
|
||||
readonly who: MultiLocation;
|
||||
readonly message: Xcm;
|
||||
} & Struct;
|
||||
}
|
||||
export interface Xcm extends XcmV1 {}
|
||||
|
||||
/** @name XcmAssetId */
|
||||
export interface XcmAssetId extends Enum {
|
||||
@@ -354,7 +622,10 @@ export interface XcmAssetId extends Enum {
|
||||
}
|
||||
|
||||
/** @name XcmError */
|
||||
export interface XcmError extends Enum {
|
||||
export interface XcmError extends XcmErrorV1 {}
|
||||
|
||||
/** @name XcmErrorV0 */
|
||||
export interface XcmErrorV0 extends Enum {
|
||||
readonly isUndefined: boolean;
|
||||
readonly isOverflow: boolean;
|
||||
readonly isUnimplemented: boolean;
|
||||
@@ -383,6 +654,83 @@ export interface XcmError extends Enum {
|
||||
readonly isNotWithdrawable: boolean;
|
||||
readonly isLocationCannotHold: boolean;
|
||||
readonly isTooExpensive: boolean;
|
||||
readonly isAssetNotFound: boolean;
|
||||
readonly isRecursionLimitReached: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmErrorV1 */
|
||||
export interface XcmErrorV1 extends Enum {
|
||||
readonly isUndefined: boolean;
|
||||
readonly isOverflow: boolean;
|
||||
readonly isUnimplemented: boolean;
|
||||
readonly isUnhandledXcmVersion: boolean;
|
||||
readonly isUnhandledXcmMessage: boolean;
|
||||
readonly isUnhandledEffect: boolean;
|
||||
readonly isEscalationOfPrivilege: boolean;
|
||||
readonly isUntrustedReserveLocation: boolean;
|
||||
readonly isUntrustedTeleportLocation: boolean;
|
||||
readonly isDestinationBufferOverflow: boolean;
|
||||
readonly isSendFailed: boolean;
|
||||
readonly isCannotReachDestination: boolean;
|
||||
readonly asCannotReachDestination: ITuple<[MultiLocationV1, XcmV1]>;
|
||||
readonly isMultiLocationFull: boolean;
|
||||
readonly isFailedToDecode: boolean;
|
||||
readonly isBadOrigin: boolean;
|
||||
readonly isExceedsMaxMessageSize: boolean;
|
||||
readonly isFailedToTransactAsset: boolean;
|
||||
readonly isWeightLimitReached: boolean;
|
||||
readonly asWeightLimitReached: Weight;
|
||||
readonly isWildcard: boolean;
|
||||
readonly isTooMuchWeightRequired: boolean;
|
||||
readonly isNotHoldingFees: boolean;
|
||||
readonly isWeightNotComputable: boolean;
|
||||
readonly isBarrier: boolean;
|
||||
readonly isNotWithdrawable: boolean;
|
||||
readonly isLocationCannotHold: boolean;
|
||||
readonly isTooExpensive: boolean;
|
||||
readonly isAssetNotFound: boolean;
|
||||
readonly isDestinationUnsupported: boolean;
|
||||
readonly isRecursionLimitReached: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmErrorV2 */
|
||||
export interface XcmErrorV2 extends Enum {
|
||||
readonly isUndefined: boolean;
|
||||
readonly isOverflow: boolean;
|
||||
readonly isUnimplemented: boolean;
|
||||
readonly isUnhandledXcmVersion: boolean;
|
||||
readonly isUnhandledXcmMessage: boolean;
|
||||
readonly isUnhandledEffect: boolean;
|
||||
readonly isEscalationOfPrivilege: boolean;
|
||||
readonly isUntrustedReserveLocation: boolean;
|
||||
readonly isUntrustedTeleportLocation: boolean;
|
||||
readonly isDestinationBufferOverflow: boolean;
|
||||
readonly isMultiLocationFull: boolean;
|
||||
readonly isMultiLocationNotInvertible: boolean;
|
||||
readonly isFailedToDecode: boolean;
|
||||
readonly isBadOrigin: boolean;
|
||||
readonly isExceedsMaxMessageSize: boolean;
|
||||
readonly isFailedToTransactAsset: boolean;
|
||||
readonly isWeightLimitReached: boolean;
|
||||
readonly asWeightLimitReached: Weight;
|
||||
readonly isWildcard: boolean;
|
||||
readonly isTooMuchWeightRequired: boolean;
|
||||
readonly isNotHoldingFees: boolean;
|
||||
readonly isWeightNotComputable: boolean;
|
||||
readonly isBarrier: boolean;
|
||||
readonly isNotWithdrawable: boolean;
|
||||
readonly isLocationCannotHold: boolean;
|
||||
readonly isTooExpensive: boolean;
|
||||
readonly isAssetNotFound: boolean;
|
||||
readonly isDestinationUnsupported: boolean;
|
||||
readonly isRecursionLimitReached: boolean;
|
||||
readonly isTransport: boolean;
|
||||
readonly isUnroutable: boolean;
|
||||
readonly isUnknownWeightRequired: boolean;
|
||||
readonly isTrap: boolean;
|
||||
readonly asTrap: u64;
|
||||
readonly isUnknownClaim: boolean;
|
||||
readonly isInvalidLocation: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmOrder */
|
||||
@@ -393,37 +741,37 @@ export interface XcmOrderV0 extends Enum {
|
||||
readonly isNull: boolean;
|
||||
readonly isDepositAsset: boolean;
|
||||
readonly asDepositAsset: {
|
||||
readonly assets: Vec<MultiAsset>;
|
||||
readonly dest: MultiLocation;
|
||||
readonly assets: Vec<MultiAssetV0>;
|
||||
readonly dest: MultiLocationV0;
|
||||
} & Struct;
|
||||
readonly isDepositReserveAsset: boolean;
|
||||
readonly asDepositReserveAsset: {
|
||||
readonly assets: Vec<MultiAsset>;
|
||||
readonly dest: MultiLocation;
|
||||
readonly assets: Vec<MultiAssetV0>;
|
||||
readonly dest: MultiLocationV0;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isExchangeAsset: boolean;
|
||||
readonly asExchangeAsset: {
|
||||
readonly give: Vec<MultiAsset>;
|
||||
readonly receive: Vec<MultiAsset>;
|
||||
readonly give: Vec<MultiAssetV0>;
|
||||
readonly receive: Vec<MultiAssetV0>;
|
||||
} & Struct;
|
||||
readonly isInitiateReserveWithdraw: boolean;
|
||||
readonly asInitiateReserveWithdraw: {
|
||||
readonly assets: Vec<MultiAsset>;
|
||||
readonly reserve: MultiLocation;
|
||||
readonly assets: Vec<MultiAssetV0>;
|
||||
readonly reserve: MultiLocationV0;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isInitiateTeleport: boolean;
|
||||
readonly asInitiateTeleport: {
|
||||
readonly assets: Vec<MultiAsset>;
|
||||
readonly dest: MultiLocation;
|
||||
readonly dest: MultiLocationV0;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isQueryHolding: boolean;
|
||||
readonly asQueryHolding: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly dest: MultiLocation;
|
||||
readonly assets: Vec<MultiAsset>;
|
||||
readonly dest: MultiLocationV0;
|
||||
readonly assets: Vec<MultiAssetV0>;
|
||||
} & Struct;
|
||||
readonly isBuyExecution: boolean;
|
||||
readonly asBuyExecution: {
|
||||
@@ -431,7 +779,7 @@ export interface XcmOrderV0 extends Enum {
|
||||
readonly weight: u64;
|
||||
readonly debt: u64;
|
||||
readonly haltOnError: bool;
|
||||
readonly xcm: Vec<Xcm>;
|
||||
readonly xcm: Vec<XcmV0>;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
@@ -440,39 +788,39 @@ export interface XcmOrderV1 extends Enum {
|
||||
readonly isNoop: boolean;
|
||||
readonly isDepositAsset: boolean;
|
||||
readonly asDepositAsset: {
|
||||
readonly assets: MultiAssetFilter;
|
||||
readonly assets: MultiAssetFilterV1;
|
||||
readonly maxAssets: u32;
|
||||
readonly beneficiary: MultiLocation;
|
||||
readonly beneficiary: MultiLocationV1;
|
||||
} & Struct;
|
||||
readonly isDepositReserveAsset: boolean;
|
||||
readonly asDepositReserveAsset: {
|
||||
readonly assets: MultiAssetFilter;
|
||||
readonly assets: MultiAssetFilterV1;
|
||||
readonly maxAssets: u32;
|
||||
readonly dest: MultiLocation;
|
||||
readonly dest: MultiLocationV1;
|
||||
readonly effects: Vec<XcmOrderV1>;
|
||||
} & Struct;
|
||||
readonly isExchangeAsset: boolean;
|
||||
readonly asExchangeAsset: {
|
||||
readonly give: MultiAssetFilter;
|
||||
readonly receive: MultiAssets;
|
||||
readonly give: MultiAssetFilterV1;
|
||||
readonly receive: MultiAssetsV1;
|
||||
} & Struct;
|
||||
readonly isInitiateReserveWithdraw: boolean;
|
||||
readonly asInitiateReserveWithdraw: {
|
||||
readonly assets: MultiAssetFilter;
|
||||
readonly reserve: MultiLocation;
|
||||
readonly assets: MultiAssetFilterV1;
|
||||
readonly reserve: MultiLocationV1;
|
||||
readonly effects: Vec<XcmOrderV1>;
|
||||
} & Struct;
|
||||
readonly isInitiateTeleport: boolean;
|
||||
readonly asInitiateTeleport: {
|
||||
readonly assets: MultiAssetFilter;
|
||||
readonly dest: MultiLocation;
|
||||
readonly assets: MultiAssetFilterV1;
|
||||
readonly dest: MultiLocationV1;
|
||||
readonly effects: Vec<XcmOrderV1>;
|
||||
} & Struct;
|
||||
readonly isQueryHolding: boolean;
|
||||
readonly asQueryHolding: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly dest: MultiLocation;
|
||||
readonly assets: MultiAssetFilter;
|
||||
readonly dest: MultiLocationV1;
|
||||
readonly assets: MultiAssetFilterV1;
|
||||
} & Struct;
|
||||
readonly isBuyExecution: boolean;
|
||||
readonly asBuyExecution: {
|
||||
@@ -481,7 +829,7 @@ export interface XcmOrderV1 extends Enum {
|
||||
readonly debt: u64;
|
||||
readonly haltOnError: bool;
|
||||
readonly orders: Vec<XcmOrderV1>;
|
||||
readonly instructions: Vec<Xcm>;
|
||||
readonly instructions: Vec<XcmV1>;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
@@ -506,10 +854,134 @@ export interface XcmpMessageFormat extends Enum {
|
||||
readonly isSignals: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmResponse */
|
||||
export interface XcmResponse extends Enum {
|
||||
readonly isAssets: boolean;
|
||||
readonly asAssets: Vec<MultiAsset>;
|
||||
/** @name XcmV0 */
|
||||
export interface XcmV0 extends Enum {
|
||||
readonly isWithdrawAsset: boolean;
|
||||
readonly asWithdrawAsset: {
|
||||
readonly assets: Vec<MultiAssetV0>;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isReserveAssetDeposit: boolean;
|
||||
readonly asReserveAssetDeposit: {
|
||||
readonly assets: Vec<MultiAssetV0>;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isReceiveTeleportedAsset: boolean;
|
||||
readonly asReceiveTeleportedAsset: {
|
||||
readonly assets: Vec<MultiAssetV0>;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isQueryResponse: boolean;
|
||||
readonly asQueryResponse: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly response: ResponseV0;
|
||||
} & Struct;
|
||||
readonly isTransferAsset: boolean;
|
||||
readonly asTransferAsset: {
|
||||
readonly assets: Vec<MultiAssetV0>;
|
||||
readonly dest: MultiLocationV0;
|
||||
} & Struct;
|
||||
readonly isTransferReserveAsset: boolean;
|
||||
readonly asTransferReserveAsset: {
|
||||
readonly assets: Vec<MultiAssetV0>;
|
||||
readonly dest: MultiLocationV0;
|
||||
readonly effects: Vec<XcmOrderV0>;
|
||||
} & Struct;
|
||||
readonly isTransact: boolean;
|
||||
readonly asTransact: {
|
||||
readonly originType: XcmOriginKind;
|
||||
readonly requireWeightAtMost: u64;
|
||||
readonly call: DoubleEncodedCall;
|
||||
} & Struct;
|
||||
readonly isHrmpNewChannelOpenRequest: boolean;
|
||||
readonly asHrmpNewChannelOpenRequest: {
|
||||
readonly sender: Compact<u32>;
|
||||
readonly maxMessageSize: Compact<u32>;
|
||||
readonly maxCapacity: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelAccepted: boolean;
|
||||
readonly asHrmpChannelAccepted: {
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelClosing: boolean;
|
||||
readonly asHrmpChannelClosing: {
|
||||
readonly initiator: Compact<u32>;
|
||||
readonly sender: Compact<u32>;
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isRelayedFrom: boolean;
|
||||
readonly asRelayedFrom: {
|
||||
readonly who: MultiLocationV0;
|
||||
readonly message: XcmV0;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmV1 */
|
||||
export interface XcmV1 extends Enum {
|
||||
readonly isWithdrawAsset: boolean;
|
||||
readonly asWithdrawAsset: {
|
||||
readonly Vassets: MultiAssetsV1;
|
||||
readonly effects: Vec<XcmOrderV1>;
|
||||
} & Struct;
|
||||
readonly isReserveAssetDeposit: boolean;
|
||||
readonly asReserveAssetDeposit: {
|
||||
readonly Vassets: MultiAssetsV1;
|
||||
readonly effects: Vec<XcmOrderV1>;
|
||||
} & Struct;
|
||||
readonly isReceiveTeleportedAsset: boolean;
|
||||
readonly asReceiveTeleportedAsset: {
|
||||
readonly Vassets: MultiAssetsV1;
|
||||
readonly effects: Vec<XcmOrderV1>;
|
||||
} & Struct;
|
||||
readonly isQueryResponse: boolean;
|
||||
readonly asQueryResponse: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly response: ResponseV1;
|
||||
} & Struct;
|
||||
readonly isTransferAsset: boolean;
|
||||
readonly asTransferAsset: {
|
||||
readonly Vassets: MultiAssetsV1;
|
||||
readonly dest: MultiLocationV1;
|
||||
} & Struct;
|
||||
readonly isTransferReserveAsset: boolean;
|
||||
readonly asTransferReserveAsset: {
|
||||
readonly Vassets: MultiAssetsV1;
|
||||
readonly dest: MultiLocationV1;
|
||||
readonly effects: Vec<XcmOrderV1>;
|
||||
} & Struct;
|
||||
readonly isTransact: boolean;
|
||||
readonly asTransact: {
|
||||
readonly originType: XcmOriginKind;
|
||||
readonly requireWeightAtMost: u64;
|
||||
readonly call: DoubleEncodedCall;
|
||||
} & Struct;
|
||||
readonly isHrmpNewChannelOpenRequest: boolean;
|
||||
readonly asHrmpNewChannelOpenRequest: {
|
||||
readonly sender: Compact<u32>;
|
||||
readonly maxMessageSize: Compact<u32>;
|
||||
readonly maxCapacity: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelAccepted: boolean;
|
||||
readonly asHrmpChannelAccepted: {
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelClosing: boolean;
|
||||
readonly asHrmpChannelClosing: {
|
||||
readonly initiator: Compact<u32>;
|
||||
readonly sender: Compact<u32>;
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isRelayedFrom: boolean;
|
||||
readonly asRelayedFrom: {
|
||||
readonly who: MultiLocationV1;
|
||||
readonly message: XcmV1;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmV2 */
|
||||
export interface XcmV2 extends Vec<InstructionV2> {}
|
||||
|
||||
/** @name XcmVersion */
|
||||
export interface XcmVersion extends u32 {}
|
||||
|
||||
export type PHANTOM_XCM = 'xcm';
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { DefinitionsTypes } from '../../types';
|
||||
|
||||
export const v0: DefinitionsTypes = {
|
||||
AssetInstanceV0: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Index8: 'u8',
|
||||
Index16: 'Compact<u16>',
|
||||
Index32: 'Compact<u32>',
|
||||
Index64: 'Compact<u64>',
|
||||
Index128: 'Compact<u128>',
|
||||
Array4: '[u8; 4]',
|
||||
Array8: '[u8; 8]',
|
||||
Array16: '[u8; 16]',
|
||||
Array32: '[u8; 32]',
|
||||
Blob: 'Vec<u8>'
|
||||
}
|
||||
},
|
||||
JunctionV0: {
|
||||
_enum: {
|
||||
Parent: 'Null',
|
||||
Parachain: 'Compact<u32>',
|
||||
AccountId32: {
|
||||
network: 'NetworkId',
|
||||
id: 'AccountId'
|
||||
},
|
||||
AccountIndex64: {
|
||||
network: 'NetworkId',
|
||||
index: 'Compact<u64>'
|
||||
},
|
||||
AccountKey20: {
|
||||
network: 'NetworkId',
|
||||
key: '[u8; 20]'
|
||||
},
|
||||
PalletInstance: 'u8',
|
||||
GeneralIndex: 'Compact<u128>',
|
||||
GeneralKey: 'Vec<u8>',
|
||||
OnlyChild: 'Null',
|
||||
Plurality: {
|
||||
id: 'BodyId',
|
||||
part: 'BodyPart'
|
||||
}
|
||||
}
|
||||
},
|
||||
MultiAssetV0: {
|
||||
_enum: {
|
||||
None: 'Null',
|
||||
All: 'Null',
|
||||
AllFungible: 'Null',
|
||||
AllNonFungible: 'Null',
|
||||
AllAbstractFungible: 'Vec<u8>',
|
||||
AllAbstractNonFungible: 'Vec<u8>',
|
||||
AllConcreteFungible: 'MultiLocationV0',
|
||||
AllConcreteNonFungible: 'MultiLocationV0',
|
||||
AbstractFungible: {
|
||||
id: 'Vec<u8>',
|
||||
instance: 'Compact<u128>'
|
||||
},
|
||||
AbstractNonFungible: {
|
||||
class: 'Vec<u8>',
|
||||
instance: 'AssetInstanceV0'
|
||||
},
|
||||
ConcreteFungible: {
|
||||
id: 'MultiLocationV0',
|
||||
amount: 'Compact<u128>'
|
||||
},
|
||||
ConcreteNonFungible: {
|
||||
class: 'MultiLocationV0',
|
||||
instance: 'AssetInstanceV0'
|
||||
}
|
||||
}
|
||||
},
|
||||
MultiLocationV0: {
|
||||
_enum: {
|
||||
Here: 'Null',
|
||||
X1: 'JunctionV0',
|
||||
X2: '(JunctionV0, JunctionV0)',
|
||||
X3: '(JunctionV0, JunctionV0, JunctionV0)',
|
||||
X4: '(JunctionV0, JunctionV0, JunctionV0, JunctionV0)',
|
||||
X5: '(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)',
|
||||
X6: '(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)',
|
||||
X7: '(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)',
|
||||
X8: '(JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0, JunctionV0)'
|
||||
}
|
||||
},
|
||||
OriginKindV0: {
|
||||
_enum: ['Native', 'SovereignAccount', 'Superuser', 'Xcm']
|
||||
},
|
||||
ResponseV0: {
|
||||
_enum: {
|
||||
Assets: 'Vec<MultiAssetV0>'
|
||||
}
|
||||
},
|
||||
XcmV0: {
|
||||
_enum: {
|
||||
WithdrawAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ReserveAssetDeposit: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ReceiveTeleportedAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'ResponseV0'
|
||||
},
|
||||
TransferAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0'
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
Transact: {
|
||||
originType: 'XcmOriginKind',
|
||||
requireWeightAtMost: 'u64',
|
||||
call: 'DoubleEncodedCall'
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
RelayedFrom: {
|
||||
who: 'MultiLocationV0',
|
||||
message: 'XcmV0'
|
||||
}
|
||||
}
|
||||
},
|
||||
XcmErrorV0: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
SendFailed: 'Null',
|
||||
CannotReachDestination: '(MultiLocation, Xcm)',
|
||||
MultiLocationFull: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null',
|
||||
WeightLimitReached: 'Weight',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null',
|
||||
AssetNotFound: 'Null',
|
||||
RecursionLimitReached: 'Null'
|
||||
}
|
||||
},
|
||||
XcmOrderV0: {
|
||||
_enum: {
|
||||
Null: 'Null',
|
||||
DepositAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0'
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
dest: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'Vec<MultiAssetV0>',
|
||||
receive: 'Vec<MultiAssetV0>'
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'Vec<MultiAssetV0>',
|
||||
reserve: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'Vec<MultiAsset>',
|
||||
dest: 'MultiLocationV0',
|
||||
effects: 'Vec<XcmOrderV0>'
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'MultiLocationV0',
|
||||
assets: 'Vec<MultiAssetV0>'
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'MultiAsset',
|
||||
weight: 'u64',
|
||||
debt: 'u64',
|
||||
haltOnError: 'bool',
|
||||
xcm: 'Vec<XcmV0>'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,216 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { DefinitionsTypes } from '../../types';
|
||||
|
||||
export const v1: DefinitionsTypes = {
|
||||
AssetInstanceV1: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Index: 'Compact<u128>',
|
||||
Array4: '[u8; 4]',
|
||||
Array8: '[u8; 8]',
|
||||
Array16: '[u8; 16]',
|
||||
Array32: '[u8; 32]',
|
||||
Blob: 'Bytes'
|
||||
}
|
||||
},
|
||||
JunctionV1: {
|
||||
_enum: {
|
||||
Parachain: 'Compact<u32>',
|
||||
AccountId32: {
|
||||
network: 'NetworkId',
|
||||
id: 'AccountId'
|
||||
},
|
||||
AccountIndex64: {
|
||||
network: 'NetworkId',
|
||||
index: 'Compact<u64>'
|
||||
},
|
||||
AccountKey20: {
|
||||
network: 'NetworkId',
|
||||
key: '[u8; 20]'
|
||||
},
|
||||
PalletInstance: 'u8',
|
||||
GeneralIndex: 'Compact<u128>',
|
||||
GeneralKey: 'Vec<u8>',
|
||||
OnlyChild: 'Null',
|
||||
Plurality: {
|
||||
id: 'BodyId',
|
||||
part: 'BodyPart'
|
||||
}
|
||||
}
|
||||
},
|
||||
JunctionsV1: {
|
||||
_enum: {
|
||||
Here: 'Null',
|
||||
X1: 'JunctionV1',
|
||||
X2: '(JunctionV1, JunctionV1)',
|
||||
X3: '(JunctionV1, JunctionV1, JunctionV1)',
|
||||
X4: '(JunctionV1, JunctionV1, JunctionV1, JunctionV1)',
|
||||
X5: '(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)',
|
||||
X6: '(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)',
|
||||
X7: '(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)',
|
||||
X8: '(JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1, JunctionV1)'
|
||||
}
|
||||
},
|
||||
MultiAssetsV1: 'Vec<MultiAssetV1>',
|
||||
MultiAssetV1: {
|
||||
id: 'XcmAssetId',
|
||||
fungibility: 'Fungibility'
|
||||
},
|
||||
MultiAssetFilterV1: {
|
||||
_enum: {
|
||||
Definite: 'MultiAssetsV1',
|
||||
Wild: 'WildMultiAssetV1'
|
||||
}
|
||||
},
|
||||
MultiLocationV1: {
|
||||
parents: 'u8',
|
||||
interior: 'JunctionsV1'
|
||||
},
|
||||
OriginKindV1: 'OriginKindV0',
|
||||
ResponseV1: {
|
||||
_enum: {
|
||||
Assets: 'MultiAssetsV1'
|
||||
}
|
||||
},
|
||||
WildMultiAssetV1: {
|
||||
_enum: {
|
||||
All: 'Null',
|
||||
AllOf: {
|
||||
id: 'XcmAssetId',
|
||||
fungibility: 'WildFungibility'
|
||||
}
|
||||
}
|
||||
},
|
||||
XcmV1: {
|
||||
_enum: {
|
||||
WithdrawAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
ReserveAssetDeposit: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
ReceiveTeleportedAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'ResponseV1'
|
||||
},
|
||||
TransferAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
dest: 'MultiLocationV1'
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
Vassets: 'MultiAssetsV1',
|
||||
dest: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
Transact: {
|
||||
originType: 'XcmOriginKind',
|
||||
requireWeightAtMost: 'u64',
|
||||
call: 'DoubleEncodedCall'
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
RelayedFrom: {
|
||||
who: 'MultiLocationV1',
|
||||
message: 'XcmV1'
|
||||
}
|
||||
}
|
||||
},
|
||||
XcmErrorV1: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
SendFailed: 'Null',
|
||||
CannotReachDestination: '(MultiLocationV1, XcmV1)',
|
||||
MultiLocationFull: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null',
|
||||
WeightLimitReached: 'Weight',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null',
|
||||
AssetNotFound: 'Null',
|
||||
DestinationUnsupported: 'Null',
|
||||
RecursionLimitReached: 'Null'
|
||||
}
|
||||
},
|
||||
XcmOrderV1: {
|
||||
_enum: {
|
||||
Noop: 'Null',
|
||||
DepositAsset: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
maxAssets: 'u32',
|
||||
beneficiary: 'MultiLocationV1'
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
maxAssets: 'u32',
|
||||
dest: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'MultiAssetFilterV1',
|
||||
receive: 'MultiAssetsV1'
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
reserve: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'MultiAssetFilterV1',
|
||||
dest: 'MultiLocationV1',
|
||||
effects: 'Vec<XcmOrderV1>'
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'MultiLocationV1',
|
||||
assets: 'MultiAssetFilterV1'
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'MultiAsset',
|
||||
weight: 'u64',
|
||||
debt: 'u64',
|
||||
haltOnError: 'bool',
|
||||
orders: 'Vec<XcmOrderV1>',
|
||||
instructions: 'Vec<XcmV1>'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,161 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { DefinitionsTypes } from '../../types';
|
||||
|
||||
export const v2: DefinitionsTypes = {
|
||||
JunctionV2: 'JunctionV1',
|
||||
JunctionsV2: 'JunctionsV1',
|
||||
MultiAssetsV2: 'MultiAssetsV1',
|
||||
MultiAssetV2: 'MultiAssetV1',
|
||||
MultiAssetFilterV2: 'MultiAssetFilterV1',
|
||||
MultiLocationV2: 'MultiLocationV1',
|
||||
OriginKindV2: 'OriginKindV1',
|
||||
ResponseV2: {
|
||||
_enum: {
|
||||
Null: 'Null',
|
||||
Assets: 'MultiAssetsV2',
|
||||
ExecutionResult: 'ResponseV2Result'
|
||||
}
|
||||
},
|
||||
ResponseV2Error: '(u32, XcmErrorV2)',
|
||||
ResponseV2Result: 'Result<Null, ResponseV2Error>',
|
||||
WeightLimitV2: {
|
||||
_enum: {
|
||||
Unlimited: 'Null',
|
||||
Limited: 'Compact<u64>'
|
||||
}
|
||||
},
|
||||
InstructionV2: {
|
||||
_enum: {
|
||||
WithdrawAsset: 'MultiAssetsV2',
|
||||
ReserveAssetDeposited: 'MultiAssetsV2',
|
||||
ReceiveTeleportedAsset: 'MultiAssetsV2',
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'ResponseV2',
|
||||
maxWeight: 'Compact<u64>'
|
||||
},
|
||||
TransferAsset: {
|
||||
assets: 'MultiAssetsV2',
|
||||
beneficiary: 'MultiLocationV2'
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
assets: 'MultiAssetsV2',
|
||||
dest: 'MultiLocationV2',
|
||||
xcm: 'XcmV2'
|
||||
},
|
||||
Transact: {
|
||||
originType: 'OriginKindV2',
|
||||
requireWeightAtMost: 'u64',
|
||||
call: 'DoubleEncodedCall'
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>'
|
||||
},
|
||||
ClearOrigin: 'Null',
|
||||
DescendOrigin: 'InteriorMultiLocation',
|
||||
ReportError: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'MultiLocationV2',
|
||||
maxResponseWeight: 'Compact<u64>'
|
||||
},
|
||||
DepositAsset: {
|
||||
assets: 'MultiAssetFilterV2',
|
||||
maxAssets: 'u32',
|
||||
beneficiary: 'MultiLocationV2'
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'MultiAssetFilterV2',
|
||||
maxAssets: 'u32',
|
||||
dest: 'MultiLocationV2',
|
||||
xcm: 'XcmV2'
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'MultiAssetFilterV2',
|
||||
receive: 'MultiAssetsV2'
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'MultiAssetFilterV2',
|
||||
reserve: 'MultiLocationV2',
|
||||
xcm: 'XcmV2'
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'MultiAssetFilterV2',
|
||||
dest: 'MultiLocationV2',
|
||||
xcm: 'XcmV2'
|
||||
},
|
||||
QueryHolding: {
|
||||
query_id: 'Compact<u64>',
|
||||
dest: 'MultiLocationV2',
|
||||
assets: 'MultiAssetFilterV2',
|
||||
maxResponse_Weight: 'Compact<u64>'
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'MultiAssetV2',
|
||||
weightLimit: 'WeightLimitV2'
|
||||
},
|
||||
RefundSurplus: 'Null',
|
||||
SetErrorHandler: 'XcmV2',
|
||||
SetAppendix: 'XcmV2',
|
||||
ClearError: 'Null',
|
||||
ClaimAsset: {
|
||||
assets: 'MultiAssetsV2',
|
||||
ticket: 'MultiLocationV2'
|
||||
},
|
||||
Trap: 'u64'
|
||||
}
|
||||
},
|
||||
XcmV2: 'Vec<InstructionV2>',
|
||||
XcmErrorV2: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
MultiLocationFull: 'Null',
|
||||
MultiLocationNotInvertible: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null',
|
||||
WeightLimitReached: 'Weight',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null',
|
||||
AssetNotFound: 'Null',
|
||||
DestinationUnsupported: 'Null',
|
||||
RecursionLimitReached: 'Null',
|
||||
Transport: 'Null',
|
||||
Unroutable: 'Null',
|
||||
UnknownWeightRequired: 'Null',
|
||||
Trap: 'u64',
|
||||
UnknownClaim: 'Null',
|
||||
InvalidLocation: 'Null'
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -15,11 +15,15 @@ const EMPTY_METADATA = new Uint8Array([0x6d, 0x65, 0x74, 0x61, 9]);
|
||||
const EMPTY_U8A = new Uint8Array();
|
||||
|
||||
function toU8a (value: Uint8Array | string = EMPTY_U8A): Uint8Array {
|
||||
return isHex(value)
|
||||
? toU8a(u8aToU8a(value))
|
||||
: isU8a(value) && value.length === 0
|
||||
if (isHex(value)) {
|
||||
return toU8a(u8aToU8a(value));
|
||||
} else if (isU8a(value)) {
|
||||
return value.length === 0
|
||||
? EMPTY_METADATA
|
||||
: value;
|
||||
}
|
||||
|
||||
throw new Error('Invalid type passed to Metadata constructor');
|
||||
}
|
||||
|
||||
function decodeMetadata (registry: Registry, _value?: Uint8Array | string | Map<string, unknown> | Record<string, unknown>): MetadataVersioned {
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types', version: '5.6.1' };
|
||||
export const packageInfo = { name: '@polkadot/types', version: '5.9.1' };
|
||||
|
||||
Reference in New Issue
Block a user