@dedot/chaintypes 0.97.0 → 0.99.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.97.0",
3
+ "version": "0.99.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": "d7eca2ab18e1e83fd127f623513441e1c868a500",
22
+ "gitHead": "8c261364aec3011edb104665e1204dfbb8d848ce",
23
23
  "module": "./index.js",
24
24
  "types": "./index.d.ts",
25
25
  "exports": {
@@ -1,7 +1,16 @@
1
1
  // Generated by dedot cli
2
2
 
3
3
  import type { GenericChainConsts, RpcVersion } from 'dedot/types';
4
- import type { RuntimeVersion, Perbill, FixedBytes, Permill, Percent, Perquintill, Bytes } from 'dedot/codecs';
4
+ import type {
5
+ RuntimeVersion,
6
+ Perbill,
7
+ FixedBytes,
8
+ Permill,
9
+ AccountId32,
10
+ Percent,
11
+ Perquintill,
12
+ Bytes,
13
+ } from 'dedot/codecs';
5
14
  import type {
6
15
  FrameSystemLimitsBlockWeights,
7
16
  FrameSystemLimitsBlockLength,
@@ -12,7 +21,7 @@ import type {
12
21
  PalletContractsEnvironment,
13
22
  PalletContractsApiVersion,
14
23
  PalletNftsBitFlagsPalletFeature,
15
- PalletReferendaTrackInfo,
24
+ PalletReferendaTrackDetailsStr,
16
25
  FrameSupportTokensFungibleUnionOfNativeOrWithId,
17
26
  } from './types.js';
18
27
 
@@ -662,6 +671,11 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
662
671
  **/
663
672
  payoutPeriod: number;
664
673
 
674
+ /**
675
+ * Gets this pallet's derived pot account.
676
+ **/
677
+ potAccount: AccountId32;
678
+
665
679
  /**
666
680
  * Generic pallet constant
667
681
  **/
@@ -1163,7 +1177,12 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
1163
1177
  bountyDepositPayoutDelay: number;
1164
1178
 
1165
1179
  /**
1166
- * Bounty duration in blocks.
1180
+ * The time limit for a curator to act before a bounty expires.
1181
+ *
1182
+ * The period that starts when a curator is approved, during which they must execute or
1183
+ * update the bounty via `extend_bounty_expiry`. If missed, the bounty expires, and the
1184
+ * curator may be slashed. If `BlockNumberFor::MAX`, bounties stay active indefinitely,
1185
+ * removing the need for `extend_bounty_expiry`.
1167
1186
  **/
1168
1187
  bountyUpdatePeriod: number;
1169
1188
 
@@ -1858,9 +1877,11 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
1858
1877
  alarmInterval: number;
1859
1878
 
1860
1879
  /**
1861
- * Information concerning the different referendum tracks.
1880
+ * A list of tracks.
1881
+ *
1882
+ * Note: if the tracks are dynamic, the value in the static metadata might be inaccurate.
1862
1883
  **/
1863
- tracks: Array<[number, PalletReferendaTrackInfo]>;
1884
+ tracks: Array<[number, PalletReferendaTrackDetailsStr]>;
1864
1885
 
1865
1886
  /**
1866
1887
  * Generic pallet constant
@@ -2030,9 +2051,11 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
2030
2051
  alarmInterval: number;
2031
2052
 
2032
2053
  /**
2033
- * Information concerning the different referendum tracks.
2054
+ * A list of tracks.
2055
+ *
2056
+ * Note: if the tracks are dynamic, the value in the static metadata might be inaccurate.
2034
2057
  **/
2035
- tracks: Array<[number, PalletReferendaTrackInfo]>;
2058
+ tracks: Array<[number, PalletReferendaTrackDetailsStr]>;
2036
2059
 
2037
2060
  /**
2038
2061
  * Generic pallet constant
@@ -2310,8 +2333,19 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
2310
2333
  * Maximum number of system cores.
2311
2334
  **/
2312
2335
  maxReservedCores: number;
2336
+
2337
+ /**
2338
+ * Given that we are performing all auto-renewals in a single block, it has to be limited.
2339
+ **/
2313
2340
  maxAutoRenewals: number;
2314
2341
 
2342
+ /**
2343
+ * The smallest amount of credits a user can purchase.
2344
+ *
2345
+ * Needed to prevent spam attacks.
2346
+ **/
2347
+ minimumCreditPurchase: bigint;
2348
+
2315
2349
  /**
2316
2350
  * Generic pallet constant
2317
2351
  **/
@@ -2451,9 +2485,8 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
2451
2485
 
2452
2486
  /**
2453
2487
  * The percentage of the storage deposit that should be held for using a code hash.
2454
- * Instantiating a contract, or calling [`chain_extension::Ext::lock_delegate_dependency`]
2455
- * protects the code from being removed. In order to prevent abuse these actions are
2456
- * protected with a percentage of the code deposit.
2488
+ * Instantiating a contract, protects the code from being removed. In order to prevent
2489
+ * abuse these actions are protected with a percentage of the code deposit.
2457
2490
  **/
2458
2491
  codeHashLockupDepositPercent: Perbill;
2459
2492
 
@@ -2482,7 +2515,6 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
2482
2515
  * The ratio between the decimal representation of the native token and the ETH token.
2483
2516
  **/
2484
2517
  nativeToEthRatio: number;
2485
- apiVersion: number;
2486
2518
 
2487
2519
  /**
2488
2520
  * Generic pallet constant
@@ -2498,4 +2530,57 @@ export interface ChainConsts<Rv extends RpcVersion> extends GenericChainConsts<R
2498
2530
  **/
2499
2531
  [name: string]: any;
2500
2532
  };
2533
+ /**
2534
+ * Pallet `DelegatedStaking`'s constants
2535
+ **/
2536
+ delegatedStaking: {
2537
+ /**
2538
+ * Injected identifier for the pallet.
2539
+ **/
2540
+ palletId: FrameSupportPalletId;
2541
+
2542
+ /**
2543
+ * Fraction of the slash that is rewarded to the caller of pending slash to the agent.
2544
+ **/
2545
+ slashRewardFraction: Perbill;
2546
+
2547
+ /**
2548
+ * Generic pallet constant
2549
+ **/
2550
+ [name: string]: any;
2551
+ };
2552
+ /**
2553
+ * Pallet `AssetRewards`'s constants
2554
+ **/
2555
+ assetRewards: {
2556
+ /**
2557
+ * The pallet's unique identifier, used to derive the pool's account ID.
2558
+ *
2559
+ * The account ID is derived once during pool creation and stored in the storage.
2560
+ **/
2561
+ palletId: FrameSupportPalletId;
2562
+
2563
+ /**
2564
+ * Generic pallet constant
2565
+ **/
2566
+ [name: string]: any;
2567
+ };
2568
+ /**
2569
+ * Pallet `AssetsFreezer`'s constants
2570
+ **/
2571
+ assetsFreezer: {
2572
+ /**
2573
+ * Generic pallet constant
2574
+ **/
2575
+ [name: string]: any;
2576
+ };
2577
+ /**
2578
+ * Pallet `MetaTx`'s constants
2579
+ **/
2580
+ metaTx: {
2581
+ /**
2582
+ * Generic pallet constant
2583
+ **/
2584
+ [name: string]: any;
2585
+ };
2501
2586
  }
