UNPKG

@molecularlabs/nucleus-frontend

Version:
34 lines 766 B
import { erc20Abi } from "viem"; import { getClient } from "../lib/client"; async function getVaultAllowance({ tokenAddress, spenderAddress, userAddress, chainId }) { const client = await getClient(chainId); const allowance = await client.readContract({ abi: erc20Abi, address: tokenAddress, functionName: "allowance", args: [userAddress, spenderAddress] }); return allowance; } async function getTotalSupply({ tokenAddress, chainId }) { const client = await getClient(chainId); const totalSupply = await client.readContract({ abi: erc20Abi, address: tokenAddress, functionName: "totalSupply" }); return totalSupply; } export { getTotalSupply, getVaultAllowance }; //# sourceMappingURL=boring-vault.mjs.map