Skip to content

Commit dcc855c

Browse files
author
debot
committed
chore: regenerate chaintypes
1 parent 22dc2a9 commit dcc855c

6 files changed

Lines changed: 411 additions & 9 deletions

File tree

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

Lines changed: 20 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
**/
@@ -1870,6 +1875,21 @@ export interface ChainErrors extends GenericChainErrors {
18701875
**/
18711876
DepositLimitExceededForWhitelistedAccount: GenericPalletError;
18721877

1878+
/**
1879+
* Global lockdown is active and withdrawals that participate in the global limit are blocked.
1880+
**/
1881+
WithdrawLockdownActive: GenericPalletError;
1882+
1883+
/**
1884+
* Applying the increment would exceed the configured global limit -> lockdown is triggered and operation fails.
1885+
**/
1886+
GlobalWithdrawLimitExceeded: GenericPalletError;
1887+
1888+
/**
1889+
* Asset to withdraw cannot be converted to reference currency.
1890+
**/
1891+
FailedToConvertAsset: GenericPalletError;
1892+
18731893
/**
18741894
* Generic pallet error
18751895
**/

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

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ import type {
3434
HydradxRuntimeXcmAssetLocation,
3535
PalletClaimsEthereumAddress,
3636
PalletOmnipoolTradability,
37+
PalletOmnipoolSlipFeeConfig,
3738
PalletLiquidityMiningLoyaltyCurve,
39+
PalletCircuitBreakerGlobalAssetCategory,
3840
PalletDynamicFeesAssetFeeConfig,
3941
NonZeroU16,
4042
PalletStableswapPoolPegInfo,
@@ -1838,6 +1840,11 @@ export interface ChainEvents extends GenericChainEvents {
18381840
**/
18391841
AssetWeightCapUpdated: GenericPalletEvent<'Omnipool', 'AssetWeightCapUpdated', { assetId: number; cap: Permill }>;
18401842

1843+
/**
1844+
* Slip fee configuration was updated.
1845+
**/
1846+
SlipFeeSet: GenericPalletEvent<'Omnipool', 'SlipFeeSet', { slipFee?: PalletOmnipoolSlipFeeConfig | undefined }>;
1847+
18411848
/**
18421849
* Generic pallet event
18431850
**/
@@ -2188,6 +2195,49 @@ export interface ChainEvents extends GenericChainEvents {
21882195
**/
21892196
DepositReleased: GenericPalletEvent<'CircuitBreaker', 'DepositReleased', { who: AccountId32; assetId: number }>;
21902197

2198+
/**
2199+
* Global withdraw lockdown was lifted (either automatically or by reset).
2200+
**/
2201+
WithdrawLockdownLifted: GenericPalletEvent<'CircuitBreaker', 'WithdrawLockdownLifted', null>;
2202+
2203+
/**
2204+
* Withdraw lockdown accumulator and states were reset by governance.
2205+
**/
2206+
WithdrawLockdownReset: GenericPalletEvent<'CircuitBreaker', 'WithdrawLockdownReset', null>;
2207+
2208+
/**
2209+
* Global withdraw limit config parameters were updated.
2210+
**/
2211+
WithdrawLimitConfigUpdated: GenericPalletEvent<
2212+
'CircuitBreaker',
2213+
'WithdrawLimitConfigUpdated',
2214+
{ limit: bigint; window: bigint }
2215+
>;
2216+
2217+
/**
2218+
* Global withdraw lockdown was set by governance.
2219+
**/
2220+
WithdrawLockdownTriggered: GenericPalletEvent<'CircuitBreaker', 'WithdrawLockdownTriggered', { until: bigint }>;
2221+
2222+
/**
2223+
* A number of egress accounts added to a list.
2224+
**/
2225+
EgressAccountsAdded: GenericPalletEvent<'CircuitBreaker', 'EgressAccountsAdded', { count: number }>;
2226+
2227+
/**
2228+
* A number of egress accounts removed from a list.
2229+
**/
2230+
EgressAccountsRemoved: GenericPalletEvent<'CircuitBreaker', 'EgressAccountsRemoved', { count: number }>;
2231+
2232+
/**
2233+
* Asset category override updated.
2234+
**/
2235+
AssetCategoryUpdated: GenericPalletEvent<
2236+
'CircuitBreaker',
2237+
'AssetCategoryUpdated',
2238+
{ assetId: number; category?: PalletCircuitBreakerGlobalAssetCategory | undefined }
2239+
>;
2240+
21912241
/**
21922242
* Generic pallet event
21932243
**/

packages/chaintypes/src/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: HydrationApi
54-
* @specVersion: 396
54+
* @specVersion: 398
5555
**/
5656
export interface HydrationApi extends GenericSubstrateApi {
5757
rpc: ChainJsonRpcApis;

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

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,17 @@ 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,
77+
PalletCircuitBreakerGlobalAssetCategory,
7478
HydradxTraitsRouterTrade,
7579
HydradxTraitsRouterAssetPair,
7680
PalletDynamicFeesFeeEntry,
@@ -1342,6 +1346,34 @@ export interface ChainStorage extends GenericChainStorage {
13421346
**/
13431347
nextPositionId: GenericStorageQuery<() => bigint>;
13441348

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+
13451377
/**
13461378
* Generic pallet storage query
13471379
**/
@@ -1550,6 +1582,53 @@ export interface ChainStorage extends GenericChainStorage {
15501582
number
15511583
>;
15521584

1585+
/**
1586+
* Configured global withdraw limit parameters
1587+
*
1588+
* @param {Callback<PalletCircuitBreakerGlobalWithdrawLimitParameters | undefined> =} callback
1589+
**/
1590+
globalWithdrawLimitConfig: GenericStorageQuery<() => PalletCircuitBreakerGlobalWithdrawLimitParameters | undefined>;
1591+
1592+
/**
1593+
* Tuple of (current_accumulator_in_ref, last_update_timestamp_ms)
1594+
*
1595+
* @param {Callback<[bigint, bigint]> =} callback
1596+
**/
1597+
withdrawLimitAccumulator: GenericStorageQuery<() => [bigint, bigint]>;
1598+
1599+
/**
1600+
* If some, global lockdown is active until this timestamp.
1601+
*
1602+
* @param {Callback<bigint | undefined> =} callback
1603+
**/
1604+
withdrawLockdownUntil: GenericStorageQuery<() => bigint | undefined>;
1605+
1606+
/**
1607+
* A map of accounts that are considered egress sinks.
1608+
*
1609+
* @param {AccountId32Like} arg
1610+
* @param {Callback<[] | undefined> =} callback
1611+
**/
1612+
egressAccounts: GenericStorageQuery<(arg: AccountId32Like) => [] | undefined, AccountId32>;
1613+
1614+
/**
1615+
* When set to true, egress accounting is skipped.
1616+
*
1617+
* @param {Callback<boolean> =} callback
1618+
**/
1619+
ignoreWithdrawLimit: GenericStorageQuery<() => boolean>;
1620+
1621+
/**
1622+
* Overrides for global asset categorization.
1623+
*
1624+
* @param {number} arg
1625+
* @param {Callback<PalletCircuitBreakerGlobalAssetCategory | undefined> =} callback
1626+
**/
1627+
globalAssetOverrides: GenericStorageQuery<
1628+
(arg: number) => PalletCircuitBreakerGlobalAssetCategory | undefined,
1629+
number
1630+
>;
1631+
15531632
/**
15541633
* Generic pallet storage query
15551634
**/

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

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ import type {
4848
HydradxRuntimeXcmAssetLocation,
4949
PalletClaimsEcdsaSignature,
5050
PalletOmnipoolTradability,
51+
PalletOmnipoolSlipFeeConfig,
5152
PalletLiquidityMiningLoyaltyCurve,
5253
HydradxTraitsStableswapAssetAmount,
54+
PalletCircuitBreakerGlobalWithdrawLimitParameters,
55+
PalletCircuitBreakerGlobalAssetCategory,
5356
HydradxTraitsRouterTrade,
5457
HydradxTraitsRouterAssetPair,
5558
PalletDynamicFeesAssetFeeConfig,
@@ -6152,6 +6155,31 @@ export interface ChainTx<
61526155
>
61536156
>;
61546157

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+
61556183
/**
61566184
* Generic pallet tx call
61576185
**/
@@ -7359,6 +7387,114 @@ export interface ChainTx<
73597387
>
73607388
>;
73617389

7390+
/**
7391+
* Set the global withdraw limit (reference currency units)
7392+
* Can be called only by authority origin.
7393+
*
7394+
* @param {PalletCircuitBreakerGlobalWithdrawLimitParameters} parameters
7395+
**/
7396+
setGlobalWithdrawLimitParams: GenericTxCall<
7397+
(parameters: PalletCircuitBreakerGlobalWithdrawLimitParameters) => ChainSubmittableExtrinsic<
7398+
{
7399+
pallet: 'CircuitBreaker';
7400+
palletCall: {
7401+
name: 'SetGlobalWithdrawLimitParams';
7402+
params: { parameters: PalletCircuitBreakerGlobalWithdrawLimitParameters };
7403+
};
7404+
},
7405+
ChainKnownTypes
7406+
>
7407+
>;
7408+
7409+
/**
7410+
* Reset the global lockdown and accumulator to zero at current block.
7411+
* Can be called only by authority origin.
7412+
*
7413+
**/
7414+
resetWithdrawLockdown: GenericTxCall<
7415+
() => ChainSubmittableExtrinsic<
7416+
{
7417+
pallet: 'CircuitBreaker';
7418+
palletCall: {
7419+
name: 'ResetWithdrawLockdown';
7420+
};
7421+
},
7422+
ChainKnownTypes
7423+
>
7424+
>;
7425+
7426+
/**
7427+
*
7428+
* @param {Array<AccountId32Like>} accounts
7429+
**/
7430+
addEgressAccounts: GenericTxCall<
7431+
(accounts: Array<AccountId32Like>) => ChainSubmittableExtrinsic<
7432+
{
7433+
pallet: 'CircuitBreaker';
7434+
palletCall: {
7435+
name: 'AddEgressAccounts';
7436+
params: { accounts: Array<AccountId32Like> };
7437+
};
7438+
},
7439+
ChainKnownTypes
7440+
>
7441+
>;
7442+
7443+
/**
7444+
*
7445+
* @param {Array<AccountId32Like>} accounts
7446+
**/
7447+
removeEgressAccounts: GenericTxCall<
7448+
(accounts: Array<AccountId32Like>) => ChainSubmittableExtrinsic<
7449+
{
7450+
pallet: 'CircuitBreaker';
7451+
palletCall: {
7452+
name: 'RemoveEgressAccounts';
7453+
params: { accounts: Array<AccountId32Like> };
7454+
};
7455+
},
7456+
ChainKnownTypes
7457+
>
7458+
>;
7459+
7460+
/**
7461+
*
7462+
* @param {bigint} until
7463+
**/
7464+
setGlobalWithdrawLockdown: GenericTxCall<
7465+
(until: bigint) => ChainSubmittableExtrinsic<
7466+
{
7467+
pallet: 'CircuitBreaker';
7468+
palletCall: {
7469+
name: 'SetGlobalWithdrawLockdown';
7470+
params: { until: bigint };
7471+
};
7472+
},
7473+
ChainKnownTypes
7474+
>
7475+
>;
7476+
7477+
/**
7478+
*
7479+
* @param {number} assetId
7480+
* @param {PalletCircuitBreakerGlobalAssetCategory | undefined} category
7481+
**/
7482+
setAssetCategory: GenericTxCall<
7483+
(
7484+
assetId: number,
7485+
category: PalletCircuitBreakerGlobalAssetCategory | undefined,
7486+
) => ChainSubmittableExtrinsic<
7487+
{
7488+
pallet: 'CircuitBreaker';
7489+
palletCall: {
7490+
name: 'SetAssetCategory';
7491+
params: { assetId: number; category: PalletCircuitBreakerGlobalAssetCategory | undefined };
7492+
};
7493+
},
7494+
ChainKnownTypes
7495+
>
7496+
>;
7497+
73627498
/**
73637499
* Generic pallet tx call
73647500
**/

0 commit comments

Comments
 (0)