@symmetry-hq/temp-v3-sdk 0.0.11 → 0.0.12

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.
@@ -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 { EditCreatorInput, EditManagersInput, EditFeesInput, EditScheduleInput, EditAutomationInput, EditLpInput, EditMetadataInput, EditDepositsInput, EditForceRebalanceInput, EditCustomRebalanceInput, EditAddTokenDelayInput, EditUpdateWeightsDelayInput, EditMakeDirectSwapDelayInput, AddTokenInput, UpdateWeightsInput, MakeDirectSwapInput, TaskType, Intent, EditDataInput } from './layouts/intents/intent';
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(params: EditCreatorInput): Promise<TxPayloadBatchSequence>;
56
- editManagersTx(params: EditManagersInput): Promise<TxPayloadBatchSequence>;
57
- editScheduleTx(params: EditScheduleInput): Promise<TxPayloadBatchSequence>;
58
- editFeesTx(params: EditFeesInput): Promise<TxPayloadBatchSequence>;
59
- editAutomationTx(params: EditAutomationInput): Promise<TxPayloadBatchSequence>;
60
- editLpTx(params: EditLpInput): Promise<TxPayloadBatchSequence>;
61
- editMetadataTx(params: EditMetadataInput): Promise<TxPayloadBatchSequence>;
62
- editDepositsTx(params: EditDepositsInput): Promise<TxPayloadBatchSequence>;
63
- editForceRebalanceTx(params: EditForceRebalanceInput): Promise<TxPayloadBatchSequence>;
64
- editCustomRebalanceTx(params: EditCustomRebalanceInput): Promise<TxPayloadBatchSequence>;
65
- editAddTokenDelayTx(params: EditAddTokenDelayInput): Promise<TxPayloadBatchSequence>;
66
- editUpdateWeightsDelayTx(params: EditUpdateWeightsDelayInput): Promise<TxPayloadBatchSequence>;
67
- editSwapDelayTx(params: EditMakeDirectSwapDelayInput): Promise<TxPayloadBatchSequence>;
68
- addTokenTx(params: AddTokenInput): Promise<TxPayloadBatchSequence>;
69
- updateWeightsTx(params: UpdateWeightsInput): Promise<TxPayloadBatchSequence>;
70
- makeDirectSwapTx(params: MakeDirectSwapInput): Promise<TxPayloadBatchSequence>;
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
- edit_type: TaskType;
73
- edit_data: EditDataInput;
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 { EditCreatorInput, EditManagersInput, EditFeesInput, EditScheduleInput, EditAutomationInput, EditLpInput, EditMetadataInput, EditDepositsInput, EditForceRebalanceInput, EditCustomRebalanceInput, EditAddTokenDelayInput, EditUpdateWeightsDelayInput, EditMakeDirectSwapDelayInput, AddTokenInput, UpdateWeightsInput, MakeDirectSwapInput, TaskType, };
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(params) {
231
+ editCreatorTx(context, settings) {
232
232
  return __awaiter(this, void 0, void 0, function* () {
233
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditCreator, edit_data: params });
233
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditCreator, context, settings });
234
234
  });
235
235
  }
236
- editManagersTx(params) {
236
+ editManagersTx(context, settings) {
237
237
  return __awaiter(this, void 0, void 0, function* () {
238
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditManagerSettings, edit_data: params });
238
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditManagerSettings, context, settings });
239
239
  });
240
240
  }
241
- editScheduleTx(params) {
241
+ editScheduleTx(context, settings) {
242
242
  return __awaiter(this, void 0, void 0, function* () {
243
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditScheduleSettings, edit_data: params });
243
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditScheduleSettings, context, settings });
244
244
  });
245
245
  }
246
- editFeesTx(params) {
246
+ editFeesTx(context, settings) {
247
247
  return __awaiter(this, void 0, void 0, function* () {
248
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditFeeSettings, edit_data: params });
248
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditFeeSettings, context, settings });
249
249
  });
250
250
  }
251
- editAutomationTx(params) {
251
+ editAutomationTx(context, settings) {
252
252
  return __awaiter(this, void 0, void 0, function* () {
253
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditAutomationSettings, edit_data: params });
253
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditAutomationSettings, context, settings });
254
254
  });
255
255
  }
256
- editLpTx(params) {
256
+ editLpTx(context, settings) {
257
257
  return __awaiter(this, void 0, void 0, function* () {
258
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditLpSettings, edit_data: params });
258
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditLpSettings, context, settings });
259
259
  });
260
260
  }
261
- editMetadataTx(params) {
261
+ editMetadataTx(context, settings) {
262
262
  return __awaiter(this, void 0, void 0, function* () {
263
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditMetadataSettings, edit_data: params });
263
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditMetadataSettings, context, settings });
264
264
  });
