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
9d57d5a6
Commit
9d57d5a6
authored
Sep 06, 2017
by
ninabreznik
Committed by
yann300
Sep 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug in the logs
parent
bf064ac0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
15 deletions
+21
-15
txLogger.js
src/app/execution/txLogger.js
+21
-15
No files found.
src/app/execution/txLogger.js
View file @
9d57d5a6
...
@@ -113,18 +113,13 @@ function log (self, tx, api) {
...
@@ -113,18 +113,13 @@ function log (self, tx, api) {
function
renderKnownTransaction
(
self
,
data
)
{
function
renderKnownTransaction
(
self
,
data
)
{
var
from
=
data
.
tx
.
from
var
from
=
data
.
tx
.
from
var
to
=
data
.
resolvedData
.
contractName
+
'.'
+
data
.
resolvedData
.
fn
var
to
=
data
.
resolvedData
.
contractName
+
'.'
+
data
.
resolvedData
.
fn
if
(
data
.
resolvedData
.
to
)
{
to
=
to
+
data
.
resolvedData
.
to
var
shortTo
=
to
+
helper
.
shortenHexData
(
data
.
resolvedData
.
to
)
}
function
debug
()
{
function
debug
()
{
self
.
event
.
trigger
(
'debugRequested'
,
[
data
.
tx
.
hash
])
self
.
event
.
trigger
(
'debugRequested'
,
[
data
.
tx
.
hash
])
}
}
var
tx
=
yo
`
var
tx
=
yo
`
<span class=
${
css
.
container
}
id="tx
${
data
.
tx
.
hash
}
">
<span class=
${
css
.
container
}
id="tx
${
data
.
tx
.
hash
}
">
<div class="
${
css
.
log
}
">
<div class="
${
css
.
log
}
">
${
context
(
self
,
{
from
,
to
:
shortTo
,
data
})}
${
context
(
self
,
{
from
,
to
,
data
})}
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
buttons
}
>
<button class=
${
css
.
details
}
onclick=
${
txDetails
}
>Details</button>
<button class=
${
css
.
details
}
onclick=
${
txDetails
}
>Details</button>
<button class=
${
css
.
debug
}
onclick=
${
debug
}
>Debug</button>
<button class=
${
css
.
debug
}
onclick=
${
debug
}
>Debug</button>
...
@@ -194,22 +189,33 @@ function renderEmptyBlock (self, data) {
...
@@ -194,22 +189,33 @@ 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
||
''
var
to
=
opts
.
to
||
'
empty
'
var
val
=
data
.
tx
.
value
var
val
=
data
.
tx
.
value
var
type
=
opts
.
type
||
''
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
)
:
''
var
logs
=
data
.
logs
?
data
.
logs
.
length
:
0
var
logs
=
data
.
logs
?
data
.
logs
.
length
:
0
var
block
=
data
.
tx
.
blockNumber
||
''
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
()
!==
'web3'
&&
data
.
resolvedData
)
{
}
else
if
(
executionContext
.
getProvider
()
!==
'vm'
&&
data
.
resolvedData
)
{
return
yo
`<span><span class=
${
css
.
tx
}
>[web3]</span> from:
${
from
}
, to:
${
to
}
, value:
${
value
(
val
)}
wei, data:
${
input
}
,
${
logs
}
logs, hash:
${
hash
}
</span>`
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>`
}
else
{
}
else
{
to
=
helper
.
shortenHexData
(
to
)
to
=
helper
.
shortenHexData
(
to
)
hash
=
helper
.
shortenHexData
(
data
.
tx
.
blockHash
)
hash
=
helper
.
shortenHexData
(
data
.
tx
.
blockHash
)
var
block
=
data
.
tx
.
blockNumber
return
yo
`<span><span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span> from:
${
from
}
, to:
${
to
}
, value:
${
value
(
val
)}
wei</span>`
var
i
=
data
.
tx
.
transactionIndex
return
yo
`<span><span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span> from:
${
from
}
, to:
${
hash
}
, value:
${
value
(
val
)}
wei</span>`
}
}
}
}
...
...
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