@@ -454,6 +454,22 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
454
454
  **/
455
455
  VirtualStakerNotAllowed: GenericPalletError<Rv>;
456
456
 
457
+ /**
458
+ * Stash could not be reaped as other pallet might depend on it.
459
+ **/
460
+ CannotReapStash: GenericPalletError<Rv>;
461
+
462
+ /**
463
+ * The stake of this account is already migrated to `Fungible` holds.
464
+ **/
465
+ AlreadyMigrated: GenericPalletError<Rv>;
466
+
467
+ /**
468
+ * Account is restricted from participation in staking. This may happen if the account is
469
+ * staking in another way already, such as via pool.
470
+ **/
471
+ Restricted: GenericPalletError<Rv>;
472
+
457
473
  /**
458
474
  * Generic pallet error
459
475
  **/
@@ -1908,12 +1924,13 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
1908
1924
  SenderInSignatories: GenericPalletError<Rv>;
1909
1925
 
1910
1926
  /**
1911
- * Multisig operation not found when attempting to cancel.
1927
+ * Multisig operation not found in storage.
1912
1928
  **/
1913
1929
  NotFound: GenericPalletError<Rv>;
1914
1930
 
1915
1931
  /**
1916
- * Only the account that originally created the multisig is able to cancel it.
1932
+ * Only the account that originally created the multisig is able to cancel it or update
1933
+ * its deposits.
1917
1934
  **/
