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
e908298d
Commit
e908298d
authored
Sep 21, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readd ethJSABI.stringify
parent
6ef55369
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
eventsDecoder.js
src/app/execution/eventsDecoder.js
+3
-1
txFormat.js
src/app/execution/txFormat.js
+1
-0
txListener.js
src/app/execution/txListener.js
+1
-0
No files found.
src/app/execution/eventsDecoder.js
View file @
e908298d
...
...
@@ -85,6 +85,7 @@ class EventsDecoder {
var
encodedData
=
log
.
topics
[
indexed
].
replace
(
'0x'
,
''
)
try
{
decoded
[
index
]
=
ethJSABI
.
rawDecode
([
item
.
type
],
new
Buffer
(
encodedData
,
'hex'
))[
0
]
decoded
[
index
]
=
ethJSABI
.
stringify
([
item
.
type
],
decoded
[
index
])
}
catch
(
e
)
{
decoded
[
index
]
=
encodedData
}
...
...
@@ -94,7 +95,8 @@ class EventsDecoder {
}
})
// decode non indexed param
nonindexed
=
ethJSABI
.
rawDecode
(
nonindexed
,
new
Buffer
(
log
.
data
.
replace
(
'0x'
,
''
),
'hex'
))
var
nonindexededResult
=
ethJSABI
.
rawDecode
(
nonindexed
,
new
Buffer
(
log
.
data
.
replace
(
'0x'
,
''
),
'hex'
))
nonindexed
=
ethJSABI
.
stringify
(
nonindexed
,
nonindexededResult
)
// ordering
var
j
=
0
abi
.
inputs
.
map
(
function
(
item
,
index
)
{
...
...
src/app/execution/txFormat.js
View file @
e908298d
...
...
@@ -155,6 +155,7 @@ module.exports = {
var
decodedObj
=
ethJSABI
.
rawDecode
(
outputTypes
,
response
)
// format decoded data
decodedObj
=
ethJSABI
.
stringify
(
outputTypes
,
decodedObj
)
var
json
=
{}
for
(
i
=
0
;
i
<
outputTypes
.
length
;
i
++
)
{
var
name
=
fnabi
.
outputs
[
i
].
name
...
...
src/app/execution/txListener.js
View file @
e908298d
...
...
@@ -307,6 +307,7 @@ class TxListener {
inputTypes
.
push
(
abi
.
inputs
[
i
].
type
)
}
var
decoded
=
ethJSABI
.
rawDecode
(
inputTypes
,
data
)
decoded
=
ethJSABI
.
stringify
(
inputTypes
,
decoded
)
var
ret
=
{}
for
(
var
k
in
abi
.
inputs
)
{
ret
[
abi
.
inputs
[
k
].
type
+
' '
+
abi
.
inputs
[
k
].
name
]
=
decoded
[
k
]
...
...
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