-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(sequencer): refactor fees (#1811)
## Summary This reduces a lot of boilerplate around fees. ## Background The boilerplate code is very prone to copy-paste errors. Changing the 14 different (but structurally identical) `FeeComponent` structs into a single one with a generic arg reduces a lot of the boilerplate code. This PR replaces #1739 (an initial, more restricted refactor) and #1794 (a PR on top of #1739). It comprises the net changes of these two PRs in [the first commit](a8ec424), followed by most of the changes suggested by @eoroshiba's review of #1794 in [the second commit](c92dc98). [The third commit](1316e07) is also in response to @eoroshiba's suggestion to remove the fee aliases, and is a single commit in case others prefer that change to be reverted. ## Changes - In core, replaced fee component structs with a new `FeeComponents<T>` where `T` will be some action type. - In sequencer, changed the `FeeHandler` trait fairly radically to support the new form of fees. ## Testing Existing tests are sufficient - there should be no changed functionality to the business logic. ## Changelogs No updates required. ## Related Issues Closes #1715.
- Loading branch information
Showing
28 changed files
with
1,279 additions
and
2,158 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.