ABI Functions
Contract ABIs bundled with the Upshift SDK — vaults, receipt tokens, the swap router, loans, rewards, and the infrastructure contracts the SDK reads.
The SDK ships every ABI it uses as an as const array, so you can call the same contracts directly with ethers or viem and keep full type inference. All of them are exported from the package root with the ABI_ prefix; the one exception is RWA_REDEEM_SUBACCOUNT. The complete type dump of each ABI is on the ABIs reference page. This page groups them by purpose and lists the functions integrators actually call.
Typed contracts with createContract
createContract wraps ethers.Contract with address validation and infers the method surface from the ABI. It returns undefined when the address fails validation, so check the result before calling.
import { createContract, ABI_TOKENIZED_VAULT_V2 } from '@augustdigital/sdk';
const vault = createContract({
address: '0x...',
abi: ABI_TOKENIZED_VAULT_V2,
provider,
});
if (!vault) throw new Error('Invalid vault address');
const sharePrice = await vault.getSharePrice();Which ABI does my vault use?
| Vault generation | ABI | Deposit | Redemption |
|---|---|---|---|
| EVM-1 lending pool — single asset, the pool is the share token | ABI_LENDING_POOLS, ABI_LENDING_POOL_V2, ABI_LENDING_POOL_V3 | deposit(uint256 assets, address receiver) | requestRedeem queues, claim after the lag period; V3 adds instantRedeem |
| EVM-2 tokenized vault — multi-asset, separate receipt token | ABI_TOKENIZED_VAULT_V2 and its variants | deposit(address assetIn, uint256 amountIn, address receiverAddr) | requestRedeem queues, claim after the lag period; instantRedeem where enabled |
The SDK's vaultDeposit and vaultRequestRedeem detect the generation and pick the ABI for you (see EVM Actions). Reach for these ABIs directly only when you need a call the SDK does not wrap.
Vault ABIs
ABI_LENDING_POOLS, ABI_LENDING_POOL_V2, ABI_LENDING_POOL_V3
EVM-1 lending pools. The pool contract is also the share token, so balanceOf(address) returns shares. V1 and V2 share the same integrator surface (V2 adds an admin function); V3 adds instant redemption, management fees, and subaccount deposits.
import { ABI_LENDING_POOL_V2, ABI_LENDING_POOL_V3 } from '@augustdigital/sdk';Deposits and redemptions:
deposit(uint256 assets, address receiver)— deposit the underlying asset and mint shares toreceivermint(uint256 shares, address receiver)requestRedeem(uint256 shares, address receiverAddr, address holderAddr)— queue a redemption ofholderAddr's shares, paid toreceiverAddrafter the lag periodclaim(uint256 year, uint256 month, uint256 day, address receiverAddr)— claim the redemption scheduled for that dateredeem(uint256, address, address)andwithdraw(uint256, address, address)— the ERC-4626 entry pointsinstantRedeem(uint256 shares, address receiverAddr, address holderAddr)— V3 only, chargedinstantRedemptionFee()
Reads:
asset(),totalAssets(),convertToShares(uint256 assets),convertToAssets(uint256 shares)previewDeposit(uint256 assets),previewRedeem(uint256 shares), and on V3previewInstantRedemption(uint256 shares)maxDeposit(address),maxDepositAmount(),maxWithdrawalAmount()getWithdrawalEpoch(),lagDuration()— when queued redemptions settlegetRequirementByDate(year, month, day),getScheduledTransactionsByDate(year, month, day),getClaimableAmountByReceiver(year, month, day, receiverAddr),getBurnableAmountByReceiver(year, month, day, receiverAddr)depositsPaused(),withdrawalsPaused(),withdrawalFee()- V3:
managementFeePercent(),externalAssets(),assetsUpdatedOn()
Example
import { ethers } from 'ethers';
import { ABI_LENDING_POOL_V2 } from '@augustdigital/sdk';
const vault = new ethers.Contract('0xVaultAddress...', ABI_LENDING_POOL_V2, provider);
const [totalAssets, assetAddress, decimals, lag] = await Promise.all([
vault.totalAssets(),
vault.asset(),
vault.decimals(),
vault.lagDuration(),
]);
console.log(`TVL: ${ethers.formatUnits(totalAssets, decimals)}`);
console.log('Asset:', assetAddress, 'redemption lag:', lag.toString());ABI_TOKENIZED_VAULT_V2
EVM-2 tokenized vaults: deposits in any whitelisted asset, priced against a reference asset; shares issued as a separate receipt token (lpTokenAddress()); instant or queued redemption.
import { ABI_TOKENIZED_VAULT_V2 } from '@augustdigital/sdk';Two variants carry the same base surface:
ABI_TOKENIZED_VAULT_V2_DEPOSIT_WITH_PERMITaddsdepositWithPermit(...)— an EIP-2612 permit-based deposit (asset, amount, receiver, deadline,r,s,v) that skips the separateapprovetransaction.ABI_TOKENIZED_VAULT_V2_WHITELISTED_ALLOCATIONis the permit variant with per-depositor allocation caps enforced through the sender whitelist.
Deposits and redemptions:
deposit(address assetIn, uint256 amountIn, address receiverAddr)— deposit any whitelisted assetpreviewDeposit(address assetIn, uint256 amountIn)— shares a deposit would mintrequestRedeem(uint256 shares, address receiverAddr)— queue a redemptioninstantRedeem(uint256 shares, address receiverAddr)— settle now, chargedinstantRedemptionFee()previewRedemption(uint256 shares, bool isInstant)— payout for either pathclaim(uint256 year, uint256 month, uint256 day, address receiverAddr)— claim a processed queued redemption
Reads:
getSharePrice(),getTotalAssets(),asset(),lpTokenAddress(),assetsWhitelistAddress(),sendersWhitelistAddress()depositCap(),maxDepositAmount(),maxWithdrawalAmount(),depositsPaused(),withdrawalsPaused()getWithdrawalEpoch(),lagDuration(),getRequirementByDate(...),getScheduledTransactionsByDate(...),getBurnableAmountByReceiver(...)- Fees:
managementFeePercent(),performanceFeeRate(),highWatermark(),withdrawalFee(),instantRedemptionFee() - NAV reporting:
externalAssets(),assetsUpdatedOn()
ABI_TOKENIZED_VAULT_V2_RECEIPT
The EVM-2 share token: an ERC-20 with EIP-2612 permit, and a LayerZero OFT so shares can move between the hub chain and spoke chains.
import { ABI_TOKENIZED_VAULT_V2_RECEIPT } from '@augustdigital/sdk';- ERC-20:
balanceOf,allowance,approve,transfer,transferFrom,decimals,totalSupply - Permit:
permit(address holderAddr, address spenderAddr, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s),nonces(address),DOMAIN_SEPARATOR() - OFT:
send(SendParam, MessagingFee, address refundAddress)(payable),quoteSend(SendParam, bool payInLzToken),quoteOFT(SendParam),peers(uint32 eid),sharedDecimals(),token()
The SDK's cross-chain (OVault) helpers are built on this ABI.
ABI_TOKENIZED_VAULT_V2_WHITELISTED_ASSETS
The asset whitelist an EVM-2 vault prices deposits against — the contract returned by the vault's assetsWhitelistAddress().
getWhitelistedAssets(),isWhitelisted(address assetAddr)REFERENCE_ASSET(),REFERENCE_ASSET_DECIMALS()fromInputAssetToReferenceAsset(address assetAddr, uint256 amount)— oracle conversion into the reference assetgetOracleAddress(address assetAddr),maxOracleUpdatesDuration(address assetAddr)getTotalAssetsValuation(uint256 externalAssets)
ABI_TOKENIZED_VAULT_V2_SENDER_ALLOCATION_WHITELIST
Per-depositor allocation caps for allocation-gated vaults — the contract returned by the vault's sendersWhitelistAddress().
isWhitelisted(address addr),getAllocationBps(address addr),deposited(address addr)getRemainingAllocation(address addr, uint256 depositCapAmount),MAX_BPS()
Deposit helpers
ABI_SWAP_ROUTER— the router behind swap-and-deposit and origin-code attribution:deposit(bytes32 originCode, uint256 depositAmount, address vaultAddr, address assetAddr, address receiverAddr),depositNativeToken(bytes32 originCode, address vaultAddr, address receiverAddr)(payable),swapAndDeposit(bytes32 originCode, address vaultAddr, address receiverAddr, SwapParams[] swapParams),swapAndDepositNativeToken(bytes32 originCode, address vaultAddr, address receiverAddr)(payable). Reads:vaultInfo(address),whitelistedTokens(address),origins(bytes32),isPaused(),NATIVE_TOKEN_ADDRESS(). Origin codes are explained on the Fee sharing page.ABI_MULTI_ASSET_NATIVE_DEPOSIT_WRAPPER— wraps the chain's native token and deposits it:depositNative(address receiver)anddepositNative()(both payable),vault(),wrappedToken().ABI_MULTI_ASSET_PREVIEW_DEPOSIT(previewDeposit(address, uint256)),ABI_MULTI_ASSET_PREVIEW_REDEEM(previewRedemption(uint256, bool)) andABI_STANDARD_PREVIEW_REDEEM(previewRedeem(uint256)) — minimal ABIs the SDK uses to preview across vault generations.ABI_WRAPPER_ADAPTER— Kelp rsETH adapter:depositETH(address referralId)(payable),depositWETH(uint256 amount, address referralId),getRsETHAmountToMint(address asset, uint256 depositAmount).ABI_POOL_ADAPTER— legacyswapAndDeposit(params)adapter.
Token ABIs
ABI_ERC20, ABI_ERC20_BYTES32, ABI_CROSS_CHAIN_ERC20
import { ABI_ERC20 } from '@augustdigital/sdk';ABI_ERC20 is the standard interface: balanceOf(address account), allowance(address owner, address spender), approve(address spender, uint256 amount), transfer(address to, uint256 amount), transferFrom(address from, address to, uint256 amount), totalSupply(), decimals(), symbol(), name().
ABI_ERC20_BYTES32 is the same surface for tokens whose name() and symbol() return bytes32 (MKR-style). ABI_CROSS_CHAIN_ERC20 is the minimal allowance/approve pair used by the cross-chain flows.
Example
import { ethers } from 'ethers';
import { ABI_ERC20 } from '@augustdigital/sdk';
const token = new ethers.Contract('0xTokenAddress...', ABI_ERC20, provider);
const balance = await token.balanceOf('0xWalletAddress...');
const signer = await provider.getSigner();
const decimals = await token.decimals();
const spending = new ethers.Contract('0xTokenAddress...', ABI_ERC20, signer);
const tx = await spending.approve('0xVaultAddress...', ethers.parseUnits('100', decimals));
await tx.wait();ABI_ERC4626
Standard tokenized-vault interface, useful for third-party ERC-4626 vaults the SDK reads.
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(),totalAssets(),convertToShares(uint256 assets),convertToAssets(uint256 shares)previewDeposit,previewMint,previewWithdraw,previewRedeemmaxDeposit,maxMint,maxWithdraw,maxRedeem
ABI_ERC721
Standard NFT interface: balanceOf(address owner), ownerOf(uint256 tokenId), tokenURI(uint256 tokenId), transferFrom(address from, address to, uint256 tokenId), safeTransferFrom(...), approve(address to, uint256 tokenId), getApproved(uint256 tokenId), setApprovalForAll(address operator, bool approved), isApprovedForAll(address owner, address operator).
Credit and rewards
ABI_LOAN
Loan contracts funded by lending pools.
import { ABI_LOAN } from '@augustdigital/sdk';- Parties and tokens:
borrower(),lender(),principalToken(),collateralToken() - Terms:
principalAmount(),currentApr(),paymentIntervalInSeconds(),getNextPaymentDate(),getDebt(),loanState() - Collateral:
getCollateralRequirements() - Repayment:
repayInterests(),repayPrincipal(uint256 paymentAmountInTokens),repay(uint256 paymentAmount)
ABI_REWARD_DISTRIBUTOR
Staking-based reward distribution.
import { ABI_REWARD_DISTRIBUTOR } from '@augustdigital/sdk';stake(uint256 amount),withdraw(uint256 amount),getReward()earned(address account),balanceOf(address account),totalStaked(),rewardsPerSecond(),stakingToken()
RWA_REDEEM_SUBACCOUNT
The RWA Clear redemption subaccount. Exported without the ABI_ prefix.
previewRedemption(address asset, uint256 amount),redeemAsset(address asset, uint256 amount, uint256 minOut)redeemableAssets(address asset),getRedeemableAssetsList(),availableLiquidity(),maxRedemptionPerTx(),redemptionsPaused()REFERENCE_ASSET(),REFERENCE_ASSET_DECIMALS()
Infrastructure ABIs
ABI_MULTICALL3—aggregate3(Call3[]). The SDK batches per-vault reads through it on chains where the canonical deployment is verified.ABI_CHAINLINK_V3—latestRoundData(),getRoundData(uint80 roundId),decimals(),description().ABI_FEE_ORACLE—getContextFeeRate(bytes32 categoryId, address specificAddr),getContextFeeAmount(uint256 amount, bytes32 categoryId, address specificAddr),FEES_DIVISOR().- ENS:
ABI_ADDRESS_RESOLVER(addr(bytes32 node)),ABI_TEXT_RESOLVER(text(bytes32 node, string key)),ABI_UNIVERSAL_RESOLVER_RESOLVE(resolve(bytes name, bytes data)). - Signatures:
ABI_SMART_ACCOUNT(isValidSignature(bytes32, bytes), ERC-1271) andABI_UNIVERSAL_SIGNATURE_VALIDATOR(the ERC-6492 deployless validator; a constructor-only ABI executed througheth_call).
Using ABIs directly
Reading
import { ethers } from 'ethers';
import { ABI_TOKENIZED_VAULT_V2 } from '@augustdigital/sdk';
const vault = new ethers.Contract('0xVaultAddress...', ABI_TOKENIZED_VAULT_V2, provider);
const [sharePrice, totalAssets, receiptToken] = await Promise.all([
vault.getSharePrice(),
vault.getTotalAssets(),
vault.lpTokenAddress(),
]);Writing
import { ethers } from 'ethers';
import { ABI_ERC20, ABI_TOKENIZED_VAULT_V2 } from '@augustdigital/sdk';
const signer = await provider.getSigner();
const owner = await signer.getAddress();
const asset = new ethers.Contract(assetAddress, ABI_ERC20, signer);
const decimals = await asset.decimals();
const amount = ethers.parseUnits('100', decimals);
const approveTx = await asset.approve(vaultAddress, amount);
await approveTx.wait();
const vault = new ethers.Contract(vaultAddress, ABI_TOKENIZED_VAULT_V2, signer);
const depositTx = await vault.deposit(assetAddress, amount, owner);
await depositTx.wait();For most integrations sdk.evm.vaultDeposit is the better path: it detects the vault generation, handles approvals, native wrapping and swaps, and validates every input before broadcasting. See EVM Actions.