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
91824af4
Commit
91824af4
authored
May 05, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed getkey and secrettoaddress
parent
dd45197b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
16 deletions
+20
-16
ethereum.js
ethereal/assets/ethereum.js
+4
-1
webapp.qml
ethereal/assets/qml/webapp.qml
+7
-8
samplecoin.html
ethereal/assets/samplecoin/samplecoin.html
+9
-7
No files found.
ethereal/assets/ethereum.js
View file @
91824af4
...
@@ -36,11 +36,14 @@ window.eth = {
...
@@ -36,11 +36,14 @@ window.eth = {
postData
({
call
:
"getKey"
},
cb
);
postData
({
call
:
"getKey"
},
cb
);
},
},
getBalanceAt
:
function
(
address
,
cb
)
{
getBalanceAt
:
function
(
address
,
cb
)
{
postData
({
call
:
"getBalance"
,
args
:
[
address
]},
cb
);
postData
({
call
:
"getBalance"
,
args
:
[
address
]},
cb
);
},
},
getSecretToAddress
:
function
(
sec
,
cb
)
{
postData
({
call
:
"getSecretToAddress"
,
args
:
[
sec
]},
cb
);
},
watch
:
function
(
address
,
storageAddrOrCb
,
cb
)
{
watch
:
function
(
address
,
storageAddrOrCb
,
cb
)
{
var
ev
;
var
ev
;
if
(
cb
===
undefined
)
{
if
(
cb
===
undefined
)
{
...
...
ethereal/assets/qml/webapp.qml
View file @
91824af4
...
@@ -81,8 +81,9 @@ ApplicationWindow {
...
@@ -81,8 +81,9 @@ ApplicationWindow {
break
break
case
"getKey"
:
case
"getKey"
:
var
keys
=
eth
.
getKey
()
var
key
=
eth
.
getKey
().
privateKey
;
postData
(
data
.
_seed
,
keys
)
postData
(
data
.
_seed
,
key
)
break
break
case
"watch"
:
case
"watch"
:
require
(
1
)
require
(
1
)
...
@@ -99,14 +100,13 @@ ApplicationWindow {
...
@@ -99,14 +100,13 @@ ApplicationWindow {
}
}
}
}
break
;
break
;
case
"getSecretToAddress"
:
require
(
1
)
postData
(
data
.
_seed
,
eth
.
secretToAddress
(
data
.
args
[
0
]))
break
;
case
"debug"
:
case
"debug"
:
console
.
log
(
data
.
args
[
0
]);
console
.
log
(
data
.
args
[
0
]);
break
;
break
;
case
"test"
:
console
.
log
(
"in"
)
webview
.
experimental
.
evaluateJavaScript
(
"hello()"
)
console
.
log
(
"out"
)
break
;
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
data
.
call
+
": "
+
e
)
console
.
log
(
data
.
call
+
": "
+
e
)
...
@@ -134,7 +134,6 @@ ApplicationWindow {
...
@@ -134,7 +134,6 @@ ApplicationWindow {
postEvent
(
"object:"
+
stateObject
.
address
(),
stateObject
)
postEvent
(
"object:"
+
stateObject
.
address
(),
stateObject
)
}
}
function
onStorageChangeCb
(
storageObject
)
{
function
onStorageChangeCb
(
storageObject
)
{
console
.
log
(
"storage object cb"
,
storageObject
)
var
ev
=
[
"storage"
,
storageObject
.
stateAddress
,
storageObject
.
address
].
join
(
":"
);
var
ev
=
[
"storage"
,
storageObject
.
stateAddress
,
storageObject
.
address
].
join
(
":"
);
postEvent
(
ev
,
[
storageObject
.
address
,
storageObject
.
value
])
postEvent
(
ev
,
[
storageObject
.
address
,
storageObject
.
value
])
}
}
...
...
ethereal/assets/samplecoin/samplecoin.html
View file @
91824af4
...
@@ -26,15 +26,17 @@ function createTransaction() {
...
@@ -26,15 +26,17 @@ function createTransaction() {
function
init
()
{
function
init
()
{
eth
.
set
({
width
:
500
});
eth
.
set
({
width
:
500
});
eth
.
getKey
(
function
(
keyPair
)
{
eth
.
getKey
(
function
(
sec
)
{
mAddr
=
keyPair
.
privateKey
;
eth
.
getSecretToAddress
(
sec
,
function
(
addr
)
{
mAddr
=
addr
;
eth
.
getStorageAt
(
jefcoinAddr
,
keyPair
.
address
,
function
(
storage
)
{
eth
.
getStorageAt
(
jefcoinAddr
,
addr
,
function
(
storage
)
{
document
.
querySelector
(
"#current-amount"
).
innerHTML
=
storage
;
document
.
querySelector
(
"#current-amount"
).
innerHTML
=
storage
;
});
});
eth
.
watch
(
jefcoinAddr
,
keyPair
.
address
,
function
(
addr
,
value
)
{
eth
.
watch
(
jefcoinAddr
,
addr
,
function
(
addr
,
value
)
{
document
.
querySelector
(
"#current-amount"
).
innerHTML
=
value
document
.
querySelector
(
"#current-amount"
).
innerHTML
=
value
});
});
});
});
});
}
}
...
...
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