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
69baa09e
Commit
69baa09e
authored
Aug 29, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add net methods
parent
0412ea4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
net.js
remix-simulator/src/methods/net.js
+26
-0
provider.js
remix-simulator/src/provider.js
+2
-0
No files found.
remix-simulator/src/methods/net.js
0 → 100644
View file @
69baa09e
var
Net
=
function
()
{
}
Net
.
prototype
.
methods
=
function
()
{
return
{
net_version
:
this
.
net_version
,
net_listening
:
this
.
net_listening
,
net_peerCount
:
this
.
net_peerCount
}
}
Net
.
prototype
.
net_version
=
function
(
payload
,
cb
)
{
// should be configured networkId
cb
(
null
,
1337
)
}
Net
.
prototype
.
net_listening
=
function
(
payload
,
cb
)
{
cb
(
null
,
true
)
}
Net
.
prototype
.
net_peerCount
=
function
(
payload
,
cb
)
{
cb
(
null
,
0
)
}
module
.
exports
=
Net
remix-simulator/src/provider.js
View file @
69baa09e
...
@@ -4,6 +4,7 @@ const merge = require('merge')
...
@@ -4,6 +4,7 @@ const merge = require('merge')
const
Accounts
=
require
(
'./methods/accounts.js'
)
const
Accounts
=
require
(
'./methods/accounts.js'
)
const
Blocks
=
require
(
'./methods/blocks.js'
)
const
Blocks
=
require
(
'./methods/blocks.js'
)
const
Misc
=
require
(
'./methods/misc.js'
)
const
Misc
=
require
(
'./methods/misc.js'
)
const
Net
=
require
(
'./methods/net.js'
)
const
Transactions
=
require
(
'./methods/transactions.js'
)
const
Transactions
=
require
(
'./methods/transactions.js'
)
const
Whisper
=
require
(
'./methods/whisper.js'
)
const
Whisper
=
require
(
'./methods/whisper.js'
)
...
@@ -14,6 +15,7 @@ var Provider = function () {
...
@@ -14,6 +15,7 @@ var Provider = function () {
this
.
methods
=
merge
(
this
.
methods
,
this
.
Accounts
.
methods
())
this
.
methods
=
merge
(
this
.
methods
,
this
.
Accounts
.
methods
())
this
.
methods
=
merge
(
this
.
methods
,
(
new
Blocks
()).
methods
())
this
.
methods
=
merge
(
this
.
methods
,
(
new
Blocks
()).
methods
())
this
.
methods
=
merge
(
this
.
methods
,
(
new
Misc
()).
methods
())
this
.
methods
=
merge
(
this
.
methods
,
(
new
Misc
()).
methods
())
this
.
methods
=
merge
(
this
.
methods
,
(
new
Net
()).
methods
())
this
.
methods
=
merge
(
this
.
methods
,
(
new
Transactions
(
this
.
Accounts
.
accounts
)).
methods
())
this
.
methods
=
merge
(
this
.
methods
,
(
new
Transactions
(
this
.
Accounts
.
accounts
)).
methods
())
this
.
methods
=
merge
(
this
.
methods
,
(
new
Whisper
()).
methods
())
this
.
methods
=
merge
(
this
.
methods
,
(
new
Whisper
()).
methods
())
}
}
...
...
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