@indigo-labs/indigo-sdk 0.4.3 → 0.5.0

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.
Files changed (54) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/dist/index.d.mts +992 -905
  3. package/dist/index.d.ts +992 -905
  4. package/dist/index.js +2346 -2155
  5. package/dist/index.mjs +1925 -1750
  6. package/package.json +13 -21
  7. package/scripts/bench.sh +0 -0
  8. package/src/contracts/cdp/helpers.ts +7 -6
  9. package/src/contracts/cdp/transactions.ts +8 -29
  10. package/src/contracts/gov/transactions.ts +15 -17
  11. package/src/contracts/iasset/helpers.ts +2 -7
  12. package/src/contracts/initialize/actions.ts +0 -2
  13. package/src/contracts/initialize/helpers.ts +0 -4
  14. package/src/contracts/interest-collection/transactions.ts +2 -5
  15. package/src/contracts/interest-oracle/helpers.ts +4 -0
  16. package/src/contracts/interest-oracle/transactions.ts +1 -4
  17. package/src/contracts/price-oracle/helpers.ts +5 -11
  18. package/src/contracts/price-oracle/transactions.ts +2 -7
  19. package/src/contracts/rob/transactions.ts +0 -2
  20. package/src/contracts/rob-leverage/transactions.ts +1 -4
  21. package/{tests/queries/stability-pool-queries.ts → src/contracts/stability-pool/queries.ts} +22 -14
  22. package/src/contracts/stability-pool/transactions.ts +2 -8
  23. package/src/contracts/stableswap/helpers.ts +369 -1
  24. package/src/contracts/stableswap/transactions.ts +43 -191
  25. package/src/contracts/staking/transactions.ts +2 -7
  26. package/src/index.ts +4 -3
  27. package/tests/cdp/actions.ts +0 -11
  28. package/tests/cdp/cdp-helpers.ts +2 -2
  29. package/tests/cdp/cdp-queries.ts +8 -5
  30. package/tests/cdp/cdp.test.ts +409 -620
  31. package/tests/cdp/transactions-mutated.ts +30 -25
  32. package/tests/endpoints/initialize.ts +0 -2
  33. package/tests/gov/actions.ts +7 -32
  34. package/tests/gov/gov.test.ts +169 -401
  35. package/tests/indigo-test-helpers.ts +0 -1
  36. package/tests/initialize.test.ts +15 -20
  37. package/tests/interest-collection/interest-collection.test.ts +0 -4
  38. package/tests/interest-oracle.test.ts +1 -8
  39. package/tests/price-oracle/actions.ts +6 -8
  40. package/tests/price-oracle/price-oracle.test.ts +1 -13
  41. package/tests/price-oracle/transactions-mutated.ts +1 -4
  42. package/tests/pyth/pyth-feeds.test.ts +943 -0
  43. package/tests/pyth/pyth-indigo.test.ts +8 -12
  44. package/tests/pyth/pyth.test.ts +1 -2
  45. package/tests/rob/actions.ts +0 -2
  46. package/tests/rob/rob-leverage.test.ts +164 -220
  47. package/tests/rob/rob.test.ts +158 -263
  48. package/tests/rob/transactions-mutated.ts +7 -18
  49. package/tests/stability-pool/actions.ts +31 -22
  50. package/tests/stability-pool.test.ts +226 -319
  51. package/tests/stableswap/stableswap-actions.ts +0 -1
  52. package/tests/stableswap/stableswap.test.ts +226 -4
  53. package/tests/staking.test.ts +2 -13
  54. package/tests/treasury/treasury.test.ts +6 -30
@@ -9,7 +9,6 @@ import {
9
9
  fromText,
10
10
  paymentCredentialOf,
11
11
  toHex,
12
- unixTimeToSlot,
13
12
  } from '@lucid-evolution/lucid';
14
13
  import { describe, beforeEach, test, expect, assert } from 'vitest';
