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
a347a390
Commit
a347a390
authored
Nov 06, 2019
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address code review suggestions
parent
e62e7947
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
logsManager.js
remix-lib/src/execution/logsManager.js
+1
-2
accounts.js
remix-simulator/src/methods/accounts.js
+5
-5
blocks.js
remix-simulator/src/methods/blocks.js
+1
-1
No files found.
remix-lib/src/execution/logsManager.js
View file @
a347a390
...
@@ -107,7 +107,7 @@ class LogsManager {
...
@@ -107,7 +107,7 @@ class LogsManager {
}
}
newFilter
(
filterType
,
params
)
{
newFilter
(
filterType
,
params
)
{
le
t
filterId
=
'0x'
+
crypto
.
randomBytes
(
16
).
toString
(
'hex'
)
cons
t
filterId
=
'0x'
+
crypto
.
randomBytes
(
16
).
toString
(
'hex'
)
if
(
filterType
===
'block'
||
filterType
===
'pendingTransactions'
)
{
if
(
filterType
===
'block'
||
filterType
===
'pendingTransactions'
)
{
this
.
filters
[
filterId
]
=
{
filterType
}
this
.
filters
[
filterId
]
=
{
filterType
}
}
}
...
@@ -135,7 +135,6 @@ class LogsManager {
...
@@ -135,7 +135,6 @@ class LogsManager {
return
blocks
.
map
(
block
=>
(
'0x'
+
block
.
hash
().
toString
(
'hex'
)))
return
blocks
.
map
(
block
=>
(
'0x'
+
block
.
hash
().
toString
(
'hex'
)))
}
}
if
(
filterType
===
'pendingTransactions'
)
{
if
(
filterType
===
'pendingTransactions'
)
{
// TODO: pending transaction hashes
return
[]
return
[]
}
}
}
}
...
...
remix-simulator/src/methods/accounts.js
View file @
a347a390
...
@@ -61,16 +61,16 @@ Accounts.prototype.eth_getBalance = function (payload, cb) {
...
@@ -61,16 +61,16 @@ Accounts.prototype.eth_getBalance = function (payload, cb) {
}
}
Accounts
.
prototype
.
eth_sign
=
function
(
payload
,
cb
)
{
Accounts
.
prototype
.
eth_sign
=
function
(
payload
,
cb
)
{
le
t
address
=
payload
.
params
[
0
]
cons
t
address
=
payload
.
params
[
0
]
le
t
message
=
payload
.
params
[
1
]
cons
t
message
=
payload
.
params
[
1
]
le
t
privateKey
=
this
.
accountsKeys
[
ethJSUtil
.
toChecksumAddress
(
address
)]
cons
t
privateKey
=
this
.
accountsKeys
[
ethJSUtil
.
toChecksumAddress
(
address
)]
if
(
!
privateKey
)
{
if
(
!
privateKey
)
{
return
cb
(
new
Error
(
'unknown account'
))
return
cb
(
new
Error
(
'unknown account'
))
}
}
le
t
account
=
this
.
web3
.
eth
.
accounts
.
privateKeyToAccount
(
privateKey
)
cons
t
account
=
this
.
web3
.
eth
.
accounts
.
privateKeyToAccount
(
privateKey
)
le
t
data
=
account
.
sign
(
message
)
cons
t
data
=
account
.
sign
(
message
)
cb
(
null
,
data
.
signature
)
cb
(
null
,
data
.
signature
)
}
}
...
...
remix-simulator/src/methods/blocks.js
View file @
a347a390
...
@@ -28,7 +28,7 @@ Blocks.prototype.eth_getBlockByNumber = function (payload, cb) {
...
@@ -28,7 +28,7 @@ Blocks.prototype.eth_getBlockByNumber = function (payload, cb) {
blockIndex
=
executionContext
.
latestBlockNumber
blockIndex
=
executionContext
.
latestBlockNumber
}
}
var
block
=
executionContext
.
blocks
[
blockIndex
]
const
block
=
executionContext
.
blocks
[
blockIndex
]
if
(
!
block
)
{
if
(
!
block
)
{
return
cb
(
new
Error
(
'block not found'
))
return
cb
(
new
Error
(
'block not found'
))
...
...
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