@dedot/chaintypes 0.154.0 → 0.155.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.
@@ -1115,6 +1115,26 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1115
1115
  **/
1116
1116
  [error: string]: GenericPalletError<Rv>;
1117
1117
  };
1118
+ /**
1119
+ * Pallet `Dispatcher`'s errors
1120
+ **/
1121
+ dispatcher: {
1122
+ /**
1123
+ * The EVM call execution failed. This happens when the EVM returns an exit reason
1124
+ * other than `ExitSucceed(Returned)` or `ExitSucceed(Stopped)`.
1125
+ **/
1126
+ EvmCallFailed: GenericPalletError<Rv>;
1127
+
1128
+ /**
1129
+ * The provided call is not an EVM call. This extrinsic only accepts `pallet_evm::Call::call`.
1130
+ **/
1131
+ NotEvmCall: GenericPalletError<Rv>;
1132
+
1133
+ /**
1134
+ * Generic pallet error
1135
+ **/
1136
+ [error: string]: GenericPalletError<Rv>;
1137
+ };
1118
1138
  /**
1119
1139
  * Pallet `AssetRegistry`'s errors
1120
1140
  **/
@@ -12,8 +12,8 @@ import type {
12
12
  FixedU128,
13
13
  Permill,
14
14
  Perquintill,
15
- H160,
16
15
  Perbill,
16
+ H160,
17
17
  } from 'dedot/codecs';
18
18
  import type {
19
19
  FrameSupportTokensMiscBalanceStatus,
@@ -2506,7 +2506,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
2506
2506
  Rv,
2507
2507
  'Stableswap',
2508
2508
  'PoolMaxPegUpdateUpdated',
2509
- { poolId: number; maxPegUpdate: Permill }
2509
+ { poolId: number; maxPegUpdate: Perbill }
2510
2510
  >;
2511
2511
 
2512
2512
  /**
@@ -2847,9 +2847,8 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
2847
2847
  *
2848
2848
  * Parameters:
2849
2849
  * - `asset_id`: The ID of the asset removed from collaterals
2850
- * - `amount`: The amount of the asset that was returned (should be zero)
2851
2850
  **/
2852
- CollateralRemoved: GenericPalletEvent<Rv, 'HSM', 'CollateralRemoved', { assetId: number; amount: bigint }>;
2851
+ CollateralRemoved: GenericPalletEvent<Rv, 'HSM', 'CollateralRemoved', { assetId: number }>;
2853
2852
 
2854
2853
  /**
2855
2854
  * A collateral asset was updated
@@ -2881,7 +2880,12 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
2881
2880
  * - `asset_id`: The collateral asset used in the arbitrage
2882
2881
  * - `hollar_amount`: Amount of Hollar that was included in the arbitrage operation
2883
2882
  **/
2884
- ArbitrageExecuted: GenericPalletEvent<Rv, 'HSM', 'ArbitrageExecuted', { assetId: number; hollarAmount: bigint }>;
2883
+ ArbitrageExecuted: GenericPalletEvent<
2884
+ Rv,
2885
+ 'HSM',
2886
+ 'ArbitrageExecuted',
2887
+ { arbitrage: number; assetId: number; hollarAmount: bigint; profit: bigint }
2888
+ >;
2885
2889
 
2886
2890
  /**
2887
2891
  * Flash minter address set
@@ -62,7 +62,7 @@ export interface VersionedHydrationApi<Rv extends RpcVersion> extends GenericSub
62
62
 
63
63
  /**
64
64
  * @name: HydrationApi
65
- * @specVersion: 336
65
+ * @specVersion: 347
66
66
  **/
67
67
  export interface HydrationApi {
68
68
  legacy: VersionedHydrationApi<RpcLegacy>;
@@ -52,6 +52,7 @@ import type {
52
52
  PalletStateTrieMigrationMigrationLimits,
53
53
  PalletConvictionVotingVoteVoting,
54
54
  PalletReferendaReferendumInfo,
55
+ EvmCoreErrorExitReason,
55
56
  PalletAssetRegistryAssetDetails,
56
57
  HydradxRuntimeXcmAssetLocation,
57
58
  PalletClaimsEthereumAddress,
@@ -1136,6 +1137,12 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1136
1137
  **/
1137
1138
  extraGas: GenericStorageQuery<Rv, () => bigint>;
1138
1139
 
1140
+ /**
1141
+ *
1142
+ * @param {Callback<EvmCoreErrorExitReason | undefined> =} callback
1143
+ **/
1144
+ lastEvmCallExitReason: GenericStorageQuery<Rv, () => EvmCoreErrorExitReason | undefined>;
1145
+
1139
1146
  /**
1140
1147
  * Generic pallet storage query
1141
1148
  **/
package/hydration/tx.d.ts CHANGED
@@ -5309,6 +5309,33 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
5309
5309
  >
5310
5310
  >;
5311
5311
 
5312
+ /**
5313
+ * Execute a single EVM call.
5314
+ * This extrinsic will fail if the EVM call returns any other ExitReason than `ExitSucceed(Returned)` or `ExitSucceed(Stopped)`.
5315
+ * Look the [hydradx_runtime::evm::runner::WrapRunner] implementation for details.
5316
+ *
5317
+ * Parameters:
5318
+ * - `origin`: Signed origin.
5319
+ * - `call`: presumably `pallet_evm::Call::call` as boxed `RuntimeCall`.
5320
+ *
5321
+ * Emits `EvmCallFailed` event when failed.
5322
+ *
5323
+ * @param {HydradxRuntimeRuntimeCallLike} call
5324
+ **/
5325
+ dispatchEvmCall: GenericTxCall<
5326
+ Rv,
5327
+ (call: HydradxRuntimeRuntimeCallLike) => ChainSubmittableExtrinsic<
5328
+ Rv,
5329
+ {
5330
+ pallet: 'Dispatcher';
5331
+ palletCall: {
5332
+ name: 'DispatchEvmCall';
5333
+ params: { call: HydradxRuntimeRuntimeCallLike };
5334
+ };
5335
+ }
5336
+ >
5337
+ >;
5338
+
5312
5339
  /**
5313
5340
  * Generic pallet tx call
5314
5341
  **/
@@ -7426,7 +7453,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
7426
7453
  * This function allows setting either fixed or dynamic fee configuration for a specific asset.
7427
7454
  *
7428
7455
  * # Arguments
7429
- * * `origin` - Root origin required
7456
+ * * `origin` - Authority origin required
7430
7457
  * * `asset_id` - The asset ID to configure
7431
7458
  * * `config` - Fee configuration (Fixed or Dynamic)
7432
7459
  *
@@ -7457,7 +7484,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
7457
7484
  * After removal, the asset will use the default dynamic fee parameters configured in the runtime.
7458
7485
  *
7459
7486
  * # Arguments
7460
- * * `origin` - Root origin required
7487
+ * * `origin` - Authority origin required
7461
7488
  * * `asset_id` - The asset ID to remove configuration for
7462
7489
  *
7463
7490
  * @param {number} assetId
@@ -8131,7 +8158,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
8131
8158
  * @param {number} amplification
8132
8159
  * @param {Permill} fee
8133
8160
  * @param {Array<PalletStableswapPegSource>} pegSource
8134
- * @param {Permill} maxPegUpdate
8161
+ * @param {Perbill} maxPegUpdate
8135
8162
  **/
8136
8163
  createPoolWithPegs: GenericTxCall<
8137
8164
  Rv,
@@ -8141,7 +8168,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
8141
8168
  amplification: number,
8142
8169
  fee: Permill,
8143
8170
  pegSource: Array<PalletStableswapPegSource>,
8144
- maxPegUpdate: Permill,
8171
+ maxPegUpdate: Perbill,
8145
8172
  ) => ChainSubmittableExtrinsic<
8146
8173
  Rv,
8147
8174
  {
@@ -8154,7 +8181,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
8154
8181
  amplification: number;
8155
8182
  fee: Permill;
8156
8183
  pegSource: Array<PalletStableswapPegSource>;
8157
- maxPegUpdate: Permill;
8184
+ maxPegUpdate: Perbill;
8158
8185
  };
8159
8186
  };
8160
8187
  }
