IButtonToken
Functions
mint
Transfers underlying tokens from {msg.sender} to the contract and mints wrapper tokens.
function mint(uint256 amount) external returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | The amount of wrapper tokens to mint. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The 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
Name | Type | Description |
---|---|---|
<none> | uint256 | The 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
Name | Type | Description |
---|---|---|
uAmount | uint256 | The amount of underlying tokens to deposit. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The 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
Name | Type | Description |
---|---|---|
<none> | uint256 | The amount of wrapper tokens burnt. |
underlying
function underlying() external view returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | The address of the underlying token. |
totalUnderlying
function totalUnderlying() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The total underlying tokens held by the wrapper contract. |
balanceOfUnderlying
function balanceOfUnderlying(address who) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
who | address | The account address. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The underlying token balance of the account. |
underlyingToWrapper
function underlyingToWrapper(uint256 uAmount) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
uAmount | uint256 | The amount of underlying tokens. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The amount of wrapper tokens exchangeable. |
wrapperToUnderlying
function wrapperToUnderlying(uint256 amount) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | The amount of wrapper tokens. |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The amount of underlying tokens exchangeable. |