-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement zrml-combo extrinsics (#1369)
* Extend `Config` * wip * Some refactors * Implement splitting tokens * Implement merging tokens
- Loading branch information
1 parent
dcd4921
commit a04d02e
Showing
16 changed files
with
283 additions
and
57 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
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
12 changes: 6 additions & 6 deletions
12
zrml/combo/src/traits/id_manager.rs → ...bo/src/traits/combinatorial_id_manager.rs
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,20 +1,20 @@ | ||
use sp_runtime::DispatchError; | ||
|
||
pub(crate) trait IdManager { | ||
pub(crate) trait CombinatorialIdManager { | ||
type Asset; | ||
type MarketId; | ||
type Id; | ||
type CombinatorialId; | ||
|
||
// TODO Replace `Vec<bool>` with a more effective bit mask type. | ||
fn get_collection_id( | ||
parent_collection_id: Option<Self::Id>, | ||
parent_collection_id: Option<Self::CombinatorialId>, | ||
market_id: Self::MarketId, | ||
index_set: Vec<bool>, | ||
force_max_work: bool, | ||
) -> Option<Self::Id>; | ||
) -> Option<Self::CombinatorialId>; | ||
|
||
fn get_position_id( | ||
collateral: Self::Asset, | ||
collection_id: Self::Id, | ||
) -> Option<Self::Id>; | ||
collection_id: Self::CombinatorialId, | ||
) -> Self::CombinatorialId; | ||
} |
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,3 +1,3 @@ | ||
mod id_manager; | ||
mod combinatorial_id_manager; | ||
|
||
pub(crate) use id_manager::IdManager; | ||
pub(crate) use combinatorial_id_manager::CombinatorialIdManager; |
Oops, something went wrong.