aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind
diff options
context:
space:
mode:
authorJM <jm@dexon.org>2019-01-31 15:12:57 +0800
committerJhih-Ming Huang <jm.huang@cobinhood.com>2019-05-06 10:44:03 +0800
commit9b8cd76237318e173147a7c32763b6b9d9759951 (patch)
tree44f860e1ed7e63354f48096ee5df0fa475719cc9 /accounts/abi/bind
parentd3b485a5af768db59bd648175849f961e25bc630 (diff)
downloaddexon-9b8cd76237318e173147a7c32763b6b9d9759951.tar
dexon-9b8cd76237318e173147a7c32763b6b9d9759951.tar.gz
dexon-9b8cd76237318e173147a7c32763b6b9d9759951.tar.bz2
dexon-9b8cd76237318e173147a7c32763b6b9d9759951.tar.lz
dexon-9b8cd76237318e173147a7c32763b6b9d9759951.tar.xz
dexon-9b8cd76237318e173147a7c32763b6b9d9759951.tar.zst
dexon-9b8cd76237318e173147a7c32763b6b9d9759951.zip
core: vm: vm interface (#164)
Diffstat (limited to 'accounts/abi/bind')
-rw-r--r--accounts/abi/bind/bind_test.go2
-rw-r--r--accounts/abi/bind/util_test.go2
2 files changed, 4 insertions, 0 deletions
diff --git a/accounts/abi/bind/bind_test.go b/accounts/abi/bind/bind_test.go
index a197bb638..d7a1d76c1 100644
--- a/accounts/abi/bind/bind_test.go
+++ b/accounts/abi/bind/bind_test.go
@@ -27,6 +27,7 @@ import (
"testing"
"github.com/dexon-foundation/dexon/common"
+ "github.com/dexon-foundation/dexon/core/vm/tools"
)
var bindTests = []struct {
@@ -945,6 +946,7 @@ func TestBindings(t *testing.T) {
// Generate the test suite for all the contracts
for i, tt := range bindTests {
// Generate the binding and create a Go source file in the workspace
+ tt.bytecode = tools.Patch(tt.bytecode)
bind, err := Bind([]string{tt.name}, []string{tt.abi}, []string{tt.bytecode}, "bindtest", LangGo)
if err != nil {
t.Fatalf("test %d: failed to generate binding: %v", i, err)
diff --git a/accounts/abi/bind/util_test.go b/accounts/abi/bind/util_test.go
index 4226affa3..0c0120a66 100644
--- a/accounts/abi/bind/util_test.go
+++ b/accounts/abi/bind/util_test.go
@@ -27,6 +27,7 @@ import (
"github.com/dexon-foundation/dexon/common"
"github.com/dexon-foundation/dexon/core"
"github.com/dexon-foundation/dexon/core/types"
+ "github.com/dexon-foundation/dexon/core/vm/tools"
"github.com/dexon-foundation/dexon/crypto"
)
@@ -60,6 +61,7 @@ func TestWaitDeployed(t *testing.T) {
)
// Create the transaction.
+ test.code = tools.Patch(test.code)
tx := types.NewContractCreation(0, big.NewInt(0), test.gas, big.NewInt(1), common.FromHex(test.code))
tx, _ = types.SignTx(tx, types.HomesteadSigner{}, testKey)