aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/js.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-06-16 01:28:48 +0800
committerobscuren <geffobscura@gmail.com>2015-06-16 01:28:48 +0800
commit5daf8729be88eca87b302ebf7a46fc69cad0f6d0 (patch)
tree0053cb5b84978645b3c83895a651c512e081a183 /cmd/geth/js.go
parentbac9a94ddf20dc530966cbf6cd384aaf94aedc77 (diff)
parent4673b04503742de9b1622557b44135d6a4934ad6 (diff)
downloadgo-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar
go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar.gz
go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar.bz2
go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar.lz
go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar.xz
go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar.zst
go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.zip
Merge branch 'release/0.9.30'v0.9.30
Diffstat (limited to 'cmd/geth/js.go')
-rw-r--r--cmd/geth/js.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/geth/js.go b/cmd/geth/js.go
index 706bc6554..7e6e10ca9 100644
--- a/cmd/geth/js.go
+++ b/cmd/geth/js.go
@@ -73,7 +73,7 @@ type jsre struct {
prompter
}
-func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, interactive bool, f xeth.Frontend) *jsre {
+func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain, ipcpath string, interactive bool, f xeth.Frontend) *jsre {
js := &jsre{ethereum: ethereum, ps1: "> "}
// set default cors domain used by startRpc from CLI flag
js.corsDomain = corsDomain
@@ -84,7 +84,7 @@ func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, interactive boo
js.wait = js.xeth.UpdateState()
// update state in separare forever blocks
js.re = re.New(libPath)
- js.apiBindings(f)
+ js.apiBindings(ipcpath, f)
js.adminBindings()
if !liner.TerminalSupported() || !interactive {
@@ -103,14 +103,15 @@ func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, interactive boo
return js
}
-func (js *jsre) apiBindings(f xeth.Frontend) {
+func (js *jsre) apiBindings(ipcpath string, f xeth.Frontend) {
xe := xeth.New(js.ethereum, f)
ethApi := rpc.NewEthereumApi(xe)
- jeth := rpc.NewJeth(ethApi, js.re)
+ jeth := rpc.NewJeth(ethApi, js.re, ipcpath)
js.re.Set("jeth", struct{}{})
t, _ := js.re.Get("jeth")
jethObj := t.Object()
+
jethObj.Set("send", jeth.Send)
jethObj.Set("sendAsync", jeth.Send)
@@ -119,7 +120,7 @@ func (js *jsre) apiBindings(f xeth.Frontend) {
utils.Fatalf("Error loading bignumber.js: %v", err)
}
- err = js.re.Compile("ethereum.js", re.Ethereum_JS)
+ err = js.re.Compile("ethereum.js", re.Web3_JS)
if err != nil {
utils.Fatalf("Error loading ethereum.js: %v", err)
}