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
e44ceb83
Commit
e44ceb83
authored
Apr 15, 2016
by
chriseth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #127 from axic/patch/decodeabi
Decode contract responses (ABI)
parents
5a4a8e5e
2347150d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
universal-dapp.js
assets/js/universal-dapp.js
+12
-3
No files found.
assets/js/universal-dapp.js
View file @
e44ceb83
...
...
@@ -325,9 +325,18 @@ UniversalDApp.prototype.getCallButton = function(args) {
replaceOutput
(
$result
,
getGasUsedOutput
(
result
));
args
.
appendFunctions
(
result
.
createdAddress
);
}
else
if
(
self
.
options
.
vm
){
//@todo implement once decoder is exposed by web3.js
//var outputObj = fun.unpackOutput('0x' + result.vm.return.toString('hex'));
var
outputObj
=
'0x'
+
result
.
vm
.
return
.
toString
(
'hex'
);
var
outputObj
;
try
{
var
outputTypes
=
[];
for
(
var
i
=
0
;
i
<
args
.
abi
.
outputs
.
length
;
i
++
)
{
outputTypes
.
push
(
args
.
abi
.
outputs
[
i
].
type
);
}
outputObj
=
EthJS
.
ABI
.
rawDecode
(
null
,
null
,
outputTypes
,
result
.
vm
.
return
);
}
catch
(
e
)
{
outputObj
=
'0x'
+
result
.
vm
.
return
.
toString
(
'hex'
);
}
clearOutput
(
$result
);
$result
.
append
(
getReturnOutput
(
outputObj
)).
append
(
getGasUsedOutput
(
result
.
vm
));
}
else
if
(
args
.
abi
.
constant
&&
!
isConstructor
)
{
...
...
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