import { EventsActions , IEventsCaught , IEventsClear , IEventsFollow , IEventsSetHeight } from './actionTypes' ; import { address_checker } from '../../utils/address_checker' ; import { Web3Event } from '../../state/events' ; export const EventsClear = ( entity ) : IEventsClear => ( { type : EventsActions . EventsClear , entity } ) ; export const EventsFollow = ( entity , event , args , contract , address , signature ) : IEventsFollow => ( { type : EventsActions . EventsFollow , entity , event , arguments : args , address : address_checker ( address ) , contract , signature } ) ; export const EventsCaught = ( entity , signature , infos ) : IEventsCaught => ( { type : EventsActions . EventsCaught , entity , signature , infos : { ... infos , address : address_checker ( infos . address ) } } ) ; export const EventsSetHeight = ( entity , signature , new_height ) : IEventsSetHeight => ( { type : EventsActions . EventsSetHeight , entity , signature , new_height } ) ;