Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
2e64ca7e
Commit
2e64ca7e
authored
Aug 22, 2019
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement eth_getFilterLogs
parent
299b25b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
logsManager.js
remix-lib/src/execution/logsManager.js
+7
-0
README.md
remix-simulator/README.md
+1
-1
filters.js
remix-simulator/src/methods/filters.js
+6
-1
No files found.
remix-lib/src/execution/logsManager.js
View file @
2e64ca7e
...
@@ -73,6 +73,13 @@ class LogsManager {
...
@@ -73,6 +73,13 @@ class LogsManager {
return
matchedSubscriptions
return
matchedSubscriptions
}
}
getLogsForSubscription
(
subscriptionId
)
{
const
subscriptionParams
=
this
.
subscriptions
[
subscriptionId
]
const
[
_queryType
,
queryFilter
]
=
subscriptionParams
return
this
.
getLogsFor
(
queryFilter
);
}
transmit
(
result
)
{
transmit
(
result
)
{
this
.
notificationCallbacks
.
forEach
((
callback
)
=>
{
this
.
notificationCallbacks
.
forEach
((
callback
)
=>
{
if
(
result
.
params
.
result
.
raw
)
{
if
(
result
.
params
.
result
.
raw
)
{
...
...
remix-simulator/README.md
View file @
2e64ca7e
...
@@ -45,7 +45,7 @@ Implemented:
...
@@ -45,7 +45,7 @@ Implemented:
*
[
_
]
eth_newPendingTransactionFilter
*
[
_
]
eth_newPendingTransactionFilter
*
[
_
]
eth_uninstallFilter
*
[
_
]
eth_uninstallFilter
*
[
_
]
eth_getFilterChanges
*
[
_
]
eth_getFilterChanges
*
[
_
]
eth_getFilterLogs
*
[
X
]
eth_getFilterLogs
*
[
X
]
eth_getLogs
*
[
X
]
eth_getLogs
*
[
_
]
eth_getWork
*
[
_
]
eth_getWork
*
[
_
]
eth_submitWork
*
[
_
]
eth_submitWork
...
...
remix-simulator/src/methods/filters.js
View file @
2e64ca7e
...
@@ -13,7 +13,12 @@ Filters.prototype.methods = function () {
...
@@ -13,7 +13,12 @@ Filters.prototype.methods = function () {
}
}
}
}
// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs
Filters
.
prototype
.
eth_getFilterLogs
=
function
(
payload
,
cb
)
{
let
subscriptionId
=
payload
.
params
[
0
];
let
results
=
executionContext
.
logsManager
.
getLogsForSubscription
(
subscriptionId
)
cb
(
null
,
results
)
}
Filters
.
prototype
.
eth_getLogs
=
function
(
payload
,
cb
)
{
Filters
.
prototype
.
eth_getLogs
=
function
(
payload
,
cb
)
{
let
results
=
executionContext
.
logsManager
.
getLogsFor
(
payload
.
params
[
0
])
let
results
=
executionContext
.
logsManager
.
getLogsFor
(
payload
.
params
[
0
])
cb
(
null
,
results
)
cb
(
null
,
results
)
...
...
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