Fortress
Search…
Exit Market
Exit a market. Exited markets will not count towards account liquidity calculations.

Unitroller

1
function exitMarket(address fToken) returns (uint)
Copied!
  • msg.sender: The account which shall enter the given markets.
  • fTokens: The addresses of the fToken markets to enter.
  • RETURN: For each market, returns an error code indicating whether or not it was entered. Each is 0 on success, otherwise an Error Code

Solidity

1
Unitroller troll = Unitroller(0xABCD...);
2
fToken[] memory fTokens = new fToken[](2);
3
fTokens[0] = CErc20(0x3FDA...);
4
fTokens[1] = CEther(0x3FDB...);
5
uint[] memory errors = troll.enterMarkets(fTokens);
Copied!

Web3 1.0

1
const troll = Unitroller.at(0xABCD...);
2
const fTokens = [CErc20.at(0x3FDA...), CEther.at(0x3FDB...)];
3
const errors = await troll.methods.enterMarkets(fTokens).send({from: ...});
Copied!
Last modified 8mo ago