Closed gianfra-t closed 2 months ago
I guess that most of the definitions will actually get obsolete once https://github.com/pendulum-chain/pendulum/pull/432 is merged
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?
After the upgrade from #432 to use the asset registry, I believe we will no longer need many "hardcoded" locations defined before (for instance, these)
@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 definitions.rs
even though is empty for some chains in case we want to add some in the future.
@TorstenStueber there are very few definitions from the assets
files actually used, which I now moved to the pendulum definitions file. You are correct that they are only used in our integration tests (except for BRZ which is also used for the automation routing for the BRZ token).
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 definitions.rs
in the integration-tests
folder.
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.