fix: constant names

This commit is contained in:
Samarendra Gouda 2024-04-15 14:30:09 +05:30
parent f0a39003e5
commit 6d4e7ce367
4 changed files with 9 additions and 9 deletions

View File

@ -4,5 +4,5 @@ pragma solidity 0.8.19;
import "./interfaces.sol";
contract Helpers{
IEtherfiPool constant etherfiPool = IEtherfiPool(0x308861A430be4cce5502d0A12724771Fc6DaF216);
IEtherfiPool constant ETHERFI_POOL = IEtherfiPool(0x308861A430be4cce5502d0A12724771Fc6DaF216);
}

View File

@ -27,7 +27,7 @@ contract EETHContract is Helpers, Basic, Events {
? address(this).balance
: _amount;
etherfiPool.deposit{value: _amount}();
ETHERFI_POOL.deposit{value: _amount}();
setUint(setId, _amount);

View File

@ -5,6 +5,6 @@ import "./interfaces.sol";
import {TokenInterface} from "../../common/interfaces.sol";
contract Helpers{
IWEETH constant weETHContract = IWEETH(0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee);
TokenInterface constant eETHContract = TokenInterface(0x35fA164735182de50811E8e2E824cFb9B6118ac2);
IWEETH constant WEETH_CONTRACT = IWEETH(0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee);
TokenInterface constant EETH_CONTRACT = TokenInterface(0x35fA164735182de50811E8e2E824cFb9B6118ac2);
}

View File

@ -21,11 +21,11 @@ contract WEETHContract is Helpers, Basic, Events {
) external returns (string memory _eventName, bytes memory _eventParam) {
uint256 _eETHAmount = getUint(getId, eETHAmount);
_eETHAmount = _eETHAmount == type(uint256).max
? eETHContract.balanceOf(address(this))
? EETH_CONTRACT.balanceOf(address(this))
: _eETHAmount;
approve(eETHContract, address(weETHContract), _eETHAmount);
uint256 _weETHAmount = weETHContract.wrap(_eETHAmount);
approve(EETH_CONTRACT, address(WEETH_CONTRACT), _eETHAmount);
uint256 _weETHAmount = WEETH_CONTRACT.wrap(_eETHAmount);
setUint(setId, _weETHAmount);
@ -47,10 +47,10 @@ contract WEETHContract is Helpers, Basic, Events {
) external returns (string memory _eventName, bytes memory _eventParam) {
uint256 _weETHAmount = getUint(getId, weETHAmount);
_weETHAmount = _weETHAmount == type(uint256).max
? weETHContract.balanceOf(address(this))
? WEETH_CONTRACT.balanceOf(address(this))
: _weETHAmount;
uint256 _eETHAmount = weETHContract.unwrap(_weETHAmount);
uint256 _eETHAmount = WEETH_CONTRACT.unwrap(_weETHAmount);
setUint(setId, _eETHAmount);
_eventName = "LogWithdraw(uint256,uint256,uint256,uint256)";