CurrencyAmount constructor

CurrencyAmount(
  1. Currency currency,
  2. BigInt numerator, {
  3. BigInt? denominator,
})

Implementation

CurrencyAmount(this.currency, BigInt numerator, {BigInt? denominator})
    : super(numerator, denominator: denominator ?? BigInt.one) {
  assert(super.quotient() <= maxUint256, 'can max big AMOUNT');
  decimalScale = BigInt.from(10).pow(currency.decimals);
}