Skip to main content

MockStEthToken

Functions

constructor

function constructor() public

submit

function submit(
address _referral
) external returns (uint256 amount_)

Parameters

NameTypeDescription
_referraladdress

mintAt

function mintAt(
address _dst
) public

Parameters

NameTypeDescription
_dstaddress

balanceOf

function balanceOf(
address _account
) public returns (uint256 amount_)

Parameters

NameTypeDescription
_accountaddress

getSharesByPooledEth

function getSharesByPooledEth(
uint256 _ethAmount
) public returns (uint256 shares_)

Parameters

NameTypeDescription
_ethAmountuint256

transfer

function transfer(
address dst,
uint256 amount
) public returns (bool)

Parameters

NameTypeDescription
dstaddress
amountuint256

transferFrom

function transferFrom(
address from,
address to,
uint256 amount
) public returns (bool)

See {IERC20-transferFrom}.

Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}.

NOTE: Does not update the allowance if the current allowance is the maximum uint256.

Requirements:

  • from and to cannot be the zero address.
  • from must have a balance of at least amount.
  • the caller must have allowance for from's tokens of at least amount.

Parameters

NameTypeDescription
fromaddress
toaddress
amountuint256

_transfer

function _transfer(
address _sender,
address _recipient,
uint256 _amount
) internal

Parameters

NameTypeDescription
_senderaddress
_recipientaddress
_amountuint256

getPooledEthByShares

function getPooledEthByShares(
uint256 _sharesAmount
) public returns (uint256 eth_)

Parameters

NameTypeDescription
_sharesAmountuint256

_mintShares

function _mintShares(
uint256 _sharesAmount,
address _recipient
) internal

Parameters

NameTypeDescription
_sharesAmountuint256
_recipientaddress

getTotalPooledEther

function getTotalPooledEther() public returns (uint256 totalEther_)

getTotalShares

function getTotalShares() public returns (uint256 totalShares_)

receive

function receive() external