Docs
Search…
Docs
English
WELCOME
CORE CONCEPTS
DTOKENS
COMPTROLLER
Enter Markets
Exit Market
Get Assets In
Collateral Factor
Get Account Liquidity
Close Factor
Liquidation Incentive
Fixed Rate Market
FAQ
About Dank
Supplying & Earning
Borrowing & Repaying
Liquidations
Governance
Troubleshooting
DEVELOPERS
GitHub
ABOUT US
Our Team
Medium
Twitter
Discord
Telegram
OTHERS
DANK Public Beta Event (ENDED)
Powered By
GitBook
Get Assets In
Get the list of markets an account is currently entered into. In order to supply collateral or borrow in a market, it must be entered first. Entered markets count towards account liquidity calculations.
Comptroller
1
function
getAssetsIn
(
address account
)
view
returns
(
address
[]
memory
)
Copied!
account
: The account whose list of entered markets shall be queried.
RETURN
: The address of each market which is currently entered into.
Solidity
1
Comptroller troll
=
Comptroller
(
0xABCD
...
);
2
address
[]
memory markets
=
troll
.
getAssetsIn
(
0xMyAccount
);
Copied!
Web3 1.0
1
const
troll
=
Comptroller
.
at
(
0xABCD
...
);
2
const
markets
=
await
troll
.
methods
.
getAssetsIn
(
dTokens
).
call
();
Copied!
Previous
Exit Market
Next
Collateral Factor
Last modified
9mo ago
Copy link
Contents
Comptroller
Solidity
Web3 1.0