1918
1935
  NotOwner: GenericPalletError<Rv>;
1919
1936
 
@@ -2168,6 +2185,16 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
2168
2185
  **/
2169
2186
  BadAssetId: GenericPalletError<Rv>;
2170
2187
 
2188
+ /**
2189
+ * The asset cannot be destroyed because some accounts for this asset contain freezes.
2190
+ **/
2191
+ ContainsFreezes: GenericPalletError<Rv>;
2192
+
2193
+ /**
2194
+ * The asset cannot be destroyed because some accounts for this asset contain holds.
2195
+ **/
2196
+ ContainsHolds: GenericPalletError<Rv>;
2197
+
2171
2198
  /**
2172
2199
  * Generic pallet error
2173
2200
  **/
@@ -2285,6 +2312,16 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
2285
2312
  **/
2286
2313
  BadAssetId: GenericPalletError<Rv>;
2287
2314
 
2315
+ /**
2316
+ * The asset cannot be destroyed because some accounts for this asset contain freezes.
2317
+ **/
2318
+ ContainsFreezes: GenericPalletError<Rv>;
2319
+
2320
+ /**
2321
+ * The asset cannot be destroyed because some accounts for this asset contain holds.
2322
+ **/
2323
+ ContainsHolds: GenericPalletError<Rv>;
2324
+
2288
2325
  /**
2289
2326
  * Generic pallet error
2290
2327
  **/
@@ -3686,6 +3723,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
3686
3723
  **/
3687
3724
  NothingToSlash: GenericPalletError<Rv>;
3688
3725
 
3726
+ /**
3727
+ * The slash amount is too low to be applied.
3728
+ **/
3729
+ SlashTooLow: GenericPalletError<Rv>;
3730
+
3689
3731
  /**
3690
3732
  * The pool or member delegation has already migrated to delegate stake.
3691
3733
  **/
@@ -3701,6 +3743,12 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
3701
3743
  **/
3702
3744
  NotSupported: GenericPalletError<Rv>;
3703
3745
 
3746
+ /**
3747
+ * Account is restricted from participation in pools. This may happen if the account is
3748
+ * staking in another way already.
3749
+ **/
3750
+ Restricted: GenericPalletError<Rv>;
3751
+
3704
3752
  /**
3705
3753
  * Generic pallet error
3706
3754
  **/
@@ -4260,6 +4308,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
4260
4308
  **/
4261
4309
  TooManyLeases: GenericPalletError<Rv>;
4262
4310
 
4311
+ /**
4312
+ * The lease does not exist.
4313
+ **/
4314
+ LeaseNotFound: GenericPalletError<Rv>;
4315
+
4263
4316
  /**
4264
4317
  * The revenue for the Instantaneous Core Sales of this period is not (yet) known and thus
4265
4318
  * this operation cannot proceed.
@@ -4337,6 +4390,17 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
4337
4390
  **/
4338
4391
  AutoRenewalNotEnabled: GenericPalletError<Rv>;
4339
4392
 
4393
+ /**
4394
+ * Attempted to force remove an assignment that doesn't exist.
4395
+ **/
4396
+ AssignmentNotFound: GenericPalletError<Rv>;
4397
+
4398
+ /**
4399
+ * Needed to prevent spam attacks.The amount of credits the user attempted to purchase is
4400
+ * below `T::MinimumCreditPurchase`.
4401
+ **/
4402
+ CreditPurchaseTooSmall: GenericPalletError<Rv>;
4403
+
4340
4404
  /**
4341
4405
  * Generic pallet error
4342
4406
  **/
