-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(sequencer): move asset state methods to asset module (#1313)
## Summary Moved methods for manipulating state assets to the state asset module. ## Background Sequencer uses the convention of having state setters and writers as methods in a trait `<component>::StateReadExt` and `<component>::StateWriteExt`. For example, a sudo address (which lives in the authority module) can be read with `authority::StateReadExt::get_sudo_address`. The exception to this are the methods for manipulating assets, which were under `astria_sequencer::state_ext::StateExt`. This is because the asset module was just recently introduced. ## Changes No business logic was changed in this patch! - Rename `crate::asset -> crate::assets` - Move all methods for reading and writing assets from `astria_sequencer::state_ext::State{Read,Write}Ext` to `astria_sequencer::assets::State{Read,Write}Ext`. - Reexport `State{Read,Write}Ext` from all parent modules so that one can write `use <component>::StateReadExt` (and similar for write) instead of `use <component>::state_ext::StateReadExt`. ## Testing No tests were changed (minus import paths). Asset-related tests were moved (including snapshot tests) ## Related Issues Closes #1312
- Loading branch information
1 parent
7953133
commit 8171eed
Showing
42 changed files
with
960 additions
and
937 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
pub(crate) mod action; | ||
pub(crate) mod component; | ||
pub(crate) mod query; | ||
pub(crate) mod state_ext; | ||
mod state_ext; | ||
|
||
pub(crate) use state_ext::{ | ||
StateReadExt, | ||
StateWriteExt, | ||
}; |
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
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
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
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
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.