Developers
Search…
Get Cash
Cash is the amount of underlying balance owned by this qToken contract. One may query the total amount of cash currently available to this market.

QToken

1
function getCash() external view returns (uint);
Copied!
  • RETURN: The quantity of underlying asset owned by the contract.

Solidity

1
QToken qToken = QToken(<qTokenAddress>);
2
uint cash = qToken.getCash();
Copied!

Ethers.js

1
const qToken = await ethers.getContractAt(<qTokenABI>, <qTokenAddress>);
2
const cash = await qToken.getCash();
Copied!
Last modified 2mo ago
Copy link