Saffron Converter
Last updated
Last updated
Saffron Converter
struct Conversion
Structure containing conversion steps for swapping tokens with any Uniswap V2 style router
address
router
Router to do the conversion: QuickSwap, SushiSwap, etc.
address
token_from
Token to convert from
address
token_to
Token to convert to
uint256
percentage
Percentage of tokenFrom to convert: 50 == half, 100 == all
uint256
operation
Bitmask of operations: 1=remove, 2=swap, 4=add, 8=fee-on-transfer
address
public
governance
Governance address
address
public
new_governance
Pending governance address if accepted
Conversion[]
public
conversions
List of supported conversions
uint256
private
_convert_status
Internal state for reentrancy guard
preapprove_conversions()
Pre approve conversions
init_conversions()
Init conversions
address[]
routers
address[]
tokens_from
address[]
tokens_to
uint256[]
percentages
uint256[]
operations
convert()
Convert
remove_liquidity_would_return_zero()
uint256
balance_to_burn
address
_pair_address
get_amount_out()
Get amount out
uint
amountIn
uint
reserveIn
uint
reserveOut
uint
swapFeeNumerator
sort_tokens()
Sort tokens
address
tokenA
address
tokenB
pair_for()
Pair for
address
factory
address
tokenA
address
tokenB
get_conversion()
Get Conversion
uint256
i
propose_governance()
Propose transfer of governance to new address
address
to
Address of proposed new governance
accept_governance()
Accept the role of governance (must be called by previously proposed candidate)
sweep_erc()
Transfer LP assets to Mojito Staking
address
amount_qlp
Amount (wei) of LP Assets to be staked in Mojito
address
to
Address to receive swept assets