I used some patterns here to workaround some inconsistencies that go-ethereum simulated backend had with regards to the interface it satisfies and the interface that ethclient has. Since the circuit breaker was first released go-ethereum published an update which resolved these inconsistencies. Accomodating these inconsistencies let to some awkward code for easier testing which can now be removed.
Changes
Write a shared package for triggering circuit breaks
Remove unused code, and refactor to use my updated blockchain interface from go-defi
Overview
I used some patterns here to workaround some inconsistencies that go-ethereum simulated backend had with regards to the interface it satisfies and the interface that ethclient has. Since the circuit breaker was first released go-ethereum published an update which resolved these inconsistencies. Accomodating these inconsistencies let to some awkward code for easier testing which can now be removed.
Changes
go-defi