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
62e41049
Commit
62e41049
authored
Apr 21, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address use toString
parent
ad14033b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
blockchain.js
apps/remix-ide/src/blockchain/blockchain.js
+2
-2
web3VmProvider.ts
libs/remix-lib/src/web3Provider/web3VmProvider.ts
+5
-5
No files found.
apps/remix-ide/src/blockchain/blockchain.js
View file @
62e41049
...
@@ -439,7 +439,7 @@ class Blockchain {
...
@@ -439,7 +439,7 @@ class Blockchain {
function
(
error
,
result
)
{
function
(
error
,
result
)
{
if
(
error
)
return
next
(
error
)
if
(
error
)
return
next
(
error
)
const
rawAddress
=
self
.
executionContext
.
isVM
()
?
result
.
result
.
createdAddress
.
buf
:
result
.
result
.
contractAddress
const
rawAddress
=
self
.
executionContext
.
isVM
()
?
(
result
.
result
.
createdAddress
&&
result
.
result
.
createdAddress
.
toBuffer
())
:
result
.
result
.
contractAddress
const
eventName
=
(
tx
.
useCall
?
'callExecuted'
:
'transactionExecuted'
)
const
eventName
=
(
tx
.
useCall
?
'callExecuted'
:
'transactionExecuted'
)
self
.
event
.
trigger
(
eventName
,
[
error
,
tx
.
from
,
tx
.
to
,
tx
.
data
,
tx
.
useCall
,
result
,
timestamp
,
payLoad
,
rawAddress
])
self
.
event
.
trigger
(
eventName
,
[
error
,
tx
.
from
,
tx
.
to
,
tx
.
data
,
tx
.
useCall
,
result
,
timestamp
,
payLoad
,
rawAddress
])
...
@@ -470,7 +470,7 @@ class Blockchain {
...
@@ -470,7 +470,7 @@ class Blockchain {
let
address
=
null
let
address
=
null
let
returnValue
=
null
let
returnValue
=
null
if
(
txResult
&&
txResult
.
result
)
{
if
(
txResult
&&
txResult
.
result
)
{
address
=
isVM
?
txResult
.
result
.
createdAddress
.
buf
:
txResult
.
result
.
contractAddress
address
=
isVM
?
(
txResult
.
result
.
createdAddress
&&
txResult
.
result
.
createdAddress
.
toBuffer
())
:
txResult
.
result
.
contractAddress
// 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.
// 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
=
(
txResult
.
result
.
execResult
&&
isVM
)
?
txResult
.
result
.
execResult
.
returnValue
:
txResult
.
result
returnValue
=
(
txResult
.
result
.
execResult
&&
isVM
)
?
txResult
.
result
.
execResult
.
returnValue
:
txResult
.
result
}
}
...
...
libs/remix-lib/src/web3Provider/web3VmProvider.ts
View file @
62e41049
...
@@ -101,9 +101,9 @@ export class Web3VmProvider {
...
@@ -101,9 +101,9 @@ export class Web3VmProvider {
}
}
const
tx
=
{}
const
tx
=
{}
tx
[
'hash'
]
=
this
.
processingHash
tx
[
'hash'
]
=
this
.
processingHash
tx
[
'from'
]
=
toChecksumAddress
(
hexConvert
(
data
.
getSenderAddress
().
buf
))
tx
[
'from'
]
=
toChecksumAddress
(
data
.
getSenderAddress
().
toString
(
))
if
(
data
.
to
&&
data
.
to
.
length
)
{
if
(
data
.
to
)
{
tx
[
'to'
]
=
toChecksumAddress
(
hexConvert
(
data
.
to
.
buf
))
tx
[
'to'
]
=
toChecksumAddress
(
data
.
to
.
toString
(
))
}
}
this
.
processingAddress
=
tx
[
'to'
]
this
.
processingAddress
=
tx
[
'to'
]
// tx['data'] = hexConvert(data.data)
// tx['data'] = hexConvert(data.data)
...
@@ -155,8 +155,8 @@ export class Web3VmProvider {
...
@@ -155,8 +155,8 @@ export class Web3VmProvider {
const
status
=
data
.
execResult
.
exceptionError
?
0
:
1
const
status
=
data
.
execResult
.
exceptionError
?
0
:
1
this
.
txsReceipt
[
this
.
processingHash
].
status
=
`0x
${
status
}
`
this
.
txsReceipt
[
this
.
processingHash
].
status
=
`0x
${
status
}
`
if
(
data
.
createdAddress
&&
data
.
createdAddress
.
buf
)
{
if
(
data
.
createdAddress
)
{
const
address
=
hexConvert
(
data
.
createdAddress
.
buf
)
const
address
=
data
.
createdAddress
.
toString
(
)
this
.
vmTraces
[
this
.
processingHash
].
return
=
toChecksumAddress
(
address
)
this
.
vmTraces
[
this
.
processingHash
].
return
=
toChecksumAddress
(
address
)
this
.
txsReceipt
[
this
.
processingHash
].
contractAddress
=
toChecksumAddress
(
address
)
this
.
txsReceipt
[
this
.
processingHash
].
contractAddress
=
toChecksumAddress
(
address
)
}
else
if
(
data
.
execResult
.
returnValue
)
{
}
else
if
(
data
.
execResult
.
returnValue
)
{
...
...
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