CurrencyAmount.fromRawAmount constructor

CurrencyAmount.fromRawAmount(
  1. Currency currency,
  2. BigInt rawAmount
)

Returns a new currency amount instance from the unitless amount of token, i.e. the raw amount @param currency the currency in the amount @param rawAmount the raw token or ether amount

Implementation

factory CurrencyAmount.fromRawAmount(Currency currency, BigInt rawAmount) {
  assert(rawAmount <= maxUint256, 'can max big Unit');
  return CurrencyAmount(currency, rawAmount);
}