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
82df8d07
Commit
82df8d07
authored
Sep 20, 2018
by
noelyoo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor buffer constructor
parent
30a92d07
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
9 deletions
+9
-9
localDecoder.js
remix-debug/test/decoder/localDecoder.js
+1
-1
mapping.js
remix-debug/test/decoder/stateTests/mapping.js
+1
-1
vmCall.js
remix-debug/test/decoder/vmCall.js
+1
-1
tests.js
remix-debug/test/tests.js
+1
-1
vmCall.js
remix-debug/test/vmCall.js
+1
-1
codeResolver.js
remix-lib/src/code/codeResolver.js
+1
-1
eventsDecoder.js
remix-lib/src/execution/eventsDecoder.js
+1
-1
txRunner.js
remix-lib/src/execution/txRunner.js
+2
-2
No files found.
remix-debug/test/decoder/localDecoder.js
View file @
82df8d07
...
...
@@ -14,7 +14,7 @@ var compilerInput = remixLib.helpers.compiler.compilerInput
tape
(
'solidity'
,
function
(
t
)
{
t
.
test
(
'local decoder'
,
function
(
st
)
{
var
privateKey
=
new
Buffer
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'hex'
)
var
privateKey
=
Buffer
.
from
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'hex'
)
var
vm
=
vmCall
.
initVM
(
st
,
privateKey
)
test
(
st
,
vm
,
privateKey
)
})
...
...
remix-debug/test/decoder/stateTests/mapping.js
View file @
82df8d07
...
...
@@ -11,7 +11,7 @@ var StorageViewer = require('../../../src/storage/storageViewer')
module
.
exports
=
function
testMappingStorage
(
st
,
cb
)
{
var
mappingStorage
=
require
(
'../contracts/mappingStorage'
)
var
privateKey
=
new
Buffer
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'hex'
)
var
privateKey
=
Buffer
.
from
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'hex'
)
var
vm
=
vmCall
.
initVM
(
st
,
privateKey
)
var
output
=
compiler
.
compileStandardWrapper
(
compilerInput
(
mappingStorage
.
contract
))
output
=
JSON
.
parse
(
output
)
...
...
remix-debug/test/decoder/vmCall.js
View file @
82df8d07
...
...
@@ -12,7 +12,7 @@ function sendTx (vm, from, to, value, data, cb) {
gasLimit
:
new
BN
(
3000000
,
10
),
to
:
to
,
value
:
new
BN
(
value
,
10
),
data
:
new
Buffer
(
data
,
'hex'
)
data
:
Buffer
.
from
(
data
,
'hex'
)
})
tx
.
sign
(
from
.
privateKey
)
var
block
=
new
Block
({
...
...
remix-debug/test/tests.js
View file @
82df8d07
...
...
@@ -15,7 +15,7 @@ var BreakpointManager = remixLib.code.BreakpointManager
tape
(
'debug contract'
,
function
(
t
)
{
t
.
plan
(
12
)
var
privateKey
=
new
Buffer
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'hex'
)
var
privateKey
=
Buffer
.
from
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'hex'
)
var
vm
=
vmCall
.
initVM
(
t
,
privateKey
)
var
output
=
compiler
.
compileStandardWrapper
(
compilerInput
(
ballot
))
output
=
JSON
.
parse
(
output
)
...
...
remix-debug/test/vmCall.js
View file @
82df8d07
...
...
@@ -12,7 +12,7 @@ function sendTx (vm, from, to, value, data, cb) {
gasLimit
:
new
BN
(
3000000
,
10
),
to
:
to
,
value
:
new
BN
(
value
,
10
),
data
:
new
Buffer
(
data
,
'hex'
)
data
:
Buffer
.
from
(
data
,
'hex'
)
})
tx
.
sign
(
from
.
privateKey
)
var
block
=
new
Block
({
...
...
remix-lib/src/code/codeResolver.js
View file @
82df8d07
...
...
@@ -48,7 +48,7 @@ CodeResolver.prototype.cacheExecutingCode = function (address, hexCode) {
}
CodeResolver
.
prototype
.
formatCode
=
function
(
hexCode
)
{
var
code
=
codeUtils
.
nameOpCodes
(
new
Buffer
(
hexCode
.
substring
(
2
),
'hex'
))
var
code
=
codeUtils
.
nameOpCodes
(
Buffer
.
from
(
hexCode
.
substring
(
2
),
'hex'
))
return
{
code
:
code
[
0
],
instructionsIndexByBytesOffset
:
code
[
1
]
...
...
remix-lib/src/execution/eventsDecoder.js
View file @
82df8d07
...
...
@@ -42,7 +42,7 @@ class EventsDecoder {
var
abi
=
new
ethers
.
Interface
(
contract
.
abi
)
for
(
var
e
in
abi
.
events
)
{
var
event
=
abi
.
events
[
e
]
eventABI
[
ethJSUtil
.
sha3
(
new
Buffer
(
event
.
signature
)).
toString
(
'hex'
)]
=
{
event
:
event
.
name
,
inputs
:
event
.
inputs
,
object
:
event
}
eventABI
[
ethJSUtil
.
sha3
(
Buffer
.
from
(
event
.
signature
)).
toString
(
'hex'
)]
=
{
event
:
event
.
name
,
inputs
:
event
.
inputs
,
object
:
event
}
}
return
eventABI
}
...
...
remix-lib/src/execution/txRunner.js
View file @
82df8d07
...
...
@@ -100,7 +100,7 @@ class TxRunner {
gasLimit
:
new
BN
(
gasLimit
,
10
),
to
:
to
,
value
:
new
BN
(
value
,
10
),
data
:
new
Buffer
(
data
.
slice
(
2
),
'hex'
)
data
:
Buffer
.
from
(
data
.
slice
(
2
),
'hex'
)
})
tx
.
sign
(
account
.
privateKey
)
...
...
@@ -133,7 +133,7 @@ class TxRunner {
}
callback
(
err
,
{
result
:
result
,
transactionHash
:
ethJSUtil
.
bufferToHex
(
new
Buffer
(
tx
.
hash
()))
transactionHash
:
ethJSUtil
.
bufferToHex
(
Buffer
.
from
(
tx
.
hash
()))
})
})
}
...
...
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