diff options
author | Felix Lange <fjl@twurst.com> | 2016-08-22 20:01:28 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-08-22 20:01:28 +0800 |
commit | d62d5fe59aedf9635a175d663632512b1cbbf2c3 (patch) | |
tree | a1c4844c3a7e339308cfe14cd42a33dd094d7152 /logger | |
parent | 056f15aa53470e6cc7b1054f72165f5646ce7e73 (diff) | |
download | go-tangerine-d62d5fe59aedf9635a175d663632512b1cbbf2c3.tar go-tangerine-d62d5fe59aedf9635a175d663632512b1cbbf2c3.tar.gz go-tangerine-d62d5fe59aedf9635a175d663632512b1cbbf2c3.tar.bz2 go-tangerine-d62d5fe59aedf9635a175d663632512b1cbbf2c3.tar.lz go-tangerine-d62d5fe59aedf9635a175d663632512b1cbbf2c3.tar.xz go-tangerine-d62d5fe59aedf9635a175d663632512b1cbbf2c3.tar.zst go-tangerine-d62d5fe59aedf9635a175d663632512b1cbbf2c3.zip |
accounts/abi/bind: use ethereum interfaces
In this commit, contract bindings and their backend start using the
Ethereum Go API interfaces offered by ethclient. This makes ethclient a
suitable replacement for the old remote backend and gets us one step
closer to the final stable Go API that is planned for go-ethereum 1.5.
The changes in detail:
* Pending state is optional for read only contract bindings.
BoundContract attempts to discover the Pending* methods via an
interface assertion. There are a couple of advantages to this:
ContractCaller is just two methods and can be implemented on top of
pretty much anything that provides Ethereum data. Since the backend
interfaces are now disjoint, ContractBackend can simply be declared as
a union of the reader and writer side.
* Caching of HasCode is removed. The caching could go wrong in case of
chain reorganisations and removing it simplifies the code a lot.
We'll figure out a performant way of providing ErrNoCode before the
1.5 release.
* BoundContract now ensures that the backend receives a non-nil context
with every call.
Diffstat (limited to 'logger')
0 files changed, 0 insertions, 0 deletions