Skip to content

Commit

Permalink
log tx details on AMO tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
naddison36 committed Oct 21, 2024
1 parent 1c030d0 commit 323121c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions contracts/tasks/amoStrategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const {
displayPortion,
displayRatio,
} = require("./curve");
const { logTxDetails } = require("../utils/txLogger");

const log = require("../utils/logger")("task:curve");

Expand Down Expand Up @@ -333,7 +334,8 @@ async function mintAndAddOTokensTask(taskArguments) {
const amountUnits = parseUnits(amount.toString());
log(`Minting ${formatUnits(amountUnits)} ${symbol} and adding to Curve pool`);

await amoStrategy.connect(signer).mintAndAddOTokens(amountUnits);
const tx = await amoStrategy.connect(signer).mintAndAddOTokens(amountUnits);
await logTxDetails(tx, "mintAndAddOTokens");
}

async function removeAndBurnOTokensTask(taskArguments) {
Expand All @@ -358,7 +360,10 @@ async function removeAndBurnOTokensTask(taskArguments) {
)} ${symbol} Curve LP tokens and burn the OTokens`
);

await amoStrategy.connect(signer).removeAndBurnOTokens(amountUnits);
const tx = await amoStrategy
.connect(signer)
.removeAndBurnOTokens(amountUnits);
await logTxDetails(tx, "removeAndBurnOTokens");
}

async function removeOnlyAssetsTask(taskArguments) {
Expand All @@ -383,7 +388,8 @@ async function removeOnlyAssetsTask(taskArguments) {
)} ${symbol} Curve LP tokens and add to ${symbol} Vault`
);

await amoStrategy.connect(signer).removeOnlyAssets(amountUnits);
const tx = await amoStrategy.connect(signer).removeOnlyAssets(amountUnits);
await logTxDetails(tx, "removeOnlyAssets");
}

module.exports = {
Expand Down

0 comments on commit 323121c

Please sign in to comment.