event name changed + added setUint

This commit is contained in:
Shriya Tyagi 2022-09-04 21:04:32 +05:30
parent e49780e2b4
commit a3b64c1251
2 changed files with 8 additions and 6 deletions

View File

@ -2,6 +2,6 @@
pragma solidity ^0.7.0;
contract Events {
event LogDepositSTETH(uint256 tokenAmt, uint256 getId, uint256 setId);
event LogWithdrawWSTETH(uint256 tokenAmt, uint256 getId, uint256 setId);
event LogDeposit(uint256 tokenAmt, uint256 getId, uint256 setId);
event LogWithdraw(uint256 tokenAmt, uint256 getId, uint256 setId);
}

View File

@ -28,9 +28,10 @@ abstract contract WSTETHContract is Helpers, Basic {
approve(stethContract, address(wstethContract), _amt);
setId = wstethContract.wrap(_amt);
wstethContract.wrap(_amt);
setUint(setId, _amt);
_eventName = "LogDepositSTETH(uint256,uint256,uint256)";
_eventName = "LogDeposit(uint256,uint256,uint256)";
_eventParam = abi.encode(_amt, getId, setId);
}
@ -50,9 +51,10 @@ abstract contract WSTETHContract is Helpers, Basic {
uint256 _amt = getUint(getId, wstethAmt);
_amt = _amt == uint(-1) ? wstethContract.balanceOf(address(this)) : _amt;
setId = wstethContract.unwrap(_amt);
wstethContract.unwrap(_amt);
setUint(setId, _amt);
_eventName = "LogWithdrawWSTETH(uint256,uint256,uint256)";
_eventName = "LogWithdraw(uint256,uint256,uint256)";
_eventParam = abi.encode(_amt, getId, setId);
}
}