Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ERC4626Test

Inherits: ERC4626Prop

State Variables

N

uint256 constant N = 4;

Functions

setUp

function setUp() public virtual;

setUpVault

function setUpVault(Init memory init) public virtual;

setUpYield

function setUpYield(Init memory init) public virtual;

test_asset

function test_asset(Init memory init) public virtual;

test_totalAssets

function test_totalAssets(Init memory init) public virtual;

test_convertToShares

function test_convertToShares(Init memory init, uint256 assets) public virtual;

test_convertToAssets

function test_convertToAssets(Init memory init, uint256 shares) public virtual;

test_maxDeposit

function test_maxDeposit(Init memory init) public virtual;

test_previewDeposit

function test_previewDeposit(Init memory init, uint256 assets) public virtual;

test_deposit

function test_deposit(Init memory init, uint256 assets, uint256 allowance) public virtual;

test_maxMint

function test_maxMint(Init memory init) public virtual;

test_previewMint

function test_previewMint(Init memory init, uint256 shares) public virtual;

test_mint

function test_mint(Init memory init, uint256 shares, uint256 allowance) public virtual;

test_maxWithdraw

function test_maxWithdraw(Init memory init) public virtual;

test_previewWithdraw

function test_previewWithdraw(Init memory init, uint256 assets) public virtual;

test_withdraw

function test_withdraw(Init memory init, uint256 assets, uint256 allowance) public virtual;

test_withdraw_zero_allowance

function test_withdraw_zero_allowance(Init memory init, uint256 assets) public virtual;

test_maxRedeem

function test_maxRedeem(Init memory init) public virtual;

test_previewRedeem

function test_previewRedeem(Init memory init, uint256 shares) public virtual;

test_redeem

function test_redeem(Init memory init, uint256 shares, uint256 allowance) public virtual;

test_redeem_zero_allowance

function test_redeem_zero_allowance(Init memory init, uint256 shares) public virtual;

test_RT_deposit_redeem

function test_RT_deposit_redeem(Init memory init, uint256 assets) public virtual;

test_RT_deposit_withdraw

function test_RT_deposit_withdraw(Init memory init, uint256 assets) public virtual;

test_RT_redeem_deposit

function test_RT_redeem_deposit(Init memory init, uint256 shares) public virtual;

test_RT_redeem_mint

function test_RT_redeem_mint(Init memory init, uint256 shares) public virtual;

test_RT_mint_withdraw

function test_RT_mint_withdraw(Init memory init, uint256 shares) public virtual;

test_RT_mint_redeem

function test_RT_mint_redeem(Init memory init, uint256 shares) public virtual;

test_RT_withdraw_mint

function test_RT_withdraw_mint(Init memory init, uint256 assets) public virtual;

test_RT_withdraw_deposit

function test_RT_withdraw_deposit(Init memory init, uint256 assets) public virtual;

_isContract

function _isContract(address account) internal view returns (bool);

_isEOA

function _isEOA(address account) internal view returns (bool);

_approve

function _approve(address token, address owner, address spender, uint256 amount) internal;

_safeApprove

function _safeApprove(address token, address spender, uint256 amount) internal;

_max_deposit

function _max_deposit(address from) internal virtual returns (uint256);

_max_mint

function _max_mint(address from) internal virtual returns (uint256);

_max_withdraw

function _max_withdraw(address from) internal virtual returns (uint256);

_max_redeem

function _max_redeem(address from) internal virtual returns (uint256);

Structs

Init

struct Init {
    address[N] user;
    uint256[N] share;
    uint256[N] asset;
    int256 yield;
}