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
1e92428f
Commit
1e92428f
authored
Aug 10, 2021
by
aniket-engg
Committed by
Aniket
Aug 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate hardhat console log
parent
eac4fd8f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
hhconsoleSigs.ts
libs/remix-lib/src/helpers/hhconsoleSigs.ts
+0
-0
web3VmProvider.ts
libs/remix-lib/src/web3Provider/web3VmProvider.ts
+18
-0
No files found.
libs/remix-lib/src/helpers/hhconsoleSigs.ts
0 → 100644
View file @
1e92428f
This diff is collapsed.
Click to expand it.
libs/remix-lib/src/web3Provider/web3VmProvider.ts
View file @
1e92428f
import
{
hexListFromBNs
,
formatMemory
}
from
'../util'
import
{
hexListFromBNs
,
formatMemory
}
from
'../util'
import
{
normalizeHexAddress
}
from
'../helpers/uiHelper'
import
{
normalizeHexAddress
}
from
'../helpers/uiHelper'
import
{
ConsoleLogs
}
from
'../helpers/hhconsoleSigs'
import
{
toChecksumAddress
,
BN
,
bufferToHex
,
Address
}
from
'ethereumjs-util'
import
{
toChecksumAddress
,
BN
,
bufferToHex
,
Address
}
from
'ethereumjs-util'
import
Web3
from
'web3'
import
Web3
from
'web3'
import
{
ethers
}
from
'ethers'
export
class
Web3VmProvider
{
export
class
Web3VmProvider
{
web3
web3
...
@@ -206,6 +208,22 @@ export class Web3VmProvider {
...
@@ -206,6 +208,22 @@ export class Web3VmProvider {
error
:
data
.
error
===
false
?
undefined
:
data
.
error
error
:
data
.
error
===
false
?
undefined
:
data
.
error
}
}
this
.
vmTraces
[
this
.
processingHash
].
structLogs
.
push
(
step
)
this
.
vmTraces
[
this
.
processingHash
].
structLogs
.
push
(
step
)
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
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
fnselector
=
parseInt
(
'0x'
+
payload
.
substring
(
0
,
8
))
const
iface
=
new
ethers
.
utils
.
Interface
([
`function log
${
ConsoleLogs
[
fnselector
]}
view`
])
console
.
log
(
'iface--->'
,
iface
)
console
.
log
(
'---->'
,
iface
.
decodeFunctionData
(
"log"
,
'0x'
+
payload
))
}
// console.log('processingAddress in ==', normalizeHexAddress(step.stack[step.stack.length - 2]))
if
(
step
.
op
===
'CREATE'
||
step
.
op
===
'CALL'
)
{
if
(
step
.
op
===
'CREATE'
||
step
.
op
===
'CALL'
)
{
if
(
step
.
op
===
'CREATE'
)
{
if
(
step
.
op
===
'CREATE'
)
{
this
.
processingAddress
=
'(Contract Creation - Step '
+
this
.
processingIndex
+
')'
this
.
processingAddress
=
'(Contract Creation - Step '
+
this
.
processingIndex
+
')'
...
...
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