aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/bind/backends/nil.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-03-21 20:34:49 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-03-24 23:09:45 +0800
commit73308dbe0e08db015a7c461b5be1755dc3fcc737 (patch)
treeaa6d4c875884f20fc96f055f99f867f779500980 /accounts/abi/bind/backends/nil.go
parent86cfc22c79594bd0d9625650dcbfb60c3e6ba9fe (diff)
downloadgo-tangerine-73308dbe0e08db015a7c461b5be1755dc3fcc737.tar
go-tangerine-73308dbe0e08db015a7c461b5be1755dc3fcc737.tar.gz
go-tangerine-73308dbe0e08db015a7c461b5be1755dc3fcc737.tar.bz2
go-tangerine-73308dbe0e08db015a7c461b5be1755dc3fcc737.tar.lz
go-tangerine-73308dbe0e08db015a7c461b5be1755dc3fcc737.tar.xz
go-tangerine-73308dbe0e08db015a7c461b5be1755dc3fcc737.tar.zst
go-tangerine-73308dbe0e08db015a7c461b5be1755dc3fcc737.zip
accounts/abi/bind, cmd/abigen: port to templates, bind to solidity
Diffstat (limited to 'accounts/abi/bind/backends/nil.go')
-rw-r--r--accounts/abi/bind/backends/nil.go11
1 files changed, 7 insertions, 4 deletions
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.