@scallop-io/sui-scallop-sdk 1.4.18 → 1.4.20
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/constants/poolAddress.d.ts +1 -0
- package/dist/constants/queryKeys.d.ts +2 -2
- package/dist/index.js +311 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +309 -79
- package/dist/index.mjs.map +1 -1
- package/dist/models/scallopQuery.d.ts +1 -0
- package/dist/queries/poolAddressesQuery.d.ts +1 -0
- package/dist/types/query/portfolio.d.ts +4 -0
- package/package.json +1 -1
- package/src/builders/borrowIncentiveBuilder.ts +29 -7
- package/src/builders/coreBuilder.ts +66 -10
- package/src/builders/oracle.ts +44 -4
- package/src/builders/referralBuilder.ts +20 -4
- package/src/builders/spoolBuilder.ts +38 -4
- package/src/builders/vescaBuilder.ts +25 -5
- package/src/constants/poolAddress.ts +49 -30
- package/src/constants/queryKeys.ts +2 -2
- package/src/queries/poolAddressesQuery.ts +4 -0
- package/src/queries/portfolioQuery.ts +16 -5
- package/src/queries/vescaQuery.ts +18 -4
- package/src/types/query/portfolio.ts +4 -0
- package/dist/test.d.ts +0 -1
- package/src/test.ts +0 -17
|
@@ -105,10 +105,14 @@ export type ObligationBorrowIncentive = {
|
|
|
105
105
|
rewards: ObligationBorrowIcentiveReward[];
|
|
106
106
|
};
|
|
107
107
|
export type TotalValueLocked = {
|
|
108
|
+
supplyLendingValue: number;
|
|
109
|
+
supplyCollateralValue: number;
|
|
108
110
|
supplyValue: number;
|
|
109
111
|
borrowValue: number;
|
|
110
112
|
totalValue: number;
|
|
111
113
|
supplyValueChangeRatio?: number;
|
|
114
|
+
supplyLendingValueChangeRatio?: number;
|
|
115
|
+
supplyCollateralValueChangeRatio?: number;
|
|
112
116
|
borrowValueChangeRatio?: number;
|
|
113
117
|
totalValueChangeRatio?: number;
|
|
114
118
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Transaction } from '@mysten/sui/transactions';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
SuiTxBlock as SuiKitTxBlock,
|
|
4
|
+
SUI_CLOCK_OBJECT_ID,
|
|
5
|
+
} from '@scallop-io/sui-kit';
|
|
4
6
|
import { getObligations, getObligationLocked } from '../queries';
|
|
5
7
|
import { requireSender } from '../utils';
|
|
6
8
|
import type { SuiObjectArg } from '@scallop-io/sui-kit';
|
|
@@ -108,7 +110,11 @@ const generateBorrowIncentiveNormalMethod: GenerateBorrowIncentiveNormalMethod =
|
|
|
108
110
|
obligationKey,
|
|
109
111
|
obligationId,
|
|
110
112
|
borrowIncentiveIds.obligationAccessStore,
|
|
111
|
-
|
|
113
|
+
txBlock.sharedObjectRef({
|
|
114
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
115
|
+
mutable: false,
|
|
116
|
+
initialSharedVersion: '1',
|
|
117
|
+
}),
|
|
112
118
|
]
|
|
113
119
|
);
|
|
114
120
|
},
|
|
@@ -127,7 +133,11 @@ const generateBorrowIncentiveNormalMethod: GenerateBorrowIncentiveNormalMethod =
|
|
|
127
133
|
veScaIds.treasury,
|
|
128
134
|
veScaIds.table,
|
|
129
135
|
veScaKey,
|
|
130
|
-
|
|
136
|
+
txBlock.sharedObjectRef({
|
|
137
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
138
|
+
mutable: false,
|
|
139
|
+
initialSharedVersion: '1',
|
|
140
|
+
}),
|
|
131
141
|
],
|
|
132
142
|
[]
|
|
133
143
|
);
|
|
@@ -142,7 +152,11 @@ const generateBorrowIncentiveNormalMethod: GenerateBorrowIncentiveNormalMethod =
|
|
|
142
152
|
borrowIncentiveIds.incentiveAccounts,
|
|
143
153
|
obligationKey,
|
|
144
154
|
obligationId,
|
|
145
|
-
|
|
155
|
+
txBlock.sharedObjectRef({
|
|
156
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
157
|
+
mutable: false,
|
|
158
|
+
initialSharedVersion: '1',
|
|
159
|
+
}),
|
|
146
160
|
]
|
|
147
161
|
);
|
|
148
162
|
},
|
|
@@ -157,7 +171,11 @@ const generateBorrowIncentiveNormalMethod: GenerateBorrowIncentiveNormalMethod =
|
|
|
157
171
|
borrowIncentiveIds.incentiveAccounts,
|
|
158
172
|
obligationKey,
|
|
159
173
|
obligationId,
|
|
160
|
-
|
|
174
|
+
txBlock.sharedObjectRef({
|
|
175
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
176
|
+
mutable: false,
|
|
177
|
+
initialSharedVersion: '1',
|
|
178
|
+
}),
|
|
161
179
|
],
|
|
162
180
|
[rewardType]
|
|
163
181
|
);
|
|
@@ -172,7 +190,11 @@ const generateBorrowIncentiveNormalMethod: GenerateBorrowIncentiveNormalMethod =
|
|
|
172
190
|
borrowIncentiveIds.incentiveAccounts,
|
|
173
191
|
obligation,
|
|
174
192
|
veScaKey,
|
|
175
|
-
|
|
193
|
+
txBlock.sharedObjectRef({
|
|
194
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
195
|
+
mutable: false,
|
|
196
|
+
initialSharedVersion: '1',
|
|
197
|
+
}),
|
|
176
198
|
]
|
|
177
199
|
);
|
|
178
200
|
},
|
|
@@ -126,7 +126,11 @@ const generateCoreNormalMethod: GenerateCoreNormalMethod = ({
|
|
|
126
126
|
coreIds.coinDecimalsRegistry,
|
|
127
127
|
txBlock.pure.u64(amount),
|
|
128
128
|
coreIds.xOracle,
|
|
129
|
-
|
|
129
|
+
txBlock.sharedObjectRef({
|
|
130
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
131
|
+
mutable: false,
|
|
132
|
+
initialSharedVersion: '1',
|
|
133
|
+
}),
|
|
130
134
|
],
|
|
131
135
|
[coinType]
|
|
132
136
|
);
|
|
@@ -137,7 +141,16 @@ const generateCoreNormalMethod: GenerateCoreNormalMethod = ({
|
|
|
137
141
|
return builder.moveCall(
|
|
138
142
|
txBlock,
|
|
139
143
|
`${coreIds.protocolPkg}::mint::mint`,
|
|
140
|
-
[
|
|
144
|
+
[
|
|
145
|
+
coreIds.version,
|
|
146
|
+
coreIds.market,
|
|
147
|
+
coin,
|
|
148
|
+
txBlock.sharedObjectRef({
|
|
149
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
150
|
+
mutable: false,
|
|
151
|
+
initialSharedVersion: '1',
|
|
152
|
+
}),
|
|
153
|
+
],
|
|
141
154
|
[coinType]
|
|
142
155
|
);
|
|
143
156
|
},
|
|
@@ -147,7 +160,16 @@ const generateCoreNormalMethod: GenerateCoreNormalMethod = ({
|
|
|
147
160
|
return builder.moveCall(
|
|
148
161
|
txBlock,
|
|
149
162
|
`${coreIds.protocolPkg}::mint::mint_entry`,
|
|
150
|
-
[
|
|
163
|
+
[
|
|
164
|
+
coreIds.version,
|
|
165
|
+
coreIds.market,
|
|
166
|
+
coin,
|
|
167
|
+
txBlock.sharedObjectRef({
|
|
168
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
169
|
+
mutable: false,
|
|
170
|
+
initialSharedVersion: '1',
|
|
171
|
+
}),
|
|
172
|
+
],
|
|
151
173
|
[coinType]
|
|
152
174
|
);
|
|
153
175
|
},
|
|
@@ -157,7 +179,16 @@ const generateCoreNormalMethod: GenerateCoreNormalMethod = ({
|
|
|
157
179
|
return builder.moveCall(
|
|
158
180
|
txBlock,
|
|
159
181
|
`${coreIds.protocolPkg}::redeem::redeem`,
|
|
160
|
-
[
|
|
182
|
+
[
|
|
183
|
+
coreIds.version,
|
|
184
|
+
coreIds.market,
|
|
185
|
+
marketCoin,
|
|
186
|
+
txBlock.sharedObjectRef({
|
|
187
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
188
|
+
mutable: false,
|
|
189
|
+
initialSharedVersion: '1',
|
|
190
|
+
}),
|
|
191
|
+
],
|
|
161
192
|
[coinType]
|
|
162
193
|
);
|
|
163
194
|
},
|
|
@@ -167,7 +198,16 @@ const generateCoreNormalMethod: GenerateCoreNormalMethod = ({
|
|
|
167
198
|
return builder.moveCall(
|
|
168
199
|
txBlock,
|
|
169
200
|
`${coreIds.protocolPkg}::redeem::redeem_entry`,
|
|
170
|
-
[
|
|
201
|
+
[
|
|
202
|
+
coreIds.version,
|
|
203
|
+
coreIds.market,
|
|
204
|
+
marketCoin,
|
|
205
|
+
txBlock.sharedObjectRef({
|
|
206
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
207
|
+
mutable: false,
|
|
208
|
+
initialSharedVersion: '1',
|
|
209
|
+
}),
|
|
210
|
+
],
|
|
171
211
|
[coinType]
|
|
172
212
|
);
|
|
173
213
|
},
|
|
@@ -185,7 +225,11 @@ const generateCoreNormalMethod: GenerateCoreNormalMethod = ({
|
|
|
185
225
|
coreIds.coinDecimalsRegistry,
|
|
186
226
|
amount,
|
|
187
227
|
coreIds.xOracle,
|
|
188
|
-
|
|
228
|
+
txBlock.sharedObjectRef({
|
|
229
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
230
|
+
mutable: false,
|
|
231
|
+
initialSharedVersion: '1',
|
|
232
|
+
}),
|
|
189
233
|
],
|
|
190
234
|
[coinType]
|
|
191
235
|
);
|
|
@@ -211,7 +255,11 @@ const generateCoreNormalMethod: GenerateCoreNormalMethod = ({
|
|
|
211
255
|
borrowReferral,
|
|
212
256
|
typeof amount === 'number' ? txBlock.pure.u64(amount) : amount,
|
|
213
257
|
coreIds.xOracle,
|
|
214
|
-
|
|
258
|
+
txBlock.sharedObjectRef({
|
|
259
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
260
|
+
mutable: false,
|
|
261
|
+
initialSharedVersion: '1',
|
|
262
|
+
}),
|
|
215
263
|
],
|
|
216
264
|
[coinType, referralWitnessType]
|
|
217
265
|
);
|
|
@@ -230,7 +278,11 @@ const generateCoreNormalMethod: GenerateCoreNormalMethod = ({
|
|
|
230
278
|
coreIds.coinDecimalsRegistry,
|
|
231
279
|
txBlock.pure.u64(amount),
|
|
232
280
|
coreIds.xOracle,
|
|
233
|
-
|
|
281
|
+
txBlock.sharedObjectRef({
|
|
282
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
283
|
+
mutable: false,
|
|
284
|
+
initialSharedVersion: '1',
|
|
285
|
+
}),
|
|
234
286
|
],
|
|
235
287
|
[coinType]
|
|
236
288
|
);
|
|
@@ -245,7 +297,11 @@ const generateCoreNormalMethod: GenerateCoreNormalMethod = ({
|
|
|
245
297
|
obligation,
|
|
246
298
|
coreIds.market,
|
|
247
299
|
coin,
|
|
248
|
-
|
|
300
|
+
txBlock.sharedObjectRef({
|
|
301
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
302
|
+
mutable: false,
|
|
303
|
+
initialSharedVersion: '1',
|
|
304
|
+
}),
|
|
249
305
|
],
|
|
250
306
|
[coinType]
|
|
251
307
|
);
|
|
@@ -449,7 +505,7 @@ const generateCoreQuickMethod: GenerateCoreQuickMethod = ({
|
|
|
449
505
|
)) ?? [];
|
|
450
506
|
const updateCoinNames = [...obligationCoinNames, poolCoinName];
|
|
451
507
|
await updateOracles(builder, txBlock, updateCoinNames);
|
|
452
|
-
return
|
|
508
|
+
return txBlock.borrowWithReferral(
|
|
453
509
|
obligationInfo.obligationId,
|
|
454
510
|
obligationInfo.obligationKey as SuiObjectArg,
|
|
455
511
|
borrowReferral,
|
package/src/builders/oracle.ts
CHANGED
|
@@ -231,7 +231,19 @@ const confirmPriceUpdateRequest = (
|
|
|
231
231
|
) => {
|
|
232
232
|
const target = `${packageId}::x_oracle::confirm_price_update_request`;
|
|
233
233
|
const typeArgs = [coinType];
|
|
234
|
-
txBlock.moveCall(
|
|
234
|
+
txBlock.moveCall(
|
|
235
|
+
target,
|
|
236
|
+
[
|
|
237
|
+
xOracleId,
|
|
238
|
+
request,
|
|
239
|
+
txBlock.sharedObjectRef({
|
|
240
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
241
|
+
mutable: false,
|
|
242
|
+
initialSharedVersion: '1',
|
|
243
|
+
}),
|
|
244
|
+
],
|
|
245
|
+
typeArgs
|
|
246
|
+
);
|
|
235
247
|
return txBlock;
|
|
236
248
|
};
|
|
237
249
|
|
|
@@ -257,7 +269,16 @@ const updateSupraPrice = (
|
|
|
257
269
|
) => {
|
|
258
270
|
txBlock.moveCall(
|
|
259
271
|
`${packageId}::rule::set_price`,
|
|
260
|
-
[
|
|
272
|
+
[
|
|
273
|
+
request,
|
|
274
|
+
holderId,
|
|
275
|
+
registryId,
|
|
276
|
+
txBlock.sharedObjectRef({
|
|
277
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
278
|
+
mutable: false,
|
|
279
|
+
initialSharedVersion: '1',
|
|
280
|
+
}),
|
|
281
|
+
],
|
|
261
282
|
[coinType]
|
|
262
283
|
);
|
|
263
284
|
};
|
|
@@ -284,7 +305,16 @@ const updateSwitchboardPrice = (
|
|
|
284
305
|
) => {
|
|
285
306
|
txBlock.moveCall(
|
|
286
307
|
`${packageId}::rule::set_price`,
|
|
287
|
-
[
|
|
308
|
+
[
|
|
309
|
+
request,
|
|
310
|
+
aggregatorId,
|
|
311
|
+
registryId,
|
|
312
|
+
txBlock.sharedObjectRef({
|
|
313
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
314
|
+
mutable: false,
|
|
315
|
+
initialSharedVersion: '1',
|
|
316
|
+
}),
|
|
317
|
+
],
|
|
288
318
|
[coinType]
|
|
289
319
|
);
|
|
290
320
|
};
|
|
@@ -315,7 +345,17 @@ const updatePythPrice = (
|
|
|
315
345
|
) => {
|
|
316
346
|
txBlock.moveCall(
|
|
317
347
|
`${packageId}::rule::set_price`,
|
|
318
|
-
[
|
|
348
|
+
[
|
|
349
|
+
request,
|
|
350
|
+
stateId,
|
|
351
|
+
feedObjectId,
|
|
352
|
+
registryId,
|
|
353
|
+
txBlock.sharedObjectRef({
|
|
354
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
355
|
+
mutable: false,
|
|
356
|
+
initialSharedVersion: '1',
|
|
357
|
+
}),
|
|
358
|
+
],
|
|
319
359
|
[coinType]
|
|
320
360
|
);
|
|
321
361
|
};
|
|
@@ -42,7 +42,11 @@ const generateReferralNormalMethod: GenerateReferralNormalMethod = ({
|
|
|
42
42
|
referralIds.referralBindings,
|
|
43
43
|
txBlock.pure.id(veScaKeyId),
|
|
44
44
|
veScaTable,
|
|
45
|
-
|
|
45
|
+
txBlock.sharedObjectRef({
|
|
46
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
47
|
+
mutable: false,
|
|
48
|
+
initialSharedVersion: '1',
|
|
49
|
+
}),
|
|
46
50
|
],
|
|
47
51
|
[]
|
|
48
52
|
);
|
|
@@ -58,7 +62,11 @@ const generateReferralNormalMethod: GenerateReferralNormalMethod = ({
|
|
|
58
62
|
referralIds.referralBindings,
|
|
59
63
|
referralIds.authorizedWitnessList,
|
|
60
64
|
referralIds.referralTiers,
|
|
61
|
-
|
|
65
|
+
txBlock.sharedObjectRef({
|
|
66
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
67
|
+
mutable: false,
|
|
68
|
+
initialSharedVersion: '1',
|
|
69
|
+
}),
|
|
62
70
|
],
|
|
63
71
|
[coinType]
|
|
64
72
|
);
|
|
@@ -72,7 +80,11 @@ const generateReferralNormalMethod: GenerateReferralNormalMethod = ({
|
|
|
72
80
|
referralIds.version,
|
|
73
81
|
ticket,
|
|
74
82
|
referralIds.referralRevenuePool,
|
|
75
|
-
|
|
83
|
+
txBlock.sharedObjectRef({
|
|
84
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
85
|
+
mutable: false,
|
|
86
|
+
initialSharedVersion: '1',
|
|
87
|
+
}),
|
|
76
88
|
],
|
|
77
89
|
[coinType]
|
|
78
90
|
);
|
|
@@ -89,7 +101,11 @@ const generateReferralNormalMethod: GenerateReferralNormalMethod = ({
|
|
|
89
101
|
referralIds.version,
|
|
90
102
|
referralIds.referralRevenuePool,
|
|
91
103
|
veScaKey,
|
|
92
|
-
|
|
104
|
+
txBlock.sharedObjectRef({
|
|
105
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
106
|
+
mutable: false,
|
|
107
|
+
initialSharedVersion: '1',
|
|
108
|
+
}),
|
|
93
109
|
],
|
|
94
110
|
[coinType]
|
|
95
111
|
);
|
|
@@ -136,7 +136,14 @@ const generateSpoolNormalMethod: GenerateSpoolNormalMethod = ({
|
|
|
136
136
|
return builder.moveCall(
|
|
137
137
|
txBlock,
|
|
138
138
|
`${spoolIds.spoolPkg}::user::new_spool_account`,
|
|
139
|
-
[
|
|
139
|
+
[
|
|
140
|
+
stakePoolId,
|
|
141
|
+
txBlock.sharedObjectRef({
|
|
142
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
143
|
+
mutable: false,
|
|
144
|
+
initialSharedVersion: '1',
|
|
145
|
+
}),
|
|
146
|
+
],
|
|
140
147
|
[marketCoinType]
|
|
141
148
|
);
|
|
142
149
|
},
|
|
@@ -149,7 +156,16 @@ const generateSpoolNormalMethod: GenerateSpoolNormalMethod = ({
|
|
|
149
156
|
builder.moveCall(
|
|
150
157
|
txBlock,
|
|
151
158
|
`${spoolIds.spoolPkg}::user::stake`,
|
|
152
|
-
[
|
|
159
|
+
[
|
|
160
|
+
stakePoolId,
|
|
161
|
+
stakeAccount,
|
|
162
|
+
coin,
|
|
163
|
+
txBlock.sharedObjectRef({
|
|
164
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
165
|
+
mutable: false,
|
|
166
|
+
initialSharedVersion: '1',
|
|
167
|
+
}),
|
|
168
|
+
],
|
|
153
169
|
[marketCoinType]
|
|
154
170
|
);
|
|
155
171
|
},
|
|
@@ -162,7 +178,16 @@ const generateSpoolNormalMethod: GenerateSpoolNormalMethod = ({
|
|
|
162
178
|
return builder.moveCall(
|
|
163
179
|
txBlock,
|
|
164
180
|
`${spoolIds.spoolPkg}::user::unstake`,
|
|
165
|
-
[
|
|
181
|
+
[
|
|
182
|
+
stakePoolId,
|
|
183
|
+
stakeAccount,
|
|
184
|
+
amount,
|
|
185
|
+
txBlock.sharedObjectRef({
|
|
186
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
187
|
+
mutable: false,
|
|
188
|
+
initialSharedVersion: '1',
|
|
189
|
+
}),
|
|
190
|
+
],
|
|
166
191
|
[marketCoinType]
|
|
167
192
|
);
|
|
168
193
|
},
|
|
@@ -180,7 +205,16 @@ const generateSpoolNormalMethod: GenerateSpoolNormalMethod = ({
|
|
|
180
205
|
return builder.moveCall(
|
|
181
206
|
txBlock,
|
|
182
207
|
`${spoolIds.spoolPkg}::user::redeem_rewards`,
|
|
183
|
-
[
|
|
208
|
+
[
|
|
209
|
+
stakePoolId,
|
|
210
|
+
rewardPoolId,
|
|
211
|
+
stakeAccount,
|
|
212
|
+
txBlock.sharedObjectRef({
|
|
213
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
214
|
+
mutable: false,
|
|
215
|
+
initialSharedVersion: '1',
|
|
216
|
+
}),
|
|
217
|
+
],
|
|
184
218
|
[marketCoinType, rewardCoinType]
|
|
185
219
|
);
|
|
186
220
|
},
|
|
@@ -99,7 +99,11 @@ const generateNormalVeScaMethod: GenerateVeScaNormalMethod = ({
|
|
|
99
99
|
veScaIds.treasury,
|
|
100
100
|
scaCoin,
|
|
101
101
|
unlockAtInSecondTimestamp,
|
|
102
|
-
|
|
102
|
+
txBlock.sharedObjectRef({
|
|
103
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
104
|
+
mutable: false,
|
|
105
|
+
initialSharedVersion: '1',
|
|
106
|
+
}),
|
|
103
107
|
],
|
|
104
108
|
[]
|
|
105
109
|
);
|
|
@@ -114,7 +118,11 @@ const generateNormalVeScaMethod: GenerateVeScaNormalMethod = ({
|
|
|
114
118
|
veScaIds.table,
|
|
115
119
|
veScaIds.treasury,
|
|
116
120
|
newUnlockAtInSecondTimestamp,
|
|
117
|
-
|
|
121
|
+
txBlock.sharedObjectRef({
|
|
122
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
123
|
+
mutable: false,
|
|
124
|
+
initialSharedVersion: '1',
|
|
125
|
+
}),
|
|
118
126
|
],
|
|
119
127
|
[]
|
|
120
128
|
);
|
|
@@ -129,7 +137,11 @@ const generateNormalVeScaMethod: GenerateVeScaNormalMethod = ({
|
|
|
129
137
|
veScaIds.table,
|
|
130
138
|
veScaIds.treasury,
|
|
131
139
|
scaCoin,
|
|
132
|
-
|
|
140
|
+
txBlock.sharedObjectRef({
|
|
141
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
142
|
+
mutable: false,
|
|
143
|
+
initialSharedVersion: '1',
|
|
144
|
+
}),
|
|
133
145
|
],
|
|
134
146
|
[]
|
|
135
147
|
);
|
|
@@ -145,7 +157,11 @@ const generateNormalVeScaMethod: GenerateVeScaNormalMethod = ({
|
|
|
145
157
|
veScaIds.treasury,
|
|
146
158
|
scaCoin,
|
|
147
159
|
newUnlockAtInSecondTimestamp,
|
|
148
|
-
|
|
160
|
+
txBlock.sharedObjectRef({
|
|
161
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
162
|
+
mutable: false,
|
|
163
|
+
initialSharedVersion: '1',
|
|
164
|
+
}),
|
|
149
165
|
],
|
|
150
166
|
[]
|
|
151
167
|
);
|
|
@@ -159,7 +175,11 @@ const generateNormalVeScaMethod: GenerateVeScaNormalMethod = ({
|
|
|
159
175
|
veScaKey,
|
|
160
176
|
veScaIds.table,
|
|
161
177
|
veScaIds.treasury,
|
|
162
|
-
|
|
178
|
+
txBlock.sharedObjectRef({
|
|
179
|
+
objectId: SUI_CLOCK_OBJECT_ID,
|
|
180
|
+
mutable: false,
|
|
181
|
+
initialSharedVersion: '1',
|
|
182
|
+
}),
|
|
163
183
|
],
|
|
164
184
|
[]
|
|
165
185
|
);
|