@@ -8265,20 +8292,20 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
8265
8292
  *
8266
8293
  *
8267
8294
  * @param {number} poolId
8268
- * @param {Permill} maxPegUpdate
8295
+ * @param {Perbill} maxPegUpdate
8269
8296
  **/
8270
8297
  updatePoolMaxPegUpdate: GenericTxCall<
8271
8298
  Rv,
8272
8299
  (
8273
8300
  poolId: number,
8274
- maxPegUpdate: Permill,
8301
+ maxPegUpdate: Perbill,
8275
8302
  ) => ChainSubmittableExtrinsic<
8276
8303
  Rv,
8277
8304
  {
8278
8305
  pallet: 'Stableswap';
8279
8306
  palletCall: {
8280
8307
  name: 'UpdatePoolMaxPegUpdate';
8281
- params: { poolId: number; maxPegUpdate: Permill };
8308
+ params: { poolId: number; maxPegUpdate: Perbill };
8282
8309
  };
8283
8310
  }
8284
8311
  >
@@ -9120,6 +9147,7 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
9120
9147
  liquidation: {
9121
9148
  /**
9122
9149
  * Liquidates an existing money market position.
9150
+ * Can be both signed and unsigned.
9123
9151
  *
9124
9152
  * Performs a flash loan to get funds to pay for the debt.
9125
9153
  * Received collateral is swapped and the profit is transferred to `FeeReceiver`.
@@ -9479,16 +9507,20 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
9479
9507
  * - Other errors from underlying calls
9480
9508
  *
9481
9509
  * @param {number} collateralAssetId
9510
+ * @param {bigint | undefined} flashAmount
9482
9511
  **/
9483
9512
  executeArbitrage: GenericTxCall<
9484
9513
  Rv,
9485
- (collateralAssetId: number) => ChainSubmittableExtrinsic<
9514
+ (
9515
+ collateralAssetId: number,
9516
+ flashAmount: bigint | undefined,
9517
+ ) => ChainSubmittableExtrinsic<
9486
9518
  Rv,
9487
9519
  {
9488
9520
  pallet: 'Hsm';
9489
9521
  palletCall: {
9490
9522
  name: 'ExecuteArbitrage';
9491
- params: { collateralAssetId: number };
9523
+ params: { collateralAssetId: number; flashAmount: bigint | undefined };
9492
9524
  };
9493
9525
  }
9494
9526
  >
@@ -6082,7 +6082,19 @@ export type PalletDispatcherCall =
6082
6082
  * This allows executing calls with additional weight (gas) limit.
6083
6083
  * The extra gas is not refunded, even if not used.
6084
6084
  **/
6085
- | { name: 'DispatchWithExtraGas'; params: { call: HydradxRuntimeRuntimeCall; extraGas: bigint } };
6085
+ | { name: 'DispatchWithExtraGas'; params: { call: HydradxRuntimeRuntimeCall; extraGas: bigint } }
6086
+ /**
6087
+ * Execute a single EVM call.
6088
+ * This extrinsic will fail if the EVM call returns any other ExitReason than `ExitSucceed(Returned)` or `ExitSucceed(Stopped)`.
6089
+ * Look the [hydradx_runtime::evm::runner::WrapRunner] implementation for details.
6090
+ *
6091
+ * Parameters:
6092
+ * - `origin`: Signed origin.
6093
+ * - `call`: presumably `pallet_evm::Call::call` as boxed `RuntimeCall`.
6094
+ *
6095
+ * Emits `EvmCallFailed` event when failed.
6096
+ **/
6097
+ | { name: 'DispatchEvmCall'; params: { call: HydradxRuntimeRuntimeCall } };
6086
6098
 
6087
6099
  export type PalletDispatcherCallLike =
6088
6100
  | { name: 'DispatchAsTreasury'; params: { call: HydradxRuntimeRuntimeCallLike } }
@@ -6102,7 +6114,19 @@ export type PalletDispatcherCallLike =
6102
6114
  * This allows executing calls with additional weight (gas) limit.
6103
6115
  * The extra gas is not refunded, even if not used.
6104
6116
  **/
6105
- | { name: 'DispatchWithExtraGas'; params: { call: HydradxRuntimeRuntimeCallLike; extraGas: bigint } };
6117
+ | { name: 'DispatchWithExtraGas'; params: { call: HydradxRuntimeRuntimeCallLike; extraGas: bigint } }
6118
+ /**
6119
+ * Execute a single EVM call.
6120
+ * This extrinsic will fail if the EVM call returns any other ExitReason than `ExitSucceed(Returned)` or `ExitSucceed(Stopped)`.
6121
+ * Look the [hydradx_runtime::evm::runner::WrapRunner] implementation for details.
6122
+ *
6123
+ * Parameters:
6124
+ * - `origin`: Signed origin.
6125
+ * - `call`: presumably `pallet_evm::Call::call` as boxed `RuntimeCall`.
6126
+ *
6127
+ * Emits `EvmCallFailed` event when failed.
6128
+ **/
6129
+ | { name: 'DispatchEvmCall'; params: { call: HydradxRuntimeRuntimeCallLike } };
6106
6130
 
6107
6131
  /**
6108
6132
  * Contains a variant per dispatchable extrinsic that this pallet has.
@@ -8100,7 +8124,7 @@ export type PalletDynamicFeesCall =
8100
8124
  * This function allows setting either fixed or dynamic fee configuration for a specific asset.
8101
8125
  *
8102
8126
  * # Arguments
8103
- * * `origin` - Root origin required
8127
+ * * `origin` - Authority origin required
8104
8128
  * * `asset_id` - The asset ID to configure
8105
8129
  * * `config` - Fee configuration (Fixed or Dynamic)
8106
8130
  **/
@@ -8112,7 +8136,7 @@ export type PalletDynamicFeesCall =
8112
8136
  * After removal, the asset will use the default dynamic fee parameters configured in the runtime.
8113
8137
  *
8114
8138
  * # Arguments
8115
- * * `origin` - Root origin required
8139
+ * * `origin` - Authority origin required
8116
8140
  * * `asset_id` - The asset ID to remove configuration for
8117
8141
  **/
8118
8142
  | { name: 'RemoveAssetFee'; params: { assetId: number } };
@@ -8124,7 +8148,7 @@ export type PalletDynamicFeesCallLike =
8124
8148
  * This function allows setting either fixed or dynamic fee configuration for a specific asset.
8125
8149
  *
8126
8150
  * # Arguments
8127
- * * `origin` - Root origin required
8151
+ * * `origin` - Authority origin required
8128
8152
  * * `asset_id` - The asset ID to configure
8129
8153
  * * `config` - Fee configuration (Fixed or Dynamic)
8130
8154
  **/
@@ -8136,7 +8160,7 @@ export type PalletDynamicFeesCallLike =
8136
8160
  * After removal, the asset will use the default dynamic fee parameters configured in the runtime.
8137
8161
  *
8138
8162
  * # Arguments
8139
- * * `origin` - Root origin required
8163
+ * * `origin` - Authority origin required
8140
8164
  * * `asset_id` - The asset ID to remove configuration for
8141
8165
  **/
8142
8166
  | { name: 'RemoveAssetFee'; params: { assetId: number } };
@@ -8577,7 +8601,7 @@ export type PalletStableswapCall =
8577
8601
  amplification: number;
8578
8602
  fee: Permill;
8579
8603
  pegSource: Array<PalletStableswapPegSource>;
8580
- maxPegUpdate: Permill;
8604
+ maxPegUpdate: Perbill;
8581
8605
  };
