aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind/template.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-08-21 23:06:25 +0800
committerFelix Lange <fjl@twurst.com>2016-08-21 23:06:25 +0800
commit056f15aa53470e6cc7b1054f72165f5646ce7e73 (patch)
tree1a66016d4b46ec77ae40c9d827131c0c30029e3e /accounts/abi/bind/template.go
parent46621fd2c3e06d3e5932afe29a6e7e4016a16635 (diff)
downloaddexon-056f15aa53470e6cc7b1054f72165f5646ce7e73.tar.gz
dexon-056f15aa53470e6cc7b1054f72165f5646ce7e73.tar.zst
dexon-056f15aa53470e6cc7b1054f72165f5646ce7e73.zip
accounts/abi/bind/backends: remove nil and remote backends
The remote backend is superseded by ethclient. The nil backend's stated purpose was to enable testing of accounts/abi/bind. None of its methods actually worked. A much simpler way to get a crashing backend is to simply pass nil as the backend. With a one-line change to the generator (removing two explicit interface assertions), passing nil actually works. Removing these backends means that less changes are required later.
Diffstat (limited to 'accounts/abi/bind/template.go')
-rw-r--r--accounts/abi/bind/template.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/accounts/abi/bind/template.go b/accounts/abi/bind/template.go
index 72998bb6d..523122213 100644
--- a/accounts/abi/bind/template.go
+++ b/accounts/abi/bind/template.go
@@ -127,7 +127,7 @@ package {{.Package}}
// New{{.Type}} creates a new instance of {{.Type}}, bound to a specific deployed contract.
func New{{.Type}}(address common.Address, backend bind.ContractBackend) (*{{.Type}}, error) {
- contract, err := bind{{.Type}}(address, backend.(bind.ContractCaller), backend.(bind.ContractTransactor))
+ contract, err := bind{{.Type}}(address, backend, backend)
if err != nil {
return nil, err
}