transferEvents method

Stream<Transfer> transferEvents({
  1. BlockNum? fromBlock,
  2. BlockNum? toBlock,
})

Returns a live stream of all Transfer events emitted by this contract.

Implementation

Stream<Transfer> transferEvents({
  _i1.BlockNum? fromBlock,
  _i1.BlockNum? toBlock,
}) {
  final event = self.event('Transfer');
  final filter = _i1.FilterOptions.events(
    contract: self,
    event: event,
    fromBlock: fromBlock,
    toBlock: toBlock,
  );
  return client.events(filter).map((_i1.FilterEvent result) {
    final decoded = event.decodeResults(
      result.topics!,
      result.data!,
    );
    return Transfer(decoded);
  });
}