@indigo-labs/indigo-sdk 0.1.16 → 0.1.17
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 +14 -0
- package/dist/index.mjs +14 -0
- package/package.json +1 -1
- package/src/contracts/lrp.ts +14 -0
package/dist/index.js
CHANGED
|
@@ -2903,6 +2903,20 @@ async function redeemLrp(redemptionLrpsData, lrpRefScriptOutRef, priceOracleOutR
|
|
|
2903
2903
|
const lrpDatum = parseLrpDatum(getInlineDatumOrThrow(lrpUtxo));
|
|
2904
2904
|
const outputLovelacesAmt = lrpUtxo.assets.lovelace - lovelacesForRedemption + reimburstmentLovelaces;
|
|
2905
2905
|
const assetUnit = (0, import_lucid34.toUnit)(lrpParams.iassetPolicyId, mainLrpDatum.iasset);
|
|
2906
|
+
console.log(
|
|
2907
|
+
lrpUtxo.address,
|
|
2908
|
+
{
|
|
2909
|
+
kind: "inline",
|
|
2910
|
+
value: serialiseLrpDatum({
|
|
2911
|
+
...lrpDatum,
|
|
2912
|
+
lovelacesToSpend: lrpDatum.lovelacesToSpend - lovelacesForRedemption
|
|
2913
|
+
})
|
|
2914
|
+
},
|
|
2915
|
+
{
|
|
2916
|
+
lovelace: outputLovelacesAmt,
|
|
2917
|
+
[assetUnit]: redeemIAssetAmt + (lrpUtxo.assets[assetUnit] ?? 0n)
|
|
2918
|
+
}
|
|
2919
|
+
);
|
|
2906
2920
|
return acc.collectFrom(
|
|
2907
2921
|
[lrpUtxo],
|
|
2908
2922
|
serialiseLrpRedeemer(
|
package/dist/index.mjs
CHANGED
|
@@ -2812,6 +2812,20 @@ async function redeemLrp(redemptionLrpsData, lrpRefScriptOutRef, priceOracleOutR
|
|
|
2812
2812
|
const lrpDatum = parseLrpDatum(getInlineDatumOrThrow(lrpUtxo));
|
|
2813
2813
|
const outputLovelacesAmt = lrpUtxo.assets.lovelace - lovelacesForRedemption + reimburstmentLovelaces;
|
|
2814
2814
|
const assetUnit = toUnit4(lrpParams.iassetPolicyId, mainLrpDatum.iasset);
|
|
2815
|
+
console.log(
|
|
2816
|
+
lrpUtxo.address,
|
|
2817
|
+
{
|
|
2818
|
+
kind: "inline",
|
|
2819
|
+
value: serialiseLrpDatum({
|
|
2820
|
+
...lrpDatum,
|
|
2821
|
+
lovelacesToSpend: lrpDatum.lovelacesToSpend - lovelacesForRedemption
|
|
2822
|
+
})
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
lovelace: outputLovelacesAmt,
|
|
2826
|
+
[assetUnit]: redeemIAssetAmt + (lrpUtxo.assets[assetUnit] ?? 0n)
|
|
2827
|
+
}
|
|
2828
|
+
);
|
|
2815
2829
|
return acc.collectFrom(
|
|
2816
2830
|
[lrpUtxo],
|
|
2817
2831
|
serialiseLrpRedeemer(
|
package/package.json
CHANGED
package/src/contracts/lrp.ts
CHANGED
|
@@ -162,6 +162,20 @@ export async function redeemLrp(
|
|
|
162
162
|
const outputLovelacesAmt = lrpUtxo.assets.lovelace - lovelacesForRedemption + reimburstmentLovelaces;
|
|
163
163
|
const assetUnit = toUnit(lrpParams.iassetPolicyId, mainLrpDatum.iasset);
|
|
164
164
|
|
|
165
|
+
console.log(lrpUtxo.address,
|
|
166
|
+
{
|
|
167
|
+
kind: 'inline',
|
|
168
|
+
value: serialiseLrpDatum({
|
|
169
|
+
...lrpDatum,
|
|
170
|
+
lovelacesToSpend:
|
|
171
|
+
lrpDatum.lovelacesToSpend - lovelacesForRedemption,
|
|
172
|
+
}),
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
lovelace: outputLovelacesAmt,
|
|
176
|
+
[assetUnit]: redeemIAssetAmt + (lrpUtxo.assets[assetUnit] ?? 0n),
|
|
177
|
+
});
|
|
178
|
+
|
|
165
179
|
return acc
|
|
166
180
|
.collectFrom(
|
|
167
181
|
[lrpUtxo],
|