• Creates BigDecimal number from BigInt.

    Example

    import { decimals } from "@protofire/subgraph-devkit";
    import { BigInt } from "@graphprotocol/graph-ts";

    const n = BigInt.fromI32(1000000);
    decimals.fromBigInt(n, 6); // => 1

    Returns

    the BigDecimal representation of the BigInt.

    Parameters

    • value: BigInt

      the BigInt number.

    • decimals: number

      the number of decimals.

    Returns BigDecimal

Generated using TypeDoc