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
edfb8745
Commit
edfb8745
authored
Jan 21, 2015
by
Marek Kotewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in filter.js (not yet working)
parent
c2d9c1a6
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
50 deletions
+20
-50
ethereum.js
dist/ethereum.js
+8
-23
ethereum.js.map
dist/ethereum.js.map
+3
-3
ethereum.min.js
dist/ethereum.min.js
+1
-1
contract.js
lib/contract.js
+0
-2
filter.js
lib/filter.js
+8
-21
No files found.
dist/ethereum.js
View file @
edfb8745
...
...
@@ -434,8 +434,6 @@ module.exports = {
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
var
abi
=
require
(
'./abi'
);
/**
* This method should be called when we want to call / transact some solidity method from javascript
* it returns an object which has same methods available as solidity contract description
...
...
@@ -544,13 +542,9 @@ var Filter = function(options, impl) {
this
.
impl
=
impl
;
this
.
callbacks
=
[];
var
self
=
this
;
this
.
promise
=
impl
.
newFilter
(
options
);
this
.
promise
.
then
(
function
(
id
)
{
self
.
id
=
id
;
web3
.
on
(
impl
.
changed
,
id
,
self
.
trigger
.
bind
(
self
));
web3
.
provider
.
startPolling
({
call
:
impl
.
changed
,
args
:
[
id
]},
id
);
});
this
.
id
=
impl
.
newFilter
(
options
);
web3
.
on
(
impl
.
changed
,
this
.
id
,
this
.
trigger
.
bind
(
this
));
web3
.
provider
.
startPolling
({
call
:
impl
.
changed
,
args
:
[
this
.
id
]},
this
.
id
);
};
/// alias for changed*
...
...
@@ -560,10 +554,7 @@ Filter.prototype.arrived = function(callback) {
/// gets called when there is new eth/shh message
Filter
.
prototype
.
changed
=
function
(
callback
)
{
var
self
=
this
;
this
.
promise
.
then
(
function
(
id
)
{
self
.
callbacks
.
push
(
callback
);
});
this
.
callbacks
.
push
(
callback
);
};
/// trigger calling new message from people
...
...
@@ -575,20 +566,14 @@ Filter.prototype.trigger = function(messages) {
/// should be called to uninstall current filter
Filter
.
prototype
.
uninstall
=
function
()
{
var
self
=
this
;
this
.
promise
.
then
(
function
(
id
)
{
self
.
impl
.
uninstallFilter
(
id
);
web3
.
provider
.
stopPolling
(
id
);
web3
.
off
(
impl
.
changed
,
id
);
});
this
.
impl
.
uninstallFilter
(
this
.
id
);
web3
.
provider
.
stopPolling
(
this
.
id
);
web3
.
off
(
impl
.
changed
,
this
.
id
);
};
/// should be called to manually trigger getting latest messages from the client
Filter
.
prototype
.
messages
=
function
()
{
var
self
=
this
;
return
this
.
promise
.
then
(
function
(
id
)
{
return
self
.
impl
.
getMessages
(
id
);
});
return
this
.
impl
.
getMessages
(
this
.
id
);
};
/// alias for messages
...
...
dist/ethereum.js.map
View file @
edfb8745
This diff is collapsed.
Click to expand it.
dist/ethereum.min.js
View file @
edfb8745
This diff is collapsed.
Click to expand it.
lib/contract.js
View file @
edfb8745
...
...
@@ -23,8 +23,6 @@
var
web3
=
require
(
'./web3'
);
// jshint ignore:line
var
abi
=
require
(
'./abi'
);
/**
* This method should be called when we want to call / transact some solidity method from javascript
* it returns an object which has same methods available as solidity contract description
...
...
lib/filter.js
View file @
edfb8745
...
...
@@ -31,13 +31,9 @@ var Filter = function(options, impl) {
this
.
impl
=
impl
;
this
.
callbacks
=
[];
var
self
=
this
;
this
.
promise
=
impl
.
newFilter
(
options
);
this
.
promise
.
then
(
function
(
id
)
{
self
.
id
=
id
;
web3
.
on
(
impl
.
changed
,
id
,
self
.
trigger
.
bind
(
self
));
web3
.
provider
.
startPolling
({
call
:
impl
.
changed
,
args
:
[
id
]},
id
);
});
this
.
id
=
impl
.
newFilter
(
options
);
web3
.
on
(
impl
.
changed
,
this
.
id
,
this
.
trigger
.
bind
(
this
));
web3
.
provider
.
startPolling
({
call
:
impl
.
changed
,
args
:
[
this
.
id
]},
this
.
id
);
};
/// alias for changed*
...
...
@@ -47,10 +43,7 @@ Filter.prototype.arrived = function(callback) {
/// gets called when there is new eth/shh message
Filter
.
prototype
.
changed
=
function
(
callback
)
{
var
self
=
this
;
this
.
promise
.
then
(
function
(
id
)
{
self
.
callbacks
.
push
(
callback
);
});
this
.
callbacks
.
push
(
callback
);
};
/// trigger calling new message from people
...
...
@@ -62,20 +55,14 @@ Filter.prototype.trigger = function(messages) {
/// should be called to uninstall current filter
Filter
.
prototype
.
uninstall
=
function
()
{
var
self
=
this
;
this
.
promise
.
then
(
function
(
id
)
{
self
.
impl
.
uninstallFilter
(
id
);
web3
.
provider
.
stopPolling
(
id
);
web3
.
off
(
impl
.
changed
,
id
);
});
this
.
impl
.
uninstallFilter
(
this
.
id
);
web3
.
provider
.
stopPolling
(
this
.
id
);
web3
.
off
(
impl
.
changed
,
this
.
id
);
};
/// should be called to manually trigger getting latest messages from the client
Filter
.
prototype
.
messages
=
function
()
{
var
self
=
this
;
return
this
.
promise
.
then
(
function
(
id
)
{
return
self
.
impl
.
getMessages
(
id
);
});
return
this
.
impl
.
getMessages
(
this
.
id
);
};
/// alias for messages
...
...
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