@dedot/chaintypes 0.122.0 → 0.131.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.
Files changed (53) hide show
  1. package/astar/consts.d.ts +0 -9
  2. package/astar/index.d.ts +1 -1
  3. package/astar/query.d.ts +0 -15
  4. package/hydration/consts.d.ts +29 -0
  5. package/hydration/errors.d.ts +172 -10
  6. package/hydration/events.d.ts +105 -0
  7. package/hydration/index.d.ts +1 -1
  8. package/hydration/json-rpc.d.ts +1 -0
  9. package/hydration/query.d.ts +50 -0
  10. package/hydration/tx.d.ts +408 -0
  11. package/hydration/types.d.ts +695 -12
  12. package/kusama/consts.d.ts +27 -7
  13. package/kusama/errors.d.ts +51 -4
  14. package/kusama/events.d.ts +212 -4
  15. package/kusama/index.d.ts +1 -1
  16. package/kusama/query.d.ts +44 -19
  17. package/kusama/runtime.d.ts +22 -0
  18. package/kusama/tx.d.ts +377 -25
  19. package/kusama/types.d.ts +638 -80
  20. package/kusama-asset-hub/consts.d.ts +98 -2
  21. package/kusama-asset-hub/errors.d.ts +314 -12
  22. package/kusama-asset-hub/events.d.ts +157 -3
  23. package/kusama-asset-hub/index.d.ts +1 -1
  24. package/kusama-asset-hub/query.d.ts +113 -6
  25. package/kusama-asset-hub/runtime.d.ts +217 -1
  26. package/kusama-asset-hub/tx.d.ts +581 -1
  27. package/kusama-asset-hub/types.d.ts +1086 -26
  28. package/moonbeam/index.d.ts +1 -1
  29. package/package.json +2 -2
  30. package/polkadot/consts.d.ts +23 -5
  31. package/polkadot/errors.d.ts +51 -4
  32. package/polkadot/events.d.ts +207 -4
  33. package/polkadot/index.d.ts +1 -1
  34. package/polkadot/query.d.ts +44 -19
  35. package/polkadot/runtime.d.ts +22 -0
  36. package/polkadot/tx.d.ts +376 -24
  37. package/polkadot/types.d.ts +630 -78
  38. package/westend/consts.d.ts +28 -9
  39. package/westend/errors.d.ts +21 -37
  40. package/westend/events.d.ts +25 -49
  41. package/westend/index.d.ts +1 -1
  42. package/westend/query.d.ts +40 -70
  43. package/westend/runtime.d.ts +7 -0
  44. package/westend/tx.d.ts +77 -124
  45. package/westend/types.d.ts +228 -328
  46. package/westend-asset-hub/consts.d.ts +41 -14
  47. package/westend-asset-hub/errors.d.ts +12 -96
  48. package/westend-asset-hub/events.d.ts +29 -81
  49. package/westend-asset-hub/index.d.ts +1 -1
  50. package/westend-asset-hub/query.d.ts +61 -125
  51. package/westend-asset-hub/runtime.d.ts +47 -1
  52. package/westend-asset-hub/tx.d.ts +97 -549
  53. package/westend-asset-hub/types.d.ts +489 -958
@@ -1,7 +1,17 @@
1
1
  // Generated by dedot cli
2
2
 
3
3
  import type { GenericChainEvents, GenericPalletEvent, RpcVersion } from 'dedot/types';
