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
31b884a2
Commit
31b884a2
authored
Sep 07, 2017
by
ninabreznik
Committed by
yann300
Sep 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add hex address
parent
9d57d5a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
txLogger.js
src/app/execution/txLogger.js
+19
-16
No files found.
src/app/execution/txLogger.js
View file @
31b884a2
...
@@ -135,7 +135,7 @@ function renderKnownTransaction (self, data) {
...
@@ -135,7 +135,7 @@ function renderKnownTransaction (self, data) {
}
else
{
}
else
{
table
=
createTable
({
table
=
createTable
({
contractAddress
:
data
.
tx
.
contractAddress
,
contractAddress
:
data
.
tx
.
contractAddress
,
data
:
data
.
tx
.
data
,
data
:
data
.
tx
,
from
,
from
,
to
,
to
,
gas
:
data
.
tx
.
gas
,
gas
:
data
.
tx
.
gas
,
...
@@ -174,7 +174,14 @@ function renderUnknownTransaction (self, data) {
...
@@ -174,7 +174,14 @@ function renderUnknownTransaction (self, data) {
tx
.
removeChild
(
table
)
tx
.
removeChild
(
table
)
}
else
{
}
else
{
table
=
createTable
({
table
=
createTable
({
from
,
to
,
val
:
data
.
tx
.
value
,
input
:
data
.
tx
.
input
,
hash
:
data
.
tx
.
hash
,
gas
:
data
.
tx
.
gas
,
logs
:
JSON
.
stringify
(
data
.
logs
)
||
'0'
data
:
data
.
tx
,
from
,
to
,
val
:
data
.
tx
.
value
,
input
:
data
.
tx
.
input
,
hash
:
data
.
tx
.
hash
,
gas
:
data
.
tx
.
gas
,
logs
:
JSON
.
stringify
(
data
.
logs
)
||
'0'
})
})
tx
.
appendChild
(
table
)
tx
.
appendChild
(
table
)
}
}
...
@@ -189,7 +196,8 @@ function renderEmptyBlock (self, data) {
...
@@ -189,7 +196,8 @@ function renderEmptyBlock (self, data) {
function
context
(
self
,
opts
)
{
function
context
(
self
,
opts
)
{
var
data
=
opts
.
data
||
''
var
data
=
opts
.
data
||
''
var
from
=
opts
.
from
?
helper
.
shortenHexData
(
opts
.
from
)
:
''
var
from
=
opts
.
from
?
helper
.
shortenHexData
(
opts
.
from
)
:
''
var
to
=
opts
.
to
||
'empty'
var
to
=
opts
.
to
if
(
data
.
tx
.
to
)
to
=
to
+
' '
+
helper
.
shortenHexData
(
data
.
tx
.
to
)
var
val
=
data
.
tx
.
value
var
val
=
data
.
tx
.
value
var
hash
=
data
.
tx
.
hash
?
helper
.
shortenHexData
(
data
.
tx
.
hash
)
:
''
var
hash
=
data
.
tx
.
hash
?
helper
.
shortenHexData
(
data
.
tx
.
hash
)
:
''
var
input
=
data
.
tx
.
input
?
helper
.
shortenHexData
(
data
.
tx
.
input
)
:
''
var
input
=
data
.
tx
.
input
?
helper
.
shortenHexData
(
data
.
tx
.
input
)
:
''
...
@@ -197,20 +205,8 @@ function context (self, opts) {
...
@@ -197,20 +205,8 @@ function context (self, opts) {
var
block
=
data
.
tx
.
blockNumber
||
''
var
block
=
data
.
tx
.
blockNumber
||
''
var
i
=
data
.
tx
.
transactionIndex
var
i
=
data
.
tx
.
transactionIndex
if
(
executionContext
.
getProvider
()
===
'vm'
)
{
if
(
executionContext
.
getProvider
()
===
'vm'
)
{
console
.
log
(
'-----'
)
console
.
log
(
'data'
)
console
.
log
(
data
)
console
.
log
(
'-----'
)
console
.
log
(
'to'
)
console
.
log
(
to
)
return
yo
`<span><span class=
${
css
.
tx
}
>[vm]</span> from:
${
from
}
, to:
${
to
}
, value:
${
value
(
val
)}
wei, data:
${
input
}
,
${
logs
}
logs, hash:
${
hash
}
</span>`
return
yo
`<span><span class=
${
css
.
tx
}
>[vm]</span> from:
${
from
}
, to:
${
to
}
, value:
${
value
(
val
)}
wei, data:
${
input
}
,
${
logs
}
logs, hash:
${
hash
}
</span>`
}
else
if
(
executionContext
.
getProvider
()
!==
'vm'
&&
data
.
resolvedData
)
{
}
else
if
(
executionContext
.
getProvider
()
!==
'vm'
&&
data
.
resolvedData
)
{
console
.
log
(
'-----'
)
console
.
log
(
'data'
)
console
.
log
(
data
)
console
.
log
(
'-----'
)
console
.
log
(
'to'
)
console
.
log
(
to
)
return
yo
`<span><span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span> from:
${
from
}
, to:
${
to
}
, value:
${
value
(
val
)}
wei</span>`
return
yo
`<span><span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span> from:
${
from
}
, to:
${
to
}
, value:
${
value
(
val
)}
wei</span>`
}
else
{
}
else
{
to
=
helper
.
shortenHexData
(
to
)
to
=
helper
.
shortenHexData
(
to
)
...
@@ -255,10 +251,17 @@ function createTable (opts) {
...
@@ -255,10 +251,17 @@ function createTable (opts) {
`
`
if
(
opts
.
from
)
table
.
appendChild
(
from
)
if
(
opts
.
from
)
table
.
appendChild
(
from
)
var
toHash
var
data
=
opts
.
data
// opts.data = data.tx
if
(
data
.
to
)
{
toHash
=
opts
.
to
+
' '
+
data
.
to
}
else
{
toHash
=
opts
.
to
}
var
to
=
yo
`
var
to
=
yo
`
<tr class="
${
css
.
tr
}
">
<tr class="
${
css
.
tr
}
">
<td class="
${
css
.
td
}
"> to </td>
<td class="
${
css
.
td
}
"> to </td>
<td class="
${
css
.
td
}
">
${
opts
.
to
}
</td>
<td class="
${
css
.
td
}
">
${
toHash
}
</td>
</tr class="
${
css
.
tr
}
">
</tr class="
${
css
.
tr
}
">
`
`
if
(
opts
.
to
)
table
.
appendChild
(
to
)
if
(
opts
.
to
)
table
.
appendChild
(
to
)
...
...
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