* * @author Peter Lai * @license MIT */ namespace Web3\Formatters; use InvalidArgumentException; use Web3\Utils; use Web3\Formatters\IFormatter; class BigNumberFormatter implements IFormatter { /** * format * * @param mixed $value * @return string */ public static function format($value) { $value = Utils::toString($value); $bn = Utils::toBn($value); return $bn; } }