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
a7746442
Commit
a7746442
authored
Sep 08, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display decoded input
parent
9ed3b0f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
txLogger.js
src/app/execution/txLogger.js
+26
-2
No files found.
src/app/execution/txLogger.js
View file @
a7746442
...
...
@@ -141,6 +141,7 @@ function renderKnownTransaction (self, data) {
gas
:
data
.
tx
.
gas
,
hash
:
data
.
tx
.
hash
,
input
:
data
.
tx
.
input
,
'decoded input'
:
data
.
resolvedData
&&
data
.
resolvedData
.
params
?
JSON
.
stringify
(
value
(
data
.
resolvedData
.
params
),
null
,
'
\
t'
)
:
' - '
,
logs
:
JSON
.
stringify
(
data
.
logs
,
null
,
'
\
t'
)
||
'0'
,
val
:
data
.
tx
.
value
})
...
...
@@ -217,10 +218,24 @@ function context (self, opts) {
function
value
(
v
)
{
try
{
if
(
v
.
indexOf
&&
v
.
indexOf
(
'0x'
)
===
0
)
{
if
(
v
instanceof
Array
)
{
var
ret
=
[]
for
(
var
k
in
v
)
{
ret
.
push
(
value
(
v
[
k
]))
}
return
ret
}
else
if
(
BN
.
isBN
(
v
))
{
return
v
.
toString
(
10
)
}
else
if
(
v
.
indexOf
&&
v
.
indexOf
(
'0x'
)
===
0
)
{
return
(
new
BN
(
v
.
replace
(
'0x'
,
''
),
16
)).
toString
(
10
)
}
else
if
(
typeof
v
===
'object'
)
{
var
retObject
=
{}
for
(
var
i
in
v
)
{
retObject
[
i
]
=
value
(
v
[
i
])
}
return
retObject
}
else
{
return
v
.
toString
(
10
)
return
v
}
}
catch
(
e
)
{
console
.
log
(
e
)
...
...
@@ -290,6 +305,15 @@ function createTable (opts) {
`
if
(
opts
.
input
)
table
.
appendChild
(
input
)
if
(
opts
[
'decoded input'
])
{
var
inputDecoded
=
yo
`
<tr class="
${
css
.
tr
}
">
<td class="
${
css
.
td
}
"> decoded input </td>
<td class="
${
css
.
td
}
">
${
opts
[
'decoded input'
]}
</td>
</tr class="
${
css
.
tr
}
">`
table
.
appendChild
(
inputDecoded
)
}
var
logs
=
yo
`
<tr class="
${
css
.
tr
}
">
<td class="
${
css
.
td
}
"> logs </td>
...
...
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