Class PredeterminedBalances<T>

PredeterminedBalances represents the predetermined balances for an approval. This allows you to define an approval where Transfer A happens first, then Transfer B, then Transfer C, etc. The order of the transfers is defined by the orderCalculationMethod. The order number 0 represents the first transfer, 1 represents the second transfer, etc.

IMPORTANT: if the balances of the transfer do not exactly match the predetermined balances, then the transfer will fail.

Type Parameters

Hierarchy (view full)

Implements

Constructors

Properties

incrementedBalances: IncrementedBalances<T>

Define a starting balance and increment the badge IDs and owned times by a certain amount after each transfer. Cannot be used with manualBalances. Order number corresponds to number of times we increment.

manualBalances: ManualBalances<T>[]

Manually define the balances for each transfer. Cannot be used with incrementedBalances. Order number corresponds to the index of the balance in the array.

orderCalculationMethod: PredeterminedOrderCalculationMethod

The order calculation method.

Methods

  • Compares this object's fields to another object's fields for equality. Equality is determined by comparing the JSON representations of the objects.

    If normalizeNumberTypes is true, then all number types will be compared as strings (i.e. "1n" === "1" === 1). Else, they will be compared as their native types (i.e. 1n !== 1 !== "1").

    Type Parameters

    Parameters

    • other: undefined | null | CustomType<U>
    • Optional normalizeNumberTypes: boolean

    Returns boolean