4
- import type { DispatchError, AccountId32, H256, FixedBytes, FixedU128, Result, Bytes, Permill } from 'dedot/codecs';
4
+ import type {
5
+ DispatchError,
6
+ AccountId32,
7
+ H256,
8
+ FixedBytes,
9
+ FixedU128,
10
+ Result,
11
+ Bytes,
12
+ Permill,
13
+ H160,
14
+ } from 'dedot/codecs';
5
15
  import type {
6
16
  FrameSystemDispatchEventInfo,
7
17
  SpWeightsWeightV2Weight,
@@ -10,15 +20,17 @@ import type {
10
20
  StagingXcmV5TraitsOutcome,
11
21
  StagingXcmV5Location,
12
22
  StagingXcmV5Xcm,
23
+ XcmV3TraitsSendError,
24
+ XcmV5TraitsError,
13
25
  StagingXcmV5Response,
14
26
  XcmVersionedAssets,
15
27
  StagingXcmV5AssetAssets,
16
- XcmV5TraitsError,
17
28
  XcmVersionedLocation,
18
29
  CumulusPrimitivesCoreAggregateMessageOrigin,
19
30
  FrameSupportMessagesProcessMessageError,
20
31
  PalletMultisigTimepoint,
21
32
  AssetHubKusamaRuntimeProxyType,
33
+ PalletProxyDepositKind,
22
34
  PalletNftsAttributeNamespace,
23
35
  PalletNftsPriceWithDirection,
24
36
  PalletNftsPalletAttributes,
@@ -76,6 +88,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
76
88
  **/
77
89
  UpgradeAuthorized: GenericPalletEvent<Rv, 'System', 'UpgradeAuthorized', { codeHash: H256; checkVersion: boolean }>;
78
90
 
91
+ /**
92
+ * An invalid authorized upgrade was rejected while trying to apply it.
93
+ **/
94
+ RejectedInvalidAuthorizedUpgrade: GenericPalletEvent<
95
+ Rv,
96
+ 'System',
97
+ 'RejectedInvalidAuthorizedUpgrade',
98
+ { codeHash: H256; error: DispatchError }
99
+ >;
100
+
79
101
  /**
80
102
  * Generic pallet event
81
103
  **/
@@ -426,6 +448,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
426
448
  **/
427
449
  NewSession: GenericPalletEvent<Rv, 'Session', 'NewSession', { sessionIndex: number }>;
428
450
 
451
+ /**
452
+ * Validator has been disabled.
453
+ **/
454
+ ValidatorDisabled: GenericPalletEvent<Rv, 'Session', 'ValidatorDisabled', { validator: AccountId32 }>;
455
+
456
+ /**
457
+ * Validator has been re-enabled.
458
+ **/
459
+ ValidatorReenabled: GenericPalletEvent<Rv, 'Session', 'ValidatorReenabled', { validator: AccountId32 }>;
460
+
429
461
  /**
430
462
  * Generic pallet event
431
463
  **/
@@ -455,7 +487,7 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
455
487
  Attempted: GenericPalletEvent<Rv, 'PolkadotXcm', 'Attempted', { outcome: StagingXcmV5TraitsOutcome }>;
456
488
 
457
489
  /**
458
- * A XCM message was sent.
490
+ * An XCM message was sent.
459
491
  **/
460
492
  Sent: GenericPalletEvent<
461
493
  Rv,
@@ -469,6 +501,31 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
469
501
  }
470
502
  >;
471
503
 
504
+ /**
505
+ * An XCM message failed to send.
506
+ **/
507
+ SendFailed: GenericPalletEvent<
508
+ Rv,
509
+ 'PolkadotXcm',
510
+ 'SendFailed',
511
+ {
512
+ origin: StagingXcmV5Location;
513
+ destination: StagingXcmV5Location;
514
+ error: XcmV3TraitsSendError;
515
+ messageId: FixedBytes<32>;
516
+ }
517
+ >;
518
+
519
+ /**
520
+ * An XCM message failed to process.
521
+ **/
522
+ ProcessXcmError: GenericPalletEvent<
523
+ Rv,
524
+ 'PolkadotXcm',
525
+ 'ProcessXcmError',
526
+ { origin: StagingXcmV5Location; error: XcmV5TraitsError; messageId: FixedBytes<32> }
527
+ >;
528
+
472
529
  /**
473
530
  * Query response received which does not match a registered query. This may be because a
474
531
  * matching query was never registered, it may be because it is a duplicate response, or
@@ -722,6 +779,37 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
722
779
  **/
723
780
  VersionMigrationFinished: GenericPalletEvent<Rv, 'PolkadotXcm', 'VersionMigrationFinished', { version: number }>;
724
781
 
782
+ /**
783
+ * An `aliaser` location was authorized by `target` to alias it, authorization valid until
784
+ * `expiry` block number.
785
+ **/
786
+ AliasAuthorized: GenericPalletEvent<
787
+ Rv,
788
+ 'PolkadotXcm',
789
+ 'AliasAuthorized',
790
+ { aliaser: StagingXcmV5Location; target: StagingXcmV5Location; expiry?: bigint | undefined }
791
+ >;
792
+
793
+ /**
794
+ * `target` removed alias authorization for `aliaser`.
795
+ **/
796
+ AliasAuthorizationRemoved: GenericPalletEvent<
797
+ Rv,
798
+ 'PolkadotXcm',
799
+ 'AliasAuthorizationRemoved',
800
+ { aliaser: StagingXcmV5Location; target: StagingXcmV5Location }
801
+ >;
802
+
803
+ /**
804
+ * `target` removed all alias authorizations.
805
+ **/
806
+ AliasesAuthorizationsRemoved: GenericPalletEvent<
807
+ Rv,
808
+ 'PolkadotXcm',
809
+ 'AliasesAuthorizationsRemoved',
810
+ { target: StagingXcmV5Location }
811
+ >;
812
+
725
813
  /**
726
814
  * Generic pallet event
727
815
  **/
@@ -955,6 +1043,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
955
1043
  **/
956
1044
  DispatchedAs: GenericPalletEvent<Rv, 'Utility', 'DispatchedAs', { result: Result<[], DispatchError> }>;
957
1045
 
1046
+ /**
1047
+ * Main call was dispatched.
1048
+ **/
1049
+ IfElseMainSuccess: GenericPalletEvent<Rv, 'Utility', 'IfElseMainSuccess', null>;
1050
+
1051
+ /**
1052
+ * The fallback call was dispatched.
1053
+ **/
1054
+ IfElseFallbackCalled: GenericPalletEvent<Rv, 'Utility', 'IfElseFallbackCalled', { mainError: DispatchError }>;
1055
+
958
1056
  /**
959
1057
  * Generic pallet event
960
1058
  **/
@@ -1010,6 +1108,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1010
1108
  { cancelling: AccountId32; timepoint: PalletMultisigTimepoint; multisig: AccountId32; callHash: FixedBytes<32> }
1011
1109
  >;
1012
1110
 
1111
+ /**
1112
+ * The deposit for a multisig operation has been updated/poked.
1113
+ **/
1114
+ DepositPoked: GenericPalletEvent<
1115
+ Rv,
1116
+ 'Multisig',
1117
+ 'DepositPoked',
1118
+ { who: AccountId32; callHash: FixedBytes<32>; oldDeposit: bigint; newDeposit: bigint }
1119
+ >;
1120
+
1013
1121
  /**
1014
1122
  * Generic pallet event
1015
1123
  **/
@@ -1060,6 +1168,16 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
1060
1168
  { delegator: AccountId32; delegatee: AccountId32; proxyType: AssetHubKusamaRuntimeProxyType; delay: number }
1061
1169
  >;
1062
1170
 
1171
+ /**
1172
+ * A deposit stored for proxies or announcements was poked / updated.
1173
+ **/
1174
+ DepositPoked: GenericPalletEvent<
1175
+ Rv,
1176
+ 'Proxy',
1177
+ 'DepositPoked',
1178
+ { who: AccountId32; kind: PalletProxyDepositKind; oldDeposit: bigint; newDeposit: bigint }
1179
+ >;
1180
+
1063
1181
  /**
1064
1182
  * Generic pallet event
1065
1183
  **/
@@ -2506,6 +2624,42 @@ export interface ChainEvents<Rv extends RpcVersion> extends GenericChainEvents<R
2506
2624
  **/
2507
2625
  [prop: string]: GenericPalletEvent<Rv>;
2508
2626
  };
