@dedot/chaintypes 0.216.0 → 0.218.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.
@@ -52,7 +52,7 @@ interface ChainKnownTypes extends GenericChainKnownTypes {
52
52
 
53
53
  /**
54
54
  * @name: HydrationApi
55
- * @specVersion: 378
55
+ * @specVersion: 379
56
56
  **/
57
57
  export interface HydrationApi extends GenericSubstrateApi {
58
58
  rpc: ChainJsonRpcApis;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/chaintypes",
3
- "version": "0.216.0",
3
+ "version": "0.218.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": "9842149c615f11370f0df22292aae4fe929bdaf2",
28
+ "gitHead": "19468bf82e226a25c054f925e01992ce4a21d929",
29
29
  "module": "./index.js",
30
30
  "types": "./index.d.ts",
31
31
  "exports": {
@@ -1088,6 +1088,27 @@ export interface ChainConsts extends GenericChainConsts {
1088
1088
  **/
1089
1089
  debugEnabled: boolean;
1090
1090
 
1091
+ /**
1092
+ * This determines the relative scale of our gas price and gas estimates.
1093
+ *
1094
+ * By default, the gas price (in wei) is `FeeInfo::next_fee_multiplier()` multiplied by
1095
+ * `NativeToEthRatio`. `GasScale` allows to scale this value: the actual gas price is the
1096
+ * default gas price multiplied by `GasScale`.
1097
+ *
1098
+ * As a consequence, gas cost (gas estimates and actual gas usage during transaction) is
1099
+ * scaled down by the same factor. Thus, the total transaction cost is not affected by
1100
+ * `GasScale` – apart from rounding differences: the transaction cost is always a multiple
1101
+ * of the gas price and is derived by rounded up, so that with higher `GasScales` this can
1102
+ * lead to higher gas cost as the rounding difference would be larger.
1103
+ *
1104
+ * The main purpose of changing the `GasScale` is to tune the gas cost so that it is closer
1105
+ * to standard EVM gas cost and contracts will not run out of gas when tools or code
1106
+ * assume hard coded gas limits.
1107
+ *
1108
+ * Requirement: `GasScale` must not be 0
1109
+ **/
1110
+ gasScale: number;
1111
+
1091
1112
  /**
1092
1113
  * Generic pallet constant
1093
1114
  **/
@@ -1189,9 +1210,25 @@ export interface ChainConsts extends GenericChainConsts {
1189
1210
 
1190
1211
  /**
1191
1212
  * Number of eras that staked funds must remain bonded for.
1213
+ *
1214
+ * This is the bonding duration for validators. Nominators may have a shorter bonding
1215
+ * duration when [`AreNominatorsSlashable`] is set to `false` (see
1216
+ * [`StakingInterface::nominator_bonding_duration`]).
1192
1217
  **/
1193
1218
  bondingDuration: number;
1194
1219
 
1220
+ /**
1221
+ * Number of eras nominators must wait to unbond when they are not slashable.
1222
+ *
1223
+ * This duration is used for nominators when [`AreNominatorsSlashable`] is `false`.
1224
+ * When nominators are slashable, they use the full [`Config::BondingDuration`] to ensure
1225
+ * slashes can be applied during the unbonding period.
1226
+ *
1227
+ * Setting this to a lower value (e.g., 1 era) allows for faster withdrawals when
1228
+ * nominators are not subject to slashing risk.
1229
+ **/
1230
+ nominatorFastUnbondDuration: number;
1231
+
1195
1232
  /**
1196
1233
  * Number of eras that slashes are deferred by, after computation.
1197
1234
  *
@@ -1631,6 +1668,47 @@ export interface ChainConsts extends GenericChainConsts {
1631
1668
  **/
1632
1669
  [name: string]: any;
1633
1670
  };
1671
+ /**
1672
+ * Pallet `MultiAssetBounties`'s constants
1673
+ **/
1674
+ multiAssetBounties: {
1675
+ /**
1676
+ * Minimum value for a bounty.
1677
+ **/
1678
+ bountyValueMinimum: bigint;
1679
+
1680
+ /**
1681
+ * Minimum value for a child-bounty.
1682
+ **/
1683
+ childBountyValueMinimum: bigint;
1684
+
1685
+ /**
1686
+ * Maximum number of child bounties that can be added to a parent bounty.
1687
+ **/
1688
+ maxActiveChildBountyCount: number;
1689
+
1690
+ /**
1691
+ * Generic pallet constant
1692
+ **/
1693
+ [name: string]: any;
1694
+ };
1695
+ /**
1696
+ * Pallet `Dap`'s constants
1697
+ **/
1698
+ dap: {
1699
+ /**
1700
+ * The pallet ID used to derive the buffer account.
1701
+ *
1702
+ * Each runtime should configure a unique ID to avoid collisions if multiple
1703
+ * DAP instances are used.
1704
+ **/
1705
+ palletId: FrameSupportPalletId;
1706
+
1707
+ /**
1708
+ * Generic pallet constant
1709
+ **/
1710
+ [name: string]: any;
1711
+ };
1634
1712
  /**
1635
1713
  * Pallet `AssetConversionMigration`'s constants
1636
1714
  **/
@@ -2177,6 +2177,34 @@ export interface ChainErrors extends GenericChainErrors {
2177
2177
  **/
2178
2178
  EvmConstructedFromHash: GenericPalletError;
2179
2179
 
2180
+ /**
2181
+ * The contract does not have enough balance to refund the storage deposit.
2182
+ *
2183
+ * This is a bug and should never happen. It means the accounting got out of sync.
2184
+ **/
2185
+ StorageRefundNotEnoughFunds: GenericPalletError;
2186
+
2187
+ /**
2188
+ * This means there are locks on the contracts storage deposit that prevents refunding it.
2189
+ *
2190
+ * This would be the case if the contract used its storage deposits for governance
2191
+ * or other pallets that allow creating locks over held balance.
2192
+ **/
2193
+ StorageRefundLocked: GenericPalletError;
2194
+
2195
+ /**
2196
+ * Called a pre-compile that is not allowed to be delegate called.
2197
+ *
2198
+ * Some pre-compile functions will trap the caller context if being delegate
2199
+ * called or if their caller was being delegate called.
2200
+ **/
2201
+ PrecompileDelegateDenied: GenericPalletError;
2202
+
2203
+ /**
2204
+ * ECDSA public key recovery failed. Most probably wrong recovery id or signature.
2205
+ **/
2206
+ EcdsaRecoveryFailed: GenericPalletError;
2207
+
2180
2208
  /**
2181
2209
  * Generic pallet error
2182
2210
  **/
@@ -3131,6 +3159,104 @@ export interface ChainErrors extends GenericChainErrors {
3131
3159
  **/
3132
3160
  [error: string]: GenericPalletError;
3133
3161
  };
3162
+ /**
3163
+ * Pallet `MultiAssetBounties`'s errors
3164
+ **/
3165
+ multiAssetBounties: {
3166
+ /**
3167
+ * No child-/bounty at that index.
3168
+ **/
3169
+ InvalidIndex: GenericPalletError;
3170
+
3171
+ /**
3172
+ * The reason given is just too big.
3173
+ **/
3174
+ ReasonTooBig: GenericPalletError;
3175
+
3176
+ /**
3177
+ * Invalid child-/bounty value.
3178
+ **/
3179
+ InvalidValue: GenericPalletError;
3180
+
3181
+ /**
3182
+ * The balance of the asset kind is not convertible to the balance of the native asset for
3183
+ * asserting the origin permissions.
3184
+ **/
3185
+ FailedToConvertBalance: GenericPalletError;
3186
+
3187
+ /**
3188
+ * The child-/bounty status is unexpected.
3189
+ **/
3190
+ UnexpectedStatus: GenericPalletError;
3191
+
3192
+ /**
3193
+ * Require child-/bounty curator.
3194
+ **/
3195
+ RequireCurator: GenericPalletError;
3196
+
3197
+ /**
3198
+ * The spend origin is valid but the amount it is allowed to spend is lower than the
3199
+ * requested amount.
3200
+ **/
3201
+ InsufficientPermission: GenericPalletError;
3202
+
3203
+ /**
3204
+ * There was issue with funding the child-/bounty.
3205
+ **/
3206
+ FundingError: GenericPalletError;
3207
+
3208
+ /**
3209
+ * There was issue with refunding the child-/bounty.
3210
+ **/
3211
+ RefundError: GenericPalletError;
3212
+ PayoutError: GenericPalletError;
3213
+
3214
+ /**
3215
+ * Child-/bounty funding has not concluded yet.
3216
+ **/
3217
+ FundingInconclusive: GenericPalletError;
3218
+
3219
+ /**
3220
+ * Child-/bounty refund has not concluded yet.
3221
+ **/
3222
+ RefundInconclusive: GenericPalletError;
3223
+
3224
+ /**
3225
+ * Child-/bounty payout has not concluded yet.
3226
+ **/
3227
+ PayoutInconclusive: GenericPalletError;
3228
+
3229
+ /**
3230
+ * The child-/bounty or funding source account could not be derived from the indexes and
3231
+ * asset kind.
3232
+ **/
3233
+ FailedToConvertSource: GenericPalletError;
3234
+
3235
+ /**
3236
+ * The parent bounty cannot be closed because it has active child bounties.
3237
+ **/
3238
+ HasActiveChildBounty: GenericPalletError;
3239
+
3240
+ /**
3241
+ * Number of child bounties exceeds limit `MaxActiveChildBountyCount`.
3242
+ **/
3243
+ TooManyChildBounties: GenericPalletError;
3244
+
3245
+ /**
3246
+ * The parent bounty value is not enough to add new child-bounty.
3247
+ **/
3248
+ InsufficientBountyValue: GenericPalletError;
3249
+
3250
+ /**
3251
+ * The preimage does not exist.
3252
+ **/
3253
+ PreimageNotExist: GenericPalletError;
3254
+
3255
+ /**
3256
+ * Generic pallet error
3257
+ **/
3258
+ [error: string]: GenericPalletError;
3259
+ };
3134
3260
  /**
3135
3261
  * Pallet `AssetConversionMigration`'s errors
3136
3262
  **/
@@ -4409,6 +4409,125 @@ export interface ChainEvents extends GenericChainEvents {
4409
4409
  **/
4410
4410
  [prop: string]: GenericPalletEvent;
4411
4411
  };
4412
+ /**
4413
+ * Pallet `MultiAssetBounties`'s events
4414
+ **/
4415
+ multiAssetBounties: {
4416
+ /**
4417
+ * A new bounty was created and funding has been initiated.
4418
+ **/
4419
+ BountyCreated: GenericPalletEvent<'MultiAssetBounties', 'BountyCreated', { index: number }>;
4420
+
4421
+ /**
4422
+ * A new child-bounty was created and funding has been initiated.
4423
+ **/
4424
+ ChildBountyCreated: GenericPalletEvent<
4425
+ 'MultiAssetBounties',
4426
+ 'ChildBountyCreated',
4427
+ { index: number; childIndex: number }
4428
+ >;
4429
+
4430
+ /**
4431
+ * The curator accepted role and child-/bounty became active.
4432
+ **/
4433
+ BountyBecameActive: GenericPalletEvent<
4434
+ 'MultiAssetBounties',
4435
+ 'BountyBecameActive',
4436
+ { index: number; childIndex?: number | undefined; curator: AccountId32 }
4437
+ >;
4438
+
4439
+ /**
4440
+ * A child-/bounty was awarded to a beneficiary.
4441
+ **/
4442
+ BountyAwarded: GenericPalletEvent<
4443
+ 'MultiAssetBounties',
4444
+ 'BountyAwarded',
4445
+ { index: number; childIndex?: number | undefined; beneficiary: ParachainsCommonPayVersionedLocatableAccount }
4446
+ >;
4447
+
4448
+ /**
4449
+ * Payout payment to the beneficiary has concluded successfully.
4450
+ **/
4451
+ BountyPayoutProcessed: GenericPalletEvent<
4452
+ 'MultiAssetBounties',
4453
+ 'BountyPayoutProcessed',
4454
+ {
4455
+ index: number;
4456
+ childIndex?: number | undefined;
4457
+ assetKind: PolkadotRuntimeCommonImplsVersionedLocatableAsset;
4458
+ value: bigint;
4459
+ beneficiary: ParachainsCommonPayVersionedLocatableAccount;
4460
+ }
4461
+ >;
4462
+
4463
+ /**
4464
+ * Funding payment has concluded successfully.
4465
+ **/
4466
+ BountyFundingProcessed: GenericPalletEvent<
4467
+ 'MultiAssetBounties',
4468
+ 'BountyFundingProcessed',
4469
+ { index: number; childIndex?: number | undefined }
4470
+ >;
4471
+
4472
+ /**
4473
+ * Refund payment has concluded successfully.
4474
+ **/
4475
+ BountyRefundProcessed: GenericPalletEvent<
4476
+ 'MultiAssetBounties',
4477
+ 'BountyRefundProcessed',
4478
+ { index: number; childIndex?: number | undefined }
4479
+ >;
4480
+
4481
+ /**
4482
+ * A child-/bounty was cancelled.
4483
+ **/
4484
+ BountyCanceled: GenericPalletEvent<
4485
+ 'MultiAssetBounties',
4486
+ 'BountyCanceled',
4487
+ { index: number; childIndex?: number | undefined }
4488
+ >;
4489
+
4490
+ /**
4491
+ * A child-/bounty curator was unassigned.
4492
+ **/
4493
+ CuratorUnassigned: GenericPalletEvent<
4494
+ 'MultiAssetBounties',
4495
+ 'CuratorUnassigned',
4496
+ { index: number; childIndex?: number | undefined }
4497
+ >;
4498
+
4499
+ /**
4500
+ * A child-/bounty curator was proposed.
4501
+ **/
4502
+ CuratorProposed: GenericPalletEvent<
4503
+ 'MultiAssetBounties',
4504
+ 'CuratorProposed',
4505
+ { index: number; childIndex?: number | undefined; curator: AccountId32 }
4506
+ >;
4507
+
4508
+ /**
4509
+ * A payment failed and can be retried.
4510
+ **/
4511
+ PaymentFailed: GenericPalletEvent<
4512
+ 'MultiAssetBounties',
4513
+ 'PaymentFailed',
4514
+ { index: number; childIndex?: number | undefined; paymentId: bigint }
4515
+ >;
4516
+
4517
+ /**
4518
+ * A payment happened and can be checked.
4519
+ **/
4520
+ Paid: GenericPalletEvent<
4521
+ 'MultiAssetBounties',
4522
+ 'Paid',
4523
+ { index: number; childIndex?: number | undefined; paymentId: bigint }
4524
+ >;
4525
+
4526
+ /**
4527
+ * Generic pallet event
4528
+ **/
4529
+ [prop: string]: GenericPalletEvent;
4530
+ };
4412
4531
  /**
4413
4532
  * Pallet `AssetConversionMigration`'s events
4414
4533
  **/
@@ -54,7 +54,7 @@ interface ChainKnownTypes extends GenericChainKnownTypes {
54
54
 
55
55
  /**
56
56
  * @name: WestendAssetHubApi
57
- * @specVersion: 1021000
57
+ * @specVersion: 1021002
58
58
  **/
59
59
  export interface WestendAssetHubApi extends GenericSubstrateApi {
60
60
  rpc: ChainJsonRpcApis;
@@ -142,6 +142,8 @@ import type {
142
142
  PalletTreasuryProposal,
143
143
  PalletTreasurySpendStatus,
144
144
  PolkadotRuntimeCommonImplsVersionedLocatableAsset,
145
+ PalletMultiAssetBountiesBounty,
146
+ PalletMultiAssetBountiesChildBounty,
145
147
  } from './types.js';
146
148
 
147
149
  export interface ChainStorage extends GenericChainStorage {
@@ -2371,6 +2373,33 @@ export interface ChainStorage extends GenericChainStorage {
2371
2373
  **/
2372
2374
  minCommission: GenericStorageQuery<() => Perbill>;
2373
2375
 
2376
+ /**
2377
+ * Whether nominators are slashable or not.
2378
+ *
2379
+ * - When set to `true` (default), nominators are slashed along with validators and must wait
2380
+ * the full [`Config::BondingDuration`] before withdrawing unbonded funds.
2381
+ * - When set to `false`, nominators are not slashed, and can unbond in
2382
+ * [`Config::NominatorFastUnbondDuration`] eras instead of the full
2383
+ * [`Config::BondingDuration`] (see [`StakingInterface::nominator_bonding_duration`]).
2384
+ *
2385
+ * @param {Callback<boolean> =} callback
2386
+ **/
2387
+ areNominatorsSlashable: GenericStorageQuery<() => boolean>;
2388
+
2389
+ /**
2390
+ * Per-era snapshot of whether nominators are slashable.
2391
+ *
2392
+ * This is copied from [`AreNominatorsSlashable`] at the start of each era. When processing
2393
+ * offences, we use the value from this storage for the offence era to ensure that the
2394
+ * slashing rules at the time of the offence are applied, not the current rules.
2395
+ *
2396
+ * If an entry does not exist for an era, nominators are assumed to be slashable (default).
2397
+ *
2398
+ * @param {number} arg
2399
+ * @param {Callback<boolean | undefined> =} callback
2400
+ **/
2401
+ erasNominatorsSlashable: GenericStorageQuery<(arg: number) => boolean | undefined, number>;
2402
+
2374
2403
  /**
2375
2404
  * Map from all (unlocked) "controller" accounts to the info regarding the staking.
2376
2405
  *
@@ -2421,6 +2450,25 @@ export interface ChainStorage extends GenericChainStorage {
2421
2450
  **/
2422
2451
  maxValidatorsCount: GenericStorageQuery<() => number | undefined>;
2423
2452
 
2453
+ /**
2454
+ * Tracks the last era in which an account was active as a validator (included in the era's
2455
+ * exposure/snapshot).
2456
+ *
2457
+ * This is used to enforce that accounts who were recently validators must wait the full
2458
+ * [`Config::BondingDuration`] before their funds can be withdrawn, even if they switch to
2459
+ * nominator role. This prevents validators from:
2460
+ * 1. Committing a slashable offence in era N
2461
+ * 2. Switching to nominator role
2462
+ * 3. Using the shorter nominator unbonding duration to withdraw funds before being slashed
2463
+ *
2464
+ * Updated when era snapshots are created (in `ErasStakersPaged`/`ErasStakersOverview`).
2465
+ * Cleaned up when the stash is killed (fully withdrawn/reaped).
2466
+ *
2467
+ * @param {AccountId32Like} arg
2468
+ * @param {Callback<number | undefined> =} callback
2469
+ **/
2470
+ lastValidatorEra: GenericStorageQuery<(arg: AccountId32Like) => number | undefined, AccountId32>;
2471
+
2424
2472
  /**
2425
2473
  * The map from nominator stash key to their nomination preferences, namely the validators that
2426
2474
  * they wish to support.
@@ -3561,6 +3609,95 @@ export interface ChainStorage extends GenericChainStorage {
3561
3609
  **/
3562
3610
  [storage: string]: GenericStorageQuery;
3563
3611
  };
3612
+ /**
3613
+ * Pallet `MultiAssetBounties`'s storage queries
3614
+ **/
3615
+ multiAssetBounties: {
3616
+ /**
3617
+ * Number of bounty proposals that have been made.
3618
+ *
3619
+ * @param {Callback<number> =} callback
3620
+ **/
3621
+ bountyCount: GenericStorageQuery<() => number>;
3622
+
3623
+ /**
3624
+ * Bounties that have been made.
3625
+ *
3626
+ * @param {number} arg
3627
+ * @param {Callback<PalletMultiAssetBountiesBounty | undefined> =} callback
3628
+ **/
3629
+ bounties: GenericStorageQuery<(arg: number) => PalletMultiAssetBountiesBounty | undefined, number>;
3630
+
3631
+ /**
3632
+ * Child bounties that have been added.
3633
+ *
3634
+ * Indexed by `(parent_bounty_id, child_bounty_id)`.
3635
+ *
3636
+ * @param {[number, number]} arg
3637
+ * @param {Callback<PalletMultiAssetBountiesChildBounty | undefined> =} callback
3638
+ **/
3639
+ childBounties: GenericStorageQuery<
3640
+ (arg: [number, number]) => PalletMultiAssetBountiesChildBounty | undefined,
3641
+ [number, number]
3642
+ >;
3643
+
3644
+ /**
3645
+ * Number of active child bounties per parent bounty.
3646
+ *
3647
+ * Indexed by `parent_bounty_id`.
3648
+ *
3649
+ * @param {number} arg
3650
+ * @param {Callback<number> =} callback
3651
+ **/
3652
+ childBountiesPerParent: GenericStorageQuery<(arg: number) => number, number>;
3653
+
3654
+ /**
3655
+ * Number of total child bounties per parent bounty, including completed bounties.
3656
+ *
3657
+ * Indexed by `parent_bounty_id`.
3658
+ *
3659
+ * @param {number} arg
3660
+ * @param {Callback<number> =} callback
3661
+ **/
3662
+ totalChildBountiesPerParent: GenericStorageQuery<(arg: number) => number, number>;
3663
+
3664
+ /**
3665
+ * The cumulative child-bounty value for each parent bounty. To be subtracted from the parent
3666
+ * bounty payout when awarding bounty.
3667
+ *
3668
+ * Indexed by `parent_bounty_id`.
3669
+ *
3670
+ * @param {number} arg
3671
+ * @param {Callback<bigint> =} callback
3672
+ **/
3673
+ childBountiesValuePerParent: GenericStorageQuery<(arg: number) => bigint, number>;
3674
+
3675
+ /**
3676
+ * The consideration cost incurred by the child-/bounty curator for committing to the role.
3677
+ *
3678
+ * Determined by [`pallet::Config::Consideration`]. It is created when the curator accepts the
3679
+ * role, and is either burned if the curator misbehaves or consumed upon successful
3680
+ * completion of the child-/bounty.
3681
+ *
3682
+ * Note: If the parent curator is also assigned to the child-bounty,
3683
+ * the consideration cost is charged only once — when the curator
3684
+ * accepts the role for the parent bounty.
3685
+ *
3686
+ * Indexed by `(parent_bounty_id, child_bounty_id)`.
3687
+ *
3688
+ * @param {[number, number | undefined]} arg
3689
+ * @param {Callback<FrameSupportTokensFungibleHoldConsideration | undefined> =} callback
3690
+ **/
3691
+ curatorDeposit: GenericStorageQuery<
3692
+ (arg: [number, number | undefined]) => FrameSupportTokensFungibleHoldConsideration | undefined,
3693
+ [number, number | undefined]
3694
+ >;
3695
+
3696
+ /**
3697
+ * Generic pallet storage query
3698
+ **/
3699
+ [storage: string]: GenericStorageQuery;
3700
+ };
3564
3701
  /**
3565
3702
  * Pallet `AhOps`'s storage queries
3566
3703
  **/