UNPKG

@moonwell-fi/moonwell-sdk

Version:

TypeScript Interface for Moonwell

21 lines 895 B
import { Amount } from "../../common/index.js"; import { publicEnvironments, } from "../../environments/index.js"; import * as logger from "../../logger/console.js"; export async function getGovernanceTokenInfo(_client, args) { const logId = logger.start("getGovernanceTokenInfo", "Starting to get governance token info..."); if (args.governanceToken === "WELL") { const totalSupply = await publicEnvironments.moonbeam.contracts.governanceToken.read.totalSupply(); logger.end(logId); return { totalSupply: new Amount(totalSupply || 0n, 18), }; } else { const totalSupply = await publicEnvironments.moonriver.contracts.governanceToken.read.totalSupply(); logger.end(logId); return { totalSupply: new Amount(totalSupply || 0n, 18), }; } } //# sourceMappingURL=getGovernanceTokenInfo.js.map