CollateralBalanceOf
Compound V3 Getter Plugin - CollateralBalanceOf
Description
This function returns the current balance of a collateral asset for a specified account in the protocol.
Method
collateralBalanceOf(address, address)
Input Parameters
Name | Plugin Type | Description |
---|---|---|
to |
| Comet address |
Method Parameters
Name | Plugin Type | Description |
---|---|---|
account |
| The address of the account in which to retrieve a collateral balance. |
asset |
| The address of the collateral asset smart contract. |
Returned Values
Name | Plugin Type | Description |
---|---|---|
balance |
| The balance of the collateral asset in the protocol for the specified account as an unsigned integer scaled up by 10 to the “decimals” integer in the asset’s contract. |
Example
Example with initParams
Example without initParams
Learn more
Learn more about Compound V3 Collateral Balance method here
Last updated