@dedot/chaintypes 0.240.0 → 0.241.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 +2 -2
- package/paseo-hydration/consts.d.ts +5 -0
- package/paseo-hydration/errors.d.ts +15 -0
- package/paseo-hydration/events.d.ts +45 -0
- package/paseo-hydration/index.d.ts +1 -1
- package/paseo-hydration/query.d.ts +48 -0
- package/paseo-hydration/tx.d.ts +109 -0
- package/paseo-hydration/types.d.ts +87 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/chaintypes",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.241.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": "
|
|
28
|
+
"gitHead": "77e33dfd7ed0f001436caf93080b6f6a6c372c06",
|
|
29
29
|
"module": "./index.js",
|
|
30
30
|
"types": "./index.d.ts",
|
|
31
31
|
"exports": {
|
|
@@ -918,6 +918,11 @@ export interface ChainConsts extends GenericChainConsts {
|
|
|
918
918
|
**/
|
|
919
919
|
defaultMaxRemoveLiquidityLimitPerBlock: [number, number] | undefined;
|
|
920
920
|
|
|
921
|
+
/**
|
|
922
|
+
* Time window for global withdraw accumulator in milliseconds (e.g., 86_400_000 for 24h).
|
|
923
|
+
**/
|
|
924
|
+
globalWithdrawWindow: bigint;
|
|
925
|
+
|
|
921
926
|
/**
|
|
922
927
|
* Generic pallet constant
|
|
923
928
|
**/
|
|
@@ -1870,6 +1870,21 @@ export interface ChainErrors extends GenericChainErrors {
|
|
|
1870
1870
|
**/
|
|
1871
1871
|
DepositLimitExceededForWhitelistedAccount: GenericPalletError;
|
|
1872
1872
|
|
|
1873
|
+
/**
|
|
1874
|
+
* Global lockdown is active and withdrawals that participate in the global limit are blocked.
|
|
1875
|
+
**/
|
|
1876
|
+
WithdrawLockdownActive: GenericPalletError;
|
|
1877
|
+
|
|
1878
|
+
/**
|
|
1879
|
+
* Applying the increment would exceed the configured global limit -> lockdown is triggered and operation fails.
|
|
1880
|
+
**/
|
|
1881
|
+
GlobalWithdrawLimitExceeded: GenericPalletError;
|
|
1882
|
+
|
|
1883
|
+
/**
|
|
1884
|
+
* Asset to withdraw cannot be converted to reference currency.
|
|
1885
|
+
**/
|
|
1886
|
+
FailedToConvertAsset: GenericPalletError;
|
|
1887
|
+
|
|
1873
1888
|
/**
|
|
1874
1889
|
* Generic pallet error
|
|
1875
1890
|
**/
|
|
@@ -35,6 +35,7 @@ import type {
|
|
|
35
35
|
PalletClaimsEthereumAddress,
|
|
36
36
|
PalletOmnipoolTradability,
|
|
37
37
|
PalletLiquidityMiningLoyaltyCurve,
|
|
38
|
+
PalletCircuitBreakerGlobalAssetCategory,
|
|
38
39
|
PalletDynamicFeesAssetFeeConfig,
|
|
39
40
|
NonZeroU16,
|
|
40
41
|
PalletStableswapPoolPegInfo,
|
|
@@ -2188,6 +2189,50 @@ export interface ChainEvents extends GenericChainEvents {
|
|
|
2188
2189
|
**/
|
|
2189
2190
|
DepositReleased: GenericPalletEvent<'CircuitBreaker', 'DepositReleased', { who: AccountId32; assetId: number }>;
|
|
2190
2191
|
|
|
2192
|
+
/**
|
|
2193
|
+
* Global lockdown triggered until given timestamp (ms).
|
|
2194
|
+
**/
|
|
2195
|
+
GlobalLockdownTriggered: GenericPalletEvent<'CircuitBreaker', 'GlobalLockdownTriggered', { until: bigint }>;
|
|
2196
|
+
|
|
2197
|
+
/**
|
|
2198
|
+
* Global lockdown was lifted (either automatically or by reset).
|
|
2199
|
+
**/
|
|
2200
|
+
GlobalLockdownLifted: GenericPalletEvent<'CircuitBreaker', 'GlobalLockdownLifted', null>;
|
|
2201
|
+
|
|
2202
|
+
/**
|
|
2203
|
+
* Global lockdown accumulator and state were reset by governance.
|
|
2204
|
+
**/
|
|
2205
|
+
GlobalLockdownReset: GenericPalletEvent<'CircuitBreaker', 'GlobalLockdownReset', null>;
|
|
2206
|
+
|
|
2207
|
+
/**
|
|
2208
|
+
* Global limit value updated by governance (in reference currency).
|
|
2209
|
+
**/
|
|
2210
|
+
GlobalLimitUpdated: GenericPalletEvent<'CircuitBreaker', 'GlobalLimitUpdated', { newLimit: bigint }>;
|
|
2211
|
+
|
|
2212
|
+
/**
|
|
2213
|
+
* Global withdraw lockdown was set by governance.
|
|
2214
|
+
**/
|
|
2215
|
+
GlobalLockdownSet: GenericPalletEvent<'CircuitBreaker', 'GlobalLockdownSet', { until: bigint }>;
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* A number of egress accounts added to a list.
|
|
2219
|
+
**/
|
|
2220
|
+
EgressAccountsAdded: GenericPalletEvent<'CircuitBreaker', 'EgressAccountsAdded', { count: number }>;
|
|
2221
|
+
|
|
2222
|
+
/**
|
|
2223
|
+
* A number of egress accounts removed from a list.
|
|
2224
|
+
**/
|
|
2225
|
+
EgressAccountsRemoved: GenericPalletEvent<'CircuitBreaker', 'EgressAccountsRemoved', { count: number }>;
|
|
2226
|
+
|
|
2227
|
+
/**
|
|
2228
|
+
* Asset category override updated.
|
|
2229
|
+
**/
|
|
2230
|
+
AssetCategoryUpdated: GenericPalletEvent<
|
|
2231
|
+
'CircuitBreaker',
|
|
2232
|
+
'AssetCategoryUpdated',
|
|
2233
|
+
{ assetId: number; category?: PalletCircuitBreakerGlobalAssetCategory | undefined }
|
|
2234
|
+
>;
|
|
2235
|
+
|
|
2191
2236
|
/**
|
|
2192
2237
|
* Generic pallet event
|
|
2193
2238
|
**/
|
|
@@ -71,6 +71,7 @@ import type {
|
|
|
71
71
|
PalletCircuitBreakerTradeVolumeLimit,
|
|
72
72
|
PalletCircuitBreakerLiquidityLimit,
|
|
73
73
|
PalletCircuitBreakerLockdownStatus,
|
|
74
|
+
PalletCircuitBreakerGlobalAssetCategory,
|
|
74
75
|
HydradxTraitsRouterTrade,
|
|
75
76
|
HydradxTraitsRouterAssetPair,
|
|
76
77
|
PalletDynamicFeesFeeEntry,
|
|
@@ -1550,6 +1551,53 @@ export interface ChainStorage extends GenericChainStorage {
|
|
|
1550
1551
|
number
|
|
1551
1552
|
>;
|
|
1552
1553
|
|
|
1554
|
+
/**
|
|
1555
|
+
* Configured global limit in reference currency
|
|
1556
|
+
*
|
|
1557
|
+
* @param {Callback<bigint | undefined> =} callback
|
|
1558
|
+
**/
|
|
1559
|
+
globalWithdrawLimit: GenericStorageQuery<() => bigint | undefined>;
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* Tuple of (current_accumulator_in_ref, last_update_timestamp_ms)
|
|
1563
|
+
*
|
|
1564
|
+
* @param {Callback<[bigint, bigint]> =} callback
|
|
1565
|
+
**/
|
|
1566
|
+
withdrawLimitAccumulator: GenericStorageQuery<() => [bigint, bigint]>;
|
|
1567
|
+
|
|
1568
|
+
/**
|
|
1569
|
+
* If some, global lockdown is active until this timestamp.
|
|
1570
|
+
*
|
|
1571
|
+
* @param {Callback<bigint | undefined> =} callback
|
|
1572
|
+
**/
|
|
1573
|
+
withdrawLockdownUntil: GenericStorageQuery<() => bigint | undefined>;
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
* A map of accounts that are considered egress sinks.
|
|
1577
|
+
*
|
|
1578
|
+
* @param {AccountId32Like} arg
|
|
1579
|
+
* @param {Callback<[] | undefined> =} callback
|
|
1580
|
+
**/
|
|
1581
|
+
egressAccounts: GenericStorageQuery<(arg: AccountId32Like) => [] | undefined, AccountId32>;
|
|
1582
|
+
|
|
1583
|
+
/**
|
|
1584
|
+
* When set to true, egress accounting is skipped.
|
|
1585
|
+
*
|
|
1586
|
+
* @param {Callback<boolean> =} callback
|
|
1587
|
+
**/
|
|
1588
|
+
ignoreWithdrawLimit: GenericStorageQuery<() => boolean>;
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* Overrides for global asset categorization.
|
|
1592
|
+
*
|
|
1593
|
+
* @param {number} arg
|
|
1594
|
+
* @param {Callback<PalletCircuitBreakerGlobalAssetCategory | undefined> =} callback
|
|
1595
|
+
**/
|
|
1596
|
+
globalAssetOverrides: GenericStorageQuery<
|
|
1597
|
+
(arg: number) => PalletCircuitBreakerGlobalAssetCategory | undefined,
|
|
1598
|
+
number
|
|
1599
|
+
>;
|
|
1600
|
+
|
|
1553
1601
|
/**
|
|
1554
1602
|
* Generic pallet storage query
|
|
1555
1603
|
**/
|
package/paseo-hydration/tx.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ import type {
|
|
|
50
50
|
PalletOmnipoolTradability,
|
|
51
51
|
PalletLiquidityMiningLoyaltyCurve,
|
|
52
52
|
HydradxTraitsStableswapAssetAmount,
|
|
53
|
+
PalletCircuitBreakerGlobalAssetCategory,
|
|
53
54
|
HydradxTraitsRouterTrade,
|
|
54
55
|
HydradxTraitsRouterAssetPair,
|
|
55
56
|
PalletDynamicFeesAssetFeeConfig,
|
|
@@ -7359,6 +7360,114 @@ export interface ChainTx<
|
|
|
7359
7360
|
>
|
|
7360
7361
|
>;
|
|
7361
7362
|
|
|
7363
|
+
/**
|
|
7364
|
+
* Set the global withdraw limit (reference currency units)
|
|
7365
|
+
* Can be called only by authority origin.
|
|
7366
|
+
*
|
|
7367
|
+
* @param {bigint} limit
|
|
7368
|
+
**/
|
|
7369
|
+
setGlobalWithdrawLimit: GenericTxCall<
|
|
7370
|
+
(limit: bigint) => ChainSubmittableExtrinsic<
|
|
7371
|
+
{
|
|
7372
|
+
pallet: 'CircuitBreaker';
|
|
7373
|
+
palletCall: {
|
|
7374
|
+
name: 'SetGlobalWithdrawLimit';
|
|
7375
|
+
params: { limit: bigint };
|
|
7376
|
+
};
|
|
7377
|
+
},
|
|
7378
|
+
ChainKnownTypes
|
|
7379
|
+
>
|
|
7380
|
+
>;
|
|
7381
|
+
|
|
7382
|
+
/**
|
|
7383
|
+
* Reset the global lockdown and accumulator to zero at current block.
|
|
7384
|
+
* Can be called only by authority origin.
|
|
7385
|
+
*
|
|
7386
|
+
**/
|
|
7387
|
+
resetWithdrawLockdown: GenericTxCall<
|
|
7388
|
+
() => ChainSubmittableExtrinsic<
|
|
7389
|
+
{
|
|
7390
|
+
pallet: 'CircuitBreaker';
|
|
7391
|
+
palletCall: {
|
|
7392
|
+
name: 'ResetWithdrawLockdown';
|
|
7393
|
+
};
|
|
7394
|
+
},
|
|
7395
|
+
ChainKnownTypes
|
|
7396
|
+
>
|
|
7397
|
+
>;
|
|
7398
|
+
|
|
7399
|
+
/**
|
|
7400
|
+
*
|
|
7401
|
+
* @param {Array<AccountId32Like>} accounts
|
|
7402
|
+
**/
|
|
7403
|
+
addEgressAccounts: GenericTxCall<
|
|
7404
|
+
(accounts: Array<AccountId32Like>) => ChainSubmittableExtrinsic<
|
|
7405
|
+
{
|
|
7406
|
+
pallet: 'CircuitBreaker';
|
|
7407
|
+
palletCall: {
|
|
7408
|
+
name: 'AddEgressAccounts';
|
|
7409
|
+
params: { accounts: Array<AccountId32Like> };
|
|
7410
|
+
};
|
|
7411
|
+
},
|
|
7412
|
+
ChainKnownTypes
|
|
7413
|
+
>
|
|
7414
|
+
>;
|
|
7415
|
+
|
|
7416
|
+
/**
|
|
7417
|
+
*
|
|
7418
|
+
* @param {Array<AccountId32Like>} accounts
|
|
7419
|
+
**/
|
|
7420
|
+
removeEgressAccounts: GenericTxCall<
|
|
7421
|
+
(accounts: Array<AccountId32Like>) => ChainSubmittableExtrinsic<
|
|
7422
|
+
{
|
|
7423
|
+
pallet: 'CircuitBreaker';
|
|
7424
|
+
palletCall: {
|
|
7425
|
+
name: 'RemoveEgressAccounts';
|
|
7426
|
+
params: { accounts: Array<AccountId32Like> };
|
|
7427
|
+
};
|
|
7428
|
+
},
|
|
7429
|
+
ChainKnownTypes
|
|
7430
|
+
>
|
|
7431
|
+
>;
|
|
7432
|
+
|
|
7433
|
+
/**
|
|
7434
|
+
*
|
|
7435
|
+
* @param {bigint} until
|
|
7436
|
+
**/
|
|
7437
|
+
setGlobalWithdrawLockdown: GenericTxCall<
|
|
7438
|
+
(until: bigint) => ChainSubmittableExtrinsic<
|
|
7439
|
+
{
|
|
7440
|
+
pallet: 'CircuitBreaker';
|
|
7441
|
+
palletCall: {
|
|
7442
|
+
name: 'SetGlobalWithdrawLockdown';
|
|
7443
|
+
params: { until: bigint };
|
|
7444
|
+
};
|
|
7445
|
+
},
|
|
7446
|
+
ChainKnownTypes
|
|
7447
|
+
>
|
|
7448
|
+
>;
|
|
7449
|
+
|
|
7450
|
+
/**
|
|
7451
|
+
*
|
|
7452
|
+
* @param {number} assetId
|
|
7453
|
+
* @param {PalletCircuitBreakerGlobalAssetCategory | undefined} category
|
|
7454
|
+
**/
|
|
7455
|
+
setAssetCategory: GenericTxCall<
|
|
7456
|
+
(
|
|
7457
|
+
assetId: number,
|
|
7458
|
+
category: PalletCircuitBreakerGlobalAssetCategory | undefined,
|
|
7459
|
+
) => ChainSubmittableExtrinsic<
|
|
7460
|
+
{
|
|
7461
|
+
pallet: 'CircuitBreaker';
|
|
7462
|
+
palletCall: {
|
|
7463
|
+
name: 'SetAssetCategory';
|
|
7464
|
+
params: { assetId: number; category: PalletCircuitBreakerGlobalAssetCategory | undefined };
|
|
7465
|
+
};
|
|
7466
|
+
},
|
|
7467
|
+
ChainKnownTypes
|
|
7468
|
+
>
|
|
7469
|
+
>;
|
|
7470
|
+
|
|
7362
7471
|
/**
|
|
7363
7472
|
* Generic pallet tx call
|
|
7364
7473
|
**/
|
|
@@ -8186,7 +8186,24 @@ export type PalletCircuitBreakerCall =
|
|
|
8186
8186
|
*
|
|
8187
8187
|
* Emits `DepositReleased` event when successful.
|
|
8188
8188
|
**/
|
|
8189
|
-
| { name: 'ReleaseDeposit'; params: { who: AccountId32; assetId: number } }
|
|
8189
|
+
| { name: 'ReleaseDeposit'; params: { who: AccountId32; assetId: number } }
|
|
8190
|
+
/**
|
|
8191
|
+
* Set the global withdraw limit (reference currency units)
|
|
8192
|
+
* Can be called only by authority origin.
|
|
8193
|
+
**/
|
|
8194
|
+
| { name: 'SetGlobalWithdrawLimit'; params: { limit: bigint } }
|
|
8195
|
+
/**
|
|
8196
|
+
* Reset the global lockdown and accumulator to zero at current block.
|
|
8197
|
+
* Can be called only by authority origin.
|
|
8198
|
+
**/
|
|
8199
|
+
| { name: 'ResetWithdrawLockdown' }
|
|
8200
|
+
| { name: 'AddEgressAccounts'; params: { accounts: Array<AccountId32> } }
|
|
8201
|
+
| { name: 'RemoveEgressAccounts'; params: { accounts: Array<AccountId32> } }
|
|
8202
|
+
| { name: 'SetGlobalWithdrawLockdown'; params: { until: bigint } }
|
|
8203
|
+
| {
|
|
8204
|
+
name: 'SetAssetCategory';
|
|
8205
|
+
params: { assetId: number; category?: PalletCircuitBreakerGlobalAssetCategory | undefined };
|
|
8206
|
+
};
|
|
8190
8207
|
|
|
8191
8208
|
export type PalletCircuitBreakerCallLike =
|
|
8192
8209
|
/**
|
|
@@ -8267,7 +8284,26 @@ export type PalletCircuitBreakerCallLike =
|
|
|
8267
8284
|
*
|
|
8268
8285
|
* Emits `DepositReleased` event when successful.
|
|
8269
8286
|
**/
|
|
8270
|
-
| { name: 'ReleaseDeposit'; params: { who: AccountId32Like; assetId: number } }
|
|
8287
|
+
| { name: 'ReleaseDeposit'; params: { who: AccountId32Like; assetId: number } }
|
|
8288
|
+
/**
|
|
8289
|
+
* Set the global withdraw limit (reference currency units)
|
|
8290
|
+
* Can be called only by authority origin.
|
|
8291
|
+
**/
|
|
8292
|
+
| { name: 'SetGlobalWithdrawLimit'; params: { limit: bigint } }
|
|
8293
|
+
/**
|
|
8294
|
+
* Reset the global lockdown and accumulator to zero at current block.
|
|
8295
|
+
* Can be called only by authority origin.
|
|
8296
|
+
**/
|
|
8297
|
+
| { name: 'ResetWithdrawLockdown' }
|
|
8298
|
+
| { name: 'AddEgressAccounts'; params: { accounts: Array<AccountId32Like> } }
|
|
8299
|
+
| { name: 'RemoveEgressAccounts'; params: { accounts: Array<AccountId32Like> } }
|
|
8300
|
+
| { name: 'SetGlobalWithdrawLockdown'; params: { until: bigint } }
|
|
8301
|
+
| {
|
|
8302
|
+
name: 'SetAssetCategory';
|
|
8303
|
+
params: { assetId: number; category?: PalletCircuitBreakerGlobalAssetCategory | undefined };
|
|
8304
|
+
};
|
|
8305
|
+
|
|
8306
|
+
export type PalletCircuitBreakerGlobalAssetCategory = 'External' | 'Local';
|
|
8271
8307
|
|
|
8272
8308
|
/**
|
|
8273
8309
|
* Contains a variant per dispatchable extrinsic that this pallet has.
|
|
@@ -15056,7 +15092,42 @@ export type PalletCircuitBreakerEvent =
|
|
|
15056
15092
|
/**
|
|
15057
15093
|
* All reserved amount of deposit was released
|
|
15058
15094
|
**/
|
|
15059
|
-
| { name: 'DepositReleased'; data: { who: AccountId32; assetId: number } }
|
|
15095
|
+
| { name: 'DepositReleased'; data: { who: AccountId32; assetId: number } }
|
|
15096
|
+
/**
|
|
15097
|
+
* Global lockdown triggered until given timestamp (ms).
|
|
15098
|
+
**/
|
|
15099
|
+
| { name: 'GlobalLockdownTriggered'; data: { until: bigint } }
|
|
15100
|
+
/**
|
|
15101
|
+
* Global lockdown was lifted (either automatically or by reset).
|
|
15102
|
+
**/
|
|
15103
|
+
| { name: 'GlobalLockdownLifted' }
|
|
15104
|
+
/**
|
|
15105
|
+
* Global lockdown accumulator and state were reset by governance.
|
|
15106
|
+
**/
|
|
15107
|
+
| { name: 'GlobalLockdownReset' }
|
|
15108
|
+
/**
|
|
15109
|
+
* Global limit value updated by governance (in reference currency).
|
|
15110
|
+
**/
|
|
15111
|
+
| { name: 'GlobalLimitUpdated'; data: { newLimit: bigint } }
|
|
15112
|
+
/**
|
|
15113
|
+
* Global withdraw lockdown was set by governance.
|
|
15114
|
+
**/
|
|
15115
|
+
| { name: 'GlobalLockdownSet'; data: { until: bigint } }
|
|
15116
|
+
/**
|
|
15117
|
+
* A number of egress accounts added to a list.
|
|
15118
|
+
**/
|
|
15119
|
+
| { name: 'EgressAccountsAdded'; data: { count: number } }
|
|
15120
|
+
/**
|
|
15121
|
+
* A number of egress accounts removed from a list.
|
|
15122
|
+
**/
|
|
15123
|
+
| { name: 'EgressAccountsRemoved'; data: { count: number } }
|
|
15124
|
+
/**
|
|
15125
|
+
* Asset category override updated.
|
|
15126
|
+
**/
|
|
15127
|
+
| {
|
|
15128
|
+
name: 'AssetCategoryUpdated';
|
|
15129
|
+
data: { assetId: number; category?: PalletCircuitBreakerGlobalAssetCategory | undefined };
|
|
15130
|
+
};
|
|
15060
15131
|
|
|
15061
15132
|
/**
|
|
15062
15133
|
* The `Event` enum of this pallet
|
|
@@ -18614,7 +18685,19 @@ export type PalletCircuitBreakerError =
|
|
|
18614
18685
|
* Deposit limit would be exceeded for a whitelisted account.
|
|
18615
18686
|
* Operation rejected to prevent funds being locked on system accounts.
|
|
18616
18687
|
**/
|
|
18617
|
-
| 'DepositLimitExceededForWhitelistedAccount'
|
|
18688
|
+
| 'DepositLimitExceededForWhitelistedAccount'
|
|
18689
|
+
/**
|
|
18690
|
+
* Global lockdown is active and withdrawals that participate in the global limit are blocked.
|
|
18691
|
+
**/
|
|
18692
|
+
| 'WithdrawLockdownActive'
|
|
18693
|
+
/**
|
|
18694
|
+
* Applying the increment would exceed the configured global limit -> lockdown is triggered and operation fails.
|
|
18695
|
+
**/
|
|
18696
|
+
| 'GlobalWithdrawLimitExceeded'
|
|
18697
|
+
/**
|
|
18698
|
+
* Asset to withdraw cannot be converted to reference currency.
|
|
18699
|
+
**/
|
|
18700
|
+
| 'FailedToConvertAsset';
|
|
18618
18701
|
|
|
18619
18702
|
/**
|
|
18620
18703
|
* The `Error` enum of this pallet.
|