@indigo-labs/indigo-sdk 0.2.24 → 0.2.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1502,9 +1502,15 @@ async function treasuryFeeTx(fee, lucid, sysParams, tx, treasuryOref) {
|
|
|
1502
1502
|
]),
|
|
1503
1503
|
(_) => new Error("Expected a single treasury Ref Script UTXO")
|
|
1504
1504
|
);
|
|
1505
|
-
const stakeCredential = sysParams.treasuryParams.treasuryUtxosStakeCredential ? fromSysParamsScriptCredential(
|
|
1505
|
+
const stakeCredential = sysParams.treasuryParams.treasuryUtxosStakeCredential ? fromSysParamsScriptCredential(
|
|
1506
|
+
sysParams.treasuryParams.treasuryUtxosStakeCredential
|
|
1507
|
+
) : void 0;
|
|
1506
1508
|
tx.readFrom([treasuryRefScriptUtxo]).collectFrom([treasuryUtxo], serialiseTreasuryRedeemer("CollectAda")).pay.ToContract(
|
|
1507
|
-
createScriptAddress(
|
|
1509
|
+
createScriptAddress(
|
|
1510
|
+
lucid.config().network,
|
|
1511
|
+
sysParams.validatorHashes.treasuryHash,
|
|
1512
|
+
stakeCredential
|
|
1513
|
+
),
|
|
1508
1514
|
{ kind: "inline", value: import_lucid17.Data.void() },
|
|
1509
1515
|
(0, import_lucid17.addAssets)(treasuryUtxo.assets, mkLovelacesOf(fee))
|
|
1510
1516
|
);
|
|
@@ -4878,7 +4884,8 @@ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid,
|
|
|
4878
4884
|
kind: "inline",
|
|
4879
4885
|
value: serialiseStakingDatum({
|
|
4880
4886
|
...stakingPositionOut.datum,
|
|
4881
|
-
lockedAmount: newLockedAmount
|
|
4887
|
+
lockedAmount: newLockedAmount,
|
|
4888
|
+
positionSnapshot: stakingManagerOut.datum.managerSnapshot
|
|
4882
4889
|
})
|
|
4883
4890
|
},
|
|
4884
4891
|
(0, import_lucid35.addAssets)(
|
package/dist/index.mjs
CHANGED
|
@@ -1273,9 +1273,15 @@ async function treasuryFeeTx(fee, lucid, sysParams, tx, treasuryOref) {
|
|
|
1273
1273
|
]),
|
|
1274
1274
|
(_) => new Error("Expected a single treasury Ref Script UTXO")
|
|
1275
1275
|
);
|
|
1276
|
-
const stakeCredential = sysParams.treasuryParams.treasuryUtxosStakeCredential ? fromSysParamsScriptCredential(
|
|
1276
|
+
const stakeCredential = sysParams.treasuryParams.treasuryUtxosStakeCredential ? fromSysParamsScriptCredential(
|
|
1277
|
+
sysParams.treasuryParams.treasuryUtxosStakeCredential
|
|
1278
|
+
) : void 0;
|
|
1277
1279
|
tx.readFrom([treasuryRefScriptUtxo]).collectFrom([treasuryUtxo], serialiseTreasuryRedeemer("CollectAda")).pay.ToContract(
|
|
1278
|
-
createScriptAddress(
|
|
1280
|
+
createScriptAddress(
|
|
1281
|
+
lucid.config().network,
|
|
1282
|
+
sysParams.validatorHashes.treasuryHash,
|
|
1283
|
+
stakeCredential
|
|
1284
|
+
),
|
|
1279
1285
|
{ kind: "inline", value: Data12.void() },
|
|
1280
1286
|
addAssets2(treasuryUtxo.assets, mkLovelacesOf(fee))
|
|
1281
1287
|
);
|
|
@@ -4690,7 +4696,8 @@ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid,
|
|
|
4690
4696
|
kind: "inline",
|
|
4691
4697
|
value: serialiseStakingDatum({
|
|
4692
4698
|
...stakingPositionOut.datum,
|
|
4693
|
-
lockedAmount: newLockedAmount
|
|
4699
|
+
lockedAmount: newLockedAmount,
|
|
4700
|
+
positionSnapshot: stakingManagerOut.datum.managerSnapshot
|
|
4694
4701
|
})
|
|
4695
4702
|
},
|
|
4696
4703
|
addAssets6(
|
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@ export async function treasuryFeeTx(
|
|
|
23
23
|
treasuryOref: OutRef,
|
|
24
24
|
): Promise<void> {
|
|
25
25
|
if (fee <= 0n) return;
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
const treasuryUtxo = matchSingle(
|
|
28
28
|
await lucid.utxosByOutRef([treasuryOref]),
|
|
29
29
|
(_) => new Error('Expected a single treasury UTXO'),
|
|
@@ -38,12 +38,20 @@ export async function treasuryFeeTx(
|
|
|
38
38
|
(_) => new Error('Expected a single treasury Ref Script UTXO'),
|
|
39
39
|
);
|
|
40
40
|
|
|
41
|
-
const stakeCredential = sysParams.treasuryParams.treasuryUtxosStakeCredential
|
|
41
|
+
const stakeCredential = sysParams.treasuryParams.treasuryUtxosStakeCredential
|
|
42
|
+
? fromSysParamsScriptCredential(
|
|
43
|
+
sysParams.treasuryParams.treasuryUtxosStakeCredential,
|
|
44
|
+
)
|
|
45
|
+
: undefined;
|
|
42
46
|
|
|
43
47
|
tx.readFrom([treasuryRefScriptUtxo])
|
|
44
48
|
.collectFrom([treasuryUtxo], serialiseTreasuryRedeemer('CollectAda'))
|
|
45
49
|
.pay.ToContract(
|
|
46
|
-
createScriptAddress(
|
|
50
|
+
createScriptAddress(
|
|
51
|
+
lucid.config().network!,
|
|
52
|
+
sysParams.validatorHashes.treasuryHash,
|
|
53
|
+
stakeCredential,
|
|
54
|
+
),
|
|
47
55
|
{ kind: 'inline', value: Data.void() },
|
|
48
56
|
addAssets(treasuryUtxo.assets, mkLovelacesOf(fee)),
|
|
49
57
|
);
|