vdodo add event

This commit is contained in:
owen05
2021-02-13 21:13:06 +08:00
parent 7df484fccc
commit 37c6de78ce
2 changed files with 6 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ contract DODORecharge is InitializableOwnable {
address immutable _DODO_TOKEN_; address immutable _DODO_TOKEN_;
address immutable _DODO_APPROVE_PROXY_; address immutable _DODO_APPROVE_PROXY_;
event DeductionDODO(address user,uint256 _amount); event DeductDODO(address user,uint256 _amount);
constructor(address dodoAddress, address dodoApproveProxy) public { constructor(address dodoAddress, address dodoApproveProxy) public {
_DODO_TOKEN_ = dodoAddress; _DODO_TOKEN_ = dodoAddress;
@@ -28,7 +28,7 @@ contract DODORecharge is InitializableOwnable {
function deductionDODO(uint256 amount) external { function deductionDODO(uint256 amount) external {
IDODOApproveProxy(_DODO_APPROVE_PROXY_).claimTokens(_DODO_TOKEN_, msg.sender, address(this), amount); IDODOApproveProxy(_DODO_APPROVE_PROXY_).claimTokens(_DODO_TOKEN_, msg.sender, address(this), amount);
emit DeductionDODO(msg.sender, amount); emit DeductDODO(msg.sender, amount);
} }
// ============ Owner Functions ============ // ============ Owner Functions ============

View File

@@ -71,8 +71,10 @@ contract vDODOToken is InitializableOwnable {
event MintVDODO(address user, address superior, uint256 mintDODO); event MintVDODO(address user, address superior, uint256 mintDODO);
event RedeemVDODO(address user, uint256 receiveDODO, uint256 burnDODO, uint256 feeDODO); event RedeemVDODO(address user, uint256 receiveDODO, uint256 burnDODO, uint256 feeDODO);
event DonateDODO(address user, uint256 donateDODO);
event SetCantransfer(bool allowed); event SetCantransfer(bool allowed);
event PreDeposit(uint256 dodoAmount);
event ChangePerReward(uint256 dodoPerBlock); event ChangePerReward(uint256 dodoPerBlock);
event UpdateDODOFeeBurnRatio(uint256 dodoFeeBurnRatio); event UpdateDODOFeeBurnRatio(uint256 dodoFeeBurnRatio);
@@ -217,6 +219,7 @@ contract vDODOToken is InitializableOwnable {
alpha = uint112( alpha = uint112(
uint256(alpha).add(DecimalMath.divFloor(dodoAmount, _TOTAL_STAKING_POWER_)) uint256(alpha).add(DecimalMath.divFloor(dodoAmount, _TOTAL_STAKING_POWER_))
); );
emit DonateDODO(msg.sender, dodoAmount);
} }
function preDepositedBlockReward(uint256 dodoAmount) public { function preDepositedBlockReward(uint256 dodoAmount) public {
@@ -227,6 +230,7 @@ contract vDODOToken is InitializableOwnable {
dodoAmount dodoAmount
); );
_TOTAL_BLOCK_REWARD_ = _TOTAL_BLOCK_REWARD_.add(dodoAmount); _TOTAL_BLOCK_REWARD_ = _TOTAL_BLOCK_REWARD_.add(dodoAmount);
emit PreDeposit(dodoAmount);
} }
// ============ ERC20 Functions ============ // ============ ERC20 Functions ============