@dhedge/v2-sdk 2.2.2 → 2.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhedge/v2-sdk",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "license": "MIT",
5
5
  "description": "🛠 An SDK for building applications on top of dHEDGE V2",
6
6
  "main": "dist/index.js",
@@ -24,12 +24,13 @@ const getCalculateSwapDataParams = async (
24
24
  const aaveAssetGuard = new ethers.Contract(
25
25
  aaveAssetGuardAddress,
26
26
  AaveLendingPoolAssetGuardAbi,
27
- pool.signer
27
+ pool.signer.provider
28
28
  );
29
29
  const swapDataParams = await aaveAssetGuard.callStatic.calculateSwapDataParams(
30
30
  torosAsset,
31
31
  amountIn,
32
- slippage
32
+ slippage,
33
+ { from: ethers.constants.AddressZero }
33
34
  );
34
35
 
35
36
  return {
@@ -124,7 +124,7 @@ export const CONTRACT_ADDRESS = {
124
124
  VELO: "",
125
125
  COMPOUNDV3_WETH: "0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486",
126
126
  FLUID_WETH: "0x45df0656f8adf017590009d2f1898eeca4f0a205",
127
- TOROS: "0xA6711f8a184E352c5A0714a48912cD33ca4a16A0" //DYTMT
127
+ TOROS: "0x27D8FDb0251B48D8EdD1Ad7bEDf553cF99AbE7B0" //BTCBEAR1X
128
128
  },
129
129
  [Network.BASE]: {
130
130
  USDC: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
@@ -44,6 +44,8 @@ const testToros = ({ wallet, network, provider }: TestingRunParams) => {
44
44
  await pool.managerLogic.connect(signer).setTrader(wallet.address);
45
45
  const newAssets = [
46
46
  [USDC, true],
47
+ [TOROS, false],
48
+ [routerAddress[network].toros, false],
47
49
  [TOROS, false]
48
50
  ];
49
51
  await pool.managerLogic.connect(signer).changeAssets(newAssets, []);
@@ -117,32 +119,32 @@ const testToros = ({ wallet, network, provider }: TestingRunParams) => {
117
119
  expect(completeWithdrawResult.txData).toBeDefined();
118
120
  });
119
121
 
120
- it("init Toros Token for withdrawal", async () => {
121
- await provider.send("evm_increaseTime", [86400]);
122
- await provider.send("evm_mine", []);
123
- const torosBalance = await pool.utils.getBalance(TOROS, pool.address);
124
- await pool.approve(Dapp.TOROS, TOROS, MAX_AMOUNT);
125
- await pool.trade(Dapp.TOROS, TOROS, USDC, torosBalance, 1.5);
126
- const torosBalanceDelta = await balanceDelta(
127
- pool.address,
128
- TOROS,
129
- pool.signer
130
- );
131
- expect(torosBalanceDelta.lt(0)).toBe(true);
132
- });
122
+ // it("init Toros Token for withdrawal", async () => {
123
+ // await provider.send("evm_increaseTime", [86400]);
124
+ // await provider.send("evm_mine", []);
125
+ // const torosBalance = await pool.utils.getBalance(TOROS, pool.address);
126
+ // await pool.approve(Dapp.TOROS, TOROS, MAX_AMOUNT);
127
+ // await pool.trade(Dapp.TOROS, TOROS, USDC, torosBalance, 1.5);
128
+ // const torosBalanceDelta = await balanceDelta(
129
+ // pool.address,
130
+ // TOROS,
131
+ // pool.signer
132
+ // );
133
+ // expect(torosBalanceDelta.lt(0)).toBe(true);
134
+ // });
133
135
 
134
- it("complete withdrawal from Toros asset", async () => {
135
- // Advance chain time past the Toros withdrawal cooldown
136
- await provider.send("evm_increaseTime", [600]);
137
- await provider.send("evm_mine", []);
138
- await pool.completeTorosWithdrawal(USDC, 1.5);
139
- const usdcBalanceDelta = await balanceDelta(
140
- pool.address,
141
- USDC,
142
- pool.signer
143
- );
144
- expect(usdcBalanceDelta.gt(0)).toBe(true);
145
- });
136
+ // it("complete withdrawal from Toros asset", async () => {
137
+ // // Advance chain time past the Toros withdrawal cooldown
138
+ // await provider.send("evm_increaseTime", [600]);
139
+ // await provider.send("evm_mine", []);
140
+ // await pool.completeTorosWithdrawal(USDC, 1.5);
141
+ // const usdcBalanceDelta = await balanceDelta(
142
+ // pool.address,
143
+ // USDC,
144
+ // pool.signer
145
+ // );
146
+ // expect(usdcBalanceDelta.gt(0)).toBe(true);
147
+ // });
146
148
  });
147
149
  };
148
150