Migrator
State Variables
allowedMarkets
mapping(address => bool) public allowedMarkets;
MENDI_COMPTROLLER
address public constant MENDI_COMPTROLLER = 0x1b4d3b0421dDc1eB216D230Bc01527422Fb93103;
MALDA_OPERATOR
address public immutable MALDA_OPERATOR;
Functions
constructor
constructor(address _operator);
getAllCollateralMarkets
Get all markets where user
has collateral in on Mendi
function getAllCollateralMarkets(address user) external view returns (address[] memory markets);
getAllPositions
Get all migratable
positions from Mendi to Malda for user
function getAllPositions(address user) external returns (Position[] memory positions);
migrateAllPositions
Migrates all positions from Mendi to Malda
function migrateAllPositions() external;
_collectMendiPositions
Collects all user positions from Mendi
function _collectMendiPositions(address user) private returns (Position[] memory);
_getMaldaMarket
Gets corresponding Malda market for a given underlying
function _getMaldaMarket(address underlying) private view returns (address);
Structs
Position
struct Position {
address mendiMarket;
address maldaMarket;
uint256 collateralUnderlyingAmount;
uint256 borrowAmount;
}