Bank

Git Source

Inherits: IBank, ERC4626, Gold

State Variables

totalUsdc

uint256 public totalUsdc;

military

address public military;

investmentStrategy

IInvestmentStrategy public investmentStrategy;

Functions

constructor

constructor(
    address character_,
    address marketplace_,
    address military_,
    address lzEndpoint_,
    IERC20 asset_,
    address game_
) Gold(character_, marketplace_, lzEndpoint_, game_) ERC4626(asset_);

depositAndSendToMilitary

function depositAndSendToMilitary(uint256 assets_) external override;

decimals

function decimals() public pure override(ERC20, ERC4626, IERC20Metadata) returns (uint8);

invest

function invest(uint256 amount_) public override onlyOwner;

withdrawInvestment

function withdrawInvestment(uint256 amount_) external override onlyOwner;

_claimRewards

function _claimRewards() internal returns (uint256 rewards_);

setInvestmentStrategy

function setInvestmentStrategy(IInvestmentStrategy strategy_) external override onlyOwner;

previewRewards

function previewRewards() external view override returns (uint256);

getInvestment

function getInvestment() external view override returns (uint256);

totalAssets

function totalAssets() public view virtual override(ERC4626, IERC4626) returns (uint256);

deposit

function deposit(uint256 assets, address receiver)
    public
    virtual
    override(ERC4626, IERC4626)
    returns (uint256 shares_);

mint

function mint(uint256 shares, address receiver) public virtual override(ERC4626, IERC4626) returns (uint256 assets_);

withdraw

function withdraw(uint256 assets, address receiver, address owner)
    public
    virtual
    override(ERC4626, IERC4626)
    returns (uint256 shares_);

redeem

function redeem(uint256 shares, address receiver, address owner)
    public
    virtual
    override(ERC4626, IERC4626)
    returns (uint256 assets_);

_withdrawInvestmentToAllowWithdrawal

function _withdrawInvestmentToAllowWithdrawal(uint256 assets_) internal;