@dedot/chaintypes 0.48.0 → 0.49.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/chaintypes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "Types for substrate-based chains",
|
|
5
5
|
"author": "Thang X. Vu <thang@coongcrafts.io>",
|
|
6
6
|
"main": "",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"directory": "dist"
|
|
20
20
|
},
|
|
21
21
|
"license": "Apache-2.0",
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "7b83d0358fcd250bd9cf98721f9e19eafc5eb2b7",
|
|
23
23
|
"module": "./index.js",
|
|
24
24
|
"types": "./index.d.ts"
|
|
25
25
|
}
|
|
@@ -1776,11 +1776,6 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
|
|
|
1776
1776
|
**/
|
|
1777
1777
|
BalanceConversionFailed: GenericPalletError<Rv>;
|
|
1778
1778
|
|
|
1779
|
-
/**
|
|
1780
|
-
* Failed to convert an EVM balance to a native balance.
|
|
1781
|
-
**/
|
|
1782
|
-
DecimalPrecisionLoss: GenericPalletError<Rv>;
|
|
1783
|
-
|
|
1784
1779
|
/**
|
|
1785
1780
|
* Immutable data can only be set during deploys and only be read during calls.
|
|
1786
1781
|
* Additionally, it is only valid to set the data once and it must not be empty.
|
|
@@ -23,7 +23,7 @@ export interface VersionedWestendAssetHubApi<Rv extends RpcVersion> extends Gene
|
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @name: WestendAssetHubApi
|
|
26
|
-
* @specVersion:
|
|
26
|
+
* @specVersion: 1017003
|
|
27
27
|
**/
|
|
28
28
|
export interface WestendAssetHubApi {
|
|
29
29
|
legacy: VersionedWestendAssetHubApi<RpcLegacy>;
|
|
@@ -50,6 +50,7 @@ import type {
|
|
|
50
50
|
PalletXcmRemoteLockedFungibleRecord,
|
|
51
51
|
XcmVersionedAssetId,
|
|
52
52
|
StagingXcmV5Xcm,
|
|
53
|
+
BpXcmBridgeHubRouterBridgeState,
|
|
53
54
|
PalletMessageQueueBookState,
|
|
54
55
|
CumulusPrimitivesCoreAggregateMessageOrigin,
|
|
55
56
|
PalletMessageQueuePage,
|
|
@@ -1084,40 +1085,17 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
|
|
|
1084
1085
|
**/
|
|
1085
1086
|
toRococoXcmRouter: {
|
|
1086
1087
|
/**
|
|
1087
|
-
*
|
|
1088
|
+
* Bridge that we are using.
|
|
1088
1089
|
*
|
|
1089
|
-
*
|
|
1090
|
-
*
|
|
1091
|
-
*
|
|
1092
|
-
*
|
|
1093
|
-
*
|
|
1094
|
-
* the same local XCM channel with the child/sibling bridge hub, which we are using
|
|
1095
|
-
* to detect congestion:
|
|
1090
|
+
* **bridges-v1** assumptions: all outbound messages through this router are using single lane
|
|
1091
|
+
* and to single remote consensus. If there is some other remote consensus that uses the same
|
|
1092
|
+
* bridge hub, the separate pallet instance shall be used, In `v2` we'll have all required
|
|
1093
|
+
* primitives (lane-id aka bridge-id, derived from XCM locations) to support multiple bridges
|
|
1094
|
+
* by the same pallet instance.
|
|
1096
1095
|
*
|
|
1097
|
-
*
|
|
1098
|
-
* ThisChain --- Local XCM channel --> Sibling Bridge Hub ------
|
|
1099
|
-
* | |
|
|
1100
|
-
* | |
|
|
1101
|
-
* | |
|
|
1102
|
-
* Lane1 Lane2
|
|
1103
|
-
* | |
|
|
1104
|
-
* | |
|
|
1105
|
-
* | |
|
|
1106
|
-
* \ / |
|
|
1107
|
-
* Parachain1 <-- Local XCM channel --- Remote Bridge Hub <------
|
|
1108
|
-
* |
|
|
1109
|
-
* |
|
|
1110
|
-
* Parachain1 <-- Local XCM channel ---------
|
|
1111
|
-
* ```
|
|
1112
|
-
*
|
|
1113
|
-
* If at least one of other channels is congested, the local XCM channel with sibling
|
|
1114
|
-
* bridge hub eventually becomes congested too. And we have no means to detect - which
|
|
1115
|
-
* bridge exactly causes the congestion. So the best solution here is not to make
|
|
1116
|
-
* any differences between all bridges, started by this chain.
|
|
1117
|
-
*
|
|
1118
|
-
* @param {Callback<FixedU128> =} callback
|
|
1096
|
+
* @param {Callback<BpXcmBridgeHubRouterBridgeState> =} callback
|
|
1119
1097
|
**/
|
|
1120
|
-
|
|
1098
|
+
bridge: GenericStorageQuery<Rv, () => BpXcmBridgeHubRouterBridgeState>;
|
|
1121
1099
|
|
|
1122
1100
|
/**
|
|
1123
1101
|
* Generic pallet storage query
|
|
@@ -13,7 +13,6 @@ import type {
|
|
|
13
13
|
BytesLike,
|
|
14
14
|
AccountId32Like,
|
|
15
15
|
AccountId32,
|
|
16
|
-
U256,
|
|
17
16
|
H160,
|
|
18
17
|
FixedBytes,
|
|
19
18
|
} from 'dedot/codecs';
|
|
@@ -54,9 +53,7 @@ import type {
|
|
|
54
53
|
PalletRevivePrimitivesContractResult,
|
|
55
54
|
PalletRevivePrimitivesContractResultInstantiateReturnValue,
|
|
56
55
|
PalletRevivePrimitivesCode,
|
|
57
|
-
|
|
58
|
-
PalletRevivePrimitivesEthTransactError,
|
|
59
|
-
PalletReviveEvmApiRpcTypesGenGenericTransaction,
|
|
56
|
+
PalletRevivePrimitivesEthContractResult,
|
|
60
57
|
PalletRevivePrimitivesCodeUploadReturnValue,
|
|
61
58
|
PalletRevivePrimitivesContractAccessError,
|
|
62
59
|
} from './types';
|
|
@@ -879,12 +876,12 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
879
876
|
**/
|
|
880
877
|
reviveApi: {
|
|
881
878
|
/**
|
|
882
|
-
* Returns the free balance of the given `[H160]` address
|
|
879
|
+
* Returns the free balance of the given `[H160]` address.
|
|
883
880
|
*
|
|
884
881
|
* @callname: ReviveApi_balance
|
|
885
882
|
* @param {H160} address
|
|
886
883
|
**/
|
|
887
|
-
balance: GenericRuntimeApiMethod<Rv, (address: H160) => Promise<
|
|
884
|
+
balance: GenericRuntimeApiMethod<Rv, (address: H160) => Promise<bigint>>;
|
|
888
885
|
|
|
889
886
|
/**
|
|
890
887
|
* Returns the nonce of the given `[H160]` address.
|
|
@@ -952,13 +949,23 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
|
|
|
952
949
|
* See [`crate::Pallet::bare_eth_transact`]
|
|
953
950
|
*
|
|
954
951
|
* @callname: ReviveApi_eth_transact
|
|
955
|
-
* @param {
|
|
952
|
+
* @param {H160} origin
|
|
953
|
+
* @param {H160 | undefined} dest
|
|
954
|
+
* @param {bigint} value
|
|
955
|
+
* @param {BytesLike} input
|
|
956
|
+
* @param {SpWeightsWeightV2Weight | undefined} gas_limit
|
|
957
|
+
* @param {bigint | undefined} storage_deposit_limit
|
|
956
958
|
**/
|
|
957
959
|
ethTransact: GenericRuntimeApiMethod<
|
|
958
960
|
Rv,
|
|
959
961
|
(
|
|
960
|
-
|
|
961
|
-
|
|
962
|
+
origin: H160,
|
|
963
|
+
dest: H160 | undefined,
|
|
964
|
+
value: bigint,
|
|
965
|
+
input: BytesLike,
|
|
966
|
+
gasLimit?: SpWeightsWeightV2Weight | undefined,
|
|
967
|
+
storageDepositLimit?: bigint | undefined,
|
|
968
|
+
) => Promise<PalletRevivePrimitivesEthContractResult>
|
|
962
969
|
>;
|
|
963
970
|
|
|
964
971
|
/**
|
|
@@ -1688,6 +1688,38 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
1688
1688
|
**/
|
|
1689
1689
|
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
1690
1690
|
};
|
|
1691
|
+
/**
|
|
1692
|
+
* Pallet `ToRococoXcmRouter`'s transaction calls
|
|
1693
|
+
**/
|
|
1694
|
+
toRococoXcmRouter: {
|
|
1695
|
+
/**
|
|
1696
|
+
* Notification about congested bridge queue.
|
|
1697
|
+
*
|
|
1698
|
+
* @param {H256} bridgeId
|
|
1699
|
+
* @param {boolean} isCongested
|
|
1700
|
+
**/
|
|
1701
|
+
reportBridgeStatus: GenericTxCall<
|
|
1702
|
+
Rv,
|
|
1703
|
+
(
|
|
1704
|
+
bridgeId: H256,
|
|
1705
|
+
isCongested: boolean,
|
|
1706
|
+
) => ChainSubmittableExtrinsic<
|
|
1707
|
+
Rv,
|
|
1708
|
+
{
|
|
1709
|
+
pallet: 'ToRococoXcmRouter';
|
|
1710
|
+
palletCall: {
|
|
1711
|
+
name: 'ReportBridgeStatus';
|
|
1712
|
+
params: { bridgeId: H256; isCongested: boolean };
|
|
1713
|
+
};
|
|
1714
|
+
}
|
|
1715
|
+
>
|
|
1716
|
+
>;
|
|
1717
|
+
|
|
1718
|
+
/**
|
|
1719
|
+
* Generic pallet tx call
|
|
1720
|
+
**/
|
|
1721
|
+
[callName: string]: GenericTxCall<Rv, TxCall<Rv>>;
|
|
1722
|
+
};
|
|
1691
1723
|
/**
|
|
1692
1724
|
* Pallet `MessageQueue`'s transaction calls
|
|
1693
1725
|
**/
|
|
@@ -8994,7 +9026,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
|
|
|
8994
9026
|
*
|
|
8995
9027
|
* # Parameters
|
|
8996
9028
|
*
|
|
8997
|
-
* * `payload`: The encoded [`crate::evm::
|
|
9029
|
+
* * `payload`: The RLP-encoded [`crate::evm::TransactionLegacySigned`].
|
|
8998
9030
|
* * `gas_limit`: The gas limit enforced during contract execution.
|
|
8999
9031
|
* * `storage_deposit_limit`: The maximum balance that can be charged to the caller for
|
|
9000
9032
|
* storage usage.
|
|
@@ -19,7 +19,6 @@ import type {
|
|
|
19
19
|
Era,
|
|
20
20
|
Header,
|
|
21
21
|
UncheckedExtrinsic,
|
|
22
|
-
U256,
|
|
23
22
|
} from 'dedot/codecs';
|
|
24
23
|
|
|
25
24
|
export type FrameSystemAccountInfo = {
|
|
@@ -664,7 +663,14 @@ export type StagingXcmV5Instruction =
|
|
|
664
663
|
type: 'TransferReserveAsset';
|
|
665
664
|
value: { assets: StagingXcmV5AssetAssets; dest: StagingXcmV5Location; xcm: StagingXcmV5Xcm };
|
|
666
665
|
}
|
|
667
|
-
| {
|
|
666
|
+
| {
|
|
667
|
+
type: 'Transact';
|
|
668
|
+
value: {
|
|
669
|
+
originKind: XcmV3OriginKind;
|
|
670
|
+
fallbackMaxWeight?: SpWeightsWeightV2Weight | undefined;
|
|
671
|
+
call: XcmDoubleEncoded;
|
|
672
|
+
};
|
|
673
|
+
}
|
|
668
674
|
| { type: 'HrmpNewChannelOpenRequest'; value: { sender: number; maxMessageSize: number; maxCapacity: number } }
|
|
669
675
|
| { type: 'HrmpChannelAccepted'; value: { recipient: number } }
|
|
670
676
|
| { type: 'HrmpChannelClosing'; value: { initiator: number; sender: number; recipient: number } }
|
|
@@ -697,7 +703,6 @@ export type StagingXcmV5Instruction =
|
|
|
697
703
|
| { type: 'SetErrorHandler'; value: StagingXcmV5Xcm }
|
|
698
704
|
| { type: 'SetAppendix'; value: StagingXcmV5Xcm }
|
|
699
705
|
| { type: 'ClearError' }
|
|
700
|
-
| { type: 'SetAssetClaimer'; value: { location: StagingXcmV5Location } }
|
|
701
706
|
| { type: 'ClaimAsset'; value: { assets: StagingXcmV5AssetAssets; ticket: StagingXcmV5Location } }
|
|
702
707
|
| { type: 'Trap'; value: bigint }
|
|
703
708
|
| { type: 'SubscribeVersion'; value: { queryId: bigint; maxResponseWeight: SpWeightsWeightV2Weight } }
|
|
@@ -742,10 +747,8 @@ export type StagingXcmV5Instruction =
|
|
|
742
747
|
remoteXcm: StagingXcmV5Xcm;
|
|
743
748
|
};
|
|
744
749
|
}
|
|
745
|
-
| {
|
|
746
|
-
|
|
747
|
-
value: { descendantOrigin?: StagingXcmV5Junctions | undefined; xcm: StagingXcmV5Xcm };
|
|
748
|
-
};
|
|
750
|
+
| { type: 'ExecuteWithOrigin'; value: { descendantOrigin?: StagingXcmV5Junctions | undefined; xcm: StagingXcmV5Xcm } }
|
|
751
|
+
| { type: 'SetHints'; value: { hints: Array<StagingXcmV5Hint> } };
|
|
749
752
|
|
|
750
753
|
export type StagingXcmV5AssetAssets = Array<StagingXcmV5Asset>;
|
|
751
754
|
|
|
@@ -819,6 +822,8 @@ export type StagingXcmV5AssetAssetTransferFilter =
|
|
|
819
822
|
| { type: 'ReserveDeposit'; value: StagingXcmV5AssetAssetFilter }
|
|
820
823
|
| { type: 'ReserveWithdraw'; value: StagingXcmV5AssetAssetFilter };
|
|
821
824
|
|
|
825
|
+
export type StagingXcmV5Hint = { type: 'AssetClaimer'; value: { location: StagingXcmV5Location } };
|
|
826
|
+
|
|
822
827
|
export type XcmVersionedAssets =
|
|
823
828
|
| { type: 'V3'; value: XcmV3MultiassetMultiAssets }
|
|
824
829
|
| { type: 'V4'; value: StagingXcmV4AssetAssets }
|
|
@@ -4595,6 +4600,23 @@ export type CumulusPalletXcmCall = null;
|
|
|
4595
4600
|
|
|
4596
4601
|
export type CumulusPalletXcmCallLike = null;
|
|
4597
4602
|
|
|
4603
|
+
export type BpXcmBridgeHubRouterBridgeState = { deliveryFeeFactor: FixedU128; isCongested: boolean };
|
|
4604
|
+
|
|
4605
|
+
/**
|
|
4606
|
+
* Contains a variant per dispatchable extrinsic that this pallet has.
|
|
4607
|
+
**/
|
|
4608
|
+
export type PalletXcmBridgeHubRouterCall =
|
|
4609
|
+
/**
|
|
4610
|
+
* Notification about congested bridge queue.
|
|
4611
|
+
**/
|
|
4612
|
+
{ name: 'ReportBridgeStatus'; params: { bridgeId: H256; isCongested: boolean } };
|
|
4613
|
+
|
|
4614
|
+
export type PalletXcmBridgeHubRouterCallLike =
|
|
4615
|
+
/**
|
|
4616
|
+
* Notification about congested bridge queue.
|
|
4617
|
+
**/
|
|
4618
|
+
{ name: 'ReportBridgeStatus'; params: { bridgeId: H256; isCongested: boolean } };
|
|
4619
|
+
|
|
4598
4620
|
export type PalletMessageQueueBookState = {
|
|
4599
4621
|
begin: number;
|
|
4600
4622
|
end: number;
|
|
@@ -4926,6 +4948,7 @@ export type AssetHubWestendRuntimeRuntimeCall =
|
|
|
4926
4948
|
| { pallet: 'XcmpQueue'; palletCall: CumulusPalletXcmpQueueCall }
|
|
4927
4949
|
| { pallet: 'PolkadotXcm'; palletCall: PalletXcmCall }
|
|
4928
4950
|
| { pallet: 'CumulusXcm'; palletCall: CumulusPalletXcmCall }
|
|
4951
|
+
| { pallet: 'ToRococoXcmRouter'; palletCall: PalletXcmBridgeHubRouterCall }
|
|
4929
4952
|
| { pallet: 'MessageQueue'; palletCall: PalletMessageQueueCall }
|
|
4930
4953
|
| { pallet: 'Utility'; palletCall: PalletUtilityCall }
|
|
4931
4954
|
| { pallet: 'Multisig'; palletCall: PalletMultisigCall }
|
|
@@ -4952,6 +4975,7 @@ export type AssetHubWestendRuntimeRuntimeCallLike =
|
|
|
4952
4975
|
| { pallet: 'XcmpQueue'; palletCall: CumulusPalletXcmpQueueCallLike }
|
|
4953
4976
|
| { pallet: 'PolkadotXcm'; palletCall: PalletXcmCallLike }
|
|
4954
4977
|
| { pallet: 'CumulusXcm'; palletCall: CumulusPalletXcmCallLike }
|
|
4978
|
+
| { pallet: 'ToRococoXcmRouter'; palletCall: PalletXcmBridgeHubRouterCallLike }
|
|
4955
4979
|
| { pallet: 'MessageQueue'; palletCall: PalletMessageQueueCallLike }
|
|
4956
4980
|
| { pallet: 'Utility'; palletCall: PalletUtilityCallLike }
|
|
4957
4981
|
| { pallet: 'Multisig'; palletCall: PalletMultisigCallLike }
|
|
@@ -11714,7 +11738,7 @@ export type PalletReviveCall =
|
|
|
11714
11738
|
*
|
|
11715
11739
|
* # Parameters
|
|
11716
11740
|
*
|
|
11717
|
-
* * `payload`: The encoded [`crate::evm::
|
|
11741
|
+
* * `payload`: The RLP-encoded [`crate::evm::TransactionLegacySigned`].
|
|
11718
11742
|
* * `gas_limit`: The gas limit enforced during contract execution.
|
|
11719
11743
|
* * `storage_deposit_limit`: The maximum balance that can be charged to the caller for
|
|
11720
11744
|
* storage usage.
|
|
@@ -11877,7 +11901,7 @@ export type PalletReviveCallLike =
|
|
|
11877
11901
|
*
|
|
11878
11902
|
* # Parameters
|
|
11879
11903
|
*
|
|
11880
|
-
* * `payload`: The encoded [`crate::evm::
|
|
11904
|
+
* * `payload`: The RLP-encoded [`crate::evm::TransactionLegacySigned`].
|
|
11881
11905
|
* * `gas_limit`: The gas limit enforced during contract execution.
|
|
11882
11906
|
* * `storage_deposit_limit`: The maximum balance that can be charged to the caller for
|
|
11883
11907
|
* storage usage.
|
|
@@ -13177,10 +13201,6 @@ export type PalletReviveError =
|
|
|
13177
13201
|
* Failed to convert a U256 to a Balance.
|
|
13178
13202
|
**/
|
|
13179
13203
|
| 'BalanceConversionFailed'
|
|
13180
|
-
/**
|
|
13181
|
-
* Failed to convert an EVM balance to a native balance.
|
|
13182
|
-
**/
|
|
13183
|
-
| 'DecimalPrecisionLoss'
|
|
13184
13204
|
/**
|
|
13185
13205
|
* Immutable data can only be set during deploys and only be read during calls.
|
|
13186
13206
|
* Additionally, it is only valid to set the data once and it must not be empty.
|
|
@@ -13394,41 +13414,13 @@ export type PalletRevivePrimitivesInstantiateReturnValue = {
|
|
|
13394
13414
|
addr: H160;
|
|
13395
13415
|
};
|
|
13396
13416
|
|
|
13397
|
-
export type
|
|
13398
|
-
|
|
13399
|
-
blobVersionedHashes: Array<H256>;
|
|
13400
|
-
blobs: Array<PalletReviveEvmApiByteBytes>;
|
|
13401
|
-
chainId?: U256 | undefined;
|
|
13402
|
-
from?: H160 | undefined;
|
|
13403
|
-
gas?: U256 | undefined;
|
|
13404
|
-
gasPrice?: U256 | undefined;
|
|
13405
|
-
input?: PalletReviveEvmApiByteBytes | undefined;
|
|
13406
|
-
maxFeePerBlobGas?: U256 | undefined;
|
|
13407
|
-
maxFeePerGas?: U256 | undefined;
|
|
13408
|
-
maxPriorityFeePerGas?: U256 | undefined;
|
|
13409
|
-
nonce?: U256 | undefined;
|
|
13410
|
-
to?: H160 | undefined;
|
|
13411
|
-
rType?: PalletReviveEvmApiByte | undefined;
|
|
13412
|
-
value?: U256 | undefined;
|
|
13413
|
-
};
|
|
13414
|
-
|
|
13415
|
-
export type PalletReviveEvmApiRpcTypesGenAccessListEntry = { address: H160; storageKeys: Array<H256> };
|
|
13416
|
-
|
|
13417
|
-
export type PalletReviveEvmApiByteBytes = Bytes;
|
|
13418
|
-
|
|
13419
|
-
export type PalletReviveEvmApiByte = number;
|
|
13420
|
-
|
|
13421
|
-
export type PalletRevivePrimitivesEthTransactInfo = {
|
|
13417
|
+
export type PalletRevivePrimitivesEthContractResult = {
|
|
13418
|
+
fee: bigint;
|
|
13422
13419
|
gasRequired: SpWeightsWeightV2Weight;
|
|
13423
13420
|
storageDeposit: bigint;
|
|
13424
|
-
|
|
13425
|
-
data: Bytes;
|
|
13421
|
+
result: Result<Bytes, DispatchError>;
|
|
13426
13422
|
};
|
|
13427
13423
|
|
|
13428
|
-
export type PalletRevivePrimitivesEthTransactError =
|
|
13429
|
-
| { type: 'Data'; value: Bytes }
|
|
13430
|
-
| { type: 'Message'; value: string };
|
|
13431
|
-
|
|
13432
13424
|
export type PalletRevivePrimitivesCodeUploadReturnValue = { codeHash: H256; deposit: bigint };
|
|
13433
13425
|
|
|
13434
13426
|
export type PalletRevivePrimitivesContractAccessError = 'DoesntExist' | 'KeyDecodingFailed';
|