Skip to content

Commit effd636

Browse files
author
debot
committed
chore: regenerate chaintypes
1 parent 9ca9232 commit effd636

7 files changed

Lines changed: 128 additions & 22 deletions

File tree

packages/chaintypes/src/paseo-hydration/consts.d.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -918,11 +918,6 @@ export interface ChainConsts extends GenericChainConsts {
918918
**/
919919
defaultMaxRemoveLiquidityLimitPerBlock: [number, number] | undefined;
920920

921-
/**
922-
* Time window for global withdraw accumulator in milliseconds (e.g., 86_400_000 for 24h).
923-
**/
924-
globalWithdrawWindow: bigint;
925-
926921
/**
927922
* Generic pallet constant
928923
**/

packages/chaintypes/src/paseo-hydration/errors.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1483,6 +1483,11 @@ export interface ChainErrors extends GenericChainErrors {
14831483
**/
14841484
ProtocolFeeNotConsumed: GenericPalletError;
14851485

1486+
/**
1487+
* Slip fee configuration exceeds the allowed maximum (50%).
1488+
**/
1489+
MaxSlipFeeTooHigh: GenericPalletError;
1490+
14861491
/**
14871492
* Generic pallet error
14881493
**/

packages/chaintypes/src/paseo-hydration/events.d.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import type {
3434
HydradxRuntimeXcmAssetLocation,
3535
PalletClaimsEthereumAddress,
3636
PalletOmnipoolTradability,
37+
PalletOmnipoolSlipFeeConfig,
3738
PalletLiquidityMiningLoyaltyCurve,
3839
PalletCircuitBreakerGlobalAssetCategory,
3940
PalletDynamicFeesAssetFeeConfig,
@@ -1839,6 +1840,11 @@ export interface ChainEvents extends GenericChainEvents {
18391840
**/
18401841
AssetWeightCapUpdated: GenericPalletEvent<'Omnipool', 'AssetWeightCapUpdated', { assetId: number; cap: Permill }>;
18411842

1843+
/**
1844+
* Slip fee configuration was updated.
1845+
**/
1846+
SlipFeeSet: GenericPalletEvent<'Omnipool', 'SlipFeeSet', { slipFee?: PalletOmnipoolSlipFeeConfig | undefined }>;
1847+
18421848
/**
18431849
* Generic pallet event
18441850
**/
@@ -2207,7 +2213,11 @@ export interface ChainEvents extends GenericChainEvents {
22072213
/**
22082214
* Global limit value updated by governance (in reference currency).
22092215
**/
2210-
GlobalLimitUpdated: GenericPalletEvent<'CircuitBreaker', 'GlobalLimitUpdated', { newLimit: bigint }>;
2216+
GlobalWithdrawLimitConfigUpdated: GenericPalletEvent<
2217+
'CircuitBreaker',
2218+
'GlobalWithdrawLimitConfigUpdated',
2219+
{ newLimit: bigint; newPeriod: bigint }
2220+
>;
22112221

22122222
/**
22132223
* Global withdraw lockdown was set by governance.

packages/chaintypes/src/paseo-hydration/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ interface ChainKnownTypes extends GenericChainKnownTypes {
5151

5252
/**
5353
* @name: PaseoHydrationApi
54-
* @specVersion: 396
54+
* @specVersion: 397
5555
**/
5656
export interface PaseoHydrationApi extends GenericSubstrateApi {
5757
rpc: ChainJsonRpcApis;

packages/chaintypes/src/paseo-hydration/query.d.ts

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,16 @@ import type {
6464
PalletOmnipoolAssetState,
6565
PalletOmnipoolTradability,
6666
PalletOmnipoolPosition,
67+
PalletOmnipoolSlipFeeConfig,
68+
HydraDxMathOmnipoolTypesSignedBalance,
6769
PalletLiquidityMiningGlobalFarmData,
6870
PalletLiquidityMiningYieldFarmData,
6971
PalletLiquidityMiningDepositData,
7072
PalletOtcOrder,
7173
PalletCircuitBreakerTradeVolumeLimit,
7274
PalletCircuitBreakerLiquidityLimit,
7375
PalletCircuitBreakerLockdownStatus,
76+
PalletCircuitBreakerGlobalWithdrawLimitParameters,
7477
PalletCircuitBreakerGlobalAssetCategory,
7578
HydradxTraitsRouterTrade,
7679
HydradxTraitsRouterAssetPair,
@@ -1343,6 +1346,34 @@ export interface ChainStorage extends GenericChainStorage {
13431346
**/
13441347
nextPositionId: GenericStorageQuery<() => bigint>;
13451348

1349+
/**
1350+
* Global slip fee configuration.
1351+
* `None` = slip fees disabled (default). `Some(config)` = enabled.
1352+
* Set via `set_slip_fee` extrinsic (governance).
1353+
*
1354+
* @param {Callback<PalletOmnipoolSlipFeeConfig | undefined> =} callback
1355+
**/
1356+
slipFee: GenericStorageQuery<() => PalletOmnipoolSlipFeeConfig | undefined>;
1357+
1358+
/**
1359+
* Snapshot of each asset's hub_reserve at the start of the current block.
1360+
* Lazily populated on first trade per asset per block, cleared in on_finalize.
1361+
*
1362+
* @param {number} arg
1363+
* @param {Callback<bigint | undefined> =} callback
1364+
**/
1365+
slipFeeHubReserveAtBlockStart: GenericStorageQuery<(arg: number) => bigint | undefined, number>;
1366+
1367+
/**
1368+
* Cumulative net hub asset delta per asset in the current block.
1369+
* Negative = net hub asset outflow, positive = net hub asset inflow.
1370+
* Cleared in on_finalize.
1371+
*
1372+
* @param {number} arg
1373+
* @param {Callback<HydraDxMathOmnipoolTypesSignedBalance> =} callback
1374+
**/
1375+
slipFeeDelta: GenericStorageQuery<(arg: number) => HydraDxMathOmnipoolTypesSignedBalance, number>;
1376+
13461377
/**
13471378
* Generic pallet storage query
13481379
**/
@@ -1552,11 +1583,11 @@ export interface ChainStorage extends GenericChainStorage {
15521583
>;
15531584

15541585
/**
1555-
* Configured global limit in reference currency
1586+
* Configured global withdraw limit parameters
15561587
*
1557-
* @param {Callback<bigint | undefined> =} callback
1588+
* @param {Callback<PalletCircuitBreakerGlobalWithdrawLimitParameters | undefined> =} callback
15581589
**/
1559-
globalWithdrawLimit: GenericStorageQuery<() => bigint | undefined>;
1590+
globalWithdrawLimitConfig: GenericStorageQuery<() => PalletCircuitBreakerGlobalWithdrawLimitParameters | undefined>;
15601591

15611592
/**
15621593
* Tuple of (current_accumulator_in_ref, last_update_timestamp_ms)

packages/chaintypes/src/paseo-hydration/tx.d.ts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ import type {
4848
HydradxRuntimeXcmAssetLocation,
4949
PalletClaimsEcdsaSignature,
5050
PalletOmnipoolTradability,
51+
PalletOmnipoolSlipFeeConfig,
5152
PalletLiquidityMiningLoyaltyCurve,
5253
HydradxTraitsStableswapAssetAmount,
54+
PalletCircuitBreakerGlobalWithdrawLimitParameters,
5355
PalletCircuitBreakerGlobalAssetCategory,
5456
HydradxTraitsRouterTrade,
5557
HydradxTraitsRouterAssetPair,
@@ -6153,6 +6155,31 @@ export interface ChainTx<
61536155
>
61546156
>;
61556157

6158+
/**
6159+
* Set or clear slip fee configuration.
6160+
*
6161+
* When set to `Some(config)`, slip fees are enabled with the given parameters.
6162+
* When set to `None`, slip fees are disabled.
6163+
*
6164+
* Can only be called by `UpdateTradabilityOrigin`.
6165+
*
6166+
* Emits `SlipFeeSet` event.
6167+
*
6168+
* @param {PalletOmnipoolSlipFeeConfig | undefined} slipFee
6169+
**/
6170+
setSlipFee: GenericTxCall<
6171+
(slipFee: PalletOmnipoolSlipFeeConfig | undefined) => ChainSubmittableExtrinsic<
6172+
{
6173+
pallet: 'Omnipool';
6174+
palletCall: {
6175+
name: 'SetSlipFee';
6176+
params: { slipFee: PalletOmnipoolSlipFeeConfig | undefined };
6177+
};
6178+
},
6179+
ChainKnownTypes
6180+
>
6181+
>;
6182+
61566183
/**
61576184
* Generic pallet tx call
61586185
**/
@@ -7364,15 +7391,15 @@ export interface ChainTx<
73647391
* Set the global withdraw limit (reference currency units)
73657392
* Can be called only by authority origin.
73667393
*
7367-
* @param {bigint} limit
7394+
* @param {PalletCircuitBreakerGlobalWithdrawLimitParameters} parameters
73687395
**/
7369-
setGlobalWithdrawLimit: GenericTxCall<
7370-
(limit: bigint) => ChainSubmittableExtrinsic<
7396+
setGlobalWithdrawLimitParams: GenericTxCall<
7397+
(parameters: PalletCircuitBreakerGlobalWithdrawLimitParameters) => ChainSubmittableExtrinsic<
73717398
{
73727399
pallet: 'CircuitBreaker';
73737400
palletCall: {
7374-
name: 'SetGlobalWithdrawLimit';
7375-
params: { limit: bigint };
7401+
name: 'SetGlobalWithdrawLimitParams';
7402+
params: { parameters: PalletCircuitBreakerGlobalWithdrawLimitParameters };
73767403
};
73777404
},
73787405
ChainKnownTypes

packages/chaintypes/src/paseo-hydration/types.d.ts

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6841,7 +6841,18 @@ export type PalletOmnipoolCall =
68416841
*
68426842
* Emits `TokenRemoved` event when successful.
68436843
**/
6844-
| { name: 'RemoveToken'; params: { assetId: number; beneficiary: AccountId32 } };
6844+
| { name: 'RemoveToken'; params: { assetId: number; beneficiary: AccountId32 } }
6845+
/**
6846+
* Set or clear slip fee configuration.
6847+
*
6848+
* When set to `Some(config)`, slip fees are enabled with the given parameters.
6849+
* When set to `None`, slip fees are disabled.
6850+
*
6851+
* Can only be called by `UpdateTradabilityOrigin`.
6852+
*
6853+
* Emits `SlipFeeSet` event.
6854+
**/
6855+
| { name: 'SetSlipFee'; params: { slipFee?: PalletOmnipoolSlipFeeConfig | undefined } };
68456856

68466857
export type PalletOmnipoolCallLike =
68476858
/**
@@ -7099,10 +7110,23 @@ export type PalletOmnipoolCallLike =
70997110
*
71007111
* Emits `TokenRemoved` event when successful.
71017112
**/
7102-
| { name: 'RemoveToken'; params: { assetId: number; beneficiary: AccountId32Like } };
7113+
| { name: 'RemoveToken'; params: { assetId: number; beneficiary: AccountId32Like } }
7114+
/**
7115+
* Set or clear slip fee configuration.
7116+
*
7117+
* When set to `Some(config)`, slip fees are enabled with the given parameters.
7118+
* When set to `None`, slip fees are disabled.
7119+
*
7120+
* Can only be called by `UpdateTradabilityOrigin`.
7121+
*
7122+
* Emits `SlipFeeSet` event.
7123+
**/
7124+
| { name: 'SetSlipFee'; params: { slipFee?: PalletOmnipoolSlipFeeConfig | undefined } };
71037125

71047126
export type PalletOmnipoolTradability = { bits: number };
71057127

7128+
export type PalletOmnipoolSlipFeeConfig = { maxSlipFee: Permill };
7129+
71067130
/**
71077131
* Contains a variant per dispatchable extrinsic that this pallet has.
71087132
**/
@@ -8191,7 +8215,7 @@ export type PalletCircuitBreakerCall =
81918215
* Set the global withdraw limit (reference currency units)
81928216
* Can be called only by authority origin.
81938217
**/
8194-
| { name: 'SetGlobalWithdrawLimit'; params: { limit: bigint } }
8218+
| { name: 'SetGlobalWithdrawLimitParams'; params: { parameters: PalletCircuitBreakerGlobalWithdrawLimitParameters } }
81958219
/**
81968220
* Reset the global lockdown and accumulator to zero at current block.
81978221
* Can be called only by authority origin.
@@ -8289,7 +8313,7 @@ export type PalletCircuitBreakerCallLike =
82898313
* Set the global withdraw limit (reference currency units)
82908314
* Can be called only by authority origin.
82918315
**/
8292-
| { name: 'SetGlobalWithdrawLimit'; params: { limit: bigint } }
8316+
| { name: 'SetGlobalWithdrawLimitParams'; params: { parameters: PalletCircuitBreakerGlobalWithdrawLimitParameters } }
82938317
/**
82948318
* Reset the global lockdown and accumulator to zero at current block.
82958319
* Can be called only by authority origin.
@@ -8303,6 +8327,8 @@ export type PalletCircuitBreakerCallLike =
83038327
params: { assetId: number; category?: PalletCircuitBreakerGlobalAssetCategory | undefined };
83048328
};
83058329

8330+
export type PalletCircuitBreakerGlobalWithdrawLimitParameters = { limit: bigint; window: bigint };
8331+
83068332
export type PalletCircuitBreakerGlobalAssetCategory = 'External' | 'Local';
83078333

83088334
/**
@@ -14847,7 +14873,11 @@ export type PalletOmnipoolEvent =
1484714873
/**
1484814874
* Asset's weight cap has been updated.
1484914875
**/
14850-
| { name: 'AssetWeightCapUpdated'; data: { assetId: number; cap: Permill } };
14876+
| { name: 'AssetWeightCapUpdated'; data: { assetId: number; cap: Permill } }
14877+
/**
14878+
* Slip fee configuration was updated.
14879+
**/
14880+
| { name: 'SlipFeeSet'; data: { slipFee?: PalletOmnipoolSlipFeeConfig | undefined } };
1485114881

1485214882
/**
1485314883
* The `Event` enum of this pallet
@@ -15108,7 +15138,7 @@ export type PalletCircuitBreakerEvent =
1510815138
/**
1510915139
* Global limit value updated by governance (in reference currency).
1511015140
**/
15111-
| { name: 'GlobalLimitUpdated'; data: { newLimit: bigint } }
15141+
| { name: 'GlobalWithdrawLimitConfigUpdated'; data: { newLimit: bigint; newPeriod: bigint } }
1511215142
/**
1511315143
* Global withdraw lockdown was set by governance.
1511415144
**/
@@ -18163,6 +18193,10 @@ export type PalletOmnipoolAssetState = {
1816318193

1816418194
export type PalletOmnipoolPosition = { assetId: number; amount: bigint; shares: bigint; price: [bigint, bigint] };
1816518195

18196+
export type HydraDxMathOmnipoolTypesSignedBalance =
18197+
| { type: 'Positive'; value: bigint }
18198+
| { type: 'Negative'; value: bigint };
18199+
1816618200
/**
1816718201
* The `Error` enum of this pallet.
1816818202
**/
@@ -18294,7 +18328,11 @@ export type PalletOmnipoolError =
1829418328
/**
1829518329
* Extra protocol fee has not been consumed.
1829618330
**/
18297-
| 'ProtocolFeeNotConsumed';
18331+
| 'ProtocolFeeNotConsumed'
18332+
/**
18333+
* Slip fee configuration exceeds the allowed maximum (50%).
18334+
**/
18335+
| 'MaxSlipFeeTooHigh';
1829818336

1829918337
/**
1830018338
* The `Error` enum of this pallet.

0 commit comments

Comments
 (0)