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
2b02be1a
Commit
2b02be1a
authored
Aug 11, 2021
by
aniket-engg
Committed by
Aniket
Aug 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
data decoding successful
parent
b124db67
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
hhconsoleSigs.ts
libs/remix-lib/src/helpers/hhconsoleSigs.ts
+0
-0
web3VmProvider.ts
libs/remix-lib/src/web3Provider/web3VmProvider.ts
+7
-10
No files found.
libs/remix-lib/src/helpers/hhconsoleSigs.ts
View file @
2b02be1a
This diff is collapsed.
Click to expand it.
libs/remix-lib/src/web3Provider/web3VmProvider.ts
View file @
2b02be1a
...
...
@@ -208,20 +208,17 @@ export class Web3VmProvider {
error
:
data
.
error
===
false
?
undefined
:
data
.
error
}
this
.
vmTraces
[
this
.
processingHash
].
structLogs
.
push
(
step
)
if
(
step
.
op
===
'STATICCALL'
&&
step
.
stack
[
step
.
stack
.
length
-
2
]
===
"0x000000000000000000000000000000000000000000636f6e736f6c652e6c6f67"
)
{
// Track hardhat console.log call
if
(
step
.
op
===
'STATICCALL'
&&
step
.
stack
[
step
.
stack
.
length
-
2
]
===
'0x000000000000000000000000000000000000000000636f6e736f6c652e6c6f67'
)
{
const
stackLength
=
step
.
stack
.
length
const
address
=
step
.
stack
[
stackLength
-
2
]
const
payloadStart
=
parseInt
(
step
.
stack
[
stackLength
-
3
],
16
)
const
payloadStart
=
parseInt
(
step
.
stack
[
stackLength
-
3
],
16
)
const
memory
=
step
.
memory
.
join
(
''
)
const
payloadLength
=
parseInt
(
step
.
stack
[
stackLength
-
4
],
16
)
console
.
log
(
'payloadLength in pushTrace--->'
,
payloadLength
)
const
payload
=
memory
.
substring
(
payloadStart
*
2
,
payloadStart
*
2
+
payloadLength
)
console
.
log
(
'memory payload in pushTrace--->'
,
payload
)
const
payload
=
memory
.
substring
(
payloadStart
*
2
,
memory
.
length
)
const
fnselector
=
parseInt
(
'0x'
+
payload
.
substring
(
0
,
8
))
const
iface
=
new
ethers
.
utils
.
Interface
([
`function log
${
ConsoleLogs
[
fnselector
]}
view`
])
cons
ole
.
log
(
'iface--->'
,
iface
)
const
functionDesc
=
iface
.
getFunction
(
'log'
)
console
.
log
(
'---->'
,
iface
.
decodeFunctionData
(
functionDesc
,
'0x'
+
payload
)
)
cons
t
functionDesc
=
iface
.
getFunction
(
`log
${
ConsoleLogs
[
fnselector
]}
`
)
const
consoleArgs
=
iface
.
decodeFunctionData
(
functionDesc
,
'0x'
+
payload
)
console
.
log
(
consoleArgs
)
}
if
(
step
.
op
===
'CREATE'
||
step
.
op
===
'CALL'
)
{
...
...
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