This module is used to facilitate reading/writing/subscribing to eigenlayer core contracts and avs registry contracts.
To make it easier to understand the different structs in this package, and their hierarchical relationship, we describe each of them below:
- geth's ethClient
- eigensdk ethClient
- wraps geth's ethClient and adds convenience methods
- eigenlayerContractBindings
- generated by abigen
- low level bindings to eigenlayer core contracts, which wrap our ethClient
- elContractsClient
- wraps eigenlayerContractBindings and hides a little bit of the underlying complexity, which is not needed in 99% of cases.
- abigen also doesn't create an interface for the bindings it generates, whereas elContractsClient has a well defined interface which we use to generate mocks to help with testing.
- ELChainReader / ELChainWriter / ELChainSubscriber
- wraps elContractsClient and adds convenience methods
- hides even more complexity than elContractsClient
- These structs should be the only ones used by AVS developers, apart from interacting with an ethClient directly to make direct json rpc calls such as waiting for a transaction receipt.
A similar hierarchy applies for the avs registry contracts.