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
857a7182
Commit
857a7182
authored
May 30, 2019
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add eth_getBlockTransactionCountByHash and eth_getBlockTransactionCountByNumber
parent
baec74b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
10 deletions
+25
-10
README.md
remix-simulator/README.md
+9
-9
blocks.js
remix-simulator/src/methods/blocks.js
+16
-1
No files found.
remix-simulator/README.md
View file @
857a7182
...
...
@@ -17,9 +17,9 @@ Implemented:
*
[
X
]
eth_blockNumber
*
[
X
]
eth_getBalance
*
[
_
]
eth_getStorageAt
*
[
~
]
eth_getTransactionCount
*
[
_
]
eth_getBlockTransactionCountByHash
*
[
_
]
eth_getBlockTransactionCountByNumber
*
[
X
]
eth_getTransactionCount
*
[
X
]
eth_getBlockTransactionCountByHash
*
[
X
]
eth_getBlockTransactionCountByNumber
*
[
_
]
eth_getUncleCountByBlockHash
*
[
_
]
eth_getUncleCountByBlockNumber
*
[
X
]
eth_getCode
...
...
@@ -28,12 +28,12 @@ Implemented:
*
[
_
]
eth_sendRawTransaction
*
[
X
]
eth_call
*
[
~
]
eth_estimateGas
*
[
V
]
eth_getBlockByHash
*
[
V
]
eth_getBlockByNumber
*
[
V
]
eth_getTransactionByHash
*
[
V
]
eth_getTransactionByBlockHashAndIndex
*
[
V
]
eth_getTransactionByBlockNumberAndIndex
*
[
V
]
eth_getTransactionReceipt
*
[
X
]
eth_getBlockByHash
*
[
X
]
eth_getBlockByNumber
*
[
X
]
eth_getTransactionByHash
*
[
X
]
eth_getTransactionByBlockHashAndIndex
*
[
X
]
eth_getTransactionByBlockNumberAndIndex
*
[
X
]
eth_getTransactionReceipt
*
[
_
]
eth_getUncleByBlockHashAndIndex
*
[
_
]
eth_getUncleByBlockNumberAndIndex
*
[
X
]
eth_getCompilers (DEPRECATED)
...
...
remix-simulator/src/methods/blocks.js
View file @
857a7182
...
...
@@ -14,7 +14,9 @@ Blocks.prototype.methods = function () {
eth_gasPrice
:
this
.
eth_gasPrice
.
bind
(
this
),
eth_coinbase
:
this
.
eth_coinbase
.
bind
(
this
),
eth_blockNumber
:
this
.
eth_blockNumber
.
bind
(
this
),
eth_getBlockByHash
:
this
.
eth_getBlockByHash
.
bind
(
this
)
eth_getBlockByHash
:
this
.
eth_getBlockByHash
.
bind
(
this
),
eth_getBlockTransactionCountByHash
:
this
.
eth_getBlockTransactionCountByHash
.
bind
(
this
),
eth_getBlockTransactionCountByNumber
:
this
.
eth_getBlockTransactionCountByNumber
.
bind
(
this
)
}
}
...
...
@@ -96,4 +98,17 @@ Blocks.prototype.eth_blockNumber = function (payload, cb) {
cb
(
null
,
this
.
blockNumber
)
}
Blocks
.
prototype
.
eth_getBlockTransactionCountByHash
=
function
(
payload
,
cb
)
{
var
block
=
executionContext
.
blocks
[
payload
.
params
[
0
]]
cb
(
null
,
block
.
transactions
.
length
)
}
Blocks
.
prototype
.
eth_getBlockTransactionCountByNumber
=
function
(
payload
,
cb
)
{
var
block
=
executionContext
.
blocks
[
payload
.
params
[
0
]]
cb
(
null
,
block
.
transactions
.
length
)
}
module
.
exports
=
Blocks
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