@dhedge/v2-sdk 1.9.8 → 1.10.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/README.md +34 -0
- package/dist/config.d.ts +8 -2
- package/dist/entities/pool.d.ts +39 -8
- package/dist/services/flatmoney/keeperFee.d.ts +6 -0
- package/dist/services/flatmoney/stableLp.d.ts +9 -0
- package/dist/services/flatmoney/stableModule.d.ts +4 -0
- package/dist/services/uniswap/V3Liquidity.d.ts +8 -7
- package/dist/services/uniswap/V3Trade.d.ts +1 -2
- package/dist/services/velodrome/liquidity.d.ts +7 -3
- package/dist/services/velodrome/staking.d.ts +1 -0
- package/dist/test/constants.d.ts +14 -0
- package/dist/test/utils/testingHelper.d.ts +8 -1
- package/dist/test/wallet.d.ts +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/v2-sdk.cjs.development.js +14286 -10087
- package/dist/v2-sdk.cjs.development.js.map +1 -1
- package/dist/v2-sdk.cjs.production.min.js +1 -1
- package/dist/v2-sdk.cjs.production.min.js.map +1 -1
- package/dist/v2-sdk.esm.js +14292 -10093
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/abi/IERC721.json +217 -0
- package/src/abi/IVelodromeCLGauge.json +165 -0
- package/src/abi/IVelodromeNonfungiblePositionManager.json +408 -0
- package/src/abi/flatmoney/DelayedOrder.json +547 -0
- package/src/abi/flatmoney/IFlatcoinVault.json +570 -0
- package/src/abi/flatmoney/KeeperFee.json +364 -0
- package/src/abi/flatmoney/StableModule.json +770 -0
- package/src/config.ts +33 -6
- package/src/entities/pool.ts +208 -82
- package/src/services/flatmoney/keeperFee.ts +84 -0
- package/src/services/flatmoney/stableLp.ts +135 -0
- package/src/services/flatmoney/stableModule.ts +43 -0
- package/src/services/lyra/trade.ts +1 -1
- package/src/services/uniswap/V3Liquidity.ts +141 -18
- package/src/services/uniswap/V3Trade.ts +1 -2
- package/src/services/velodrome/liquidity.ts +77 -5
- package/src/services/velodrome/staking.ts +6 -0
- package/src/test/constants.ts +22 -6
- package/src/test/flatmoney.test.ts +164 -0
- package/src/test/uniswap.test.ts +24 -15
- package/src/test/utils/testingHelper.ts +29 -4
- package/src/test/velodromeCL.test.ts +223 -0
- package/src/test/wallet.ts +4 -1
- package/src/types.ts +1 -0
- package/dist/services/uniswap/types.d.ts +0 -3
- package/src/services/uniswap/types.ts +0 -16
package/README.md
CHANGED
|
@@ -427,3 +427,37 @@ const tx = await pool.borrow(Dapp.AAVE, WETH_TOKEN_ADDRESS, "100000000000000");
|
|
|
427
427
|
```ts
|
|
428
428
|
const tx = await pool.repay(Dapp.AAVE, WETH_TOKEN_ADDRESS, "100000000000000");
|
|
429
429
|
```
|
|
430
|
+
|
|
431
|
+
<br>
|
|
432
|
+
|
|
433
|
+
### The Flat Money Protocol
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
##### 1. Minting UNIT : deposit 1 rETH to mint UNIT
|
|
438
|
+
|
|
439
|
+
```ts
|
|
440
|
+
const depositAmount = new BigNumber(1).times(1e18).toString();
|
|
441
|
+
const tx = await pool.mintUnitViaFlatMoney(
|
|
442
|
+
depositAmount,
|
|
443
|
+
0.5, // slippage, 0.5%
|
|
444
|
+
5, // maxKeeperFeeInUsd, $5
|
|
445
|
+
);
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
##### 2. Redeeming UNIT : Redeem 1 UNIT for rETH
|
|
449
|
+
|
|
450
|
+
```ts
|
|
451
|
+
const withdrawAmount = new BigNumber(1).times(1e18).toString();
|
|
452
|
+
const tx = await pool.redeemUnitViaFlatMoney(
|
|
453
|
+
withdrawAmount,
|
|
454
|
+
0.5, // slippage, 0.5%
|
|
455
|
+
5, // maxKeeperFeeInUsd, $5
|
|
456
|
+
);
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
##### 3. Cancel announced order
|
|
460
|
+
|
|
461
|
+
```ts
|
|
462
|
+
await pool.cancelOrderViaFlatMoney();
|
|
463
|
+
```
|
package/dist/config.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AddressNetworkMap, AddressDappNetworkMap, LyraNetworkMap } from "./types";
|
|
1
|
+
import { AddressNetworkMap, Network, AddressDappNetworkMap, LyraNetworkMap } from "./types";
|
|
2
2
|
import { NetworkChainIdMap } from ".";
|
|
3
3
|
export declare const factoryAddress: AddressNetworkMap;
|
|
4
4
|
export declare const routerAddress: AddressDappNetworkMap;
|
|
5
5
|
export declare const dappFactoryAddress: AddressDappNetworkMap;
|
|
6
6
|
export declare const stakingAddress: AddressDappNetworkMap;
|
|
7
7
|
export declare const aaveAddressProvider: AddressDappNetworkMap;
|
|
8
|
-
export declare const nonfungiblePositionManagerAddress:
|
|
8
|
+
export declare const nonfungiblePositionManagerAddress: AddressDappNetworkMap;
|
|
9
9
|
export declare const networkChainIdMap: NetworkChainIdMap;
|
|
10
10
|
export declare const balancerSubgraph: AddressNetworkMap;
|
|
11
11
|
export declare const multiCallAddress: AddressNetworkMap;
|
|
@@ -13,3 +13,9 @@ export declare const lyraNetworkMap: LyraNetworkMap;
|
|
|
13
13
|
export declare const MaxUint128 = "0xffffffffffffffffffffffffffffffff";
|
|
14
14
|
export declare const UNISWAPV3_QUOTER_ADDRESS = "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6";
|
|
15
15
|
export declare const SYNTHETIX_TRACKING_CODE = "0x4448454447450000000000000000000000000000000000000000000000000000";
|
|
16
|
+
export declare const flatMoneyContractAddresses: Readonly<Partial<Record<Network, {
|
|
17
|
+
DelayedOrder: string;
|
|
18
|
+
FlatcoinVault: string;
|
|
19
|
+
StableModule: string;
|
|
20
|
+
RETH: string;
|
|
21
|
+
}>>>;
|
package/dist/entities/pool.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Contract, Wallet, BigNumber } from "ethers";
|
|
1
|
+
import { Contract, ethers, Wallet, BigNumber } from "ethers";
|
|
2
2
|
import { Dapp, FundComposition, AssetEnabled, Network, LyraOptionMarket, LyraOptionType, LyraTradeType, LyraPosition } from "../types";
|
|
3
3
|
import { Utils } from "./utils";
|
|
4
|
-
import { FeeAmount } from "@uniswap/v3-sdk";
|
|
5
4
|
export declare class Pool {
|
|
6
5
|
readonly poolLogic: Contract;
|
|
7
6
|
readonly managerLogic: Contract;
|
|
@@ -82,6 +81,16 @@ export declare class Pool {
|
|
|
82
81
|
* @returns {Promise<any>} Transaction
|
|
83
82
|
*/
|
|
84
83
|
approveSpender(spender: string, asset: string, amount: BigNumber | string, options?: any, estimateGas?: boolean): Promise<any>;
|
|
84
|
+
/**
|
|
85
|
+
* Approve NFT for provided spender address
|
|
86
|
+
* @param {string} spender Spender address
|
|
87
|
+
* @param {string} asset Address of asset
|
|
88
|
+
* @param {string} tokenId NFT id
|
|
89
|
+
* @param {any} options Transaction options
|
|
90
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
91
|
+
* @returns {Promise<any>} Transaction
|
|
92
|
+
*/
|
|
93
|
+
approveSpenderNFT(spender: string, asset: string, tokenId: string, options?: any, estimateGas?: boolean): Promise<any>;
|
|
85
94
|
/**
|
|
86
95
|
* Trade an asset into another asset
|
|
87
96
|
* @param {Dapp} dapp Platform like Sushiswap or Uniswap
|
|
@@ -131,7 +140,7 @@ export declare class Pool {
|
|
|
131
140
|
* Stake liquidity pool tokens in gauge contract
|
|
132
141
|
* @param {Dapp} dapp Platform like Balancer or Velodrome
|
|
133
142
|
* @param {string} gauge Gauge contract address
|
|
134
|
-
* @param {BigNumber | string} amount Amount of liquidity pool tokens
|
|
143
|
+
* @param {BigNumber | string} amount Amount of liquidity pool tokens or token ID for Velodrome CL
|
|
135
144
|
* @param {any} options Transaction options
|
|
136
145
|
* @param {boolean} estimateGas Simulate/estimate gas
|
|
137
146
|
* @returns {Promise<any>} Transaction
|
|
@@ -150,7 +159,7 @@ export declare class Pool {
|
|
|
150
159
|
/**
|
|
151
160
|
* Unstake liquidity pool tokens from Velodrome or Balancer gauge
|
|
152
161
|
* @param {string} gauge Gauge contract address
|
|
153
|
-
* @param {BigNumber | string} amount Amount of liquidity pool tokens
|
|
162
|
+
* @param {BigNumber | string} amount Amount of liquidity pool tokens or CL token ID
|
|
154
163
|
* @param {any} options Transaction options
|
|
155
164
|
* @param {boolean} estimateGas Simulate/estimate gas
|
|
156
165
|
* @returns {Promise<any>} Transaction
|
|
@@ -263,6 +272,7 @@ export declare class Pool {
|
|
|
263
272
|
harvestAaveV3Rewards(assets: string[], rewardAsset: string, options?: any, estimateGas?: boolean): Promise<any>;
|
|
264
273
|
/**
|
|
265
274
|
* Create UniswapV3 liquidity pool
|
|
275
|
+
* @param {dapp} Platform either UniswapV3 or VelodromeCL
|
|
266
276
|
* @param {string} assetA First asset
|
|
267
277
|
* @param {string} assetB Second asset
|
|
268
278
|
* @param {BigNumber | string} amountA Amount first asset
|
|
@@ -271,12 +281,12 @@ export declare class Pool {
|
|
|
271
281
|
* @param { number } maxPrice Upper price range (assetB per assetA)
|
|
272
282
|
* @param { number } minTick Lower tick range
|
|
273
283
|
* @param { number } maxTick Upper tick range
|
|
274
|
-
* @param {
|
|
284
|
+
* @param { number } feeAmountOrTickSpacing Fee tier UniswapV3 or tick spacing VelodromeCL
|
|
275
285
|
* @param {any} options Transaction options
|
|
276
286
|
* @param {boolean} estimateGas Simulate/estimate gas
|
|
277
287
|
* @returns {Promise<any>} Transaction
|
|
278
288
|
*/
|
|
279
|
-
addLiquidityUniswapV3(assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, minPrice: number | null, maxPrice: number | null, minTick: number | null, maxTick: number | null,
|
|
289
|
+
addLiquidityUniswapV3(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL, assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, minPrice: number | null, maxPrice: number | null, minTick: number | null, maxTick: number | null, feeAmountOrTickSpacing: number, options?: any, estimateGas?: boolean): Promise<any>;
|
|
280
290
|
/**
|
|
281
291
|
* Remove liquidity from an UniswapV3 or Arrakis liquidity pool
|
|
282
292
|
* @param {Dapp} dapp Platform either UniswapV3 or Arrakis
|
|
@@ -288,7 +298,7 @@ export declare class Pool {
|
|
|
288
298
|
*/
|
|
289
299
|
decreaseLiquidity(dapp: Dapp, tokenId: string, amount?: number, options?: any, estimateGas?: boolean): Promise<any>;
|
|
290
300
|
/**
|
|
291
|
-
* Increase liquidity of an
|
|
301
|
+
* Increase liquidity of an UniswapV, VelodromeCL or Arrakis liquidity pool
|
|
292
302
|
* @param {Dapp} dapp Platform either UniswapV3 or Arrakis
|
|
293
303
|
* @param {string} tokenId Token Id of UniswapV3 position
|
|
294
304
|
* @param {BigNumber | string} amountA Amount first asset
|
|
@@ -319,7 +329,7 @@ export declare class Pool {
|
|
|
319
329
|
* @param {boolean} estimateGas Simulate/estimate gas
|
|
320
330
|
* @returns {Promise<any>} Transaction
|
|
321
331
|
*/
|
|
322
|
-
tradeUniswapV3(assetFrom: string, assetTo: string, amountIn: BigNumber | string, feeAmount:
|
|
332
|
+
tradeUniswapV3(assetFrom: string, assetTo: string, amountIn: BigNumber | string, feeAmount: number, slippage?: number, options?: any, estimateGas?: boolean): Promise<any>;
|
|
323
333
|
/**
|
|
324
334
|
* Add liquidity to Velodrome pool
|
|
325
335
|
* @param {string} assetA First asset
|
|
@@ -468,4 +478,25 @@ export declare class Pool {
|
|
|
468
478
|
* @returns {Promise<any>} Transaction
|
|
469
479
|
*/
|
|
470
480
|
exitVestedToken(tokenAddress: string, id: number, options?: any, estimateGas?: boolean): Promise<any>;
|
|
481
|
+
/** deposit rETH to mint UNIT via the Flat Money protocol
|
|
482
|
+
*
|
|
483
|
+
* @param { BigNumber | string } depositAmount Amount of rETH to deposit
|
|
484
|
+
* @param { number } slippage slippage, 0.5 represents 0.5%
|
|
485
|
+
* @param { number | null } maxKeeperFeeInUsd 5 represents $5; null will skip the maxKeeperFee check
|
|
486
|
+
* @param {any} options Transaction options
|
|
487
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
488
|
+
* @returns {Promise<any>} Transaction
|
|
489
|
+
*/
|
|
490
|
+
mintUnitViaFlatMoney(depositAmount: ethers.BigNumber | string, slippage: number | undefined, maxKeeperFeeInUsd: number | null, options?: any, estimateGas?: boolean): Promise<any>;
|
|
491
|
+
/** redeem UNIT via the Flat Money protocol
|
|
492
|
+
*
|
|
493
|
+
* @param { BigNumber | string } depositAmount Amount of UNIT to withdraw
|
|
494
|
+
* @param { number } slippage slippage, 0.5 represents 0.5%
|
|
495
|
+
* @param { number | null } maxKeeperFeeInUsd 5 represents $5; null will skip the maxKeeperFee check
|
|
496
|
+
* @param {any} options Transaction options
|
|
497
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
498
|
+
* @returns {Promise<any>} Transaction
|
|
499
|
+
*/
|
|
500
|
+
redeemUnitViaFlatMoney(withdrawAmount: ethers.BigNumber | string, slippage: number | undefined, maxKeeperFeeInUsd: number | null, options?: any, estimateGas?: boolean): Promise<any>;
|
|
501
|
+
cancelOrderViaFlatMoney(options?: any, estimateGas?: boolean): Promise<any>;
|
|
471
502
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Contract, ethers } from "ethers";
|
|
2
|
+
import { Pool } from "../../entities";
|
|
3
|
+
import BigNumber from "bignumber.js";
|
|
4
|
+
export declare const getKeeperFeeContract: (pool: Pool) => Promise<Contract>;
|
|
5
|
+
export declare const getKeeperFee: (pool: Pool, maxKeeperFeeInUsd: number | null) => Promise<ethers.BigNumber>;
|
|
6
|
+
export declare const getKeeperFeeInUsd: (pool: Pool, keeperFee: ethers.BigNumber) => Promise<BigNumber>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Pool, ethers } from "../..";
|
|
2
|
+
export declare function getAnnounceStableDepositTxData(depositAmount: ethers.BigNumber | string, minAmountOut: ethers.BigNumber | string, keeperFee: ethers.BigNumber | string): string;
|
|
3
|
+
export declare function getAnnounceStableWithdrawTxData(withdrawAmount: ethers.BigNumber | string, minAmountOut: ethers.BigNumber | string, keeperFee: ethers.BigNumber | string): string;
|
|
4
|
+
export declare function getCancelExistingOrderTxData(account: string): string;
|
|
5
|
+
export declare function mintUnitViaFlatMoney(pool: Pool, depositAmount: ethers.BigNumber | string, slippage: number, // 0.5 means 0.5%
|
|
6
|
+
maxKeeperFeeInUsd: number | null, options?: any, estimateGas?: boolean): Promise<any>;
|
|
7
|
+
export declare function redeemUnitViaFlatMoney(pool: Pool, withdrawAmount: ethers.BigNumber | string, slippage: number, // 0.5 means 0.5%
|
|
8
|
+
maxKeeperFeeInUsd: number | null, options?: any, estimateGas?: boolean): Promise<any>;
|
|
9
|
+
export declare function cancelOrderViaFlatMoney(pool: Pool, options?: any, estimateGas?: boolean): Promise<any>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BigNumber } from "ethers";
|
|
2
|
+
import { Pool } from "../../entities";
|
|
3
|
+
export declare const getStableDepositQuote: (pool: Pool, depositAmount: string | BigNumber) => Promise<BigNumber>;
|
|
4
|
+
export declare const getStableWithdrawQuote: (pool: Pool, withdrawAmount: string | BigNumber) => Promise<BigNumber>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FeeAmount } from "@uniswap/v3-sdk";
|
|
1
|
+
import { Token, Price } from "@uniswap/sdk-core";
|
|
3
2
|
import { ethers } from "ethers";
|
|
4
|
-
import { Pool } from "../..";
|
|
5
|
-
import
|
|
3
|
+
import { Dapp, Pool } from "../..";
|
|
4
|
+
import BigNumber from "bignumber.js";
|
|
6
5
|
export declare function tryParsePrice(baseToken: Token, quoteToken: Token, value: string): Price<Token, Token>;
|
|
7
|
-
export declare function tryParseTick(baseToken: Token, quoteToken: Token, feeAmount:
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function getUniswapV3Liquidity(tokenId: string, pool: Pool): Promise<
|
|
6
|
+
export declare function tryParseTick(baseToken: Token, quoteToken: Token, feeAmount: number, value: string): number;
|
|
7
|
+
export declare function getUniswapV3MintTxData(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL, pool: Pool, assetA: string, assetB: string, amountA: string | ethers.BigNumber, amountB: string | ethers.BigNumber, minPrice: number | null, maxPrice: number | null, minTick: number | null, maxTick: number | null, feeAmountOrTickSpacing: number): Promise<any>;
|
|
8
|
+
export declare function getUniswapV3Liquidity(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL, tokenId: string, pool: Pool): Promise<BigNumber>;
|
|
9
|
+
export declare function getIncreaseLiquidityTxData(pool: Pool, dapp: Dapp, tokenId: string, amountA: ethers.BigNumber | string, amountB: ethers.BigNumber | string): Promise<any>;
|
|
10
|
+
export declare function getDecreaseLiquidityTxData(pool: Pool, dapp: Dapp, tokenId: string, amount?: number): Promise<any>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FeeAmount } from "@uniswap/v3-sdk";
|
|
2
1
|
import { ethers } from "ethers";
|
|
3
2
|
import { Pool } from "../..";
|
|
4
|
-
export declare function getUniswapV3SwapTxData(pool: Pool, assetA: string, assetB: string, amountIn: string | ethers.BigNumber, slippage: number, feeAmount:
|
|
3
|
+
export declare function getUniswapV3SwapTxData(pool: Pool, assetA: string, assetB: string, amountIn: string | ethers.BigNumber, slippage: number, feeAmount: number): Promise<any>;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
2
|
import { Pool } from "../../entities";
|
|
3
|
-
export declare function getVelodromeAddLiquidityTxData(pool: Pool, assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, isStable: boolean): Promise<any>;
|
|
4
|
-
export declare function getVelodromeRemoveLiquidityTxData(pool: Pool, assetA: string, assetB: string, amount: BigNumber | string, isStable: boolean): Promise<any>;
|
|
3
|
+
export declare function getVelodromeAddLiquidityTxData(pool: Pool, assetA: string, assetB: string, amountA: ethers.BigNumber | string, amountB: ethers.BigNumber | string, isStable: boolean): Promise<any>;
|
|
4
|
+
export declare function getVelodromeRemoveLiquidityTxData(pool: Pool, assetA: string, assetB: string, amount: ethers.BigNumber | string, isStable: boolean): Promise<any>;
|
|
5
|
+
export declare function getVelodromeCLDecreaseStakedLiquidityTxData(pool: Pool, tokenId: string, amount: number): Promise<any>;
|
|
6
|
+
export declare function getVelodromeCLIncreaseStakedLiquidityTxData(pool: Pool, tokenId: string, amountA: ethers.BigNumber | string, amountB: ethers.BigNumber | string): Promise<any>;
|
|
7
|
+
export declare function getVelodromeCLIncreaseLiquidityTxData(pool: Pool, tokenId: string, amountA: ethers.BigNumber | string, amountB: ethers.BigNumber | string): Promise<any>;
|
|
8
|
+
export declare function getVelodromeClOwner(pool: Pool, tokenId: string): Promise<string>;
|
|
@@ -2,3 +2,4 @@ import { BigNumber } from "ethers";
|
|
|
2
2
|
import { Pool } from "../../entities";
|
|
3
3
|
export declare function getVelodromeStakeTxData(amount: BigNumber | string, v2: boolean): any;
|
|
4
4
|
export declare function getVelodromeClaimTxData(pool: Pool, gauge: string, v2: boolean): Promise<any>;
|
|
5
|
+
export declare function getVelodromeCLClaimTxData(tokenId: string): Promise<any>;
|
package/dist/test/constants.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export declare const CONTRACT_ADDRESS: {
|
|
|
31
31
|
uniswapV3: {
|
|
32
32
|
nonfungiblePositionManager: string;
|
|
33
33
|
};
|
|
34
|
+
VELODROME_CL_USDC_WETH_GAUGE: string;
|
|
35
|
+
VELO: string;
|
|
34
36
|
};
|
|
35
37
|
optimism: {
|
|
36
38
|
USDC: string;
|
|
@@ -45,6 +47,8 @@ export declare const CONTRACT_ADDRESS: {
|
|
|
45
47
|
WMATIC: string;
|
|
46
48
|
ARRAKIS_USDC_WETH_GAUGE: string;
|
|
47
49
|
ARRAKIS_USDC_WETH_LP: string;
|
|
50
|
+
VELODROME_CL_USDC_WETH_GAUGE: string;
|
|
51
|
+
VELO: string;
|
|
48
52
|
};
|
|
49
53
|
arbitrum: {
|
|
50
54
|
USDC: string;
|
|
@@ -60,6 +64,8 @@ export declare const CONTRACT_ADDRESS: {
|
|
|
60
64
|
ARRAKIS_USDC_WETH_GAUGE: string;
|
|
61
65
|
ARRAKIS_USDC_WETH_LP: string;
|
|
62
66
|
WMATIC: string;
|
|
67
|
+
VELODROME_CL_USDC_WETH_GAUGE: string;
|
|
68
|
+
VELO: string;
|
|
63
69
|
};
|
|
64
70
|
base: {
|
|
65
71
|
USDC: string;
|
|
@@ -72,6 +78,8 @@ export declare const CONTRACT_ADDRESS: {
|
|
|
72
78
|
ARRAKIS_USDC_WETH_GAUGE: string;
|
|
73
79
|
ARRAKIS_USDC_WETH_LP: string;
|
|
74
80
|
WMATIC: string;
|
|
81
|
+
VELODROME_CL_USDC_WETH_GAUGE: string;
|
|
82
|
+
VELO: string;
|
|
75
83
|
};
|
|
76
84
|
};
|
|
77
85
|
export declare const MAX_AMOUNT: ethers.BigNumber;
|
|
@@ -81,3 +89,9 @@ export declare const USDC_BALANCEOF_SLOT: {
|
|
|
81
89
|
polygon: number;
|
|
82
90
|
base: number;
|
|
83
91
|
};
|
|
92
|
+
export declare const WETH_BALANCEOF_SLOT: {
|
|
93
|
+
optimism: number;
|
|
94
|
+
arbitrum: number;
|
|
95
|
+
polygon: number;
|
|
96
|
+
base: number;
|
|
97
|
+
};
|
|
@@ -5,6 +5,7 @@ export declare type TestingRunParams = {
|
|
|
5
5
|
network: Network;
|
|
6
6
|
wallet: ethers.Wallet;
|
|
7
7
|
provider: ethers.providers.JsonRpcProvider;
|
|
8
|
+
rpcUrl: string;
|
|
8
9
|
};
|
|
9
10
|
declare type TestHelperParams = {
|
|
10
11
|
testingRun: (testingRunParams: TestingRunParams) => void;
|
|
@@ -21,7 +22,7 @@ export declare const setTokenAmount: ({ amount, userAddress, tokenAddress, slot,
|
|
|
21
22
|
amount: string;
|
|
22
23
|
userAddress: string;
|
|
23
24
|
tokenAddress: string;
|
|
24
|
-
slot: number;
|
|
25
|
+
slot: number | string;
|
|
25
26
|
provider: ethers.providers.JsonRpcProvider;
|
|
26
27
|
}) => Promise<void>;
|
|
27
28
|
export declare const setUSDCAmount: ({ provider, userAddress, amount, network }: {
|
|
@@ -30,5 +31,11 @@ export declare const setUSDCAmount: ({ provider, userAddress, amount, network }:
|
|
|
30
31
|
provider: ethers.providers.JsonRpcProvider;
|
|
31
32
|
network: Network;
|
|
32
33
|
}) => Promise<void>;
|
|
34
|
+
export declare const setWETHAmount: ({ provider, userAddress, amount, network }: {
|
|
35
|
+
amount: string;
|
|
36
|
+
userAddress: string;
|
|
37
|
+
provider: ethers.providers.JsonRpcProvider;
|
|
38
|
+
network: Network;
|
|
39
|
+
}) => Promise<void>;
|
|
33
40
|
export declare const wait: (seconds: number) => Promise<void>;
|
|
34
41
|
export {};
|
package/dist/test/wallet.d.ts
CHANGED