diff options
author | JM <jm@dexon.org> | 2019-01-31 15:12:57 +0800 |
---|---|---|
committer | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-05-06 10:44:03 +0800 |
commit | 9b8cd76237318e173147a7c32763b6b9d9759951 (patch) | |
tree | 44f860e1ed7e63354f48096ee5df0fa475719cc9 /contracts | |
parent | d3b485a5af768db59bd648175849f961e25bc630 (diff) | |
download | dexon-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 'contracts')
-rw-r--r-- | contracts/chequebook/contract/chequebook.go | 4 | ||||
-rw-r--r-- | contracts/ens/contract/ens.go | 4 | ||||
-rw-r--r-- | contracts/ens/contract/fifsregistrar.go | 4 | ||||
-rw-r--r-- | contracts/ens/contract/publicresolver.go | 4 |
4 files changed, 12 insertions, 4 deletions
diff --git a/contracts/chequebook/contract/chequebook.go b/contracts/chequebook/contract/chequebook.go index 4dd0cc03a..bbfba40bc 100644 --- a/contracts/chequebook/contract/chequebook.go +++ b/contracts/chequebook/contract/chequebook.go @@ -12,6 +12,7 @@ import ( "github.com/dexon-foundation/dexon/accounts/abi/bind" "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/core/types" + "github.com/dexon-foundation/dexon/core/vm/tools" "github.com/dexon-foundation/dexon/event" ) @@ -27,7 +28,8 @@ func DeployChequebook(auth *bind.TransactOpts, backend bind.ContractBackend) (co if err != nil { return common.Address{}, nil, nil, err } - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ChequebookBin), backend) + newChequebookBin := tools.PatchBinary(common.FromHex(ChequebookBin)) + address, tx, contract, err := bind.DeployContract(auth, parsed, newChequebookBin, backend) if err != nil { return common.Address{}, nil, nil, err } diff --git a/contracts/ens/contract/ens.go b/contracts/ens/contract/ens.go index 203205983..c4dfb738d 100644 --- a/contracts/ens/contract/ens.go +++ b/contracts/ens/contract/ens.go @@ -11,6 +11,7 @@ import ( "github.com/dexon-foundation/dexon/accounts/abi/bind" "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/core/types" + "github.com/dexon-foundation/dexon/core/vm/tools" "github.com/dexon-foundation/dexon/event" ) @@ -26,7 +27,8 @@ func DeployENS(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Ad if err != nil { return common.Address{}, nil, nil, err } - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ENSBin), backend) + newENSBin := tools.PatchBinary(common.FromHex(ENSBin)) + address, tx, contract, err := bind.DeployContract(auth, parsed, newENSBin, backend) if err != nil { return common.Address{}, nil, nil, err } diff --git a/contracts/ens/contract/fifsregistrar.go b/contracts/ens/contract/fifsregistrar.go index 82e1cc43e..fa9b22c50 100644 --- a/contracts/ens/contract/fifsregistrar.go +++ b/contracts/ens/contract/fifsregistrar.go @@ -10,6 +10,7 @@ import ( "github.com/dexon-foundation/dexon/accounts/abi/bind" "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/core/types" + "github.com/dexon-foundation/dexon/core/vm/tools" ) // FIFSRegistrarABI is the input ABI used to generate the binding from. @@ -24,7 +25,8 @@ func DeployFIFSRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, if err != nil { return common.Address{}, nil, nil, err } - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(FIFSRegistrarBin), backend, ensAddr, node) + newBin := tools.PatchBinary(common.FromHex(FIFSRegistrarBin)) + address, tx, contract, err := bind.DeployContract(auth, parsed, newBin, backend, ensAddr, node) if err != nil { return common.Address{}, nil, nil, err } diff --git a/contracts/ens/contract/publicresolver.go b/contracts/ens/contract/publicresolver.go index 9a6180c21..565e1df02 100644 --- a/contracts/ens/contract/publicresolver.go +++ b/contracts/ens/contract/publicresolver.go @@ -12,6 +12,7 @@ import ( "github.com/dexon-foundation/dexon/accounts/abi/bind" "github.com/dexon-foundation/dexon/common" "github.com/dexon-foundation/dexon/core/types" + "github.com/dexon-foundation/dexon/core/vm/tools" "github.com/dexon-foundation/dexon/event" ) @@ -27,7 +28,8 @@ func DeployPublicResolver(auth *bind.TransactOpts, backend bind.ContractBackend, if err != nil { return common.Address{}, nil, nil, err } - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(PublicResolverBin), backend, ensAddr) + newBin := tools.PatchBinary(common.FromHex(PublicResolverBin)) + address, tx, contract, err := bind.DeployContract(auth, parsed, newBin, backend, ensAddr) if err != nil { return common.Address{}, nil, nil, err } |