Saffron Mojito Adapter v2

Introduction

This contract interfaces with Mojito Swap and provides a common SaffronAdapter interface expected for use by Saffron Pool contracts.

Miscellaneous State Variables

Constructor

  constructor(address _lp_address, string memory _name)

deploy_capital()

Add funds to underlying protocol. Called from pool's deposit function

function deploy_capital(uint256 lp_amount) external override nonReentrant

return_capital()

Return funds to user. Called from pool's withdraw function

function return_capital(uint256 lp_amount, address to) external override nonReentrant

get_holdings()

Return balance of Auto Compounder holdings

function get_holdings() external override nonReentrant returns(uint256 holdings)

get_holdings_view()

Return balance of Auto Compounder holdings (read-only/view)

function get_holdings_view() external override view returns(uint256 holdings)

set_autocompounder()

Set a new Saffron autocompounder address

function set_autocompounder(address _autocompounder) external

set_pool()

Set a new Saffron Pool address

function set_pool(address pool) external override

set_lp()

Set new LP token address

function set_lp(address addr) external override

propose_governance()

Propose transfer of governance to new address

function propose_governance(address to) external override

accept_governance()

Accept the role of governance (must be called by previously proposed candidate)

function accept_governance() external override

sweep_erc()

Transfer LP assets to Mojito Staking

function sweep_erc(address _token, address _to) external

Last updated