Skip to main content

IButtonToken

Functions

mint

Transfers underlying tokens from {msg.sender} to the contract and mints wrapper tokens.

function mint(uint256 amount) external returns (uint256);

Parameters

NameTypeDescription
amountuint256The amount of wrapper tokens to mint.

Returns

NameTypeDescription
<none>uint256The amount of underlying tokens deposited.

burnAll

Burns all wrapper tokens from {msg.sender} and transfers the underlying tokens back.

function burnAll() external returns (uint256);

Returns

NameTypeDescription
<none>uint256The amount of underlying tokens withdrawn.

deposit

Transfers underlying tokens from {msg.sender} to the contract and mints wrapper tokens to the specified beneficiary.

function deposit(uint256 uAmount) external returns (uint256);

Parameters

NameTypeDescription
uAmountuint256The amount of underlying tokens to deposit.

Returns

NameTypeDescription
<none>uint256The amount of wrapper tokens mint.

withdrawAll

Burns all wrapper tokens from {msg.sender} and transfers the underlying tokens back.

function withdrawAll() external returns (uint256);

Returns

NameTypeDescription
<none>uint256The amount of wrapper tokens burnt.

underlying

function underlying() external view returns (address);

Returns

NameTypeDescription
<none>addressThe address of the underlying token.

totalUnderlying

function totalUnderlying() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The total underlying tokens held by the wrapper contract.

balanceOfUnderlying

function balanceOfUnderlying(address who) external view returns (uint256);

Parameters

NameTypeDescription
whoaddressThe account address.

Returns

NameTypeDescription
<none>uint256The underlying token balance of the account.

underlyingToWrapper

function underlyingToWrapper(uint256 uAmount) external view returns (uint256);

Parameters

NameTypeDescription
uAmountuint256The amount of underlying tokens.

Returns

NameTypeDescription
<none>uint256The amount of wrapper tokens exchangeable.

wrapperToUnderlying

function wrapperToUnderlying(uint256 amount) external view returns (uint256);

Parameters

NameTypeDescription
amountuint256The amount of wrapper tokens.

Returns

NameTypeDescription
<none>uint256The amount of underlying tokens exchangeable.