@symmetry-hq/temp-v3-sdk 0.0.11 → 0.0.13
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/src/index.d.ts +21 -20
- package/dist/src/index.js +39 -39
- package/dist/src/instructions/management/edit.d.ts +2 -2
- package/dist/src/instructions/management/edit.js +19 -19
- package/dist/src/layouts/intents/intent.d.ts +116 -194
- package/dist/src/states/basket.js +116 -99
- package/dist/test.js +180 -256
- package/package.json +1 -1
- package/src/index.ts +76 -69
- package/src/instructions/management/edit.ts +21 -21
- package/src/layouts/intents/intent.ts +117 -197
- package/src/states/basket.ts +116 -98
- package/test.ts +195 -266
package/dist/src/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { BN } from '@coral-xyz/anchor';
|
|
|
2
2
|
import { Connection, PublicKey, TransactionSignature } from '@solana/web3.js';
|
|
3
3
|
import { Basket } from './layouts/basket';
|
|
4
4
|
import { GlobalConfig } from './layouts/config';
|
|
5
|
-
import {
|
|
5
|
+
import { FormattedCreatorSettings, FormattedManagersSettings, FormattedFeeSettings, FormattedScheduleSettings, FormattedAutomationSettings, FormattedLpSettings, FormattedMetadataSettings, FormattedDepositsSettings, FormattedForceRebalanceSettings, FormattedCustomRebalanceSettings, FormattedAddTokenSettings, FormattedUpdateWeightsSettings, FormattedMakeDirectSwapSettings, TaskContext, Settings, AddTokenInput, UpdateWeightsInput, MakeDirectSwapInput, TaskType, Intent } from './layouts/intents/intent';
|
|
6
6
|
import { RebalanceIntent } from './layouts/intents/rebalanceIntent';
|
|
7
7
|
import { BasketFilter } from './states/basket';
|
|
8
8
|
import { IntentFilter } from './states/intents/intent';
|
|
@@ -52,25 +52,26 @@ export declare class SymmetryCore {
|
|
|
52
52
|
host_performance_fee_bps: number;
|
|
53
53
|
priority_fee_lamports: number;
|
|
54
54
|
}): Promise<TxPayloadBatchSequence>;
|
|
55
|
-
editCreatorTx(
|
|
56
|
-
editManagersTx(
|
|
57
|
-
editScheduleTx(
|
|
58
|
-
editFeesTx(
|
|
59
|
-
editAutomationTx(
|
|
60
|
-
editLpTx(
|
|
61
|
-
editMetadataTx(
|
|
62
|
-
editDepositsTx(
|
|
63
|
-
editForceRebalanceTx(
|
|
64
|
-
editCustomRebalanceTx(
|
|
65
|
-
editAddTokenDelayTx(
|
|
66
|
-
editUpdateWeightsDelayTx(
|
|
67
|
-
editSwapDelayTx(
|
|
68
|
-
addTokenTx(
|
|
69
|
-
updateWeightsTx(
|
|
70
|
-
makeDirectSwapTx(
|
|
55
|
+
editCreatorTx(context: TaskContext, settings: FormattedCreatorSettings): Promise<TxPayloadBatchSequence>;
|
|
56
|
+
editManagersTx(context: TaskContext, settings: FormattedManagersSettings): Promise<TxPayloadBatchSequence>;
|
|
57
|
+
editScheduleTx(context: TaskContext, settings: FormattedScheduleSettings): Promise<TxPayloadBatchSequence>;
|
|
58
|
+
editFeesTx(context: TaskContext, settings: FormattedFeeSettings): Promise<TxPayloadBatchSequence>;
|
|
59
|
+
editAutomationTx(context: TaskContext, settings: FormattedAutomationSettings): Promise<TxPayloadBatchSequence>;
|
|
60
|
+
editLpTx(context: TaskContext, settings: FormattedLpSettings): Promise<TxPayloadBatchSequence>;
|
|
61
|
+
editMetadataTx(context: TaskContext, settings: FormattedMetadataSettings): Promise<TxPayloadBatchSequence>;
|
|
62
|
+
editDepositsTx(context: TaskContext, settings: FormattedDepositsSettings): Promise<TxPayloadBatchSequence>;
|
|
63
|
+
editForceRebalanceTx(context: TaskContext, settings: FormattedForceRebalanceSettings): Promise<TxPayloadBatchSequence>;
|
|
64
|
+
editCustomRebalanceTx(context: TaskContext, settings: FormattedCustomRebalanceSettings): Promise<TxPayloadBatchSequence>;
|
|
65
|
+
editAddTokenDelayTx(context: TaskContext, settings: FormattedAddTokenSettings): Promise<TxPayloadBatchSequence>;
|
|
66
|
+
editUpdateWeightsDelayTx(context: TaskContext, settings: FormattedUpdateWeightsSettings): Promise<TxPayloadBatchSequence>;
|
|
67
|
+
editSwapDelayTx(context: TaskContext, settings: FormattedMakeDirectSwapSettings): Promise<TxPayloadBatchSequence>;
|
|
68
|
+
addTokenTx(context: TaskContext, settings: AddTokenInput): Promise<TxPayloadBatchSequence>;
|
|
69
|
+
updateWeightsTx(context: TaskContext, settings: UpdateWeightsInput): Promise<TxPayloadBatchSequence>;
|
|
70
|
+
makeDirectSwapTx(context: TaskContext, settings: MakeDirectSwapInput): Promise<TxPayloadBatchSequence>;
|
|
71
71
|
openBasketIntentTx(params: {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
context: TaskContext;
|
|
73
|
+
type: TaskType;
|
|
74
|
+
settings: Settings;
|
|
74
75
|
}): Promise<TxPayloadBatchSequence>;
|
|
75
76
|
executeBasketIntentTx(params: {
|
|
76
77
|
intent: Intent;
|
|
@@ -127,4 +128,4 @@ export declare class SymmetryCore {
|
|
|
127
128
|
}): Promise<TransactionSignature[][]>;
|
|
128
129
|
}
|
|
129
130
|
export { Basket, BasketFilter, Intent, IntentFilter, RebalanceIntent, RebalanceIntentFilter };
|
|
130
|
-
export {
|
|
131
|
+
export { FormattedCreatorSettings, FormattedManagersSettings, FormattedFeeSettings, FormattedScheduleSettings, FormattedAutomationSettings, FormattedLpSettings, FormattedMetadataSettings, FormattedDepositsSettings, FormattedForceRebalanceSettings, FormattedCustomRebalanceSettings, FormattedAddTokenSettings, FormattedUpdateWeightsSettings, FormattedMakeDirectSwapSettings, AddTokenInput, UpdateWeightsInput, MakeDirectSwapInput, Settings, TaskContext, TaskType, };
|
package/dist/src/index.js
CHANGED
|
@@ -228,95 +228,95 @@ class SymmetryCore {
|
|
|
228
228
|
return txPayloadBatchSequence;
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
|
-
editCreatorTx(
|
|
231
|
+
editCreatorTx(context, settings) {
|
|
232
232
|
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
-
return this.openBasketIntentTx({
|
|
233
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditCreator, context, settings });
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
|
-
editManagersTx(
|
|
236
|
+
editManagersTx(context, settings) {
|
|
237
237
|
return __awaiter(this, void 0, void 0, function* () {
|
|
238
|
-
return this.openBasketIntentTx({
|
|
238
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditManagerSettings, context, settings });
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
editScheduleTx(
|
|
241
|
+
editScheduleTx(context, settings) {
|
|
242
242
|
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
-
return this.openBasketIntentTx({
|
|
243
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditScheduleSettings, context, settings });
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
editFeesTx(
|
|
246
|
+
editFeesTx(context, settings) {
|
|
247
247
|
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
-
return this.openBasketIntentTx({
|
|
248
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditFeeSettings, context, settings });
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
editAutomationTx(
|
|
251
|
+
editAutomationTx(context, settings) {
|
|
252
252
|
return __awaiter(this, void 0, void 0, function* () {
|
|
253
|
-
return this.openBasketIntentTx({
|
|
253
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditAutomationSettings, context, settings });
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
|
-
editLpTx(
|
|
256
|
+
editLpTx(context, settings) {
|
|
257
257
|
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
-
return this.openBasketIntentTx({
|
|
258
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditLpSettings, context, settings });
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
editMetadataTx(
|
|
261
|
+
editMetadataTx(context, settings) {
|
|
262
262
|
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
-
return this.openBasketIntentTx({
|
|
263
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditMetadataSettings, context, settings });
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
|
-
editDepositsTx(
|
|
266
|
+
editDepositsTx(context, settings) {
|
|
267
267
|
return __awaiter(this, void 0, void 0, function* () {
|
|
268
|
-
return this.openBasketIntentTx({
|
|
268
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditDepositsSettings, context, settings });
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
|
-
editForceRebalanceTx(
|
|
271
|
+
editForceRebalanceTx(context, settings) {
|
|
272
272
|
return __awaiter(this, void 0, void 0, function* () {
|
|
273
|
-
return this.openBasketIntentTx({
|
|
273
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditForceRebalanceSettings, context, settings });
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
|
-
editCustomRebalanceTx(
|
|
276
|
+
editCustomRebalanceTx(context, settings) {
|
|
277
277
|
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
-
return this.openBasketIntentTx({
|
|
278
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditCustomRebalanceSettings, context, settings });
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
editAddTokenDelayTx(
|
|
281
|
+
editAddTokenDelayTx(context, settings) {
|
|
282
282
|
return __awaiter(this, void 0, void 0, function* () {
|
|
283
|
-
return this.openBasketIntentTx({
|
|
283
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditAddTokenDelay, context, settings });
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
editUpdateWeightsDelayTx(
|
|
286
|
+
editUpdateWeightsDelayTx(context, settings) {
|
|
287
287
|
return __awaiter(this, void 0, void 0, function* () {
|
|
288
|
-
return this.openBasketIntentTx({
|
|
288
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditUpdateWeightsDelay, context, settings });
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
|
-
editSwapDelayTx(
|
|
291
|
+
editSwapDelayTx(context, settings) {
|
|
292
292
|
return __awaiter(this, void 0, void 0, function* () {
|
|
293
|
-
return this.openBasketIntentTx({
|
|
293
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.EditMakeDirectSwapDelay, context, settings });
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
|
-
addTokenTx(
|
|
296
|
+
addTokenTx(context, settings) {
|
|
297
297
|
return __awaiter(this, void 0, void 0, function* () {
|
|
298
|
-
return this.openBasketIntentTx({
|
|
298
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.AddToken, context, settings });
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
-
updateWeightsTx(
|
|
301
|
+
updateWeightsTx(context, settings) {
|
|
302
302
|
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
-
return this.openBasketIntentTx({
|
|
303
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.UpdateWeights, context, settings });
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
|
-
makeDirectSwapTx(
|
|
306
|
+
makeDirectSwapTx(context, settings) {
|
|
307
307
|
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
-
return this.openBasketIntentTx({
|
|
308
|
+
return this.openBasketIntentTx({ type: intent_1.TaskType.MakeDirectSwap, context, settings });
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
openBasketIntentTx(params) {
|
|
312
312
|
return __awaiter(this, void 0, void 0, function* () {
|
|
313
313
|
var _a;
|
|
314
|
-
let basket = yield this.fetchBasket(params.
|
|
315
|
-
let manager = new web3_js_1.PublicKey(params.
|
|
316
|
-
let useBounty = params.
|
|
317
|
-
let activationTimestamp = new anchor_1.BN((_a = params.
|
|
318
|
-
let editType = params.
|
|
319
|
-
let editData = params.
|
|
314
|
+
let basket = yield this.fetchBasket(params.context.basket);
|
|
315
|
+
let manager = new web3_js_1.PublicKey(params.context.manager);
|
|
316
|
+
let useBounty = params.context.use_bounty == false ? false : true;
|
|
317
|
+
let activationTimestamp = new anchor_1.BN((_a = params.context.activation_timestamp) !== null && _a !== void 0 ? _a : 0);
|
|
318
|
+
let editType = params.type;
|
|
319
|
+
let editData = params.settings;
|
|
320
320
|
let modificationDelay = (() => {
|
|
321
321
|
switch (editType) {
|
|
322
322
|
case intent_1.TaskType.EditCreator: return new anchor_1.BN(0);
|
|
@@ -340,7 +340,7 @@ class SymmetryCore {
|
|
|
340
340
|
})();
|
|
341
341
|
let intentSeedArray = web3_js_1.Keypair.generate().publicKey.toBytes();
|
|
342
342
|
if (editType === intent_1.TaskType.AddToken) {
|
|
343
|
-
let tokenMint = new web3_js_1.PublicKey(editData.
|
|
343
|
+
let tokenMint = new web3_js_1.PublicKey(editData.token_mint);
|
|
344
344
|
intentSeedArray = tokenMint.toBytes();
|
|
345
345
|
}
|
|
346
346
|
let intent = (0, pda_1.getIntentPda)(basket.ownAddress, intentSeedArray, editType);
|
|
@@ -2,7 +2,7 @@ import { BN } from '@coral-xyz/anchor';
|
|
|
2
2
|
import { PublicKey, TransactionInstruction } from '@solana/web3.js';
|
|
3
3
|
import { Basket } from '../../layouts/basket';
|
|
4
4
|
import { AuthorityBitmasks, AutomationSettings, FeeSettings, LpSettings, ManagerSettings, MetadataParams, ScheduleSettings } from '../../layouts/config';
|
|
5
|
-
import {
|
|
5
|
+
import { Settings, TaskType } from '../../layouts/intents/intent';
|
|
6
6
|
export declare function editPrivateBasketSettingsIx(params: {
|
|
7
7
|
creator: PublicKey;
|
|
8
8
|
basket: PublicKey;
|
|
@@ -27,7 +27,7 @@ export declare function createEditBasketIntentIx(params: {
|
|
|
27
27
|
useBounty: boolean;
|
|
28
28
|
activationTimestamp: BN;
|
|
29
29
|
editType: TaskType;
|
|
30
|
-
editData:
|
|
30
|
+
editData: Settings;
|
|
31
31
|
}): TransactionInstruction;
|
|
32
32
|
export declare function executeEditBasketIntentIx(params: {
|
|
33
33
|
keeper: PublicKey;
|
|
@@ -79,14 +79,14 @@ function createEditBasketIntentIx(params) {
|
|
|
79
79
|
let additionalAccounts = [];
|
|
80
80
|
switch (editType) {
|
|
81
81
|
case intent_1.TaskType.EditCreator: // 1
|
|
82
|
-
let creatorSettings = editData
|
|
82
|
+
let creatorSettings = editData;
|
|
83
83
|
let editCreator = {
|
|
84
84
|
creator: new web3_js_1.PublicKey(creatorSettings.creator),
|
|
85
85
|
};
|
|
86
86
|
config_1.EditCreatorLayout.encode(editCreator, editDataBuf);
|
|
87
87
|
break;
|
|
88
88
|
case intent_1.TaskType.EditManagerSettings: // 2
|
|
89
|
-
let managerSettings = editData
|
|
89
|
+
let managerSettings = editData;
|
|
90
90
|
let managersWeights = managerSettings.managers.map((manager) => manager.fee_split_weight_bps);
|
|
91
91
|
let managers = managerSettings.managers.map((manager) => new web3_js_1.PublicKey(manager.pubkey));
|
|
92
92
|
while (managers.length < config_1.MAX_MANAGERS_PER_BASKET) {
|
|
@@ -146,7 +146,7 @@ function createEditBasketIntentIx(params) {
|
|
|
146
146
|
startIndex += 8;
|
|
147
147
|
break;
|
|
148
148
|
case intent_1.TaskType.EditFeeSettings: // 3
|
|
149
|
-
let feeSettings = editData
|
|
149
|
+
let feeSettings = editData;
|
|
150
150
|
let editFeeSettings = {
|
|
151
151
|
hostDepositFeeBps: 0,
|
|
152
152
|
hostWithdrawFeeBps: 0,
|
|
@@ -168,7 +168,7 @@ function createEditBasketIntentIx(params) {
|
|
|
168
168
|
config_1.FeeSettingsLayout.encode(editFeeSettings, editDataBuf);
|
|
169
169
|
break;
|
|
170
170
|
case intent_1.TaskType.EditScheduleSettings: // 4
|
|
171
|
-
let scheduleSettings = editData
|
|
171
|
+
let scheduleSettings = editData;
|
|
172
172
|
let editScheduleSettings = {
|
|
173
173
|
cycleStartTime: new anchor_1.BN(scheduleSettings.cycle_start_time),
|
|
174
174
|
cycleDuration: new anchor_1.BN(scheduleSettings.cycle_duration),
|
|
@@ -183,9 +183,9 @@ function createEditBasketIntentIx(params) {
|
|
|
183
183
|
config_1.ScheduleSettingsLayout.encode(editScheduleSettings, editDataBuf);
|
|
184
184
|
break;
|
|
185
185
|
case intent_1.TaskType.EditAutomationSettings: // 5
|
|
186
|
-
let automationSettings = editData
|
|
186
|
+
let automationSettings = editData;
|
|
187
187
|
let editAutomationSettings = {
|
|
188
|
-
allowAutomation: automationSettings.
|
|
188
|
+
allowAutomation: automationSettings.allow ? 1 : 0,
|
|
189
189
|
rebalanceSlippageThresholdBps: automationSettings.rebalance_slippage_threshold_bps,
|
|
190
190
|
perTradeRebalanceSlippageThresholdBps: automationSettings.per_trade_rebalance_slippage_threshold_bps,
|
|
191
191
|
rebalanceActivationThresholdAbsBps: automationSettings.rebalance_activation_threshold_abs_bps,
|
|
@@ -197,9 +197,9 @@ function createEditBasketIntentIx(params) {
|
|
|
197
197
|
config_1.AutomationSettingsLayout.encode(editAutomationSettings, editDataBuf);
|
|
198
198
|
break;
|
|
199
199
|
case intent_1.TaskType.EditLpSettings: // 6
|
|
200
|
-
let lpSettings = editData
|
|
200
|
+
let lpSettings = editData;
|
|
201
201
|
let editLpSettings = {
|
|
202
|
-
allowLp: lpSettings.
|
|
202
|
+
allowLp: lpSettings.allow ? 1 : 0,
|
|
203
203
|
lpThresholdBps: lpSettings.lp_threshold_bps,
|
|
204
204
|
extraData: new Array(32).fill(0),
|
|
205
205
|
modificationDelay: new anchor_1.BN(lpSettings.modification_delay),
|
|
@@ -207,7 +207,7 @@ function createEditBasketIntentIx(params) {
|
|
|
207
207
|
config_1.LpSettingsLayout.encode(editLpSettings, editDataBuf);
|
|
208
208
|
break;
|
|
209
209
|
case intent_1.TaskType.EditMetadataSettings: // 7
|
|
210
|
-
let metadataSettings = editData
|
|
210
|
+
let metadataSettings = editData;
|
|
211
211
|
let editMetadataSettings = {
|
|
212
212
|
symbolLength: metadataSettings.symbol.length,
|
|
213
213
|
symbol: metadataSettings.symbol.split('').map((char) => char.charCodeAt(0)),
|
|
@@ -220,47 +220,47 @@ function createEditBasketIntentIx(params) {
|
|
|
220
220
|
config_1.MetadataSettingsLayout.encode(editMetadataSettings, editDataBuf);
|
|
221
221
|
break;
|
|
222
222
|
case intent_1.TaskType.EditDepositsSettings: // 8
|
|
223
|
-
let depositsSettings = editData
|
|
224
|
-
let editDepositsSettings = depositsSettings.
|
|
223
|
+
let depositsSettings = editData;
|
|
224
|
+
let editDepositsSettings = depositsSettings.allow ? 1 : 0;
|
|
225
225
|
editDataBuf[0] = editDepositsSettings;
|
|
226
226
|
break;
|
|
227
227
|
case intent_1.TaskType.EditForceRebalanceSettings: // 9
|
|
228
|
-
let forceRebalanceSettings = editData
|
|
229
|
-
let editForceRebalanceSettings = forceRebalanceSettings.
|
|
228
|
+
let forceRebalanceSettings = editData;
|
|
229
|
+
let editForceRebalanceSettings = forceRebalanceSettings.allow ? 1 : 0;
|
|
230
230
|
let editForceRebalanceModificationDelayBN = new anchor_1.BN(forceRebalanceSettings.modification_delay);
|
|
231
231
|
editDataBuf[0] = editForceRebalanceSettings;
|
|
232
232
|
editDataBuf.writeBigUint64LE(BigInt(editForceRebalanceModificationDelayBN.toString()), 1);
|
|
233
233
|
break;
|
|
234
234
|
case intent_1.TaskType.EditCustomRebalanceSettings: // 10
|
|
235
|
-
let customRebalanceSettings = editData
|
|
236
|
-
let editCustomRebalanceSettings = customRebalanceSettings.
|
|
235
|
+
let customRebalanceSettings = editData;
|
|
236
|
+
let editCustomRebalanceSettings = customRebalanceSettings.allow ? 1 : 0;
|
|
237
237
|
let editCustomRebalanceModificationDelayBN = new anchor_1.BN(customRebalanceSettings.modification_delay);
|
|
238
238
|
editDataBuf[0] = editCustomRebalanceSettings;
|
|
239
239
|
editDataBuf.writeBigUint64LE(BigInt(editCustomRebalanceModificationDelayBN.toString()), 1);
|
|
240
240
|
break;
|
|
241
241
|
case intent_1.TaskType.EditAddTokenDelay: // 11 - 101
|
|
242
|
-
let addTokenDelay = editData
|
|
242
|
+
let addTokenDelay = editData;
|
|
243
243
|
let editAddTokenDelay = {
|
|
244
244
|
modificationDelay: new anchor_1.BN(addTokenDelay.modification_delay),
|
|
245
245
|
};
|
|
246
246
|
config_1.EditAddTokenDelayLayout.encode(editAddTokenDelay, editDataBuf);
|
|
247
247
|
break;
|
|
248
248
|
case intent_1.TaskType.EditUpdateWeightsDelay: // 12 - 102
|
|
249
|
-
let updateWeightsDelay = editData
|
|
249
|
+
let updateWeightsDelay = editData;
|
|
250
250
|
let editUpdateWeightsDelay = {
|
|
251
251
|
modificationDelay: new anchor_1.BN(updateWeightsDelay.modification_delay),
|
|
252
252
|
};
|
|
253
253
|
config_1.EditUpdateWeightsDelayLayout.encode(editUpdateWeightsDelay, editDataBuf);
|
|
254
254
|
break;
|
|
255
255
|
case intent_1.TaskType.EditMakeDirectSwapDelay: // 13 - 103
|
|
256
|
-
let makeDirectSwapDelay = editData
|
|
256
|
+
let makeDirectSwapDelay = editData;
|
|
257
257
|
let editMakeDirectSwapDelay = {
|
|
258
258
|
modificationDelay: new anchor_1.BN(makeDirectSwapDelay.modification_delay),
|
|
259
259
|
};
|
|
260
260
|
config_1.EditMakeDirectSwapDelayLayout.encode(editMakeDirectSwapDelay, editDataBuf);
|
|
261
261
|
break;
|
|
262
262
|
case intent_1.TaskType.AddToken: // 14 - 201
|
|
263
|
-
let addTokenData = editData
|
|
263
|
+
let addTokenData = editData;
|
|
264
264
|
let oracleDatas = [];
|
|
265
265
|
while (oracleDatas.length < constants_1.MAX_ORACLES_PER_TOKEN) {
|
|
266
266
|
oracleDatas.push({
|