• Felix Lange's avatar
    accounts/abi/bind: use ethereum interfaces · d62d5fe5
    Felix Lange authored
    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.
    d62d5fe5
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
_data Loading commit data...
accounts Loading commit data...
build Loading commit data...
cmd Loading commit data...
common Loading commit data...
compression/rle Loading commit data...
console Loading commit data...
containers Loading commit data...
core Loading commit data...
crypto Loading commit data...
errs Loading commit data...
eth Loading commit data...
ethclient Loading commit data...
ethdb Loading commit data...
event Loading commit data...
generators Loading commit data...
internal Loading commit data...
light Loading commit data...
logger Loading commit data...
metrics Loading commit data...
miner Loading commit data...
node Loading commit data...
p2p Loading commit data...
params Loading commit data...
pow Loading commit data...
release Loading commit data...
rlp Loading commit data...
rpc Loading commit data...
tests Loading commit data...
trie Loading commit data...
whisper Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
appveyor.yml Loading commit data...
circle.yml Loading commit data...
interfaces.go Loading commit data...