Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
688030ec
Commit
688030ec
authored
Jan 31, 2015
by
Marek Kotewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth.filter next param optional
parent
589c4fb3
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
9 deletions
+20
-9
ethereum.js
dist/ethereum.js
+4
-3
ethereum.js.map
dist/ethereum.js.map
+2
-2
ethereum.min.js
dist/ethereum.min.js
+1
-1
event.html
example/event.html
+9
-0
web3.js
lib/web3.js
+4
-3
No files found.
dist/ethereum.js
View file @
688030ec
...
@@ -1441,10 +1441,11 @@ var web3 = {
...
@@ -1441,10 +1441,11 @@ var web3 = {
},
},
/// @param filter may be a string, object or event
/// @param filter may be a string, object or event
/// @param indexed is optional, this may be an object with optional event indexed params
/// @param indexed is optional, this is an object with optional event indexed params
watch
:
function
(
filter
,
indexed
)
{
/// @param options is optional, this is an object with optional event options ('max'...)
watch
:
function
(
filter
,
indexed
,
options
)
{
if
(
filter
.
_isEvent
)
{
if
(
filter
.
_isEvent
)
{
return
filter
(
indexed
);
return
filter
(
indexed
,
options
);
}
}
return
new
web3
.
filter
(
filter
,
ethWatch
);
return
new
web3
.
filter
(
filter
,
ethWatch
);
}
}
...
...
dist/ethereum.js.map
View file @
688030ec
This diff is collapsed.
Click to expand it.
dist/ethereum.min.js
View file @
688030ec
This diff is collapsed.
Click to expand it.
example/event.html
View file @
688030ec
...
@@ -75,7 +75,13 @@
...
@@ -75,7 +75,13 @@
});
});
};
};
function
test8
()
{
// "{"topic":["0x83c9849c","000000000000000000000000000000000000000000000000000000000000001e"],"max":100,"address":"0x01"}"
web3
.
eth
.
watch
(
contract
.
Event
,
{
a
:
30
},
{
max
:
100
}).
changed
(
function
(
res
)
{
});
};
// not valid
// not valid
// function testX() {
// function testX() {
// web3.eth.watch([contract.Event, contract.Event2]).changed(function (res) {
// web3.eth.watch([contract.Event, contract.Event2]).changed(function (res) {
...
@@ -107,5 +113,8 @@
...
@@ -107,5 +113,8 @@
<div>
<div>
<button
type=
"button"
onClick=
"test7();"
>
test7
</button>
<button
type=
"button"
onClick=
"test7();"
>
test7
</button>
</div>
</div>
<div>
<button
type=
"button"
onClick=
"test8();"
>
test8
</button>
</div>
</body>
</body>
</html>
</html>
lib/web3.js
View file @
688030ec
...
@@ -250,10 +250,11 @@ var web3 = {
...
@@ -250,10 +250,11 @@ var web3 = {
},
},
/// @param filter may be a string, object or event
/// @param filter may be a string, object or event
/// @param indexed is optional, this may be an object with optional event indexed params
/// @param indexed is optional, this is an object with optional event indexed params
watch
:
function
(
filter
,
indexed
)
{
/// @param options is optional, this is an object with optional event options ('max'...)
watch
:
function
(
filter
,
indexed
,
options
)
{
if
(
filter
.
_isEvent
)
{
if
(
filter
.
_isEvent
)
{
return
filter
(
indexed
);
return
filter
(
indexed
,
options
);
}
}
return
new
web3
.
filter
(
filter
,
ethWatch
);
return
new
web3
.
filter
(
filter
,
ethWatch
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment