Swaps
The wrapper contract can be used to directly swap to or from RBTC without requiring an additional transaction to wrap or unwrap WRBTC.
Last updated
The wrapper contract can be used to directly swap to or from RBTC without requiring an additional transaction to wrap or unwrap WRBTC.
Last updated
convertByPath converts the token to any other token in the sovryn swap network by following a predefined conversion path and transfers the result tokens to a target account. Please note that either the source or target token address has to be WRBTC. If the source is not RBTC, the wrapper contract should already have been given allowance of the source token. The wrapping or unwrapping of WRBTC is handled the wrapper contract.
Arguments
_path
IERC20Token[]
conversion path, see conversion path format
_amount
uint256
amount to convert from, in the source token
_minReturn
uint256
if the conversion results in an amount smaller than the minimum return - it is cancelled, must be greater than zero
Returns
The amount of tokens to receive from the conversion.