@dhedge/v2-sdk 1.4.1 → 1.4.2
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/dist/entities/dhedge.d.ts +0 -6
- package/dist/test/constants.d.ts +3 -14
- package/dist/test/txOptions.d.ts +2 -1
- package/dist/v2-sdk.cjs.development.js +3 -47
- 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 +3 -47
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/entities/dhedge.ts +0 -11
- package/src/test/1inch.test.ts +54 -0
- package/src/test/constants.ts +18 -18
- package/src/test/txOptions.ts +16 -10
|
@@ -26,10 +26,4 @@ export declare class Dhedge {
|
|
|
26
26
|
* @returns {Pool} Loaded Pool
|
|
27
27
|
*/
|
|
28
28
|
loadPool(address: string): Promise<Pool>;
|
|
29
|
-
/**
|
|
30
|
-
* Check if pool address is valid
|
|
31
|
-
* @param {string} address Pool address
|
|
32
|
-
* @returns {boolean} Is valid pool address
|
|
33
|
-
*/
|
|
34
|
-
private validatePool;
|
|
35
29
|
}
|
package/dist/test/constants.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const DAI = "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063";
|
|
5
|
-
export declare const TUSD = "0x2e1ad108ff1d8c782fcbbb89aad783ac49586756";
|
|
6
|
-
export declare const WBTC = "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6";
|
|
7
|
-
export declare const SUSHI = "0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a";
|
|
8
|
-
export declare const WMATIC = "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270";
|
|
9
|
-
export declare const BAL = "0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3";
|
|
10
|
-
export declare const AMUSDC = "0x1a13f4ca1d028320a707d99520abfefca3998b7f";
|
|
11
|
-
export declare const VDEBTWETH = "0xede17e9d79fc6f9ff9250d9eefbdb88cc18038b5";
|
|
12
|
-
export declare const ARRAKIS_USDC_WETH_GAUGE = "0x33d1ad9Cd88A509397CD924C2d7613C285602C20";
|
|
13
|
-
export declare const STMATIC = "0x3A58a54C066FdC0f2D55FC9C89F0415C92eBf3C4";
|
|
14
|
-
export declare const WMATIC_STMATIC_LP = "0xaF5E0B5425dE1F5a630A8cB5AA9D97B8141C908D";
|
|
1
|
+
export declare const WETH = "0x4200000000000000000000000000000000000006";
|
|
2
|
+
export declare const USDC = "0x7F5c764cBc14f9669B88837ca1490cCa17c31607";
|
|
3
|
+
export declare const DAI = "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1";
|
|
15
4
|
export declare const TEST_POOL = "TEST_POOL_ADDRESS";
|
package/dist/test/txOptions.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { Network } from "../types";
|
|
2
|
+
export declare const getTxOptions: (network: Network) => Promise<any>;
|
|
@@ -14417,17 +14417,16 @@ var Dhedge = /*#__PURE__*/function () {
|
|
|
14417
14417
|
while (1) {
|
|
14418
14418
|
switch (_context2.prev = _context2.next) {
|
|
14419
14419
|
case 0:
|
|
14420
|
-
this.validatePool(address);
|
|
14421
14420
|
poolLogic = new ethers.Contract(address, PoolLogic.abi, this.signer);
|
|
14422
|
-
_context2.next =
|
|
14421
|
+
_context2.next = 3;
|
|
14423
14422
|
return poolLogic.poolManagerLogic();
|
|
14424
14423
|
|
|
14425
|
-
case
|
|
14424
|
+
case 3:
|
|
14426
14425
|
managerLogicAddress = _context2.sent;
|
|
14427
14426
|
managerLogic = new ethers.Contract(managerLogicAddress, ManagerLogic.abi, this.signer);
|
|
14428
14427
|
return _context2.abrupt("return", new Pool(this.network, this.signer, poolLogic, managerLogic, this.utils, this.factory));
|
|
14429
14428
|
|
|
14430
|
-
case
|
|
14429
|
+
case 6:
|
|
14431
14430
|
case "end":
|
|
14432
14431
|
return _context2.stop();
|
|
14433
14432
|
}
|
|
@@ -14440,49 +14439,6 @@ var Dhedge = /*#__PURE__*/function () {
|
|
|
14440
14439
|
}
|
|
14441
14440
|
|
|
14442
14441
|
return loadPool;
|
|
14443
|
-
}()
|
|
14444
|
-
/**
|
|
14445
|
-
* Check if pool address is valid
|
|
14446
|
-
* @param {string} address Pool address
|
|
14447
|
-
* @returns {boolean} Is valid pool address
|
|
14448
|
-
*/
|
|
14449
|
-
;
|
|
14450
|
-
|
|
14451
|
-
_proto.validatePool =
|
|
14452
|
-
/*#__PURE__*/
|
|
14453
|
-
function () {
|
|
14454
|
-
var _validatePool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(address) {
|
|
14455
|
-
var isPool;
|
|
14456
|
-
return runtime_1.wrap(function _callee3$(_context3) {
|
|
14457
|
-
while (1) {
|
|
14458
|
-
switch (_context3.prev = _context3.next) {
|
|
14459
|
-
case 0:
|
|
14460
|
-
_context3.next = 2;
|
|
14461
|
-
return this.factory.isPool(address);
|
|
14462
|
-
|
|
14463
|
-
case 2:
|
|
14464
|
-
isPool = _context3.sent;
|
|
14465
|
-
|
|
14466
|
-
if (isPool) {
|
|
14467
|
-
_context3.next = 5;
|
|
14468
|
-
break;
|
|
14469
|
-
}
|
|
14470
|
-
|
|
14471
|
-
throw new Error("Given address not a pool");
|
|
14472
|
-
|
|
14473
|
-
case 5:
|
|
14474
|
-
case "end":
|
|
14475
|
-
return _context3.stop();
|
|
14476
|
-
}
|
|
14477
|
-
}
|
|
14478
|
-
}, _callee3, this);
|
|
14479
|
-
}));
|
|
14480
|
-
|
|
14481
|
-
function validatePool(_x8) {
|
|
14482
|
-
return _validatePool.apply(this, arguments);
|
|
14483
|
-
}
|
|
14484
|
-
|
|
14485
|
-
return validatePool;
|
|
14486
14442
|
}();
|
|
14487
14443
|
|
|
14488
14444
|
return Dhedge;
|