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
18f094d7
Commit
18f094d7
authored
Jun 06, 2016
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Standard: fix undefined/redefined variables
parent
66acb7a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
compiler-worker.js
src/app/compiler-worker.js
+1
-1
universal-dapp.js
src/universal-dapp.js
+7
-4
No files found.
src/app/compiler-worker.js
View file @
18f094d7
...
@@ -15,7 +15,7 @@ module.exports = function (self) {
...
@@ -15,7 +15,7 @@ module.exports = function (self) {
version
=
Module
.
cwrap
(
"version"
,
"string"
,
[]);
version
=
Module
.
cwrap
(
"version"
,
"string"
,
[]);
if
(
'_compileJSONCallback'
in
Module
)
if
(
'_compileJSONCallback'
in
Module
)
{
{
compileJSONInternal
=
Module
.
cwrap
(
"compileJSONCallback"
,
"string"
,
[
"string"
,
"number"
,
"number"
]);
var
compileJSONInternal
=
Module
.
cwrap
(
"compileJSONCallback"
,
"string"
,
[
"string"
,
"number"
,
"number"
]);
var
missingInputCallback
=
Module
.
Runtime
.
addFunction
(
function
(
path
)
{
var
missingInputCallback
=
Module
.
Runtime
.
addFunction
(
function
(
path
)
{
missingInputs
.
push
(
Module
.
Pointer_stringify
(
path
));
missingInputs
.
push
(
Module
.
Pointer_stringify
(
path
));
});
});
...
...
src/universal-dapp.js
View file @
18f094d7
...
@@ -345,13 +345,14 @@ UniversalDApp.prototype.getCallButton = function (args) {
...
@@ -345,13 +345,14 @@ UniversalDApp.prototype.getCallButton = function (args) {
var
getGasUsedOutput
=
function
(
result
,
vmResult
)
{
var
getGasUsedOutput
=
function
(
result
,
vmResult
)
{
var
$gasUsed
=
$
(
'<div class="gasUsed">'
);
var
$gasUsed
=
$
(
'<div class="gasUsed">'
);
var
caveat
=
lookupOnly
?
'<em>(<span class="caveat" title="Cost only applies when called by a contract">caveat</span>)</em>'
:
''
;
var
caveat
=
lookupOnly
?
'<em>(<span class="caveat" title="Cost only applies when called by a contract">caveat</span>)</em>'
:
''
;
var
gas
;
if
(
result
.
gasUsed
)
{
if
(
result
.
gasUsed
)
{
var
gas
=
result
.
gasUsed
.
toString
(
10
);
gas
=
result
.
gasUsed
.
toString
(
10
);
$gasUsed
.
html
(
'<strong>Transaction cost:</strong> '
+
gas
+
' gas. '
+
caveat
);
$gasUsed
.
html
(
'<strong>Transaction cost:</strong> '
+
gas
+
' gas. '
+
caveat
);
}
}
if
(
vmResult
.
gasUsed
)
{
if
(
vmResult
.
gasUsed
)
{
var
$callGasUsed
=
$
(
'<div class="gasUsed">'
);
var
$callGasUsed
=
$
(
'<div class="gasUsed">'
);
var
gas
=
vmResult
.
gasUsed
.
toString
(
10
);
gas
=
vmResult
.
gasUsed
.
toString
(
10
);
$callGasUsed
.
append
(
'<strong>Execution cost:</strong> '
+
gas
+
' gas.'
);
$callGasUsed
.
append
(
'<strong>Execution cost:</strong> '
+
gas
+
' gas.'
);
$gasUsed
.
append
(
$callGasUsed
);
$gasUsed
.
append
(
$callGasUsed
);
}
}
...
@@ -456,8 +457,10 @@ UniversalDApp.prototype.getCallButton = function (args) {
...
@@ -456,8 +457,10 @@ UniversalDApp.prototype.getCallButton = function (args) {
// Only decode if there supposed to be fields
// Only decode if there supposed to be fields
if
(
args
.
abi
.
outputs
.
length
>
0
)
{
if
(
args
.
abi
.
outputs
.
length
>
0
)
{
try
{
try
{
var
i
;
var
outputTypes
=
[];
var
outputTypes
=
[];
for
(
var
i
=
0
;
i
<
args
.
abi
.
outputs
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
args
.
abi
.
outputs
.
length
;
i
++
)
{
outputTypes
.
push
(
args
.
abi
.
outputs
[
i
].
type
);
outputTypes
.
push
(
args
.
abi
.
outputs
[
i
].
type
);
}
}
...
@@ -466,7 +469,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
...
@@ -466,7 +469,7 @@ UniversalDApp.prototype.getCallButton = function (args) {
// format decoded data
// format decoded data
decodedObj
=
ethJSABI
.
stringify
(
outputTypes
,
decodedObj
);
decodedObj
=
ethJSABI
.
stringify
(
outputTypes
,
decodedObj
);
for
(
var
i
=
0
;
i
<
outputTypes
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
outputTypes
.
length
;
i
++
)
{
var
name
=
args
.
abi
.
outputs
[
i
].
name
;
var
name
=
args
.
abi
.
outputs
[
i
].
name
;
if
(
name
.
length
>
0
)
{
if
(
name
.
length
>
0
)
{
decodedObj
[
i
]
=
outputTypes
[
i
]
+
' '
+
name
+
': '
+
decodedObj
[
i
];
decodedObj
[
i
]
=
outputTypes
[
i
]
+
' '
+
name
+
': '
+
decodedObj
[
i
];
...
...
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