approvalEvents method

Stream<Approval> approvalEvents({
  1. BlockNum? fromBlock,
  2. BlockNum? toBlock,
})

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

Implementation

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