@@ -4603,6 +4667,11 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
4603
4667
  **/
4604
4668
  BalanceConversionFailed: GenericPalletError<Rv>;
4605
4669
 
4670
+ /**
4671
+ * Failed to convert an EVM balance to a native balance.
4672
+ **/
4673
+ DecimalPrecisionLoss: GenericPalletError<Rv>;
4674
+
4606
4675
  /**
4607
4676
  * Immutable data can only be set during deploys and only be read during calls.
4608
4677
  * Additionally, it is only valid to set the data once and it must not be empty.
@@ -4621,6 +4690,211 @@ export interface ChainErrors<Rv extends RpcVersion> extends GenericChainErrors<R
4621
4690
  **/
4622
4691
  AccountAlreadyMapped: GenericPalletError<Rv>;
4623
4692
 
4693
+ /**
4694
+ * The transaction used to dry-run a contract is invalid.
4695
+ **/
4696
+ InvalidGenericTransaction: GenericPalletError<Rv>;
4697
+
4698
+ /**
4699
+ * The refcount of a code either over or underflowed.
4700
+ **/
4701
+ RefcountOverOrUnderflow: GenericPalletError<Rv>;
4702
+
4703
+ /**
4704
+ * Unsupported precompile address
4705
+ **/
4706
+ UnsupportedPrecompileAddress: GenericPalletError<Rv>;
4707
+
4708
+ /**
4709
+ * Precompile Error
4710
+ **/
4711
+ PrecompileFailure: GenericPalletError<Rv>;
4712
+
4713
+ /**
4714
+ * Generic pallet error
4715
+ **/
4716
+ [error: string]: GenericPalletError<Rv>;
4717
+ };
4718
+ /**
4719
+ * Pallet `DelegatedStaking`'s errors
4720
+ **/
4721
+ delegatedStaking: {
4722
+ /**
4723
+ * The account cannot perform this operation.
4724
+ **/
4725
+ NotAllowed: GenericPalletError<Rv>;
4726
+
4727
+ /**
4728
+ * An existing staker cannot perform this action.
4729
+ **/
4730
+ AlreadyStaking: GenericPalletError<Rv>;
4731
+
4732
+ /**
4733
+ * Reward Destination cannot be same as `Agent` account.
4734
+ **/
4735
+ InvalidRewardDestination: GenericPalletError<Rv>;
4736
+
4737
+ /**
4738
+ * Delegation conditions are not met.
4739
+ *
4740
+ * Possible issues are
4741
+ * 1) Cannot delegate to self,
4742
+ * 2) Cannot delegate to multiple delegates.
4743
+ **/
4744
+ InvalidDelegation: GenericPalletError<Rv>;
4745
+
4746
+ /**
4747
+ * The account does not have enough funds to perform the operation.
4748
+ **/
4749
+ NotEnoughFunds: GenericPalletError<Rv>;
4750
+
4751
+ /**
4752
+ * Not an existing `Agent` account.
4753
+ **/
4754
+ NotAgent: GenericPalletError<Rv>;
4755
+
4756
+ /**
4757
+ * Not a Delegator account.
4758
+ **/
4759
+ NotDelegator: GenericPalletError<Rv>;
4760
+
4761
+ /**
4762
+ * Some corruption in internal state.
4763
+ **/
4764
+ BadState: GenericPalletError<Rv>;
4765
+
4766
+ /**
4767
+ * Unapplied pending slash restricts operation on `Agent`.
4768
+ **/
4769
+ UnappliedSlash: GenericPalletError<Rv>;
4770
+
4771
+ /**
4772
+ * `Agent` has no pending slash to be applied.
4773
+ **/
4774
+ NothingToSlash: GenericPalletError<Rv>;
4775
+
4776
+ /**
4777
+ * Failed to withdraw amount from Core Staking.
4778
+ **/
4779
+ WithdrawFailed: GenericPalletError<Rv>;
4780
+
4781
+ /**
4782
+ * Operation not supported by this pallet.
4783
+ **/
4784
+ NotSupported: GenericPalletError<Rv>;
4785
+
4786
+ /**
4787
+ * Generic pallet error
4788
+ **/
4789
+ [error: string]: GenericPalletError<Rv>;
4790
+ };
4791
+ /**
4792
+ * Pallet `AssetRewards`'s errors
4793
+ **/
4794
+ assetRewards: {
4795
+ /**
4796
+ * The staker does not have enough tokens to perform the operation.
4797
+ **/
4798
+ NotEnoughTokens: GenericPalletError<Rv>;
4799
+
4800
+ /**
4801
+ * An operation was attempted on a non-existent pool.
4802
+ **/
4803
+ NonExistentPool: GenericPalletError<Rv>;
4804
+
4805
+ /**
4806
+ * An operation was attempted for a non-existent staker.
4807
+ **/
4808
+ NonExistentStaker: GenericPalletError<Rv>;
4809
+
4810
+ /**
4811
+ * An operation was attempted with a non-existent asset.
4812
+ **/
4813
+ NonExistentAsset: GenericPalletError<Rv>;
4814
+
4815
+ /**
4816
+ * There was an error converting a block number.
4817
+ **/
4818
+ BlockNumberConversionError: GenericPalletError<Rv>;
4819
+
4820
+ /**
4821
+ * The expiry block must be in the future.
4822
+ **/
4823
+ ExpiryBlockMustBeInTheFuture: GenericPalletError<Rv>;
4824
+
4825
+ /**
4826
+ * Insufficient funds to create the freeze.
4827
+ **/
4828
+ InsufficientFunds: GenericPalletError<Rv>;
4829
+
4830
+ /**
4831
+ * The expiry block can be only extended.
4832
+ **/
4833
+ ExpiryCut: GenericPalletError<Rv>;
4834
+
4835
+ /**
4836
+ * The reward rate per block can be only increased.
4837
+ **/
4838
+ RewardRateCut: GenericPalletError<Rv>;
4839
+
4840
+ /**
4841
+ * The pool still has staked tokens or rewards.
4842
+ **/
4843
+ NonEmptyPool: GenericPalletError<Rv>;
4844
+
4845
+ /**
4846
+ * Generic pallet error
4847
+ **/
4848
+ [error: string]: GenericPalletError<Rv>;
4849
+ };
4850
+ /**
4851
+ * Pallet `AssetsFreezer`'s errors
4852
+ **/
4853
+ assetsFreezer: {
4854
+ /**
4855
+ * Number of freezes on an account would exceed `MaxFreezes`.
4856
+ **/
4857
+ TooManyFreezes: GenericPalletError<Rv>;
4858
+
4859
+ /**
4860
+ * Generic pallet error
4861
+ **/
4862
+ [error: string]: GenericPalletError<Rv>;
4863
+ };
4864
+ /**
4865
+ * Pallet `MetaTx`'s errors
4866
+ **/
4867
+ metaTx: {
4868
+ /**
4869
+ * Invalid proof (e.g. signature).
4870
+ **/
4871
+ BadProof: GenericPalletError<Rv>;
4872
+
4873
+ /**
4874
+ * The meta transaction is not yet valid (e.g. nonce too high).
4875
+ **/
4876
+ Future: GenericPalletError<Rv>;
4877
+
4878
+ /**
4879
+ * The meta transaction is outdated (e.g. nonce too low).
4880
+ **/
4881
+ Stale: GenericPalletError<Rv>;
4882
+
4883
+ /**
4884
+ * The meta transactions's birth block is ancient.
4885
+ **/
4886
+ AncientBirthBlock: GenericPalletError<Rv>;
4887
+
4888
+ /**
4889
+ * The transaction extension did not authorize any origin.
4890
+ **/
4891
+ UnknownOrigin: GenericPalletError<Rv>;
4892
+
4893
+ /**
4894
+ * The meta transaction is invalid.
4895
+ **/
4896
+ Invalid: GenericPalletError<Rv>;
4897
+
4624
4898
  /**
4625
4899
  * Generic pallet error
4626
4900
  **/