@dhedge/v2-sdk 1.10.5 → 1.10.6

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 CHANGED
@@ -216,6 +216,26 @@ const tx = await pool.trade(
216
216
  )
217
217
  ```
218
218
 
219
+ #### 🚨 Important Update
220
+ Due to the upgrade of our contract, trading out of a Toros token now involves a second step. Please follow the updated process below:
221
+ 1. Step:
222
+ ```ts
223
+ const tx = await pool.trade(
224
+ Dapp.TOROS,
225
+ "TOROS_TOKEN_ADDRESS",
226
+ "USDC_TOKEN_ADDRESS",
227
+ '100000000',
228
+ slippage
229
+ )
230
+ ```
231
+ 2. Step:
232
+ ```ts
233
+ const tx = await pool.completeTorosWithdrawal(
234
+ "USDC_TOKEN_ADDRESS",
235
+ slippage
236
+ )
237
+ ```
238
+
219
239
  ### Liquidity
220
240
 
221
241
  ---
@@ -529,4 +529,13 @@ export declare class Pool {
529
529
  */
530
530
  redeemUnitViaFlatMoney(withdrawAmount: ethers.BigNumber | string, slippage: number | undefined, maxKeeperFeeInUsd: number | null, options?: any, estimateGas?: boolean): Promise<any>;
531
531
  cancelOrderViaFlatMoney(options?: any, estimateGas?: boolean): Promise<any>;
532
+ /**
533
+ * Complete a Toros withdrawal to a single asset
534
+ * @param {string} destinationToken Address of destination asset
535
+ * @param {number} slippage Slippage tolerance in %
536
+ * @param {any} options Transaction options
537
+ * @param {boolean} estimateGas Simulate/estimate gas
538
+ * @returns {Promise<any>} Transaction
539
+ */
540
+ completeTorosWithdrawal(destinationToken: string, slippage?: number, options?: any, estimateGas?: boolean): Promise<any>;
532
541
  }
@@ -1,3 +1,6 @@
1
1
  import { ethers } from "../..";
2
2
  import { Pool } from "../../entities";
3
- export declare function getOneInchSwapTxData(pool: Pool, assetFrom: string, assetTo: string, amountIn: ethers.BigNumber | string, slippage: number): Promise<string>;
3
+ export declare function getOneInchSwapTxData(pool: Pool, assetFrom: string, assetTo: string, amountIn: ethers.BigNumber | string, slippage: number, forEasySwapper?: boolean): Promise<{
4
+ swapTxData: string;
5
+ dstAmount: string;
6
+ }>;
@@ -2,6 +2,7 @@ import { ethers } from "ethers";
2
2
  import { Pool } from "../..";
3
3
  export declare function getPoolDepositAsset(pool: Pool, poolAddress: string, investAsset: string): Promise<string | undefined>;
4
4
  export declare function getTorosPoolTokenPrice(pool: Pool, poolAddress: string): Promise<ethers.BigNumber>;
5
- export declare function getEasySwapperDepositQuote(pool: Pool, torosAsset: string, investAsset: string, depositAsset: string, amountIn: ethers.BigNumber): Promise<ethers.BigNumber>;
5
+ export declare function getEasySwapperDepositQuote(pool: Pool, torosAsset: string, investAsset: string, amountIn: ethers.BigNumber): Promise<ethers.BigNumber>;
6
6
  export declare function getEasySwapperWithdrawalQuote(pool: Pool, torosAsset: string, investAsset: string, amountIn: ethers.BigNumber): Promise<ethers.BigNumber>;
7
7
  export declare function getEasySwapperTxData(pool: Pool, assetFrom: string, assetTo: string, amountIn: ethers.BigNumber, slippage: number): Promise<any>;
8
+ export declare function getCompleteWithdrawalTxData(pool: Pool, destToken: string, slippage: number): Promise<string>;
@@ -23,6 +23,7 @@ export declare const CONTRACT_ADDRESS: {
23
23
  polygon: {
24
24
  USDC: string;
25
25
  USDT: string;
26
+ SUSD: string;
26
27
  SWETH: string;
27
28
  WETH: string;
28
29
  WBTC: string;
@@ -35,6 +36,7 @@ export declare const CONTRACT_ADDRESS: {
35
36
  VELODROME_CL_USDC_WETH_GAUGE: string;
36
37
  VELO: string;
37
38
  COMPOUNDV3_WETH: string;
39
+ TOROS: string;
38
40
  };
39
41
  optimism: {
40
42
  USDC: string;
@@ -53,10 +55,12 @@ export declare const CONTRACT_ADDRESS: {
53
55
  VELODROME_CL_USDC_WETH_GAUGE: string;
54
56
  VELO: string;
55
57
  COMPOUNDV3_WETH: string;
58
+ TOROS: string;
56
59
  };
57
60
  arbitrum: {
58
61
  USDC: string;
59
62
  USDT: string;
63
+ SUSD: string;
60
64
  SWETH: string;
61
65
  WETH: string;
62
66
  WBTC: string;
@@ -72,10 +76,12 @@ export declare const CONTRACT_ADDRESS: {
72
76
  VELODROME_CL_USDC_WETH_GAUGE: string;
73
77
  VELO: string;
74
78
  COMPOUNDV3_WETH: string;
79
+ TOROS: string;
75
80
  };
76
81
  base: {
77
82
  USDC: string;
78
83
  USDT: string;
84
+ SUSD: string;
79
85
  WETH: string;
80
86
  WBTC: string;
81
87
  SWETH: string;
@@ -88,6 +94,7 @@ export declare const CONTRACT_ADDRESS: {
88
94
  VELODROME_CL_USDC_WETH_GAUGE: string;
89
95
  VELO: string;
90
96
  COMPOUNDV3_WETH: string;
97
+ TOROS: string;
91
98
  };
92
99
  };
93
100
  export declare const MAX_AMOUNT: ethers.BigNumber;
@@ -1,4 +1,3 @@
1
- /// <reference types="jest" />
2
1
  import { ethers } from "ethers";
3
2
  import { Network } from "../../types";
4
3
  import { Pool } from "../../entities";