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
6b67270e
Commit
6b67270e
authored
Jun 01, 2015
by
chriseth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Persisting details.
parent
1f32c285
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
index.html
index.html
+7
-3
No files found.
index.html
View file @
6b67270e
...
@@ -166,6 +166,8 @@ var onChange = function() {
...
@@ -166,6 +166,8 @@ var onChange = function() {
editor
.
getSession
().
on
(
'change'
,
onChange
);
editor
.
getSession
().
on
(
'change'
,
onChange
);
document
.
querySelector
(
'#optimize'
).
addEventListener
(
'change'
,
compile
);
document
.
querySelector
(
'#optimize'
).
addEventListener
(
'change'
,
compile
);
var
detailsOpen
=
{};
var
renderError
=
function
(
message
)
{
var
renderError
=
function
(
message
)
{
$
(
'#output'
).
empty
().
append
(
$
(
'<pre></pre>'
).
text
(
message
));
$
(
'#output'
).
empty
().
append
(
$
(
'<pre></pre>'
).
text
(
message
));
};
};
...
@@ -179,7 +181,7 @@ var renderContracts = function(data, source) {
...
@@ -179,7 +181,7 @@ var renderContracts = function(data, source) {
.
append
(
tableRow
(
'Bytecode'
,
contract
.
bytecode
))
.
append
(
tableRow
(
'Bytecode'
,
contract
.
bytecode
))
.
append
(
tableRow
(
'Interface'
,
contract
[
'interface'
]))
.
append
(
tableRow
(
'Interface'
,
contract
[
'interface'
]))
.
append
(
tableRow
(
'Solidity Interface'
,
contract
.
solidity_interface
))
.
append
(
tableRow
(
'Solidity Interface'
,
contract
.
solidity_interface
))
.
append
(
getDetails
(
contract
,
source
));
.
append
(
getDetails
(
contract
,
source
,
contractName
));
$
(
'#output'
).
append
(
contractOutput
);
$
(
'#output'
).
append
(
contractOutput
);
}
}
};
};
...
@@ -188,7 +190,7 @@ var tableRow = function(description, data) {
...
@@ -188,7 +190,7 @@ var tableRow = function(description, data) {
.
append
(
$
(
'<span class="col1">'
).
text
(
description
))
.
append
(
$
(
'<span class="col1">'
).
text
(
description
))
.
append
(
$
(
'<input readonly="readonly" class="col2">'
).
val
(
data
));
.
append
(
$
(
'<input readonly="readonly" class="col2">'
).
val
(
data
));
};
};
var
getDetails
=
function
(
contract
,
source
)
{
var
getDetails
=
function
(
contract
,
source
,
contractName
)
{
var
button
=
$
(
'<button>Details</button>'
);
var
button
=
$
(
'<button>Details</button>'
);
var
details
=
$
(
'<div style="display: none;"/>'
)
var
details
=
$
(
'<div style="display: none;"/>'
)
.
append
(
tableRow
(
'Opcodes'
,
contract
.
opcodes
));
.
append
(
tableRow
(
'Opcodes'
,
contract
.
opcodes
));
...
@@ -202,7 +204,9 @@ var getDetails = function(contract, source) {
...
@@ -202,7 +204,9 @@ var getDetails = function(contract, source) {
details
.
append
(
$
(
'<span class="col1">Assembly</span>'
));
details
.
append
(
$
(
'<span class="col1">Assembly</span>'
));
var
assembly
=
$
(
'<pre/>'
).
text
(
formatAssemblyText
(
contract
.
assembly
,
''
,
source
));
var
assembly
=
$
(
'<pre/>'
).
text
(
formatAssemblyText
(
contract
.
assembly
,
''
,
source
));
details
.
append
(
assembly
);
details
.
append
(
assembly
);
button
.
click
(
function
()
{
details
.
toggle
();
});
button
.
click
(
function
()
{
detailsOpen
[
contractName
]
=
!
detailsOpen
[
contractName
];
details
.
toggle
();
});
if
(
detailsOpen
[
contractName
])
details
.
show
();
return
$
(
'<div/>'
).
append
(
button
).
append
(
details
);
return
$
(
'<div/>'
).
append
(
button
).
append
(
details
);
};
};
var
formatGasEstimates
=
function
(
data
)
{
var
formatGasEstimates
=
function
(
data
)
{
...
...
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