265
265
  }
266
- editDepositsTx(params) {
266
+ editDepositsTx(context, settings) {
267
267
  return __awaiter(this, void 0, void 0, function* () {
268
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditDepositsSettings, edit_data: params });
268
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditDepositsSettings, context, settings });
269
269
  });
270
270
  }
271
- editForceRebalanceTx(params) {
271
+ editForceRebalanceTx(context, settings) {
272
272
  return __awaiter(this, void 0, void 0, function* () {
273
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditForceRebalanceSettings, edit_data: params });
273
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditForceRebalanceSettings, context, settings });
274
274
  });
275
275
  }
276
- editCustomRebalanceTx(params) {
276
+ editCustomRebalanceTx(context, settings) {
277
277
  return __awaiter(this, void 0, void 0, function* () {
278
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditCustomRebalanceSettings, edit_data: params });
278
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditCustomRebalanceSettings, context, settings });
279
279
  });
280
280
  }
281
- editAddTokenDelayTx(params) {
281
+ editAddTokenDelayTx(context, settings) {
282
282
  return __awaiter(this, void 0, void 0, function* () {
283
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditAddTokenDelay, edit_data: params });
283
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditAddTokenDelay, context, settings });
284
284
  });
285
285
  }
286
- editUpdateWeightsDelayTx(params) {
286
+ editUpdateWeightsDelayTx(context, settings) {
287
287
  return __awaiter(this, void 0, void 0, function* () {
288
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditUpdateWeightsDelay, edit_data: params });
288
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditUpdateWeightsDelay, context, settings });
289
289
  });
290
290
  }
291
- editSwapDelayTx(params) {
291
+ editSwapDelayTx(context, settings) {
292
292
  return __awaiter(this, void 0, void 0, function* () {
293
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.EditMakeDirectSwapDelay, edit_data: params });
293
+ return this.openBasketIntentTx({ type: intent_1.TaskType.EditMakeDirectSwapDelay, context, settings });
294
294
  });
295
295
  }
296
- addTokenTx(params) {
296
+ addTokenTx(context, settings) {
297
297
  return __awaiter(this, void 0, void 0, function* () {
298
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.AddToken, edit_data: params });
298
+ return this.openBasketIntentTx({ type: intent_1.TaskType.AddToken, context, settings });
299
299
  });
300
300
  }
301
- updateWeightsTx(params) {
301
+ updateWeightsTx(context, settings) {
302
302
  return __awaiter(this, void 0, void 0, function* () {
303
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.UpdateWeights, edit_data: params });
303
+ return this.openBasketIntentTx({ type: intent_1.TaskType.UpdateWeights, context, settings });
304
304
  });
305
305
  }
306
- makeDirectSwapTx(params) {
306
+ makeDirectSwapTx(context, settings) {
307
307
  return __awaiter(this, void 0, void 0, function* () {
308
- return this.openBasketIntentTx({ edit_type: intent_1.TaskType.MakeDirectSwap, edit_data: params });
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.edit_data.basket);
315
- let manager = new web3_js_1.PublicKey(params.edit_data.manager);
316
- let useBounty = params.edit_data.use_bounty == false ? false : true;
317
- let activationTimestamp = new anchor_1.BN((_a = params.edit_data.activation_timestamp) !== null && _a !== void 0 ? _a : 0);
318
- let editType = params.edit_type;
319
- let editData = params.edit_data;
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.add_token.token_mint);
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 { EditDataInput, TaskType } from '../../layouts/intents/intent';
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: EditDataInput;
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.creator_settings;
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.manager_settings;
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.fee_settings;
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.schedule_settings;
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.automation_settings;
186
+ let automationSettings = editData;
187
187
  let editAutomationSettings = {
188
- allowAutomation: automationSettings.allow_automation ? 1 : 0,
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.lp_settings;
200
+ let lpSettings = editData;
201
201
  let editLpSettings = {
202
- allowLp: lpSettings.allow_lp ? 1 : 0,
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.metadata_settings;
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.deposits_settings;
224
- let editDepositsSettings = depositsSettings.deposits_are_allowed ? 1 : 0;
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.force_rebalance_settings;
229
- let editForceRebalanceSettings = forceRebalanceSettings.force_rebalance_is_allowed ? 1 : 0;
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.custom_rebalance_settings;
236
- let editCustomRebalanceSettings = customRebalanceSettings.custom_rebalance_is_allowed ? 1 : 0;
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.add_token_delay;
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.update_weights_delay;
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.make_direct_swap_delay;
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.add_token;
263
+ let addTokenData = editData;
264
264
  let oracleDatas = [];
265
265
  while (oracleDatas.length < constants_1.MAX_ORACLES_PER_TOKEN) {
266
266
  oracleDatas.push({