vaultAddress needed by getVaultAPY and getVaultTVL.
Import
Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
assetAddress | Address | Yes | Token contract address (e.g., USDC) |
yieldType | YieldType | Yes | Yield strategy (CORE, TREASURY, FRONTIER) |
chainId | number | Yes | Blockchain network ID |
Return Type
Returns the matchingAmplifyVault, or null if no vault matches.
vault.boringVaultAddress (pass as vaultAddress to display helpers) and name (pass as vaultName to transaction functions).
Example: Vault Discovery → APY Display
Example: React Component
Error Handling
| Error Message Pattern | Description | Resolution |
|---|---|---|
"SDK not initialized" | SDK not initialized | Call initAmplifySDK() first |
null (not an error) when no vault matches the given parameters. Always check the return value before accessing vault properties.
Related
- getVaultAPY - Fetch vault APY (requires vault address)
- getVaultTVL - Fetch vault TVL (requires vault address)
- getSupportedAssets - Discover supported tokens and chains