diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/contract.js | 4 | ||||
-rw-r--r-- | lib/filter.js | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/contract.js b/lib/contract.js index 0bf3ee471..eff16cca4 100644 --- a/lib/contract.js +++ b/lib/contract.js @@ -110,7 +110,7 @@ var addFunctionsToContract = function (contract, desc, address) { var addEventRelatedPropertiesToContract = function (contract, desc, address) { contract.address = address; - Object.defineProperty(contract, 'topics', { + Object.defineProperty(contract, 'topic', { get: function() { return abi.filterEvents(desc).map(function (e) { return abi.methodSignature(e.name); @@ -134,7 +134,7 @@ var addEventsToContract = function (contract, desc, address) { impl.address = address; - Object.defineProperty(impl, 'topics', { + Object.defineProperty(impl, 'topic', { get: function() { return [abi.methodSignature(e.name)]; } diff --git a/lib/filter.js b/lib/filter.js index e6d09beed..39309fb27 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -33,10 +33,13 @@ var Filter = function(options, impl) { if (typeof options !== "string") { // evaluate lazy properties + if (options.topics) { + console.warn('"topics" is deprecated, use "topic" instead'); + } + options = { to: options.to, topic: options.topic, - topics: options.topics, earliest: options.earliest, latest: options.latest, max: options.max, |