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
5660d598
Commit
5660d598
authored
Apr 01, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tx output
parent
e403b28e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
wallet.qml
ethereal/assets/qml/wallet.qml
+15
-2
library.go
ethereal/ui/library.go
+4
-4
No files found.
ethereal/assets/qml/wallet.qml
View file @
5660d598
...
@@ -199,9 +199,22 @@ ApplicationWindow {
...
@@ -199,9 +199,22 @@ ApplicationWindow {
text
:
"Send"
text
:
"Send"
onClicked
:
{
onClicked
:
{
//this.enabled = false
//this.enabled = false
console
.
log
(
eth
.
createTx
(
txRecipient
.
text
,
txValue
.
text
,
txGas
.
text
,
txGasPrice
.
text
,
codeView
.
text
))
var
res
=
eth
.
createTx
(
txRecipient
.
text
,
txValue
.
text
,
txGas
.
text
,
txGasPrice
.
text
,
codeView
.
text
)
if
(
res
[
1
])
{
txOutput
.
text
=
"Output:
\n
"
+
res
[
1
].
error
()
}
else
{
txOutput
.
text
=
"Output:
\n
"
+
res
[
0
]
}
txOutput
.
visible
=
true
}
}
}
}
TextArea
{
id
:
txOutput
visible
:
false
Layout.fillWidth
:
true
height
:
40
anchors.bottom
:
parent
.
bottom
}
}
}
}
}
...
@@ -391,7 +404,7 @@ ApplicationWindow {
...
@@ -391,7 +404,7 @@ ApplicationWindow {
anchors.left
:
aboutIcon
.
right
anchors.left
:
aboutIcon
.
right
anchors.leftMargin
:
10
anchors.leftMargin
:
10
font.pointSize
:
12
font.pointSize
:
12
text
:
"<h2>Ethere
um(Go)</h2><br><h3>Development</h3>Jeffrey Wilcke
<br><h3>Binary Distribution</h3>Jarrad Hope<br>"
text
:
"<h2>Ethere
al</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes
<br><h3>Binary Distribution</h3>Jarrad Hope<br>"
}
}
}
}
...
...
ethereal/ui/library.go
View file @
5660d598
...
@@ -15,7 +15,7 @@ type EthLib struct {
...
@@ -15,7 +15,7 @@ type EthLib struct {
txPool
*
ethchain
.
TxPool
txPool
*
ethchain
.
TxPool
}
}
func
(
lib
*
EthLib
)
CreateTx
(
recipient
,
valueStr
,
gasStr
,
gasPriceStr
,
data
string
)
string
{
func
(
lib
*
EthLib
)
CreateTx
(
recipient
,
valueStr
,
gasStr
,
gasPriceStr
,
data
string
)
(
string
,
error
)
{
var
hash
[]
byte
var
hash
[]
byte
var
contractCreation
bool
var
contractCreation
bool
if
len
(
recipient
)
==
0
{
if
len
(
recipient
)
==
0
{
...
@@ -24,7 +24,7 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin
...
@@ -24,7 +24,7 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin
var
err
error
var
err
error
hash
,
err
=
hex
.
DecodeString
(
recipient
)
hash
,
err
=
hex
.
DecodeString
(
recipient
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
.
Error
()
return
""
,
err
}
}
}
}
...
@@ -37,7 +37,7 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin
...
@@ -37,7 +37,7 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin
if
contractCreation
{
if
contractCreation
{
asm
,
err
:=
mutan
.
Compile
(
strings
.
NewReader
(
data
),
false
)
asm
,
err
:=
mutan
.
Compile
(
strings
.
NewReader
(
data
),
false
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
.
Error
()
return
""
,
err
}
}
code
:=
ethutil
.
Assemble
(
asm
...
)
code
:=
ethutil
.
Assemble
(
asm
...
)
...
@@ -55,7 +55,7 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin
...
@@ -55,7 +55,7 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin
ethutil
.
Config
.
Log
.
Infof
(
"Tx hash %x"
,
tx
.
Hash
())
ethutil
.
Config
.
Log
.
Infof
(
"Tx hash %x"
,
tx
.
Hash
())
}
}
return
ethutil
.
Hex
(
tx
.
Hash
())
return
ethutil
.
Hex
(
tx
.
Hash
())
,
nil
}
}
/*
/*
...
...
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