import type { AddressLike } from '@enzymefinance/ethers' ; import { StandardToken } from '@enzymefinance/protocol' ; import { utils } from 'ethers' ; export async function getAssetBalances ( { account , assets } ) { return Promise . all ( assets . map ( ( asset ) => new StandardToken ( asset , provider ) . balanceOf ( account ) ) ) ; } export async function getAssetUnit ( asset ) { return utils . parseUnits ( '1' , await asset . decimals ( ) ) ; }