@indigo-labs/indigo-sdk 0.1.17 → 0.1.18
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 +2 -0
- package/dist/index.mjs +2 -0
- package/package.json +1 -1
- package/src/contracts/lrp.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -2896,10 +2896,12 @@ async function redeemLrp(redemptionLrpsData, lrpRefScriptOutRef, priceOracleOutR
|
|
|
2896
2896
|
},
|
|
2897
2897
|
priceOracleDatum.price
|
|
2898
2898
|
).getOnChainInt;
|
|
2899
|
+
console.log(lovelacesForRedemption, redeemIAssetAmt, priceOracleDatum.price);
|
|
2899
2900
|
const reimburstmentLovelaces = calculateFeeFromPercentage2(
|
|
2900
2901
|
iassetDatum.redemptionReimbursementPercentage,
|
|
2901
2902
|
lovelacesForRedemption
|
|
2902
2903
|
);
|
|
2904
|
+
console.log(reimburstmentLovelaces, iassetDatum.redemptionReimbursementPercentage, lovelacesForRedemption);
|
|
2903
2905
|
const lrpDatum = parseLrpDatum(getInlineDatumOrThrow(lrpUtxo));
|
|
2904
2906
|
const outputLovelacesAmt = lrpUtxo.assets.lovelace - lovelacesForRedemption + reimburstmentLovelaces;
|
|
2905
2907
|
const assetUnit = (0, import_lucid34.toUnit)(lrpParams.iassetPolicyId, mainLrpDatum.iasset);
|
package/dist/index.mjs
CHANGED
|
@@ -2805,10 +2805,12 @@ async function redeemLrp(redemptionLrpsData, lrpRefScriptOutRef, priceOracleOutR
|
|
|
2805
2805
|
},
|
|
2806
2806
|
priceOracleDatum.price
|
|
2807
2807
|
).getOnChainInt;
|
|
2808
|
+
console.log(lovelacesForRedemption, redeemIAssetAmt, priceOracleDatum.price);
|
|
2808
2809
|
const reimburstmentLovelaces = calculateFeeFromPercentage2(
|
|
2809
2810
|
iassetDatum.redemptionReimbursementPercentage,
|
|
2810
2811
|
lovelacesForRedemption
|
|
2811
2812
|
);
|
|
2813
|
+
console.log(reimburstmentLovelaces, iassetDatum.redemptionReimbursementPercentage, lovelacesForRedemption);
|
|
2812
2814
|
const lrpDatum = parseLrpDatum(getInlineDatumOrThrow(lrpUtxo));
|
|
2813
2815
|
const outputLovelacesAmt = lrpUtxo.assets.lovelace - lovelacesForRedemption + reimburstmentLovelaces;
|
|
2814
2816
|
const assetUnit = toUnit4(lrpParams.iassetPolicyId, mainLrpDatum.iasset);
|
package/package.json
CHANGED
package/src/contracts/lrp.ts
CHANGED
|
@@ -153,11 +153,15 @@ export async function redeemLrp(
|
|
|
153
153
|
},
|
|
154
154
|
priceOracleDatum.price,
|
|
155
155
|
).getOnChainInt;
|
|
156
|
+
|
|
157
|
+
console.log(lovelacesForRedemption, redeemIAssetAmt, priceOracleDatum.price);
|
|
156
158
|
const reimburstmentLovelaces = calculateFeeFromPercentage(
|
|
157
159
|
iassetDatum.redemptionReimbursementPercentage,
|
|
158
160
|
lovelacesForRedemption,
|
|
159
161
|
);
|
|
160
162
|
|
|
163
|
+
console.log(reimburstmentLovelaces, iassetDatum.redemptionReimbursementPercentage, lovelacesForRedemption);
|
|
164
|
+
|
|
161
165
|
const lrpDatum = parseLrpDatum(getInlineDatumOrThrow(lrpUtxo));
|
|
162
166
|
const outputLovelacesAmt = lrpUtxo.assets.lovelace - lovelacesForRedemption + reimburstmentLovelaces;
|
|
163
167
|
const assetUnit = toUnit(lrpParams.iassetPolicyId, mainLrpDatum.iasset);
|