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
1020d7ff
Commit
1020d7ff
authored
May 30, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unified the contract interface and tx interface. Fixes #62
parent
e7c9b86a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
51 deletions
+54
-51
README.md
README.md
+1
-1
wallet.qml
ethereal/assets/qml/wallet.qml
+53
-50
No files found.
README.md
View file @
1020d7ff
...
@@ -27,7 +27,6 @@ General command line options
...
@@ -27,7 +27,6 @@ General command line options
```
```
Shared between ethereum and ethereal
Shared between ethereum and ethereal
-m Start mining blocks
-genaddr Generates a new address and private key (destructive action)
-genaddr Generates a new address and private key (destructive action)
-p Port on which the server will accept incomming connections
-p Port on which the server will accept incomming connections
-upnp Enable UPnP
-upnp Enable UPnP
...
@@ -41,6 +40,7 @@ Ethereum only
...
@@ -41,6 +40,7 @@ Ethereum only
ethereum [options] [filename]
ethereum [options] [filename]
-js Start the JavaScript REPL
-js Start the JavaScript REPL
filename Load the given file and interpret as JavaScript
filename Load the given file and interpret as JavaScript
-m Start mining blocks
Etheral only
Etheral only
-asset_path absolute path to GUI assets directory
-asset_path absolute path to GUI assets directory
...
...
ethereal/assets/qml/wallet.qml
View file @
1020d7ff
...
@@ -170,6 +170,7 @@ ApplicationWindow {
...
@@ -170,6 +170,7 @@ ApplicationWindow {
visible
:
false
visible
:
false
anchors.fill
:
parent
anchors.fill
:
parent
color
:
"#00000000"
color
:
"#00000000"
/*
TabView{
TabView{
anchors.fill: parent
anchors.fill: parent
anchors.rightMargin: 5
anchors.rightMargin: 5
...
@@ -182,6 +183,10 @@ ApplicationWindow {
...
@@ -182,6 +183,10 @@ ApplicationWindow {
addTab("Contracts", newContract)
addTab("Contracts", newContract)
}
}
}
}
*/
Component.onCompleted
:
{
newContract
.
createObject
(
newTxView
)
}
}
}
Rectangle
{
Rectangle
{
...
@@ -574,7 +579,14 @@ ApplicationWindow {
...
@@ -574,7 +579,14 @@ ApplicationWindow {
}
else
{
}
else
{
isContract
=
"No"
isContract
=
"No"
}
}
txModel
.
insert
(
0
,
{
inout
:
inout
,
hash
:
tx
.
hash
,
address
:
tx
.
address
,
value
:
tx
.
value
,
contract
:
isContract
})
var
address
;
if
(
inout
==
"recv"
)
{
address
=
tx
.
sender
;
}
else
{
address
=
tx
.
address
;
}
txModel
.
insert
(
0
,
{
inout
:
inout
,
hash
:
tx
.
hash
,
address
:
address
,
value
:
tx
.
value
,
contract
:
isContract
})
}
}
function
addBlock
(
block
,
initial
)
{
function
addBlock
(
block
,
initial
)
{
...
@@ -625,6 +637,7 @@ ApplicationWindow {
...
@@ -625,6 +637,7 @@ ApplicationWindow {
id
:
newContract
id
:
newContract
Column
{
Column
{
id
:
mainContractColumn
id
:
mainContractColumn
anchors.fill
:
parent
function
contractFormReady
(){
function
contractFormReady
(){
if
(
codeView
.
text
.
length
>
0
&&
txValue
.
text
.
length
>
0
&&
txGas
.
text
.
length
>
0
&&
txGasPrice
.
length
>
0
)
{
if
(
codeView
.
text
.
length
>
0
&&
txValue
.
text
.
length
>
0
&&
txGas
.
text
.
length
>
0
&&
txGasPrice
.
length
>
0
)
{
txButton
.
state
=
"READY"
txButton
.
state
=
"READY"
...
@@ -646,6 +659,8 @@ ApplicationWindow {
...
@@ -646,6 +659,8 @@ ApplicationWindow {
PropertyChanges
{
target
:
codeView
;
visible
:
false
}
PropertyChanges
{
target
:
codeView
;
visible
:
false
}
PropertyChanges
{
target
:
txButton
;
visible
:
false
}
PropertyChanges
{
target
:
txButton
;
visible
:
false
}
PropertyChanges
{
target
:
txDataLabel
;
visible
:
false
}
PropertyChanges
{
target
:
txDataLabel
;
visible
:
false
}
PropertyChanges
{
target
:
atLabel
;
visible
:
false
}
PropertyChanges
{
target
:
txFuelRecipient
;
visible
:
false
}
PropertyChanges
{
target
:
txResult
;
visible
:
true
}
PropertyChanges
{
target
:
txResult
;
visible
:
true
}
PropertyChanges
{
target
:
txOutput
;
visible
:
true
}
PropertyChanges
{
target
:
txOutput
;
visible
:
true
}
...
@@ -672,82 +687,70 @@ ApplicationWindow {
...
@@ -672,82 +687,70 @@ ApplicationWindow {
anchors.leftMargin
:
5
anchors.leftMargin
:
5
anchors.topMargin
:
5
anchors.topMargin
:
5
TextField
{
id
:
txFuelRecipient
placeholderText
:
"Address / Name or empty for contract"
//validator: RegExpValidator { regExp: /[a-f0-9]{40}/ }
width
:
400
}
TextField
{
TextField
{
id
:
txValue
id
:
txValue
width
:
2
00
width
:
2
22
placeholderText
:
"Amount"
placeholderText
:
"Amount"
validator
:
RegExpValidator
{
regExp
:
/
\d
*/
}
validator
:
RegExpValidator
{
regExp
:
/
\d
*/
}
onTextChanged
:
{
onTextChanged
:
{
contractFormReady
()
contractFormReady
()
}
}
}
}
RowLayout
{
TextField
{
TextField
{
id
:
txGas
id
:
txGas
width
:
20
0
width
:
5
0
validator
:
RegExpValidator
{
regExp
:
/
\d
*/
}
validator
:
RegExpValidator
{
regExp
:
/
\d
*/
}
placeholderText
:
"Gas"
placeholderText
:
"Gas"
text
:
"500"
/*
onTextChanged: {
onTextChanged: {
contractFormReady()
contractFormReady()
}
}
*/
}
}
Label
{
id
:
atLabel
text
:
"@"
}
TextField
{
TextField
{
id
:
txGasPrice
id
:
txGasPrice
width
:
200
width
:
200
placeholderText
:
"Gas price"
placeholderText
:
"Gas price"
text
:
"1000000"
validator
:
RegExpValidator
{
regExp
:
/
\d
*/
}
validator
:
RegExpValidator
{
regExp
:
/
\d
*/
}
/*
onTextChanged: {
onTextChanged: {
contractFormReady()
contractFormReady()
}
}
}
*/
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
:
"
Contract code
"
text
:
"
Data
"
}
}
TextArea
{
TextArea
{
id
:
codeView
id
:
codeView
height
:
300
height
:
300
anchors.topMargin
:
5
anchors.topMargin
:
5
Layout.fillWidth
:
true
width
:
400
width
:
parent
.
width
/
2
onTextChanged
:
{
onTextChanged
:
{
contractFormReady
()
contractFormReady
()
}
}
}
}
TextField
{
id
:
txFuelRecipient
placeholderText
:
"Contract address"
//validator: RegExpValidator { regExp: /[a-f0-9]{40}/ }
visible
:
false
width
:
530
}
Button
{
Button
{
id
:
txButton
id
:
txButton
...
@@ -790,7 +793,7 @@ ApplicationWindow {
...
@@ -790,7 +793,7 @@ ApplicationWindow {
Button
{
Button
{
id
:
newTxButton
id
:
newTxButton
visible
:
false
visible
:
false
text
:
"Create a
n other contract
"
text
:
"Create a
new transaction
"
onClicked
:
{
onClicked
:
{
this
.
visible
=
false
this
.
visible
=
false
txResult
.
text
=
""
txResult
.
text
=
""
...
...
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