@dhedge/v2-sdk 1.9.2 → 1.9.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/dist/entities/pool.d.ts +11 -0
- package/dist/test/constants.d.ts +1 -0
- package/dist/test/utils/testingHelper.d.ts +7 -0
- package/dist/test/wallet.d.ts +4 -1
- package/dist/v2-sdk.cjs.development.js +77 -0
- 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 +77 -0
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/entities/pool.ts +19 -0
- package/src/test/constants.ts +1 -0
- package/src/test/pool.test.ts +90 -46
- package/src/test/utils/testingHelper.ts +25 -3
- package/src/test/utils.test.ts +70 -49
- package/src/test/wallet.ts +10 -2
package/dist/entities/pool.d.ts
CHANGED
|
@@ -375,4 +375,15 @@ export declare class Pool {
|
|
|
375
375
|
* @returns {Promise<any>} Transaction
|
|
376
376
|
*/
|
|
377
377
|
cancelFuturesOrder(market: string, options?: any): Promise<any>;
|
|
378
|
+
/**
|
|
379
|
+
* mintManagerFee
|
|
380
|
+
* @param {any} options Transaction options
|
|
381
|
+
* @returns {Promise<any>} Transaction
|
|
382
|
+
*/
|
|
383
|
+
mintManagerFee(options?: any): Promise<any>;
|
|
384
|
+
/**
|
|
385
|
+
* getAvailableManagerFee
|
|
386
|
+
* @returns {Promise<BigNumber>} fee
|
|
387
|
+
*/
|
|
388
|
+
getAvailableManagerFee(): Promise<BigNumber>;
|
|
378
389
|
}
|
package/dist/test/constants.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
1
2
|
import { ethers } from "ethers";
|
|
2
3
|
import { Network } from "../../types";
|
|
3
4
|
export declare type TestingRunParams = {
|
|
4
5
|
network: Network;
|
|
5
6
|
wallet: ethers.Wallet;
|
|
7
|
+
provider: ethers.providers.JsonRpcProvider;
|
|
6
8
|
};
|
|
7
9
|
declare type TestHelperParams = {
|
|
8
10
|
testingRun: (testingRunParams: TestingRunParams) => void;
|
|
@@ -10,4 +12,9 @@ declare type TestHelperParams = {
|
|
|
10
12
|
network: Network;
|
|
11
13
|
};
|
|
12
14
|
export declare const testingHelper: ({ network, testingRun }: TestHelperParams) => void;
|
|
15
|
+
export declare const beforeAfterReset: ({ beforeAll, afterAll, provider }: {
|
|
16
|
+
beforeAll: any;
|
|
17
|
+
afterAll: any;
|
|
18
|
+
provider: ethers.providers.JsonRpcProvider;
|
|
19
|
+
}) => void;
|
|
13
20
|
export {};
|
package/dist/test/wallet.d.ts
CHANGED
|
@@ -6,4 +6,7 @@ export declare const networkPortMap: {
|
|
|
6
6
|
optimism: number;
|
|
7
7
|
arbitrum: number;
|
|
8
8
|
};
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const getWalletData: (network: Network) => {
|
|
10
|
+
wallet: ethers.Wallet;
|
|
11
|
+
provider: ethers.providers.JsonRpcProvider;
|
|
12
|
+
};
|
|
@@ -21815,6 +21815,83 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21815
21815
|
}
|
|
21816
21816
|
|
|
21817
21817
|
return cancelFuturesOrder;
|
|
21818
|
+
}()
|
|
21819
|
+
/**
|
|
21820
|
+
* mintManagerFee
|
|
21821
|
+
* @param {any} options Transaction options
|
|
21822
|
+
* @returns {Promise<any>} Transaction
|
|
21823
|
+
*/
|
|
21824
|
+
;
|
|
21825
|
+
|
|
21826
|
+
_proto.mintManagerFee =
|
|
21827
|
+
/*#__PURE__*/
|
|
21828
|
+
function () {
|
|
21829
|
+
var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(options) {
|
|
21830
|
+
var tx;
|
|
21831
|
+
return runtime_1.wrap(function _callee41$(_context41) {
|
|
21832
|
+
while (1) {
|
|
21833
|
+
switch (_context41.prev = _context41.next) {
|
|
21834
|
+
case 0:
|
|
21835
|
+
if (options === void 0) {
|
|
21836
|
+
options = null;
|
|
21837
|
+
}
|
|
21838
|
+
|
|
21839
|
+
_context41.next = 3;
|
|
21840
|
+
return this.poolLogic.mintManagerFee(options);
|
|
21841
|
+
|
|
21842
|
+
case 3:
|
|
21843
|
+
tx = _context41.sent;
|
|
21844
|
+
return _context41.abrupt("return", tx);
|
|
21845
|
+
|
|
21846
|
+
case 5:
|
|
21847
|
+
case "end":
|
|
21848
|
+
return _context41.stop();
|
|
21849
|
+
}
|
|
21850
|
+
}
|
|
21851
|
+
}, _callee41, this);
|
|
21852
|
+
}));
|
|
21853
|
+
|
|
21854
|
+
function mintManagerFee(_x164) {
|
|
21855
|
+
return _mintManagerFee.apply(this, arguments);
|
|
21856
|
+
}
|
|
21857
|
+
|
|
21858
|
+
return mintManagerFee;
|
|
21859
|
+
}()
|
|
21860
|
+
/**
|
|
21861
|
+
* getAvailableManagerFee
|
|
21862
|
+
* @returns {Promise<BigNumber>} fee
|
|
21863
|
+
*/
|
|
21864
|
+
;
|
|
21865
|
+
|
|
21866
|
+
_proto.getAvailableManagerFee =
|
|
21867
|
+
/*#__PURE__*/
|
|
21868
|
+
function () {
|
|
21869
|
+
var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42() {
|
|
21870
|
+
var fee;
|
|
21871
|
+
return runtime_1.wrap(function _callee42$(_context42) {
|
|
21872
|
+
while (1) {
|
|
21873
|
+
switch (_context42.prev = _context42.next) {
|
|
21874
|
+
case 0:
|
|
21875
|
+
_context42.next = 2;
|
|
21876
|
+
return this.poolLogic.availableManagerFee();
|
|
21877
|
+
|
|
21878
|
+
case 2:
|
|
21879
|
+
fee = _context42.sent;
|
|
21880
|
+
return _context42.abrupt("return", ethers.BigNumber.from(fee));
|
|
21881
|
+
|
|
21882
|
+
case 4:
|
|
21883
|
+
case "end":
|
|
21884
|
+
return _context42.stop();
|
|
21885
|
+
}
|
|
21886
|
+
}
|
|
21887
|
+
}, _callee42, this);
|
|
21888
|
+
}));
|
|
21889
|
+
|
|
21890
|
+
function getAvailableManagerFee() {
|
|
21891
|
+
return _getAvailableManagerFee.apply(this, arguments);
|
|
21892
|
+
}
|
|
21893
|
+
|
|
21894
|
+
return getAvailableManagerFee;
|
|
21818
21895
|
}();
|
|
21819
21896
|
|
|
21820
21897
|
return Pool;
|