This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add rust-toolchain * fix: bound PlannedExecutions with MAX_SLOTS for now bound with const, could be an associated type in config * fix: bound AllowedSources with T::MaxAllowedSources * chore: remove unused * feat: add ParameterBound just the necessary trait bounds from Parameter * fix: bound PlannedExecutions with T::MaxSlots * fix: bound AdvertisementRestriction::allowed_consumers with T::MaxAllowedConsumers
- Loading branch information
Showing
24 changed files
with
310 additions
and
186 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
/// TODO: can be removed once we migrate to newer substrate version with XCMv3 and use [frame_support::traits::tokens::fungibles::Transfer] instead. | ||
pub trait AssetTransfer { | ||
type AssetId; | ||
type Balance; | ||
type AccountId; | ||
type Error; | ||
use frame_support::traits::Get; | ||
use sp_std::fmt; | ||
use sp_std::prelude::*; | ||
|
||
fn transfer( | ||
asset: Self::AssetId, | ||
from: &Self::AccountId, | ||
to: &Self::AccountId, | ||
amount: Self::Balance, | ||
) -> Result<(), Self::Error>; | ||
} | ||
/// A bound that can be used to restrict length sequence types such as [`frame_support::BoundedVec`] appearing in types used in dispatchable functions. | ||
/// | ||
/// Similar to [`frame_support::Parameter`] without encoding traits, since bounds are never encoded. | ||
pub trait ParameterBound: Get<u32> + Clone + Eq + fmt::Debug + scale_info::TypeInfo {} | ||
impl<T> ParameterBound for T where T: Get<u32> + Clone + Eq + fmt::Debug + scale_info::TypeInfo {} |
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
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.