aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorzsfelfoldi <zsfelfoldi@gmail.com>2015-03-20 20:22:01 +0800
committerzsfelfoldi <zsfelfoldi@gmail.com>2015-03-20 20:22:01 +0800
commit8324b683b4e557e6c5c9d572d01f933b3e074185 (patch)
tree8c6a8c34d87f808c3979875642d4ca38844ad22d /cmd
parent91f9f355b2e334214e38e1827c624cdcc23c5130 (diff)
downloaddexon-8324b683b4e557e6c5c9d572d01f933b3e074185.tar
dexon-8324b683b4e557e6c5c9d572d01f933b3e074185.tar.gz
dexon-8324b683b4e557e6c5c9d572d01f933b3e074185.tar.bz2
dexon-8324b683b4e557e6c5c9d572d01f933b3e074185.tar.lz
dexon-8324b683b4e557e6c5c9d572d01f933b3e074185.tar.xz
dexon-8324b683b4e557e6c5c9d572d01f933b3e074185.tar.zst
dexon-8324b683b4e557e6c5c9d572d01f933b3e074185.zip
using robertkrimen/otto, godeps updated
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ethereum/admin.go4
-rw-r--r--cmd/ethereum/js.go9
-rw-r--r--cmd/ethereum/js_test.go2
3 files changed, 11 insertions, 4 deletions
diff --git a/cmd/ethereum/admin.go b/cmd/ethereum/admin.go
index 880a22c22..e71a12392 100644
--- a/cmd/ethereum/admin.go
+++ b/cmd/ethereum/admin.go
@@ -8,13 +8,13 @@ import (
"time"
"github.com/ethereum/go-ethereum/cmd/utils"
- "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/state"
"github.com/ethereum/go-ethereum/xeth"
- "github.com/obscuren/otto"
+ "github.com/robertkrimen/otto"
)
/*
diff --git a/cmd/ethereum/js.go b/cmd/ethereum/js.go
index b4b54b7e6..88d16d6a8 100644
--- a/cmd/ethereum/js.go
+++ b/cmd/ethereum/js.go
@@ -91,7 +91,14 @@ func newJSRE(ethereum *eth.Ethereum, libPath string) *jsre {
func (js *jsre) apiBindings() {
ethApi := rpc.NewEthereumApi(js.xeth, js.ethereum.DataDir)
- js.re.Bind("jeth", rpc.NewJeth(ethApi, js.re.ToVal))
+ //js.re.Bind("jeth", rpc.NewJeth(ethApi, js.re.ToVal))
+
+ jeth := rpc.NewJeth(ethApi, js.re.ToVal, js.re)
+ //js.re.Bind("jeth", jeth)
+ js.re.Set("jeth", struct{}{})
+ t, _ := js.re.Get("jeth")
+ jethObj := t.Object()
+ jethObj.Set("send", jeth.Send)
_, err := js.re.Eval(re.BigNumber_JS)
diff --git a/cmd/ethereum/js_test.go b/cmd/ethereum/js_test.go
index 0d3c22553..e3806d24d 100644
--- a/cmd/ethereum/js_test.go
+++ b/cmd/ethereum/js_test.go
@@ -2,7 +2,7 @@ package main
import (
"fmt"
- "github.com/obscuren/otto"
+ "github.com/robertkrimen/otto"
"os"
"path"
"testing"