TokenDetails.native constructor

  1. @Implements<IToken>()
  2. @FreezedUnionValue('native')
const TokenDetails.native({
  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 amount,
})

Constructs a new Native token instance.

Parameters:

  • symbol – The symbol of the native token (default: 'FUSE').
  • name – The name of the native token (default: 'Fuse Token').
  • decimals – The number of decimals for the native token (default: 18).
  • address – The address of the native token (default: Variables.NATIVE_TOKEN_ADDRESS).
  • amount – The amount of the native token.

Implementation

@Implements<IToken>()
@FreezedUnionValue('native')
const factory TokenDetails.native({
  @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 amount,
}) = Native;