@indigo-labs/indigo-sdk 0.1.18 → 0.1.19
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 +1 -15
- package/dist/index.mjs +1 -15
- package/package.json +1 -1
- package/src/contracts/lrp.ts +1 -15
package/dist/index.js
CHANGED
|
@@ -2905,20 +2905,6 @@ async function redeemLrp(redemptionLrpsData, lrpRefScriptOutRef, priceOracleOutR
|
|
|
2905
2905
|
const lrpDatum = parseLrpDatum(getInlineDatumOrThrow(lrpUtxo));
|
|
2906
2906
|
const outputLovelacesAmt = lrpUtxo.assets.lovelace - lovelacesForRedemption + reimburstmentLovelaces;
|
|
2907
2907
|
const assetUnit = (0, import_lucid34.toUnit)(lrpParams.iassetPolicyId, mainLrpDatum.iasset);
|
|
2908
|
-
console.log(
|
|
2909
|
-
lrpUtxo.address,
|
|
2910
|
-
{
|
|
2911
|
-
kind: "inline",
|
|
2912
|
-
value: serialiseLrpDatum({
|
|
2913
|
-
...lrpDatum,
|
|
2914
|
-
lovelacesToSpend: lrpDatum.lovelacesToSpend - lovelacesForRedemption
|
|
2915
|
-
})
|
|
2916
|
-
},
|
|
2917
|
-
{
|
|
2918
|
-
lovelace: outputLovelacesAmt,
|
|
2919
|
-
[assetUnit]: redeemIAssetAmt + (lrpUtxo.assets[assetUnit] ?? 0n)
|
|
2920
|
-
}
|
|
2921
|
-
);
|
|
2922
2908
|
return acc.collectFrom(
|
|
2923
2909
|
[lrpUtxo],
|
|
2924
2910
|
serialiseLrpRedeemer(
|
|
@@ -2998,7 +2984,7 @@ async function adjustLrp(lucid, lrpOutRef, lovelacesAdjustAmt, lrpRefScriptOutRe
|
|
|
2998
2984
|
mkAssetsOf(rewardAssetClass, -rewardAssetsAmt),
|
|
2999
2985
|
mkLovelacesOf(lovelacesAdjustAmt)
|
|
3000
2986
|
)
|
|
3001
|
-
).
|
|
2987
|
+
).addSignerKey(lrpDatum.owner);
|
|
3002
2988
|
}
|
|
3003
2989
|
async function claimLrp(lucid, lrpOutRef, lrpRefScriptOutRef, lrpParams) {
|
|
3004
2990
|
return adjustLrp(lucid, lrpOutRef, 0n, lrpRefScriptOutRef, lrpParams);
|
package/dist/index.mjs
CHANGED
|
@@ -2814,20 +2814,6 @@ async function redeemLrp(redemptionLrpsData, lrpRefScriptOutRef, priceOracleOutR
|
|
|
2814
2814
|
const lrpDatum = parseLrpDatum(getInlineDatumOrThrow(lrpUtxo));
|
|
2815
2815
|
const outputLovelacesAmt = lrpUtxo.assets.lovelace - lovelacesForRedemption + reimburstmentLovelaces;
|
|
2816
2816
|
const assetUnit = toUnit4(lrpParams.iassetPolicyId, mainLrpDatum.iasset);
|
|
2817
|
-
console.log(
|
|
2818
|
-
lrpUtxo.address,
|
|
2819
|
-
{
|
|
2820
|
-
kind: "inline",
|
|
2821
|
-
value: serialiseLrpDatum({
|
|
2822
|
-
...lrpDatum,
|
|
2823
|
-
lovelacesToSpend: lrpDatum.lovelacesToSpend - lovelacesForRedemption
|
|
2824
|
-
})
|
|
2825
|
-
},
|
|
2826
|
-
{
|
|
2827
|
-
lovelace: outputLovelacesAmt,
|
|
2828
|
-
[assetUnit]: redeemIAssetAmt + (lrpUtxo.assets[assetUnit] ?? 0n)
|
|
2829
|
-
}
|
|
2830
|
-
);
|
|
2831
2817
|
return acc.collectFrom(
|
|
2832
2818
|
[lrpUtxo],
|
|
2833
2819
|
serialiseLrpRedeemer(
|
|
@@ -2907,7 +2893,7 @@ async function adjustLrp(lucid, lrpOutRef, lovelacesAdjustAmt, lrpRefScriptOutRe
|
|
|
2907
2893
|
mkAssetsOf(rewardAssetClass, -rewardAssetsAmt),
|
|
2908
2894
|
mkLovelacesOf(lovelacesAdjustAmt)
|
|
2909
2895
|
)
|
|
2910
|
-
).
|
|
2896
|
+
).addSignerKey(lrpDatum.owner);
|
|
2911
2897
|
}
|
|
2912
2898
|
async function claimLrp(lucid, lrpOutRef, lrpRefScriptOutRef, lrpParams) {
|
|
2913
2899
|
return adjustLrp(lucid, lrpOutRef, 0n, lrpRefScriptOutRef, lrpParams);
|
package/package.json
CHANGED
package/src/contracts/lrp.ts
CHANGED
|
@@ -166,20 +166,6 @@ export async function redeemLrp(
|
|
|
166
166
|
const outputLovelacesAmt = lrpUtxo.assets.lovelace - lovelacesForRedemption + reimburstmentLovelaces;
|
|
167
167
|
const assetUnit = toUnit(lrpParams.iassetPolicyId, mainLrpDatum.iasset);
|
|
168
168
|
|
|
169
|
-
console.log(lrpUtxo.address,
|
|
170
|
-
{
|
|
171
|
-
kind: 'inline',
|
|
172
|
-
value: serialiseLrpDatum({
|
|
173
|
-
...lrpDatum,
|
|
174
|
-
lovelacesToSpend:
|
|
175
|
-
lrpDatum.lovelacesToSpend - lovelacesForRedemption,
|
|
176
|
-
}),
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
lovelace: outputLovelacesAmt,
|
|
180
|
-
[assetUnit]: redeemIAssetAmt + (lrpUtxo.assets[assetUnit] ?? 0n),
|
|
181
|
-
});
|
|
182
|
-
|
|
183
169
|
return acc
|
|
184
170
|
.collectFrom(
|
|
185
171
|
[lrpUtxo],
|
|
@@ -306,7 +292,7 @@ export async function adjustLrp(
|
|
|
306
292
|
mkLovelacesOf(lovelacesAdjustAmt),
|
|
307
293
|
),
|
|
308
294
|
)
|
|
309
|
-
.
|
|
295
|
+
.addSignerKey(lrpDatum.owner);
|
|
310
296
|
}
|
|
311
297
|
|
|
312
298
|
/**
|