Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
6b644c17
Commit
6b644c17
authored
Apr 15, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
parents
7cb06548
c23a971a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
24 deletions
+74
-24
_new_contract.qml
ethereal/assets/qml/newTransaction/_new_contract.qml
+36
-3
wallet.qml
ethereal/assets/qml/wallet.qml
+35
-21
ui_lib.go
ethereal/ui/ui_lib.go
+3
-0
No files found.
ethereal/assets/qml/newTransaction/_new_contract.qml
View file @
6b644c17
...
@@ -85,9 +85,34 @@ Component {
...
@@ -85,9 +85,34 @@ Component {
}
}
}
}
Row
{
id
:
rowContract
ExclusiveGroup
{
id
:
contractTypeGroup
}
RadioButton
{
id
:
createContractRadio
text
:
"Create contract"
checked
:
true
exclusiveGroup
:
contractTypeGroup
onClicked
:
{
txFuelRecipient
.
visible
=
false
txDataLabel
.
text
=
"Contract code"
}
}
RadioButton
{
id
:
runContractRadio
text
:
"Run contract"
exclusiveGroup
:
contractTypeGroup
onClicked
:
{
txFuelRecipient
.
visible
=
true
txDataLabel
.
text
=
"Contract arguments"
}
}
}
Label
{
Label
{
id
:
txDataLabel
id
:
txDataLabel
text
:
"
Transaction data
"
text
:
"
Contract code
"
}
}
TextArea
{
TextArea
{
...
@@ -100,6 +125,14 @@ Component {
...
@@ -100,6 +125,14 @@ Component {
}
}
}
}
TextField
{
id
:
txFuelRecipient
placeholderText
:
"Contract address"
validator
:
RegExpValidator
{
regExp
:
/
[
a-f0-9
]{40}
/
}
visible
:
false
width
:
530
}
Button
{
Button
{
id
:
txButton
id
:
txButton
states
:
[
states
:
[
...
@@ -116,14 +149,14 @@ Component {
...
@@ -116,14 +149,14 @@ Component {
enabled
:
false
enabled
:
false
onClicked
:
{
onClicked
:
{
//this.enabled = false
//this.enabled = false
var
res
=
eth
.
createTx
(
""
,
txValue
.
text
,
txGas
.
text
,
txGasPrice
.
text
,
codeView
.
text
)
var
res
=
eth
.
createTx
(
txFuelRecipient
.
text
,
txValue
.
text
,
txGas
.
text
,
txGasPrice
.
text
,
codeView
.
text
)
if
(
res
[
1
])
{
if
(
res
[
1
])
{
txResult
.
text
=
"Your contract <b>could not</b> be send over the network:
\n
<b>"
txResult
.
text
=
"Your contract <b>could not</b> be send over the network:
\n
<b>"
txResult
.
text
+=
res
[
1
].
error
()
txResult
.
text
+=
res
[
1
].
error
()
txResult
.
text
+=
"</b>"
txResult
.
text
+=
"</b>"
mainContractColumn
.
state
=
"ERROR"
mainContractColumn
.
state
=
"ERROR"
}
else
{
}
else
{
txResult
.
text
=
"Your
contract
has been submitted:
\n
"
txResult
.
text
=
"Your
transaction
has been submitted:
\n
"
txOutput
.
text
=
res
[
0
]
txOutput
.
text
=
res
[
0
]
mainContractColumn
.
state
=
"DONE"
mainContractColumn
.
state
=
"DONE"
}
}
...
...
ethereal/assets/qml/wallet.qml
View file @
6b644c17
...
@@ -167,7 +167,7 @@ ApplicationWindow {
...
@@ -167,7 +167,7 @@ ApplicationWindow {
var
newContract
=
component
.
createObject
(
"newContract"
)
var
newContract
=
component
.
createObject
(
"newContract"
)
addTab
(
"Simple send"
,
newTransaction
)
addTab
(
"Simple send"
,
newTransaction
)
addTab
(
"C
reate contract
"
,
newContract
)
addTab
(
"C
ontracts
"
,
newContract
)
}
}
}
}
}
}
...
@@ -401,26 +401,36 @@ ApplicationWindow {
...
@@ -401,26 +401,36 @@ ApplicationWindow {
orientation
:
Qt
.
Vertical
orientation
:
Qt
.
Vertical
anchors.fill
:
parent
anchors.fill
:
parent
TableView
{
TableView
{
property
var
memModel
:
ListModel
{
property
var
memModel
:
ListModel
{
id
:
memModel
id
:
memModel
}
}
height
:
parent
.
height
/
2
height
:
parent
.
height
/
2
width
:
parent
.
width
width
:
parent
.
width
TableViewColumn
{
id
:
mnumColmn
;
role
:
"num"
;
title
:
"#"
;
width
:
50
}
TableViewColumn
{
id
:
mnumColmn
;
role
:
"num"
;
title
:
"#"
;
width
:
50
}
TableViewColumn
{
role
:
"value"
;
title
:
"Memory"
;
width
:
750
}
TableViewColumn
{
role
:
"value"
;
title
:
"Memory"
;
width
:
750
}
model
:
memModel
model
:
memModel
}
}
TableView
{
SplitView
{
property
var
stackModel
:
ListModel
{
orientation
:
Qt
.
Horizontal
id
:
stackModel
TableView
{
}
property
var
debuggerLog
:
ListModel
{
height
:
parent
.
height
/
2
id
:
debuggerLog
width
:
parent
.
width
}
TableViewColumn
{
role
:
"value"
;
title
:
"Stack"
;
width
:
parent
.
width
}
TableViewColumn
{
role
:
"value"
;
title
:
"Debug messages"
}
model
:
stackModel
model
:
debuggerLog
}
}
TableView
{
property
var
stackModel
:
ListModel
{
id
:
stackModel
}
height
:
parent
.
height
/
2
width
:
parent
.
width
TableViewColumn
{
role
:
"value"
;
title
:
"Stack"
;
width
:
parent
.
width
}
model
:
stackModel
}
}
}
}
}
}
}
}
...
@@ -449,6 +459,10 @@ ApplicationWindow {
...
@@ -449,6 +459,10 @@ ApplicationWindow {
function
setStack
(
stack
)
{
function
setStack
(
stack
)
{
stackModel
.
append
({
value
:
stack
})
stackModel
.
append
({
value
:
stack
})
}
}
function
addDebugMessage
(
message
){
console
.
log
(
"WOOP:"
)
debuggerLog
.
append
({
value
:
message
})
}
function
clearStack
()
{
function
clearStack
()
{
stackModel
.
clear
()
stackModel
.
clear
()
...
...
ethereal/ui/ui_lib.go
View file @
6b644c17
...
@@ -102,6 +102,9 @@ func (ui *UiLib) DebugTx(recipient, valueStr, gasStr, gasPriceStr, data string)
...
@@ -102,6 +102,9 @@ func (ui *UiLib) DebugTx(recipient, valueStr, gasStr, gasPriceStr, data string)
asm
,
err
:=
mutan
.
Compile
(
strings
.
NewReader
(
mainInput
),
false
)
asm
,
err
:=
mutan
.
Compile
(
strings
.
NewReader
(
mainInput
),
false
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Println
(
err
)
fmt
.
Println
(
err
)
for
_
,
e
:=
range
err
{
ui
.
win
.
Root
()
.
Call
(
"addDebugMessage"
,
e
.
Error
())
}
}
}
callerScript
:=
ethutil
.
Assemble
(
asm
...
)
callerScript
:=
ethutil
.
Assemble
(
asm
...
)
...
...
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