diff --git a/test/mocks/MockStETH.sol b/test/mocks/MockStETH.sol index 18b0983..cb64798 100644 --- a/test/mocks/MockStETH.sol +++ b/test/mocks/MockStETH.sol @@ -5,6 +5,8 @@ import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; import {IStETH} from "pendle/interfaces/IStETH.sol"; contract MockStETH is MockERC20, IStETH { + uint256 public total; + constructor() MockERC20("stETH", "stETH", 18) {} function getSharesByPooledEth(uint256 _ethAmount) external view returns (uint256) { @@ -15,13 +17,25 @@ contract MockStETH is MockERC20, IStETH { return _sharesAmount; } - function submit(address referral) external payable returns (uint256 amount) {} + function submit(address referral) external payable returns (uint256 amount) { + mint(msg.sender, msg.value); + total += msg.value; + return msg.value; + } - function burnShares(address _account, uint256 _sharesAmount) external returns (uint256 newTotalShares) {} + function burnShares(address _account, uint256 _sharesAmount) external returns (uint256 newTotalShares) { + revert("not implemented"); + } - function sharesOf(address account) external view returns (uint256) {} + function sharesOf(address account) external view returns (uint256) { + revert("not implemented"); + } - function getTotalShares() external view returns (uint256) {} + function getTotalShares() external view returns (uint256) { + return total; + } - function getTotalPooledEther() external view returns (uint256) {} + function getTotalPooledEther() external view returns (uint256) { + return total; + } }