From 73308dbe0e08db015a7c461b5be1755dc3fcc737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 21 Mar 2016 14:34:49 +0200 Subject: accounts/abi/bind, cmd/abigen: port to templates, bind to solidity --- accounts/abi/bind/backends/nil.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'accounts/abi/bind/backends/nil.go') diff --git a/accounts/abi/bind/backends/nil.go b/accounts/abi/bind/backends/nil.go index 8b1f9d63e..3b1e6dce7 100644 --- a/accounts/abi/bind/backends/nil.go +++ b/accounts/abi/bind/backends/nil.go @@ -24,6 +24,9 @@ import ( "github.com/ethereum/go-ethereum/core/types" ) +// This nil assignment ensures compile time that nilBackend implements bind.ContractBackend. +var _ bind.ContractBackend = (*nilBackend)(nil) + // nilBackend implements bind.ContractBackend, but panics on any method call. // Its sole purpose is to support the binding tests to construct the generated // wrappers without calling any methods on them. @@ -32,12 +35,12 @@ type nilBackend struct{} func (*nilBackend) ContractCall(common.Address, []byte, bool) ([]byte, error) { panic("not implemented") } -func (*nilBackend) GasLimit(common.Address, *common.Address, *big.Int, []byte) (*big.Int, error) { +func (*nilBackend) EstimateGasLimit(common.Address, *common.Address, *big.Int, []byte) (*big.Int, error) { panic("not implemented") } -func (*nilBackend) GasPrice() (*big.Int, error) { panic("not implemented") } -func (*nilBackend) AccountNonce(common.Address) (uint64, error) { panic("not implemented") } -func (*nilBackend) SendTransaction(*types.Transaction) error { panic("not implemented") } +func (*nilBackend) SuggestGasPrice() (*big.Int, error) { panic("not implemented") } +func (*nilBackend) PendingAccountNonce(common.Address) (uint64, error) { panic("not implemented") } +func (*nilBackend) SendTransaction(*types.Transaction) error { panic("not implemented") } // NewNilBackend creates a new binding backend that can be used for instantiation // but will panic on any invocation. Its sole purpose is to help testing. -- cgit v1.2.3