ethSupply method Null safety

Future<EtherScanSupplyModel> ethSupply ()

Returns total supply of ether

Example

var supply = eth.ethSupply();

Implementation

Future<EtherScanSupplyModel> ethSupply() async {
  const module = 'stats';
  const action = 'ethsupply';

  Map<String, dynamic>? query = {
    'module': module,
    'action': action,
    'apiKey': apiKey,
  };

  return (await get(query)).fold(
    (l) => EtherScanSupplyModel.empty(),
    (r) => EtherScanSupplyModel.fromJson(r),
  );
}