@gauntlet-xyz/sdk 1.0.5 → 2.0.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/dist/constants.d.ts +16 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +28 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors.d.ts +18 -3
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -2
- package/dist/errors.js.map +1 -1
- package/dist/evm/abis/priceAndFeeCalculatorV2.d.ts +233 -0
- package/dist/evm/abis/priceAndFeeCalculatorV2.d.ts.map +1 -0
- package/dist/evm/abis/priceAndFeeCalculatorV2.js +119 -0
- package/dist/evm/abis/priceAndFeeCalculatorV2.js.map +1 -0
- package/dist/evm/abis/provisionerV2.d.ts +460 -0
- package/dist/evm/abis/provisionerV2.d.ts.map +1 -0
- package/dist/evm/abis/provisionerV2.js +203 -0
- package/dist/evm/abis/provisionerV2.js.map +1 -0
- package/dist/evm/adapters/aera.d.ts +3 -3
- package/dist/evm/adapters/aera.d.ts.map +1 -1
- package/dist/evm/adapters/aera.js +179 -103
- package/dist/evm/adapters/aera.js.map +1 -1
- package/dist/evm/adapters/types.d.ts +12 -1
- package/dist/evm/adapters/types.d.ts.map +1 -1
- package/dist/evm/aeraContracts/priceAndFeeCalculator.d.ts +41 -0
- package/dist/evm/aeraContracts/priceAndFeeCalculator.d.ts.map +1 -0
- package/dist/evm/aeraContracts/priceAndFeeCalculator.js +140 -0
- package/dist/evm/aeraContracts/priceAndFeeCalculator.js.map +1 -0
- package/dist/evm/aeraContracts/v1.d.ts +2317 -0
- package/dist/evm/aeraContracts/v1.d.ts.map +1 -0
- package/dist/evm/aeraContracts/v1.js +59 -0
- package/dist/evm/aeraContracts/v1.js.map +1 -0
- package/dist/evm/aeraContracts/v2.d.ts +2802 -0
- package/dist/evm/aeraContracts/v2.d.ts.map +1 -0
- package/dist/evm/aeraContracts/v2.js +217 -0
- package/dist/evm/aeraContracts/v2.js.map +1 -0
- package/dist/evm/aeraContracts.d.ts +23 -2316
- package/dist/evm/aeraContracts.d.ts.map +1 -1
- package/dist/evm/aeraContracts.js +117 -24
- package/dist/evm/aeraContracts.js.map +1 -1
- package/dist/evm/deposit.d.ts +5 -1
- package/dist/evm/deposit.d.ts.map +1 -1
- package/dist/evm/deposit.js +28 -14
- package/dist/evm/deposit.js.map +1 -1
- package/dist/evm/depositReceiverApproval.d.ts +17 -0
- package/dist/evm/depositReceiverApproval.d.ts.map +1 -0
- package/dist/evm/depositReceiverApproval.js +32 -0
- package/dist/evm/depositReceiverApproval.js.map +1 -0
- package/dist/evm/index.d.ts +8 -1
- package/dist/evm/index.d.ts.map +1 -1
- package/dist/evm/index.js +4 -0
- package/dist/evm/index.js.map +1 -1
- package/dist/evm/operationMode.d.ts +9 -0
- package/dist/evm/operationMode.d.ts.map +1 -0
- package/dist/evm/operationMode.js +41 -0
- package/dist/evm/operationMode.js.map +1 -0
- package/dist/evm/types.d.ts +7 -3
- package/dist/evm/types.d.ts.map +1 -1
- package/dist/evm/types.js +4 -1
- package/dist/evm/types.js.map +1 -1
- package/dist/evm/userCurrentBalance.d.ts.map +1 -1
- package/dist/evm/userCurrentBalance.js +68 -58
- package/dist/evm/userCurrentBalance.js.map +1 -1
- package/dist/evm/withdraw.d.ts +5 -1
- package/dist/evm/withdraw.d.ts.map +1 -1
- package/dist/evm/withdraw.js +25 -13
- package/dist/evm/withdraw.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/manifest/vaults.json +31 -139
- package/package.json +1 -1
- package/src/constants.ts +32 -0
- package/src/errors.ts +44 -5
- package/src/evm/abis/priceAndFeeCalculatorV2.ts +118 -0
- package/src/evm/abis/provisionerV2.ts +202 -0
- package/src/evm/adapters/aera.ts +419 -137
- package/src/evm/adapters/types.ts +19 -1
- package/src/evm/aeraContracts/priceAndFeeCalculator.ts +223 -0
- package/src/evm/aeraContracts/v1.ts +157 -0
- package/src/evm/aeraContracts/v2.ts +466 -0
- package/src/evm/aeraContracts.ts +173 -52
- package/src/evm/deposit.ts +48 -16
- package/src/evm/depositReceiverApproval.ts +51 -0
- package/src/evm/index.ts +23 -1
- package/src/evm/operationMode.ts +60 -0
- package/src/evm/types.ts +9 -3
- package/src/evm/userCurrentBalance.ts +80 -55
- package/src/evm/withdraw.ts +42 -15
- package/src/index.ts +19 -0
package/package.json
CHANGED
package/src/constants.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const MAX_BPS = 10000n;
|
|
2
|
+
export const DEFAULT_BPS = 100;
|
|
3
|
+
|
|
4
|
+
export const SECOND = 1;
|
|
5
|
+
export const MINUTE = SECOND * 60;
|
|
6
|
+
export const HOUR = MINUTE * 60;
|
|
7
|
+
export const DAY = HOUR * 24;
|
|
8
|
+
|
|
9
|
+
export const REQUEST_DEADLINE_BUFFER_DAYS = 3;
|
|
10
|
+
export const DEFAULT_MAX_PRICE_AGE_DAYS = 10;
|
|
11
|
+
export const DEFAULT_SOLVER_TIP = 0n;
|
|
12
|
+
export const DEFAULT_REQUEST_DEADLINE_BUFFER = DAY * REQUEST_DEADLINE_BUFFER_DAYS;
|
|
13
|
+
export const DEFAULT_MAX_PRICE_AGE = BigInt(DAY * DEFAULT_MAX_PRICE_AGE_DAYS);
|
|
14
|
+
|
|
15
|
+
export const CHAIN_NAMES: Record<number, string> = {
|
|
16
|
+
1: 'ethereum',
|
|
17
|
+
8453: 'base',
|
|
18
|
+
42161: 'arbitrum',
|
|
19
|
+
10: 'optimism',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// Approximate 3-day block lookback per chain based on avg block time.
|
|
23
|
+
export const BLOCKS_3_DAYS: Record<number, bigint> = {
|
|
24
|
+
1: 21_600n,
|
|
25
|
+
8453: 129_600n,
|
|
26
|
+
42161: 1_036_800n,
|
|
27
|
+
10: 129_600n,
|
|
28
|
+
};
|
|
29
|
+
export const DEFAULT_BLOCKS_3_DAYS = 129_600n;
|
|
30
|
+
|
|
31
|
+
// Many RPC providers cap eth_getLogs to 10,000 blocks per request.
|
|
32
|
+
export const LOG_PAGE_SIZE = 9_999n;
|
package/src/errors.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ChainId } from './client';
|
|
1
|
+
import type { ChainId } from './client';
|
|
2
|
+
import { MAX_BPS } from './constants';
|
|
2
3
|
|
|
3
4
|
export class GauntletSDKError extends Error {
|
|
4
5
|
constructor(message: string) {
|
|
@@ -48,10 +49,10 @@ export class ChainMismatchError extends GauntletSDKError {
|
|
|
48
49
|
|
|
49
50
|
export class UnsupportedDepositModeError extends GauntletSDKError {
|
|
50
51
|
readonly vaultId: string;
|
|
51
|
-
readonly requested:
|
|
52
|
+
readonly requested: string;
|
|
52
53
|
readonly available: string;
|
|
53
54
|
|
|
54
|
-
constructor(vaultId: string, requested:
|
|
55
|
+
constructor(vaultId: string, requested: string, available: string) {
|
|
55
56
|
super(`Vault "${vaultId}" does not support ${requested} deposits (available: ${available})`);
|
|
56
57
|
this.name = 'UnsupportedDepositModeError';
|
|
57
58
|
this.vaultId = vaultId;
|
|
@@ -109,7 +110,7 @@ export class UnsupportedFeatureError extends GauntletSDKError {
|
|
|
109
110
|
|
|
110
111
|
constructor(feature: string) {
|
|
111
112
|
super(`Feature not supported: "${feature}"`);
|
|
112
|
-
this.name = '
|
|
113
|
+
this.name = 'UnsupportedFeatureError';
|
|
113
114
|
this.feature = feature;
|
|
114
115
|
}
|
|
115
116
|
}
|
|
@@ -124,11 +125,49 @@ export class UnitConversionError extends GauntletSDKError {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
|
|
128
|
+
export class StalePriceError extends GauntletSDKError {
|
|
129
|
+
readonly blockTimestamp: bigint;
|
|
130
|
+
readonly maxPriceAge: bigint;
|
|
131
|
+
readonly priceTimestamp: bigint;
|
|
132
|
+
|
|
133
|
+
constructor({
|
|
134
|
+
blockTimestamp,
|
|
135
|
+
maxPriceAge,
|
|
136
|
+
priceTimestamp,
|
|
137
|
+
}: {
|
|
138
|
+
blockTimestamp: bigint;
|
|
139
|
+
maxPriceAge: bigint;
|
|
140
|
+
priceTimestamp: bigint;
|
|
141
|
+
}) {
|
|
142
|
+
super(
|
|
143
|
+
`Price is stale: timestamp "${priceTimestamp}" with max age "${maxPriceAge}" is older than block timestamp "${blockTimestamp}"`
|
|
144
|
+
);
|
|
145
|
+
this.name = 'StalePriceError';
|
|
146
|
+
this.blockTimestamp = blockTimestamp;
|
|
147
|
+
this.maxPriceAge = maxPriceAge;
|
|
148
|
+
this.priceTimestamp = priceTimestamp;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export class InvalidSolverTipError extends GauntletSDKError {
|
|
153
|
+
readonly solverTip: bigint;
|
|
154
|
+
readonly availableAmount: bigint;
|
|
155
|
+
|
|
156
|
+
constructor(solverTip: bigint, availableAmount: bigint) {
|
|
157
|
+
super(
|
|
158
|
+
`Solver tip "${solverTip}" must be less than available token amount "${availableAmount}"`
|
|
159
|
+
);
|
|
160
|
+
this.name = 'InvalidSolverTipError';
|
|
161
|
+
this.solverTip = solverTip;
|
|
162
|
+
this.availableAmount = availableAmount;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
127
166
|
export class InvalidSlippageBPSError extends GauntletSDKError {
|
|
128
167
|
readonly slippage: number;
|
|
129
168
|
|
|
130
169
|
constructor(slippage: number) {
|
|
131
|
-
super(`Slippage not in range of
|
|
170
|
+
super(`Slippage not in range of 0-${Number(MAX_BPS)}; argument passed: ${slippage}`);
|
|
132
171
|
this.name = 'IncorrectArgument';
|
|
133
172
|
this.slippage = slippage;
|
|
134
173
|
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// Compact ABI derived from aera-finance/aera-contracts-v3@f4e3433058c29c3a0b1348ffbd358cc036a1687f
|
|
2
|
+
// source: src/core/interfaces/IPriceAndFeeCalculatorV2.sol
|
|
3
|
+
export const priceAndFeeCalculatorV2Abi = [
|
|
4
|
+
{
|
|
5
|
+
type: 'function',
|
|
6
|
+
inputs: [
|
|
7
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
8
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
9
|
+
{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' },
|
|
10
|
+
],
|
|
11
|
+
name: 'convertTokenToUnits',
|
|
12
|
+
outputs: [{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' }],
|
|
13
|
+
stateMutability: 'view',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: 'function',
|
|
17
|
+
inputs: [
|
|
18
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
19
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
20
|
+
{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' },
|
|
21
|
+
{ name: 'rounding', internalType: 'enum Math.Rounding', type: 'uint8' },
|
|
22
|
+
],
|
|
23
|
+
name: 'convertTokenToUnitsIfActive',
|
|
24
|
+
outputs: [{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' }],
|
|
25
|
+
stateMutability: 'view',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: 'function',
|
|
29
|
+
inputs: [
|
|
30
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
31
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
32
|
+
{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' },
|
|
33
|
+
],
|
|
34
|
+
name: 'convertUnitsToToken',
|
|
35
|
+
outputs: [{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' }],
|
|
36
|
+
stateMutability: 'view',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: 'function',
|
|
40
|
+
inputs: [
|
|
41
|
+
{ name: 'vault', internalType: 'address', type: 'address' },
|
|
42
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
43
|
+
{ name: 'unitsAmount', internalType: 'uint256', type: 'uint256' },
|
|
44
|
+
{ name: 'rounding', internalType: 'enum Math.Rounding', type: 'uint8' },
|
|
45
|
+
],
|
|
46
|
+
name: 'convertUnitsToTokenIfActive',
|
|
47
|
+
outputs: [{ name: 'tokenAmount', internalType: 'uint256', type: 'uint256' }],
|
|
48
|
+
stateMutability: 'view',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'function',
|
|
52
|
+
inputs: [{ name: 'vault', internalType: 'address', type: 'address' }],
|
|
53
|
+
name: 'getAnchorTimestamp',
|
|
54
|
+
outputs: [{ name: 'timestamp', internalType: 'uint32', type: 'uint32' }],
|
|
55
|
+
stateMutability: 'view',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: 'function',
|
|
59
|
+
inputs: [{ name: 'vault', internalType: 'address', type: 'address' }],
|
|
60
|
+
name: 'getVaultState',
|
|
61
|
+
outputs: [
|
|
62
|
+
{
|
|
63
|
+
name: '',
|
|
64
|
+
internalType: 'struct VaultPriceStateV2',
|
|
65
|
+
type: 'tuple',
|
|
66
|
+
components: [
|
|
67
|
+
{ name: 'paused', internalType: 'bool', type: 'bool' },
|
|
68
|
+
{ name: 'pauseOnBadAnchorUpdate', internalType: 'bool', type: 'bool' },
|
|
69
|
+
{ name: 'maxPriceAge', internalType: 'uint16', type: 'uint16' },
|
|
70
|
+
{ name: 'minUpdateIntervalMinutes', internalType: 'uint16', type: 'uint16' },
|
|
71
|
+
{ name: 'maxPriceToleranceRatio', internalType: 'uint16', type: 'uint16' },
|
|
72
|
+
{ name: 'minPriceToleranceRatio', internalType: 'uint16', type: 'uint16' },
|
|
73
|
+
{ name: 'maxUpdateDelayDays', internalType: 'uint8', type: 'uint8' },
|
|
74
|
+
{ name: 'accrualLag', internalType: 'uint32', type: 'uint32' },
|
|
75
|
+
{ name: 'anchorTimestamp', internalType: 'uint32', type: 'uint32' },
|
|
76
|
+
{ name: 'driftTimestamp', internalType: 'uint32', type: 'uint32' },
|
|
77
|
+
{ name: 'anchorPrice', internalType: 'uint128', type: 'uint128' },
|
|
78
|
+
{ name: 'driftPrice', internalType: 'uint128', type: 'uint128' },
|
|
79
|
+
{ name: 'highestPrice', internalType: 'uint128', type: 'uint128' },
|
|
80
|
+
{ name: 'lastTotalSupply', internalType: 'uint128', type: 'uint128' },
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: '',
|
|
85
|
+
internalType: 'struct VaultAccruals',
|
|
86
|
+
type: 'tuple',
|
|
87
|
+
components: [
|
|
88
|
+
{
|
|
89
|
+
name: 'fees',
|
|
90
|
+
internalType: 'struct Fee',
|
|
91
|
+
type: 'tuple',
|
|
92
|
+
components: [
|
|
93
|
+
{ name: 'tvl', internalType: 'uint16', type: 'uint16' },
|
|
94
|
+
{ name: 'performance', internalType: 'uint16', type: 'uint16' },
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
{ name: 'accruedFees', internalType: 'uint112', type: 'uint112' },
|
|
98
|
+
{ name: 'accruedProtocolFees', internalType: 'uint112', type: 'uint112' },
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
stateMutability: 'view',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'function',
|
|
106
|
+
inputs: [{ name: 'vault', internalType: 'address', type: 'address' }],
|
|
107
|
+
name: 'isVaultPaused',
|
|
108
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
|
109
|
+
stateMutability: 'view',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'function',
|
|
113
|
+
inputs: [],
|
|
114
|
+
name: 'version',
|
|
115
|
+
outputs: [{ name: '', internalType: 'string', type: 'string' }],
|
|
116
|
+
stateMutability: 'pure',
|
|
117
|
+
},
|
|
118
|
+
] as const;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
// Compact ABI derived from aera-finance/aera-contracts-v3@f4e3433058c29c3a0b1348ffbd358cc036a1687f
|
|
2
|
+
// source: src/core/interfaces/IProvisionerV2.sol
|
|
3
|
+
export const provisionerV2Abi = [
|
|
4
|
+
{
|
|
5
|
+
type: 'function',
|
|
6
|
+
inputs: [
|
|
7
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
8
|
+
{ name: 'tokensIn', internalType: 'uint256', type: 'uint256' },
|
|
9
|
+
{ name: 'minUnitsOut', internalType: 'uint256', type: 'uint256' },
|
|
10
|
+
{ name: 'receiver', internalType: 'address', type: 'address' },
|
|
11
|
+
],
|
|
12
|
+
name: 'deposit',
|
|
13
|
+
outputs: [{ name: 'unitsOut', internalType: 'uint256', type: 'uint256' }],
|
|
14
|
+
stateMutability: 'nonpayable',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
type: 'function',
|
|
18
|
+
inputs: [
|
|
19
|
+
{ name: 'receiver', internalType: 'address', type: 'address' },
|
|
20
|
+
{ name: 'depositor', internalType: 'address', type: 'address' },
|
|
21
|
+
],
|
|
22
|
+
name: 'depositReceiverApprovals',
|
|
23
|
+
outputs: [{ name: 'approved', internalType: 'bool', type: 'bool' }],
|
|
24
|
+
stateMutability: 'view',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: 'function',
|
|
28
|
+
inputs: [
|
|
29
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
30
|
+
{ name: 'tokensIn', internalType: 'uint256', type: 'uint256' },
|
|
31
|
+
{ name: 'minUnitsOut', internalType: 'uint256', type: 'uint256' },
|
|
32
|
+
{ name: 'solverTip', internalType: 'uint256', type: 'uint256' },
|
|
33
|
+
{ name: 'deadline', internalType: 'uint256', type: 'uint256' },
|
|
34
|
+
{ name: 'maxPriceAge', internalType: 'uint256', type: 'uint256' },
|
|
35
|
+
{ name: 'isFixedPrice', internalType: 'bool', type: 'bool' },
|
|
36
|
+
{ name: 'receiver', internalType: 'address', type: 'address' },
|
|
37
|
+
],
|
|
38
|
+
name: 'requestDeposit',
|
|
39
|
+
outputs: [{ name: 'depositRequestHash', internalType: 'bytes32', type: 'bytes32' }],
|
|
40
|
+
stateMutability: 'nonpayable',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'function',
|
|
44
|
+
inputs: [],
|
|
45
|
+
name: 'getSyncRedeemDetails',
|
|
46
|
+
outputs: [
|
|
47
|
+
{ name: 'maxPriceAge', internalType: 'uint24', type: 'uint24' },
|
|
48
|
+
{ name: 'relativeCapBps', internalType: 'uint16', type: 'uint16' },
|
|
49
|
+
{ name: 'maxDynamicPremiumBps', internalType: 'uint16', type: 'uint16' },
|
|
50
|
+
{ name: 'epochTimestamp', internalType: 'uint32', type: 'uint32' },
|
|
51
|
+
{ name: 'absoluteCapNumeraire', internalType: 'uint80', type: 'uint80' },
|
|
52
|
+
{ name: 'epochRedeemedNumeraire', internalType: 'uint80', type: 'uint80' },
|
|
53
|
+
],
|
|
54
|
+
stateMutability: 'view',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'function',
|
|
58
|
+
inputs: [
|
|
59
|
+
{ name: 'depositor', internalType: 'address', type: 'address' },
|
|
60
|
+
{ name: 'approved', internalType: 'bool', type: 'bool' },
|
|
61
|
+
],
|
|
62
|
+
name: 'setDepositReceiverApproval',
|
|
63
|
+
outputs: [],
|
|
64
|
+
stateMutability: 'nonpayable',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: 'function',
|
|
68
|
+
inputs: [{ name: 'token', internalType: 'contract IERC20', type: 'address' }],
|
|
69
|
+
name: 'tokensDetails',
|
|
70
|
+
outputs: [
|
|
71
|
+
{ name: 'asyncDepositEnabled', internalType: 'bool', type: 'bool' },
|
|
72
|
+
{ name: 'asyncRedeemEnabled', internalType: 'bool', type: 'bool' },
|
|
73
|
+
{ name: 'syncDepositEnabled', internalType: 'bool', type: 'bool' },
|
|
74
|
+
{ name: 'syncRedeemEnabled', internalType: 'bool', type: 'bool' },
|
|
75
|
+
{ name: 'asyncDepositMultiplier', internalType: 'uint16', type: 'uint16' },
|
|
76
|
+
{ name: 'asyncRedeemMultiplier', internalType: 'uint16', type: 'uint16' },
|
|
77
|
+
{ name: 'syncDepositMultiplier', internalType: 'uint16', type: 'uint16' },
|
|
78
|
+
{ name: 'syncRedeemMultiplier', internalType: 'uint16', type: 'uint16' },
|
|
79
|
+
{
|
|
80
|
+
name: 'pushFundsSubmitDataPointer',
|
|
81
|
+
internalType: 'address',
|
|
82
|
+
type: 'address',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'pullFundsSubmitDataPointer',
|
|
86
|
+
internalType: 'address',
|
|
87
|
+
type: 'address',
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
stateMutability: 'view',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: 'function',
|
|
94
|
+
inputs: [
|
|
95
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
96
|
+
{ name: 'unitsIn', internalType: 'uint256', type: 'uint256' },
|
|
97
|
+
{ name: 'minTokensOut', internalType: 'uint256', type: 'uint256' },
|
|
98
|
+
{ name: 'solverTip', internalType: 'uint256', type: 'uint256' },
|
|
99
|
+
{ name: 'deadline', internalType: 'uint256', type: 'uint256' },
|
|
100
|
+
{ name: 'maxPriceAge', internalType: 'uint256', type: 'uint256' },
|
|
101
|
+
{ name: 'isFixedPrice', internalType: 'bool', type: 'bool' },
|
|
102
|
+
{ name: 'receiver', internalType: 'address', type: 'address' },
|
|
103
|
+
],
|
|
104
|
+
name: 'requestRedeem',
|
|
105
|
+
outputs: [{ name: 'redeemRequestHash', internalType: 'bytes32', type: 'bytes32' }],
|
|
106
|
+
stateMutability: 'nonpayable',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'function',
|
|
110
|
+
inputs: [
|
|
111
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
112
|
+
{ name: 'unitsIn', internalType: 'uint256', type: 'uint256' },
|
|
113
|
+
{ name: 'minTokensOut', internalType: 'uint256', type: 'uint256' },
|
|
114
|
+
{ name: 'receiver', internalType: 'address', type: 'address' },
|
|
115
|
+
],
|
|
116
|
+
name: 'redeem',
|
|
117
|
+
outputs: [{ name: 'tokensOut', internalType: 'uint256', type: 'uint256' }],
|
|
118
|
+
stateMutability: 'nonpayable',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'function',
|
|
122
|
+
inputs: [
|
|
123
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address' },
|
|
124
|
+
{ name: 'tokensOut', internalType: 'uint256', type: 'uint256' },
|
|
125
|
+
{ name: 'maxUnitsIn', internalType: 'uint256', type: 'uint256' },
|
|
126
|
+
{ name: 'receiver', internalType: 'address', type: 'address' },
|
|
127
|
+
],
|
|
128
|
+
name: 'withdraw',
|
|
129
|
+
outputs: [{ name: 'unitsIn', internalType: 'uint256', type: 'uint256' }],
|
|
130
|
+
stateMutability: 'nonpayable',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'function',
|
|
134
|
+
inputs: [{ name: 'asyncRequestHash', internalType: 'bytes32', type: 'bytes32' }],
|
|
135
|
+
name: 'asyncRequestHashes',
|
|
136
|
+
outputs: [{ name: 'exists', internalType: 'bool', type: 'bool' }],
|
|
137
|
+
stateMutability: 'view',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'function',
|
|
141
|
+
inputs: [],
|
|
142
|
+
name: 'version',
|
|
143
|
+
outputs: [{ name: '', internalType: 'string', type: 'string' }],
|
|
144
|
+
stateMutability: 'pure',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: 'event',
|
|
148
|
+
inputs: [
|
|
149
|
+
{ name: 'user', internalType: 'address', type: 'address', indexed: true },
|
|
150
|
+
{ name: 'receiver', internalType: 'address', type: 'address', indexed: true },
|
|
151
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address', indexed: true },
|
|
152
|
+
{ name: 'tokensIn', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
153
|
+
{ name: 'minUnitsOut', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
154
|
+
{ name: 'solverTip', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
155
|
+
{ name: 'deadline', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
156
|
+
{ name: 'maxPriceAge', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
157
|
+
{ name: 'isFixedPrice', internalType: 'bool', type: 'bool', indexed: false },
|
|
158
|
+
{ name: 'depositRequestHash', internalType: 'bytes32', type: 'bytes32', indexed: false },
|
|
159
|
+
],
|
|
160
|
+
name: 'DepositRequested',
|
|
161
|
+
anonymous: false,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'event',
|
|
165
|
+
inputs: [
|
|
166
|
+
{ name: 'receiver', internalType: 'address', type: 'address', indexed: true },
|
|
167
|
+
{ name: 'depositor', internalType: 'address', type: 'address', indexed: true },
|
|
168
|
+
{ name: 'approved', internalType: 'bool', type: 'bool', indexed: false },
|
|
169
|
+
],
|
|
170
|
+
name: 'DepositReceiverApprovalSet',
|
|
171
|
+
anonymous: false,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
type: 'event',
|
|
175
|
+
inputs: [
|
|
176
|
+
{ name: 'user', internalType: 'address', type: 'address', indexed: true },
|
|
177
|
+
{ name: 'receiver', internalType: 'address', type: 'address', indexed: true },
|
|
178
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address', indexed: true },
|
|
179
|
+
{ name: 'minTokensOut', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
180
|
+
{ name: 'unitsIn', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
181
|
+
{ name: 'solverTip', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
182
|
+
{ name: 'deadline', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
183
|
+
{ name: 'maxPriceAge', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
184
|
+
{ name: 'isFixedPrice', internalType: 'bool', type: 'bool', indexed: false },
|
|
185
|
+
{ name: 'redeemRequestHash', internalType: 'bytes32', type: 'bytes32', indexed: false },
|
|
186
|
+
],
|
|
187
|
+
name: 'RedeemRequested',
|
|
188
|
+
anonymous: false,
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
type: 'event',
|
|
192
|
+
inputs: [
|
|
193
|
+
{ name: 'user', internalType: 'address', type: 'address', indexed: true },
|
|
194
|
+
{ name: 'receiver', internalType: 'address', type: 'address', indexed: true },
|
|
195
|
+
{ name: 'token', internalType: 'contract IERC20', type: 'address', indexed: true },
|
|
196
|
+
{ name: 'unitsIn', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
197
|
+
{ name: 'tokensOut', internalType: 'uint256', type: 'uint256', indexed: false },
|
|
198
|
+
],
|
|
199
|
+
name: 'Redeemed',
|
|
200
|
+
anonymous: false,
|
|
201
|
+
},
|
|
202
|
+
] as const;
|