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
bdb7ead3
Commit
bdb7ead3
authored
Apr 02, 2019
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement eth_coinbase
parent
6fab86e7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
7 deletions
+11
-7
README.md
remix-simulator/README.md
+1
-1
ethsim
remix-simulator/bin/ethsim
+4
-1
blocks.js
remix-simulator/src/methods/blocks.js
+3
-2
provider.js
remix-simulator/src/provider.js
+1
-1
server.js
remix-simulator/src/server.js
+2
-2
No files found.
remix-simulator/README.md
View file @
bdb7ead3
...
...
@@ -9,7 +9,7 @@ Implemented:
*
[
X
]
net_peerCount
*
[
X
]
eth_protocolVersion
*
[
X
]
eth_syncing
*
[
_
]
eth_coinbase
*
[
X
]
eth_coinbase
*
[
X
]
eth_mining
*
[
X
]
eth_hashrate
*
[
~
]
eth_gasPrice
...
...
remix-simulator/bin/ethsim
View file @
bdb7ead3
...
...
@@ -22,9 +22,12 @@ program
program
.
option
(
'-p, --port [port]'
,
'specify port'
)
.
option
(
'-b, --ip [host]'
,
'specify host'
)
.
option
(
'-c, --coinbase [coinbase]'
,
'specify host'
)
.
parse
(
process
.
argv
)
const
Server
=
require
(
'../src/server'
)
const
server
=
new
Server
()
const
server
=
new
Server
({
coinbase
:
program
.
coinbase
||
"0x0000000000000000000000000000000000000000"
})
server
.
start
(
program
.
host
||
'127.0.0.1'
,
program
.
port
||
8545
)
remix-simulator/src/methods/blocks.js
View file @
bdb7ead3
var
Blocks
=
function
()
{
var
Blocks
=
function
(
options
)
{
this
.
coinbase
=
options
.
coinbase
||
"0x0000000000000000000000000000000000000000"
}
Blocks
.
prototype
.
methods
=
function
()
{
...
...
@@ -17,7 +18,7 @@ Blocks.prototype.eth_getBlockByNumber = function (payload, cb) {
'gasUsed'
:
'0x0'
,
'hash'
:
'0xdb731f3622ef37b4da8db36903de029220dba74c41185f8429f916058b86559f'
,
'logsBloom'
:
'0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
,
'miner'
:
'0x3333333333333333333333333333333333333333'
,
'miner'
:
this
.
coinbase
,
'mixHash'
:
'0x0000000000000000000000000000000000000000000000000000000000000000'
,
'nonce'
:
'0x0000000000000042'
,
'number'
:
'0x0'
,
...
...
remix-simulator/src/provider.js
View file @
bdb7ead3
...
...
@@ -8,7 +8,7 @@ const Net = require('./methods/net.js')
const
Transactions
=
require
(
'./methods/transactions.js'
)
const
Whisper
=
require
(
'./methods/whisper.js'
)
var
Provider
=
function
()
{
var
Provider
=
function
(
options
)
{
this
.
Accounts
=
new
Accounts
()
this
.
methods
=
{}
...
...
remix-simulator/src/server.js
View file @
bdb7ead3
...
...
@@ -6,8 +6,8 @@ const Provider = require('./provider')
const
log
=
require
(
'./utils/logs.js'
)
class
Server
{
constructor
()
{
this
.
provider
=
new
Provider
()
constructor
(
options
)
{
this
.
provider
=
new
Provider
(
options
)
}
start
(
host
,
port
)
{
...
...
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