MCPcopy Create free account
hub / github.com/circlefin/arc-node / parseUnits

Method parseUnits

tests/helpers/FiatToken.ts:138–140  ·  view source on GitHub ↗

* parseUnits parse the ERC20 string amount to subunits. * @param amount {string} - the USDC ERC20 string amount, e.g. "0.000001" * @returns

(amount: string)

Source from the content-addressed store, hash-verified

136 * @returns
137 */
138 static parseUnits(amount: string): bigint {
139 return parseUnits(amount, USDC.decimals)
140 }
141
142 /**
143 * formatUnits convert the subunits to ERC20 string amount.

Callers 5

testCallTypeFunction · 0.80
subcall.test.tsFile · 0.80

Calls

no outgoing calls

Tested by 1

testCallTypeFunction · 0.64