mirror of https://github.com/status-im/op-geth.git
d62d5fe59a
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. |
||
---|---|---|
.. | ||
downloader | ||
fetcher | ||
filters | ||
gasprice | ||
api.go | ||
api_backend.go | ||
backend.go | ||
backend_test.go | ||
bad_block.go | ||
bind.go | ||
cpu_mining.go | ||
db_upgrade.go | ||
gpu_mining.go | ||
handler.go | ||
handler_test.go | ||
helper_test.go | ||
metrics.go | ||
peer.go | ||
protocol.go | ||
protocol_test.go | ||
sync.go | ||
sync_test.go |