mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-25 12:57:17 +00:00
topics are deprecated
This commit is contained in:
parent
e380462532
commit
600c9dd27d
9
dist/ethereum.js
vendored
9
dist/ethereum.js
vendored
@ -541,7 +541,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);
|
||||
@ -565,7 +565,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)];
|
||||
}
|
||||
@ -706,10 +706,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,
|
||||
|
6
dist/ethereum.js.map
vendored
6
dist/ethereum.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethereum.min.js
vendored
2
dist/ethereum.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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)];
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user