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.
This commit is contained in:
Felix Lange
2016-08-21 17:06:25 +02:00
parent 46621fd2c3
commit 056f15aa53
4 changed files with 10 additions and 203 deletions

View File

@ -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
}