@dhedge/v2-sdk 1.10.1 → 1.10.3

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.
@@ -272,7 +272,7 @@ export declare class Pool {
272
272
  harvestAaveV3Rewards(assets: string[], rewardAsset: string, options?: any, estimateGas?: boolean): Promise<any>;
273
273
  /**
274
274
  * Create UniswapV3 liquidity pool
275
- * @param {dapp} Platform either UniswapV3 or VelodromeCL
275
+ * @param {dapp} Platform UniswapV3, VelodromeCL or AerodromeCL
276
276
  * @param {string} assetA First asset
277
277
  * @param {string} assetB Second asset
278
278
  * @param {BigNumber | string} amountA Amount first asset
@@ -286,7 +286,7 @@ export declare class Pool {
286
286
  * @param {boolean} estimateGas Simulate/estimate gas
287
287
  * @returns {Promise<any>} Transaction
288
288
  */
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>;
289
+ addLiquidityUniswapV3(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL, 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>;
290
290
  /**
291
291
  * Remove liquidity from an UniswapV3 or Arrakis liquidity pool
292
292
  * @param {Dapp} dapp Platform either UniswapV3 or Arrakis
@@ -4,7 +4,7 @@ import { Dapp, Pool } from "../..";
4
4
  import BigNumber from "bignumber.js";
5
5
  export declare function tryParsePrice(baseToken: Token, quoteToken: Token, value: string): Price<Token, Token>;
6
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>;
7
+ export declare function getUniswapV3MintTxData(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL, 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 | Dapp.AERODROMECL, tokenId: string, pool: Pool): Promise<BigNumber>;
9
9
  export declare function getIncreaseLiquidityTxData(pool: Pool, dapp: Dapp, tokenId: string, amountA: ethers.BigNumber | string, amountB: ethers.BigNumber | string): Promise<any>;
10
10
  export declare function getDecreaseLiquidityTxData(pool: Pool, dapp: Dapp, tokenId: string, amount?: number): Promise<any>;
@@ -1,8 +1,6 @@
1
1
  import { ethers } from "ethers";
2
2
  import { Pool } from "../../entities";
3
+ import { Dapp } from "../../types";
3
4
  export declare function getVelodromeAddLiquidityTxData(pool: Pool, assetA: string, assetB: string, amountA: ethers.BigNumber | string, amountB: ethers.BigNumber | string, isStable: boolean): Promise<any>;
4
5
  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>;
6
+ export declare function getVelodromeClOwner(pool: Pool, dapp: Dapp.VELODROMECL | Dapp.AERODROMECL, tokenId: string): Promise<string>;
@@ -22,6 +22,7 @@ export declare const TEST_POOL: {
22
22
  export declare const CONTRACT_ADDRESS: {
23
23
  polygon: {
24
24
  USDC: string;
25
+ USDT: string;
25
26
  SWETH: string;
26
27
  WETH: string;
27
28
  WBTC: string;
@@ -36,8 +37,9 @@ export declare const CONTRACT_ADDRESS: {
36
37
  };
37
38
  optimism: {
38
39
  USDC: string;
39
- SUSD: string;
40
+ USDT: string;
40
41
  SWETH: string;
42
+ SUSD: string;
41
43
  WETH: string;
42
44
  WBTC: string;
43
45
  KWENTA_ETH_PERP_V2: string;
@@ -52,6 +54,7 @@ export declare const CONTRACT_ADDRESS: {
52
54
  };
53
55
  arbitrum: {
54
56
  USDC: string;
57
+ USDT: string;
55
58
  SWETH: string;
56
59
  WETH: string;
57
60
  WBTC: string;
@@ -69,6 +72,7 @@ export declare const CONTRACT_ADDRESS: {
69
72
  };
70
73
  base: {
71
74
  USDC: string;
75
+ USDT: string;
72
76
  WETH: string;
73
77
  WBTC: string;
74
78
  SWETH: string;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="jest" />
2
2
  import { ethers } from "ethers";
3
3
  import { Network } from "../../types";
4
+ import { Pool } from "../../entities";
4
5
  export declare type TestingRunParams = {
5
6
  network: Network;
6
7
  wallet: ethers.Wallet;
@@ -11,8 +12,9 @@ declare type TestHelperParams = {
11
12
  testingRun: (testingRunParams: TestingRunParams) => void;
12
13
  } & {
13
14
  network: Network;
15
+ onFork?: boolean;
14
16
  };
15
- export declare const testingHelper: ({ network, testingRun }: TestHelperParams) => void;
17
+ export declare const testingHelper: ({ network, onFork, testingRun }: TestHelperParams) => void;
16
18
  export declare const beforeAfterReset: ({ beforeAll, afterAll, provider }: {
17
19
  beforeAll: any;
18
20
  afterAll: any;
@@ -38,4 +40,14 @@ export declare const setWETHAmount: ({ provider, userAddress, amount, network }:
38
40
  network: Network;
39
41
  }) => Promise<void>;
40
42
  export declare const wait: (seconds: number) => Promise<void>;
43
+ export declare const runWithImpersonateAccount: ({ account, provider }: {
44
+ account: string;
45
+ provider: ethers.providers.JsonRpcProvider;
46
+ }, fnToRun: ({ signer }: {
47
+ signer: ethers.providers.JsonRpcSigner;
48
+ }) => void) => Promise<void>;
49
+ export declare const setChainlinkTimeout: ({ pool, provider }: {
50
+ pool: Pool;
51
+ provider: ethers.providers.JsonRpcProvider;
52
+ }, time: number) => Promise<void>;
41
53
  export {};
@@ -1,13 +1,12 @@
1
1
  import { ethers } from "ethers";
2
2
  import { Network } from "../types";
3
- export declare const wallet: ethers.Wallet;
4
3
  export declare const networkPortMap: {
5
4
  polygon: number;
6
5
  optimism: number;
7
6
  arbitrum: number;
8
7
  base: number;
9
8
  };
10
- export declare const getWalletData: (network: Network) => {
9
+ export declare const getWalletData: (network: Network, onFork?: boolean) => {
11
10
  wallet: ethers.Wallet;
12
11
  provider: ethers.providers.JsonRpcProvider;
13
12
  rpcUrl: string;
package/dist/types.d.ts CHANGED
@@ -23,7 +23,8 @@ export declare enum Dapp {
23
23
  LYRA = "lyra",
24
24
  ZEROEX = "0x",
25
25
  RAMSES = "ramses",
26
- AERODROME = "aerodrome"
26
+ AERODROME = "aerodrome",
27
+ AERODROMECL = "aerodromeCL"
27
28
  }
28
29
  export declare enum Transaction {
29
30
  SWAP = "swapExactTokensForTokens",