@indigo-labs/indigo-sdk 0.1.8 → 0.1.10

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.
@@ -8,6 +8,7 @@ import {
8
8
  fromText,
9
9
  LucidEvolution,
10
10
  OutRef,
11
+ slotToUnixTime,
11
12
  SpendingValidator,
12
13
  TxBuilder,
13
14
  UTxO,
@@ -41,6 +42,7 @@ import {
41
42
  calculateAccruedInterest,
42
43
  calculateUnitaryInterestSinceOracleLastUpdated,
43
44
  } from '../helpers/interest-oracle';
45
+ import { oracleExpirationAwareValidity } from '../helpers/price-oracle-helpers';
44
46
 
45
47
  export class CDPContract {
46
48
  static async openPosition(
@@ -49,13 +51,16 @@ export class CDPContract {
49
51
  mintedAmount: bigint,
50
52
  params: SystemParams,
51
53
  lucid: LucidEvolution,
54
+ currentSlot: number,
52
55
  assetRef?: OutRef,
53
56
  priceOracleRef?: OutRef,
54
57
  interestOracleRef?: OutRef,
55
58
  cdpCreatorRef?: OutRef,
56
59
  collectorRef?: OutRef,
57
- now: number = Date.now(),
58
60
  ): Promise<TxBuilder> {
61
+ const network = lucid.config().network;
62
+ const currentTime = BigInt(slotToUnixTime(network, currentSlot));
63
+
59
64
  const [pkh, skh] = await addrDetails(lucid);
60
65
  const assetOut: IAssetOutput = await (assetRef
61
66
  ? IAssetHelpers.findIAssetByRef(assetRef, lucid)
@@ -93,7 +98,7 @@ export class CDPContract {
93
98
  cdpCreatorRef
94
99
  ? await lucid.utxosByOutRef([cdpCreatorRef])
95
100
  : await lucid.utxosAtWithUnit(
96
- credentialToAddress(lucid.config().network, {
101
+ credentialToAddress(network, {
97
102
  type: 'Script',
98
103
  hash: params.validatorHashes.cdpCreatorHash,
99
104
  }),
@@ -107,7 +112,7 @@ export class CDPContract {
107
112
  cdpOwner: pkh.hash,
108
113
  minted: mintedAmount,
109
114
  collateral: collateralAmount,
110
- currentTime: BigInt(now),
115
+ currentTime: currentTime,
111
116
  },
112
117
  });
113
118
 
@@ -127,7 +132,7 @@ export class CDPContract {
127
132
  cdpValue[cdpToken] = 1n;
128
133
  const newSnapshot =
129
134
  calculateUnitaryInterestSinceOracleLastUpdated(
130
- BigInt(now),
135
+ currentTime,
131
136
  interestOracleDatum,
132
137
  ) + interestOracleDatum.unitaryInterest;
133
138
  const cdpDatum: CDPContent = {
@@ -136,7 +141,7 @@ export class CDPContract {
136
141
  mintedAmt: mintedAmount,
137
142
  cdpFees: {
138
143
  ActiveCDPInterestTracking: {
139
- lastSettled: BigInt(now),
144
+ lastSettled: currentTime,
140
145
  unitaryInterestSnapshot: newSnapshot,
141
146
  },
142
147
  },
@@ -163,14 +168,12 @@ export class CDPContract {
163
168
  (mintedAmount * oracleDatum.price.getOnChainInt) / 1_000_000n,
164
169
  );
165
170
 
166
- // Oracle timestamp - 20s (length of a slot)
167
- const cappedValidateTo = oracleDatum.expiration - 20_001n;
168
- const timeValidFrom = now - 1_000;
169
- const timeValidTo_ = now + Number(params.cdpCreatorParams.biasTime) - 1_000;
170
- const timeValidTo =
171
- cappedValidateTo <= timeValidFrom
172
- ? timeValidTo_
173
- : Math.min(timeValidTo_, Number(cappedValidateTo));
171
+ const txValidity = oracleExpirationAwareValidity(
172
+ currentSlot,
173
+ Number(params.cdpCreatorParams.biasTime),
174
+ Number(oracleDatum.expiration),
175
+ network,
176
+ );
174
177
 
175
178
  const tx = lucid
176
179
  .newTx()
@@ -192,8 +195,8 @@ export class CDPContract {
192
195
  .mintAssets(iassetTokenMintValue, Data.to(new Constr(0, [])))
193
196
  .readFrom([iAssetTokenScriptRefUtxo])
194
197
  .addSignerKey(pkh.hash)
195
- .validFrom(Number(now - 100))
196
- .validTo(Number(timeValidTo));
198
+ .validFrom(txValidity.validFrom)
199
+ .validTo(txValidity.validTo);
197
200
 
198
201
  if (debtMintingFee > 0) {
199
202
  await CollectorContract.feeTx(
@@ -212,6 +215,7 @@ export class CDPContract {
212
215
  amount: bigint,
213
216
  params: SystemParams,
214
217
  lucid: LucidEvolution,
218
+ currentSlot: number,
215
219
  assetRef?: OutRef,
216
220
  priceOracleRef?: OutRef,
217
221
  interestOracleRef?: OutRef,
@@ -225,6 +229,7 @@ export class CDPContract {
225
229
  0n,
226
230
  params,
227
231
  lucid,
232
+ currentSlot,
228
233
  assetRef,
229
234
  priceOracleRef,
230
235
  interestOracleRef,
@@ -239,6 +244,7 @@ export class CDPContract {
239
244
  amount: bigint,
240
245
  params: SystemParams,
241
246
  lucid: LucidEvolution,
247
+ currentSlot: number,
242
248
  assetRef?: OutRef,
243
249
  priceOracleRef?: OutRef,
244
250
  interestOracleRef?: OutRef,
@@ -252,6 +258,7 @@ export class CDPContract {
252
258
  0n,
253
259
  params,
254
260
  lucid,
261
+ currentSlot,
255
262
  assetRef,
256
263
  priceOracleRef,
257
264
  interestOracleRef,
@@ -266,6 +273,7 @@ export class CDPContract {
266
273
  amount: bigint,
267
274
  params: SystemParams,
268
275
  lucid: LucidEvolution,
276
+ currentSlot: number,
269
277
  assetRef?: OutRef,
270
278
  priceOracleRef?: OutRef,
271
279
  interestOracleRef?: OutRef,
@@ -279,6 +287,7 @@ export class CDPContract {
279
287
  amount,
280
288
  params,
281
289
  lucid,
290
+ currentSlot,
282
291
  assetRef,
283
292
  priceOracleRef,
284
293
  interestOracleRef,
@@ -293,6 +302,7 @@ export class CDPContract {
293
302
  amount: bigint,
294
303
  params: SystemParams,
295
304
  lucid: LucidEvolution,
305
+ currentSlot: number,
296
306
  assetRef?: OutRef,
297
307
  priceOracleRef?: OutRef,
298
308
  interestOracleRef?: OutRef,
@@ -306,6 +316,7 @@ export class CDPContract {
306
316
  -amount,
307
317
  params,
308
318
  lucid,
319
+ currentSlot,
309
320
  assetRef,
310
321
  priceOracleRef,
311
322
  interestOracleRef,
@@ -321,6 +332,7 @@ export class CDPContract {
321
332
  mintAmount: bigint,
322
333
  params: SystemParams,
323
334
  lucid: LucidEvolution,
335
+ currentSlot: number,
324
336
  assetRef?: OutRef,
325
337
  priceOracleRef?: OutRef,
326
338
  interestOracleRef?: OutRef,
@@ -328,9 +340,10 @@ export class CDPContract {
328
340
  govRef?: OutRef,
329
341
  treasuryRef?: OutRef,
330
342
  ): Promise<TxBuilder> {
343
+ const network = lucid.config().network;
331
344
  // Find Pkh, Skh
332
345
  const [pkh, _] = await addrDetails(lucid);
333
- const now = Date.now();
346
+ const currentTime = BigInt(slotToUnixTime(network, currentSlot));
334
347
 
335
348
  // Find Outputs: iAsset Output, CDP Output, Gov Output
336
349
  const cdp = (await lucid.utxosByOutRef([cdpRef]))[0];
@@ -372,7 +385,7 @@ export class CDPContract {
372
385
  .newTx()
373
386
  .collectFrom(
374
387
  [cdp],
375
- Data.to(new Constr(0, [BigInt(now), mintAmount, collateralAmount])),
388
+ Data.to(new Constr(0, [currentTime, mintAmount, collateralAmount])),
376
389
  )
377
390
  .readFrom([iAsset.utxo, gov, cdpScriptRefUtxo])
378
391
  .addSignerKey(pkh.hash);
@@ -384,7 +397,7 @@ export class CDPContract {
384
397
 
385
398
  const newSnapshot =
386
399
  calculateUnitaryInterestSinceOracleLastUpdated(
387
- BigInt(now),
400
+ currentTime,
388
401
  interestOracleDatum,
389
402
  ) + interestOracleDatum.unitaryInterest;
390
403
 
@@ -393,7 +406,7 @@ export class CDPContract {
393
406
  mintedAmt: cdpD.mintedAmt + mintAmount,
394
407
  cdpFees: {
395
408
  ActiveCDPInterestTracking: {
396
- lastSettled: BigInt(now),
409
+ lastSettled: currentTime,
397
410
  unitaryInterestSnapshot: newSnapshot,
398
411
  },
399
412
  },
@@ -424,19 +437,15 @@ export class CDPContract {
424
437
  const od = parsePriceOracleDatum(oracleRefInput.datum);
425
438
  if (!od) return Promise.reject(new Error('Invalid oracle input'));
426
439
 
427
- // TODO: Sanity check: oacle expiration
428
- // Oracle timestamp - 20s (length of a slot)
429
- // Oracle timestamp - 20s (length of a slot)
430
- const cappedValidateTo = od.expiration - 20_001n;
431
- const timeValidFrom = now - 1_000;
432
- const timeValidTo_ = now + Number(params.cdpCreatorParams.biasTime) - 1_000;
433
- const timeValidTo =
434
- cappedValidateTo <= timeValidFrom
435
- ? timeValidTo_
436
- : Math.min(timeValidTo_, Number(cappedValidateTo));
440
+ const txValidity = oracleExpirationAwareValidity(
441
+ currentSlot,
442
+ Number(params.cdpCreatorParams.biasTime),
443
+ Number(od.expiration),
444
+ network,
445
+ );
437
446
  tx.readFrom([oracleRefInput])
438
- .validFrom(Number(timeValidFrom))
439
- .validTo(Number(timeValidTo));
447
+ .validFrom(txValidity.validFrom)
448
+ .validTo(txValidity.validTo);
440
449
 
441
450
  let fee = 0n;
442
451
  if (collateralAmount < 0) {
@@ -456,7 +465,7 @@ export class CDPContract {
456
465
  // Interest payment
457
466
 
458
467
  const interestPaymentAsset = calculateAccruedInterest(
459
- BigInt(now),
468
+ currentTime,
460
469
  cdpD.cdpFees.ActiveCDPInterestTracking.unitaryInterestSnapshot,
461
470
  cdpD.mintedAmt,
462
471
  cdpD.cdpFees.ActiveCDPInterestTracking.lastSettled,
@@ -510,6 +519,7 @@ export class CDPContract {
510
519
  cdpRef: OutRef,
511
520
  params: SystemParams,
512
521
  lucid: LucidEvolution,
522
+ currentSlot: number,
513
523
  assetRef?: OutRef,
514
524
  priceOracleRef?: OutRef,
515
525
  interestOracleRef?: OutRef,
@@ -517,9 +527,10 @@ export class CDPContract {
517
527
  govRef?: OutRef,
518
528
  treasuryRef?: OutRef,
519
529
  ): Promise<TxBuilder> {
530
+ const network = lucid.config().network;
520
531
  // Find Pkh, Skh
521
532
  const [pkh, _] = await addrDetails(lucid);
522
- const now = Date.now();
533
+ const currentTime = BigInt(slotToUnixTime(network, currentSlot));
523
534
 
524
535
  // Find Outputs: iAsset Output, CDP Output, Gov Output
525
536
  const cdp = (await lucid.utxosByOutRef([cdpRef]))[0];
@@ -557,7 +568,7 @@ export class CDPContract {
557
568
 
558
569
  const tx = lucid
559
570
  .newTx()
560
- .collectFrom([cdp], Data.to(new Constr(1, [BigInt(now)])))
571
+ .collectFrom([cdp], Data.to(new Constr(1, [currentTime])))
561
572
  .readFrom([iAsset.utxo, gov, cdpScriptRefUtxo])
562
573
  .addSignerKey(pkh.hash);
563
574
  if (!cdp.datum) throw new Error('Unable to find CDP Datum');
@@ -580,25 +591,21 @@ export class CDPContract {
580
591
  return Promise.reject(new Error('Invalid oracle input'));
581
592
  const od = parsePriceOracleDatum(oracleRefInput.datum);
582
593
 
583
- // TODO: Sanity check: oacle expiration
584
- // Oracle timestamp - 20s (length of a slot)
585
- // Oracle timestamp - 20s (length of a slot)
586
- const cappedValidateTo = od.expiration - 20_001n;
587
- const timeValidFrom = now - 1_000;
588
- const timeValidTo_ = now + Number(params.cdpCreatorParams.biasTime) - 1_000;
589
- const timeValidTo =
590
- cappedValidateTo <= timeValidFrom
591
- ? timeValidTo_
592
- : Math.min(timeValidTo_, Number(cappedValidateTo));
594
+ const txValidity = oracleExpirationAwareValidity(
595
+ currentSlot,
596
+ Number(params.cdpCreatorParams.biasTime),
597
+ Number(od.expiration),
598
+ network,
599
+ );
593
600
  tx.readFrom([oracleRefInput])
594
- .validFrom(Number(timeValidFrom))
595
- .validTo(Number(timeValidTo));
601
+ .validFrom(txValidity.validFrom)
602
+ .validTo(txValidity.validTo);
596
603
 
597
604
  let fee = 0n;
598
605
 
599
606
  // Interest payment
600
607
  const interestPaymentAsset = calculateAccruedInterest(
601
- BigInt(now),
608
+ currentTime,
602
609
  cdpD.cdpFees.ActiveCDPInterestTracking.unitaryInterestSnapshot,
603
610
  cdpD.mintedAmt,
604
611
  cdpD.cdpFees.ActiveCDPInterestTracking.lastSettled,
@@ -7,6 +7,8 @@ import {
7
7
  OutRef,
8
8
  UTxO,
9
9
  addAssets,
10
+ unixTimeToSlot,
11
+ slotToUnixTime,
10
12
  } from '@lucid-evolution/lucid';
11
13
  import {
12
14
  addrDetails,
@@ -23,10 +25,7 @@ import {
23
25
  serialiseLrpDatum,
24
26
  serialiseLrpRedeemer,
25
27
  } from '../types/indigo/lrp';
26
- import {
27
- parsePriceOracleDatum,
28
- PriceOracleParams,
29
- } from '../types/indigo/price-oracle';
28
+ import { parsePriceOracleDatum } from '../types/indigo/price-oracle';
30
29
  import { ocdMul, OnChainDecimal } from '../types/on-chain-decimal';
31
30
  import { parseIAssetDatum } from '../types/indigo/cdp';
32
31
  import {
@@ -34,7 +33,6 @@ import {
34
33
  mkAssetsOf,
35
34
  mkLovelacesOf,
36
35
  } from '../helpers/value-helpers';
37
- import { oracleExpirationAwareValidity } from '../helpers/price-oracle-helpers';
38
36
  import { calculateFeeFromPercentage } from '../helpers/indigo-helpers';
39
37
  import { matchSingle } from '../helpers/helpers';
40
38
  import { AssetClass } from '../types/generic';
@@ -101,9 +99,7 @@ export async function redeemLrp(
101
99
  iassetOutRef: OutRef,
102
100
  lucid: LucidEvolution,
103
101
  lrpParams: LRPParams,
104
- priceOracleParams: PriceOracleParams,
105
102
  network: Network,
106
- currentSlot: number,
107
103
  ): Promise<TxBuilder> {
108
104
  const lrpScriptRefUtxo = matchSingle(
109
105
  await lucid.utxosByOutRef([lrpRefScriptOutRef]),
@@ -209,18 +205,15 @@ export async function redeemLrp(
209
205
  },
210
206
  )(redemptionLrps);
211
207
 
212
- const txValidity = oracleExpirationAwareValidity(
213
- currentSlot,
214
- Number(priceOracleParams.biasTime),
215
- Number(priceOracleDatum.expiration),
216
- network,
217
- );
218
-
219
208
  return (
220
209
  lucid
221
210
  .newTx()
222
- .validFrom(txValidity.validFrom)
223
- .validTo(txValidity.validTo)
211
+ .validTo(
212
+ slotToUnixTime(
213
+ network,
214
+ unixTimeToSlot(network, Number(priceOracleDatum.expiration)) - 1,
215
+ ),
216
+ )
224
217
  // Ref script
225
218
  .readFrom([lrpScriptRefUtxo])
226
219
  // Ref inputs
@@ -11,7 +11,7 @@ const lrpValidatorData = {
11
11
  type: 'PlutusV2' as ScriptType,
12
12
  description: 'Generated by Aiken',
13
13
  cborHex:
14
- '5917845917810100003232323232323232322223232323232322533300b323232533300e3008301137540022646464646464646464646464646464646464646464646464646464a666052604a0342646464646464646464646464a666074607a004264a66606c606060726ea80044c8c94ccc0f4c1000084c8c8c8c94ccc0f0c0e0c0fcdd50008991919299981f981d98211baa00113253330403302249110496e636f727265637420694173736574003371e6eb8c0acc110dd50049bae30253044375407c264a666082666444646604e921124861766520746f207573652072656465656d005333045301f3048375460906466600200203697bdb180103d87980000101a000222533304d002100113330030033050002323232533304b3375e606c609e6ea8c0d8c13cdd5181818279baa00300a1323232533304e304a001132533304f533304f00614a2266609e94528251153305149012343616e20757365206f6e6c7920612073696e676c652052656465656d20706572205478001613376066609e94530103d87a80004c0103d8798000374c6601600a0026eb4c154c148dd50018a99982718240008991919191919299982a299982a19982a19b8f375c60b6008024941288a51153330543330543375e004036941288a5113330543375e022002941288a9982b2492452656465656d417578207573657320696e636f727265637420617373657420737461747300161337606660a801698103d87a80004c0103d8798000374c6602001400a60b460b600460b200260b200260b060b00046eb4c158004c148dd50018a998282492d4578706563746564206f6e6c792052656465656d2072656465656d65727320666f72204c525020696e7075747300163050375400460880026604c606c609e6ea800c0644010dd59827001981198261baa304c002304f00214a2266608a9452825122323300100100322533304d00113304e337606ea000ccc125264c0103d87980004bd6f7b6300991919192999826181e299982619b8800700214c103d87980001533304c3371000400e2980103d87b800014c103d87a8000133052337606ea001ccc135264c103d87980000051533304c3370e00e004264a66609a609260a06ea80044cc14ccdd81ba80083304e32498c150c144dd5000a60103d8798000004100453304e49126436f6e74696e75696e67206f75747075747320646f75626c6520736174697366616374696f6e0016133052337606ea0008cc134005300103d87980003300600600332498c13c00cdd6982680118288011827800981618229baa004375c6058608a6ea8028c004c114dd50050999999981082000280100201f804180098229baa00a14a0460906092609260926092609260926092609260920022940c118c10cdd50008b1980e00780a981418209baa302230413754002608660806ea800458cc0600400b4c0580e0c94ccc0e8c0d8c0f4dd500089820981f1baa001132533303b32533303c3036303f3754002266e24dd6981098201baa002375a608660806ea800454cc0f924124496e636f7272656374207472616e73616374696f6e2076616c69646974792072616e676500163026303f37546040607e6ea802854cc0f52401174f7261636c652063616e27742062652065787069726564001613026303f37540026464004a666076606e607c6ea80044c8c8c8c94ccc110c11c0084c926303a00316375a608a002608a0046086002607e6ea800458c048c078c0f8dd5180f981f1baa325333040001153303d49012145787065637465642065786163746c79206f6e65206f7261636c6520696e707574001615333040304300113042001153303d49012145787065637465642065786163746c79206f6e65206f7261636c6520696e707574001633301300d3041303e37546082607c6ea8005300103d8798000301e303d375400464a666072606a60786ea80084c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c94ccc168c1740084c8c8c8c8c8c8c8c8c8c8c8c926325333061305d001132325333068306b002149858dd7183480098329baa00d15333061305b001153330663065375401a2930b0b18319baa00c305a00f30590103058011305701230560133055014305401530530163052017301e018325333056305200113232533305d3060002132498c14c00458c178004c168dd500d0a99982b182800089919299982e983000109924ca6660b060a860b66ea80044c8c94ccc17cc1880084c9263022001163060001305c37540022c2c60bc00260b46ea806858c160dd500c8b182d800982d80119299982c182b8008a9998299826982b0008a5115333053304f305600114a02c2c6ea8c164004c164008c15c004c15c008c154004c154008c14c004c14c008c144004c144008c13c004c13c008c134004c134008c12c004c12c008c124004c124008c11c004c11c008c114004c114008c10c004c10c008dd71820800981e9baa00216253330393035303c3754002264646464a666084608a0042930b1bae30430013043002375c6082002607a6ea80045858c0f8004c0e8dd50008b1806980c981c9baa301a303937540022c607600266601800c6030606e6ea80c9300103d879800037566072607460740046070002607060706070607060700046eb0c0d8004c0d8008dd6181a000981a0011bac3032001302e375403c6eb4c0c0c0b4dd50130a999814981180d099191919191919191919191919191919299981c981a981e1baa0011323232533303c3038303f375400226464a66607c607460826ea80044c8c94ccc114c1200084c94ccc104c0f4c110dd500089929998211981224810c57726f6e6720696173736574003371e0286eb8c09cc118dd50200a999821198122491e52656465656d207574786f2066726f6d2077726f6e672061646472657373003375e605a608c6ea8c0b4c118dd5181398231baa006302d30463754010266666660440820120020100800240222940528182418229baa001163301e00b01616375a608c00260846ea800458cc06004401cc10cc100dd50008b1980c0040079812981f1baa301f303e37540026080607a6ea800458cc0540140a8c04c0d4dd5981e981f181f181f181f181f181f181f0011bac303c001303c303c00237586074002606c6ea8098c0e0c0e4008c0dc004c0dc008dd7181a800981a801181980098198011bad3031001302d375404c264a66605460460362646601a92011754582069736e74207369676e6564206279206f776e657200330023758606460666066606660666066606660666066605e6ea807cdd7180b18179baa02930060281333232322232323232325333034303030373754002264a66606a605e60706ea80044c8c8c94ccc0f4c1000084c8c8c94ccc0ecc0dcc0f8dd500089980e99807998209ba937309201084d697373696e6720003304137526e60038cc104dd49b984901172075706772616465206d696e74696e6720706f6c696379004bd70249003301230103302400948900375c6084607e6ea800454cc0f4cc03ccc104dd49b98491084d697373696e6720003304137526e60038cc104dd49b9849010d20757067726164652070617468004bd70249001632533303b3035303e3754002298103d87a8000130233304137526eb8c0fcc8cdd81821800982198220009bac3042303f375400297ae0323300100137566040607e6ea800c894ccc1040045300103d87a800013232533303e3371e6eb8c1040080244c098cc110dd399822182080119822182100125eb812f5c0266008008002608a0046086002a666072606a60786ea80044c8c8c8c94ccc108c1140084c926323300100100222533304400114984c8cc00c00cc120008c8c8dd718228011bae30430013046001163756608600260860046eb4c104004c0f4dd50008b1808180e181e1baa301d303c37540022c607c00266601e00a01098103d8798000375c607860726ea800458c07cc0e0dd5180f981c1baa301930383754607660706ea800458cc040dd6181d0020129bab3039303a303a303a00237586070002607000260666ea808c88dcc991919980080080224410022253330370021001132333004004303b0035333033302f371a00426e600044cdc500119b8a00537300026e64dd7181c8011b98001300100122533303100114bd700998191817981980099801001181a000a49034c5250003015302e375405244646600200200644a66606400229404c94ccc0b8cdc79bae303500200414a2266006006002606a0024a666052604460586ea80044c0c0c0b4dd50008a99815a481134e6f7420616e20696e6c696e6520646174756d0016222323301500423002301130303754002a666054604c605a6ea800448c094ccc044dd5980818179baa001375c602c605e6ea800cdd7180818179baa00312300533301137566020605e6ea8004dd7180b18179baa003375c6020605e6ea800cdc4240004464a666050604860566ea80044c0bcc0b0dd50008a99815248117436f756c64206e6f742066696e642072656465656d6572001632323300100100322533302f00114c0103d87a80001323232533302d3375e00c60600062602a6606600297ae01330050050023030002303300230310013374a90011981680125eb8094ccc094c084c0a0dd5000899191919191919192999819181a80109924c60500062c6eb4c0cc004c0cc008c0c4004c0c4008dd7181780098178011bae302d001302937540022c44646600200200644a6660580022980103d87a80001323253330293375e6028605a6ea80080144c044cc0bc0092f5c02660080080026060004605c0026002002444a6660520042980103d87a800013232533302630220031300e3302c0024bd70099980280280099b8000348004c0b400cc0ac0088888888c8c8c94ccc0a8cc03124011e48617320746f2072656465656d206174206c6561737420746865206d696e00337126eb4c02cc0b8dd50050010a99981519806249124d617820707269636520657863656564656400337126eb4c054c0b8dd50029bad3015302e3754601c605c6ea801854ccc0a8cc0312411b52656465656d696e67206d6f7265207468616e20616c6c6f77656400337120046eb4c02cc0b8dd500309980624811757726f6e6720636f6e74696e75696e67206f75747075740033332222323300100133019005533302f302b30323754008264466ebcc070c0d4dd5180e181a9baa001002303630333754008264466ebcc070c0d4dd5000801181b18199baa00422533303500114a0264a66606264a66606466ebcc058c0d8dd5000803099299981c0008a5115333038303b001132323253330363371e6eb8c0f400d22100153330363371e00291010015333036303230393754980103d87a800015333036337129000001099b89002482026fb808528099b89480000085280a50375c6078607a0046eb4c0ecc0f0c0f0004dd6181d0008a503233001001323330010013756603260706ea800cc8cc004004020894ccc0ec00452f5bded8c02646607a66ec0dd49bae303a001374c64660020026eacc0f0008894ccc0f800452f5bded8c02646608066ec0dd49bae303d001375066e052000375a607c002660060066084004608000266006006607e004607a002444a6660760042002264666008008607e0066666604a0046eb8c0e8004dd5981d80091119299981d98140008a60103d87a80001302333041374c00297ae0323330010010030022225333042002100113233300400430460033333302d002375c60820026eb4c108004888c94ccc108c0f80045300103d87a80001302a33048375000297ae0337000040020546088004046607a00444a666072002297ae0132333222323300100100322533303f001100313233041374e660826ea4018cc104dd49bae303e0013304137506eb4c0fc0052f5c066006006608600460820026eb8c0e0004dd5981c80099801801981e801181d8008a50303800214a226600600600260700026606001097ae03374a900119818003a5eb80cdd2a400866060646460286606460660046606460660026606460666068002660646ea0cdc09bad300d3030375401000897ae03033001302e375400c97ae033330113333011330133756601e605c6ea8c03cc0b8dd5004a44100488100488100001375c601c605c6ea8028dd7180798171baa00600314a0294052819b803370266601e6eacc038c0b4dd5180718169baa00848810048810000153330293371200290000a400026eb4c050c0b4dd51808998179ba83370666e08dd6980a18169baa3300c30113302f375000297ae00034820225e8dd6980a18169baa30113302f375066e0920c8014820225e92f5c097ae0375a602660586ea8cc02cc040cc0b8dd4000a5eb8000ccdc09998069bab300c302b375400a6eb8c02cc0acdd50039bae300c302b375400666601a6eacc030c0acdd5180618159baa006375c601660566ea801cdd7180618159baa003230273028302830280012253330203330200014a094454cc0880084004400488c01ccc094dd419b83337046eb4c028c08cdd50011bad300a30233754002904044bd25eb808c090c094c0940048c08cc090004888c94ccc078c060c084dd50008a400026eb4c094c088dd500099299980f180c18109baa00114c103d87a8000132330010013756604c60466ea8008894ccc094004530103d87a8000132323253330233371e00e6eb8c09800c4c02ccc0a4dd4000a5eb804cc014014008dd698130011814801181380099198008008021129998120008a6103d87a8000132323253330223371e00e6eb8c09400c4c028cc0a0dd3000a5eb804cc014014008dd59812801181400118130009111299980e980c8008802099999805802001991900119198008008011129998128008a4c264a66604c002293099192999811980f98131baa3300f375c604c60540086eb8c0980084cc014014cc0a400800454cc0952401326b65797320696e206173736f63696174697665206c697374206172656e277420696e20617363656e64696e67206f726465720016302a0023028001302800133023337606ea4008dd4000a5eb7bdb180888c94ccc084c038004530103d87a80001300933027374c00297ae03333300f001005004222325333024302000114c103d87a80001300c3302a375000297ae0337000020040180126e95200022323300100100322533302000114bd6f7b630099191919299980f99b8f0070021003133025337606ea4008dd3000998030030019bab3022003375c60400046048004604400244646600200200644a66603e002297ae013232533301c300500213302200233004004001133004004001302300230210012301d001225333016337200040022980103d8798000153330163371e0040022980103d87a800014c103d87b80002533301900114a2294088888c8cc004004018894ccc0780044cc07ccdd81ba9006374c00a97adef6c60132323232533301d300d3300700a002133023337606ea4028dd30048028a99980e99b8f00a002132533301e301a3021375400226604866ec0dd4805981298111baa001004100433300800a009001133023337606ea4008dd3000998030030019bab3020003375c603c0046044004604000244444646600200200c44a66603a00226603c66ec0dd48031ba80054bd6f7b630099191919299980e18061980380500109981119bb037520146ea002401454ccc070cdc7805001099299980e980c98101baa001133023337606ea402cc090c084dd5000802080219980400500480089981119bb037520046ea0004cc01801800cdd6980f8019bae301d0023021002301f001375e98103d879800030123754018602a60246ea800458c050c054008c04c004c03cdd50008a4c26cac600200c464a666014600c00226464a66602260280042930b1bad3012001300e37540042a6660146008002264646464646464646464a666032603800426464649318088019808002299980a1808180b9baa007132323232533301d30200021324994ccc060c050c06cdd500189919299980f98110010a4c2c6eb8c080004c070dd50018b0b1bad301e001301e002301c0013018375400e2c2c60340026034004603000260300046eb8c058004c058008c050004c050008dd6980900098071baa0021533300a30030011533300f300e37540042930b0a99980519b874801800454ccc03cc038dd50010a4c2c2c60186ea8004dc3a40086e1d20022533300630023009375400226464a66601a60200042930b1bad300e001300a37540022c6e1d20005734ae6d5ce2ab9d5573caae7d5d02ba15745',
14
+ '5916f80100003232323232323232322223232323232322533300b323232533300e30083011375400226464646464646464646464646464646464646464646464646464a66605060480322646464646464646464646464a6660726078004264a66606a605e60706ea80044c8c94ccc0f0c0fc0084c8c8c8c94ccc0ecc0dcc0f8dd50008991919299981f181d18209baa001132533303f3302149110496e636f727265637420694173736574003371e6eb8c0a8c10cdd50049bae30243043375407a264a6660806664446464944c8ccc00400406d2f5bded8c0444a66609800420022666006006609e00464a66609066ebcc0ccc130dd5181998261baa302d304c37540020102646464a666096608e00226601000a6eb4c148c13cdd50018a999825982280089919191919192999828a99982899982899b8f375c60b0008020941288a51153330513330513375e004032941288a5113330513375e01e002941288a99829a4812452656465656d417578207573657320696e636f7272656374206173736574207374617473001613300e00b005305730580023056001305600130553055002375a60a6002609e6ea800c54cc1352412d4578706563746564206f6e6c792052656465656d2072656465656d65727320666f72204c525020696e707574730016304d3754004608200266046606660986ea800405c4008c13800888c8cc00400400c894ccc1300044cc134cdd81ba800333048499300103d87980004bd6f7b6300991919192999825981da99982599b8800700214c103d87980001533304b3371000400e2980103d87b800014c103d87a8000133051337606ea001ccc131264c103d87980000051533304b3370e00e004264a6660986090609e6ea80044cc148cdd81ba80083304d32498c14cc140dd5000a60103d8798000004100453304d49126436f6e74696e75696e67206f75747075747320646f75626c6520736174697366616374696f6e0016133051337606ea0008cc130005300103d87980003300600600332498c13800cdd6982600118280011827000981598221baa004375c605660886ea8028c004c110dd50050999999981001f80280100201f004180098221baa00a14a04608e6090609060906090609060906090609060900022940c114c108dd50008b1980d80780a981398201baa3021304037540026084607e6ea800458cc05c0400b0c0540dcc94ccc0e4c0d4c0f0dd500089820181e9baa001132533303a32533303b3035303e3754002266e24dd69810181f9baa002375a6084607e6ea800454cc0f524124496e636f7272656374207472616e73616374696f6e2076616c69646974792072616e676500163025303e3754603e607c6ea802854cc0f12401174f7261636c652063616e27742062652065787069726564001613025303e37540026464004a666074606c607a6ea80044c8c8c8c94ccc10cc1180084c926303900316375a608800260880046084002607c6ea800458c048c074c0f4dd5180f181e9baa32533303f001153303c49012145787065637465642065786163746c79206f6e65206f7261636c6520696e70757400161533303f304200113041001153303c49012145787065637465642065786163746c79206f6e65206f7261636c6520696e707574001633301300d3040303d37546080607a6ea8005300103d8798000301d303c375400464a666070606860766ea80084c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c94ccc164c1700084c8c8c8c8c8c8c8c8c8c8c8c926325333060305c001132325333067306a002149858dd7183400098321baa00d15333060305a001153330653064375401a2930b0b18311baa00c305900f30580103057011305601230550133054014305301530520163051017301e018325333055305100113232533305c305f002132498c14800458c174004c164dd500d0a99982a982780089919299982e182f80109924ca6660ae60a660b46ea80044c8c94ccc178c1840084c926302200116305f001305b37540022c2c60ba00260b26ea806858c15cdd500c8b182d000982d00119299982b982b0008a9998291826182a8008a5115333052304e305500114a02c2c6ea8c160004c160008c158004c158008c150004c150008c148004c148008c140004c140008c138004c138008c130004c130008c128004c128008c120004c120008c118004c118008c110004c110008c108004c108008dd71820000981e1baa00216253330383034303b3754002264646464a66608260880042930b1bae30420013042002375c608000260786ea80045858c0f4004c0e4dd50008b1806980c181c1baa3019303837540022c607400266601800c602e606c6ea80c5300103d87980003756607060726072004606e002606e606e606e606e606e0046eb0c0d4004c0d4008dd6181980098198011bac3031001302d375403a6eb4c0bcc0b0dd50128a999814181100c899191919191919191919191919191919299981c181a181d9baa0011323232533303b3037303e375400226464a66607a607260806ea80044c8c94ccc110c11c0084c94ccc100c0f0c10cdd5000899299982099811a4810c57726f6e6720696173736574003371e0286eb8c098c114dd501f8a99982099811a491e52656465656d207574786f2066726f6d2077726f6e672061646472657373003375e6058608a6ea8c0b0c114dd5181318229baa006302c304537540102666666604208001200201007e0240222940528182398221baa001163301d00b01616375a608a00260826ea800458cc05c04401cc108c0fcdd50008b1980b8040079812181e9baa301e303d3754002607e60786ea800458cc0500140a4c0480d0dd5981e181e981e981e981e981e981e981e8011bac303b001303b303b00237586072002606a6ea8094c0dcc0e0008c0d8004c0d8008dd7181a000981a001181900098190011bad3030001302c375404a264a66605260440342646601892011754582069736e74207369676e6564206279206f776e657200330023758606260646064606460646064606460646064605c6ea8078dd7180a98171baa02830050271333232322232323232325333033302f30363754002264a666068605c606e6ea80044c8c8c94ccc0f0c0fc0084c8c8c94ccc0e8c0d8c0f4dd500089980e19807998201ba937309201084d697373696e6720003304037526e60038cc100dd49b984901172075706772616465206d696e74696e6720706f6c696379004bd70249003301230103302300948900375c6082607c6ea800454cc0f0cc03ccc100dd49b98491084d697373696e6720003304037526e60038cc100dd49b9849010d20757067726164652070617468004bd70249001632533303a3034303d3754002298103d87a8000130223304037526eb8c0f8c8cdd81821000982118218009bac3041303e375400297ae032330010013756603e607c6ea800c894ccc1000045300103d87a800013232533303d3371e6eb8c1000080244c094cc10cdd399821982000119821982080125eb812f5c026600800800260880046084002a666070606860766ea80044c8c8c8c94ccc104c1100084c926323300100100222533304300114984c8cc00c00cc11c008c8c8dd718220011bae30420013045001163756608400260840046eb4c100004c0f0dd50008b1808180d981d9baa301c303b37540022c607a00266601e00a01098103d8798000375c607660706ea800458c078c0dcdd5180f181b9baa3018303737546074606e6ea800458cc03cdd6181c8020121bab30383039303930390023758606e002606e00260646ea808888dcc991919980080080224410022253330360021001132333004004303a0035333032302e371a00426e600044cdc500119b8a00537300026e64dd7181c0011b98001300100122533303000114bd7009981898171819000998010011819800a49034c5250003014302d375405044646600200200644a66606200229404c94ccc0b4cdc79bae303400200414a226600600600260680024a666050604260566ea80044c0bcc0b0dd50008a998152481134e6f7420616e20696e6c696e6520646174756d00162223233014004230023010302f3754002a666052604a60586ea800448c090ccc040dd5980798171baa001375c602a605c6ea800cdd7180798171baa003123371090001998081bab300f302e37540026eb8c054c0b8dd50019bae300f302e37540064464a666050604860566ea80044c0bcc0b0dd50008a9981524917436f756c64206e6f742066696e642072656465656d6572001632323300100100322533302f00114c0103d87a80001323232533302d3375e00c60600062602a6606600297ae01330050050023030002303300230310013374a90011981680125eb8094ccc094c084c0a0dd5000899191919191919192999819181a80109924c60500062c6eb4c0cc004c0cc008c0c4004c0c4008dd7181780098178011bae302d001302937540022c44646600200200644a6660580022980103d87a80001323253330293375e6028605a6ea80080144c044cc0bc0092f5c02660080080026060004605c0026002002444a6660520042980103d87a800013232533302630220031300e3302c0024bd70099980280280099b8000348004c0b400cc0ac0088888888c8c8c94ccc0a8cc03124011e48617320746f2072656465656d206174206c6561737420746865206d696e00337126eb4c02cc0b8dd50050010a99981519806249124d617820707269636520657863656564656400337126eb4c054c0b8dd50029bad3015302e3754601c605c6ea801854ccc0a8cc0312411b52656465656d696e67206d6f7265207468616e20616c6c6f77656400337120046eb4c02cc0b8dd50030a999815198062490d4e6f2073637269707420726566003375e6016605c6ea8021300103d87a800013300c49011757726f6e6720636f6e74696e75696e67206f75747075740033332222323300100133019005533302f302b30323754008264466ebcc070c0d4dd5180e181a9baa001002303630333754008264466ebcc070c0d4dd5000801181b18199baa00422533303500114a0264a66606264a66606466ebcc058c0d8dd5000803099299981c0008a5115333038303b001132323253330363371e6eb8c0f400d22100153330363371e00291010015333036303230393754980103d87a800015333036337129000001099b89002482026fb808528099b89480000085280a50375c6078607a0046eb4c0ecc0f0c0f0004dd6181d0008a503233001001323330010013756603260706ea800cc8cc004004020894ccc0ec00452f5bded8c02646607a66ec0dd49bae303a001374c64660020026eacc0f0008894ccc0f800452f5bded8c02646608066ec0dd49bae303d001375066e052000375a607c002660060066084004608000266006006607e004607a002444a6660760042002264666008008607e0066666604a0046eb8c0e8004dd5981d80091119299981d98140008a60103d87a80001302333041374c00297ae0323330010010030022225333042002100113233300400430460033333302d002375c60820026eb4c108004888c94ccc108c0f80045300103d87a80001302a33048375000297ae0337000040020546088004046607a00444a666072002297ae0132333222323300100100322533303f001100313233041374e660826ea4018cc104dd49bae303e0013304137506eb4c0fc0052f5c066006006608600460820026eb8c0e0004dd5981c80099801801981e801181d8008a50303800214a226600600600260700026606001097ae03374a900119818003a5eb80cdd2a400866060646460286606460660046606460660026606460666068002660646ea0cdc09bad300d3030375401000897ae03033001302e375400c97ae033330113333011330133756601e605c6ea8c03cc0b8dd5004a44100488100488100001375c601c605c6ea8028dd7180798171baa00600314a029405280a503370066e04ccc03cdd5980718169baa300e302d375401091010048810000153330293371200290000a400026eb4c050c0b4dd51808998179ba83370666e08dd6980a18169baa3300c30113302f375000297ae00034820225e8dd6980a18169baa30113302f375066e0920c8014820225e92f5c097ae0375a602660586ea8cc02cc040cc0b8dd4000a5eb8000ccdc09998069bab300c302b375400a6eb8c02cc0acdd50039bae300c302b375400666601a6eacc030c0acdd5180618159baa006375c601660566ea801cdd7180618159baa003230273028302830280012253330203330200014a094454cc0880084004400488c01ccc094dd419b83337046eb4c028c08cdd50011bad300a30233754002904044bd25eb808c090c094c0940048c08cc090004888c94ccc078c060c084dd50008a400026eb4c094c088dd500099299980f180c18109baa00114c103d87a8000132330010013756604c60466ea8008894ccc094004530103d87a8000132323253330233371e00e6eb8c09800c4c02ccc0a4dd4000a5eb804cc014014008dd698130011814801181380099198008008021129998120008a6103d87a8000132323253330223371e00e6eb8c09400c4c028cc0a0dd3000a5eb804cc014014008dd59812801181400118130009111299980e980c8008802099999805802001991900119198008008011129998128008a4c264a66604c002293099192999811980f98131baa3300f375c604c60540086eb8c0980084cc014014cc0a400800454cc0952401326b65797320696e206173736f63696174697665206c697374206172656e277420696e20617363656e64696e67206f726465720016302a0023028001302800133023337606ea4008dd4000a5eb7bdb180888c94ccc084c038004530103d87a80001300933027374c00297ae03333300f001005004222325333024302000114c103d87a80001300c3302a375000297ae0337000020040180126e95200022323300100100322533302000114bd6f7b630099191919299980f99b8f0070021003133025337606ea4008dd3000998030030019bab3022003375c60400046048004604400244646600200200644a66603e002297ae013232533301c300500213302200233004004001133004004001302300230210012301d001225333016337200040022980103d8798000153330163371e0040022980103d87a800014c103d87b80002533301900114a2294088888c8cc004004018894ccc0780044cc07ccdd81ba9006374c00a97adef6c60132323232533301d300d3300700a002133023337606ea4028dd30048028a99980e99b8f00a002132533301e301a3021375400226604866ec0dd4805981298111baa001004100433300800a009001133023337606ea4008dd3000998030030019bab3020003375c603c0046044004604000244444646600200200c44a66603a00226603c66ec0dd48031ba80054bd6f7b630099191919299980e18061980380500109981119bb037520146ea002401454ccc070cdc7805001099299980e980c98101baa001133023337606ea402cc090c084dd5000802080219980400500480089981119bb037520046ea0004cc01801800cdd6980f8019bae301d0023021002301f001375e98103d879800030123754018602a60246ea800458c050c054008c04c004c03cdd50008a4c26cac600200c464a666014600c00226464a66602260280042930b1bad3012001300e37540042a6660146008002264646464646464646464a666032603800426464649318088019808002299980a1808180b9baa007132323232533301d30200021324994ccc060c050c06cdd500189919299980f98110010a4c2c6eb8c080004c070dd50018b0b1bad301e001301e002301c0013018375400e2c2c60340026034004603000260300046eb8c058004c058008c050004c050008dd6980900098071baa0021533300a30030011533300f300e37540042930b0a99980519b874801800454ccc03cc038dd50010a4c2c2c60186ea8004dc3a40086e1d20022533300630023009375400226464a66601a60200042930b1bad300e001300a37540022c6e1d20005734ae6d5ce2ab9d5573caae7d5d02ba15745',
15
15
  };
16
16
 
17
17
  export const mkLrpValidator = (params: LRPParams): SpendingValidator => {
@@ -16,7 +16,7 @@
16
16
  "stabilityPoolHash": "88e0299018563dd10c4860d9f34eda56fdb77f302da0e3980620535c",
17
17
  "pollShardHash": "2b54b48d17c9689751d7c57d92b3daca98b28bf0b065dd4d49daa0c8",
18
18
  "pollManagerHash": "0b26e6c1a098434684f1028561705194b456ebbc8bd7e3e0e070a885",
19
- "lrpHash": "a4ebe1509a54a09efc395d172d5d3b3a161319bb3c114f2b0c798c47",
19
+ "lrpHash": "519e4d36b834dcf62dacb8c0c978787435cf5981b59f3dc39c55a7b7",
20
20
  "govHash": "578db3783ea967554812e837040e25fbd376ee61d24c024ccdc4c863",
21
21
  "executeHash": "e0612a2268eab843de10df4d02aaeafbc915b537dfe6ce1fc6e8d323",
22
22
  "collectorHash": "0752abd65a0c983bfb1c9c3880cc632c099ba3adb2fe307afb4bbd9c",
package/tests/lrp.test.ts CHANGED
@@ -337,9 +337,7 @@ describe('LRP', () => {
337
337
  ),
338
338
  lucid,
339
339
  lrpParams,
340
- testCtx.oracleParams,
341
340
  network,
342
- emulator.slot,
343
341
  ),
344
342
  );
345
343
 
@@ -465,9 +463,7 @@ describe('LRP', () => {
465
463
  ),
466
464
  lucid,
467
465
  lrpParams,
468
- testCtx.oracleParams,
469
466
  network,
470
- emulator.slot,
471
467
  ),
472
468
  );
473
469
 
@@ -599,9 +595,7 @@ describe('LRP', () => {
599
595
  ),
600
596
  lucid,
601
597
  lrpParams,
602
- testCtx.oracleParams,
603
598
  network,
604
- emulator.slot,
605
599
  ),
606
600
  );
607
601
 
@@ -732,9 +726,7 @@ describe('LRP', () => {
732
726
  ),
733
727
  lucid,
734
728
  lrpParams,
735
- testCtx.oracleParams,
736
729
  network,
737
- emulator.slot,
738
730
  ),
739
731
  );
740
732
 
@@ -39,6 +39,7 @@ afterEach(() => {
39
39
  test<LucidContext>('Stability Pool - Create Account', async ({
40
40
  lucid,
41
41
  users,
42
+ emulator,
42
43
  }: LucidContext) => {
43
44
  lucid.selectWallet.fromSeed(users.admin.seedPhrase);
44
45
  const systemParams = await init(lucid);
@@ -47,7 +48,14 @@ test<LucidContext>('Stability Pool - Create Account', async ({
47
48
 
48
49
  await runAndAwaitTx(
49
50
  lucid,
50
- CDPContract.openPosition('iUSD', 1_000_000_000n, 20n, systemParams, lucid),
51
+ CDPContract.openPosition(
52
+ 'iUSD',
53
+ 1_000_000_000n,
54
+ 20n,
55
+ systemParams,
56
+ lucid,
57
+ emulator.slot,
58
+ ),
51
59
  );
52
60
 
53
61
  await runAndAwaitTx(
@@ -113,6 +121,7 @@ test<LucidContext>('Stability Pool - Create Account', async ({
113
121
  test<LucidContext>('Stability Pool - Adjust Account', async ({
114
122
  lucid,
115
123
  users,
124
+ emulator,
116
125
  }: LucidContext) => {
117
126
  lucid.selectWallet.fromSeed(users.admin.seedPhrase);
118
127
  const systemParams = await init(lucid);
@@ -121,7 +130,14 @@ test<LucidContext>('Stability Pool - Adjust Account', async ({
121
130
 
122
131
  await runAndAwaitTx(
123
132
  lucid,
124
- CDPContract.openPosition('iUSD', 1_000_000_000n, 20n, systemParams, lucid),
133
+ CDPContract.openPosition(
134
+ 'iUSD',
135
+ 1_000_000_000n,
136
+ 20n,
137
+ systemParams,
138
+ lucid,
139
+ emulator.slot,
140
+ ),
125
141
  );
126
142
 
127
143
  await runAndAwaitTx(
@@ -251,7 +267,14 @@ test<LucidContext>('Stability Pool - Close Account', async ({
251
267
 
252
268
  await runAndAwaitTx(
253
269
  lucid,
254
- CDPContract.openPosition('iUSD', 1_000_000_000n, 20n, systemParams, lucid),
270
+ CDPContract.openPosition(
271
+ 'iUSD',
272
+ 1_000_000_000n,
273
+ 20n,
274
+ systemParams,
275
+ lucid,
276
+ emulator.slot,
277
+ ),
255
278
  );
256
279
 
257
280
  await runAndAwaitTx(