import { ethers } from "ethers"; import { bigNumAsInt } from "../utils/parse/parse"; type LevelInfo = { allocPoint: number[]; balance: number[]; requiredMaturity: number[]; }; export const getLevelInfo = async ( reliquaryContract: ethers.Contract, poolId: number ) => { const levelInfo = await reliquaryContract.getLevelInfo(poolId); return { ...levelInfo, allocPoint: levelInfo.allocPoint.map(bigNumAsInt), balance: levelInfo.balance.map(bigNumAsInt), requiredMaturity: levelInfo.requiredMaturity.map(bigNumAsInt), poolId: levelInfo.poolId, } as LevelInfo; };