-
Notifications
You must be signed in to change notification settings - Fork 14
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
Move chain specific definitions #440
Move chain specific definitions #440
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 generally like it 👍 we only have to split the asset hub stuff.
Though I guess that most of the definitions will actually get obsolete once #432 is merged, right? Because we don't necessarily need to keep them around.
Yes... I guess it is better to wait for that PR to be merged and check what we actually need, so we avoid cleaning twice. |
@gianfra-t would it make change the status of this PR to "Draft" for this reason? |
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.
Looks good to me 👍🏼 Though we should move PINK definitions to Pendulum.
@pendulum-chain/devs I have removed even more definitions that I believe we only used for currency conversion in the past. See for instance, here. The runtime compiles but I am afraid I am missing some use case for this constants, so please check. I decided to leave |
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 am not sure whether it makes sense to have an assets.rs
and a definition.rs
file per runtime. At the end the definitions inside definition.rs
are all asset related and for that reason it would make sense to just join both files.
On the other hand: are the remaining definitions in assets.rs
still needed? At the end we don't want to have a need to execute runtime upgrades when we register new XCM assets – that's why we moved all the logic into the asset registry pallet. But if we register new assets without changing the code, then the definitions in asset.rs
deviate from the truth.
Looks to me like these definitions are only needed in the integration tests, correct? Is there a way to load the information from the asset-registry storage inside the tests instead and then we can remove the remaining content of all asset.rs
files.
@TorstenStueber there are very few definitions from the We use these definitions here for defining the currency conversion of the sibling chain but also in our testing configuration of the asset registry for pendulum and amplitude. For this reason I think these definitions are useful even when we use the asset registry because it saves us having to manually define the location. Alternatively they could be moved to the integration test directory (except for BRZ). |
I prefer to move definitions that are only used for testing into testing related code in order to not "clutter up" the rest. What do you think? |
Yes! It makes sense. Moved to a |
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.
Nice, thanks!
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.
Looks good 👍🏼
Closes #383.
Definitions used in only one chain are moved to the new
definitions.rs
file for each runtime.Also removes previously hardcoded multi-locations which now are taken from the asset registry.
Additionally, we remove the common definition of chain extensions which is not needed after #437.