Skip to content

Commit

Permalink
carbon pol - use event key value notation
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanzhelyazkov committed Nov 28, 2023
1 parent 1020bfd commit 49b1aa1
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions contracts/pol/CarbonPOL.sol
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils
}
_tradingStartTimes[token] = uint32(block.timestamp);
_initialPrice[token] = price;
emit TradingEnabled(token, price);
emit TradingEnabled({ token: token, price: price });
}

/**
Expand All @@ -193,7 +193,7 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils
_tradingStartTimes[NATIVE_TOKEN] = uint32(block.timestamp);
_initialPrice[NATIVE_TOKEN] = price;
_ethSaleAmount.current = Math.min(address(this).balance, _ethSaleAmount.initial).toUint128();
emit TradingEnabled(NATIVE_TOKEN, price);
emit TradingEnabled({ token: NATIVE_TOKEN, price: price });
}

/**
Expand Down Expand Up @@ -356,7 +356,7 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils
_initialPrice[NATIVE_TOKEN] = price;
_tradingStartTimes[NATIVE_TOKEN] = uint32(block.timestamp);
// emit price updated event
emit PriceUpdated(NATIVE_TOKEN, price);
emit PriceUpdated({ token: NATIVE_TOKEN, price: price });
}

return bntRequired;
Expand All @@ -375,7 +375,10 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils

_marketPriceMultiply = newMarketPriceMultiply;

emit MarketPriceMultiplyUpdated(prevMarketPriceMultiply, newMarketPriceMultiply);
emit MarketPriceMultiplyUpdated({
prevMarketPriceMultiply: prevMarketPriceMultiply,
newMarketPriceMultiply: newMarketPriceMultiply
});
}

/**
Expand All @@ -391,7 +394,10 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils

_priceDecayHalfLife = newPriceDecayHalfLife;

emit PriceDecayHalfLifeUpdated(prevPriceDecayHalfLife, newPriceDecayHalfLife);
emit PriceDecayHalfLifeUpdated({
prevPriceDecayHalfLife: prevPriceDecayHalfLife,
newPriceDecayHalfLife: newPriceDecayHalfLife
});
}

/**
Expand All @@ -412,7 +418,7 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils
_ethSaleAmount.current = Math.min(address(this).balance, _ethSaleAmount.initial).toUint128();
}

emit EthSaleAmountUpdated(prevEthSaleAmount, newEthSaleAmount);
emit EthSaleAmountUpdated({ prevEthSaleAmount: prevEthSaleAmount, newEthSaleAmount: newEthSaleAmount });
}

/**
Expand All @@ -428,7 +434,10 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils

_minEthSaleAmount = newMinEthSaleAmount;

emit MinEthSaleAmountUpdated(prevMinEthSaleAmount, newMinEthSaleAmount);
emit MinEthSaleAmountUpdated({
prevMinEthSaleAmount: prevMinEthSaleAmount,
newMinEthSaleAmount: newMinEthSaleAmount
});
}

/**
Expand Down

0 comments on commit 49b1aa1

Please sign in to comment.