getUnderlyingDecimals()
Returns the number of decimals used by the vault's underlying ERC20 token. Useful when formatting amounts or constructing BigInt inputs.
Parameters
- None
Returns
Example
const decimals = await vault.getUnderlyingDecimals();
console.log("Underlying decimals:", decimals);
const oneUnit = BigInt(10) ** BigInt(decimals);
console.log("One unit in base:", oneUnit.toString());
Example response
18