event example
This commit is contained in:
@ -31,6 +31,19 @@ var Filter = function(options, impl) {
|
||||
this.impl = impl;
|
||||
this.callbacks = [];
|
||||
|
||||
if (typeof options !== "string") {
|
||||
// evaluate lazy properties
|
||||
options = {
|
||||
to: options.to,
|
||||
topics: options.topics,
|
||||
earliest: options.earliest,
|
||||
latest: options.latest,
|
||||
max: options.max,
|
||||
skip: options.skip,
|
||||
address: options.address
|
||||
};
|
||||
}
|
||||
|
||||
this.id = impl.newFilter(options);
|
||||
web3.provider.startPolling({call: impl.changed, args: [this.id]}, this.id, this.trigger.bind(this));
|
||||
};
|
||||
|
Reference in New Issue
Block a user