@dedot/chaintypes 0.134.0 → 0.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/astar/consts.d.ts +63 -0
- package/astar/errors.d.ts +74 -0
- package/astar/events.d.ts +73 -0
- package/astar/index.d.ts +1 -1
- package/astar/query.d.ts +48 -0
- package/astar/tx.d.ts +316 -0
- package/astar/types.d.ts +371 -3
- package/kusama-asset-hub/index.d.ts +1 -1
- package/kusama-people/consts.d.ts +38 -1
- package/kusama-people/errors.d.ts +18 -12
- package/kusama-people/events.d.ts +110 -2
- package/kusama-people/index.d.ts +1 -1
- package/kusama-people/query.d.ts +36 -6
- package/kusama-people/runtime.d.ts +1 -1
- package/kusama-people/tx.d.ts +204 -0
- package/kusama-people/types.d.ts +315 -24
- package/moonbeam/consts.d.ts +125 -0
- package/moonbeam/errors.d.ts +219 -50
- package/moonbeam/events.d.ts +331 -0
- package/moonbeam/index.d.ts +1 -1
- package/moonbeam/query.d.ts +267 -17
- package/moonbeam/runtime.d.ts +117 -1
- package/moonbeam/tx.d.ts +564 -88
- package/moonbeam/types.d.ts +1376 -239
- package/package.json +2 -2
package/moonbeam/tx.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
FixedBytes,
|
|
22
22
|
H160,
|
|
23
23
|
U256,
|
|
24
|
+
Header,
|
|
24
25
|
} from 'dedot/codecs';
|
|
25
26
|
import type {
|
|
26
27
|
MoonbeamRuntimeRuntimeCallLike,
|
|
@@ -63,6 +64,17 @@ import type {
|
|
|
63
64
|
CumulusPrimitivesCoreAggregateMessageOrigin,
|
|
64
65
|
PalletMigrationsMigrationCursor,
|
|
65
66
|
PalletMigrationsHistoricCleanupSelector,
|
|
67
|
+
BpHeaderChainJustificationGrandpaJustification,
|
|
68
|
+
BpHeaderChainInitializationData,
|
|
69
|
+
BpRuntimeBasicOperatingMode,
|
|
70
|
+
SpConsensusGrandpaAppPublic,
|
|
71
|
+
BpPolkadotCoreParachainsParaId,
|
|
72
|
+
BpPolkadotCoreParachainsParaHeadsProof,
|
|
73
|
+
BpMessagesMessagesOperatingMode,
|
|
74
|
+
BpMessagesTargetChainFromBridgedChainMessagesProof,
|
|
75
|
+
BpMessagesSourceChainFromBridgedChainMessagesDeliveryProof,
|
|
76
|
+
BpMessagesUnrewardedRelayersState,
|
|
77
|
+
XcmVersionedInteriorLocation,
|
|
66
78
|
} from './types.js';
|
|
67
79
|
|
|
68
80
|
export type ChainSubmittableExtrinsic<
|
|
@@ -3206,94 +3218,6 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
3206
3218
|
>
|
|
3207
3219
|
>;
|
|
3208
3220
|
|
|
3209
|
-
/**
|
|
3210
|
-
*
|
|
3211
|
-
* @param {Array<bigint>} assets
|
|
3212
|
-
**/
|
|
3213
|
-
approveAssetsToMigrate: GenericTxCall<
|
|
3214
|
-
Rv,
|
|
3215
|
-
(assets: Array<bigint>) => ChainSubmittableExtrinsic<
|
|
3216
|
-
Rv,
|
|
3217
|
-
{
|
|
3218
|
-
pallet: 'MoonbeamLazyMigrations';
|
|
3219
|
-
palletCall: {
|
|
3220
|
-
name: 'ApproveAssetsToMigrate';
|
|
3221
|
-
params: { assets: Array<bigint> };
|
|
3222
|
-
};
|
|
3223
|
-
}
|
|
3224
|
-
>
|
|
3225
|
-
>;
|
|
3226
|
-
|
|
3227
|
-
/**
|
|
3228
|
-
*
|
|
3229
|
-
* @param {bigint} assetId
|
|
3230
|
-
**/
|
|
3231
|
-
startForeignAssetsMigration: GenericTxCall<
|
|
3232
|
-
Rv,
|
|
3233
|
-
(assetId: bigint) => ChainSubmittableExtrinsic<
|
|
3234
|
-
Rv,
|
|
3235
|
-
{
|
|
3236
|
-
pallet: 'MoonbeamLazyMigrations';
|
|
3237
|
-
palletCall: {
|
|
3238
|
-
name: 'StartForeignAssetsMigration';
|
|
3239
|
-
params: { assetId: bigint };
|
|
3240
|
-
};
|
|
3241
|
-
}
|
|
3242
|
-
>
|
|
3243
|
-
>;
|
|
3244
|
-
|
|
3245
|
-
/**
|
|
3246
|
-
*
|
|
3247
|
-
* @param {number} limit
|
|
3248
|
-
**/
|
|
3249
|
-
migrateForeignAssetBalances: GenericTxCall<
|
|
3250
|
-
Rv,
|
|
3251
|
-
(limit: number) => ChainSubmittableExtrinsic<
|
|
3252
|
-
Rv,
|
|
3253
|
-
{
|
|
3254
|
-
pallet: 'MoonbeamLazyMigrations';
|
|
3255
|
-
palletCall: {
|
|
3256
|
-
name: 'MigrateForeignAssetBalances';
|
|
3257
|
-
params: { limit: number };
|
|
3258
|
-
};
|
|
3259
|
-
}
|
|
3260
|
-
>
|
|
3261
|
-
>;
|
|
3262
|
-
|
|
3263
|
-
/**
|
|
3264
|
-
*
|
|
3265
|
-
* @param {number} limit
|
|
3266
|
-
**/
|
|
3267
|
-
migrateForeignAssetApprovals: GenericTxCall<
|
|
3268
|
-
Rv,
|
|
3269
|
-
(limit: number) => ChainSubmittableExtrinsic<
|
|
3270
|
-
Rv,
|
|
3271
|
-
{
|
|
3272
|
-
pallet: 'MoonbeamLazyMigrations';
|
|
3273
|
-
palletCall: {
|
|
3274
|
-
name: 'MigrateForeignAssetApprovals';
|
|
3275
|
-
params: { limit: number };
|
|
3276
|
-
};
|
|
3277
|
-
}
|
|
3278
|
-
>
|
|
3279
|
-
>;
|
|
3280
|
-
|
|
3281
|
-
/**
|
|
3282
|
-
*
|
|
3283
|
-
**/
|
|
3284
|
-
finishForeignAssetsMigration: GenericTxCall<
|
|
3285
|
-
Rv,
|
|
3286
|
-
() => ChainSubmittableExtrinsic<
|
|
3287
|
-
Rv,
|
|
3288
|
-
{
|
|
3289
|
-
pallet: 'MoonbeamLazyMigrations';
|
|
3290
|
-
palletCall: {
|
|
3291
|
-
name: 'FinishForeignAssetsMigration';
|
|
3292
|
-
};
|
|
3293
|
-
}
|
|
3294
|
-
>
|
|
3295
|
-
>;
|
|
3296
|
-
|
|
3297
3221
|
/**
|
|
3298
3222
|
* Generic pallet tx call
|
|
3299
3223
|
**/
|
|
@@ -8315,6 +8239,558 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
8315
8239
|
>
|
|
8316
8240
|
>;
|
|
8317
8241
|
|
|
8242
|
+
/**
|
|
8243
|
+
* Generic pallet tx call
|
|
8244
|
+
**/
|
|
8245
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
8246
|
+
};
|
|
8247
|
+
/**
|
|
8248
|
+
* Pallet `BridgeKusamaGrandpa`'s transaction calls
|
|
8249
|
+
**/
|
|
8250
|
+
bridgeKusamaGrandpa: {
|
|
8251
|
+
/**
|
|
8252
|
+
* This call is deprecated and will be removed around May 2024. Use the
|
|
8253
|
+
* `submit_finality_proof_ex` instead. Semantically, this call is an equivalent of the
|
|
8254
|
+
* `submit_finality_proof_ex` call without current authority set id check.
|
|
8255
|
+
*
|
|
8256
|
+
* @param {Header} finalityTarget
|
|
8257
|
+
* @param {BpHeaderChainJustificationGrandpaJustification} justification
|
|
8258
|
+
**/
|
|
8259
|
+
submitFinalityProof: GenericTxCall<
|
|
8260
|
+
Rv,
|
|
8261
|
+
(
|
|
8262
|
+
finalityTarget: Header,
|
|
8263
|
+
justification: BpHeaderChainJustificationGrandpaJustification,
|
|
8264
|
+
) => ChainSubmittableExtrinsic<
|
|
8265
|
+
Rv,
|
|
8266
|
+
{
|
|
8267
|
+
pallet: 'BridgeKusamaGrandpa';
|
|
8268
|
+
palletCall: {
|
|
8269
|
+
name: 'SubmitFinalityProof';
|
|
8270
|
+
params: { finalityTarget: Header; justification: BpHeaderChainJustificationGrandpaJustification };
|
|
8271
|
+
};
|
|
8272
|
+
}
|
|
8273
|
+
>
|
|
8274
|
+
>;
|
|
8275
|
+
|
|
8276
|
+
/**
|
|
8277
|
+
* Bootstrap the bridge pallet with an initial header and authority set from which to sync.
|
|
8278
|
+
*
|
|
8279
|
+
* The initial configuration provided does not need to be the genesis header of the bridged
|
|
8280
|
+
* chain, it can be any arbitrary header. You can also provide the next scheduled set
|
|
8281
|
+
* change if it is already know.
|
|
8282
|
+
*
|
|
8283
|
+
* This function is only allowed to be called from a trusted origin and writes to storage
|
|
8284
|
+
* with practically no checks in terms of the validity of the data. It is important that
|
|
8285
|
+
* you ensure that valid data is being passed in.
|
|
8286
|
+
*
|
|
8287
|
+
* @param {BpHeaderChainInitializationData} initData
|
|
8288
|
+
**/
|
|
8289
|
+
initialize: GenericTxCall<
|
|
8290
|
+
Rv,
|
|
8291
|
+
(initData: BpHeaderChainInitializationData) => ChainSubmittableExtrinsic<
|
|
8292
|
+
Rv,
|
|
8293
|
+
{
|
|
8294
|
+
pallet: 'BridgeKusamaGrandpa';
|
|
8295
|
+
palletCall: {
|
|
8296
|
+
name: 'Initialize';
|
|
8297
|
+
params: { initData: BpHeaderChainInitializationData };
|
|
8298
|
+
};
|
|
8299
|
+
}
|
|
8300
|
+
>
|
|
8301
|
+
>;
|
|
8302
|
+
|
|
8303
|
+
/**
|
|
8304
|
+
* Change `PalletOwner`.
|
|
8305
|
+
*
|
|
8306
|
+
* May only be called either by root, or by `PalletOwner`.
|
|
8307
|
+
*
|
|
8308
|
+
* @param {AccountId20Like | undefined} newOwner
|
|
8309
|
+
**/
|
|
8310
|
+
setOwner: GenericTxCall<
|
|
8311
|
+
Rv,
|
|
8312
|
+
(newOwner: AccountId20Like | undefined) => ChainSubmittableExtrinsic<
|
|
8313
|
+
Rv,
|
|
8314
|
+
{
|
|
8315
|
+
pallet: 'BridgeKusamaGrandpa';
|
|
8316
|
+
palletCall: {
|
|
8317
|
+
name: 'SetOwner';
|
|
8318
|
+
params: { newOwner: AccountId20Like | undefined };
|
|
8319
|
+
};
|
|
8320
|
+
}
|
|
8321
|
+
>
|
|
8322
|
+
>;
|
|
8323
|
+
|
|
8324
|
+
/**
|
|
8325
|
+
* Halt or resume all pallet operations.
|
|
8326
|
+
*
|
|
8327
|
+
* May only be called either by root, or by `PalletOwner`.
|
|
8328
|
+
*
|
|
8329
|
+
* @param {BpRuntimeBasicOperatingMode} operatingMode
|
|
8330
|
+
**/
|
|
8331
|
+
setOperatingMode: GenericTxCall<
|
|
8332
|
+
Rv,
|
|
8333
|
+
(operatingMode: BpRuntimeBasicOperatingMode) => ChainSubmittableExtrinsic<
|
|
8334
|
+
Rv,
|
|
8335
|
+
{
|
|
8336
|
+
pallet: 'BridgeKusamaGrandpa';
|
|
8337
|
+
palletCall: {
|
|
8338
|
+
name: 'SetOperatingMode';
|
|
8339
|
+
params: { operatingMode: BpRuntimeBasicOperatingMode };
|
|
8340
|
+
};
|
|
8341
|
+
}
|
|
8342
|
+
>
|
|
8343
|
+
>;
|
|
8344
|
+
|
|
8345
|
+
/**
|
|
8346
|
+
* Verify a target header is finalized according to the given finality proof. The proof
|
|
8347
|
+
* is assumed to be signed by GRANDPA authorities set with `current_set_id` id.
|
|
8348
|
+
*
|
|
8349
|
+
* It will use the underlying storage pallet to fetch information about the current
|
|
8350
|
+
* authorities and best finalized header in order to verify that the header is finalized.
|
|
8351
|
+
*
|
|
8352
|
+
* If successful in verification, it will write the target header to the underlying storage
|
|
8353
|
+
* pallet.
|
|
8354
|
+
*
|
|
8355
|
+
* The call fails if:
|
|
8356
|
+
*
|
|
8357
|
+
* - the pallet is halted;
|
|
8358
|
+
*
|
|
8359
|
+
* - the pallet knows better header than the `finality_target`;
|
|
8360
|
+
*
|
|
8361
|
+
* - the id of best GRANDPA authority set, known to the pallet is not equal to the
|
|
8362
|
+
* `current_set_id`;
|
|
8363
|
+
*
|
|
8364
|
+
* - verification is not optimized or invalid;
|
|
8365
|
+
*
|
|
8366
|
+
* - header contains forced authorities set change or change with non-zero delay.
|
|
8367
|
+
*
|
|
8368
|
+
* The `is_free_execution_expected` parameter is not really used inside the call. It is
|
|
8369
|
+
* used by the transaction extension, which should be registered at the runtime level. If
|
|
8370
|
+
* this parameter is `true`, the transaction will be treated as invalid, if the call won't
|
|
8371
|
+
* be executed for free. If transaction extension is not used by the runtime, this
|
|
8372
|
+
* parameter is not used at all.
|
|
8373
|
+
*
|
|
8374
|
+
* @param {Header} finalityTarget
|
|
8375
|
+
* @param {BpHeaderChainJustificationGrandpaJustification} justification
|
|
8376
|
+
* @param {bigint} currentSetId
|
|
8377
|
+
* @param {boolean} isFreeExecutionExpected
|
|
8378
|
+
**/
|
|
8379
|
+
submitFinalityProofEx: GenericTxCall<
|
|
8380
|
+
Rv,
|
|
8381
|
+
(
|
|
8382
|
+
finalityTarget: Header,
|
|
8383
|
+
justification: BpHeaderChainJustificationGrandpaJustification,
|
|
8384
|
+
currentSetId: bigint,
|
|
8385
|
+
isFreeExecutionExpected: boolean,
|
|
8386
|
+
) => ChainSubmittableExtrinsic<
|
|
8387
|
+
Rv,
|
|
8388
|
+
{
|
|
8389
|
+
pallet: 'BridgeKusamaGrandpa';
|
|
8390
|
+
palletCall: {
|
|
8391
|
+
name: 'SubmitFinalityProofEx';
|
|
8392
|
+
params: {
|
|
8393
|
+
finalityTarget: Header;
|
|
8394
|
+
justification: BpHeaderChainJustificationGrandpaJustification;
|
|
8395
|
+
currentSetId: bigint;
|
|
8396
|
+
isFreeExecutionExpected: boolean;
|
|
8397
|
+
};
|
|
8398
|
+
};
|
|
8399
|
+
}
|
|
8400
|
+
>
|
|
8401
|
+
>;
|
|
8402
|
+
|
|
8403
|
+
/**
|
|
8404
|
+
* Set current authorities set and best finalized bridged header to given values
|
|
8405
|
+
* (almost) without any checks. This call can fail only if:
|
|
8406
|
+
*
|
|
8407
|
+
* - the call origin is not a root or a pallet owner;
|
|
8408
|
+
*
|
|
8409
|
+
* - there are too many authorities in the new set.
|
|
8410
|
+
*
|
|
8411
|
+
* No other checks are made. Previously imported headers stay in the storage and
|
|
8412
|
+
* are still accessible after the call.
|
|
8413
|
+
*
|
|
8414
|
+
* @param {bigint} newCurrentSetId
|
|
8415
|
+
* @param {Array<[SpConsensusGrandpaAppPublic, bigint]>} newAuthorities
|
|
8416
|
+
* @param {Header} newBestHeader
|
|
8417
|
+
**/
|
|
8418
|
+
forceSetPalletState: GenericTxCall<
|
|
8419
|
+
Rv,
|
|
8420
|
+
(
|
|
8421
|
+
newCurrentSetId: bigint,
|
|
8422
|
+
newAuthorities: Array<[SpConsensusGrandpaAppPublic, bigint]>,
|
|
8423
|
+
newBestHeader: Header,
|
|
8424
|
+
) => ChainSubmittableExtrinsic<
|
|
8425
|
+
Rv,
|
|
8426
|
+
{
|
|
8427
|
+
pallet: 'BridgeKusamaGrandpa';
|
|
8428
|
+
palletCall: {
|
|
8429
|
+
name: 'ForceSetPalletState';
|
|
8430
|
+
params: {
|
|
8431
|
+
newCurrentSetId: bigint;
|
|
8432
|
+
newAuthorities: Array<[SpConsensusGrandpaAppPublic, bigint]>;
|
|
8433
|
+
newBestHeader: Header;
|
|
8434
|
+
};
|
|
8435
|
+
};
|
|
8436
|
+
}
|
|
8437
|
+
>
|
|
8438
|
+
>;
|
|
8439
|
+
|
|
8440
|
+
/**
|
|
8441
|
+
* Generic pallet tx call
|
|
8442
|
+
**/
|
|
8443
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
8444
|
+
};
|
|
8445
|
+
/**
|
|
8446
|
+
* Pallet `BridgeKusamaParachains`'s transaction calls
|
|
8447
|
+
**/
|
|
8448
|
+
bridgeKusamaParachains: {
|
|
8449
|
+
/**
|
|
8450
|
+
* Submit proof of one or several parachain heads.
|
|
8451
|
+
*
|
|
8452
|
+
* The proof is supposed to be proof of some `Heads` entries from the
|
|
8453
|
+
* `polkadot-runtime-parachains::paras` pallet instance, deployed at the bridged chain.
|
|
8454
|
+
* The proof is supposed to be crafted at the `relay_header_hash` that must already be
|
|
8455
|
+
* imported by corresponding GRANDPA pallet at this chain.
|
|
8456
|
+
*
|
|
8457
|
+
* The call fails if:
|
|
8458
|
+
*
|
|
8459
|
+
* - the pallet is halted;
|
|
8460
|
+
*
|
|
8461
|
+
* - the relay chain block `at_relay_block` is not imported by the associated bridge
|
|
8462
|
+
* GRANDPA pallet.
|
|
8463
|
+
*
|
|
8464
|
+
* The call may succeed, but some heads may not be updated e.g. because pallet knows
|
|
8465
|
+
* better head or it isn't tracked by the pallet.
|
|
8466
|
+
*
|
|
8467
|
+
* @param {[number, H256]} atRelayBlock
|
|
8468
|
+
* @param {Array<[BpPolkadotCoreParachainsParaId, H256]>} parachains
|
|
8469
|
+
* @param {BpPolkadotCoreParachainsParaHeadsProof} parachainHeadsProof
|
|
8470
|
+
**/
|
|
8471
|
+
submitParachainHeads: GenericTxCall<
|
|
8472
|
+
Rv,
|
|
8473
|
+
(
|
|
8474
|
+
atRelayBlock: [number, H256],
|
|
8475
|
+
parachains: Array<[BpPolkadotCoreParachainsParaId, H256]>,
|
|
8476
|
+
parachainHeadsProof: BpPolkadotCoreParachainsParaHeadsProof,
|
|
8477
|
+
) => ChainSubmittableExtrinsic<
|
|
8478
|
+
Rv,
|
|
8479
|
+
{
|
|
8480
|
+
pallet: 'BridgeKusamaParachains';
|
|
8481
|
+
palletCall: {
|
|
8482
|
+
name: 'SubmitParachainHeads';
|
|
8483
|
+
params: {
|
|
8484
|
+
atRelayBlock: [number, H256];
|
|
8485
|
+
parachains: Array<[BpPolkadotCoreParachainsParaId, H256]>;
|
|
8486
|
+
parachainHeadsProof: BpPolkadotCoreParachainsParaHeadsProof;
|
|
8487
|
+
};
|
|
8488
|
+
};
|
|
8489
|
+
}
|
|
8490
|
+
>
|
|
8491
|
+
>;
|
|
8492
|
+
|
|
8493
|
+
/**
|
|
8494
|
+
* Change `PalletOwner`.
|
|
8495
|
+
*
|
|
8496
|
+
* May only be called either by root, or by `PalletOwner`.
|
|
8497
|
+
*
|
|
8498
|
+
* @param {AccountId20Like | undefined} newOwner
|
|
8499
|
+
**/
|
|
8500
|
+
setOwner: GenericTxCall<
|
|
8501
|
+
Rv,
|
|
8502
|
+
(newOwner: AccountId20Like | undefined) => ChainSubmittableExtrinsic<
|
|
8503
|
+
Rv,
|
|
8504
|
+
{
|
|
8505
|
+
pallet: 'BridgeKusamaParachains';
|
|
8506
|
+
palletCall: {
|
|
8507
|
+
name: 'SetOwner';
|
|
8508
|
+
params: { newOwner: AccountId20Like | undefined };
|
|
8509
|
+
};
|
|
8510
|
+
}
|
|
8511
|
+
>
|
|
8512
|
+
>;
|
|
8513
|
+
|
|
8514
|
+
/**
|
|
8515
|
+
* Halt or resume all pallet operations.
|
|
8516
|
+
*
|
|
8517
|
+
* May only be called either by root, or by `PalletOwner`.
|
|
8518
|
+
*
|
|
8519
|
+
* @param {BpRuntimeBasicOperatingMode} operatingMode
|
|
8520
|
+
**/
|
|
8521
|
+
setOperatingMode: GenericTxCall<
|
|
8522
|
+
Rv,
|
|
8523
|
+
(operatingMode: BpRuntimeBasicOperatingMode) => ChainSubmittableExtrinsic<
|
|
8524
|
+
Rv,
|
|
8525
|
+
{
|
|
8526
|
+
pallet: 'BridgeKusamaParachains';
|
|
8527
|
+
palletCall: {
|
|
8528
|
+
name: 'SetOperatingMode';
|
|
8529
|
+
params: { operatingMode: BpRuntimeBasicOperatingMode };
|
|
8530
|
+
};
|
|
8531
|
+
}
|
|
8532
|
+
>
|
|
8533
|
+
>;
|
|
8534
|
+
|
|
8535
|
+
/**
|
|
8536
|
+
* Submit proof of one or several parachain heads.
|
|
8537
|
+
*
|
|
8538
|
+
* The proof is supposed to be proof of some `Heads` entries from the
|
|
8539
|
+
* `polkadot-runtime-parachains::paras` pallet instance, deployed at the bridged chain.
|
|
8540
|
+
* The proof is supposed to be crafted at the `relay_header_hash` that must already be
|
|
8541
|
+
* imported by corresponding GRANDPA pallet at this chain.
|
|
8542
|
+
*
|
|
8543
|
+
* The call fails if:
|
|
8544
|
+
*
|
|
8545
|
+
* - the pallet is halted;
|
|
8546
|
+
*
|
|
8547
|
+
* - the relay chain block `at_relay_block` is not imported by the associated bridge
|
|
8548
|
+
* GRANDPA pallet.
|
|
8549
|
+
*
|
|
8550
|
+
* The call may succeed, but some heads may not be updated e.g. because pallet knows
|
|
8551
|
+
* better head or it isn't tracked by the pallet.
|
|
8552
|
+
*
|
|
8553
|
+
* The `is_free_execution_expected` parameter is not really used inside the call. It is
|
|
8554
|
+
* used by the transaction extension, which should be registered at the runtime level. If
|
|
8555
|
+
* this parameter is `true`, the transaction will be treated as invalid, if the call won't
|
|
8556
|
+
* be executed for free. If transaction extension is not used by the runtime, this
|
|
8557
|
+
* parameter is not used at all.
|
|
8558
|
+
*
|
|
8559
|
+
* @param {[number, H256]} atRelayBlock
|
|
8560
|
+
* @param {Array<[BpPolkadotCoreParachainsParaId, H256]>} parachains
|
|
8561
|
+
* @param {BpPolkadotCoreParachainsParaHeadsProof} parachainHeadsProof
|
|
8562
|
+
* @param {boolean} isFreeExecutionExpected
|
|
8563
|
+
**/
|
|
8564
|
+
submitParachainHeadsEx: GenericTxCall<
|
|
8565
|
+
Rv,
|
|
8566
|
+
(
|
|
8567
|
+
atRelayBlock: [number, H256],
|
|
8568
|
+
parachains: Array<[BpPolkadotCoreParachainsParaId, H256]>,
|
|
8569
|
+
parachainHeadsProof: BpPolkadotCoreParachainsParaHeadsProof,
|
|
8570
|
+
isFreeExecutionExpected: boolean,
|
|
8571
|
+
) => ChainSubmittableExtrinsic<
|
|
8572
|
+
Rv,
|
|
8573
|
+
{
|
|
8574
|
+
pallet: 'BridgeKusamaParachains';
|
|
8575
|
+
palletCall: {
|
|
8576
|
+
name: 'SubmitParachainHeadsEx';
|
|
8577
|
+
params: {
|
|
8578
|
+
atRelayBlock: [number, H256];
|
|
8579
|
+
parachains: Array<[BpPolkadotCoreParachainsParaId, H256]>;
|
|
8580
|
+
parachainHeadsProof: BpPolkadotCoreParachainsParaHeadsProof;
|
|
8581
|
+
isFreeExecutionExpected: boolean;
|
|
8582
|
+
};
|
|
8583
|
+
};
|
|
8584
|
+
}
|
|
8585
|
+
>
|
|
8586
|
+
>;
|
|
8587
|
+
|
|
8588
|
+
/**
|
|
8589
|
+
* Generic pallet tx call
|
|
8590
|
+
**/
|
|
8591
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
8592
|
+
};
|
|
8593
|
+
/**
|
|
8594
|
+
* Pallet `BridgeKusamaMessages`'s transaction calls
|
|
8595
|
+
**/
|
|
8596
|
+
bridgeKusamaMessages: {
|
|
8597
|
+
/**
|
|
8598
|
+
* Change `PalletOwner`.
|
|
8599
|
+
*
|
|
8600
|
+
* May only be called either by root, or by `PalletOwner`.
|
|
8601
|
+
*
|
|
8602
|
+
* @param {AccountId20Like | undefined} newOwner
|
|
8603
|
+
**/
|
|
8604
|
+
setOwner: GenericTxCall<
|
|
8605
|
+
Rv,
|
|
8606
|
+
(newOwner: AccountId20Like | undefined) => ChainSubmittableExtrinsic<
|
|
8607
|
+
Rv,
|
|
8608
|
+
{
|
|
8609
|
+
pallet: 'BridgeKusamaMessages';
|
|
8610
|
+
palletCall: {
|
|
8611
|
+
name: 'SetOwner';
|
|
8612
|
+
params: { newOwner: AccountId20Like | undefined };
|
|
8613
|
+
};
|
|
8614
|
+
}
|
|
8615
|
+
>
|
|
8616
|
+
>;
|
|
8617
|
+
|
|
8618
|
+
/**
|
|
8619
|
+
* Halt or resume all/some pallet operations.
|
|
8620
|
+
*
|
|
8621
|
+
* May only be called either by root, or by `PalletOwner`.
|
|
8622
|
+
*
|
|
8623
|
+
* @param {BpMessagesMessagesOperatingMode} operatingMode
|
|
8624
|
+
**/
|
|
8625
|
+
setOperatingMode: GenericTxCall<
|
|
8626
|
+
Rv,
|
|
8627
|
+
(operatingMode: BpMessagesMessagesOperatingMode) => ChainSubmittableExtrinsic<
|
|
8628
|
+
Rv,
|
|
8629
|
+
{
|
|
8630
|
+
pallet: 'BridgeKusamaMessages';
|
|
8631
|
+
palletCall: {
|
|
8632
|
+
name: 'SetOperatingMode';
|
|
8633
|
+
params: { operatingMode: BpMessagesMessagesOperatingMode };
|
|
8634
|
+
};
|
|
8635
|
+
}
|
|
8636
|
+
>
|
|
8637
|
+
>;
|
|
8638
|
+
|
|
8639
|
+
/**
|
|
8640
|
+
* Receive messages proof from bridged chain.
|
|
8641
|
+
*
|
|
8642
|
+
* The weight of the call assumes that the transaction always brings outbound lane
|
|
8643
|
+
* state update. Because of that, the submitter (relayer) has no benefit of not including
|
|
8644
|
+
* this data in the transaction, so reward confirmations lags should be minimal.
|
|
8645
|
+
*
|
|
8646
|
+
* The call fails if:
|
|
8647
|
+
*
|
|
8648
|
+
* - the pallet is halted;
|
|
8649
|
+
*
|
|
8650
|
+
* - the call origin is not `Signed(_)`;
|
|
8651
|
+
*
|
|
8652
|
+
* - there are too many messages in the proof;
|
|
8653
|
+
*
|
|
8654
|
+
* - the proof verification procedure returns an error - e.g. because header used to craft
|
|
8655
|
+
* proof is not imported by the associated finality pallet;
|
|
8656
|
+
*
|
|
8657
|
+
* - the `dispatch_weight` argument is not sufficient to dispatch all bundled messages.
|
|
8658
|
+
*
|
|
8659
|
+
* The call may succeed, but some messages may not be delivered e.g. if they are not fit
|
|
8660
|
+
* into the unrewarded relayers vector.
|
|
8661
|
+
*
|
|
8662
|
+
* @param {AccountId20Like} relayerIdAtBridgedChain
|
|
8663
|
+
* @param {BpMessagesTargetChainFromBridgedChainMessagesProof} proof
|
|
8664
|
+
* @param {number} messagesCount
|
|
8665
|
+
* @param {SpWeightsWeightV2Weight} dispatchWeight
|
|
8666
|
+
**/
|
|
8667
|
+
receiveMessagesProof: GenericTxCall<
|
|
8668
|
+
Rv,
|
|
8669
|
+
(
|
|
8670
|
+
relayerIdAtBridgedChain: AccountId20Like,
|
|
8671
|
+
proof: BpMessagesTargetChainFromBridgedChainMessagesProof,
|
|
8672
|
+
messagesCount: number,
|
|
8673
|
+
dispatchWeight: SpWeightsWeightV2Weight,
|
|
8674
|
+
) => ChainSubmittableExtrinsic<
|
|
8675
|
+
Rv,
|
|
8676
|
+
{
|
|
8677
|
+
pallet: 'BridgeKusamaMessages';
|
|
8678
|
+
palletCall: {
|
|
8679
|
+
name: 'ReceiveMessagesProof';
|
|
8680
|
+
params: {
|
|
8681
|
+
relayerIdAtBridgedChain: AccountId20Like;
|
|
8682
|
+
proof: BpMessagesTargetChainFromBridgedChainMessagesProof;
|
|
8683
|
+
messagesCount: number;
|
|
8684
|
+
dispatchWeight: SpWeightsWeightV2Weight;
|
|
8685
|
+
};
|
|
8686
|
+
};
|
|
8687
|
+
}
|
|
8688
|
+
>
|
|
8689
|
+
>;
|
|
8690
|
+
|
|
8691
|
+
/**
|
|
8692
|
+
* Receive messages delivery proof from bridged chain.
|
|
8693
|
+
*
|
|
8694
|
+
* @param {BpMessagesSourceChainFromBridgedChainMessagesDeliveryProof} proof
|
|
8695
|
+
* @param {BpMessagesUnrewardedRelayersState} relayersState
|
|
8696
|
+
**/
|
|
8697
|
+
receiveMessagesDeliveryProof: GenericTxCall<
|
|
8698
|
+
Rv,
|
|
8699
|
+
(
|
|
8700
|
+
proof: BpMessagesSourceChainFromBridgedChainMessagesDeliveryProof,
|
|
8701
|
+
relayersState: BpMessagesUnrewardedRelayersState,
|
|
8702
|
+
) => ChainSubmittableExtrinsic<
|
|
8703
|
+
Rv,
|
|
8704
|
+
{
|
|
8705
|
+
pallet: 'BridgeKusamaMessages';
|
|
8706
|
+
palletCall: {
|
|
8707
|
+
name: 'ReceiveMessagesDeliveryProof';
|
|
8708
|
+
params: {
|
|
8709
|
+
proof: BpMessagesSourceChainFromBridgedChainMessagesDeliveryProof;
|
|
8710
|
+
relayersState: BpMessagesUnrewardedRelayersState;
|
|
8711
|
+
};
|
|
8712
|
+
};
|
|
8713
|
+
}
|
|
8714
|
+
>
|
|
8715
|
+
>;
|
|
8716
|
+
|
|
8717
|
+
/**
|
|
8718
|
+
* Generic pallet tx call
|
|
8719
|
+
**/
|
|
8720
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
8721
|
+
};
|
|
8722
|
+
/**
|
|
8723
|
+
* Pallet `BridgeXcmOverMoonriver`'s transaction calls
|
|
8724
|
+
**/
|
|
8725
|
+
bridgeXcmOverMoonriver: {
|
|
8726
|
+
/**
|
|
8727
|
+
* Open a bridge between two locations.
|
|
8728
|
+
*
|
|
8729
|
+
* The caller must be within the `T::OpenBridgeOrigin` filter (presumably: a sibling
|
|
8730
|
+
* parachain or a parent relay chain). The `bridge_destination_universal_location` must be
|
|
8731
|
+
* a destination within the consensus of the `T::BridgedNetwork` network.
|
|
8732
|
+
*
|
|
8733
|
+
* The `BridgeDeposit` amount is reserved on the caller account. This deposit
|
|
8734
|
+
* is unreserved after bridge is closed.
|
|
8735
|
+
*
|
|
8736
|
+
* The states after this call: bridge is `Opened`, outbound lane is `Opened`, inbound lane
|
|
8737
|
+
* is `Opened`.
|
|
8738
|
+
*
|
|
8739
|
+
* @param {XcmVersionedInteriorLocation} bridgeDestinationUniversalLocation
|
|
8740
|
+
**/
|
|
8741
|
+
openBridge: GenericTxCall<
|
|
8742
|
+
Rv,
|
|
8743
|
+
(bridgeDestinationUniversalLocation: XcmVersionedInteriorLocation) => ChainSubmittableExtrinsic<
|
|
8744
|
+
Rv,
|
|
8745
|
+
{
|
|
8746
|
+
pallet: 'BridgeXcmOverMoonriver';
|
|
8747
|
+
palletCall: {
|
|
8748
|
+
name: 'OpenBridge';
|
|
8749
|
+
params: { bridgeDestinationUniversalLocation: XcmVersionedInteriorLocation };
|
|
8750
|
+
};
|
|
8751
|
+
}
|
|
8752
|
+
>
|
|
8753
|
+
>;
|
|
8754
|
+
|
|
8755
|
+
/**
|
|
8756
|
+
* Try to close the bridge.
|
|
8757
|
+
*
|
|
8758
|
+
* Can only be called by the "owner" of this side of the bridge, meaning that the
|
|
8759
|
+
* inbound XCM channel with the local origin chain is working.
|
|
8760
|
+
*
|
|
8761
|
+
* Closed bridge is a bridge without any traces in the runtime storage. So this method
|
|
8762
|
+
* first tries to prune all queued messages at the outbound lane. When there are no
|
|
8763
|
+
* outbound messages left, outbound and inbound lanes are purged. After that, funds
|
|
8764
|
+
* are returned back to the owner of this side of the bridge.
|
|
8765
|
+
*
|
|
8766
|
+
* The number of messages that we may prune in a single call is limited by the
|
|
8767
|
+
* `may_prune_messages` argument. If there are more messages in the queue, the method
|
|
8768
|
+
* prunes exactly `may_prune_messages` and exits early. The caller may call it again
|
|
8769
|
+
* until outbound queue is depleted and get his funds back.
|
|
8770
|
+
*
|
|
8771
|
+
* The states after this call: everything is either `Closed`, or purged from the
|
|
8772
|
+
* runtime storage.
|
|
8773
|
+
*
|
|
8774
|
+
* @param {XcmVersionedInteriorLocation} bridgeDestinationUniversalLocation
|
|
8775
|
+
* @param {bigint} mayPruneMessages
|
|
8776
|
+
**/
|
|
8777
|
+
closeBridge: GenericTxCall<
|
|
8778
|
+
Rv,
|
|
8779
|
+
(
|
|
8780
|
+
bridgeDestinationUniversalLocation: XcmVersionedInteriorLocation,
|
|
8781
|
+
mayPruneMessages: bigint,
|
|
8782
|
+
) => ChainSubmittableExtrinsic<
|
|
8783
|
+
Rv,
|
|
8784
|
+
{
|
|
8785
|
+
pallet: 'BridgeXcmOverMoonriver';
|
|
8786
|
+
palletCall: {
|
|
8787
|
+
name: 'CloseBridge';
|
|
8788
|
+
params: { bridgeDestinationUniversalLocation: XcmVersionedInteriorLocation; mayPruneMessages: bigint };
|
|
8789
|
+
};
|
|
8790
|
+
}
|
|
8791
|
+
>
|
|
8792
|
+
>;
|
|
8793
|
+
|
|
8318
8794
|
/**
|
|
8319
8795
|
* Generic pallet tx call
|
|
8320
8796
|
**/
|