ProtocolFeeController v2 (working migration edition) #1317
+16
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
So... turns out the original plan for two migration scripts (a first simple and a later more comprehensive one) doesn't actually work. We need the full migration even for the first time; the "update" functions must be called by the current fee controller, so can't be used during a migration.
It's actually simpler this way, as there's only one migration script now. The only catch is we have to tolerate the pool creator fee getters failing the first time, as they don't exist in the original fee controller. This is fine the first time, as there are no overrides or pool creators (both of which can be recreated in the new fee controller using permissioned calls from governance and the pool creators respectively, in case we miss one).
For the second and all subsequent migrations, they will work and copy the entire state.
Type of change
Checklist:
main
, or there's a description of how to mergeIssue Resolution