2627
+ /**
2628
+ * Pallet `Revive`'s events
2629
+ **/
2630
+ revive: {
2631
+ /**
2632
+ * A custom event emitted by the contract.
2633
+ **/
2634
+ ContractEmitted: GenericPalletEvent<
2635
+ Rv,
2636
+ 'Revive',
2637
+ 'ContractEmitted',
2638
+ {
2639
+ /**
2640
+ * The contract that emitted the event.
2641
+ **/
2642
+ contract: H160;
2643
+
2644
+ /**
2645
+ * Data supplied by the contract. Metadata generated during contract compilation
2646
+ * is needed to decode it.
2647
+ **/
2648
+ data: Bytes;
2649
+
2650
+ /**
2651
+ * A list of topics used to index the event.
2652
+ * Number of topics is capped by [`limits::NUM_EVENT_TOPICS`].
2653
+ **/
2654
+ topics: Array<H256>;
2655
+ }
2656
+ >;
2657
+
2658
+ /**
2659
+ * Generic pallet event
2660
+ **/
2661
+ [prop: string]: GenericPalletEvent<Rv>;
2662
+ };
2509
2663
  /**
2510
2664
  * Pallet `StateTrieMigration`'s events
2511
2665
  **/
@@ -23,7 +23,7 @@ export interface VersionedKusamaAssetHubApi<Rv extends RpcVersion> extends Gener
23
23
 
