-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor chainio clients #73
Conversation
@shrimalmadhur need new review. This is almost ready to go. One thing I'm thinking of doing though is changing the interfaces for all our el/avs readers/writers/subscribers, and have them expose the same interface as the bindings themselves (eg. take a callOpts or transactOpts directly instead of a ctx). Thoughts?
|
linter doesn't accept indirect reference to eigenmetrics.. quite stupid
Ok so main question left to complete this refactor @shrimalmadhur @NimaVaziri is what interface we expose for the el/avs reader/writer/subscriber clients. Right now we only expose some ad-hoc methods and add them as we get new needs. For eg 2 remaining questions for me are:
|
also fixed some bugs in mock gen
@shrimalmadhur all changes are in. Ready for final review (hopefully)! |
Fixes #26 .
Managed to get rid of the elChainClient struct by forking abigen to generate interfaces for the structs it generates, and using those interfaces directly in the elWriter/elReader/elSubscriber structs. There's still a bit of clutter (see the few TODOs I left). I think for example we should change the interface of the writers/readers/subscribers to take the geth Call/TxOpts directly, instead of taking a ctx and wrapping it manually in a Call/TxOpts. Also should be reusing the bindings struct to have nicer constructors. I left the elContractBindings struct there for this purpose, since I think we should repurpose it as a constructor (maybe move it to chainio/constructors actually..)
@shrimalmadhur @NimaVaziri please review these changes. If you like them, I'll do the same for the AVS clients.