UNPKG

@orbs-network/contracts-js

Version:

Provides easy to use JS (TS) interfaces to interact with the Orbs Ethereum contracts

10 lines (7 loc) 294 B
import web3 from "web3"; export function fullOrbsFromWeiOrbs(weiOrbsString: string): number { return parseFloat(web3.utils.fromWei(weiOrbsString, "ether")); } export function weiOrbsFromFullOrbs(fullOrbs: number): bigint { return BigInt(web3.utils.toWei(fullOrbs.toString(), "ether")); }