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
3a7a3144
Commit
3a7a3144
authored
Nov 04, 2016
by
chriseth
Committed by
GitHub
Nov 04, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #299 from ethereum/contract-details
Contract details
parents
21d1a5db
3fde2d62
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
25 deletions
+8
-25
browser-solidity.css
assets/css/browser-solidity.css
+0
-7
renderer.js
src/app/renderer.js
+5
-10
ui-helper.js
src/app/ui-helper.js
+3
-8
No files found.
assets/css/browser-solidity.css
View file @
3a7a3144
...
...
@@ -349,13 +349,6 @@ body {
margin
:
0.5em
;
}
.gethDeployText
{
border-color
:
#bebebe
;
height
:
2.5em
;
width
:
100%
;
display
:
block
;
}
.contractDetails
button
{
background-color
:
transparent
;
border
:
0
none
;
...
...
src/app/renderer.js
View file @
3a7a3144
...
...
@@ -85,27 +85,22 @@ Renderer.prototype.contracts = function (data, source) {
})
}
// rendering function used by udapp. they need data and source
var
combined
=
function
(
contractName
,
jsonInterface
,
bytecode
)
{
return
JSON
.
stringify
([{
name
:
contractName
,
interface
:
jsonInterface
,
bytecode
:
bytecode
}])
}
var
renderOutputModifier
=
function
(
contractName
,
$contractOutput
)
{
var
contract
=
data
.
contracts
[
contractName
]
if
(
contract
.
bytecode
)
{
$contractOutput
.
append
(
uiHelper
.
t
ext
Row
(
'Bytecode'
,
contract
.
bytecode
))
$contractOutput
.
append
(
uiHelper
.
t
able
Row
(
'Bytecode'
,
contract
.
bytecode
))
}
$contractOutput
.
append
(
uiHelper
.
t
ext
Row
(
'Interface'
,
contract
[
'interface'
]))
$contractOutput
.
append
(
uiHelper
.
t
able
Row
(
'Interface'
,
contract
[
'interface'
]))
if
(
contract
.
bytecode
)
{
$contractOutput
.
append
(
uiHelper
.
textRow
(
'Web3 deploy'
,
uiHelper
.
gethDeploy
(
contractName
.
toLowerCase
(),
contract
[
'interface'
],
contract
.
bytecode
),
'deploy'
))
$contractOutput
.
append
(
uiHelper
.
textRow
(
'uDApp'
,
combined
(
contractName
,
contract
[
'interface'
],
contract
.
bytecode
),
'deploy'
))
$contractOutput
.
append
(
uiHelper
.
preRow
(
'Web3 deploy'
,
uiHelper
.
gethDeploy
(
contractName
.
toLowerCase
(),
contract
[
'interface'
],
contract
.
bytecode
),
'deploy'
))
}
var
ctrSource
=
getSource
(
contractName
,
source
,
data
)
return
$contractOutput
.
append
(
uiHelper
.
getDetails
(
contract
,
ctrSource
,
contractName
))
}
// //
var
self
=
this
var
getSource
=
function
(
contractName
,
source
,
data
)
{
...
...
src/app/ui-helper.js
View file @
3a7a3144
...
...
@@ -16,13 +16,6 @@ module.exports = {
$
(
'<input readonly="readonly"/>'
).
val
(
data
))
},
textRow
:
function
(
description
,
data
,
cls
)
{
return
this
.
tableRowItems
(
$
(
'<strong/>'
).
text
(
description
),
$
(
'<textarea readonly="readonly" class="gethDeployText"/>'
).
val
(
data
),
cls
)
},
preRow
:
function
(
description
,
data
)
{
return
this
.
tableRowItems
(
$
(
'<span/>'
).
text
(
description
),
...
...
@@ -141,7 +134,9 @@ module.exports = {
for
(
var
fun
in
contract
.
functionHashes
)
{
funHashes
+=
contract
.
functionHashes
[
fun
]
+
' '
+
fun
+
'
\
n'
}
details
.
append
(
this
.
preRow
(
'Functions'
,
funHashes
))
if
(
funHashes
.
length
>
0
)
{
details
.
append
(
this
.
preRow
(
'Functions'
,
funHashes
))
}
var
gasEstimates
=
this
.
formatGasEstimates
(
contract
.
gasEstimates
)
if
(
gasEstimates
)
{
...
...
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