Fortress
Search…
Fortress Credit and Lending
FTS Tokenomics
Supplying Assets
Borrowing Assets
FAI Stablecoin (Depreciated)
Interest Rates
Governance
Forced Liquidations
Smart Contracts
Guides
Road Map
Protocol Documentation
Getting Started
fTokens
Unitroller
Architecture
Enter Markets
Exit Market
Get Assets In
Collateral Factor
Get Account Liquidity
Close Factor
Liquidation Incentive
Key Events
Error Codes
Fortress Distribution Speeds
FTS Distributed Per Block (All Markets)
FTS Distributed Per Block (Single Market)
Claim Fortress FTS
Market Metadata
Security
Powered By
GitBook
Enter Markets
Enter into a list of markets. In order to supply collateral or borrow in a market, it must be entered first.
Unitroller
function enterMarkets(address[] calldata fTokens) returns (uint[] memory)
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
Unitroller troll = Unitroller(0xABCD...);
fToken[] memory fTokens = new fToken[](2);
fTokens[0] = CErc20(0x3FDA...);
fTokens[1] = CEther(0x3FDB...);
uint[] memory errors = troll.enterMarkets(fTokens);
Web3 1.0
const troll = Unitroller.at(0xABCD...);
const fTokens = [CErc20.at(0x3FDA...), CEther.at(0x3FDB...)];
const errors = await troll.methods.enterMarkets(fTokens).send({from: ...});
Previous
Architecture
Next
Exit Market
Last modified
1yr ago
Copy link
Outline
Solidity
Web3 1.0