feat: prettier

This commit is contained in:
Shriya Tyagi 2024-04-15 15:22:20 +04:00
parent 4d5fdc23bf
commit 88b2da2d9f
3 changed files with 10 additions and 8 deletions

View File

@ -4,7 +4,9 @@ pragma solidity 0.8.19;
import "./interfaces.sol";
import {TokenInterface} from "../../common/interfaces.sol";
contract Helpers{
IEtherfiPool internal constant ETHERFI_POOL = IEtherfiPool(0x308861A430be4cce5502d0A12724771Fc6DaF216);
TokenInterface internal constant WETH_CONTRACT = TokenInterface(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
contract Helpers {
IEtherfiPool internal constant ETHERFI_POOL =
IEtherfiPool(0x308861A430be4cce5502d0A12724771Fc6DaF216);
TokenInterface internal constant WETH_CONTRACT =
TokenInterface(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
}

View File

@ -1,6 +1,6 @@
//SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
interface IEtherfiPool{
interface IEtherfiPool {
function deposit() external payable returns (uint256);
}

View File

@ -9,16 +9,16 @@ contract EETHContract is Helpers, Basic, Events {
/**
* @dev deposit wETH into Etherfi.
* @notice unwrap wETH and stake ETH in Etherfi, users receive eETH tokens on a 1:1 basis representing their staked ETH.
* @param amount The amount of ETH to deposit. (For max: `uint256(-1)`)
* @param wethAmount The amount of wETH to deposit. (For max: `uint256(-1)`)
* @param getId ID to retrieve amt.
* @param setId ID stores the amount of ETH deposited.
*/
function depositWeth(
uint256 amount,
uint256 wethAmount,
uint256 getId,
uint256 setId
) public returns (string memory _eventName, bytes memory _eventParam) {
uint256 _amount = getUint(getId, amount);
uint256 _amount = getUint(getId, wethAmount);
_amount = _amount == type(uint256).max
? WETH_CONTRACT.balanceOf(address(this))
: _amount;
@ -27,7 +27,7 @@ contract EETHContract is Helpers, Basic, Events {
WETH_CONTRACT.withdraw(_amount);
uint256 _ethAfterBalance = address(this).balance;
uint256 _ethAmount = sub(_ethAfterBalance, _ethBeforeBalance);
uint256 _ethAmount = _ethAfterBalance - _ethBeforeBalance;
ETHERFI_POOL.deposit{value: _ethAmount}();
setUint(setId, _ethAmount);