-
Notifications
You must be signed in to change notification settings - Fork 300
Support white-listing of locations #703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We could have a location filter, and another pallet to manage the whitelist registration |
yeah, adding interface for hooking the other pallet that manage the whitelist registration and then |
Yeah, some teams are using hardcoded locations, some are using a on-chain manager to manage locations. If #[pallet::config]
pub trait Config: frame_system::Config {
// ...
type WhiteListingMultiLocations: WhiteListingMultiLocations<Self::CurrencyId, Self::Balance>;
// ...
} And this trait pub trait WhiteListingMultiLocations<CurrencyId, Balance> {
fn get_supported_locations(&self, currency_id: CurrencyId) -> Option<MultiLocation>;
fn get_all_supported_locations(&self) -> Option<Vec<MultiLocation>>;
fn get_xcm_fee(&self, currency_id: CurrencyId) -> Balance;
// fn get_asset(&self, currency_id: CurrencyId) -> AssetInfo;
// or more methods
} |
PRs are welcome. |
closed by #714 |
One common error in XCM is when sending to unsupported location. It would be great for
xtoken
to provide an optional support for white-listing locations.The text was updated successfully, but these errors were encountered: