@enzymefinance/testutils 4.0.0-next.2 → 4.0.0-next.7
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +32 -0
- package/dist/declarations/src/assertions.d.ts +2 -2
- package/dist/declarations/src/deployment.d.ts +172 -68
- package/dist/declarations/src/gasRelayer.d.ts +14 -12
- package/dist/declarations/src/helpers.d.ts +5 -4
- package/dist/declarations/src/scaffolding/assets.d.ts +4 -4
- package/dist/declarations/src/scaffolding/chainlink.d.ts +2 -2
- package/dist/declarations/src/scaffolding/common.d.ts +1 -1
- package/dist/declarations/src/scaffolding/core.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/common.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/external-positions/actions.d.ts +8 -6
- package/dist/declarations/src/scaffolding/extensions/external-positions/compound.d.ts +5 -5
- package/dist/declarations/src/scaffolding/extensions/external-positions/index.d.ts +1 -0
- package/dist/declarations/src/scaffolding/extensions/external-positions/mocks.d.ts +16 -12
- package/dist/declarations/src/scaffolding/extensions/external-positions/uniswap-v3-liquidity.d.ts +100 -0
- package/dist/declarations/src/scaffolding/extensions/fees.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/integrations/aave.d.ts +6 -5
- package/dist/declarations/src/scaffolding/extensions/integrations/compound.d.ts +33 -5
- package/dist/declarations/src/scaffolding/extensions/integrations/curve.d.ts +101 -84
- package/dist/declarations/src/scaffolding/extensions/integrations/idle.d.ts +6 -6
- package/dist/declarations/src/scaffolding/extensions/integrations/index.d.ts +3 -0
- package/dist/declarations/src/scaffolding/extensions/integrations/mock.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/integrations/olympusV2.d.ts +17 -0
- package/dist/declarations/src/scaffolding/extensions/integrations/paraSwapV4.d.ts +6 -5
- package/dist/declarations/src/scaffolding/extensions/integrations/paraSwapV5.d.ts +23 -0
- package/dist/declarations/src/scaffolding/extensions/integrations/poolTogetherV4.d.ts +29 -0
- package/dist/declarations/src/scaffolding/extensions/integrations/synthetix.d.ts +15 -12
- package/dist/declarations/src/scaffolding/extensions/integrations/trackedAssets.d.ts +3 -3
- package/dist/declarations/src/scaffolding/extensions/integrations/uniswapV2.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/integrations/uniswapV3.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/integrations/yearn.d.ts +5 -5
- package/dist/declarations/src/scaffolding/extensions/integrations/zeroExV2.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/policies.d.ts +9 -9
- package/dist/declarations/src/scaffolding/setup.d.ts +11 -9
- package/dist/declarations/src/scaffolding/shares.d.ts +4 -4
- package/dist/declarations/src/scaffolding/vaultCalls.d.ts +11 -2
- package/dist/declarations/src/whales.d.ts +24 -19
- package/dist/enzymefinance-testutils.browser.cjs.js +1541 -673
- package/dist/enzymefinance-testutils.browser.esm.js +1502 -655
- package/dist/enzymefinance-testutils.cjs.dev.js +1541 -673
- package/dist/enzymefinance-testutils.cjs.prod.js +1541 -673
- package/dist/enzymefinance-testutils.esm.js +1502 -655
- package/package.json +6 -6
- package/src/assertions.ts +5 -2
- package/src/deployment.ts +221 -120
- package/src/gasRelayer.ts +17 -18
- package/src/helpers.ts +6 -4
- package/src/scaffolding/assets.ts +7 -6
- package/src/scaffolding/chainlink.ts +2 -2
- package/src/scaffolding/common.ts +1 -1
- package/src/scaffolding/core.ts +4 -8
- package/src/scaffolding/extensions/common.ts +4 -4
- package/src/scaffolding/extensions/external-positions/actions.ts +14 -9
- package/src/scaffolding/extensions/external-positions/compound.ts +28 -29
- package/src/scaffolding/extensions/external-positions/index.ts +1 -0
- package/src/scaffolding/extensions/external-positions/mocks.ts +32 -36
- package/src/scaffolding/extensions/external-positions/uniswap-v3-liquidity.ts +284 -0
- package/src/scaffolding/extensions/fees.ts +1 -1
- package/src/scaffolding/extensions/integrations/aave.ts +6 -8
- package/src/scaffolding/extensions/integrations/compound.ts +171 -11
- package/src/scaffolding/extensions/integrations/curve.ts +303 -255
- package/src/scaffolding/extensions/integrations/idle.ts +9 -11
- package/src/scaffolding/extensions/integrations/index.ts +3 -0
- package/src/scaffolding/extensions/integrations/mock.ts +11 -13
- package/src/scaffolding/extensions/integrations/olympusV2.ts +71 -0
- package/src/scaffolding/extensions/integrations/paraSwapV4.ts +16 -11
- package/src/scaffolding/extensions/integrations/paraSwapV5.ts +73 -0
- package/src/scaffolding/extensions/integrations/poolTogetherV4.ts +117 -0
- package/src/scaffolding/extensions/integrations/synthetix.ts +45 -31
- package/src/scaffolding/extensions/integrations/trackedAssets.ts +3 -4
- package/src/scaffolding/extensions/integrations/uniswapV2.ts +22 -19
- package/src/scaffolding/extensions/integrations/uniswapV3.ts +9 -10
- package/src/scaffolding/extensions/integrations/yearn.ts +9 -11
- package/src/scaffolding/extensions/integrations/zeroExV2.ts +9 -7
- package/src/scaffolding/extensions/policies.ts +2 -1
- package/src/scaffolding/setup.ts +27 -13
- package/src/scaffolding/shares.ts +5 -4
- package/src/scaffolding/vaultCalls.ts +32 -2
- package/src/types.d.ts +1 -0
- package/src/whales.ts +36 -18
@@ -1,32 +1,37 @@
|
|
1
|
-
import { AddressLike, Call, Contract,
|
2
|
-
import {
|
1
|
+
import type { AddressLike, Call, Contract, Send } from '@enzymefinance/ethers';
|
2
|
+
import { contract } from '@enzymefinance/ethers';
|
3
|
+
import type { SignerWithAddress } from '@enzymefinance/hardhat';
|
4
|
+
import type {
|
5
|
+
ComptrollerLib,
|
6
|
+
CurveExchangeAdapter,
|
7
|
+
CurveLiquidityAaveAdapter,
|
8
|
+
CurveLiquidityAdapter,
|
9
|
+
CurveLiquiditySethAdapter,
|
10
|
+
CurveLiquidityStethAdapter,
|
11
|
+
CurveRedeemType,
|
12
|
+
IntegrationManager,
|
13
|
+
StandardToken,
|
14
|
+
} from '@enzymefinance/protocol';
|
3
15
|
import {
|
4
16
|
callOnIntegrationArgs,
|
5
17
|
claimRewardsSelector,
|
6
|
-
ComptrollerLib,
|
7
18
|
curveAaveLendAndStakeArgs,
|
8
19
|
curveAaveLendArgs,
|
9
20
|
curveAaveRedeemArgs,
|
10
21
|
curveAaveStakeArgs,
|
11
22
|
curveAaveUnstakeAndRedeemArgs,
|
12
23
|
curveAaveUnstakeArgs,
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
curveEursUnstakeAndRedeemArgs,
|
18
|
-
curveEursUnstakeArgs,
|
19
|
-
CurveExchangeAdapter,
|
20
|
-
CurveLiquidityAaveAdapter,
|
21
|
-
CurveLiquidityEursAdapter,
|
22
|
-
CurveLiquiditySethAdapter,
|
23
|
-
CurveLiquidityStethAdapter,
|
24
|
+
curveClaimRewardsArgs,
|
25
|
+
curveLendAndStakeArgs,
|
26
|
+
curveLendArgs,
|
27
|
+
curveRedeemArgs,
|
24
28
|
curveSethLendAndStakeArgs,
|
25
29
|
curveSethLendArgs,
|
26
30
|
curveSethRedeemArgs,
|
27
31
|
curveSethStakeArgs,
|
28
32
|
curveSethUnstakeAndRedeemArgs,
|
29
33
|
curveSethUnstakeArgs,
|
34
|
+
curveStakeArgs,
|
30
35
|
curveStethLendAndStakeArgs,
|
31
36
|
curveStethLendArgs,
|
32
37
|
curveStethRedeemArgs,
|
@@ -34,18 +39,19 @@ import {
|
|
34
39
|
curveStethUnstakeAndRedeemArgs,
|
35
40
|
curveStethUnstakeArgs,
|
36
41
|
curveTakeOrderArgs,
|
37
|
-
|
42
|
+
curveUnstakeAndRedeemArgs,
|
43
|
+
curveUnstakeArgs,
|
38
44
|
IntegrationManagerActionId,
|
39
45
|
lendAndStakeSelector,
|
40
46
|
lendSelector,
|
41
47
|
redeemSelector,
|
42
48
|
stakeSelector,
|
43
|
-
StandardToken,
|
44
49
|
takeOrderSelector,
|
45
50
|
unstakeAndRedeemSelector,
|
46
51
|
unstakeSelector,
|
47
52
|
} from '@enzymefinance/protocol';
|
48
|
-
import {
|
53
|
+
import type { BigNumberish, BytesLike } from 'ethers';
|
54
|
+
import { BigNumber, constants, utils } from 'ethers';
|
49
55
|
|
50
56
|
export interface CurveLiquidityGaugeV2 extends Contract<CurveLiquidityGaugeV2> {
|
51
57
|
claim_rewards: Send<(_addr: AddressLike) => void>;
|
@@ -57,6 +63,16 @@ export const CurveLiquidityGaugeV2 = contract<CurveLiquidityGaugeV2>()`
|
|
57
63
|
function integrate_fraction(address) view returns (uint256)
|
58
64
|
`;
|
59
65
|
|
66
|
+
export interface CurveRegistry extends Contract<CurveRegistry> {
|
67
|
+
get_coins: Call<(_pool: AddressLike) => AddressLike[], Contract<any>>;
|
68
|
+
get_lp_token: Call<(_pool: AddressLike) => AddressLike, Contract<any>>;
|
69
|
+
}
|
70
|
+
|
71
|
+
export const CurveRegistry = contract<CurveRegistry>()`
|
72
|
+
function get_coins(address) view returns (address[8])
|
73
|
+
function get_lp_token(address) view returns (address)
|
74
|
+
`;
|
75
|
+
|
60
76
|
// prettier-ignore
|
61
77
|
export interface CurveSwaps extends Contract<CurveSwaps> {
|
62
78
|
get_best_rate: Call<(_from: AddressLike, to: AddressLike, amount: BigNumberish) => { bestPool: AddressLike, amountReceived: BigNumber }, CurveSwaps>
|
@@ -98,17 +114,17 @@ export async function curveTakeOrder({
|
|
98
114
|
minIncomingAssetAmount?: BigNumberish;
|
99
115
|
}) {
|
100
116
|
const takeOrderArgs = curveTakeOrderArgs({
|
117
|
+
incomingAsset,
|
118
|
+
minIncomingAssetAmount,
|
119
|
+
outgoingAsset,
|
120
|
+
outgoingAssetAmount,
|
101
121
|
pool,
|
102
|
-
outgoingAsset: outgoingAsset,
|
103
|
-
outgoingAssetAmount: outgoingAssetAmount,
|
104
|
-
incomingAsset: incomingAsset,
|
105
|
-
minIncomingAssetAmount: minIncomingAssetAmount,
|
106
122
|
});
|
107
123
|
|
108
124
|
const callArgs = callOnIntegrationArgs({
|
109
125
|
adapter: curveExchangeAdapter,
|
110
|
-
selector: takeOrderSelector,
|
111
126
|
encodedCallArgs: takeOrderArgs,
|
127
|
+
selector: takeOrderSelector,
|
112
128
|
});
|
113
129
|
|
114
130
|
return comptrollerProxy
|
@@ -116,23 +132,25 @@ export async function curveTakeOrder({
|
|
116
132
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
117
133
|
}
|
118
134
|
|
119
|
-
//
|
135
|
+
// combined liquidity
|
120
136
|
|
121
|
-
export function
|
137
|
+
export function curveClaimRewards({
|
122
138
|
comptrollerProxy,
|
123
139
|
integrationManager,
|
124
140
|
fundOwner,
|
125
|
-
|
141
|
+
curveLiquidityAdapter,
|
142
|
+
stakingToken,
|
126
143
|
}: {
|
127
144
|
comptrollerProxy: ComptrollerLib;
|
128
145
|
integrationManager: IntegrationManager;
|
129
146
|
fundOwner: SignerWithAddress;
|
130
|
-
|
147
|
+
curveLiquidityAdapter: CurveLiquidityAdapter;
|
148
|
+
stakingToken: AddressLike;
|
131
149
|
}) {
|
132
150
|
const callArgs = callOnIntegrationArgs({
|
133
|
-
adapter:
|
151
|
+
adapter: curveLiquidityAdapter,
|
152
|
+
encodedCallArgs: curveClaimRewardsArgs({ stakingToken }),
|
134
153
|
selector: claimRewardsSelector,
|
135
|
-
encodedCallArgs: constants.HashZero,
|
136
154
|
});
|
137
155
|
|
138
156
|
return comptrollerProxy
|
@@ -140,233 +158,239 @@ export function curveAaveClaimRewards({
|
|
140
158
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
141
159
|
}
|
142
160
|
|
143
|
-
export function
|
161
|
+
export async function curveLend({
|
144
162
|
comptrollerProxy,
|
145
163
|
integrationManager,
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
useUnderlyings = false,
|
164
|
+
signer,
|
165
|
+
curveLiquidityAdapter,
|
166
|
+
pool,
|
167
|
+
orderedOutgoingAssetAmounts,
|
168
|
+
minIncomingLpTokenAmount = BigNumber.from(1),
|
169
|
+
useUnderlyings,
|
153
170
|
}: {
|
154
171
|
comptrollerProxy: ComptrollerLib;
|
155
172
|
integrationManager: IntegrationManager;
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
useUnderlyings?: boolean;
|
173
|
+
signer: SignerWithAddress;
|
174
|
+
curveLiquidityAdapter: CurveLiquidityAdapter;
|
175
|
+
pool: AddressLike;
|
176
|
+
orderedOutgoingAssetAmounts: BigNumberish[];
|
177
|
+
minIncomingLpTokenAmount?: BigNumberish;
|
178
|
+
useUnderlyings: boolean;
|
163
179
|
}) {
|
164
180
|
const callArgs = callOnIntegrationArgs({
|
165
|
-
adapter:
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
outgoingAaveUsdtAmount,
|
171
|
-
minIncomingLPTokenAmount,
|
181
|
+
adapter: curveLiquidityAdapter,
|
182
|
+
encodedCallArgs: curveLendArgs({
|
183
|
+
minIncomingLpTokenAmount,
|
184
|
+
orderedOutgoingAssetAmounts,
|
185
|
+
pool,
|
172
186
|
useUnderlyings,
|
173
187
|
}),
|
188
|
+
selector: lendSelector,
|
174
189
|
});
|
175
190
|
|
176
191
|
return comptrollerProxy
|
177
|
-
.connect(
|
192
|
+
.connect(signer)
|
178
193
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
179
194
|
}
|
180
195
|
|
181
|
-
export function
|
196
|
+
export async function curveLendAndStake({
|
182
197
|
comptrollerProxy,
|
183
198
|
integrationManager,
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
useUnderlyings
|
199
|
+
signer,
|
200
|
+
curveLiquidityAdapter,
|
201
|
+
pool,
|
202
|
+
orderedOutgoingAssetAmounts,
|
203
|
+
incomingStakingToken,
|
204
|
+
minIncomingStakingTokenAmount = BigNumber.from(1),
|
205
|
+
useUnderlyings,
|
191
206
|
}: {
|
192
207
|
comptrollerProxy: ComptrollerLib;
|
193
208
|
integrationManager: IntegrationManager;
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
useUnderlyings
|
209
|
+
signer: SignerWithAddress;
|
210
|
+
curveLiquidityAdapter: CurveLiquidityAdapter;
|
211
|
+
pool: AddressLike;
|
212
|
+
orderedOutgoingAssetAmounts: BigNumberish[];
|
213
|
+
incomingStakingToken: AddressLike;
|
214
|
+
minIncomingStakingTokenAmount?: BigNumberish;
|
215
|
+
useUnderlyings: boolean;
|
201
216
|
}) {
|
202
217
|
const callArgs = callOnIntegrationArgs({
|
203
|
-
adapter:
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
minIncomingLiquidityGaugeTokenAmount,
|
218
|
+
adapter: curveLiquidityAdapter,
|
219
|
+
encodedCallArgs: curveLendAndStakeArgs({
|
220
|
+
incomingStakingToken,
|
221
|
+
minIncomingStakingTokenAmount,
|
222
|
+
orderedOutgoingAssetAmounts,
|
223
|
+
pool,
|
210
224
|
useUnderlyings,
|
211
225
|
}),
|
226
|
+
selector: lendAndStakeSelector,
|
212
227
|
});
|
213
228
|
|
214
229
|
return comptrollerProxy
|
215
|
-
.connect(
|
230
|
+
.connect(signer)
|
216
231
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
217
232
|
}
|
218
233
|
|
219
|
-
export function
|
234
|
+
export async function curveRedeem({
|
220
235
|
comptrollerProxy,
|
221
236
|
integrationManager,
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
useUnderlyings = false,
|
237
|
+
signer,
|
238
|
+
curveLiquidityAdapter,
|
239
|
+
pool,
|
240
|
+
outgoingLpTokenAmount,
|
241
|
+
useUnderlyings,
|
242
|
+
redeemType,
|
243
|
+
incomingAssetData,
|
230
244
|
}: {
|
231
245
|
comptrollerProxy: ComptrollerLib;
|
232
246
|
integrationManager: IntegrationManager;
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
useUnderlyings?: boolean;
|
247
|
+
signer: SignerWithAddress;
|
248
|
+
curveLiquidityAdapter: CurveLiquidityAdapter;
|
249
|
+
pool: AddressLike;
|
250
|
+
outgoingLpTokenAmount: BigNumberish;
|
251
|
+
useUnderlyings: boolean;
|
252
|
+
redeemType: CurveRedeemType;
|
253
|
+
incomingAssetData: BytesLike;
|
241
254
|
}) {
|
242
255
|
const callArgs = callOnIntegrationArgs({
|
243
|
-
adapter:
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
minIncomingAaveUsdtAmount,
|
250
|
-
receiveSingleAsset,
|
256
|
+
adapter: curveLiquidityAdapter,
|
257
|
+
encodedCallArgs: curveRedeemArgs({
|
258
|
+
incomingAssetData,
|
259
|
+
outgoingLpTokenAmount,
|
260
|
+
pool,
|
261
|
+
redeemType,
|
251
262
|
useUnderlyings,
|
252
263
|
}),
|
264
|
+
selector: redeemSelector,
|
253
265
|
});
|
254
266
|
|
255
267
|
return comptrollerProxy
|
256
|
-
.connect(
|
268
|
+
.connect(signer)
|
257
269
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
258
270
|
}
|
259
271
|
|
260
|
-
export function
|
272
|
+
export async function curveStake({
|
261
273
|
comptrollerProxy,
|
262
274
|
integrationManager,
|
263
|
-
|
264
|
-
|
265
|
-
|
275
|
+
signer,
|
276
|
+
curveLiquidityAdapter,
|
277
|
+
pool,
|
278
|
+
incomingStakingToken,
|
279
|
+
amount,
|
266
280
|
}: {
|
267
281
|
comptrollerProxy: ComptrollerLib;
|
268
282
|
integrationManager: IntegrationManager;
|
269
|
-
|
270
|
-
|
271
|
-
|
283
|
+
signer: SignerWithAddress;
|
284
|
+
curveLiquidityAdapter: CurveLiquidityAdapter;
|
285
|
+
pool: AddressLike;
|
286
|
+
incomingStakingToken: AddressLike;
|
287
|
+
amount: BigNumberish;
|
272
288
|
}) {
|
273
289
|
const callArgs = callOnIntegrationArgs({
|
274
|
-
adapter:
|
275
|
-
|
276
|
-
|
277
|
-
|
290
|
+
adapter: curveLiquidityAdapter,
|
291
|
+
encodedCallArgs: curveStakeArgs({
|
292
|
+
amount,
|
293
|
+
incomingStakingToken,
|
294
|
+
pool,
|
278
295
|
}),
|
296
|
+
selector: stakeSelector,
|
279
297
|
});
|
280
298
|
|
281
299
|
return comptrollerProxy
|
282
|
-
.connect(
|
300
|
+
.connect(signer)
|
283
301
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
284
302
|
}
|
285
303
|
|
286
|
-
export function
|
304
|
+
export async function curveUnstake({
|
287
305
|
comptrollerProxy,
|
288
306
|
integrationManager,
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
minIncomingAaveUsdtAmount = BigNumber.from(1),
|
295
|
-
receiveSingleAsset = false,
|
296
|
-
useUnderlyings = false,
|
307
|
+
signer,
|
308
|
+
curveLiquidityAdapter,
|
309
|
+
pool,
|
310
|
+
outgoingStakingToken,
|
311
|
+
amount,
|
297
312
|
}: {
|
298
313
|
comptrollerProxy: ComptrollerLib;
|
299
314
|
integrationManager: IntegrationManager;
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
minIncomingAaveUsdtAmount?: BigNumberish;
|
306
|
-
receiveSingleAsset?: boolean;
|
307
|
-
useUnderlyings?: boolean;
|
315
|
+
signer: SignerWithAddress;
|
316
|
+
curveLiquidityAdapter: CurveLiquidityAdapter;
|
317
|
+
pool: AddressLike;
|
318
|
+
outgoingStakingToken: AddressLike;
|
319
|
+
amount: BigNumberish;
|
308
320
|
}) {
|
309
321
|
const callArgs = callOnIntegrationArgs({
|
310
|
-
adapter:
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
minIncomingAaveUsdcAmount,
|
316
|
-
minIncomingAaveUsdtAmount,
|
317
|
-
receiveSingleAsset,
|
318
|
-
useUnderlyings,
|
322
|
+
adapter: curveLiquidityAdapter,
|
323
|
+
encodedCallArgs: curveUnstakeArgs({
|
324
|
+
amount,
|
325
|
+
outgoingStakingToken,
|
326
|
+
pool,
|
319
327
|
}),
|
328
|
+
selector: unstakeSelector,
|
320
329
|
});
|
321
330
|
|
322
331
|
return comptrollerProxy
|
323
|
-
.connect(
|
332
|
+
.connect(signer)
|
324
333
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
325
334
|
}
|
326
335
|
|
327
|
-
export function
|
336
|
+
export async function curveUnstakeAndRedeem({
|
328
337
|
comptrollerProxy,
|
329
338
|
integrationManager,
|
330
|
-
|
331
|
-
|
332
|
-
|
339
|
+
signer,
|
340
|
+
curveLiquidityAdapter,
|
341
|
+
pool,
|
342
|
+
outgoingStakingToken,
|
343
|
+
outgoingStakingTokenAmount,
|
344
|
+
useUnderlyings,
|
345
|
+
redeemType,
|
346
|
+
incomingAssetData,
|
333
347
|
}: {
|
334
348
|
comptrollerProxy: ComptrollerLib;
|
335
349
|
integrationManager: IntegrationManager;
|
336
|
-
|
337
|
-
|
338
|
-
|
350
|
+
signer: SignerWithAddress;
|
351
|
+
curveLiquidityAdapter: CurveLiquidityAdapter;
|
352
|
+
pool: AddressLike;
|
353
|
+
outgoingStakingToken: StandardToken;
|
354
|
+
outgoingStakingTokenAmount: BigNumberish;
|
355
|
+
useUnderlyings: boolean;
|
356
|
+
redeemType: CurveRedeemType;
|
357
|
+
incomingAssetData: BytesLike;
|
339
358
|
}) {
|
340
359
|
const callArgs = callOnIntegrationArgs({
|
341
|
-
adapter:
|
342
|
-
|
343
|
-
|
344
|
-
|
360
|
+
adapter: curveLiquidityAdapter,
|
361
|
+
encodedCallArgs: curveUnstakeAndRedeemArgs({
|
362
|
+
incomingAssetData,
|
363
|
+
outgoingStakingToken,
|
364
|
+
outgoingStakingTokenAmount,
|
365
|
+
pool,
|
366
|
+
redeemType,
|
367
|
+
useUnderlyings,
|
345
368
|
}),
|
369
|
+
selector: unstakeAndRedeemSelector,
|
346
370
|
});
|
347
371
|
|
348
372
|
return comptrollerProxy
|
349
|
-
.connect(
|
373
|
+
.connect(signer)
|
350
374
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
351
375
|
}
|
352
376
|
|
353
|
-
//
|
377
|
+
// aave pool
|
354
378
|
|
355
|
-
export function
|
379
|
+
export function curveAaveClaimRewards({
|
356
380
|
comptrollerProxy,
|
357
381
|
integrationManager,
|
358
382
|
fundOwner,
|
359
|
-
|
383
|
+
curveLiquidityAaveAdapter,
|
360
384
|
}: {
|
361
385
|
comptrollerProxy: ComptrollerLib;
|
362
386
|
integrationManager: IntegrationManager;
|
363
387
|
fundOwner: SignerWithAddress;
|
364
|
-
|
388
|
+
curveLiquidityAaveAdapter: CurveLiquidityAaveAdapter;
|
365
389
|
}) {
|
366
390
|
const callArgs = callOnIntegrationArgs({
|
367
|
-
adapter:
|
368
|
-
selector: claimRewardsSelector,
|
391
|
+
adapter: curveLiquidityAaveAdapter,
|
369
392
|
encodedCallArgs: constants.HashZero,
|
393
|
+
selector: claimRewardsSelector,
|
370
394
|
});
|
371
395
|
|
372
396
|
return comptrollerProxy
|
@@ -374,31 +398,37 @@ export function curveEursClaimRewards({
|
|
374
398
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
375
399
|
}
|
376
400
|
|
377
|
-
export function
|
401
|
+
export function curveAaveLend({
|
378
402
|
comptrollerProxy,
|
379
403
|
integrationManager,
|
380
404
|
fundOwner,
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
405
|
+
curveLiquidityAaveAdapter,
|
406
|
+
outgoingAaveDaiAmount = BigNumber.from(0),
|
407
|
+
outgoingAaveUsdcAmount = BigNumber.from(0),
|
408
|
+
outgoingAaveUsdtAmount = BigNumber.from(0),
|
409
|
+
minIncomingLPTokenAmount = BigNumber.from(1),
|
410
|
+
useUnderlyings = false,
|
385
411
|
}: {
|
386
412
|
comptrollerProxy: ComptrollerLib;
|
387
413
|
integrationManager: IntegrationManager;
|
388
414
|
fundOwner: SignerWithAddress;
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
415
|
+
curveLiquidityAaveAdapter: CurveLiquidityAaveAdapter;
|
416
|
+
outgoingAaveDaiAmount?: BigNumberish;
|
417
|
+
outgoingAaveUsdcAmount?: BigNumberish;
|
418
|
+
outgoingAaveUsdtAmount?: BigNumberish;
|
419
|
+
minIncomingLPTokenAmount?: BigNumberish;
|
420
|
+
useUnderlyings?: boolean;
|
393
421
|
}) {
|
394
422
|
const callArgs = callOnIntegrationArgs({
|
395
|
-
adapter:
|
396
|
-
|
397
|
-
encodedCallArgs: curveEursLendArgs({
|
398
|
-
outgoingEursAmount,
|
399
|
-
outgoingSeurAmount,
|
423
|
+
adapter: curveLiquidityAaveAdapter,
|
424
|
+
encodedCallArgs: curveAaveLendArgs({
|
400
425
|
minIncomingLPTokenAmount,
|
426
|
+
outgoingAaveDaiAmount,
|
427
|
+
outgoingAaveUsdcAmount,
|
428
|
+
outgoingAaveUsdtAmount,
|
429
|
+
useUnderlyings,
|
401
430
|
}),
|
431
|
+
selector: lendSelector,
|
402
432
|
});
|
403
433
|
|
404
434
|
return comptrollerProxy
|
@@ -406,31 +436,37 @@ export function curveEursLend({
|
|
406
436
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
407
437
|
}
|
408
438
|
|
409
|
-
export function
|
439
|
+
export function curveAaveLendAndStake({
|
410
440
|
comptrollerProxy,
|
411
441
|
integrationManager,
|
412
442
|
fundOwner,
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
443
|
+
curveLiquidityAaveAdapter,
|
444
|
+
outgoingAaveDaiAmount = BigNumber.from(0),
|
445
|
+
outgoingAaveUsdcAmount = BigNumber.from(0),
|
446
|
+
outgoingAaveUsdtAmount = BigNumber.from(0),
|
447
|
+
minIncomingLiquidityGaugeTokenAmount = BigNumber.from(1),
|
448
|
+
useUnderlyings = false,
|
417
449
|
}: {
|
418
450
|
comptrollerProxy: ComptrollerLib;
|
419
451
|
integrationManager: IntegrationManager;
|
420
452
|
fundOwner: SignerWithAddress;
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
453
|
+
curveLiquidityAaveAdapter: CurveLiquidityAaveAdapter;
|
454
|
+
outgoingAaveDaiAmount?: BigNumberish;
|
455
|
+
outgoingAaveUsdcAmount?: BigNumberish;
|
456
|
+
outgoingAaveUsdtAmount?: BigNumberish;
|
457
|
+
minIncomingLiquidityGaugeTokenAmount?: BigNumberish;
|
458
|
+
useUnderlyings?: boolean;
|
425
459
|
}) {
|
426
460
|
const callArgs = callOnIntegrationArgs({
|
427
|
-
adapter:
|
428
|
-
|
429
|
-
encodedCallArgs: curveEursLendAndStakeArgs({
|
430
|
-
outgoingEursAmount,
|
431
|
-
outgoingSeurAmount,
|
461
|
+
adapter: curveLiquidityAaveAdapter,
|
462
|
+
encodedCallArgs: curveAaveLendAndStakeArgs({
|
432
463
|
minIncomingLiquidityGaugeTokenAmount,
|
464
|
+
outgoingAaveDaiAmount,
|
465
|
+
outgoingAaveUsdcAmount,
|
466
|
+
outgoingAaveUsdtAmount,
|
467
|
+
useUnderlyings,
|
433
468
|
}),
|
469
|
+
selector: lendAndStakeSelector,
|
434
470
|
});
|
435
471
|
|
436
472
|
return comptrollerProxy
|
@@ -438,34 +474,40 @@ export function curveEursLendAndStake({
|
|
438
474
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
439
475
|
}
|
440
476
|
|
441
|
-
export function
|
477
|
+
export function curveAaveRedeem({
|
442
478
|
comptrollerProxy,
|
443
479
|
integrationManager,
|
444
480
|
fundOwner,
|
445
|
-
|
481
|
+
curveLiquidityAaveAdapter,
|
446
482
|
outgoingLPTokenAmount,
|
447
|
-
|
448
|
-
|
449
|
-
|
483
|
+
minIncomingAaveDaiAmount = BigNumber.from(1),
|
484
|
+
minIncomingAaveUsdcAmount = BigNumber.from(1),
|
485
|
+
minIncomingAaveUsdtAmount = BigNumber.from(1),
|
486
|
+
receiveSingleAsset = false,
|
487
|
+
useUnderlyings = false,
|
450
488
|
}: {
|
451
489
|
comptrollerProxy: ComptrollerLib;
|
452
490
|
integrationManager: IntegrationManager;
|
453
491
|
fundOwner: SignerWithAddress;
|
454
|
-
|
492
|
+
curveLiquidityAaveAdapter: CurveLiquidityAaveAdapter;
|
455
493
|
outgoingLPTokenAmount: BigNumberish;
|
456
|
-
|
457
|
-
|
458
|
-
|
494
|
+
minIncomingAaveDaiAmount?: BigNumberish;
|
495
|
+
minIncomingAaveUsdcAmount?: BigNumberish;
|
496
|
+
minIncomingAaveUsdtAmount?: BigNumberish;
|
497
|
+
receiveSingleAsset?: boolean;
|
498
|
+
useUnderlyings?: boolean;
|
459
499
|
}) {
|
460
500
|
const callArgs = callOnIntegrationArgs({
|
461
|
-
adapter:
|
462
|
-
|
463
|
-
|
501
|
+
adapter: curveLiquidityAaveAdapter,
|
502
|
+
encodedCallArgs: curveAaveRedeemArgs({
|
503
|
+
minIncomingAaveDaiAmount,
|
504
|
+
minIncomingAaveUsdcAmount,
|
505
|
+
minIncomingAaveUsdtAmount,
|
464
506
|
outgoingLPTokenAmount,
|
465
|
-
minIncomingEursAmount,
|
466
|
-
minIncomingSeurAmount,
|
467
507
|
receiveSingleAsset,
|
508
|
+
useUnderlyings,
|
468
509
|
}),
|
510
|
+
selector: redeemSelector,
|
469
511
|
});
|
470
512
|
|
471
513
|
return comptrollerProxy
|
@@ -473,25 +515,25 @@ export function curveEursRedeem({
|
|
473
515
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
474
516
|
}
|
475
517
|
|
476
|
-
export function
|
518
|
+
export function curveAaveStake({
|
477
519
|
comptrollerProxy,
|
478
520
|
integrationManager,
|
479
521
|
fundOwner,
|
480
|
-
|
522
|
+
curveLiquidityAaveAdapter,
|
481
523
|
outgoingLPTokenAmount,
|
482
524
|
}: {
|
483
525
|
comptrollerProxy: ComptrollerLib;
|
484
526
|
integrationManager: IntegrationManager;
|
485
527
|
fundOwner: SignerWithAddress;
|
486
|
-
|
528
|
+
curveLiquidityAaveAdapter: CurveLiquidityAaveAdapter;
|
487
529
|
outgoingLPTokenAmount: BigNumberish;
|
488
530
|
}) {
|
489
531
|
const callArgs = callOnIntegrationArgs({
|
490
|
-
adapter:
|
491
|
-
|
492
|
-
encodedCallArgs: curveEursStakeArgs({
|
532
|
+
adapter: curveLiquidityAaveAdapter,
|
533
|
+
encodedCallArgs: curveAaveStakeArgs({
|
493
534
|
outgoingLPTokenAmount,
|
494
535
|
}),
|
536
|
+
selector: stakeSelector,
|
495
537
|
});
|
496
538
|
|
497
539
|
return comptrollerProxy
|
@@ -499,34 +541,40 @@ export function curveEursStake({
|
|
499
541
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
500
542
|
}
|
501
543
|
|
502
|
-
export function
|
544
|
+
export function curveAaveUnstakeAndRedeem({
|
503
545
|
comptrollerProxy,
|
504
546
|
integrationManager,
|
505
547
|
fundOwner,
|
506
|
-
|
548
|
+
curveLiquidityAaveAdapter,
|
507
549
|
outgoingLiquidityGaugeTokenAmount,
|
508
|
-
|
509
|
-
|
510
|
-
|
550
|
+
minIncomingAaveDaiAmount = BigNumber.from(1),
|
551
|
+
minIncomingAaveUsdcAmount = BigNumber.from(1),
|
552
|
+
minIncomingAaveUsdtAmount = BigNumber.from(1),
|
553
|
+
receiveSingleAsset = false,
|
554
|
+
useUnderlyings = false,
|
511
555
|
}: {
|
512
556
|
comptrollerProxy: ComptrollerLib;
|
513
557
|
integrationManager: IntegrationManager;
|
514
558
|
fundOwner: SignerWithAddress;
|
515
|
-
|
559
|
+
curveLiquidityAaveAdapter: CurveLiquidityAaveAdapter;
|
516
560
|
outgoingLiquidityGaugeTokenAmount: BigNumberish;
|
517
|
-
|
518
|
-
|
519
|
-
|
561
|
+
minIncomingAaveDaiAmount?: BigNumberish;
|
562
|
+
minIncomingAaveUsdcAmount?: BigNumberish;
|
563
|
+
minIncomingAaveUsdtAmount?: BigNumberish;
|
564
|
+
receiveSingleAsset?: boolean;
|
565
|
+
useUnderlyings?: boolean;
|
520
566
|
}) {
|
521
567
|
const callArgs = callOnIntegrationArgs({
|
522
|
-
adapter:
|
523
|
-
|
524
|
-
|
568
|
+
adapter: curveLiquidityAaveAdapter,
|
569
|
+
encodedCallArgs: curveAaveUnstakeAndRedeemArgs({
|
570
|
+
minIncomingAaveDaiAmount,
|
571
|
+
minIncomingAaveUsdcAmount,
|
572
|
+
minIncomingAaveUsdtAmount,
|
525
573
|
outgoingLiquidityGaugeTokenAmount,
|
526
|
-
minIncomingEursAmount,
|
527
|
-
minIncomingSeurAmount,
|
528
574
|
receiveSingleAsset,
|
575
|
+
useUnderlyings,
|
529
576
|
}),
|
577
|
+
selector: unstakeAndRedeemSelector,
|
530
578
|
});
|
531
579
|
|
532
580
|
return comptrollerProxy
|
@@ -534,25 +582,25 @@ export function curveEursUnstakeAndRedeem({
|
|
534
582
|
.callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
|
535
583
|
}
|
536
584
|
|
537
|
-
export function
|
585
|
+
export function curveAaveUnstake({
|
538
586
|
comptrollerProxy,
|
539
587
|
integrationManager,
|
540
588
|
fundOwner,
|
541
|
-
|
589
|
+
curveLiquidityAaveAdapter,
|
542
590
|
outgoingLiquidityGaugeTokenAmount,
|
543
591
|
}: {
|
544
592
|
comptrollerProxy: ComptrollerLib;
|
545
593
|
integrationManager: IntegrationManager;
|
546
594
|
fundOwner: SignerWithAddress;
|
547
|
-
|
595
|
+
curveLiquidityAaveAdapter: CurveLiquidityAaveAdapter;
|
548
596
|
outgoingLiquidityGaugeTokenAmount: BigNumberish;
|
549
597
|
}) {
|
550
598
|
const callArgs = callOnIntegrationArgs({
|
551
|
-
adapter:
|
552
|
-
|
553
|
-
encodedCallArgs: curveEursUnstakeArgs({
|
599
|
+
adapter: curveLiquidityAaveAdapter,
|
600
|
+
encodedCallArgs: curveAaveUnstakeArgs({
|
554
601
|
outgoingLiquidityGaugeTokenAmount,
|
555
602
|
}),
|
603
|
+
selector: unstakeSelector,
|
556
604
|
});
|
557
605
|
|
558
606
|
return comptrollerProxy
|
@@ -575,8 +623,8 @@ export function curveSethClaimRewards({
|
|
575
623
|
}) {
|
576
624
|
const callArgs = callOnIntegrationArgs({
|
577
625
|
adapter: curveLiquiditySethAdapter,
|
578
|
-
selector: claimRewardsSelector,
|
579
626
|
encodedCallArgs: constants.HashZero,
|
627
|
+
selector: claimRewardsSelector,
|
580
628
|
});
|
581
629
|
|
582
630
|
return comptrollerProxy
|
@@ -603,12 +651,12 @@ export function curveSethLend({
|
|
603
651
|
}) {
|
604
652
|
const callArgs = callOnIntegrationArgs({
|
605
653
|
adapter: curveLiquiditySethAdapter,
|
606
|
-
selector: lendSelector,
|
607
654
|
encodedCallArgs: curveSethLendArgs({
|
608
|
-
outgoingWethAmount,
|
609
|
-
outgoingSethAmount,
|
610
655
|
minIncomingLPTokenAmount,
|
656
|
+
outgoingSethAmount,
|
657
|
+
outgoingWethAmount,
|
611
658
|
}),
|
659
|
+
selector: lendSelector,
|
612
660
|
});
|
613
661
|
|
614
662
|
return comptrollerProxy
|
@@ -635,12 +683,12 @@ export function curveSethLendAndStake({
|
|
635
683
|
}) {
|
636
684
|
const callArgs = callOnIntegrationArgs({
|
637
685
|
adapter: curveLiquiditySethAdapter,
|
638
|
-
selector: lendAndStakeSelector,
|
639
686
|
encodedCallArgs: curveSethLendAndStakeArgs({
|
640
|
-
outgoingWethAmount,
|
641
|
-
outgoingSethAmount,
|
642
687
|
minIncomingLiquidityGaugeTokenAmount,
|
688
|
+
outgoingSethAmount,
|
689
|
+
outgoingWethAmount,
|
643
690
|
}),
|
691
|
+
selector: lendAndStakeSelector,
|
644
692
|
});
|
645
693
|
|
646
694
|
return comptrollerProxy
|
@@ -669,13 +717,13 @@ export function curveSethRedeem({
|
|
669
717
|
}) {
|
670
718
|
const callArgs = callOnIntegrationArgs({
|
671
719
|
adapter: curveLiquiditySethAdapter,
|
672
|
-
selector: redeemSelector,
|
673
720
|
encodedCallArgs: curveSethRedeemArgs({
|
674
|
-
outgoingLPTokenAmount,
|
675
|
-
minIncomingWethAmount,
|
676
721
|
minIncomingSethAmount,
|
722
|
+
minIncomingWethAmount,
|
723
|
+
outgoingLPTokenAmount,
|
677
724
|
receiveSingleAsset,
|
678
725
|
}),
|
726
|
+
selector: redeemSelector,
|
679
727
|
});
|
680
728
|
|
681
729
|
return comptrollerProxy
|
@@ -698,10 +746,10 @@ export function curveSethStake({
|
|
698
746
|
}) {
|
699
747
|
const callArgs = callOnIntegrationArgs({
|
700
748
|
adapter: curveLiquiditySethAdapter,
|
701
|
-
selector: stakeSelector,
|
702
749
|
encodedCallArgs: curveSethStakeArgs({
|
703
750
|
outgoingLPTokenAmount,
|
704
751
|
}),
|
752
|
+
selector: stakeSelector,
|
705
753
|
});
|
706
754
|
|
707
755
|
return comptrollerProxy
|
@@ -730,13 +778,13 @@ export function curveSethUnstakeAndRedeem({
|
|
730
778
|
}) {
|
731
779
|
const callArgs = callOnIntegrationArgs({
|
732
780
|
adapter: curveLiquiditySethAdapter,
|
733
|
-
selector: unstakeAndRedeemSelector,
|
734
781
|
encodedCallArgs: curveSethUnstakeAndRedeemArgs({
|
735
|
-
outgoingLiquidityGaugeTokenAmount,
|
736
|
-
minIncomingWethAmount,
|
737
782
|
minIncomingSethAmount,
|
783
|
+
minIncomingWethAmount,
|
784
|
+
outgoingLiquidityGaugeTokenAmount,
|
738
785
|
receiveSingleAsset,
|
739
786
|
}),
|
787
|
+
selector: unstakeAndRedeemSelector,
|
740
788
|
});
|
741
789
|
|
742
790
|
return comptrollerProxy
|
@@ -759,10 +807,10 @@ export function curveSethUnstake({
|
|
759
807
|
}) {
|
760
808
|
const callArgs = callOnIntegrationArgs({
|
761
809
|
adapter: curveLiquiditySethAdapter,
|
762
|
-
selector: unstakeSelector,
|
763
810
|
encodedCallArgs: curveSethUnstakeArgs({
|
764
811
|
outgoingLiquidityGaugeTokenAmount,
|
765
812
|
}),
|
813
|
+
selector: unstakeSelector,
|
766
814
|
});
|
767
815
|
|
768
816
|
return comptrollerProxy
|
@@ -785,8 +833,8 @@ export function curveStethClaimRewards({
|
|
785
833
|
}) {
|
786
834
|
const callArgs = callOnIntegrationArgs({
|
787
835
|
adapter: curveLiquidityStethAdapter,
|
788
|
-
selector: claimRewardsSelector,
|
789
836
|
encodedCallArgs: constants.HashZero,
|
837
|
+
selector: claimRewardsSelector,
|
790
838
|
});
|
791
839
|
|
792
840
|
return comptrollerProxy
|
@@ -813,12 +861,12 @@ export function curveStethLend({
|
|
813
861
|
}) {
|
814
862
|
const callArgs = callOnIntegrationArgs({
|
815
863
|
adapter: curveLiquidityStethAdapter,
|
816
|
-
selector: lendSelector,
|
817
864
|
encodedCallArgs: curveStethLendArgs({
|
818
|
-
outgoingWethAmount,
|
819
|
-
outgoingStethAmount,
|
820
865
|
minIncomingLPTokenAmount,
|
866
|
+
outgoingStethAmount,
|
867
|
+
outgoingWethAmount,
|
821
868
|
}),
|
869
|
+
selector: lendSelector,
|
822
870
|
});
|
823
871
|
|
824
872
|
return comptrollerProxy
|
@@ -845,12 +893,12 @@ export function curveStethLendAndStake({
|
|
845
893
|
}) {
|
846
894
|
const callArgs = callOnIntegrationArgs({
|
847
895
|
adapter: curveLiquidityStethAdapter,
|
848
|
-
selector: lendAndStakeSelector,
|
849
896
|
encodedCallArgs: curveStethLendAndStakeArgs({
|
850
|
-
outgoingWethAmount,
|
851
|
-
outgoingStethAmount,
|
852
897
|
minIncomingLiquidityGaugeTokenAmount,
|
898
|
+
outgoingStethAmount,
|
899
|
+
outgoingWethAmount,
|
853
900
|
}),
|
901
|
+
selector: lendAndStakeSelector,
|
854
902
|
});
|
855
903
|
|
856
904
|
return comptrollerProxy
|
@@ -879,13 +927,13 @@ export function curveStethRedeem({
|
|
879
927
|
}) {
|
880
928
|
const callArgs = callOnIntegrationArgs({
|
881
929
|
adapter: curveLiquidityStethAdapter,
|
882
|
-
selector: redeemSelector,
|
883
930
|
encodedCallArgs: curveStethRedeemArgs({
|
884
|
-
outgoingLPTokenAmount,
|
885
|
-
minIncomingWethAmount,
|
886
931
|
minIncomingStethAmount,
|
932
|
+
minIncomingWethAmount,
|
933
|
+
outgoingLPTokenAmount,
|
887
934
|
receiveSingleAsset,
|
888
935
|
}),
|
936
|
+
selector: redeemSelector,
|
889
937
|
});
|
890
938
|
|
891
939
|
return comptrollerProxy
|
@@ -908,10 +956,10 @@ export function curveStethStake({
|
|
908
956
|
}) {
|
909
957
|
const callArgs = callOnIntegrationArgs({
|
910
958
|
adapter: curveLiquidityStethAdapter,
|
911
|
-
selector: stakeSelector,
|
912
959
|
encodedCallArgs: curveStethStakeArgs({
|
913
960
|
outgoingLPTokenAmount,
|
914
961
|
}),
|
962
|
+
selector: stakeSelector,
|
915
963
|
});
|
916
964
|
|
917
965
|
return comptrollerProxy
|
@@ -940,13 +988,13 @@ export function curveStethUnstakeAndRedeem({
|
|
940
988
|
}) {
|
941
989
|
const callArgs = callOnIntegrationArgs({
|
942
990
|
adapter: curveLiquidityStethAdapter,
|
943
|
-
selector: unstakeAndRedeemSelector,
|
944
991
|
encodedCallArgs: curveStethUnstakeAndRedeemArgs({
|
945
|
-
outgoingLiquidityGaugeTokenAmount,
|
946
|
-
minIncomingWethAmount,
|
947
992
|
minIncomingStethAmount,
|
993
|
+
minIncomingWethAmount,
|
994
|
+
outgoingLiquidityGaugeTokenAmount,
|
948
995
|
receiveSingleAsset,
|
949
996
|
}),
|
997
|
+
selector: unstakeAndRedeemSelector,
|
950
998
|
});
|
951
999
|
|
952
1000
|
return comptrollerProxy
|
@@ -969,10 +1017,10 @@ export function curveStethUnstake({
|
|
969
1017
|
}) {
|
970
1018
|
const callArgs = callOnIntegrationArgs({
|
971
1019
|
adapter: curveLiquidityStethAdapter,
|
972
|
-
selector: unstakeSelector,
|
973
1020
|
encodedCallArgs: curveStethUnstakeArgs({
|
974
1021
|
outgoingLiquidityGaugeTokenAmount,
|
975
1022
|
}),
|
1023
|
+
selector: unstakeSelector,
|
976
1024
|
});
|
977
1025
|
|
978
1026
|
return comptrollerProxy
|