@typus/typus-sdk 1.2.89 → 1.2.91
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/lib/config.json +1 -1
- package/lib/utils/locked-period-vault/locked-period-vault/functions.js +1 -1
- package/lib/utils/typus-dov-single-v2/authorized-entry.js +2 -2
- package/lib/utils/typus-dov-single-v2/mfud-user-entry.js +3 -3
- package/lib/utils/typus-dov-single-v2/user-entry.js +23 -15
- package/package.json +1 -1
package/lib/config.json
CHANGED
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"LOCKED_VAULT": "0xe79b7ba69b750d30ac7ae171483a4064d0bb34090493fef3c844a11b05818d79"
|
|
69
69
|
},
|
|
70
70
|
"PACKAGE": {
|
|
71
|
-
"DOV_SINGLE": "
|
|
71
|
+
"DOV_SINGLE": "0x2f532cee2587915e76c790b28b132f8fce877037de6af1e6c6a77c91563ca7ed",
|
|
72
72
|
"FRAMEWORK": "0xa304e225551b619b07c06d8965462b268138b2c5774fd22ad8853ef91fbb9771",
|
|
73
73
|
"MFUD": "0x7755ff79f0f27256c73e6c197e25b407ef6d4b9bd6e1af8cdd50fef28f84712c",
|
|
74
74
|
"NFT": "0x0f5162014f18686640b8d0adefd60c3fe5b377413ec4f1e77001c67d96f8501a",
|
|
@@ -134,7 +134,7 @@ function depositAndLockReceipt(input) {
|
|
|
134
134
|
type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
|
|
135
135
|
objects: input.receipts.map(function (receipt) { return input.tx.object(receipt); }),
|
|
136
136
|
}),
|
|
137
|
-
input.tx.
|
|
137
|
+
input.tx.object(constants_1.CLOCK),
|
|
138
138
|
],
|
|
139
139
|
});
|
|
140
140
|
input.tx.moveCall({
|
|
@@ -96,7 +96,7 @@ function getOtcTx(gasBudget_1, packageId_1, typeArguments_1, registry_1, index_1
|
|
|
96
96
|
tx.pure(incentiveBidValue),
|
|
97
97
|
tx.pure(incentiveFeeBalanceValue),
|
|
98
98
|
tx.pure(depositorIncentiveValue),
|
|
99
|
-
tx.
|
|
99
|
+
tx.object(constants_1.CLOCK),
|
|
100
100
|
],
|
|
101
101
|
});
|
|
102
102
|
}
|
|
@@ -115,7 +115,7 @@ function getOtcTx(gasBudget_1, packageId_1, typeArguments_1, registry_1, index_1
|
|
|
115
115
|
tx.pure(incentiveBidValue),
|
|
116
116
|
tx.pure(incentiveFeeBalanceValue),
|
|
117
117
|
tx.pure(depositorIncentiveValue),
|
|
118
|
-
tx.
|
|
118
|
+
tx.object(constants_1.CLOCK),
|
|
119
119
|
],
|
|
120
120
|
});
|
|
121
121
|
}
|
|
@@ -49,7 +49,7 @@ function getRaiseFundTx(input) {
|
|
|
49
49
|
input.tx.object(typusTokenBalance),
|
|
50
50
|
input.tx.pure(input.raiseFromPremium),
|
|
51
51
|
input.tx.pure(input.raiseFromInactive),
|
|
52
|
-
input.tx.
|
|
52
|
+
input.tx.object(constants_1.CLOCK),
|
|
53
53
|
],
|
|
54
54
|
});
|
|
55
55
|
input.tx.transferObjects([input.tx.object(result[0])], input.user);
|
|
@@ -75,7 +75,7 @@ function getReduceFundTx(input) {
|
|
|
75
75
|
input.tx.pure(input.reduceFromPremium),
|
|
76
76
|
input.tx.pure(input.reduceFromInactive),
|
|
77
77
|
input.tx.pure(input.reduceFromIncentive),
|
|
78
|
-
input.tx.
|
|
78
|
+
input.tx.object(constants_1.CLOCK),
|
|
79
79
|
],
|
|
80
80
|
});
|
|
81
81
|
input.tx.moveCall({
|
|
@@ -166,7 +166,7 @@ function getDepositTx(input) {
|
|
|
166
166
|
type: "".concat(input.typusFrameworkOriginPackageId, "::vault::TypusDepositReceipt"),
|
|
167
167
|
objects: input.receipts.map(function (id) { return input.tx.object(id); }),
|
|
168
168
|
}),
|
|
169
|
-
input.tx.
|
|
169
|
+
input.tx.object(constants_1.CLOCK),
|
|
170
170
|
],
|
|
171
171
|
});
|
|
172
172
|
input.tx.moveCall({
|
|
@@ -35,18 +35,26 @@ var constants_1 = require("../../constants");
|
|
|
35
35
|
): (TypusDepositReceipt, vector<u64>) {
|
|
36
36
|
*/
|
|
37
37
|
function getRaiseFundTx(input) {
|
|
38
|
-
var raiseBalance = input.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
input.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
objects: input.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
var raiseBalance = input.typeArguments[0] == "0x2::sui::SUI" ||
|
|
39
|
+
input.typeArguments[0] == "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI"
|
|
40
|
+
? input.tx.moveCall({
|
|
41
|
+
target: "".concat(input.typusFrameworkPackageId, "::utils::delegate_extract_balance"),
|
|
42
|
+
typeArguments: [input.typeArguments[0]],
|
|
43
|
+
arguments: [
|
|
44
|
+
input.tx.pure(input.user),
|
|
45
|
+
input.tx.makeMoveVec({ objects: [input.tx.splitCoins(input.tx.gas, [input.tx.pure(input.raiseAmount)])] }),
|
|
46
|
+
input.tx.pure(input.raiseAmount),
|
|
47
|
+
],
|
|
48
|
+
})
|
|
49
|
+
: input.tx.moveCall({
|
|
50
|
+
target: "".concat(input.typusFrameworkPackageId, "::utils::delegate_extract_balance"),
|
|
51
|
+
typeArguments: [input.typeArguments[0]],
|
|
52
|
+
arguments: [
|
|
53
|
+
input.tx.pure(input.user),
|
|
54
|
+
input.tx.makeMoveVec({ objects: input.raiseCoins.map(function (coin) { return input.tx.object(coin); }) }),
|
|
55
|
+
input.tx.pure(input.raiseAmount),
|
|
56
|
+
],
|
|
57
|
+
});
|
|
50
58
|
var result = input.tx.moveCall({
|
|
51
59
|
target: "".concat(input.typusDovSinglePackageId, "::tds_user_entry::public_raise_fund"),
|
|
52
60
|
typeArguments: input.typeArguments,
|
|
@@ -63,7 +71,7 @@ function getRaiseFundTx(input) {
|
|
|
63
71
|
input.tx.object(raiseBalance),
|
|
64
72
|
input.tx.pure(input.raiseFromPremium),
|
|
65
73
|
input.tx.pure(input.raiseFromInactive),
|
|
66
|
-
input.tx.
|
|
74
|
+
input.tx.object(constants_1.CLOCK),
|
|
67
75
|
],
|
|
68
76
|
});
|
|
69
77
|
input.tx.transferObjects([input.tx.object(result[0])], input.user);
|
|
@@ -106,7 +114,7 @@ function getReduceFundTx(input) {
|
|
|
106
114
|
input.tx.pure(input.reduceFromPremium),
|
|
107
115
|
input.tx.pure(input.reduceFromInactive),
|
|
108
116
|
input.tx.pure(input.reduceFromIncentive),
|
|
109
|
-
input.tx.
|
|
117
|
+
input.tx.object(constants_1.CLOCK),
|
|
110
118
|
],
|
|
111
119
|
});
|
|
112
120
|
input.tx.moveCall({
|
|
@@ -191,7 +199,7 @@ function getNewBidTx(input) {
|
|
|
191
199
|
input.tx.pure(input.index),
|
|
192
200
|
input.tx.makeMoveVec({ objects: [coin] }),
|
|
193
201
|
input.tx.pure(input.size),
|
|
194
|
-
input.tx.
|
|
202
|
+
input.tx.object(constants_1.CLOCK),
|
|
195
203
|
],
|
|
196
204
|
});
|
|
197
205
|
input.tx.transferObjects([input.tx.object(result[0])], input.user);
|