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
3dbc10c0
Commit
3dbc10c0
authored
May 11, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle hex
parent
e6ab0977
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
txRunner.ts
libs/remix-lib/src/execution/txRunner.ts
+11
-1
No files found.
libs/remix-lib/src/execution/txRunner.ts
View file @
3dbc10c0
...
...
@@ -118,7 +118,17 @@ export class TxRunner {
this
.
executionContext
.
vm
().
stateManager
.
getAccount
(
Address
.
fromString
(
from
)).
then
((
res
)
=>
{
// See https://github.com/ethereumjs/ethereumjs-tx/blob/master/docs/classes/transaction.md#constructor
// for initialization fields and their types
value
=
value
?
new
BN
(
value
,
10
)
:
0
if
(
!
value
)
value
=
0
if
(
typeof
value
===
'string'
)
{
if
(
value
.
startsWith
(
'0x'
))
value
=
new
BN
(
value
.
replace
(
'0x'
,
''
),
'hex'
)
else
{
try
{
value
=
new
BN
(
value
,
10
)
}
catch
(
e
)
{
return
callback
(
'Unable to parse the value '
+
e
.
message
)
}
}
}
const
tx
=
Transaction
.
fromTxData
({
nonce
:
new
BN
(
res
.
nonce
),
gasPrice
:
'0x1'
,
...
...
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