-
Notifications
You must be signed in to change notification settings - Fork 47
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
[ELO-189] refactor el reader/writer to a config based approach #278
Conversation
846ab5b
to
6edf46c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not super convinced by this. Honestly I think the better approach unfortunately is to fix the problem upstream, and to go fix the contracts so that they all point to each other and we only need to pass a single contract address, and we can recover all the other contracts from that one contract. Otherwise right now it's a bit confusing that I need to pass DM and AvsDirectory, but if I don't pass the DM, then I also don't get the slasher or SM, but the AvsDirectory is kind of its own little island.
I 100p agree that's the better approach but I feel it's not going to happen soon and we will be stuck with breaking changes anytime we need to add some contracts. we should still go with this even though it's not ideal and make it flexible IMO to unblock. If at any point in future, contracts gets fixed and we have one master registry contract, we could just update the config to have that and deprecate other fields and then just use master contract. |
b0c43dc
to
ea8dc07
Compare
ea8dc07
to
97c71a3
Compare
@@ -116,7 +119,34 @@ func BuildELChainReader( | |||
), nil | |||
} | |||
|
|||
func BuildFromConfig( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this just be called NewFromConfig
? What's the rationale for using Build again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong pref. not sure why we used build in first place - maybe because it's building the bindings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a better names now - b9ba1be
elcontracts.NewReaderFromConfig
I will add similar in future
elcontracts.NewWriterFromConfig
avsregistry.NewReaderFromConfig
avsregistry.NewWriterFromConfig
wdyt?
25eb5d5
to
984c63d
Compare
Fixes # .
What Changed?
Reviewer Checklist