Annex Docs
Search…
Exit Market
Exit a market - it is not an error to exit a market which is not currently entered. Exited markets will not count towards account liquidity calculations.
Comptroller
1
function exitMarket(address aToken) returns (uint)
Copied!
  • msg.sender: The account which shall exit the given market.
  • aTokens: The addresses of the aToken market to exit.
  • RETURN: 0 on success, otherwise an Error code.
Solidity
1
Comptroller troll = Comptroller(0xABCD...);
2
uint error = troll.exitMarket(SToken(0x3FDA...));
Copied!
Web3 1.0
1
const troll = Comptroller.at(0xABCD...);
2
const errors = await troll.methods.exitMarket(SEther.at(0x3FDB...)).send({from: ...});
Copied!
Last modified 4mo ago
Copy link