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
6d474209
Commit
6d474209
authored
May 27, 2021
by
yann300
Committed by
Aniket
May 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comments & fix potential issue
parent
d767be8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
blockchain.js
apps/remix-ide/src/blockchain/blockchain.js
+9
-1
No files found.
apps/remix-ide/src/blockchain/blockchain.js
View file @
6d474209
...
...
@@ -464,6 +464,14 @@ class Blockchain {
return
cb
(
error
)
}
/*
value of txResult is inconsistent:
- transact to contract:
{"receipt": { ... }, "tx":{ ... }, "transactionHash":"0x7ba4c05075210fdbcf4e6660258379db5cc559e15703f9ac6f970a320c2dee09"}
- call to contract:
{"result":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionHash":"0x5236a76152054a8aad0c7135bcc151f03bccb773be88fbf4823184e47fc76247"}
*/
const
isVM
=
this
.
executionContext
.
isVM
()
let
execResult
let
returnValue
=
null
...
...
@@ -471,7 +479,7 @@ class Blockchain {
execResult
=
await
this
.
web3
().
eth
.
getExecutionResultFromSimulator
(
txResult
.
transactionHash
)
if
(
execResult
)
{
// if it's not the VM, we don't have return value. We only have the transaction, and it does not contain the return value.
returnValue
=
(
execResult
&&
isVM
)
?
execResult
.
returnValue
:
txResult
returnValue
=
execResult
?
execResult
.
returnValue
:
toBuffer
(
txResult
.
result
||
'0x0000000000000000000000000000000000000000000000000000000000000000'
)
const
vmError
=
txExecution
.
checkVMError
(
execResult
,
args
.
data
.
contractABI
)
if
(
vmError
.
error
)
{
return
cb
(
vmError
.
message
)
...
...
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