-
Notifications
You must be signed in to change notification settings - Fork 707
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
Add defaults for pallet-xcm #1959
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't really seen this, I think it is a great start. I think if you bring it back up to date, it should be almost merge-able.
@gupnik can you provide context on using drive_impl
for a trait other than #[pallet::config] trait Config { }
. I am sure it is possible, but some guidelines or best practices might be useful.
polkadot/xcm/pallet-xcm/src/lib.rs
Outdated
type CurrencyMatcher: MatchesFungible<BalanceOf<Self>>; | ||
|
||
// TODO: Would love to add a default for this, but I need access to `RuntimeOrigin` | ||
// from the derive_impl | ||
#[pallet::no_default] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is usually the default that you would want to provide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to use no_default_bounds
for such cases.
polkadot/xcm/pallet-xcm/src/lib.rs
Outdated
LocationWithAssetFilters, | ||
}; | ||
|
||
pub struct TestDefaultConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I belive we should be able to make struct TestDefaultConfig
be struct TestDefaultConfig<Some, Further, Parameterization>
if you are unsure about any of the things hardcoded in the following parameter_types!
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be extremely helpful, however, I'm getting an error when trying to specify these generics in the calling derive_impl(TestDefaultConfig<Some, Further, Parametrization>)
. Is this supposed to work or it should be added to the macro?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is a fundamental blocker for it, but it is quite likely that the syntax is not supported. Please proceed with @gupnik.
Yeah, nothing in |
@franciscoaguirre will you pick this up again? |
I want to but I've been having other priorities |
The CI pipeline was cancelled due to failure one of the required jobs. |
Somewhat related to #2169.
It's not XcmConfig defaults, but pallet-xcm, which is also useful.