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
d314cb04
Commit
d314cb04
authored
Apr 25, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug: return array event and not the last one
parent
a39d874e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
eventsDecoder.js
remix-lib/src/execution/eventsDecoder.js
+6
-2
No files found.
remix-lib/src/execution/eventsDecoder.js
View file @
d314cb04
...
...
@@ -66,16 +66,20 @@ class EventsDecoder {
_decodeEvents
(
tx
,
logs
,
contractName
,
compiledContracts
,
cb
)
{
var
eventsABI
=
this
.
_eventsABI
(
compiledContracts
)
var
events
=
{}
var
events
=
[]
for
(
var
i
in
logs
)
{
// [address, topics, mem]
var
log
=
logs
[
i
]
var
topicId
=
log
.
topics
[
0
]
var
abi
=
this
.
_event
(
topicId
.
replace
(
'0x'
,
''
),
eventsABI
)
if
(
abi
)
{
var
topics
=
log
.
topics
.
map
((
value
)
=>
{
return
value
.
indexOf
(
'0x'
)
===
0
?
value
:
'0x'
+
value
})
events
=
abi
.
object
.
parse
(
topics
,
'0x'
+
log
.
data
)
events
.
push
({
topic
:
topicId
,
event
:
abi
.
event
,
args
:
abi
.
object
.
parse
(
topics
,
'0x'
+
log
.
data
)
})
}
else
{
events
.
push
({
data
:
log
.
data
,
topics
:
log
.
topics
})
}
}
cb
(
null
,
{
decoded
:
events
,
raw
:
logs
})
}
...
...
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