@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
@@ -132,11 +132,9 @@ describe('ROB', () => {
132
132
  test<MyContext>('ROB buy orders redeem with CDP deposit and mint (ADA case)', async (context: MyContext) => {
133
133
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
134
134
 
135
- const [sysParams, [iusdAssetInfo]] = await init(
136
- context.lucid,
137
- [iusdInitialAssetCfg(0n)],
138
- context.emulator.slot,
139
- );
135
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
136
+ iusdInitialAssetCfg(0n),
137
+ ]);
140
138
 
141
139
  const robs_count = 8; // Adjusted for Pyth updates
142
140
 
@@ -205,7 +203,7 @@ describe('ROB', () => {
205
203
  orefs.interestOracleUtxo,
206
204
  orefs.treasuryUtxo,
207
205
  orefs.interestCollectorUtxo,
208
- context.emulator.slot,
206
+
209
207
  context.lucid,
210
208
  sysParams,
211
209
  ),
@@ -217,16 +215,12 @@ describe('ROB', () => {
217
215
  test<MyContext>('ROB buy orders redeem with CDP deposit and mint (non ADA case)', async (context: MyContext) => {
218
216
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
219
217
 
220
- const [sysParams, [iusdAssetInfo]] = await init(
221
- context.lucid,
222
- [
223
- {
224
- ...iusdInitialAssetCfg(),
225
- collateralAssets: [mkBaseCollateralAsset(collateralAssetA, 0n)],
226
- },
227
- ],
228
- context.emulator.slot,
229
- );
218
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
219
+ {
220
+ ...iusdInitialAssetCfg(),
221
+ collateralAssets: [mkBaseCollateralAsset(collateralAssetA, 0n)],
222
+ },
223
+ ]);
230
224
 
231
225
  const robs_count = 7; // Adjusted for Pyth updates
232
226
 
@@ -315,7 +309,7 @@ describe('ROB', () => {
315
309
  orefs.interestOracleUtxo,
316
310
  orefs.treasuryUtxo,
317
311
  orefs.interestCollectorUtxo,
318
- context.emulator.slot,
312
+
319
313
  context.lucid,
320
314
  sysParams,
321
315
  ),
@@ -334,11 +328,9 @@ describe('ROB', () => {
334
328
  test<MyContext>('ROB sell orders redeem with CDP deposit and burn (ADA case)', async (context: MyContext) => {
335
329
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
336
330
 
337
- const [sysParams, [iusdAssetInfo]] = await init(
338
- context.lucid,
339
- [iusdInitialAssetCfg(0n)],
340
- context.emulator.slot,
341
- );
331
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
332
+ iusdInitialAssetCfg(0n),
333
+ ]);
342
334
 
343
335
  const robs_count = 8;
344
336
  const ROB_DEPOSIT = 20_000_000n;
@@ -425,7 +417,7 @@ describe('ROB', () => {
425
417
  orefs.interestOracleUtxo,
426
418
  orefs.treasuryUtxo,
427
419
  orefs.interestCollectorUtxo,
428
- context.emulator.slot,
420
+
429
421
  context.lucid,
430
422
  sysParams,
431
423
  ),
@@ -443,16 +435,12 @@ describe('ROB', () => {
443
435
  test<MyContext>('ROB sell orders redeem with CDP withdraw and burn (non ADA case)', async (context: MyContext) => {
444
436
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
445
437
 
446
- const [sysParams, [iusdAssetInfo]] = await init(
447
- context.lucid,
448
- [
449
- {
450
- ...iusdInitialAssetCfg(),
451
- collateralAssets: [mkBaseCollateralAsset(collateralAssetA, 0n)],
452
- },
453
- ],
454
- context.emulator.slot,
455
- );
438
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
439
+ {
440
+ ...iusdInitialAssetCfg(),
441
+ collateralAssets: [mkBaseCollateralAsset(collateralAssetA, 0n)],
442
+ },
443
+ ]);
456
444
 
457
445
  const robs_count = 7; // TODO: Verify against Pyth feeds
458
446
  const ROB_DEPOSIT = 20_000_000n;
@@ -550,7 +538,7 @@ describe('ROB', () => {
550
538
  orefs.interestOracleUtxo,
551
539
  orefs.treasuryUtxo,
552
540
  orefs.interestCollectorUtxo,
553
- context.emulator.slot,
541
+
554
542
  context.lucid,
555
543
  sysParams,
556
544
  ),
@@ -577,11 +565,9 @@ describe('ROB', () => {
577
565
  test<MyContext>('ROB sell orders redeem with CDP close (ADA case)', async (context: MyContext) => {
578
566
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
579
567
 
580
- const [sysParams, [iusdAssetInfo]] = await init(
581
- context.lucid,
582
- [iusdInitialAssetCfg(0n)],
583
- context.emulator.slot,
584
- );
568
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
569
+ iusdInitialAssetCfg(0n),
570
+ ]);
585
571
 
586
572
  const robs_count = 5;
587
573
  const ROB_DEPOSIT = 20_000_000n;
@@ -701,7 +687,6 @@ describe('ROB', () => {
701
687
  orefs.interestCollectorUtxo,
702
688
  sysParams,
703
689
  context.lucid,
704
- context.emulator.slot,
705
690
  ),
706
691
  context.lucid,
707
692
  context.emulator,
@@ -711,16 +696,12 @@ describe('ROB', () => {
711
696
  test<MyContext>('ROB sell orders redeem with CDP close (non ADA case)', async (context: MyContext) => {
712
697
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
713
698
 
714
- const [sysParams, [iusdAssetInfo]] = await init(
715
- context.lucid,
716
- [
717
- {
718
- ...iusdInitialAssetCfg(),
719
- collateralAssets: [mkBaseCollateralAsset(collateralAssetA, 0n)],
720
- },
721
- ],
722
- context.emulator.slot,
723
- );
699
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
700
+ {
701
+ ...iusdInitialAssetCfg(),
702
+ collateralAssets: [mkBaseCollateralAsset(collateralAssetA, 0n)],
703
+ },
704
+ ]);
724
705
 
725
706
  const robs_count = 4;
726
707
  const ROB_DEPOSIT = 20_000_000n;
@@ -840,7 +821,6 @@ describe('ROB', () => {
840
821
  orefs.interestCollectorUtxo,
841
822
  sysParams,
842
823
  context.lucid,
843
- context.emulator.slot,
844
824
  ),
845
825
  context.lucid,
846
826
  context.emulator,
@@ -852,11 +832,9 @@ describe('ROB', () => {
852
832
  test<MyContext>('ROB buy orders redeem with CDP create (ADA case)', async (context: MyContext) => {
853
833
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
854
834
 
855
- const [sysParams, [iusdAssetInfo]] = await init(
856
- context.lucid,
857
- [iusdInitialAssetCfg(0n)],
858
- context.emulator.slot,
859
- );
835
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
836
+ iusdInitialAssetCfg(0n),
837
+ ]);
860
838
 
861
839
  const robs_count = 4;
862
840
 
@@ -920,7 +898,6 @@ describe('ROB', () => {
920
898
  orefs.interestOracleUtxo,
921
899
  orefs.treasuryUtxo,
922
900
  context.lucid,
923
- context.emulator.slot,
924
901
  ),
925
902
  context.lucid,
926
903
  context.emulator,
@@ -958,16 +935,12 @@ describe('ROB', () => {
958
935
  test<MyContext>('ROB buy orders redeem with CDP create (non ADA case)', async (context: MyContext) => {
959
936
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
960
937
 
961
- const [sysParams, [iusdAssetInfo]] = await init(
962
- context.lucid,
963
- [
964
- {
965
- ...iusdInitialAssetCfg(),
966
- collateralAssets: [mkBaseCollateralAsset(collateralAssetA, 0n)],
967
- },
968
- ],
969
- context.emulator.slot,
970
- );
938
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
939
+ {
940
+ ...iusdInitialAssetCfg(),
941
+ collateralAssets: [mkBaseCollateralAsset(collateralAssetA, 0n)],
942
+ },
943
+ ]);
971
944
 
972
945
  const robs_count = 3;
973
946
 
@@ -1036,7 +1009,6 @@ describe('ROB', () => {
1036
1009
  orefs.interestOracleUtxo,
1037
1010
  orefs.treasuryUtxo,
1038
1011
  context.lucid,
1039
- context.emulator.slot,
1040
1012
  ),
1041
1013
  context.lucid,
1042
1014
  context.emulator,
@@ -1093,11 +1065,9 @@ describe('ROB', () => {
1093
1065
  test<MyContext>('adjust order type BUY positive and negative', async (context: MyContext) => {
1094
1066
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1095
1067
 
1096
- const [sysParams, [iusdAssetInfo]] = await init(
1097
- context.lucid,
1098
- [iusdInitialAssetCfg()],
1099
- context.emulator.slot,
1100
- );
1068
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1069
+ iusdInitialAssetCfg(),
1070
+ ]);
1101
1071
 
1102
1072
  const [ownPkh, _] = await addrDetails(context.lucid);
1103
1073
 
@@ -1209,11 +1179,9 @@ describe('ROB', () => {
1209
1179
  test<MyContext>('adjust order type SELL positive and negative', async (context: MyContext) => {
1210
1180
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1211
1181
 
1212
- const [sysParams, [iusdAssetInfo]] = await init(
1213
- context.lucid,
1214
- [iusdInitialAssetCfg()],
1215
- context.emulator.slot,
1216
- );
1182
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1183
+ iusdInitialAssetCfg(),
1184
+ ]);
1217
1185
 
1218
1186
  const [ownPkh, _] = await addrDetails(context.lucid);
1219
1187
 
@@ -1344,11 +1312,9 @@ describe('ROB', () => {
1344
1312
  test<MyContext>('claim from BUY order type after a redemption', async (context: MyContext) => {
1345
1313
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1346
1314
 
1347
- const [sysParams, [iusdAssetInfo]] = await init(
1348
- context.lucid,
1349
- [iusdInitialAssetCfg()],
1350
- context.emulator.slot,
1351
- );
1315
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1316
+ iusdInitialAssetCfg(),
1317
+ ]);
1352
1318
 
1353
1319
  const [ownPkh, _] = await addrDetails(context.lucid);
1354
1320
 
@@ -1414,7 +1380,6 @@ describe('ROB', () => {
1414
1380
  [[robUtxo, redemptionIAssetAmt]],
1415
1381
  iusdAssetInfo.iassetTokenNameAscii,
1416
1382
  adaAssetClass,
1417
- context.emulator.slot,
1418
1383
  ),
1419
1384
  );
1420
1385
 
@@ -1473,11 +1438,9 @@ describe('ROB', () => {
1473
1438
  test<MyContext>('claim from BUY order type after a redemption when price is NOT 1:1', async (context: MyContext) => {
1474
1439
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1475
1440
 
1476
- const [sysParams, [iusdAssetInfo]] = await init(
1477
- context.lucid,
1478
- [iusdInitialAssetCfg()],
1479
- context.emulator.slot,
1480
- );
1441
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1442
+ iusdInitialAssetCfg(),
1443
+ ]);
1481
1444
 
1482
1445
  const [ownPkh, _] = await addrDetails(context.lucid);
1483
1446
 
@@ -1549,7 +1512,6 @@ describe('ROB', () => {
1549
1512
  [[robUtxo, redemptionIAssetAmt]],
1550
1513
  iusdAssetInfo.iassetTokenNameAscii,
1551
1514
  adaAssetClass,
1552
- context.emulator.slot,
1553
1515
  ),
1554
1516
  );
1555
1517
 
@@ -1620,11 +1582,9 @@ describe('ROB', () => {
1620
1582
  test<MyContext>('claim from SELL order type after a redemption when price is NOT 1:1', async (context: MyContext) => {
1621
1583
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1622
1584
 
1623
- const [sysParams, [iusdAssetInfo]] = await init(
1624
- context.lucid,
1625
- [iusdInitialAssetCfg()],
1626
- context.emulator.slot,
1627
- );
1585
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1586
+ iusdInitialAssetCfg(),
1587
+ ]);
1628
1588
 
1629
1589
  const [ownPkh, _] = await addrDetails(context.lucid);
1630
1590
 
@@ -1700,7 +1660,6 @@ describe('ROB', () => {
1700
1660
  [[robUtxo, payoutCollateralAmt]],
1701
1661
  iusdAssetInfo.iassetTokenNameAscii,
1702
1662
  adaAssetClass,
1703
- context.emulator.slot,
1704
1663
  ),
1705
1664
  );
1706
1665
 
@@ -1759,11 +1718,9 @@ describe('ROB', () => {
1759
1718
  test<MyContext>('redemption of BUY order type when limit price not met fails', async (context: MyContext) => {
1760
1719
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1761
1720
 
1762
- const [sysParams, [iusdAssetInfo]] = await init(
1763
- context.lucid,
1764
- [iusdInitialAssetCfg()],
1765
- context.emulator.slot,
1766
- );
1721
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1722
+ iusdInitialAssetCfg(),
1723
+ ]);
1767
1724
 
1768
1725
  const [ownPkh, _] = await addrDetails(context.lucid);
1769
1726
 
@@ -1822,7 +1779,6 @@ describe('ROB', () => {
1822
1779
  [[robUtxo, 11_000_000n]],
1823
1780
  iusdAssetInfo.iassetTokenNameAscii,
1824
1781
  adaAssetClass,
1825
- context.emulator.slot,
1826
1782
  ),
1827
1783
  );
1828
1784
  });
@@ -1830,11 +1786,9 @@ describe('ROB', () => {
1830
1786
  test<MyContext>('claim ADA collateral from SELL order type after a redemption', async (context: MyContext) => {
1831
1787
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1832
1788
 
1833
- const [sysParams, [iusdAssetInfo]] = await init(
1834
- context.lucid,
1835
- [iusdInitialAssetCfg()],
1836
- context.emulator.slot,
1837
- );
1789
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1790
+ iusdInitialAssetCfg(),
1791
+ ]);
1838
1792
 
1839
1793
  const [ownPkh, _] = await addrDetails(context.lucid);
1840
1794
 
@@ -1889,7 +1843,6 @@ describe('ROB', () => {
1889
1843
  [[robUtxo, payoutCollateralAmt]],
1890
1844
  iusdAssetInfo.iassetTokenNameAscii,
1891
1845
  adaAssetClass,
1892
- context.emulator.slot,
1893
1846
  ),
1894
1847
  );
1895
1848
 
@@ -1940,11 +1893,9 @@ describe('ROB', () => {
1940
1893
  test<MyContext>('redemption of SELL order type when limit price not met fails', async (context: MyContext) => {
1941
1894
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
1942
1895
 
1943
- const [sysParams, [iusdAssetInfo]] = await init(
1944
- context.lucid,
1945
- [iusdInitialAssetCfg()],
1946
- context.emulator.slot,
1947
- );
1896
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1897
+ iusdInitialAssetCfg(),
1898
+ ]);
1948
1899
 
1949
1900
  const [ownPkh, _] = await addrDetails(context.lucid);
1950
1901
 
@@ -1992,7 +1943,6 @@ describe('ROB', () => {
1992
1943
  [[robUtxo, 11_000_000n]],
1993
1944
  iusdAssetInfo.iassetTokenNameAscii,
1994
1945
  adaAssetClass,
1995
- context.emulator.slot,
1996
1946
  ),
1997
1947
  );
1998
1948
  });
@@ -2000,19 +1950,15 @@ describe('ROB', () => {
2000
1950
  test<MyContext>('claim 2 collateral assets from SELL order type after 2 redemptions', async (context: MyContext) => {
2001
1951
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2002
1952
 
2003
- const [sysParams, [iusdAssetInfo]] = await init(
2004
- context.lucid,
2005
- [
2006
- {
2007
- ...iusdInitialAssetCfg(),
2008
- collateralAssets: [
2009
- mkBaseCollateralAsset(adaAssetClass, 0n),
2010
- mkBaseCollateralAsset(collateralAssetA, 0n),
2011
- ],
2012
- },
2013
- ],
2014
- context.emulator.slot,
2015
- );
1953
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
1954
+ {
1955
+ ...iusdInitialAssetCfg(),
1956
+ collateralAssets: [
1957
+ mkBaseCollateralAsset(adaAssetClass, 0n),
1958
+ mkBaseCollateralAsset(collateralAssetA, 0n),
1959
+ ],
1960
+ },
1961
+ ]);
2016
1962
 
2017
1963
  const [ownPkh, _] = await addrDetails(context.lucid);
2018
1964
 
@@ -2091,7 +2037,6 @@ describe('ROB', () => {
2091
2037
  ],
2092
2038
  iusdAssetInfo.iassetTokenNameAscii,
2093
2039
  adaAssetClass,
2094
- context.emulator.slot,
2095
2040
  ),
2096
2041
  );
2097
2042
 
@@ -2134,7 +2079,6 @@ describe('ROB', () => {
2134
2079
  ],
2135
2080
  iusdAssetInfo.iassetTokenNameAscii,
2136
2081
  collateralAssetA,
2137
- context.emulator.slot,
2138
2082
  ),
2139
2083
  );
2140
2084
 
@@ -2185,11 +2129,9 @@ describe('ROB', () => {
2185
2129
  test<MyContext>('claim using adjust after a redemption', async (context: MyContext) => {
2186
2130
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2187
2131
 
2188
- const [sysParams, [iusdAssetInfo]] = await init(
2189
- context.lucid,
2190
- [iusdInitialAssetCfg()],
2191
- context.emulator.slot,
2192
- );
2132
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2133
+ iusdInitialAssetCfg(),
2134
+ ]);
2193
2135
 
2194
2136
  const [ownPkh, _] = await addrDetails(context.lucid);
2195
2137
 
@@ -2250,7 +2192,6 @@ describe('ROB', () => {
2250
2192
  [[robUtxo, payoutIAssetAmt]],
2251
2193
  iusdAssetInfo.iassetTokenNameAscii,
2252
2194
  adaAssetClass,
2253
- context.emulator.slot,
2254
2195
  ),
2255
2196
  );
2256
2197
 
@@ -2316,11 +2257,9 @@ describe('ROB', () => {
2316
2257
  test<MyContext>('single redemption and cancel', async (context: MyContext) => {
2317
2258
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2318
2259
 
2319
- const [sysParams, [iusdAssetInfo]] = await init(
2320
- context.lucid,
2321
- [iusdInitialAssetCfg()],
2322
- context.emulator.slot,
2323
- );
2260
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2261
+ iusdInitialAssetCfg(),
2262
+ ]);
2324
2263
 
2325
2264
  const [ownPkh, _] = await addrDetails(context.lucid);
2326
2265
 
@@ -2381,7 +2320,6 @@ describe('ROB', () => {
2381
2320
  [[robUtxo, payoutIAssetAmt]],
2382
2321
  iusdAssetInfo.iassetTokenNameAscii,
2383
2322
  adaAssetClass,
2384
- context.emulator.slot,
2385
2323
  ),
2386
2324
  );
2387
2325
 
@@ -2406,11 +2344,9 @@ describe('ROB', () => {
2406
2344
  test<MyContext>('redeem, redeem again and cancel', async (context: MyContext) => {
2407
2345
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2408
2346
 
2409
- const [sysParams, [iusdAssetInfo]] = await init(
2410
- context.lucid,
2411
- [iusdInitialAssetCfg()],
2412
- context.emulator.slot,
2413
- );
2347
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2348
+ iusdInitialAssetCfg(),
2349
+ ]);
2414
2350
 
2415
2351
  const [ownPkh, _] = await addrDetails(context.lucid);
2416
2352
 
@@ -2471,7 +2407,6 @@ describe('ROB', () => {
2471
2407
  [[robUtxo, payoutIAssetAmt]],
2472
2408
  iusdAssetInfo.iassetTokenNameAscii,
2473
2409
  adaAssetClass,
2474
- context.emulator.slot,
2475
2410
  ),
2476
2411
  );
2477
2412
 
@@ -2495,7 +2430,6 @@ describe('ROB', () => {
2495
2430
  [[redeemedRob, payoutIAssetAmt]],
2496
2431
  iusdAssetInfo.iassetTokenNameAscii,
2497
2432
  adaAssetClass,
2498
- context.emulator.slot,
2499
2433
  ),
2500
2434
  );
2501
2435
 
@@ -2521,11 +2455,9 @@ describe('ROB', () => {
2521
2455
  test<MyContext>('multi redemption buy ROBs case (2 ROBs)', async (context: MyContext) => {
2522
2456
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2523
2457
 
2524
- const [sysParams, [iusdAssetInfo]] = await init(
2525
- context.lucid,
2526
- [iusdInitialAssetCfg()],
2527
- context.emulator.slot,
2528
- );
2458
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2459
+ iusdInitialAssetCfg(),
2460
+ ]);
2529
2461
 
2530
2462
  await runAndAwaitTx(
2531
2463
  context.lucid,
@@ -2601,7 +2533,6 @@ describe('ROB', () => {
2601
2533
  ],
2602
2534
  iusdAssetInfo.iassetTokenNameAscii,
2603
2535
  adaAssetClass,
2604
- context.emulator.slot,
2605
2536
  ),
2606
2537
  );
2607
2538
 
@@ -2670,11 +2601,9 @@ describe('ROB', () => {
2670
2601
  test<MyContext>('multi redemption sell ROBs case (2 ROBs)', async (context: MyContext) => {
2671
2602
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2672
2603
 
2673
- const [sysParams, [iusdAssetInfo]] = await init(
2674
- context.lucid,
2675
- [iusdInitialAssetCfg()],
2676
- context.emulator.slot,
2677
- );
2604
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2605
+ iusdInitialAssetCfg(),
2606
+ ]);
2678
2607
 
2679
2608
  const initialDeposit = 20_000_000n;
2680
2609
 
@@ -2772,7 +2701,6 @@ describe('ROB', () => {
2772
2701
  ],
2773
2702
  iusdAssetInfo.iassetTokenNameAscii,
2774
2703
  adaAssetClass,
2775
- context.emulator.slot,
2776
2704
  ),
2777
2705
  );
2778
2706
 
@@ -2842,11 +2770,9 @@ describe('ROB', () => {
2842
2770
  test<MyContext>('multi redemption BUY ROBs case (20 ROBs)', async (context: MyContext) => {
2843
2771
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2844
2772
 
2845
- const [sysParams, [iusdAssetInfo]] = await init(
2846
- context.lucid,
2847
- [iusdInitialAssetCfg()],
2848
- context.emulator.slot,
2849
- );
2773
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2774
+ iusdInitialAssetCfg(),
2775
+ ]);
2850
2776
 
2851
2777
  const initialDeposit = 20_000_000n;
2852
2778
 
@@ -2899,7 +2825,6 @@ describe('ROB', () => {
2899
2825
  allRobs.map((rob) => [rob, 1_000_000n]),
2900
2826
  iusdAssetInfo.iassetTokenNameAscii,
2901
2827
  adaAssetClass,
2902
- context.emulator.slot,
2903
2828
  ),
2904
2829
  context.lucid,
2905
2830
  context.emulator,
@@ -2909,11 +2834,9 @@ describe('ROB', () => {
2909
2834
  test<MyContext>('multi redemption SELL ROBs case single allowed collateral (18 ROBs)', async (context: MyContext) => {
2910
2835
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2911
2836
 
2912
- const [sysParams, [iusdAssetInfo]] = await init(
2913
- context.lucid,
2914
- [iusdInitialAssetCfg()],
2915
- context.emulator.slot,
2916
- );
2837
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2838
+ iusdInitialAssetCfg(),
2839
+ ]);
2917
2840
 
2918
2841
  const initialDeposit = 5_000_000n;
2919
2842
 
@@ -2965,7 +2888,6 @@ describe('ROB', () => {
2965
2888
  allRobs.map((rob) => [rob, 1_000_000n]),
2966
2889
  iusdAssetInfo.iassetTokenNameAscii,
2967
2890
  adaAssetClass,
2968
- context.emulator.slot,
2969
2891
  ),
2970
2892
  context.lucid,
2971
2893
  context.emulator,
@@ -2975,11 +2897,9 @@ describe('ROB', () => {
2975
2897
  test<MyContext>('Redeem buy order with expired oracle fails', async (context: MyContext) => {
2976
2898
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
2977
2899
 
2978
- const [sysParams, [iusdAssetInfo]] = await init(
2979
- context.lucid,
2980
- [iusdInitialAssetCfg()],
2981
- context.emulator.slot,
2982
- );
2900
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
2901
+ iusdInitialAssetCfg(),
2902
+ ]);
2983
2903
 
2984
2904
  const [ownPkh, _] = await addrDetails(context.lucid);
2985
2905
 
@@ -3069,7 +2989,7 @@ describe('ROB', () => {
3069
2989
  )
3070
2990
  ).utxo,
3071
2991
  context.lucid,
3072
- context.emulator.slot,
2992
+
3073
2993
  sysParams,
3074
2994
  ),
3075
2995
  );
@@ -3078,11 +2998,9 @@ describe('ROB', () => {
3078
2998
  test<MyContext>('Redeem sell order with expired oracle fails', async (context: MyContext) => {
3079
2999
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
3080
3000
 
3081
- const [sysParams, [iusdAssetInfo]] = await init(
3082
- context.lucid,
3083
- [iusdInitialAssetCfg()],
3084
- context.emulator.slot,
3085
- );
3001
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3002
+ iusdInitialAssetCfg(),
3003
+ ]);
3086
3004
 
3087
3005
  const [ownPkh, _] = await addrDetails(context.lucid);
3088
3006
 
@@ -3171,7 +3089,7 @@ describe('ROB', () => {
3171
3089
  )
3172
3090
  ).utxo,
3173
3091
  context.lucid,
3174
- context.emulator.slot,
3092
+
3175
3093
  sysParams,
3176
3094
  ),
3177
3095
  );
@@ -3180,11 +3098,9 @@ describe('ROB', () => {
3180
3098
  test<IndigoTestContext>('Redeem with delisted iAsset fails', async (context: IndigoTestContext) => {
3181
3099
  context.lucid.selectWallet.fromSeed(context.users.admin.seedPhrase);
3182
3100
 
3183
- const [sysParams, [iusdAssetInfo]] = await init(
3184
- context.lucid,
3185
- [iusdInitialAssetCfg()],
3186
- context.emulator.slot,
3187
- );
3101
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3102
+ iusdInitialAssetCfg(),
3103
+ ]);
3188
3104
 
3189
3105
  const [ownPkh, _] = await addrDetails(context.lucid);
3190
3106
 
@@ -3272,7 +3188,6 @@ describe('ROB', () => {
3272
3188
  null,
3273
3189
  sysParams,
3274
3190
  context.lucid,
3275
- context.emulator.slot,
3276
3191
  govUtxo.utxo,
3277
3192
  [],
3278
3193
  );
@@ -3307,7 +3222,7 @@ describe('ROB', () => {
3307
3222
  orefs.iasset.utxo,
3308
3223
  orefs.collateralAsset.utxo,
3309
3224
  context.lucid,
3310
- context.emulator.slot,
3225
+
3311
3226
  sysParams,
3312
3227
  ),
3313
3228
  );
@@ -3319,23 +3234,19 @@ describe('ROB', () => {
3319
3234
 
3320
3235
  const extraDecimals = 2n;
3321
3236
 
3322
- const [sysParams, [iusdAssetInfo]] = await init(
3323
- context.lucid,
3324
- [
3325
- {
3326
- ...iusdInitialAssetCfg(),
3327
- collateralAssets: [
3328
- mkBaseCollateralAsset(
3329
- collateralAssetA,
3330
- 0n,
3331
- rationalFromInt(1n),
3332
- extraDecimals,
3333
- ),
3334
- ],
3335
- },
3336
- ],
3337
- context.emulator.slot,
3338
- );
3237
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3238
+ {
3239
+ ...iusdInitialAssetCfg(),
3240
+ collateralAssets: [
3241
+ mkBaseCollateralAsset(
3242
+ collateralAssetA,
3243
+ 0n,
3244
+ rationalFromInt(1n),
3245
+ extraDecimals,
3246
+ ),
3247
+ ],
3248
+ },
3249
+ ]);
3339
3250
 
3340
3251
  const [ownPkh, _] = await addrDetails(context.lucid);
3341
3252
 
@@ -3398,7 +3309,6 @@ describe('ROB', () => {
3398
3309
  [[robUtxo, payoutIAssetAmt]],
3399
3310
  iusdAssetInfo.iassetTokenNameAscii,
3400
3311
  collateralAssetA,
3401
- context.emulator.slot,
3402
3312
  ),
3403
3313
  );
3404
3314
 
@@ -3435,23 +3345,19 @@ describe('ROB', () => {
3435
3345
 
3436
3346
  const extraDecimals = -2n;
3437
3347
 
3438
- const [sysParams, [iusdAssetInfo]] = await init(
3439
- context.lucid,
3440
- [
3441
- {
3442
- ...iusdInitialAssetCfg(),
3443
- collateralAssets: [
3444
- mkBaseCollateralAsset(
3445
- collateralAssetA,
3446
- 0n,
3447
- rationalFromInt(1n),
3448
- extraDecimals,
3449
- ),
3450
- ],
3451
- },
3452
- ],
3453
- context.emulator.slot,
3454
- );
3348
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3349
+ {
3350
+ ...iusdInitialAssetCfg(),
3351
+ collateralAssets: [
3352
+ mkBaseCollateralAsset(
3353
+ collateralAssetA,
3354
+ 0n,
3355
+ rationalFromInt(1n),
3356
+ extraDecimals,
3357
+ ),
3358
+ ],
3359
+ },
3360
+ ]);
3455
3361
 
3456
3362
  const [ownPkh, _] = await addrDetails(context.lucid);
3457
3363
 
@@ -3514,7 +3420,6 @@ describe('ROB', () => {
3514
3420
  [[robUtxo, payoutIAssetAmt]],
3515
3421
  iusdAssetInfo.iassetTokenNameAscii,
3516
3422
  collateralAssetA,
3517
- context.emulator.slot,
3518
3423
  ),
3519
3424
  );
3520
3425
 
@@ -3551,23 +3456,19 @@ describe('ROB', () => {
3551
3456
 
3552
3457
  const extraDecimals = 2n;
3553
3458
 
3554
- const [sysParams, [iusdAssetInfo]] = await init(
3555
- context.lucid,
3556
- [
3557
- {
3558
- ...iusdInitialAssetCfg(),
3559
- collateralAssets: [
3560
- mkBaseCollateralAsset(
3561
- collateralAssetA,
3562
- 0n,
3563
- rationalFromInt(1n),
3564
- extraDecimals,
3565
- ),
3566
- ],
3567
- },
3568
- ],
3569
- context.emulator.slot,
3570
- );
3459
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3460
+ {
3461
+ ...iusdInitialAssetCfg(),
3462
+ collateralAssets: [
3463
+ mkBaseCollateralAsset(
3464
+ collateralAssetA,
3465
+ 0n,
3466
+ rationalFromInt(1n),
3467
+ extraDecimals,
3468
+ ),
3469
+ ],
3470
+ },
3471
+ ]);
3571
3472
 
3572
3473
  const [ownPkh, _] = await addrDetails(context.lucid);
3573
3474
 
@@ -3631,7 +3532,6 @@ describe('ROB', () => {
3631
3532
  [[robUtxo, payoutCollateralAmt]],
3632
3533
  iusdAssetInfo.iassetTokenNameAscii,
3633
3534
  collateralAssetA,
3634
- context.emulator.slot,
3635
3535
  ),
3636
3536
  );
3637
3537
 
@@ -3668,23 +3568,19 @@ describe('ROB', () => {
3668
3568
 
3669
3569
  const extraDecimals = -2n;
3670
3570
 
3671
- const [sysParams, [iusdAssetInfo]] = await init(
3672
- context.lucid,
3673
- [
3674
- {
3675
- ...iusdInitialAssetCfg(),
3676
- collateralAssets: [
3677
- mkBaseCollateralAsset(
3678
- collateralAssetA,
3679
- 0n,
3680
- rationalFromInt(1n),
3681
- extraDecimals,
3682
- ),
3683
- ],
3684
- },
3685
- ],
3686
- context.emulator.slot,
3687
- );
3571
+ const [sysParams, [iusdAssetInfo]] = await init(context.lucid, [
3572
+ {
3573
+ ...iusdInitialAssetCfg(),
3574
+ collateralAssets: [
3575
+ mkBaseCollateralAsset(
3576
+ collateralAssetA,
3577
+ 0n,
3578
+ rationalFromInt(1n),
3579
+ extraDecimals,
3580
+ ),
3581
+ ],
3582
+ },
3583
+ ]);
3688
3584
 
3689
3585
  const [ownPkh, _] = await addrDetails(context.lucid);
3690
3586
 
@@ -3748,7 +3644,6 @@ describe('ROB', () => {
3748
3644
  [[robUtxo, payoutCollateralAmt]],
3749
3645
  iusdAssetInfo.iassetTokenNameAscii,
3750
3646
  collateralAssetA,
3751
- context.emulator.slot,
3752
3647
  ),
3753
3648
  );
3754
3649