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
534b4c34
Unverified
Commit
534b4c34
authored
Jun 12, 2018
by
yann300
Committed by
GitHub
Jun 12, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1358 from ethereum/fixReceipt
Use tx and receipt to build logs
parents
3e385f9f
40a4223c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
config.yml
.circleci/config.yml
+4
-4
txLogger.js
src/app/execution/txLogger.js
+10
-10
No files found.
.circleci/config.yml
View file @
534b4c34
...
@@ -26,10 +26,10 @@ jobs:
...
@@ -26,10 +26,10 @@ jobs:
-
checkout
-
checkout
-
restore_cache
:
-
restore_cache
:
keys
:
keys
:
-
dep-bundle-1
1
-{{ checksum "package.json" }}
-
dep-bundle-1
2
-{{ checksum "package.json" }}
-
run
:
npm install
-
run
:
npm install
-
save_cache
:
-
save_cache
:
key
:
dep-bundle-1
1
-{{ checksum "package.json" }}
key
:
dep-bundle-1
2
-{{ checksum "package.json" }}
paths
:
paths
:
-
~/repo/node_modules
-
~/repo/node_modules
-
run
:
npm run lint && npm run test && npm run downloadsolc && npm run make-mock-compiler && npm run build
-
run
:
npm run lint && npm run test && npm run downloadsolc && npm run make-mock-compiler && npm run build
...
@@ -46,10 +46,10 @@ jobs:
...
@@ -46,10 +46,10 @@ jobs:
-
checkout
-
checkout
-
restore_cache
:
-
restore_cache
:
keys
:
keys
:
-
dep-bundle-
6
-{{ checksum "package.json" }}
-
dep-bundle-
7
-{{ checksum "package.json" }}
-
run
:
npm install
-
run
:
npm install
-
save_cache
:
-
save_cache
:
key
:
dep-bundle-
6
-{{ checksum "package.json" }}
key
:
dep-bundle-
7
-{{ checksum "package.json" }}
paths
:
paths
:
-
~/repo/node_modules
-
~/repo/node_modules
-
run
:
npm run build_debugger
-
run
:
npm run build_debugger
...
...
src/app/execution/txLogger.js
View file @
534b4c34
...
@@ -180,12 +180,12 @@ class TxLogger {
...
@@ -180,12 +180,12 @@ class TxLogger {
}
}
})
})
opts
.
events
.
txListener
.
register
(
'newTransaction'
,
(
tx
)
=>
{
opts
.
events
.
txListener
.
register
(
'newTransaction'
,
(
tx
,
receipt
)
=>
{
log
(
this
,
tx
,
opts
.
api
)
log
(
this
,
tx
,
receipt
,
opts
.
api
)
})
})
opts
.
events
.
txListener
.
register
(
'newCall'
,
(
tx
)
=>
{
opts
.
events
.
txListener
.
register
(
'newCall'
,
(
tx
)
=>
{
log
(
this
,
tx
,
opts
.
api
)
log
(
this
,
tx
,
null
,
opts
.
api
)
})
})
}
}
}
}
...
@@ -199,17 +199,17 @@ function debug (e, data, self) {
...
@@ -199,17 +199,17 @@ function debug (e, data, self) {
}
}
}
}
function
log
(
self
,
tx
,
api
)
{
function
log
(
self
,
tx
,
receipt
,
api
)
{
var
resolvedTransaction
=
api
.
resolvedTransaction
(
tx
.
hash
)
var
resolvedTransaction
=
api
.
resolvedTransaction
(
tx
.
hash
)
if
(
resolvedTransaction
)
{
if
(
resolvedTransaction
)
{
api
.
parseLogs
(
tx
,
resolvedTransaction
.
contractName
,
api
.
compiledContracts
(),
(
error
,
logs
)
=>
{
api
.
parseLogs
(
tx
,
resolvedTransaction
.
contractName
,
api
.
compiledContracts
(),
(
error
,
logs
)
=>
{
if
(
!
error
)
{
if
(
!
error
)
{
self
.
logKnownTX
({
tx
:
tx
,
resolvedData
:
resolvedTransaction
,
logs
:
logs
})
self
.
logKnownTX
({
tx
:
tx
,
re
ceipt
:
receipt
,
re
solvedData
:
resolvedTransaction
,
logs
:
logs
})
}
}
})
})
}
else
{
}
else
{
// contract unknown - just displaying raw tx.
// contract unknown - just displaying raw tx.
self
.
logUnknownTX
({
tx
:
tx
})
self
.
logUnknownTX
({
tx
:
tx
,
receipt
:
receipt
})
}
}
}
}
...
@@ -221,7 +221,7 @@ function renderKnownTransaction (self, data) {
...
@@ -221,7 +221,7 @@ function renderKnownTransaction (self, data) {
var
tx
=
yo
`
var
tx
=
yo
`
<span id="tx
${
data
.
tx
.
hash
}
">
<span id="tx
${
data
.
tx
.
hash
}
">
<div class="
${
css
.
log
}
" onclick=
${
e
=>
txDetails
(
e
,
tx
,
data
,
obj
)}
>
<div class="
${
css
.
log
}
" onclick=
${
e
=>
txDetails
(
e
,
tx
,
data
,
obj
)}
>
${
checkTxStatus
(
data
.
tx
,
txType
)}
${
checkTxStatus
(
data
.
receipt
,
txType
)}
${
context
(
self
,
{
from
,
to
,
data
})}
${
context
(
self
,
{
from
,
to
,
data
})}
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
debug
}
onclick=
${(
e
)
=>
debug
(
e
,
data
,
self
)}
>Debug</div>
<div class=
${
css
.
debug
}
onclick=
${(
e
)
=>
debug
(
e
,
data
,
self
)}
>Debug</div>
...
@@ -267,7 +267,7 @@ function renderUnknownTransaction (self, data) {
...
@@ -267,7 +267,7 @@ function renderUnknownTransaction (self, data) {
var
tx
=
yo
`
var
tx
=
yo
`
<span id="tx
${
data
.
tx
.
hash
}
">
<span id="tx
${
data
.
tx
.
hash
}
">
<div class="
${
css
.
log
}
" onclick=
${
e
=>
txDetails
(
e
,
tx
,
data
,
obj
)}
>
<div class="
${
css
.
log
}
" onclick=
${
e
=>
txDetails
(
e
,
tx
,
data
,
obj
)}
>
${
checkTxStatus
(
data
.
tx
,
txType
)}
${
checkTxStatus
(
data
.
receipt
,
txType
)}
${
context
(
self
,
{
from
,
to
,
data
})}
${
context
(
self
,
{
from
,
to
,
data
})}
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
debug
}
onclick=
${(
e
)
=>
debug
(
e
,
data
,
self
)}
>Debug</div>
<div class=
${
css
.
debug
}
onclick=
${(
e
)
=>
debug
(
e
,
data
,
self
)}
>Debug</div>
...
@@ -370,8 +370,8 @@ function txDetails (e, tx, data, obj) {
...
@@ -370,8 +370,8 @@ function txDetails (e, tx, data, obj) {
log
.
removeChild
(
arrow
)
log
.
removeChild
(
arrow
)
log
.
appendChild
(
arrowUp
)
log
.
appendChild
(
arrowUp
)
table
=
createTable
({
table
=
createTable
({
hash
:
data
.
tx
.
transactionH
ash
,
hash
:
data
.
tx
.
h
ash
,
status
:
data
.
tx
.
status
,
status
:
data
.
receipt
.
status
,
isCall
:
data
.
tx
.
isCall
,
isCall
:
data
.
tx
.
isCall
,
contractAddress
:
data
.
tx
.
contractAddress
,
contractAddress
:
data
.
tx
.
contractAddress
,
data
:
data
.
tx
,
data
:
data
.
tx
,
...
...
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