WLSETHV1
Alluvial Finance Inc.
Wrapped LsETH (v1)
This contract wraps the LsETH token into a rebase token, more suitable for some DeFi use-cases like stable swaps.
Methods
allowance
Retrieves the token allowance given from one address to another
Parameters
_owner
address
Owner that gave the allowance
_spender
address
Spender that received the allowance
Returns
_0
uint256
The allowance of the owner to the spender
approve
Approves another account to transfer tokens
Parameters
_spender
address
Spender that receives the allowance
_value
uint256
Amount to allow
Returns
_0
bool
True if success
balanceOf
Retrieves the token balance of the specified user
Parameters
_owner
address
Owner to check the balance
Returns
_0
uint256
The balance of the owner
burn
Burn tokens and retrieve underlying LsETH tokens
The message sender burns shares from its balance for the LsETH equivalent valueThe message sender doesn't need to approve the contract to burn the sharesThe freed LsETH is sent to the specified recipient
Parameters
_recipient
address
The account receiving the underlying LsETH tokens after shares are burned
_shares
uint256
Amount of LsETH to free by burning wrapped LsETH
decimals
Retrieves the token decimal count
Returns
_0
uint8
The decimal count
decreaseAllowance
Decrease allowance to another account
Parameters
_spender
address
Spender that receives the allowance
_subtractableValue
uint256
Amount to subtract
Returns
_0
bool
True if success
increaseAllowance
Increase allowance to another account
Parameters
_spender
address
Spender that receives the allowance
_additionalValue
uint256
Amount to add
Returns
_0
bool
True if success
initWLSETHV1
Initializes the wrapped token contract
Parameters
_river
address
Address of the River contract
mint
Mint tokens by providing LsETH tokens
The message sender locks LsETH tokens and received wrapped LsETH tokens in exchangeThe message sender needs to approve the contract to mint the wrapped tokensThe minted wrapped LsETH is sent to the specified recipient
Parameters
_recipient
address
The account receiving the new minted wrapped LsETH
_shares
uint256
The amount of LsETH to wrap
name
Retrieves the token full name
Returns
_0
string
The name of the token
sharesOf
Retrieves the raw shares count of the user
Parameters
_owner
address
Owner to check the shares balance
Returns
_0
uint256
The shares of the owner
symbol
Retrieves the token symbol
Returns
_0
string
The symbol of the token
totalSupply
Retrieves the token total supply
Returns
_0
uint256
The total supply
transfer
Transfers tokens between the message sender and a recipient
Parameters
_to
address
Recipient of the transfer
_value
uint256
Amount to transfer
Returns
_0
bool
True if success
transferFrom
Transfers tokens between two accounts
It is expected that _from has given at least _value allowance to msg.sender
Parameters
_from
address
Sender account
_to
address
Recipient of the transfer
_value
uint256
Amount to transfer
Returns
_0
bool
True if success
Events
Approval
An approval has been made
Parameters
owner indexed
address
The token owner
spender indexed
address
The account allowed by the owner
value
uint256
The amount allowed
Burn
Tokens have been burned
Parameters
recipient indexed
address
The account that receive the underlying LsETH
shares
uint256
The amount of LsETH that got sent back
Initialized
Triggered when the contract has been initialized or reinitialized.
Parameters
version
uint8
undefined
Mint
Tokens have been minted
Parameters
recipient indexed
address
The account receiving the new tokens
shares
uint256
The amount of LsETH provided
SetRiver
The stored value of river has been changed
Parameters
river indexed
address
The new address of river
Transfer
A transfer has been made
Parameters
from indexed
address
The transfer sender
to indexed
address
The transfer recipient
value
uint256
The amount transfered
Errors
AllowanceTooLow
Allowance too low to perform operation
Parameters
_from
address
Account where funds are sent from
_operator
address
Account attempting the transfer
_allowance
uint256
Current allowance
_value
uint256
Requested transfer value
BalanceTooLow
Balance too low to perform operation
InvalidZeroAddress
The address is zero
NullTransfer
Invalid empty transfer
TokenTransferError
The token transfer failed during the minting or burning process
UnauthorizedTransfer
Invalid transfer recipients
Parameters
_from
address
Account sending the funds in the invalid transfer
_to
address
Account receiving the funds in the invalid transfer
Last updated