TokenEvent.nativeToken constructor

  1. @FreezedUnionValue('native')
const TokenEvent.nativeToken({
  1. @Default('FUSE') String symbol,
  2. @Default('Fuse Token') String name,
  3. @Default(18) int decimals,
  4. @Default(Variables.NATIVE_TOKEN_ADDRESS) String address,
  5. @JsonKey(fromJson: amountFromJson) required BigInt value,
  6. String? to,
  7. String? from,
})

Represents a native token event.

Parameters:

  • symbol – The symbol of the token. Default is 'FUSE'.
  • name – The name of the token. Default is 'Fuse Token'.
  • decimals – The number of decimals the token uses. Default is 18.
  • address – The address of the token. Default is the native token address.
  • value – The value associated with the token event.

Implementation

@FreezedUnionValue('native')
const factory TokenEvent.nativeToken({
  @Default('FUSE') String symbol,
  @Default('Fuse Token') String name,
  @Default(18) int decimals,
  @Default(Variables.NATIVE_TOKEN_ADDRESS) String address,
  @JsonKey(
    fromJson: amountFromJson,
  )
  required BigInt value,
  String? to,
  String? from,
}) = NativeToken;