15
14
  import {
@@ -173,11 +172,7 @@ describe('Gov', () => {
173
172
  test<MyContext>('Create text proposal', async (context: MyContext) => {
174
173
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
175
174
 
176
- const [sysParams, __] = await init(
177
- context.lucid,
178
- [iusdInitialAssetCfg()],
179
- context.emulator.slot,
180
- );
175
+ const [sysParams, __] = await init(context.lucid, [iusdInitialAssetCfg()]);
181
176
 
182
177
  const govUtxo = await findGov(
183
178
  context.lucid,
@@ -190,7 +185,6 @@ describe('Gov', () => {
190
185
  null,
191
186
  sysParams,
192
187
  context.lucid,
193
- context.emulator.slot,
194
188
  govUtxo.utxo,
195
189
  [],
196
190
  );
@@ -206,11 +200,7 @@ describe('Gov', () => {
206
200
  test<MyContext>('Create text proposal with shards', async (context: MyContext) => {
207
201
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
208
202
 
209
- const [sysParams, _] = await init(
210
- context.lucid,
211
- [iusdInitialAssetCfg()],
212
- context.emulator.slot,
213
- );
203
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
214
204
 
215
205
  const govUtxo = await findGov(
216
206
  context.lucid,
@@ -223,7 +213,6 @@ describe('Gov', () => {
223
213
  null,
224
214
  sysParams,
225
215
  context.lucid,
226
- context.emulator.slot,
227
216
  govUtxo.utxo,
228
217
  [],
229
218
  );
@@ -251,7 +240,6 @@ describe('Gov', () => {
251
240
  govUtxo.datum.protocolParams.totalShards,
252
241
  pollUtxo.utxo,
253
242
  sysParams,
254
- context.emulator.slot,
255
243
  context.lucid,
256
244
  ),
257
245
  context.lucid,
@@ -275,11 +263,7 @@ describe('Gov', () => {
275
263
  test<MyContext>('Merge proposal shards', async (context: MyContext) => {
276
264
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
277
265
 
278
- const [sysParams, _] = await init(
279
- context.lucid,
280
- [iusdInitialAssetCfg()],
281
- context.emulator.slot,
282
- );
266
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
283
267
 
284
268
  const govUtxo = await findGov(
285
269
  context.lucid,
@@ -292,7 +276,6 @@ describe('Gov', () => {
292
276
  null,
293
277
  sysParams,
294
278
  context.lucid,
295
- context.emulator.slot,
296
279
  govUtxo.utxo,
297
280
  [],
298
281
  );
@@ -313,18 +296,12 @@ describe('Gov', () => {
313
296
  2n,
314
297
  pollUtxo.utxo,
315
298
  sysParams,
316
- context.emulator.slot,
299
+
317
300
  context.lucid,
318
301
  ),
319
302
  );
320
303
 
321
- const targetSlot = unixTimeToSlot(
322
- context.lucid.config().network!,
323
- Number(pollUtxo.datum.votingEndTime),
324
- );
325
- expect(targetSlot).toBeGreaterThan(context.emulator.slot);
326
-
327
- context.emulator.awaitSlot(targetSlot - context.emulator.slot + 1);
304
+ await waitForVotingEnd(pollId, sysParams, context);
328
305
  }
329
306
 
330
307
  {
@@ -351,7 +328,6 @@ describe('Gov', () => {
351
328
  allPollShards.map((u) => u.utxo),
352
329
  sysParams,
353
330
  context.lucid,
354
- context.emulator.slot,
355
331
  ),
356
332
  context.lucid,
357
333
  context.emulator,
@@ -371,11 +347,7 @@ describe('Gov', () => {
371
347
  test<MyContext>('Create propose iasset proposal', async (context: MyContext) => {
372
348
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
373
349
 
374
- const [sysParams, ___] = await init(
375
- context.lucid,
376
- [iusdInitialAssetCfg()],
377
- context.emulator.slot,
378
- );
350
+ const [sysParams, ___] = await init(context.lucid, [iusdInitialAssetCfg()]);
379
351
 
380
352
  const govUtxo = await findGov(
381
353
  context.lucid,
@@ -408,7 +380,7 @@ describe('Gov', () => {
408
380
  null,
409
381
  sysParams,
410
382
  context.lucid,
411
- context.emulator.slot,
383
+
412
384
  govUtxo.utxo,
413
385
  allIassetOrefs,
414
386
  );
@@ -424,11 +396,7 @@ describe('Gov', () => {
424
396
  test<MyContext>('Create modify iasset proposal', async (context: MyContext) => {
425
397
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
426
398
 
427
- const [sysParams, ___] = await init(
428
- context.lucid,
429
- [iusdInitialAssetCfg()],
430
- context.emulator.slot,
431
- );
399
+ const [sysParams, ___] = await init(context.lucid, [iusdInitialAssetCfg()]);
432
400
 
433
401
  const govUtxo = await findGov(
434
402
  context.lucid,
@@ -464,7 +432,7 @@ describe('Gov', () => {
464
432
  null,
465
433
  sysParams,
466
434
  context.lucid,
467
- context.emulator.slot,
435
+
468
436
  govUtxo.utxo,
469
437
  allIassetOrefs,
470
438
  );
@@ -480,11 +448,9 @@ describe('Gov', () => {
480
448
  test<MyContext>('Create add collateral asset proposal', async (context: MyContext) => {
481
449
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
482
450
 
483
- const [sysParams, [iusdAssetInfo]] = await init(
484
- context.lucid,
485
- [iusdInitialAssetCfg()],
486
- context.emulator.slot,
487
- );
451
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
452
+ iusdInitialAssetCfg(),
453
+ ]);
488
454
 
489
455
  const [pkh, _] = await addrDetails(context.lucid);
490
456
 
@@ -505,7 +471,6 @@ describe('Gov', () => {
505
471
  'IUSD_INDY_ORACLE',
506
472
  rationalFromInt(1n),
507
473
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
508
- context.emulator.slot,
509
474
  );
510
475
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
511
476
 
@@ -542,7 +507,7 @@ describe('Gov', () => {
542
507
  null,
543
508
  sysParams,
544
509
  context.lucid,
545
- context.emulator.slot,
510
+
546
511
  govUtxo.utxo,
547
512
  allIassetOrefs,
548
513
  );
@@ -558,11 +523,9 @@ describe('Gov', () => {
558
523
  test<MyContext>('Create update collateral asset proposal', async (context: MyContext) => {
559
524
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
560
525
 
561
- const [sysParams, [iusdAssetInfo]] = await init(
562
- context.lucid,
563
- [iusdInitialAssetCfg()],
564
- context.emulator.slot,
565
- );
526
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
527
+ iusdInitialAssetCfg(),
528
+ ]);
566
529
 
567
530
  const [pkh, _] = await addrDetails(context.lucid);
568
531
 
@@ -583,7 +546,6 @@ describe('Gov', () => {
583
546
  'NEW_IUSD_ADA_ORACLE',
584
547
  rationalFromInt(1n),
585
548
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
586
- context.emulator.slot,
587
549
  );
588
550
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
589
551
 
@@ -620,7 +582,7 @@ describe('Gov', () => {
620
582
  null,
621
583
  sysParams,
622
584
  context.lucid,
623
- context.emulator.slot,
585
+
624
586
  govUtxo.utxo,
625
587
  allIassetOrefs,
626
588
  );
@@ -636,11 +598,7 @@ describe('Gov', () => {
636
598
  test<MyContext>('Vote on proposal', async (context: MyContext) => {
637
599
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
638
600
 
639
- const [sysParams, __] = await init(
640
- context.lucid,
641
- [iusdInitialAssetCfg()],
642
- context.emulator.slot,
643
- );
601
+ const [sysParams, __] = await init(context.lucid, [iusdInitialAssetCfg()]);
644
602
 
645
603
  const govUtxo = await findGov(
646
604
  context.lucid,
@@ -653,7 +611,7 @@ describe('Gov', () => {
653
611
  null,
654
612
  sysParams,
655
613
  context.lucid,
656
- context.emulator.slot,
614
+
657
615
  govUtxo.utxo,
658
616
  [],
659
617
  );
@@ -691,7 +649,6 @@ describe('Gov', () => {
691
649
  stakingPosOref.utxo,
692
650
  sysParams,
693
651
  context.lucid,
694
- context.emulator.slot,
695
652
  ),
696
653
  context.lucid,
697
654
  context.emulator,
@@ -701,11 +658,7 @@ describe('Gov', () => {
701
658
  test<MyContext>('Vote on proposal, then deposit more INDY', async (context: MyContext) => {
702
659
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
703
660
 
704
- const [sysParams, __] = await init(
705
- context.lucid,
706
- [iusdInitialAssetCfg()],
707
- context.emulator.slot,
708
- );
661
+ const [sysParams, __] = await init(context.lucid, [iusdInitialAssetCfg()]);
709
662
 
710
663
  const govUtxo = await findGov(
711
664
  context.lucid,
@@ -718,7 +671,7 @@ describe('Gov', () => {
718
671
  null,
719
672
  sysParams,
720
673
  context.lucid,
721
- context.emulator.slot,
674
+
722
675
  govUtxo.utxo,
723
676
  [],
724
677
  );
@@ -751,7 +704,6 @@ describe('Gov', () => {
751
704
  500_000_000n,
752
705
  sysParams,
753
706
  context.lucid,
754
- context.emulator.slot,
755
707
  ),
756
708
  );
757
709
  });
@@ -759,11 +711,7 @@ describe('Gov', () => {
759
711
  test<MyContext>('Vote on 2 proposals sequentially (lower pollID first)', async (context: MyContext) => {
760
712
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
761
713
 
762
- const [sysParams, __] = await init(
763
- context.lucid,
764
- [iusdInitialAssetCfg()],
765
- context.emulator.slot,
766
- );
714
+ const [sysParams, __] = await init(context.lucid, [iusdInitialAssetCfg()]);
767
715
 
768
716
  await runAndAwaitTx(
769
717
  context.lucid,
@@ -787,7 +735,7 @@ describe('Gov', () => {
787
735
  null,
788
736
  sysParams,
789
737
  context.lucid,
790
- context.emulator.slot,
738
+
791
739
  govUtxo.utxo,
792
740
  [],
793
741
  );
@@ -839,11 +787,7 @@ describe('Gov', () => {
839
787
  test<MyContext>('Vote on 2 proposals in reverse (higher pollID first), both yes and no votes', async (context: MyContext) => {
840
788
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
841
789
 
842
- const [sysParams, __] = await init(
843
- context.lucid,
844
- [iusdInitialAssetCfg()],
845
- context.emulator.slot,
846
- );
790
+ const [sysParams, __] = await init(context.lucid, [iusdInitialAssetCfg()]);
847
791
 
848
792
  await runAndAwaitTx(
849
793
  context.lucid,
@@ -867,7 +811,7 @@ describe('Gov', () => {
867
811
  null,
868
812
  sysParams,
869
813
  context.lucid,
870
- context.emulator.slot,
814
+
871
815
  govUtxo.utxo,
872
816
  [],
873
817
  );
@@ -926,18 +870,14 @@ describe('Gov', () => {
926
870
  test<MyContext>('End passed proposal', async (context: MyContext) => {
927
871
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
928
872
 
929
- const [sysParams, _] = await init(
930
- context.lucid,
931
- [iusdInitialAssetCfg()],
932
- context.emulator.slot,
933
- );
873
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
934
874
 
935
875
  const [tx, pollId] = await createProposal(
936
876
  { TextProposal: fromHex(fromText('smth')) },
937
877
  null,
938
878
  sysParams,
939
879
  context.lucid,
940
- context.emulator.slot,
880
+
941
881
  (
942
882
  await findGov(
943
883
  context.lucid,
@@ -984,7 +924,6 @@ describe('Gov', () => {
984
924
  govUtxo.utxo,
985
925
  sysParams,
986
926
  context.lucid,
987
- context.emulator.slot,
988
927
  ),
989
928
  context.lucid,
990
929
  context.emulator,
@@ -1004,18 +943,14 @@ describe('Gov', () => {
1004
943
  test<MyContext>('End failed proposal', async (context: MyContext) => {
1005
944
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1006
945
 
1007
- const [sysParams, __] = await init(
1008
- context.lucid,
1009
- [iusdInitialAssetCfg()],
1010
- context.emulator.slot,
1011
- );
946
+ const [sysParams, __] = await init(context.lucid, [iusdInitialAssetCfg()]);
1012
947
 
1013
948
  const [tx, pollId] = await createProposal(
1014
949
  { TextProposal: fromHex(fromText('smth')) },
1015
950
  null,
1016
951
  sysParams,
1017
952
  context.lucid,
1018
- context.emulator.slot,
953
+
1019
954
  (
1020
955
  await findGov(
1021
956
  context.lucid,
@@ -1037,22 +972,7 @@ describe('Gov', () => {
1037
972
 
1038
973
  await runVote(pollId, 'No', sysParams, context);
1039
974
 
1040
- {
1041
- const pollUtxo = await findPollManager(
1042
- context.lucid,
1043
- sysParams.validatorHashes.pollManagerHash,
1044
- fromSystemParamsAsset(sysParams.pollManagerParams.pollToken),
1045
- pollId,
1046
- );
1047
-
1048
- const targetSlot = unixTimeToSlot(
1049
- context.lucid.config().network!,
1050
- Number(pollUtxo.datum.votingEndTime),
1051
- );
1052
- expect(targetSlot).toBeGreaterThan(context.emulator.slot);
1053
-
1054
- context.emulator.awaitSlot(targetSlot - context.emulator.slot + 1);
1055
- }
975
+ await waitForVotingEnd(pollId, sysParams, context);
1056
976
 
1057
977
  await runMergeAllShards(pollId, sysParams, context);
1058
978
 
@@ -1083,7 +1003,6 @@ describe('Gov', () => {
1083
1003
  govUtxo.utxo,
1084
1004
  sysParams,
1085
1005
  context.lucid,
1086
- context.emulator.slot,
1087
1006
  ),
1088
1007
  context.lucid,
1089
1008
  context.emulator,
@@ -1116,18 +1035,14 @@ describe('Gov', () => {
1116
1035
  test<MyContext>('Execute text proposal', async (context: MyContext) => {
1117
1036
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1118
1037
 
1119
- const [sysParams, _] = await init(
1120
- context.lucid,
1121
- [iusdInitialAssetCfg()],
1122
- context.emulator.slot,
1123
- );
1038
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
1124
1039
 
1125
1040
  const [tx, pollId] = await createProposal(
1126
1041
  { TextProposal: fromHex(fromText('smth')) },
1127
1042
  null,
1128
1043
  sysParams,
1129
1044
  context.lucid,
1130
- context.emulator.slot,
1045
+
1131
1046
  (
1132
1047
  await findGov(
1133
1048
  context.lucid,
@@ -1180,7 +1095,6 @@ describe('Gov', () => {
1180
1095
  null,
1181
1096
  sysParams,
1182
1097
  context.lucid,
1183
- context.emulator.slot,
1184
1098
  ),
1185
1099
  context.lucid,
1186
1100
  context.emulator,
@@ -1190,11 +1104,7 @@ describe('Gov', () => {
1190
1104
  test<MyContext>('Execute text proposal with treasury withdrawal', async (context: MyContext) => {
1191
1105
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1192
1106
 
1193
- const [sysParams, __] = await init(
1194
- context.lucid,
1195
- [iusdInitialAssetCfg()],
1196
- context.emulator.slot,
1197
- );
1107
+ const [sysParams, __] = await init(context.lucid, [iusdInitialAssetCfg()]);
1198
1108
 
1199
1109
  const withdrawalIndyAmt = 1_000n;
1200
1110
  const treasuryWithdrawalUtxo = await createIndyUtxoAtTreasury(
@@ -1221,7 +1131,7 @@ describe('Gov', () => {
1221
1131
  },
1222
1132
  sysParams,
1223
1133
  context.lucid,
1224
- context.emulator.slot,
1134
+
1225
1135
  (
1226
1136
  await findGov(
1227
1137
  context.lucid,
@@ -1278,7 +1188,6 @@ describe('Gov', () => {
1278
1188
  null,
1279
1189
  sysParams,
1280
1190
  context.lucid,
1281
- context.emulator.slot,
1282
1191
  ),
1283
1192
  context.lucid,
1284
1193
  context.emulator,
@@ -1297,11 +1206,7 @@ describe('Gov', () => {
1297
1206
  test<MyContext>('Execute text proposal with treasury withdrawal with Treasury PrepareWithdrawal', async (context: MyContext) => {
1298
1207
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1299
1208
 
1300
- const [sysParams, __] = await init(
1301
- context.lucid,
1302
- [iusdInitialAssetCfg()],
1303
- context.emulator.slot,
1304
- );
1209
+ const [sysParams, __] = await init(context.lucid, [iusdInitialAssetCfg()]);
1305
1210
 
1306
1211
  context.lucid.selectWallet.fromSeed(context.users.user.seedPhrase);
1307
1212
  const withdrawalAmt = 2n;
@@ -1347,7 +1252,7 @@ describe('Gov', () => {
1347
1252
  },
1348
1253
  sysParams,
1349
1254
  context.lucid,
1350
- context.emulator.slot,
1255
+
1351
1256
  (
1352
1257
  await findGov(
1353
1258
  context.lucid,
@@ -1458,7 +1363,6 @@ describe('Gov', () => {
1458
1363
  null,
1459
1364
  sysParams,
1460
1365
  context.lucid,
1461
- context.emulator.slot,
1462
1366
  ),
1463
1367
  ),
1464
1368
  );
@@ -1472,11 +1376,7 @@ describe('Gov', () => {
1472
1376
  test<MyContext>('Execute create IAsset proposal', async (context: MyContext) => {
1473
1377
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1474
1378
 
1475
- const [sysParams, _] = await init(
1476
- context.lucid,
1477
- [iusdInitialAssetCfg()],
1478
- context.emulator.slot,
1479
- );
1379
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
1480
1380
 
1481
1381
  const govUtxo = await findGov(
1482
1382
  context.lucid,
@@ -1501,7 +1401,7 @@ describe('Gov', () => {
1501
1401
  null,
1502
1402
  sysParams,
1503
1403
  context.lucid,
1504
- context.emulator.slot,
1404
+
1505
1405
  govUtxo.utxo,
1506
1406
  (
1507
1407
  await findAllIAssets(
@@ -1561,7 +1461,6 @@ describe('Gov', () => {
1561
1461
  null,
1562
1462
  sysParams,
1563
1463
  context.lucid,
1564
- context.emulator.slot,
1565
1464
  ),
1566
1465
  context.lucid,
1567
1466
  context.emulator,
@@ -1571,11 +1470,7 @@ describe('Gov', () => {
1571
1470
  test<MyContext>('Execute create asset proposal with treasury withdrawal', async (context: MyContext) => {
1572
1471
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1573
1472
 
1574
- const [sysParams, _] = await init(
1575
- context.lucid,
1576
- [iusdInitialAssetCfg()],
1577
- context.emulator.slot,
1578
- );
1473
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
1579
1474
 
1580
1475
  const withdrawalIndyAmt = 1_000n;
1581
1476
  const treasuryWithdrawalUtxo = await createIndyUtxoAtTreasury(
@@ -1620,7 +1515,7 @@ describe('Gov', () => {
1620
1515
  },
1621
1516
  sysParams,
1622
1517
  context.lucid,
1623
- context.emulator.slot,
1518
+
1624
1519
  govUtxo.utxo,
1625
1520
  (
1626
1521
  await findAllIAssets(
@@ -1684,7 +1579,6 @@ describe('Gov', () => {
1684
1579
  null,
1685
1580
  sysParams,
1686
1581
  context.lucid,
1687
- context.emulator.slot,
1688
1582
  ),
1689
1583
  context.lucid,
1690
1584
  context.emulator,
@@ -1703,11 +1597,7 @@ describe('Gov', () => {
1703
1597
  test<MyContext>('Execute modify asset proposal', async (context: MyContext) => {
1704
1598
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1705
1599
 
1706
- const [sysParams, _] = await init(
1707
- context.lucid,
1708
- [iusdInitialAssetCfg()],
1709
- context.emulator.slot,
1710
- );
1600
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
1711
1601
 
1712
1602
  const govUtxo = await findGov(
1713
1603
  context.lucid,
@@ -1740,7 +1630,7 @@ describe('Gov', () => {
1740
1630
  null,
1741
1631
  sysParams,
1742
1632
  context.lucid,
1743
- context.emulator.slot,
1633
+
1744
1634
  govUtxo.utxo,
1745
1635
  [],
1746
1636
  );
@@ -1788,7 +1678,6 @@ describe('Gov', () => {
1788
1678
  null,
1789
1679
  sysParams,
1790
1680
  context.lucid,
1791
- context.emulator.slot,
1792
1681
  ),
1793
1682
  context.lucid,
1794
1683
  context.emulator,
@@ -1798,11 +1687,7 @@ describe('Gov', () => {
1798
1687
  test<MyContext>('Execute modify asset proposal with treasury withdrawal', async (context: MyContext) => {
1799
1688
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1800
1689
 
1801
- const [sysParams, _] = await init(
1802
- context.lucid,
1803
- [iusdInitialAssetCfg()],
1804
- context.emulator.slot,
1805
- );
1690
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
1806
1691
 
1807
1692
  const withdrawalIndyAmt = 1_000n;
1808
1693
  const treasuryWithdrawalUtxo = await createIndyUtxoAtTreasury(
@@ -1855,7 +1740,7 @@ describe('Gov', () => {
1855
1740
  },
1856
1741
  sysParams,
1857
1742
  context.lucid,
1858
- context.emulator.slot,
1743
+
1859
1744
  govUtxo.utxo,
1860
1745
  [],
1861
1746
  );
@@ -1907,7 +1792,6 @@ describe('Gov', () => {
1907
1792
  null,
1908
1793
  sysParams,
1909
1794
  context.lucid,
1910
- context.emulator.slot,
1911
1795
  ),
1912
1796
  context.lucid,
1913
1797
  context.emulator,
@@ -1934,16 +1818,12 @@ describe('Gov', () => {
1934
1818
  tokenName: fromHex(fromText('ABC')),
1935
1819
  };
1936
1820
 
1937
- const [sysParams, [iusdAssetInfo]] = await init(
1938
- context.lucid,
1939
- [
1940
- {
1941
- ...iusdInitialAssetCfg(),
1942
- collateralAssets: [],
1943
- },
1944
- ],
1945
- context.emulator.slot,
1946
- );
1821
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1822
+ {
1823
+ ...iusdInitialAssetCfg(),
1824
+ collateralAssets: [],
1825
+ },
1826
+ ]);
1947
1827
 
1948
1828
  const [pkh, _] = await addrDetails(context.lucid);
1949
1829
 
@@ -1964,7 +1844,6 @@ describe('Gov', () => {
1964
1844
  'IUSD_INDY_ORACLE',
1965
1845
  rationalFromInt(1n),
1966
1846
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
1967
- context.emulator.slot,
1968
1847
  );
1969
1848
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
1970
1849
 
@@ -2001,7 +1880,7 @@ describe('Gov', () => {
2001
1880
  null,
2002
1881
  sysParams,
2003
1882
  context.lucid,
2004
- context.emulator.slot,
1883
+
2005
1884
  govUtxo.utxo,
2006
1885
  allIassetOrefs,
2007
1886
  );
@@ -2065,7 +1944,6 @@ describe('Gov', () => {
2065
1944
  null,
2066
1945
  sysParams,
2067
1946
  context.lucid,
2068
- context.emulator.slot,
2069
1947
  ),
2070
1948
  context.lucid,
2071
1949
  context.emulator,
@@ -2113,21 +1991,17 @@ describe('Gov', () => {
2113
1991
  tokenName: fromHex(fromText('A')),
2114
1992
  };
2115
1993
 
2116
- const [sysParams, [iusdAssetInfo]] = await init(
2117
- context.lucid,
2118
- [
2119
- {
2120
- ...iusdInitialAssetCfg(),
2121
- collateralAssets: [
2122
- {
2123
- ...iusdInitialAssetCfg().collateralAssets[0],
2124
- collateralAsset: collateralAsset1,
2125
- },
2126
- ],
2127
- },
2128
- ],
2129
- context.emulator.slot,
2130
- );
1994
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1995
+ {
1996
+ ...iusdInitialAssetCfg(),
1997
+ collateralAssets: [
1998
+ {
1999
+ ...iusdInitialAssetCfg().collateralAssets[0],
2000
+ collateralAsset: collateralAsset1,
2001
+ },
2002
+ ],
2003
+ },
2004
+ ]);
2131
2005
 
2132
2006
  const [pkh, _] = await addrDetails(context.lucid);
2133
2007
 
@@ -2148,7 +2022,6 @@ describe('Gov', () => {
2148
2022
  'IUSD_INDY_ORACLE',
2149
2023
  rationalFromInt(1n),
2150
2024
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
2151
- context.emulator.slot,
2152
2025
  );
2153
2026
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
2154
2027
 
@@ -2185,7 +2058,7 @@ describe('Gov', () => {
2185
2058
  null,
2186
2059
  sysParams,
2187
2060
  context.lucid,
2188
- context.emulator.slot,
2061
+
2189
2062
  govUtxo.utxo,
2190
2063
  allIassetOrefs,
2191
2064
  );
@@ -2249,7 +2122,6 @@ describe('Gov', () => {
2249
2122
  null,
2250
2123
  sysParams,
2251
2124
  context.lucid,
2252
- context.emulator.slot,
2253
2125
  ),
2254
2126
  context.lucid,
2255
2127
  context.emulator,
@@ -2303,26 +2175,22 @@ describe('Gov', () => {
2303
2175
  tokenName: fromHex(fromText('C')),
2304
2176
  };
2305
2177
 
2306
- const [sysParams, [iusdAssetInfo]] = await init(
2307
- context.lucid,
2308
- [
2309
- {
2310
- ...iusdInitialAssetCfg(),
2311
- collateralAssets: [
2312
- {
2313
- ...iusdInitialAssetCfg().collateralAssets[0],
2314
- collateralAsset: collateralAsset1,
2315
- nextCollateralAsset: collateralAsset3,
2316
- },
2317
- {
2318
- ...iusdInitialAssetCfg().collateralAssets[0],
2319
- collateralAsset: collateralAsset3,
2320
- },
2321
- ],
2322
- },
2323
- ],
2324
- context.emulator.slot,
2325
- );
2178
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2179
+ {
2180
+ ...iusdInitialAssetCfg(),
2181
+ collateralAssets: [
2182
+ {
2183
+ ...iusdInitialAssetCfg().collateralAssets[0],
2184
+ collateralAsset: collateralAsset1,
2185
+ nextCollateralAsset: collateralAsset3,
2186
+ },
2187
+ {
2188
+ ...iusdInitialAssetCfg().collateralAssets[0],
2189
+ collateralAsset: collateralAsset3,
2190
+ },
2191
+ ],
2192
+ },
2193
+ ]);
2326
2194
 
2327
2195
  const [pkh, _] = await addrDetails(context.lucid);
2328
2196
 
@@ -2343,7 +2211,6 @@ describe('Gov', () => {
2343
2211
  'IUSD_INDY_ORACLE',
2344
2212
  rationalFromInt(1n),
2345
2213
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
2346
- context.emulator.slot,
2347
2214
  );
2348
2215
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
2349
2216
 
@@ -2380,7 +2247,7 @@ describe('Gov', () => {
2380
2247
  null,
2381
2248
  sysParams,
2382
2249
  context.lucid,
2383
- context.emulator.slot,
2250
+
2384
2251
  govUtxo.utxo,
2385
2252
  allIassetOrefs,
2386
2253
  );
@@ -2444,7 +2311,6 @@ describe('Gov', () => {
2444
2311
  null,
2445
2312
  sysParams,
2446
2313
  context.lucid,
2447
- context.emulator.slot,
2448
2314
  ),
2449
2315
  context.lucid,
2450
2316
  context.emulator,
@@ -2516,21 +2382,17 @@ describe('Gov', () => {
2516
2382
  tokenName: fromHex(fromText('B')),
2517
2383
  };
2518
2384
 
2519
- const [sysParams, [iusdAssetInfo]] = await init(
2520
- context.lucid,
2521
- [
2522
- {
2523
- ...iusdInitialAssetCfg(),
2524
- collateralAssets: [
2525
- {
2526
- ...iusdInitialAssetCfg().collateralAssets[0],
2527
- collateralAsset: collateralAsset1,
2528
- },
2529
- ],
2530
- },
2531
- ],
2532
- context.emulator.slot,
2533
- );
2385
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2386
+ {
2387
+ ...iusdInitialAssetCfg(),
2388
+ collateralAssets: [
2389
+ {
2390
+ ...iusdInitialAssetCfg().collateralAssets[0],
2391
+ collateralAsset: collateralAsset1,
2392
+ },
2393
+ ],
2394
+ },
2395
+ ]);
2534
2396
 
2535
2397
  const [pkh, _] = await addrDetails(context.lucid);
2536
2398
 
@@ -2551,7 +2413,6 @@ describe('Gov', () => {
2551
2413
  'IUSD_INDY_ORACLE',
2552
2414
  rationalFromInt(1n),
2553
2415
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
2554
- context.emulator.slot,
2555
2416
  );
2556
2417
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
2557
2418
 
@@ -2588,7 +2449,7 @@ describe('Gov', () => {
2588
2449
  null,
2589
2450
  sysParams,
2590
2451
  context.lucid,
2591
- context.emulator.slot,
2452
+
2592
2453
  govUtxo.utxo,
2593
2454
  allIassetOrefs,
2594
2455
  );
@@ -2652,7 +2513,6 @@ describe('Gov', () => {
2652
2513
  null,
2653
2514
  sysParams,
2654
2515
  context.lucid,
2655
- context.emulator.slot,
2656
2516
  ),
2657
2517
  context.lucid,
2658
2518
  context.emulator,
@@ -2711,11 +2571,7 @@ describe('Gov', () => {
2711
2571
  test<MyContext>('Execute add iasset and add collateral asset proposals in parallel (execute iasset first, then collateral asset)', async (context: MyContext) => {
2712
2572
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2713
2573
 
2714
- const [sysParams, _] = await init(
2715
- context.lucid,
2716
- [iusdInitialAssetCfg()],
2717
- context.emulator.slot,
2718
- );
2574
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
2719
2575
 
2720
2576
  const [pkh, __] = await addrDetails(context.lucid);
2721
2577
 
@@ -2754,7 +2610,7 @@ describe('Gov', () => {
2754
2610
  null,
2755
2611
  sysParams,
2756
2612
  context.lucid,
2757
- context.emulator.slot,
2613
+
2758
2614
  govUtxo.utxo,
2759
2615
  (
2760
2616
  await findAllIAssets(
@@ -2791,7 +2647,6 @@ describe('Gov', () => {
2791
2647
  'SOME_ORACLE',
2792
2648
  rationalFromInt(1n),
2793
2649
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
2794
- context.emulator.slot,
2795
2650
  );
2796
2651
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
2797
2652
 
@@ -2818,7 +2673,7 @@ describe('Gov', () => {
2818
2673
  null,
2819
2674
  sysParams,
2820
2675
  context.lucid,
2821
- context.emulator.slot,
2676
+
2822
2677
  govUtxo.utxo,
2823
2678
  [],
2824
2679
  );
@@ -2892,7 +2747,6 @@ describe('Gov', () => {
2892
2747
  null,
2893
2748
  sysParams,
2894
2749
  context.lucid,
2895
- context.emulator.slot,
2896
2750
  ),
2897
2751
  );
2898
2752
 
@@ -2939,7 +2793,6 @@ describe('Gov', () => {
2939
2793
  null,
2940
2794
  sysParams,
2941
2795
  context.lucid,
2942
- context.emulator.slot,
2943
2796
  ),
2944
2797
  );
2945
2798
  });
@@ -2947,11 +2800,9 @@ describe('Gov', () => {
2947
2800
  test<MyContext>('Execute add collateral asset proposal with treasury withdrawal', async (context: MyContext) => {
2948
2801
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2949
2802
 
2950
- const [sysParams, [iusdAssetInfo]] = await init(
2951
- context.lucid,
2952
- [iusdInitialAssetCfg()],
2953
- context.emulator.slot,
2954
- );
2803
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2804
+ iusdInitialAssetCfg(),
2805
+ ]);
2955
2806
 
2956
2807
  const withdrawalIndyAmt = 1_000n;
2957
2808
  const treasuryWithdrawalUtxo = await createIndyUtxoAtTreasury(
@@ -2979,7 +2830,6 @@ describe('Gov', () => {
2979
2830
  'IUSD_INDY_ORACLE',
2980
2831
  rationalFromInt(1n),
2981
2832
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
2982
- context.emulator.slot,
2983
2833
  );
2984
2834
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
2985
2835
 
@@ -3033,7 +2883,7 @@ describe('Gov', () => {
3033
2883
  },
3034
2884
  sysParams,
3035
2885
  context.lucid,
3036
- context.emulator.slot,
2886
+
3037
2887
  govUtxo.utxo,
3038
2888
  allIassetOrefs,
3039
2889
  );
@@ -3101,7 +2951,6 @@ describe('Gov', () => {
3101
2951
  null,
3102
2952
  sysParams,
3103
2953
  context.lucid,
3104
- context.emulator.slot,
3105
2954
  ),
3106
2955
  context.lucid,
3107
2956
  context.emulator,
@@ -3133,18 +2982,14 @@ describe('Gov', () => {
3133
2982
  initialCollateralAssets.push(collateralAssetI);
3134
2983
  }
3135
2984
 
3136
- const [sysParams, [iusdAssetInfo]] = await init(
3137
- context.lucid,
3138
- [
3139
- {
3140
- ...iusdInitialAssetCfg(),
3141
- collateralAssets: mkCollateralAssetsChain(
3142
- initialCollateralAssets.map((a) => mkBaseCollateralAsset(a, 0n)),
3143
- ),
3144
- },
3145
- ],
3146
- context.emulator.slot,
3147
- );
2985
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2986
+ {
2987
+ ...iusdInitialAssetCfg(),
2988
+ collateralAssets: mkCollateralAssetsChain(
2989
+ initialCollateralAssets.map((a) => mkBaseCollateralAsset(a, 0n)),
2990
+ ),
2991
+ },
2992
+ ]);
3148
2993
 
3149
2994
  const [pkh, _] = await addrDetails(context.lucid);
3150
2995
 
@@ -3165,7 +3010,6 @@ describe('Gov', () => {
3165
3010
  'IUSD_INDY_ORACLE',
3166
3011
  rationalFromInt(1n),
3167
3012
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
3168
- context.emulator.slot,
3169
3013
  );
3170
3014
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
3171
3015
 
@@ -3216,7 +3060,7 @@ describe('Gov', () => {
3216
3060
  null,
3217
3061
  sysParams,
3218
3062
  context.lucid,
3219
- context.emulator.slot,
3063
+
3220
3064
  govUtxo.utxo,
3221
3065
  allIassetOrefs,
3222
3066
  );
@@ -3273,7 +3117,6 @@ describe('Gov', () => {
3273
3117
  null,
3274
3118
  sysParams,
3275
3119
  context.lucid,
3276
- context.emulator.slot,
3277
3120
  ),
3278
3121
  );
3279
3122
 
@@ -3306,18 +3149,14 @@ describe('Gov', () => {
3306
3149
  initialCollateralAssets.push(collateralAssetI);
3307
3150
  }
3308
3151
 
3309
- const [sysParams, [iusdAssetInfo]] = await init(
3310
- context.lucid,
3311
- [
3312
- {
3313
- ...iusdInitialAssetCfg(),
3314
- collateralAssets: mkCollateralAssetsChain(
3315
- initialCollateralAssets.map((a) => mkBaseCollateralAsset(a, 0n)),
3316
- ),
3317
- },
3318
- ],
3319
- context.emulator.slot,
3320
- );
3152
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3153
+ {
3154
+ ...iusdInitialAssetCfg(),
3155
+ collateralAssets: mkCollateralAssetsChain(
3156
+ initialCollateralAssets.map((a) => mkBaseCollateralAsset(a, 0n)),
3157
+ ),
3158
+ },
3159
+ ]);
3321
3160
 
3322
3161
  const [pkh, _] = await addrDetails(context.lucid);
3323
3162
 
@@ -3338,7 +3177,6 @@ describe('Gov', () => {
3338
3177
  'IUSD_INDY_ORACLE',
3339
3178
  rationalFromInt(1n),
3340
3179
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
3341
- context.emulator.slot,
3342
3180
  );
3343
3181
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
3344
3182
 
@@ -3402,7 +3240,7 @@ describe('Gov', () => {
3402
3240
  null,
3403
3241
  sysParams,
3404
3242
  context.lucid,
3405
- context.emulator.slot,
3243
+
3406
3244
  govUtxo.utxo,
3407
3245
  allIassetOrefs,
3408
3246
  );
@@ -3459,7 +3297,6 @@ describe('Gov', () => {
3459
3297
  null,
3460
3298
  sysParams,
3461
3299
  context.lucid,
3462
- context.emulator.slot,
3463
3300
  ),
3464
3301
  );
3465
3302
  });
@@ -3479,18 +3316,14 @@ describe('Gov', () => {
3479
3316
  initialCollateralAssets.push(collateralAssetI);
3480
3317
  }
3481
3318
 
3482
- const [sysParams, [iusdAssetInfo]] = await init(
3483
- context.lucid,
3484
- [
3485
- {
3486
- ...iusdInitialAssetCfg(),
3487
- collateralAssets: mkCollateralAssetsChain(
3488
- initialCollateralAssets.map((a) => mkBaseCollateralAsset(a, 0n)),
3489
- ),
3490
- },
3491
- ],
3492
- context.emulator.slot,
3493
- );
3319
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3320
+ {
3321
+ ...iusdInitialAssetCfg(),
3322
+ collateralAssets: mkCollateralAssetsChain(
3323
+ initialCollateralAssets.map((a) => mkBaseCollateralAsset(a, 0n)),
3324
+ ),
3325
+ },
3326
+ ]);
3494
3327
 
3495
3328
  const [pkh, _] = await addrDetails(context.lucid);
3496
3329
 
@@ -3511,7 +3344,6 @@ describe('Gov', () => {
3511
3344
  'IUSD_INDY_ORACLE',
3512
3345
  rationalFromInt(1n),
3513
3346
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
3514
- context.emulator.slot,
3515
3347
  );
3516
3348
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
3517
3349
 
@@ -3562,7 +3394,7 @@ describe('Gov', () => {
3562
3394
  null,
3563
3395
  sysParams,
3564
3396
  context.lucid,
3565
- context.emulator.slot,
3397
+
3566
3398
  govUtxo.utxo,
3567
3399
  allIassetOrefs,
3568
3400
  );
@@ -3619,7 +3451,6 @@ describe('Gov', () => {
3619
3451
  null,
3620
3452
  sysParams,
3621
3453
  context.lucid,
3622
- context.emulator.slot,
3623
3454
  ),
3624
3455
  );
3625
3456
 
@@ -3652,18 +3483,14 @@ describe('Gov', () => {
3652
3483
  initialCollateralAssets.push(collateralAssetI);
3653
3484
  }
3654
3485
 
3655
- const [sysParams, [iusdAssetInfo]] = await init(
3656
- context.lucid,
3657
- [
3658
- {
3659
- ...iusdInitialAssetCfg(),
3660
- collateralAssets: mkCollateralAssetsChain(
3661
- initialCollateralAssets.map((a) => mkBaseCollateralAsset(a, 0n)),
3662
- ),
3663
- },
3664
- ],
3665
- context.emulator.slot,
3666
- );
3486
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3487
+ {
3488
+ ...iusdInitialAssetCfg(),
3489
+ collateralAssets: mkCollateralAssetsChain(
3490
+ initialCollateralAssets.map((a) => mkBaseCollateralAsset(a, 0n)),
3491
+ ),
3492
+ },
3493
+ ]);
3667
3494
 
3668
3495
  const [pkh, _] = await addrDetails(context.lucid);
3669
3496
 
@@ -3684,7 +3511,6 @@ describe('Gov', () => {
3684
3511
  'IUSD_INDY_ORACLE',
3685
3512
  rationalFromInt(1n),
3686
3513
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
3687
- context.emulator.slot,
3688
3514
  );
3689
3515
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
3690
3516
 
@@ -3726,7 +3552,7 @@ describe('Gov', () => {
3726
3552
  null,
3727
3553
  sysParams,
3728
3554
  context.lucid,
3729
- context.emulator.slot,
3555
+
3730
3556
  govUtxo.utxo,
3731
3557
  allIassetOrefs,
3732
3558
  );
@@ -3783,7 +3609,6 @@ describe('Gov', () => {
3783
3609
  null,
3784
3610
  sysParams,
3785
3611
  context.lucid,
3786
- context.emulator.slot,
3787
3612
  ),
3788
3613
  );
3789
3614
 
@@ -3816,18 +3641,14 @@ describe('Gov', () => {
3816
3641
  initialCollateralAssets.push(collateralAssetI);
3817
3642
  }
3818
3643
 
3819
- const [sysParams, [iusdAssetInfo]] = await init(
3820
- context.lucid,
3821
- [
3822
- {
3823
- ...iusdInitialAssetCfg(),
3824
- collateralAssets: mkCollateralAssetsChain(
3825
- initialCollateralAssets.map((a) => mkBaseCollateralAsset(a, 0n)),
3826
- ),
3827
- },
3828
- ],
3829
- context.emulator.slot,
3830
- );
3644
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3645
+ {
3646
+ ...iusdInitialAssetCfg(),
3647
+ collateralAssets: mkCollateralAssetsChain(
3648
+ initialCollateralAssets.map((a) => mkBaseCollateralAsset(a, 0n)),
3649
+ ),
3650
+ },
3651
+ ]);
3831
3652
 
3832
3653
  const [pkh, _] = await addrDetails(context.lucid);
3833
3654
 
@@ -3848,7 +3669,6 @@ describe('Gov', () => {
3848
3669
  'IUSD_INDY_ORACLE',
3849
3670
  rationalFromInt(1n),
3850
3671
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
3851
- context.emulator.slot,
3852
3672
  );
3853
3673
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
3854
3674
 
@@ -3912,7 +3732,7 @@ describe('Gov', () => {
3912
3732
  null,
3913
3733
  sysParams,
3914
3734
  context.lucid,
3915
- context.emulator.slot,
3735
+
3916
3736
  govUtxo.utxo,
3917
3737
  allIassetOrefs,
3918
3738
  );
@@ -3969,7 +3789,6 @@ describe('Gov', () => {
3969
3789
  null,
3970
3790
  sysParams,
3971
3791
  context.lucid,
3972
- context.emulator.slot,
3973
3792
  ),
3974
3793
  );
3975
3794
  });
@@ -3977,11 +3796,9 @@ describe('Gov', () => {
3977
3796
  test<MyContext>('Execute update collateral asset proposal', async (context: MyContext) => {
3978
3797
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
3979
3798
 
3980
- const [sysParams, [iusdAssetInfo]] = await init(
3981
- context.lucid,
3982
- [iusdInitialAssetCfg()],
3983
- context.emulator.slot,
3984
- );
3799
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3800
+ iusdInitialAssetCfg(),
3801
+ ]);
3985
3802
 
3986
3803
  const [pkh, _] = await addrDetails(context.lucid);
3987
3804
 
@@ -4002,7 +3819,6 @@ describe('Gov', () => {
4002
3819
  'NEW_IUSD_ADA_ORACLE',
4003
3820
  rationalFromInt(1n),
4004
3821
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
4005
- context.emulator.slot,
4006
3822
  );
4007
3823
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
4008
3824
 
@@ -4039,7 +3855,7 @@ describe('Gov', () => {
4039
3855
  null,
4040
3856
  sysParams,
4041
3857
  context.lucid,
4042
- context.emulator.slot,
3858
+
4043
3859
  govUtxo.utxo,
4044
3860
  allIassetOrefs,
4045
3861
  );
@@ -4094,7 +3910,6 @@ describe('Gov', () => {
4094
3910
  null,
4095
3911
  sysParams,
4096
3912
  context.lucid,
4097
- context.emulator.slot,
4098
3913
  ),
4099
3914
  context.lucid,
4100
3915
  context.emulator,
@@ -4104,11 +3919,9 @@ describe('Gov', () => {
4104
3919
  test<MyContext>('Execute update collateral asset proposal with treasury withdrawal', async (context: MyContext) => {
4105
3920
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
4106
3921
 
4107
- const [sysParams, [iusdAssetInfo]] = await init(
4108
- context.lucid,
4109
- [iusdInitialAssetCfg()],
4110
- context.emulator.slot,
4111
- );
3922
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3923
+ iusdInitialAssetCfg(),
3924
+ ]);
4112
3925
 
4113
3926
  const [pkh, _] = await addrDetails(context.lucid);
4114
3927
 
@@ -4136,7 +3949,6 @@ describe('Gov', () => {
4136
3949
  'NEW_IUSD_ADA_ORACLE',
4137
3950
  rationalFromInt(1n),
4138
3951
  { biasTime: 120_000n, expirationPeriod: 1_800_000n, owner: pkh.hash },
4139
- context.emulator.slot,
4140
3952
  );
4141
3953
  await runAndAwaitTxBuilder(context.lucid, priceOracleTx);
4142
3954
 
@@ -4186,7 +3998,7 @@ describe('Gov', () => {
4186
3998
  },
4187
3999
  sysParams,
4188
4000
  context.lucid,
4189
- context.emulator.slot,
4001
+
4190
4002
  govUtxo.utxo,
4191
4003
  allIassetOrefs,
4192
4004
  );
@@ -4245,7 +4057,6 @@ describe('Gov', () => {
4245
4057
  null,
4246
4058
  sysParams,
4247
4059
  context.lucid,
4248
- context.emulator.slot,
4249
4060
  ),
4250
4061
  context.lucid,
4251
4062
  context.emulator,
@@ -4264,11 +4075,7 @@ describe('Gov', () => {
4264
4075
  test<MyContext>('Execute create stableswap pool proposal', async (context: MyContext) => {
4265
4076
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
4266
4077
 
4267
- const [sysParams, _] = await init(
4268
- context.lucid,
4269
- [iusdInitialAssetCfg()],
4270
- context.emulator.slot,
4271
- );
4078
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
4272
4079
 
4273
4080
  const feeManager = fromHex(
4274
4081
  paymentCredentialOf(context.users.admin.address).hash,
@@ -4297,7 +4104,7 @@ describe('Gov', () => {
4297
4104
  null,
4298
4105
  sysParams,
4299
4106
  context.lucid,
4300
- context.emulator.slot,
4107
+
4301
4108
  govUtxo.utxo,
4302
4109
  (
4303
4110
  await findAllIAssets(
@@ -4364,7 +4171,6 @@ describe('Gov', () => {
4364
4171
  cdpCreatorUtxo,
4365
4172
  sysParams,
4366
4173
  context.lucid,
4367
- context.emulator.slot,
4368
4174
  ),
4369
4175
  context.lucid,
4370
4176
  context.emulator,
@@ -4374,11 +4180,7 @@ describe('Gov', () => {
4374
4180
  test<MyContext>('Execute create stableswap pool proposal with treasury withdrawal', async (context: MyContext) => {
4375
4181
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
4376
4182
 
4377
- const [sysParams, _] = await init(
4378
- context.lucid,
4379
- [iusdInitialAssetCfg()],
4380
- context.emulator.slot,
4381
- );
4183
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
4382
4184
 
4383
4185
  const feeManager = fromHex(
4384
4186
  paymentCredentialOf(context.users.admin.address).hash,
@@ -4421,7 +4223,7 @@ describe('Gov', () => {
4421
4223
  },
4422
4224
  sysParams,
4423
4225
  context.lucid,
4424
- context.emulator.slot,
4226
+
4425
4227
  (
4426
4228
  await findGov(
4427
4229
  context.lucid,
@@ -4494,7 +4296,6 @@ describe('Gov', () => {
4494
4296
  cdpCreatorUtxo,
4495
4297
  sysParams,
4496
4298
  context.lucid,
4497
- context.emulator.slot,
4498
4299
  ),
4499
4300
  context.lucid,
4500
4301
  context.emulator,
@@ -4504,11 +4305,7 @@ describe('Gov', () => {
4504
4305
  test<MyContext>('Execute modify stableswap pool proposal', async (context: MyContext) => {
4505
4306
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
4506
4307
 
4507
- const [sysParams, _] = await init(
4508
- context.lucid,
4509
- [iusdInitialAssetCfg()],
4510
- context.emulator.slot,
4511
- );
4308
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
4512
4309
 
4513
4310
  const feeManager = fromHex(
4514
4311
  paymentCredentialOf(context.users.admin.address).hash,
@@ -4537,7 +4334,7 @@ describe('Gov', () => {
4537
4334
  null,
4538
4335
  sysParams,
4539
4336
  context.lucid,
4540
- context.emulator.slot,
4337
+
4541
4338
  (
4542
4339
  await findGov(
4543
4340
  context.lucid,
@@ -4610,7 +4407,6 @@ describe('Gov', () => {
4610
4407
  cdpCreatorUtxo,
4611
4408
  sysParams,
4612
4409
  context.lucid,
4613
- context.emulator.slot,
4614
4410
  ),
4615
4411
  );
4616
4412
 
@@ -4635,7 +4431,7 @@ describe('Gov', () => {
4635
4431
  null,
4636
4432
  sysParams,
4637
4433
  context.lucid,
4638
- context.emulator.slot,
4434
+
4639
4435
  (
4640
4436
  await findGov(
4641
4437
  context.lucid,
@@ -4698,7 +4494,6 @@ describe('Gov', () => {
4698
4494
  stableswapPoolUtxo.utxo,
4699
4495
  sysParams,
4700
4496
  context.lucid,
4701
- context.emulator.slot,
4702
4497
  ),
4703
4498
  context.lucid,
4704
4499
  context.emulator,
@@ -4708,11 +4503,7 @@ describe('Gov', () => {
4708
4503
  test<MyContext>('Execute modify stableswap pool proposal with treasury withdrawal', async (context: MyContext) => {
4709
4504
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
4710
4505
 
4711
- const [sysParams, _] = await init(
4712
- context.lucid,
4713
- [iusdInitialAssetCfg()],
4714
- context.emulator.slot,
4715
- );
4506
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
4716
4507
 
4717
4508
  const feeManager = fromHex(
4718
4509
  paymentCredentialOf(context.users.admin.address).hash,
@@ -4741,7 +4532,7 @@ describe('Gov', () => {
4741
4532
  null,
4742
4533
  sysParams,
4743
4534
  context.lucid,
4744
- context.emulator.slot,
4535
+
4745
4536
  (
4746
4537
  await findGov(
4747
4538
  context.lucid,
@@ -4814,7 +4605,6 @@ describe('Gov', () => {
4814
4605
  cdpCreatorUtxo,
4815
4606
  sysParams,
4816
4607
  context.lucid,
4817
- context.emulator.slot,
4818
4608
  ),
4819
4609
  );
4820
4610
 
@@ -4859,7 +4649,7 @@ describe('Gov', () => {
4859
4649
  },
4860
4650
  sysParams,
4861
4651
  context.lucid,
4862
- context.emulator.slot,
4652
+
4863
4653
  (
4864
4654
  await findGov(
4865
4655
  context.lucid,
@@ -4922,7 +4712,6 @@ describe('Gov', () => {
4922
4712
  stableswapPoolUtxo.utxo,
4923
4713
  sysParams,
4924
4714
  context.lucid,
4925
- context.emulator.slot,
4926
4715
  ),
4927
4716
  context.lucid,
4928
4717
  context.emulator,
@@ -4932,11 +4721,7 @@ describe('Gov', () => {
4932
4721
  test<MyContext>('Execute modify protocol params proposal', async (context: MyContext) => {
4933
4722
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
4934
4723
 
4935
- const [sysParams, _] = await init(
4936
- context.lucid,
4937
- [iusdInitialAssetCfg()],
4938
- context.emulator.slot,
4939
- );
4724
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
4940
4725
 
4941
4726
  const govUtxo = await findGov(
4942
4727
  context.lucid,
@@ -4973,7 +4758,7 @@ describe('Gov', () => {
4973
4758
  null,
4974
4759
  sysParams,
4975
4760
  context.lucid,
4976
- context.emulator.slot,
4761
+
4977
4762
  govUtxo.utxo,
4978
4763
  [],
4979
4764
  );
@@ -5021,7 +4806,6 @@ describe('Gov', () => {
5021
4806
  null,
5022
4807
  sysParams,
5023
4808
  context.lucid,
5024
- context.emulator.slot,
5025
4809
  ),
5026
4810
  context.lucid,
5027
4811
  context.emulator,
@@ -5031,11 +4815,7 @@ describe('Gov', () => {
5031
4815
  test<MyContext>('Execute modify protocol params proposal with treasury withdrawal', async (context: MyContext) => {
5032
4816
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
5033
4817
 
5034
- const [sysParams, _] = await init(
5035
- context.lucid,
5036
- [iusdInitialAssetCfg()],
5037
- context.emulator.slot,
5038
- );
4818
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
5039
4819
 
5040
4820
  const withdrawalIndyAmt = 1_000n;
5041
4821
  const treasuryWithdrawalUtxo = await createIndyUtxoAtTreasury(
@@ -5092,7 +4872,7 @@ describe('Gov', () => {
5092
4872
  },
5093
4873
  sysParams,
5094
4874
  context.lucid,
5095
- context.emulator.slot,
4875
+
5096
4876
  govUtxo.utxo,
5097
4877
  [],
5098
4878
  );
@@ -5144,7 +4924,6 @@ describe('Gov', () => {
5144
4924
  null,
5145
4925
  sysParams,
5146
4926
  context.lucid,
5147
- context.emulator.slot,
5148
4927
  ),
5149
4928
  context.lucid,
5150
4929
  context.emulator,
@@ -5163,11 +4942,7 @@ describe('Gov', () => {
5163
4942
  test<MyContext>('Execute upgrade protocol proposal', async (context: MyContext) => {
5164
4943
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
5165
4944
 
5166
- const [sysParams, _] = await init(
5167
- context.lucid,
5168
- [iusdInitialAssetCfg()],
5169
- context.emulator.slot,
5170
- );
4945
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
5171
4946
 
5172
4947
  const govUtxo = await findGov(
5173
4948
  context.lucid,
@@ -5197,7 +4972,7 @@ describe('Gov', () => {
5197
4972
  null,
5198
4973
  sysParams,
5199
4974
  context.lucid,
5200
- context.emulator.slot,
4975
+
5201
4976
  govUtxo.utxo,
5202
4977
  [],
5203
4978
  );
@@ -5245,7 +5020,6 @@ describe('Gov', () => {
5245
5020
  null,
5246
5021
  sysParams,
5247
5022
  context.lucid,
5248
- context.emulator.slot,
5249
5023
  ),
5250
5024
  context.lucid,
5251
5025
  context.emulator,
@@ -5255,11 +5029,7 @@ describe('Gov', () => {
5255
5029
  test<MyContext>('Execute upgrade protocol proposal with withdrawal', async (context: MyContext) => {
5256
5030
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
5257
5031
 
5258
- const [sysParams, _] = await init(
5259
- context.lucid,
5260
- [iusdInitialAssetCfg()],
5261
- context.emulator.slot,
5262
- );
5032
+ const [sysParams, _] = await init(context.lucid, [iusdInitialAssetCfg()]);
5263
5033
 
5264
5034
  const withdrawalIndyAmt = 1_000n;
5265
5035
  const treasuryWithdrawalUtxo = await createIndyUtxoAtTreasury(
@@ -5309,7 +5079,6 @@ describe('Gov', () => {
5309
5079
  },
5310
5080
  sysParams,
5311
5081
  context.lucid,
5312
- context.emulator.slot,
5313
5082
  govUtxo.utxo,
5314
5083
  [],
5315
5084
  );
@@ -5361,7 +5130,6 @@ describe('Gov', () => {
5361
5130
  null,
5362
5131
  sysParams,
5363
5132
  context.lucid,
5364
- context.emulator.slot,
5365
5133
  ),
5366
5134
  context.lucid,
5367
5135
  context.emulator,