8582
8606
  }
8583
8607
  /**
@@ -8644,7 +8668,7 @@ export type PalletStableswapCall =
8644
8668
  * - `NoPegSource`: If the pool does not have pegs configured.
8645
8669
  *
8646
8670
  **/
8647
- | { name: 'UpdatePoolMaxPegUpdate'; params: { poolId: number; maxPegUpdate: Permill } };
8671
+ | { name: 'UpdatePoolMaxPegUpdate'; params: { poolId: number; maxPegUpdate: Perbill } };
8648
8672
 
8649
8673
  export type PalletStableswapCallLike =
8650
8674
  /**
@@ -8902,7 +8926,7 @@ export type PalletStableswapCallLike =
8902
8926
  amplification: number;
8903
8927
  fee: Permill;
8904
8928
  pegSource: Array<PalletStableswapPegSource>;
8905
- maxPegUpdate: Permill;
8929
+ maxPegUpdate: Perbill;
8906
8930
  };
8907
8931
  }
8908
8932
  /**
@@ -8969,7 +8993,7 @@ export type PalletStableswapCallLike =
8969
8993
  * - `NoPegSource`: If the pool does not have pegs configured.
8970
8994
  *
8971
8995
  **/
8972
- | { name: 'UpdatePoolMaxPegUpdate'; params: { poolId: number; maxPegUpdate: Permill } };
8996
+ | { name: 'UpdatePoolMaxPegUpdate'; params: { poolId: number; maxPegUpdate: Perbill } };
8973
8997
 
