@typus/typus-sdk 0.1.2 → 0.1.4
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 +2 -6
- package/lib/constants.d.ts +17 -9
- package/lib/constants.js +22 -10
- package/lib/scripts/coveredCall/{getCoveredCallDepositTx.d.ts → getDeliveryTx.d.ts} +0 -0
- package/lib/scripts/coveredCall/{getCoveredCallUnsubscribeTx.js → getDeliveryTx.js} +6 -6
- package/lib/scripts/{getDepositTx.d.ts → coveredCall/getDepositTx.d.ts} +0 -0
- package/lib/scripts/{getDepositTx.js → coveredCall/getDepositTx.js} +7 -8
- package/lib/scripts/coveredCall/{getCoveredCallUnsubscribeTx.d.ts → getNewAuctionTx.d.ts} +0 -0
- package/lib/scripts/{getNewSharkFinVaultTx.js → coveredCall/getNewAuctionTx.js} +13 -11
- package/lib/scripts/{getNewSharkFinVaultTx.d.ts → coveredCall/getNewAuctionWithNextCoveredCallVaultTx.d.ts} +0 -0
- package/lib/scripts/coveredCall/getNewAuctionWithNextCoveredCallVaultTx.js +65 -0
- package/lib/scripts/coveredCall/getNewBidTx.d.ts +1 -0
- package/lib/scripts/coveredCall/getNewBidTx.js +59 -0
- package/lib/scripts/coveredCall/getNewCoveredCallVaultTx.js +4 -2
- package/lib/scripts/coveredCall/getRemoveBidTx.d.ts +1 -0
- package/lib/scripts/coveredCall/getRemoveBidTx.js +56 -0
- package/lib/scripts/coveredCall/getSubscribeTx.d.ts +1 -0
- package/lib/scripts/coveredCall/getSubscribeTx.js +55 -0
- package/lib/scripts/coveredCall/getUnsubscribeTx.d.ts +1 -0
- package/lib/scripts/coveredCall/getUnsubscribeTx.js +55 -0
- package/lib/scripts/coveredCall/getWithdrawTx.d.ts +1 -0
- package/lib/scripts/coveredCall/{getCoveredCallDepositTx.js → getWithdrawTx.js} +6 -7
- package/lib/scripts/getMintTx.js +4 -2
- package/lib/scripts/getNewOracleTx.js +3 -3
- package/lib/scripts/getSubVault.js +3 -2
- package/lib/scripts/getUpdateOracleTx.js +1 -1
- package/lib/test/testCrypto.d.ts +1 -0
- package/lib/test/testCrypto.js +54 -0
- package/lib/test/testDeposit.js +16 -43
- package/lib/test/testDepositV2.d.ts +0 -1
- package/lib/test/testDepositV2.js +61 -168
- package/lib/test/testMint.js +73 -33
- package/lib/test/testNewVault.d.ts +1 -0
- package/lib/test/testNewVault.js +171 -0
- package/lib/test/testOracle.js +4 -3
- package/lib/test/testSubscribeEvent.d.ts +1 -0
- package/lib/test/testSubscribeEvent.js +97 -0
- package/lib/test/testUnsubscribe.d.ts +1 -0
- package/lib/test/testUnsubscribe.js +86 -0
- package/lib/utils/auction/sealedAuction.d.ts +33 -0
- package/lib/utils/auction/sealedAuction.js +64 -0
- package/lib/utils/coveredCall/getDeliveryTx.d.ts +1 -0
- package/lib/utils/coveredCall/{getCoveredCallDepositTx.js → getDeliveryTx.js} +5 -10
- package/lib/utils/{getDepositTx.d.ts → coveredCall/getDepositTx.d.ts} +0 -0
- package/lib/utils/{getDepositTx.js → coveredCall/getDepositTx.js} +3 -3
- package/lib/utils/coveredCall/getNewAuctionTx.d.ts +1 -0
- package/lib/utils/{getNewSharkFinVaultTx.js → coveredCall/getNewAuctionTx.js} +15 -13
- package/lib/utils/coveredCall/getNewAuctionWithNextCoveredCallVaultTx.d.ts +1 -0
- package/lib/utils/coveredCall/getNewAuctionWithNextCoveredCallVaultTx.js +69 -0
- package/lib/utils/coveredCall/getNewBidTx.d.ts +1 -0
- package/lib/utils/coveredCall/getNewBidTx.js +62 -0
- package/lib/utils/coveredCall/getNewCoveredCallVaultTx.d.ts +1 -1
- package/lib/utils/coveredCall/getNewCoveredCallVaultTx.js +3 -2
- package/lib/utils/coveredCall/getRemoveBidTx.d.ts +1 -0
- package/lib/utils/coveredCall/getRemoveBidTx.js +60 -0
- package/lib/utils/coveredCall/getSubscribeTx.d.ts +1 -0
- package/lib/utils/coveredCall/getSubscribeTx.js +59 -0
- package/lib/utils/coveredCall/getUnsubscribeTx.d.ts +1 -0
- package/lib/utils/coveredCall/{getCoveredCallUnsubscribeTx.js → getUnsubscribeTx.js} +3 -3
- package/lib/utils/coveredCall/getWithdrawTx.d.ts +1 -0
- package/lib/utils/coveredCall/getWithdrawTx.js +61 -0
- package/lib/utils/getMintTx.d.ts +1 -1
- package/lib/utils/getMintTx.js +3 -3
- package/lib/utils/getNewOracleTx.d.ts +1 -1
- package/lib/utils/getNewOracleTx.js +2 -2
- package/lib/utils/getSubVault.js +1 -1
- package/lib/utils/getTypeArgumentFromToken.d.ts +1 -0
- package/lib/utils/getTypeArgumentFromToken.js +67 -0
- package/package.json +6 -2
- package/lib/utils/coveredCall/getCoveredCallDepositTx.d.ts +0 -1
- package/lib/utils/coveredCall/getCoveredCallUnsubscribeTx.d.ts +0 -1
- package/lib/utils/getNewSharkFinVaultTx.d.ts +0 -1
package/README.md
CHANGED
|
@@ -13,14 +13,10 @@ npm i
|
|
|
13
13
|
npx ts-node scripts/sui.ts
|
|
14
14
|
```
|
|
15
15
|
### mint customized token
|
|
16
|
-
- get package object id from
|
|
17
|
-
```bash
|
|
18
|
-
sui client call --gas-budget 10000 --package $PACKAGE --module "token" --function "new"
|
|
19
|
-
```
|
|
20
|
-
to create registry, and use the registry mint 10001 token:
|
|
16
|
+
- get package object id and one of asset registry(for example:BTC )from sui-dev-token, and use the registry mint 10001 token:
|
|
21
17
|
|
|
22
18
|
```bash
|
|
23
|
-
sui client call --gas-budget 10000 --package $PACKAGE --module "
|
|
19
|
+
sui client call --gas-budget 10000 --package $PACKAGE --module "token_btc" --function "mint" --args $REGISTRY 10001
|
|
24
20
|
```
|
|
25
21
|
|
|
26
22
|
you will get different object with balance every time after mint, and all of them created by a same registry.
|
package/lib/constants.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
export declare const TOKEN_PACKAGE = "
|
|
2
|
-
export declare const TOKEN_REGISTRY = "
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const COVERED_CALL_MANAGER = "0x8517b2dbaae56eeb84352e4869b289459c68965b";
|
|
1
|
+
export declare const TOKEN_PACKAGE = "0xd73d20a3ca73054ef56af95754698af0f587f90d";
|
|
2
|
+
export declare const TOKEN_REGISTRY = "0x882541280791e5c2a2eb386d1f36be220461d471";
|
|
3
|
+
export declare const ORACLE_PACKAGE = "0xe85eabdada216e470344b2e70cdc8155a4007a2a";
|
|
4
|
+
export declare const COVERED_CALL_PACKAGE = "0xc33f18cc20a5c17c41ef9e054e1b37f60d804d9c";
|
|
5
|
+
export declare const COVERED_CALL_REGISTRY = "0x6c17473d6b1252db26278ec5818ef3bfdca75c89";
|
|
6
|
+
export declare const COVERED_CALL_MANAGER = "0xe004885ef67c7af37b96f8313738bb758d51b6d3";
|
|
7
|
+
export declare const DOV_PACKAGE = "0x461c7f49f322c3b12523f51c8b8f00d6e0eda243";
|
|
9
8
|
export declare const DEFAULT_TYPE_ARGUMENT = "0x2::sui::SUI";
|
|
10
|
-
export declare const
|
|
9
|
+
export declare const FAKE_TOKEN_TYPE_ARGUMENT = "0x27b3674c685046f66cad1d5496d2967894fa5329::token::USDC";
|
|
10
|
+
export declare const TEST_MNEMONIC = "plug grain matter asthma aware critic can lottery blouse uncover sauce speak";
|
|
11
|
+
export declare const TOKEN_NAME: string[];
|
|
12
|
+
export declare const TOKEN_NAME_TO_MODULE: {
|
|
13
|
+
BTC: string;
|
|
14
|
+
ETH: string;
|
|
15
|
+
SUI: string;
|
|
16
|
+
USDC: string;
|
|
17
|
+
USDT: string;
|
|
18
|
+
};
|
package/lib/constants.js
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
3
|
+
exports.TOKEN_NAME_TO_MODULE = exports.TOKEN_NAME = exports.TEST_MNEMONIC = exports.FAKE_TOKEN_TYPE_ARGUMENT = exports.DEFAULT_TYPE_ARGUMENT = exports.DOV_PACKAGE = exports.COVERED_CALL_MANAGER = exports.COVERED_CALL_REGISTRY = exports.COVERED_CALL_PACKAGE = exports.ORACLE_PACKAGE = exports.TOKEN_REGISTRY = exports.TOKEN_PACKAGE = void 0;
|
|
4
|
+
//publish from sui-dev-token
|
|
5
|
+
exports.TOKEN_PACKAGE = "0xd73d20a3ca73054ef56af95754698af0f587f90d";
|
|
6
|
+
exports.TOKEN_REGISTRY = "0x882541280791e5c2a2eb386d1f36be220461d471"; //fake btc registry
|
|
7
|
+
//publish from typus-oracle
|
|
8
|
+
exports.ORACLE_PACKAGE = "0xe85eabdada216e470344b2e70cdc8155a4007a2a";
|
|
9
|
+
//publish from typus-dov/cover_call
|
|
10
|
+
exports.COVERED_CALL_PACKAGE = "0xc33f18cc20a5c17c41ef9e054e1b37f60d804d9c";
|
|
11
|
+
exports.COVERED_CALL_REGISTRY = "0x6c17473d6b1252db26278ec5818ef3bfdca75c89";
|
|
12
|
+
exports.COVERED_CALL_MANAGER = "0xe004885ef67c7af37b96f8313738bb758d51b6d3";
|
|
13
|
+
//publish from typus-dov/typus-dov
|
|
14
|
+
exports.DOV_PACKAGE = "0x461c7f49f322c3b12523f51c8b8f00d6e0eda243";
|
|
12
15
|
exports.DEFAULT_TYPE_ARGUMENT = "0x2::sui::SUI";
|
|
13
|
-
exports.
|
|
16
|
+
exports.FAKE_TOKEN_TYPE_ARGUMENT = "0x27b3674c685046f66cad1d5496d2967894fa5329::token::USDC";
|
|
17
|
+
exports.TEST_MNEMONIC = "plug grain matter asthma aware critic can lottery blouse uncover sauce speak";
|
|
18
|
+
exports.TOKEN_NAME = ["BTC", "ETH", "SUI", "USDC", "USDT"];
|
|
19
|
+
exports.TOKEN_NAME_TO_MODULE = {
|
|
20
|
+
"BTC": "btc",
|
|
21
|
+
"ETH": "token_eth",
|
|
22
|
+
"SUI": "token_sui",
|
|
23
|
+
"USDC": "token_usdc",
|
|
24
|
+
"USDT": "token_usdt",
|
|
25
|
+
};
|
|
File without changes
|
|
@@ -36,19 +36,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var
|
|
39
|
+
var getDeliveryTx_1 = require("../../utils/coveredCall/getDeliveryTx");
|
|
40
40
|
var constants_1 = require("../../constants");
|
|
41
41
|
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
-
var index,
|
|
42
|
+
var index, deliveryTx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
44
44
|
switch (_a.label) {
|
|
45
45
|
case 0:
|
|
46
|
-
console.log("test for
|
|
46
|
+
console.log("test for getSubscribeTx()");
|
|
47
47
|
index = 0;
|
|
48
|
-
return [4 /*yield*/, (0,
|
|
48
|
+
return [4 /*yield*/, (0, getDeliveryTx_1.getDeliveryTx)(constants_1.COVERED_CALL_PACKAGE, constants_1.COVERED_CALL_MANAGER, constants_1.COVERED_CALL_REGISTRY, constants_1.DEFAULT_TYPE_ARGUMENT, index)];
|
|
49
49
|
case 1:
|
|
50
|
-
|
|
51
|
-
console.log(
|
|
50
|
+
deliveryTx = _a.sent();
|
|
51
|
+
console.log(deliveryTx);
|
|
52
52
|
return [2 /*return*/];
|
|
53
53
|
}
|
|
54
54
|
});
|
|
File without changes
|
|
@@ -36,20 +36,19 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var getDepositTx_1 = require("
|
|
40
|
-
var constants_1 = require("
|
|
39
|
+
var getDepositTx_1 = require("../../utils/coveredCall/getDepositTx");
|
|
40
|
+
var constants_1 = require("../../constants");
|
|
41
41
|
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
-
var
|
|
42
|
+
var index, rolling, coin, amount, depositTx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
44
44
|
switch (_a.label) {
|
|
45
45
|
case 0:
|
|
46
46
|
console.log("test for getDepositTx()");
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
coin = "0x51537ac6fdbe920db8319e3fa41b764d721cc46e";
|
|
47
|
+
index = 0;
|
|
48
|
+
rolling = true;
|
|
49
|
+
coin = "";
|
|
51
50
|
amount = 9999;
|
|
52
|
-
return [4 /*yield*/, (0, getDepositTx_1.getDepositTx)(constants_1.
|
|
51
|
+
return [4 /*yield*/, (0, getDepositTx_1.getDepositTx)(constants_1.COVERED_CALL_PACKAGE, constants_1.COVERED_CALL_REGISTRY, constants_1.FAKE_TOKEN_TYPE_ARGUMENT, index, rolling, coin, amount)];
|
|
53
52
|
case 1:
|
|
54
53
|
depositTx = _a.sent();
|
|
55
54
|
console.log(depositTx);
|
|
File without changes
|
|
@@ -36,23 +36,25 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var
|
|
40
|
-
var constants_1 = require("
|
|
39
|
+
var getNewAuctionTx_1 = require("../../utils/coveredCall/getNewAuctionTx");
|
|
40
|
+
var constants_1 = require("../../constants");
|
|
41
41
|
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
-
var typeArgument,
|
|
42
|
+
var typeArgument, vaultIndex, start, end, decay, initialPrice, finalPrice, newAuctionTx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
44
44
|
switch (_a.label) {
|
|
45
45
|
case 0:
|
|
46
|
-
console.log("test for
|
|
46
|
+
console.log("test for getNewAuctionTx()");
|
|
47
47
|
typeArgument = "0x27b3674c685046f66cad1d5496d2967894fa5329::token::USDC";
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
vaultIndex = 1;
|
|
49
|
+
start = 1;
|
|
50
|
+
end = 100;
|
|
51
|
+
decay = 0;
|
|
52
|
+
initialPrice = 1;
|
|
53
|
+
finalPrice = 100;
|
|
54
|
+
return [4 /*yield*/, (0, getNewAuctionTx_1.getNewAuctionTx)(constants_1.COVERED_CALL_PACKAGE, constants_1.COVERED_CALL_REGISTRY, typeArgument, constants_1.COVERED_CALL_MANAGER, vaultIndex, start, end, decay, initialPrice, finalPrice)];
|
|
53
55
|
case 1:
|
|
54
|
-
|
|
55
|
-
console.log(
|
|
56
|
+
newAuctionTx = _a.sent();
|
|
57
|
+
console.log(newAuctionTx);
|
|
56
58
|
return [2 /*return*/];
|
|
57
59
|
}
|
|
58
60
|
});
|
|
File without changes
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var getNewAuctionWithNextCoveredCallVaultTx_1 = require("../../utils/coveredCall/getNewAuctionWithNextCoveredCallVaultTx");
|
|
40
|
+
var constants_1 = require("../../constants");
|
|
41
|
+
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
+
var index, start, end, decay, initialPrice, finalPrice, expiration, assetName, strikeOtmPct, priceOracle, newAuctionWithNextCoveredCallVaultTx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
switch (_a.label) {
|
|
45
|
+
case 0:
|
|
46
|
+
console.log("test for getNewAuctionWithNextCoveredCallVaultTx()");
|
|
47
|
+
index = 1;
|
|
48
|
+
start = 10;
|
|
49
|
+
end = 20;
|
|
50
|
+
decay = 2;
|
|
51
|
+
initialPrice = 5;
|
|
52
|
+
finalPrice = 1;
|
|
53
|
+
expiration = 2000;
|
|
54
|
+
assetName = "BTC";
|
|
55
|
+
strikeOtmPct = 2000;
|
|
56
|
+
priceOracle = "" // new oracle by new_oracle
|
|
57
|
+
;
|
|
58
|
+
return [4 /*yield*/, (0, getNewAuctionWithNextCoveredCallVaultTx_1.getNewAuctionWithNextCoveredCallVaultTx)(constants_1.COVERED_CALL_PACKAGE, constants_1.COVERED_CALL_MANAGER, constants_1.COVERED_CALL_REGISTRY, constants_1.DEFAULT_TYPE_ARGUMENT, index, start, end, decay, initialPrice, finalPrice, expiration, assetName, strikeOtmPct, priceOracle)];
|
|
59
|
+
case 1:
|
|
60
|
+
newAuctionWithNextCoveredCallVaultTx = _a.sent();
|
|
61
|
+
console.log(newAuctionWithNextCoveredCallVaultTx);
|
|
62
|
+
return [2 /*return*/];
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}); })();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var getNewBidTx_1 = require("../../utils/coveredCall/getNewBidTx");
|
|
40
|
+
var constants_1 = require("../../constants");
|
|
41
|
+
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
+
var index, size, coin, time, newBidTx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
switch (_a.label) {
|
|
45
|
+
case 0:
|
|
46
|
+
console.log("test for getNewBidTx()");
|
|
47
|
+
index = 0;
|
|
48
|
+
size = 1;
|
|
49
|
+
coin = "";
|
|
50
|
+
time = "" //publish from typus-oracle->new_time()
|
|
51
|
+
;
|
|
52
|
+
return [4 /*yield*/, (0, getNewBidTx_1.getNewBidTx)(constants_1.COVERED_CALL_PACKAGE, constants_1.COVERED_CALL_REGISTRY, constants_1.DEFAULT_TYPE_ARGUMENT, index, size, coin, time)];
|
|
53
|
+
case 1:
|
|
54
|
+
newBidTx = _a.sent();
|
|
55
|
+
console.log(newBidTx);
|
|
56
|
+
return [2 /*return*/];
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}); })();
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
var getNewCoveredCallVaultTx_1 = require("../../utils/coveredCall/getNewCoveredCallVaultTx");
|
|
40
40
|
var constants_1 = require("../../constants");
|
|
41
41
|
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
-
var expiration, assetName, strike, newCoveredCallVaultTx;
|
|
42
|
+
var expiration, assetName, strike, oracle, newCoveredCallVaultTx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
44
44
|
switch (_a.label) {
|
|
45
45
|
case 0:
|
|
@@ -47,7 +47,9 @@ var constants_1 = require("../../constants");
|
|
|
47
47
|
expiration = 123;
|
|
48
48
|
assetName = "sui";
|
|
49
49
|
strike = 456;
|
|
50
|
-
|
|
50
|
+
oracle = "0x7158f68a06bc09123fcba1645f4c56ca866a8e90" //created from "new oracle"
|
|
51
|
+
;
|
|
52
|
+
return [4 /*yield*/, (0, getNewCoveredCallVaultTx_1.getNewCoveredCallVaultTx)(constants_1.COVERED_CALL_PACKAGE, constants_1.COVERED_CALL_REGISTRY, constants_1.DEFAULT_TYPE_ARGUMENT, constants_1.COVERED_CALL_MANAGER, expiration, assetName, strike, oracle)];
|
|
51
53
|
case 1:
|
|
52
54
|
newCoveredCallVaultTx = _a.sent();
|
|
53
55
|
console.log(newCoveredCallVaultTx);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var getRemoveBidTx_1 = require("../../utils/coveredCall/getRemoveBidTx");
|
|
40
|
+
var constants_1 = require("../../constants");
|
|
41
|
+
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
+
var index, bidIndex, removeBidTx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
switch (_a.label) {
|
|
45
|
+
case 0:
|
|
46
|
+
console.log("test for getRemoveBidTx()");
|
|
47
|
+
index = 0;
|
|
48
|
+
bidIndex = 1;
|
|
49
|
+
return [4 /*yield*/, (0, getRemoveBidTx_1.getRemoveBidTx)(constants_1.COVERED_CALL_PACKAGE, constants_1.COVERED_CALL_REGISTRY, constants_1.DEFAULT_TYPE_ARGUMENT, index, bidIndex)];
|
|
50
|
+
case 1:
|
|
51
|
+
removeBidTx = _a.sent();
|
|
52
|
+
console.log(removeBidTx);
|
|
53
|
+
return [2 /*return*/];
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}); })();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var getSubscribeTx_1 = require("../../utils/coveredCall/getSubscribeTx");
|
|
40
|
+
var constants_1 = require("../../constants");
|
|
41
|
+
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
+
var index, subscribeTx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
switch (_a.label) {
|
|
45
|
+
case 0:
|
|
46
|
+
console.log("test for getSubscribeTx()");
|
|
47
|
+
index = 0;
|
|
48
|
+
return [4 /*yield*/, (0, getSubscribeTx_1.getSubscribeTx)(constants_1.COVERED_CALL_PACKAGE, constants_1.COVERED_CALL_REGISTRY, constants_1.DEFAULT_TYPE_ARGUMENT, index)];
|
|
49
|
+
case 1:
|
|
50
|
+
subscribeTx = _a.sent();
|
|
51
|
+
console.log(subscribeTx);
|
|
52
|
+
return [2 /*return*/];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}); })();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var getUnsubscribeTx_1 = require("../../utils/coveredCall/getUnsubscribeTx");
|
|
40
|
+
var constants_1 = require("../../constants");
|
|
41
|
+
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
+
var index, unsubscribeTx;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
switch (_a.label) {
|
|
45
|
+
case 0:
|
|
46
|
+
console.log("test for getUnsubscribeTx()");
|
|
47
|
+
index = 0;
|
|
48
|
+
return [4 /*yield*/, (0, getUnsubscribeTx_1.getUnsubscribeTx)(constants_1.COVERED_CALL_PACKAGE, constants_1.COVERED_CALL_REGISTRY, constants_1.DEFAULT_TYPE_ARGUMENT, index)];
|
|
49
|
+
case 1:
|
|
50
|
+
unsubscribeTx = _a.sent();
|
|
51
|
+
console.log(unsubscribeTx);
|
|
52
|
+
return [2 /*return*/];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}); })();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -36,22 +36,21 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var
|
|
39
|
+
var getWithdrawTx_1 = require("../../utils/coveredCall/getWithdrawTx");
|
|
40
40
|
var constants_1 = require("../../constants");
|
|
41
41
|
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
-
var index, rolling,
|
|
42
|
+
var index, rolling, amount, withdrawTx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
44
44
|
switch (_a.label) {
|
|
45
45
|
case 0:
|
|
46
|
-
console.log("test for
|
|
46
|
+
console.log("test for getWithdrawTx()");
|
|
47
47
|
index = 0;
|
|
48
48
|
rolling = true;
|
|
49
|
-
coin = "";
|
|
50
49
|
amount = 9999;
|
|
51
|
-
return [4 /*yield*/, (0,
|
|
50
|
+
return [4 /*yield*/, (0, getWithdrawTx_1.getWithdrawTx)(constants_1.COVERED_CALL_PACKAGE, constants_1.COVERED_CALL_REGISTRY, constants_1.FAKE_TOKEN_TYPE_ARGUMENT, index, rolling, amount)];
|
|
52
51
|
case 1:
|
|
53
|
-
|
|
54
|
-
console.log(
|
|
52
|
+
withdrawTx = _a.sent();
|
|
53
|
+
console.log(withdrawTx);
|
|
55
54
|
return [2 /*return*/];
|
|
56
55
|
}
|
|
57
56
|
});
|
package/lib/scripts/getMintTx.js
CHANGED
|
@@ -39,13 +39,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
var getMintTx_1 = require("../utils/getMintTx");
|
|
40
40
|
var constants_1 = require("../constants");
|
|
41
41
|
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
-
var amount, mintTx;
|
|
42
|
+
var amount, moduleName, mintTx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
44
44
|
switch (_a.label) {
|
|
45
45
|
case 0:
|
|
46
46
|
console.log("test for getMintTx()");
|
|
47
47
|
amount = 10000;
|
|
48
|
-
|
|
48
|
+
moduleName = constants_1.TOKEN_NAME["BTC"] //reference: sui-dev-token repo
|
|
49
|
+
;
|
|
50
|
+
return [4 /*yield*/, (0, getMintTx_1.getMintTx)(constants_1.TOKEN_PACKAGE, constants_1.TOKEN_REGISTRY, moduleName, amount)];
|
|
49
51
|
case 1:
|
|
50
52
|
mintTx = _a.sent();
|
|
51
53
|
console.log(mintTx);
|
|
@@ -39,13 +39,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
var getNewOracleTx_1 = require("../utils/getNewOracleTx");
|
|
40
40
|
var constants_1 = require("../constants");
|
|
41
41
|
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
-
var
|
|
42
|
+
var decimal, newOracleTx;
|
|
43
43
|
return __generator(this, function (_a) {
|
|
44
44
|
switch (_a.label) {
|
|
45
45
|
case 0:
|
|
46
46
|
console.log("test for getNewOracleTx()");
|
|
47
|
-
|
|
48
|
-
return [4 /*yield*/, (0, getNewOracleTx_1.getNewOracleTx)(constants_1.TOKEN_PACKAGE,
|
|
47
|
+
decimal = 8;
|
|
48
|
+
return [4 /*yield*/, (0, getNewOracleTx_1.getNewOracleTx)(constants_1.TOKEN_PACKAGE, constants_1.DEFAULT_TYPE_ARGUMENT, decimal)];
|
|
49
49
|
case 1:
|
|
50
50
|
newOracleTx = _a.sent();
|
|
51
51
|
console.log(newOracleTx);
|
|
@@ -41,9 +41,10 @@ var getSubVault_1 = require("../utils/getSubVault");
|
|
|
41
41
|
var res;
|
|
42
42
|
return __generator(this, function (_a) {
|
|
43
43
|
switch (_a.label) {
|
|
44
|
-
case 0: return [4 /*yield*/, (0, getSubVault_1.subVaults)()];
|
|
44
|
+
case 0: return [4 /*yield*/, (0, getSubVault_1.subVaults)()]; //TODO: let registry be input variable
|
|
45
45
|
case 1:
|
|
46
|
-
res = _a.sent()
|
|
46
|
+
res = _a.sent() //TODO: let registry be input variable
|
|
47
|
+
;
|
|
47
48
|
console.log(res);
|
|
48
49
|
return [2 /*return*/];
|
|
49
50
|
}
|
|
@@ -50,7 +50,7 @@ var constants_1 = require("../constants");
|
|
|
50
50
|
;
|
|
51
51
|
price = 1234;
|
|
52
52
|
unix = 5678;
|
|
53
|
-
return [4 /*yield*/, (0, getUpdateOracleTx_1.getUpdateOracleTx)(constants_1.
|
|
53
|
+
return [4 /*yield*/, (0, getUpdateOracleTx_1.getUpdateOracleTx)(constants_1.ORACLE_PACKAGE, constants_1.DEFAULT_TYPE_ARGUMENT, oracle, managerCap, price, unix)];
|
|
54
54
|
case 1:
|
|
55
55
|
updateOracleTx = _a.sent();
|
|
56
56
|
console.log(updateOracleTx);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|