WLSETHV1

Kiln

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

function allowance(address _owner, address _spender) external view returns (uint256)

Retrieves the token allowance given from one address to another

Parameters

Returns

approve

function approve(address _spender, uint256 _value) external nonpayable returns (bool)

Approves another account to transfer tokens

Parameters

Returns

balanceOf

function balanceOf(address _owner) external view returns (uint256)

Retrieves the token balance of the specified user

Parameters

Returns

burn

function burn(address _recipient, uint256 _shares) external nonpayable

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

decimals

function decimals() external pure returns (uint8)

Retrieves the token decimal count

Returns

decreaseAllowance

function decreaseAllowance(address _spender, uint256 _subtractableValue) external nonpayable returns (bool)

Decrease allowance to another account

Parameters

Returns

increaseAllowance

function increaseAllowance(address _spender, uint256 _additionalValue) external nonpayable returns (bool)

Increase allowance to another account

Parameters

Returns

initWLSETHV1

function initWLSETHV1(address _river) external nonpayable

Initializes the wrapped token contract

Parameters

mint

function mint(address _recipient, uint256 _shares) external nonpayable

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

name

function name() external pure returns (string)

Retrieves the token full name

Returns

sharesOf

function sharesOf(address _owner) external view returns (uint256)

Retrieves the raw shares count of the user

Parameters

Returns

symbol

function symbol() external pure returns (string)

Retrieves the token symbol

Returns

totalSupply

function totalSupply() external view returns (uint256)

Retrieves the token total supply

Returns

transfer

function transfer(address _to, uint256 _value) external nonpayable returns (bool)

Transfers tokens between the message sender and a recipient

Parameters

Returns

transferFrom

function transferFrom(address _from, address _to, uint256 _value) external nonpayable returns (bool)

Transfers tokens between two accounts

It is expected that _from has given at least _value allowance to msg.sender

Parameters

Returns

Events

Approval

event Approval(address indexed owner, address indexed spender, uint256 value)

An approval has been made

Parameters

Burn

event Burn(address indexed recipient, uint256 shares)

Tokens have been burned

Parameters

Initialize

event Initialize(uint256 version, bytes cdata)

Emitted when the contract is properly initialized

Parameters

Mint

event Mint(address indexed recipient, uint256 shares)

Tokens have been minted

Parameters

SetRiver

event SetRiver(address indexed river)

The stored value of river has been changed

Parameters

Transfer

event Transfer(address indexed from, address indexed to, uint256 value)

A transfer has been made

Parameters

Errors

AllowanceTooLow

error AllowanceTooLow(address _from, address _operator, uint256 _allowance, uint256 _value)

Allowance too low to perform operation

Parameters

BalanceTooLow

error BalanceTooLow()

Balance too low to perform operation

InvalidInitialization

error InvalidInitialization(uint256 version, uint256 expectedVersion)

An error occured during the initialization

Parameters

InvalidZeroAddress

error InvalidZeroAddress()

The address is zero

NullTransfer

error NullTransfer()

Invalid empty transfer

TokenTransferError

error TokenTransferError()

The token transfer failed during the minting or burning process

UnauthorizedTransfer

error UnauthorizedTransfer(address _from, address _to)

Invalid transfer recipients

Parameters

Last updated