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
e7fd6375
Commit
e7fd6375
authored
Jul 22, 2015
by
chriseth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Styling.
parent
2f011483
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
index.html
index.html
+22
-17
No files found.
index.html
View file @
e7fd6375
...
...
@@ -56,24 +56,23 @@ body {
width
:
18ex
;
display
:
inline-block
;
}
strong
.col1
{
top
:
-10px
;
position
:
relative
;
margin-bottom
:
5px
;
}
.col2
{
width
:
60ex
;
display
:
inline-block
;
}
textarea
.col2
{
height
:
20px
;
.gethDeployText
{
border-color
:
#bebebe
;
margin-bottom
:
5p
x
;
height
:
2.5e
x
;
}
.runButton
{
width
:
30ex
;
text-align
:
left
;
overflow
:
hidden
;
}
.contractInstance
{
margin-left
:
2ex
;
margin-bottom
:
20px
;
}
</style>
<script
src=
"libs/jquery-2.1.3.min.js"
></script>
<script
src=
"libs/ace.js"
></script>
...
...
@@ -237,7 +236,7 @@ var gethDeploy = function(contractName, interface, bytecode){
return
code
;
}
}
;
var
renderContracts
=
function
(
data
,
source
)
{
$
(
'#output'
).
empty
();
...
...
@@ -245,24 +244,30 @@ var renderContracts = function(data, source) {
var
contract
=
data
.
contracts
[
contractName
];
var
contractOutput
=
$
(
'<div class="contractOutput"/>'
)
.
append
(
$
(
'<h3/>'
).
text
(
contractName
))
.
append
(
getExecuteInterface
(
contract
,
contractName
))
.
append
(
$
(
'<div/>'
).
text
((
contract
.
bytecode
.
length
/
2
)
+
' bytes'
))
.
append
(
getExecuteInterface
(
contract
,
contractName
))
.
append
(
tableRow
(
'Bytecode'
,
contract
.
bytecode
))
.
append
(
tableRow
(
'Interface'
,
contract
[
'interface'
]))
.
append
(
textRow
(
'Geth deploy'
,
gethDeploy
(
contractName
.
toLowerCase
(),
contract
[
'interface'
],
contract
.
bytecode
)))
.
append
(
getDetails
(
contract
,
source
,
contractName
));
$
(
'#output'
).
append
(
contractOutput
);
}
$
(
'.col2 input,textarea'
).
click
(
function
()
{
this
.
select
();
}
);
};
var
tableRow
=
function
(
description
,
data
)
{
var
tableRow
Items
=
function
(
first
,
second
)
{
return
$
(
'<div/>'
)
.
append
(
$
(
'<span class="col1">'
).
text
(
description
))
.
append
(
$
(
'<input readonly="readonly" class="col2">'
).
val
(
data
));
.
append
(
$
(
'<div class="col1">'
).
append
(
first
))
.
append
(
$
(
'<div class="col2">'
).
append
(
second
));
};
var
tableRow
=
function
(
description
,
data
)
{
return
tableRowItems
(
$
(
'<span/>'
).
text
(
description
),
$
(
'<input readonly="readonly"/>'
).
val
(
data
));
};
var
textRow
=
function
(
description
,
data
)
{
return
$
(
'<div/>'
)
.
append
(
$
(
'<strong class="col1">'
).
text
(
description
))
.
append
(
$
(
'<textarea class="col2" onclick="this.select()">'
+
data
+
"</textarea>"
));
return
tableRowItems
(
$
(
'<strong/>'
).
text
(
description
),
$
(
'<textarea readonly="readonly" class="gethDeployText"/>'
).
val
(
data
));
};
var
getDetails
=
function
(
contract
,
source
,
contractName
)
{
var
button
=
$
(
'<button>Details</button>'
);
...
...
@@ -407,7 +412,7 @@ var getExecuteInterface = function(contract, name) {
var
funABI
=
getConstructorInterface
(
abi
);
var
appendFunctions
=
function
(
address
)
{
var
instance
=
$
(
'<div/>'
);
var
instance
=
$
(
'<div
class="contractInstance"
/>'
);
instance
.
append
(
$
(
'<span/>'
).
text
(
'Contract at address '
+
address
.
toString
(
'hex'
)));
$
.
each
(
abi
,
function
(
i
,
funABI
)
{
if
(
funABI
.
type
!=
'function'
)
return
;
...
...
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