remove dpp & dvm events indexed

This commit is contained in:
mingda
2020-12-10 20:45:38 +08:00
parent 59a4314bbc
commit 14279a2073
5 changed files with 26 additions and 41 deletions

View File

@@ -57,19 +57,19 @@ contract DPPStorage is InitializableOwnable, ReentrancyGuard {
// ============ Events ============
event SetLpFeeRateModel(address indexed oldAddr, address indexed newAddr);
event SetLpFeeRateModel(address oldAddr, address newAddr);
event SetMtFeeRateModel(address indexed oldAddr, address indexed newAddr);
event SetMtFeeRateModel(address oldAddr, address newAddr);
event SetTradePermissionManager(address indexed oldAddr, address indexed newAddr);
event SetTradePermissionManager(address oldAddr, address newAddr);
event SetMaintainer(address indexed oldAddr, address indexed newAddr);
event SetMaintainer(address oldAddr, address newAddr);
event SetGasPriceSource(address indexed oldAddr, address indexed newAddr);
event SetGasPriceSource(address oldAddr, address newAddr);
event SetISource(address indexed oldAddr, address indexed newAddr);
event SetISource(address oldAddr, address newAddr);
event SetKSource(address indexed oldAddr, address indexed newAddr);
event SetKSource(address oldAddr, address newAddr);
event SetBuy(bool allow);

View File

@@ -20,8 +20,8 @@ contract DPPTrader is DPPVault {
// ============ Events ============
event DODOSwap(
address indexed fromToken,
address indexed toToken,
address fromToken,
address toToken,
uint256 fromAmount,
uint256 toAmount,
address trader
@@ -122,12 +122,7 @@ contract DPPTrader is DPPVault {
uint256 quoteAmount,
address assetTo,
bytes calldata data
)
external
preventReentrant
isSellAllow(assetTo)
isBuyAllow(assetTo)
{
) external preventReentrant isSellAllow(assetTo) isBuyAllow(assetTo) {
_transferBaseOut(assetTo, baseAmount);
_transferQuoteOut(assetTo, quoteAmount);
@@ -264,10 +259,10 @@ contract DPPTrader is DPPVault {
function _sync() internal {
uint256 baseBalance = _BASE_TOKEN_.balanceOf(address(this));
uint256 quoteBalance = _QUOTE_TOKEN_.balanceOf(address(this));
if(baseBalance != _BASE_RESERVE_) {
if (baseBalance != _BASE_RESERVE_) {
_BASE_RESERVE_ = baseBalance;
}
if(quoteBalance != _QUOTE_RESERVE_) {
if (quoteBalance != _QUOTE_RESERVE_) {
_QUOTE_RESERVE_ = quoteBalance;
}
}