Wrapped SD Token

WrappedSDToken wraps rebasing liquid staking tokens (such as stLINK) with a normal ERC20 token.

ERC20 Functions

All standard ERC20 functions are implemented for WrappedSDToken

View Functions

sdToken

Returns the underlying staking receipt token that this contract wraps

function sdToken() external view returns (address)

Return Values

getWrappedByUnderlying

Returns the amount of wrapped tokens that corresponds an amount of unwrapped tokens

function getWrappedByUnderlying(uint256 _amount) external view returns (uint256)

Parameters

Return Values

getUnderlyingByWrapped

Returns the amount of unwrapped tokens that corresponds to an amount of wrapped tokens

function getUnderlyingByWrapped(uint256 _amount) external view returns (uint256)

Parameters

Return Values

Write Functions

onTokenTransfer

ERC677 implementation that proxies wrapping

function onTokenTransfer(address _sender, uint256 _value, bytes) external

Parameters

wrap

Wraps tokens

function wrap(uint256 _amount) external

Parameters

unwrap

Unwraps tokens

function unwrap(uint256 _amount) external

Parameters

transferAndCall

Transfers tokens to an address and calls onTokenTransfer with additional data if the recipient is a contract

function transferAndCall(address _to, uint256 _value, bytes _data) external returns (bool)

Parameters

Last updated