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
1efa6b33
Commit
1efa6b33
authored
Jul 28, 2016
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not show bytecode, interface or opcodes if they are empty
parent
5e367b54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
renderer.js
src/app/renderer.js
+15
-8
No files found.
src/app/renderer.js
View file @
1efa6b33
...
@@ -74,12 +74,17 @@ function Renderer (editor, executionContext, updateFiles, transactionDebugger) {
...
@@ -74,12 +74,17 @@ function Renderer (editor, executionContext, updateFiles, transactionDebugger) {
removable_instances
:
true
,
removable_instances
:
true
,
renderOutputModifier
:
function
(
contractName
,
$contractOutput
)
{
renderOutputModifier
:
function
(
contractName
,
$contractOutput
)
{
var
contract
=
data
.
contracts
[
contractName
];
var
contract
=
data
.
contracts
[
contractName
];
return
$contractOutput
if
(
contract
.
bytecode
)
{
.
append
(
textRow
(
'Bytecode'
,
contract
.
bytecode
))
$contractOutput
.
append
(
textRow
(
'Bytecode'
,
contract
.
bytecode
));
.
append
(
textRow
(
'Interface'
,
contract
[
'interface'
]))
}
.
append
(
textRow
(
'Web3 deploy'
,
gethDeploy
(
contractName
.
toLowerCase
(),
contract
[
'interface'
],
contract
.
bytecode
),
'deploy'
))
if
(
contract
[
'interface'
]
!==
'[]
\
n'
)
{
.
append
(
textRow
(
'uDApp'
,
combined
(
contractName
,
contract
[
'interface'
],
contract
.
bytecode
),
'deploy'
))
$contractOutput
.
append
(
textRow
(
'Interface'
,
contract
[
'interface'
]));
.
append
(
getDetails
(
contract
,
source
,
contractName
));
}
if
(
contract
.
bytecode
)
{
$contractOutput
.
append
(
textRow
(
'Web3 deploy'
,
gethDeploy
(
contractName
.
toLowerCase
(),
contract
[
'interface'
],
contract
.
bytecode
),
'deploy'
));
$contractOutput
.
append
(
textRow
(
'uDApp'
,
combined
(
contractName
,
contract
[
'interface'
],
contract
.
bytecode
),
'deploy'
));
}
return
$contractOutput
.
append
(
getDetails
(
contract
,
source
,
contractName
));
}
}
},
transactionDebugger
);
},
transactionDebugger
);
...
@@ -129,8 +134,10 @@ function Renderer (editor, executionContext, updateFiles, transactionDebugger) {
...
@@ -129,8 +134,10 @@ function Renderer (editor, executionContext, updateFiles, transactionDebugger) {
var
getDetails
=
function
(
contract
,
source
,
contractName
)
{
var
getDetails
=
function
(
contract
,
source
,
contractName
)
{
var
button
=
$
(
'<button>Toggle Details</button>'
);
var
button
=
$
(
'<button>Toggle Details</button>'
);
var
details
=
$
(
'<div style="display: none;"/>'
)
var
details
=
$
(
'<div style="display: none;"/>'
)
.
append
(
tableRow
(
'Solidity Interface'
,
contract
.
solidity_interface
))
.
append
(
tableRow
(
'Solidity Interface'
,
contract
.
solidity_interface
));
.
append
(
tableRow
(
'Opcodes'
,
contract
.
opcodes
));
if
(
contract
.
opcodes
!==
''
)
{
details
.
append
(
tableRow
(
'Opcodes'
,
contract
.
opcodes
));
}
var
funHashes
=
''
;
var
funHashes
=
''
;
for
(
var
fun
in
contract
.
functionHashes
)
{
for
(
var
fun
in
contract
.
functionHashes
)
{
funHashes
+=
contract
.
functionHashes
[
fun
]
+
' '
+
fun
+
'
\
n'
;
funHashes
+=
contract
.
functionHashes
[
fun
]
+
' '
+
fun
+
'
\
n'
;
...
...
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