8974
8998
  export type PalletStableswapTradability = { bits: number };
8975
8999
 
@@ -9695,6 +9719,7 @@ export type PalletReferralsFeeDistribution = { referrer: Permill; trader: Permil
9695
9719
  export type PalletLiquidationCall =
9696
9720
  /**
9697
9721
  * Liquidates an existing money market position.
9722
+ * Can be both signed and unsigned.
9698
9723
  *
9699
9724
  * Performs a flash loan to get funds to pay for the debt.
9700
9725
  * Received collateral is swapped and the profit is transferred to `FeeReceiver`.
@@ -9728,6 +9753,7 @@ export type PalletLiquidationCall =
9728
9753
  export type PalletLiquidationCallLike =
9729
9754
  /**
9730
9755
  * Liquidates an existing money market position.
9756
+ * Can be both signed and unsigned.
9731
9757
  *
9732
9758
  * Performs a flash loan to get funds to pay for the debt.
9733
9759
  * Received collateral is swapped and the profit is transferred to `FeeReceiver`.
@@ -9934,7 +9960,7 @@ export type PalletHsmCall =
9934
9960
  * - `InvalidEVMInteraction` if there's an error interacting with the Hollar ERC20 contract
9935
9961
  * - Other errors from underlying calls
9936
9962
  **/
9937
- | { name: 'ExecuteArbitrage'; params: { collateralAssetId: number } }
9963
+ | { name: 'ExecuteArbitrage'; params: { collateralAssetId: number; flashAmount?: bigint | undefined } }
9938
9964
  | { name: 'SetFlashMinter'; params: { flashMinterAddr: H160 } };
9939
9965
 
9940
9966
  export type PalletHsmCallLike =
@@ -10110,7 +10136,7 @@ export type PalletHsmCallLike =
10110
10136
  * - `InvalidEVMInteraction` if there's an error interacting with the Hollar ERC20 contract
10111
10137
  * - Other errors from underlying calls
10112
10138
  **/
10113
- | { name: 'ExecuteArbitrage'; params: { collateralAssetId: number } }
10139
+ | { name: 'ExecuteArbitrage'; params: { collateralAssetId: number; flashAmount?: bigint | undefined } }
10114
10140
  | { name: 'SetFlashMinter'; params: { flashMinterAddr: H160 } };
10115
10141
 
10116
10142
  /**
@@ -14268,13 +14294,13 @@ export type PalletStableswapEvent =
14268
14294
  /**
14269
14295
  * Pool max peg update has been updated.
14270
14296
  **/
14271
- | { name: 'PoolMaxPegUpdateUpdated'; data: { poolId: number; maxPegUpdate: Permill } };
14297
+ | { name: 'PoolMaxPegUpdateUpdated'; data: { poolId: number; maxPegUpdate: Perbill } };
14272
14298
 
14273
14299
  export type NonZeroU16 = number;
14274
14300
 
14275
14301
  export type PalletStableswapPoolPegInfo = {
14276
14302
  source: Array<PalletStableswapPegSource>;
14277
- maxPegUpdate: Permill;
14303
+ maxPegUpdate: Perbill;
14278
14304
  current: Array<[bigint, bigint]>;
14279
14305
  };
14280
14306
 
@@ -14524,9 +14550,8 @@ export type PalletHsmEvent =
14524
14550
  *
14525
14551
  * Parameters:
14526
14552
  * - `asset_id`: The ID of the asset removed from collaterals
14527
- * - `amount`: The amount of the asset that was returned (should be zero)
14528
14553
  **/
14529
- | { name: 'CollateralRemoved'; data: { assetId: number; amount: bigint } }
14554
+ | { name: 'CollateralRemoved'; data: { assetId: number } }
14530
14555
  /**
14531
14556
  * A collateral asset was updated
14532
14557
  *
@@ -14554,7 +14579,7 @@ export type PalletHsmEvent =
14554
14579
  * - `asset_id`: The collateral asset used in the arbitrage
14555
14580
  * - `hollar_amount`: Amount of Hollar that was included in the arbitrage operation
14556
14581
  **/
14557
- | { name: 'ArbitrageExecuted'; data: { assetId: number; hollarAmount: bigint } }
14582
+ | { name: 'ArbitrageExecuted'; data: { arbitrage: number; assetId: number; hollarAmount: bigint; profit: bigint } }
14558
14583
  /**
14559
14584
  * Flash minter address set
14560
14585
  *
@@ -16612,6 +16637,20 @@ export type PalletWhitelistError =
16612
16637
  **/
16613
16638
  | 'CallAlreadyWhitelisted';
16614
16639
 
16640
+ /**
16641
+ * The `Error` enum of this pallet.
16642
+ **/
16643
+ export type PalletDispatcherError =
16644
+ /**
16645
+ * The EVM call execution failed. This happens when the EVM returns an exit reason
16646
+ * other than `ExitSucceed(Returned)` or `ExitSucceed(Stopped)`.
16647
+ **/
16648
+ | 'EvmCallFailed'
16649
+ /**
16650
+ * The provided call is not an EVM call. This extrinsic only accepts `pallet_evm::Call::call`.
16651
+ **/
16652
+ | 'NotEvmCall';
16653
+
16615
16654
  export type PalletAssetRegistryAssetDetails = {
16616
16655
  name?: Bytes | undefined;
16617
16656
  assetType: PalletAssetRegistryAssetType;
@@ -19246,6 +19285,7 @@ export type HydradxRuntimeRuntimeError =
19246
19285
  | { pallet: 'ConvictionVoting'; palletError: PalletConvictionVotingError }
19247
19286
  | { pallet: 'Referenda'; palletError: PalletReferendaError }
19248
19287
  | { pallet: 'Whitelist'; palletError: PalletWhitelistError }
19288
+ | { pallet: 'Dispatcher'; palletError: PalletDispatcherError }
19249
19289
  | { pallet: 'AssetRegistry'; palletError: PalletAssetRegistryError }
19250
19290
  | { pallet: 'Claims'; palletError: PalletClaimsError }
19251
19291
  | { pallet: 'CollatorRewards'; palletError: PalletCollatorRewardsError }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/chaintypes",
3
- "version": "0.154.0",
3
+ "version": "0.155.0",
4
4
  "description": "Types for substrate-based chains",
5
5
  "author": "Thang X. Vu <thang@dedot.dev>",
6
6
  "homepage": "https://dedot.dev",
@@ -25,7 +25,7 @@
25
25
  "directory": "dist"
26
26
  },
27
27
  "license": "Apache-2.0",
28
- "gitHead": "a488030b6f9ab43d50759291a0ee022f876be8f5",
28
+ "gitHead": "1f77d659dcc5d99c0f45e5c27059a52824328bfe",
29
29
  "module": "./index.js",
30
30
  "types": "./index.d.ts",
31
31
  "exports": {
package/vara/index.d.ts CHANGED
@@ -60,7 +60,7 @@ export interface VersionedVaraApi<Rv extends RpcVersion> extends GenericSubstrat
60
60
 
61
61
  /**
62
62
  * @name: VaraApi
63
- * @specVersion: 1820
63
+ * @specVersion: 1910
64
64
  **/
65
65
  export interface VaraApi {
66
66
  legacy: VersionedVaraApi<RpcLegacy>;
package/vara/query.d.ts CHANGED
@@ -90,7 +90,7 @@ import type {
90
90
  PalletNominationPoolsClaimPermission,
91
91
  GearCoreCodeInstrumentedInstrumentedCode,
92
92
  GprimitivesCodeId,
93
- GearCommonCodeMetadata,
93
+ GearCoreCodeMetadataCodeMetadata,
94
94
  NumeratedTreeIntervalsTree,
95
95
  GprimitivesActorId,
96
96
  GearCoreProgram,
@@ -2327,19 +2327,12 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2327
2327
  * @param {GprimitivesCodeId} arg
2328
2328
  * @param {Callback<GearCoreCodeInstrumentedInstrumentedCode | undefined> =} callback
2329
2329
  **/
2330
- codeStorage: GenericStorageQuery<
2330
+ instrumentedCodeStorage: GenericStorageQuery<
2331
2331
  Rv,
2332
2332
  (arg: GprimitivesCodeId) => GearCoreCodeInstrumentedInstrumentedCode | undefined,
2333
2333
  GprimitivesCodeId
2334
2334
  >;
2335
2335
 
2336
- /**
2337
- *
2338
- * @param {GprimitivesCodeId} arg
2339
- * @param {Callback<number | undefined> =} callback
2340
- **/
2341
- codeLenStorage: GenericStorageQuery<Rv, (arg: GprimitivesCodeId) => number | undefined, GprimitivesCodeId>;
2342
-
2343
2336
  /**
2344
2337
  *
2345
2338
  * @param {GprimitivesCodeId} arg
@@ -2350,11 +2343,11 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
2350
2343
  /**
2351
2344
  *
2352
2345
  * @param {GprimitivesCodeId} arg
2353
- * @param {Callback<GearCommonCodeMetadata | undefined> =} callback
2346
+ * @param {Callback<GearCoreCodeMetadataCodeMetadata | undefined> =} callback
2354
2347
  **/
2355
- metadataStorage: GenericStorageQuery<
2348
+ codeMetadataStorage: GenericStorageQuery<
2356
2349
  Rv,
2357
- (arg: GprimitivesCodeId) => GearCommonCodeMetadata | undefined,
2350
+ (arg: GprimitivesCodeId) => GearCoreCodeMetadataCodeMetadata | undefined,
2358
2351
  GprimitivesCodeId
2359
2352
  >;
2360
2353
 
package/vara/runtime.d.ts CHANGED
@@ -26,7 +26,7 @@ import type {
26
26
  PalletTransactionPaymentFeeDetails,
27
27
  SpWeightsWeightV2Weight,
28
28
  PalletGearStakingRewardsInflationInfo,
29
- PalletGearEthBridgeInternalProof,
29
+ PalletGearEthBridgePrimitivesProof,
30
30
  SpRuntimeBlock,
31
31
  SpRuntimeExtrinsicInclusionMode,
32
32
  SpCoreOpaqueMetadata,
@@ -39,8 +39,8 @@ import type {
39
39
  SpConsensusGrandpaAppPublic,
40
40
  SpConsensusGrandpaEquivocationProof,
41
41
  SpRuntimeOpaqueValue,
42
- GearCoreMessageReplyInfo,
43
- GearCoreGasGasInfo,
42
+ GearCoreRpcReplyInfo,
43
+ GearCoreRpcGasInfo,
44
44
  PalletGearManagerHandleKind,
45
45
  } from './types.js';
46
46
 
@@ -347,7 +347,7 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
347
347
  **/
348
348
  gearBuiltinApi: {
349
349
  /**
350
- * Calculate `ProgramId` (a.k.a. actor id) for a given builtin id.
350
+ * Calculate `ActorId` (a.k.a. actor id) for a given builtin id.
351
351
  *
352
352
  * @callname: GearBuiltinApi_query_actor_id
353
353
  * @param {bigint} builtin_id
@@ -369,7 +369,7 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
369
369
  * @callname: GearEthBridgeApi_merkle_proof
370
370
  * @param {H256} hash
371
371
  **/
372
- merkleProof: GenericRuntimeApiMethod<Rv, (hash: H256) => Promise<PalletGearEthBridgeInternalProof | undefined>>;
372
+ merkleProof: GenericRuntimeApiMethod<Rv, (hash: H256) => Promise<PalletGearEthBridgePrimitivesProof | undefined>>;
373
373
 
374
374
  /**
375
375
  * Generic runtime api call
@@ -801,7 +801,7 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
801
801
  gasLimit: bigint,
802
802
  value: bigint,
803
803
  allowanceMultiplier: bigint,
804
- ) => Promise<Result<GearCoreMessageReplyInfo, Bytes>>
804
+ ) => Promise<Result<GearCoreRpcReplyInfo, Bytes>>
805
805
  >;
806
806
 
807
807
  /**
@@ -825,7 +825,7 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
825
825
  allowOtherPanics: boolean,
826
826
  initialGas?: bigint | undefined,
827
827
  allowanceMultiplier?: bigint | undefined,
828
- ) => Promise<Result<GearCoreGasGasInfo, Bytes>>
828
+ ) => Promise<Result<GearCoreRpcGasInfo, Bytes>>
829
829
  >;
830
830
 
831
831
  /**
package/vara/tx.d.ts CHANGED
@@ -6863,8 +6863,8 @@ export interface ChainTx<Rv extends RpcVersion> extends GenericChainTx<Rv, TxCal
6863
6863
  * could be more than remaining block gas limit. Therefore, the message processing will be postponed
6864
6864
  * until the next block.
6865
6865
  *
6866
- * `ProgramId` is computed as Blake256 hash of concatenated bytes of `code` + `salt`. (todo #512 `code_hash` + `salt`)
6867
- * Such `ProgramId` must not exist in the Program Storage at the time of this call.
6866
+ * `ActorId` is computed as Blake256 hash of concatenated bytes of `code` + `salt`. (todo #512 `code_hash` + `salt`)
6867
+ * Such `ActorId` must not exist in the Program Storage at the time of this call.
6868
6868
  *
6869
6869
  * There is the same guarantee here as in `upload_code`. That is, future program's
6870
6870
  * `code` and metadata are stored before message was added to the queue and processed.
package/vara/types.d.ts CHANGED
@@ -6810,8 +6810,8 @@ export type PalletGearCall =
6810
6810
  * could be more than remaining block gas limit. Therefore, the message processing will be postponed
6811
6811
  * until the next block.
6812
6812
  *
6813
- * `ProgramId` is computed as Blake256 hash of concatenated bytes of `code` + `salt`. (todo #512 `code_hash` + `salt`)
6814
- * Such `ProgramId` must not exist in the Program Storage at the time of this call.
6813
+ * `ActorId` is computed as Blake256 hash of concatenated bytes of `code` + `salt`. (todo #512 `code_hash` + `salt`)
6814
+ * Such `ActorId` must not exist in the Program Storage at the time of this call.
6815
6815
  *
6816
6816
  * There is the same guarantee here as in `upload_code`. That is, future program's
6817
6817
  * `code` and metadata are stored before message was added to the queue and processed.
@@ -6998,8 +6998,8 @@ export type PalletGearCallLike =
6998
6998
  * could be more than remaining block gas limit. Therefore, the message processing will be postponed
6999
6999
  * until the next block.
7000
7000
  *
7001
- * `ProgramId` is computed as Blake256 hash of concatenated bytes of `code` + `salt`. (todo #512 `code_hash` + `salt`)
7002
- * Such `ProgramId` must not exist in the Program Storage at the time of this call.
7001
+ * `ActorId` is computed as Blake256 hash of concatenated bytes of `code` + `salt`. (todo #512 `code_hash` + `salt`)
7002
+ * Such `ActorId` must not exist in the Program Storage at the time of this call.
7003
7003
  *
7004
7004
  * There is the same guarantee here as in `upload_code`. That is, future program's
7005
7005
  * `code` and metadata are stored before message was added to the queue and processed.
@@ -8487,7 +8487,7 @@ export type GearCoreMessageUserUserMessage = {
8487
8487
 
8488
8488
  export type GearCoreBufferLimitedVec = Bytes;
8489
8489
 
8490
- export type GearCoreMessagePayloadSizeError = {};
8490
+ export type GearCoreBufferPayloadSizeError = {};
8491
8491
 
8492
8492
  export type GearCoreMessageCommonReplyDetails = { to: GprimitivesMessageId; code: GearCoreErrorsSimpleReplyCode };
8493
8493
 
@@ -10253,21 +10253,10 @@ export type PalletNominationPoolsDefensiveError =
10253
10253
  | 'SlashNotApplied';
10254
10254
 
10255
10255
  export type GearCoreCodeInstrumentedInstrumentedCode = {
10256
- code: Bytes;
10257
- originalCodeLen: number;
10258
- exports: Array<GearCoreMessageDispatchKind>;
10259
- staticPages: GearCorePagesPagesAmount;
10260
- stackEnd?: GearCorePagesPage | undefined;
10256
+ bytes: Bytes;
10261
10257
  instantiatedSectionSizes: GearCoreCodeInstrumentedInstantiatedSectionSizes;
10262
- version: number;
10263
10258
  };
10264
10259
 
10265
- export type GearCoreMessageDispatchKind = 'Init' | 'Handle' | 'Reply' | 'Signal';
10266
-
10267
- export type GearCorePagesPagesAmount = number;
10268
-
10269
- export type GearCorePagesPage = number;
10270
-
10271
10260
  export type GearCoreCodeInstrumentedInstantiatedSectionSizes = {
10272
10261
  codeSection: number;
10273
10262
  dataSection: number;
@@ -10277,7 +10266,24 @@ export type GearCoreCodeInstrumentedInstantiatedSectionSizes = {
10277
10266
  typeSection: number;
10278
10267
  };
10279
10268
 
10280
- export type GearCommonCodeMetadata = { author: H256; blockNumber: number };
10269
+ export type GearCoreCodeMetadataCodeMetadata = {
10270
+ originalCodeLen: number;
10271
+ exports: Array<GearCoreMessageDispatchKind>;
10272
+ staticPages: GearCorePagesPagesAmount;
10273
+ stackEnd?: GearCorePagesPage | undefined;
10274
+ instrumentationStatus: GearCoreCodeMetadataInstrumentationStatus;
10275
+ };
10276
+
10277
+ export type GearCoreMessageDispatchKind = 'Init' | 'Handle' | 'Reply' | 'Signal';
10278
+
10279
+ export type GearCorePagesPagesAmount = number;
10280
+
10281
+ export type GearCorePagesPage = number;
10282
+
10283
+ export type GearCoreCodeMetadataInstrumentationStatus =
10284
+ | { type: 'NotInstrumented' }
10285
+ | { type: 'Instrumented'; value: { version: number; codeLen: number } }
10286
+ | { type: 'InstrumentationFailed'; value: { version: number } };
10281
10287
 
10282
10288
  export type NumeratedTreeIntervalsTree = { inner: Array<[GearCorePagesPage, GearCorePagesPage]> };
10283
10289
 
@@ -10290,9 +10296,7 @@ export type GearCoreProgramActiveProgram = {
10290
10296
  allocationsTreeLen: number;
10291
10297
  memoryInfix: GearCoreProgramMemoryInfix;
10292
10298
  gasReservationMap: Array<[GprimitivesReservationId, GearCoreReservationGasReservationSlot]>;
10293
- codeHash: H256;
10294
- codeExports: Array<GearCoreMessageDispatchKind>;
10295
- staticPages: GearCorePagesPagesAmount;
10299
+ codeId: GprimitivesCodeId;
10296
10300
  state: GearCoreProgramProgramState;
10297
10301
  expirationBlock: number;
10298
10302
  };
@@ -10587,8 +10591,7 @@ export type PalletGearSchedule = {
10587
10591
  dbWeights: PalletGearScheduleDbWeights;
10588
10592
  taskWeights: PalletGearScheduleTaskWeights;
10589
10593
  instantiationWeights: PalletGearScheduleInstantiationWeights;
10590
- codeInstrumentationCost: SpWeightsWeightV2Weight;
10591
- codeInstrumentationByteCost: SpWeightsWeightV2Weight;
10594
+ instrumentationWeights: PalletGearScheduleInstrumentationWeights;
10592
10595
  loadAllocationsWeight: SpWeightsWeightV2Weight;
10593
10596
  };
10594
10597
 
@@ -10820,6 +10823,11 @@ export type PalletGearScheduleInstantiationWeights = {
10820
10823
  typeSectionPerByte: SpWeightsWeightV2Weight;
10821
10824
  };
10822
10825
 
10826
+ export type PalletGearScheduleInstrumentationWeights = {
10827
+ base: SpWeightsWeightV2Weight;
10828
+ perByte: SpWeightsWeightV2Weight;
10829
+ };
10830
+
10823
10831
  export type GearCorePercent = number;
10824
10832
 
10825
10833
  /**
@@ -11070,7 +11078,7 @@ export type PalletTransactionPaymentInclusionFee = { baseFee: bigint; lenFee: bi
11070
11078
 
11071
11079
  export type PalletGearStakingRewardsInflationInfo = { inflation: Perquintill; roi: Perquintill };
11072
11080
 
11073
- export type PalletGearEthBridgeInternalProof = {
11081
+ export type PalletGearEthBridgePrimitivesProof = {
11074
11082
  root: H256;
11075
11083
  proof: Array<H256>;
11076
11084
  numberOfLeaves: bigint;
@@ -11122,7 +11130,7 @@ export type SpRuntimeTransactionValidityValidTransaction = {
11122
11130
 
11123
11131
  export type SpRuntimeOpaqueValue = Bytes;
11124
11132
 
11125
- export type GearCoreMessageReplyInfo = { payload: Bytes; value: bigint; code: GearCoreErrorsSimpleReplyCode };
11133
+ export type GearCoreRpcReplyInfo = { payload: Bytes; value: bigint; code: GearCoreErrorsSimpleReplyCode };
11126
11134
 
11127
11135
  export type PalletGearManagerHandleKind =
11128
11136
  | { type: 'Init'; value: Bytes }
@@ -11131,7 +11139,7 @@ export type PalletGearManagerHandleKind =
11131
11139
  | { type: 'Reply'; value: [GprimitivesMessageId, GearCoreErrorsSimpleReplyCode] }
11132
11140
  | { type: 'Signal'; value: [GprimitivesMessageId, GearCoreErrorsSimpleSignalCode] };
11133
11141
 
11134
- export type GearCoreGasGasInfo = {
11142
+ export type GearCoreRpcGasInfo = {
11135
11143
  minLimit: bigint;
11136
11144
  reserved: bigint;
11137
11145
  burned: bigint;