Documentation ¶
Overview ¶
package filters implements an ethereum filtering system for block, transactions and log events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountChange ¶
type AccountChange struct {
Address, StateAddress []byte
}
type Filter ¶
type Filter struct { BlockCallback func(*types.Block, vm.Logs) TransactionCallback func(*types.Transaction) LogsCallback func(vm.Logs) // contains filtered or unexported fields }
Filtering interface
func New ¶
Create a new filter which uses a bloom filter on blocks to figure out whether a particular block is interesting or not.
func (*Filter) SetAddresses ¶
func (*Filter) SetBeginBlock ¶
Set the earliest and latest block for filtering. -1 = latest block (i.e., the current block) hash = particular hash from-to
func (*Filter) SetEndBlock ¶
type FilterSystem ¶
type FilterSystem struct {
// contains filtered or unexported fields
}
FilterSystem manages filters that filter specific events such as block, transaction and log events. The Filtering system can be used to listen for specific LOG events fired by the EVM (Ethereum Virtual Machine).
func NewFilterSystem ¶
func NewFilterSystem(mux *event.TypeMux) *FilterSystem
NewFilterSystem returns a newly allocated filter manager
func (*FilterSystem) Add ¶
func (fs *FilterSystem) Add(filter *Filter) (id int)
Add adds a filter to the filter manager
func (*FilterSystem) Get ¶
func (fs *FilterSystem) Get(id int) *Filter
Get retrieves a filter installed using Add The filter may not be modified.
func (*FilterSystem) Remove ¶
func (fs *FilterSystem) Remove(id int)
Remove removes a filter by filter id
func (*FilterSystem) Stop ¶
func (fs *FilterSystem) Stop()
Stop quits the filter loop required for polling events