24
24
  /**
25
25
  * @name: KusamaAssetHubApi
26
- * @specVersion: 1005001
26
+ * @specVersion: 1006000
27
27
  **/
28
28
  export interface KusamaAssetHubApi {
29
29
  legacy: VersionedKusamaAssetHubApi<RpcLegacy>;
@@ -11,6 +11,7 @@ import type {
11
11
  FixedU128,
12
12
  BytesLike,
13
13
  FixedBytes,
14
+ H160,
14
15
  } from 'dedot/codecs';
15
16
  import type {
16
17
  FrameSystemAccountInfo,
@@ -18,6 +19,7 @@ import type {
18
19
  FrameSystemEventRecord,
19
20
  FrameSystemLastRuntimeUpgradeInfo,
20
21
  FrameSystemCodeUpgradeAuthorization,
22
+ SpWeightsWeightV2Weight,
21
23
  CumulusPalletParachainSystemUnincludedSegmentAncestor,
22
24
  CumulusPalletParachainSystemUnincludedSegmentSegmentTracker,
23
25
  PolkadotPrimitivesV8PersistedValidationData,
@@ -29,7 +31,6 @@ import type {
29
31
  CumulusPrimitivesParachainInherentMessageQueueChain,
30
32
  PolkadotParachainPrimitivesPrimitivesId,
31
33
  PolkadotCorePrimitivesOutboundHrmpMessage,
32
- SpWeightsWeightV2Weight,
33
34
  PalletBalancesAccountData,
34
35
  PalletBalancesBalanceLock,
35
36
  PalletBalancesReserveData,
@@ -40,6 +41,7 @@ import type {
40
41
  PalletVestingReleases,
41
42
  PalletCollatorSelectionCandidateInfo,
42
43
  AssetHubKusamaRuntimeSessionKeys,
44
+ SpStakingOffenceOffenceSeverity,
43
45
  SpCoreCryptoKeyTypeId,
44
46
  SpConsensusAuraSr25519AppSr25519Public,
45
47
  SpConsensusSlotsSlot,
@@ -51,6 +53,7 @@ import type {
51
53
  PalletXcmRemoteLockedFungibleRecord,
52
54
  XcmVersionedAssetId,
53
55
  StagingXcmV5Xcm,
56
+ PalletXcmAuthorizedAliasesEntry,
54
57
  BpXcmBridgeHubRouterBridgeState,
55
58
  PalletMessageQueueBookState,
56
59
  CumulusPrimitivesCoreAggregateMessageOrigin,
@@ -79,6 +82,9 @@ import type {
79
82
  StagingXcmV4Location,
80
83
  PalletNftFractionalizationDetails,
81
84
  PalletAssetConversionPoolInfo,
85
+ PalletReviveWasmCodeInfo,
86
+ PalletReviveStorageContractInfo,
87
+ PalletReviveStorageDeletionQueueManager,
82
88
  PalletStateTrieMigrationMigrationTask,
83
89
  PalletStateTrieMigrationMigrationLimits,
84
90
  } from './types.js';
@@ -234,6 +240,19 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
234
240
  **/
235
241
  authorizedUpgrade: GenericStorageQuery<Rv, () => FrameSystemCodeUpgradeAuthorization | undefined>;
236
242
 
243
+ /**
244
+ * The weight reclaimed for the extrinsic.
245
+ *
246
+ * This information is available until the end of the extrinsic execution.
247
+ * More precisely this information is removed in `note_applied_extrinsic`.
248
+ *
249
+ * Logic doing some post dispatch weight reduction must update this storage to avoid duplicate
250
+ * reduction.
251
+ *
252
+ * @param {Callback<SpWeightsWeightV2Weight> =} callback
253
+ **/
254
+ extrinsicWeightReclaimed: GenericStorageQuery<Rv, () => SpWeightsWeightV2Weight>;
255
+
237
256
  /**
238
257
  * Generic pallet storage query
239
258
  **/
@@ -783,9 +802,9 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
783
802
  * disabled using binary search. It gets cleared when `on_session_ending` returns
784
803
  * a new set of identities.
785
804
  *
786
- * @param {Callback<Array<number>> =} callback
805
+ * @param {Callback<Array<[number, SpStakingOffenceOffenceSeverity]>> =} callback
787
806
  **/
788
- disabledValidators: GenericStorageQuery<Rv, () => Array<number>>;
807
+ disabledValidators: GenericStorageQuery<Rv, () => Array<[number, SpStakingOffenceOffenceSeverity]>>;
789
808
 
790
809
  /**
791
810
  * The next session keys for a validator.
@@ -857,13 +876,14 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
857
876
  authorities: GenericStorageQuery<Rv, () => Array<SpConsensusAuraSr25519AppSr25519Public>>;
858
877
 
859
878
  /**
860
- * Current slot paired with a number of authored blocks.
879
+ * Current relay chain slot paired with a number of authored blocks.
861
880
  *
862
- * Updated on each block initialization.
881
+ * This is updated in [`FixedVelocityConsensusHook::on_state_proof`] with the current relay
882
+ * chain slot as provided by the relay chain state proof.
863
883
  *
864
884
  * @param {Callback<[SpConsensusSlotsSlot, number] | undefined> =} callback
865
885
  **/
866
- slotInfo: GenericStorageQuery<Rv, () => [SpConsensusSlotsSlot, number] | undefined>;
886
+ relaySlotInfo: GenericStorageQuery<Rv, () => [SpConsensusSlotsSlot, number] | undefined>;
867
887
 
868
888
  /**
869
889
  * Generic pallet storage query
@@ -1102,6 +1122,20 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1102
1122
  **/
1103
1123
  recordedXcm: GenericStorageQuery<Rv, () => StagingXcmV5Xcm | undefined>;
1104
1124
 
1125
+ /**
1126
+ * Map of authorized aliasers of local origins. Each local location can authorize a list of
1127
+ * other locations to alias into it. Each aliaser is only valid until its inner `expiry`
1128
+ * block number.
1129
+ *
1130
+ * @param {XcmVersionedLocation} arg
1131
+ * @param {Callback<PalletXcmAuthorizedAliasesEntry | undefined> =} callback
1132
+ **/
1133
+ authorizedAliases: GenericStorageQuery<
1134
+ Rv,
1135
+ (arg: XcmVersionedLocation) => PalletXcmAuthorizedAliasesEntry | undefined,
1136
+ XcmVersionedLocation
1137
+ >;
1138
+
1105
1139
  /**
1106
1140
  * Generic pallet storage query
1107
1141
  **/
@@ -1767,6 +1801,79 @@ export interface ChainStorage<Rv extends RpcVersion> extends GenericChainStorage
1767
1801
  **/
1768
1802
  [storage: string]: GenericStorageQuery<Rv>;
1769
1803
  };
1804
+ /**
1805
+ * Pallet `Revive`'s storage queries
1806
+ **/
1807
+ revive: {
1808
+ /**
1809
+ * A mapping from a contract's code hash to its code.
1810
+ *
1811
+ * @param {H256} arg
1812
+ * @param {Callback<Bytes | undefined> =} callback
1813
+ **/
1814
+ pristineCode: GenericStorageQuery<Rv, (arg: H256) => Bytes | undefined, H256>;
1815
+
1816
+ /**
1817
+ * A mapping from a contract's code hash to its code info.
1818
+ *
1819
+ * @param {H256} arg
1820
+ * @param {Callback<PalletReviveWasmCodeInfo | undefined> =} callback
1821
+ **/
1822
+ codeInfoOf: GenericStorageQuery<Rv, (arg: H256) => PalletReviveWasmCodeInfo | undefined, H256>;
1823
+
1824
+ /**
1825
+ * The code associated with a given account.
1826
+ *
1827
+ * @param {H160} arg
1828
+ * @param {Callback<PalletReviveStorageContractInfo | undefined> =} callback
1829
+ **/
1830
+ contractInfoOf: GenericStorageQuery<Rv, (arg: H160) => PalletReviveStorageContractInfo | undefined, H160>;
1831
+
1832
+ /**
1833
+ * The immutable data associated with a given account.
1834
+ *
1835
+ * @param {H160} arg
1836
+ * @param {Callback<Bytes | undefined> =} callback
1837
+ **/
1838
+ immutableDataOf: GenericStorageQuery<Rv, (arg: H160) => Bytes | undefined, H160>;
1839
+
1840
+ /**
1841
+ * Evicted contracts that await child trie deletion.
1842
+ *
1843
+ * Child trie deletion is a heavy operation depending on the amount of storage items
1844
+ * stored in said trie. Therefore this operation is performed lazily in `on_idle`.
1845
+ *
1846
+ * @param {number} arg
1847
+ * @param {Callback<Bytes | undefined> =} callback
1848
+ **/
1849
+ deletionQueue: GenericStorageQuery<Rv, (arg: number) => Bytes | undefined, number>;
1850
+
1851
+ /**
1852
+ * A pair of monotonic counters used to track the latest contract marked for deletion
1853
+ * and the latest deleted contract in queue.
1854
+ *
1855
+ * @param {Callback<PalletReviveStorageDeletionQueueManager> =} callback
1856
+ **/
1857
+ deletionQueueCounter: GenericStorageQuery<Rv, () => PalletReviveStorageDeletionQueueManager>;
1858
+
1859
+ /**
1860
+ * Map a Ethereum address to its original `AccountId32`.
1861
+ *
1862
+ * When deriving a `H160` from an `AccountId32` we use a hash function. In order to
1863
+ * reconstruct the original account we need to store the reverse mapping here.
1864
+ * Register your `AccountId32` using [`Pallet::map_account`] in order to
1865
+ * use it with this pallet.
1866
+ *
1867
+ * @param {H160} arg
1868
+ * @param {Callback<AccountId32 | undefined> =} callback
1869
+ **/
1870
+ originalAccount: GenericStorageQuery<Rv, (arg: H160) => AccountId32 | undefined, H160>;
1871
+
1872
+ /**
1873
+ * Generic pallet storage query
1874
+ **/
1875
+ [storage: string]: GenericStorageQuery<Rv>;
1876
+ };
1770
1877
  /**
1771
1878
  * Pallet `StateTrieMigration`'s storage queries
1772
1879
  **/
@@ -13,6 +13,9 @@ import type {
13
13
  BytesLike,
14
14
  AccountId32Like,
15
15
  AccountId32,
16
+ U256,
17
+ H160,
18
+ FixedBytes,
16
19
  } from 'dedot/codecs';
17
20
  import type {
18
21
  SpConsensusSlotsSlotDuration,
@@ -44,6 +47,16 @@ import type {
44
47
  XcmRuntimeApisConversionsError,
45
48
  AssetsCommonRuntimeApiFungiblesAccessError,
46
49
  CumulusPrimitivesCoreCollationInfo,
50
+ PalletRevivePrimitivesContractResult,
51
+ PalletRevivePrimitivesContractResultInstantiateReturnValue,
52
+ PalletRevivePrimitivesCode,
53
+ PalletRevivePrimitivesEthTransactInfo,
54
+ PalletRevivePrimitivesEthTransactError,
55
+ PalletReviveEvmApiRpcTypesGenGenericTransaction,
56
+ PalletRevivePrimitivesCodeUploadReturnValue,
57
+ PalletRevivePrimitivesContractAccessError,
58
+ PalletReviveEvmApiDebugRpcTypesTrace,
59
+ PalletReviveEvmApiDebugRpcTypesTracerType,
47
60
  } from './types.js';
48
61
 
49
62
  export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<Rv> {
@@ -79,7 +92,7 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
79
92
  /**
80
93
  * Whether it is legal to extend the chain, assuming the given block is the most
81
94
  * recently included one as-of the relay parent that will be built against, and
82
- * the given slot.
95
+ * the given relay chain slot.
83
96
  *
84
97
  * This should be consistent with the logic the runtime uses when validating blocks to
85
98
  * avoid issues.
@@ -718,6 +731,209 @@ export interface RuntimeApis<Rv extends RpcVersion> extends GenericRuntimeApis<R
718
731
  **/
719
732
  presetNames: GenericRuntimeApiMethod<Rv, () => Promise<Array<string>>>;
720
733
 
734
+ /**
735
+ * Generic runtime api call
736
+ **/
737
+ [method: string]: GenericRuntimeApiMethod<Rv>;
738
+ };
739
+ /**
740
+ * @runtimeapi: ReviveApi - 0x8c403e5c4a9fd442
741
+ **/
742
+ reviveApi: {
743
+ /**
744
+ * Returns the block gas limit.
745
+ *
746
+ * @callname: ReviveApi_block_gas_limit
747
+ **/
748
+ blockGasLimit: GenericRuntimeApiMethod<Rv, () => Promise<U256>>;
749
+
750
+ /**
751
+ * Returns the free balance of the given `[H160]` address, using EVM decimals.
752
+ *
753
+ * @callname: ReviveApi_balance
754
+ * @param {H160} address
755
+ **/
756
+ balance: GenericRuntimeApiMethod<Rv, (address: H160) => Promise<U256>>;
757
+
758
+ /**
759
+ * Returns the gas price.
760
+ *
761
+ * @callname: ReviveApi_gas_price
762
+ **/
763
+ gasPrice: GenericRuntimeApiMethod<Rv, () => Promise<U256>>;
764
+
765
+ /**
766
+ * Returns the nonce of the given `[H160]` address.
767
+ *
768
+ * @callname: ReviveApi_nonce
769
+ * @param {H160} address
770
+ **/
771
+ nonce: GenericRuntimeApiMethod<Rv, (address: H160) => Promise<number>>;
772
+
773
+ /**
774
+ * Perform a call from a specified account to a given contract.
775
+ *
776
+ * See [`crate::Pallet::bare_call`].
777
+ *
778
+ * @callname: ReviveApi_call
779
+ * @param {AccountId32Like} origin
780
+ * @param {H160} dest
781
+ * @param {bigint} value
782
+ * @param {SpWeightsWeightV2Weight | undefined} gas_limit
783
+ * @param {bigint | undefined} storage_deposit_limit
784
+ * @param {BytesLike} input_data
785
+ **/
786
+ call: GenericRuntimeApiMethod<
787
+ Rv,
788
+ (
789
+ origin: AccountId32Like,
790
+ dest: H160,
791
+ value: bigint,
792
+ gasLimit: SpWeightsWeightV2Weight | undefined,
793
+ storageDepositLimit: bigint | undefined,
794
+ inputData: BytesLike,
795
+ ) => Promise<PalletRevivePrimitivesContractResult>
796
+ >;
797
+
798
+ /**
799
+ * Instantiate a new contract.
800
+ *
801
+ * See `[crate::Pallet::bare_instantiate]`.
802
+ *
803
+ * @callname: ReviveApi_instantiate
804
+ * @param {AccountId32Like} origin
805
+ * @param {bigint} value
806
+ * @param {SpWeightsWeightV2Weight | undefined} gas_limit
807
+ * @param {bigint | undefined} storage_deposit_limit
808
+ * @param {PalletRevivePrimitivesCode} code
809
+ * @param {BytesLike} data
810
+ * @param {FixedBytes<32> | undefined} salt
811
+ **/
812
+ instantiate: GenericRuntimeApiMethod<
813
+ Rv,
814
+ (
815
+ origin: AccountId32Like,
816
+ value: bigint,
817
+ gasLimit: SpWeightsWeightV2Weight | undefined,
818
+ storageDepositLimit: bigint | undefined,
819
+ code: PalletRevivePrimitivesCode,
820
+ data: BytesLike,
821
+ salt?: FixedBytes<32> | undefined,
822
+ ) => Promise<PalletRevivePrimitivesContractResultInstantiateReturnValue>
823
+ >;
824
+
825
+ /**
826
+ * Perform an Ethereum call.
827
+ *
828
+ * See [`crate::Pallet::bare_eth_transact`]
829
+ *
830
+ * @callname: ReviveApi_eth_transact
831
+ * @param {PalletReviveEvmApiRpcTypesGenGenericTransaction} tx
832
+ **/
833
+ ethTransact: GenericRuntimeApiMethod<
834
+ Rv,
835
+ (
836
+ tx: PalletReviveEvmApiRpcTypesGenGenericTransaction,
837
+ ) => Promise<Result<PalletRevivePrimitivesEthTransactInfo, PalletRevivePrimitivesEthTransactError>>
838
+ >;
839
+
840
+ /**
841
+ * Upload new code without instantiating a contract from it.
842
+ *
843
+ * See [`crate::Pallet::bare_upload_code`].
844
+ *
845
+ * @callname: ReviveApi_upload_code
846
+ * @param {AccountId32Like} origin
847
+ * @param {BytesLike} code
848
+ * @param {bigint | undefined} storage_deposit_limit
849
+ **/
850
+ uploadCode: GenericRuntimeApiMethod<
851
+ Rv,
852
+ (
853
+ origin: AccountId32Like,
854
+ code: BytesLike,
855
+ storageDepositLimit?: bigint | undefined,
856
+ ) => Promise<Result<PalletRevivePrimitivesCodeUploadReturnValue, DispatchError>>
857
+ >;
858
+
859
+ /**
860
+ * Query a given storage key in a given contract.
861
+ *
862
+ * Returns `Ok(Some(Vec<u8>))` if the storage value exists under the given key in the
863
+ * specified account and `Ok(None)` if it doesn't. If the account specified by the address
864
+ * doesn't exist, or doesn't have a contract then `Err` is returned.
865
+ *
866
+ * @callname: ReviveApi_get_storage
867
+ * @param {H160} address
868
+ * @param {FixedBytes<32>} key
869
+ **/
870
+ getStorage: GenericRuntimeApiMethod<
871
+ Rv,
872
+ (
873
+ address: H160,
874
+ key: FixedBytes<32>,
875
+ ) => Promise<Result<Bytes | undefined, PalletRevivePrimitivesContractAccessError>>
876
+ >;
877
+
878
+ /**
879
+ * Traces the execution of an entire block and returns call traces.
880
+ *
881
+ * This is intended to be called through `state_call` to replay the block from the
882
+ * parent block.
883
+ *
884
+ * See eth-rpc `debug_traceBlockByNumber` for usage.
885
+ *
886
+ * @callname: ReviveApi_trace_block
887
+ * @param {SpRuntimeBlock} block
888
+ * @param {PalletReviveEvmApiDebugRpcTypesTracerType} config
889
+ **/
890
+ traceBlock: GenericRuntimeApiMethod<
891
+ Rv,
892
+ (
893
+ block: SpRuntimeBlock,
894
+ config: PalletReviveEvmApiDebugRpcTypesTracerType,
895
+ ) => Promise<Array<[number, PalletReviveEvmApiDebugRpcTypesTrace]>>
896
+ >;
897
+
898
+ /**
899
+ * Traces the execution of a specific transaction within a block.
900
+ *
901
+ * This is intended to be called through `state_call` to replay the block from the
902
+ * parent hash up to the transaction.
903
+ *
904
+ * See eth-rpc `debug_traceTransaction` for usage.
905
+ *
906
+ * @callname: ReviveApi_trace_tx
907
+ * @param {SpRuntimeBlock} block
908
+ * @param {number} tx_index
909
+ * @param {PalletReviveEvmApiDebugRpcTypesTracerType} config
910
+ **/
911
+ traceTx: GenericRuntimeApiMethod<
912
+ Rv,
913
+ (
914
+ block: SpRuntimeBlock,
915
+ txIndex: number,
916
+ config: PalletReviveEvmApiDebugRpcTypesTracerType,
917
+ ) => Promise<PalletReviveEvmApiDebugRpcTypesTrace | undefined>
918
+ >;
919
+
920
+ /**
921
+ * Dry run and return the trace of the given call.
922
+ *
923
+ * See eth-rpc `debug_traceCall` for usage.
924
+ *
925
+ * @callname: ReviveApi_trace_call
926
+ * @param {PalletReviveEvmApiRpcTypesGenGenericTransaction} tx
927
+ * @param {PalletReviveEvmApiDebugRpcTypesTracerType} config
928
+ **/
929
+ traceCall: GenericRuntimeApiMethod<
930
+ Rv,
931
+ (
932
+ tx: PalletReviveEvmApiRpcTypesGenGenericTransaction,
933
+ config: PalletReviveEvmApiDebugRpcTypesTracerType,
934
+ ) => Promise<Result<PalletReviveEvmApiDebugRpcTypesTrace, PalletRevivePrimitivesEthTransactError>>
935
+ >;
936
+
721
937
  /**
722
938
  * Generic runtime api call
723
939
  **/