📜ABI's
The August Digital SDK includes all necessary contract ABIs (Application Binary Interfaces) for interacting with August vaults and related contracts. All ABIs are exported with the `ABI_` prefix.
Vault ABIs
ABI_LENDING_POOL
Legacy lending pool contract ABI (vault v1.0).
import { ABI_LENDING_POOL } from '@augustdigital/sdk';Main Functions:
deposit(uint256 assets, address receiver)withdraw(uint256 assets, address receiver, address owner)asset()- Get underlying token addresstotalAssets()- Get total vault assetsconvertToShares(uint256 assets)- Convert assets to sharesconvertToAssets(uint256 shares)- Convert shares to assets
ABI_LENDING_POOL_V2
Current lending pool contract ABI (vault v2.0) with separate receipt tokens.
import { ABI_LENDING_POOL_V2 } from '@augustdigital/sdk';Main Functions:
deposit(uint256 assets, address receiver)- Deposit assetsrequestRedeem(uint256 shares, address receiver, address owner)- Request withdrawalredeem(uint256 year, uint256 month, uint256 day, uint256 receiverIndex, address receiver)- Claim withdrawalasset()- Get underlying tokentotalAssets()- Get total vault TVLdecimals()- Get vault decimalsmaxDeposit(address)- Check deposit limitspreviewDeposit(uint256 assets)- Preview depositpreviewRedeem(uint256 shares)- Preview redemption
Example:
ABI_LENDING_POOL_V3
Next-generation lending pool contract ABI (vault v3.0).
Similar interface to V2 with additional features and optimizations.
ABI_TOKENIZED_VAULT_V2
Tokenized vault V2 contract ABI.
Main Functions:
deposit(uint256 assets, address receiver)mint(uint256 shares, address receiver)withdraw(uint256 assets, address receiver, address owner)redeem(uint256 shares, address receiver, address owner)
ABI_TOKENIZED_VAULT_V2_RECEIPT
Receipt token contract for Tokenized Vault V2.
Standard ERC20 interface for vault receipt tokens.
ABI_TOKENIZED_VAULT_V2_WHITELISTED_ASSETS
Whitelisted assets management for Tokenized Vault V2.
Token ABIs
ABI_ERC20
Standard ERC20 token contract ABI.
Main Functions:
balanceOf(address account)- Get token balanceallowance(address owner, address spender)- Check allowanceapprove(address spender, uint256 amount)- Approve spendingtransfer(address to, uint256 amount)- Transfer tokenstransferFrom(address from, address to, uint256 amount)- Transfer fromtotalSupply()- Get total supplydecimals()- Get token decimalssymbol()- Get token symbolname()- Get token name
Example:
ABI_ERC4626
Standard ERC4626 tokenized vault ABI.
Main Functions:
deposit(uint256 assets, address receiver)mint(uint256 shares, address receiver)withdraw(uint256 assets, address receiver, address owner)redeem(uint256 shares, address receiver, address owner)asset()- Get underlying assettotalAssets()- Get total managed assetsconvertToShares(uint256 assets)convertToAssets(uint256 shares)previewDeposit(uint256 assets)previewMint(uint256 shares)previewWithdraw(uint256 assets)previewRedeem(uint256 shares)
ABI_ERC721
Standard ERC721 NFT contract ABI.
Main Functions:
balanceOf(address owner)ownerOf(uint256 tokenId)transferFrom(address from, address to, uint256 tokenId)safeTransferFrom(address from, address to, uint256 tokenId)approve(address to, uint256 tokenId)getApproved(uint256 tokenId)setApprovalForAll(address operator, bool approved)
Utility ABIs
ABI_LOAN
Loan contract ABI for August lending protocol.
Main Functions:
principal()- Get loan principalapr()- Get annual percentage rateborrower()- Get borrower addresslender()- Get lender addresspaymentInterval()- Get payment frequencymakePayment(uint256 amount)- Make loan payment
ABI_REWARD_DISTRIBUTOR
Reward distribution contract ABI.
Main Functions:
claimRewards(address user)- Claim pending rewardspendingRewards(address user)- Check pending rewardsrewardToken()- Get reward token address
Using ABIs
Creating Contract Instances
Reading Contract Data
Writing to Contracts
Last updated