Closed muharem closed 2 weeks ago
Review required! Latest push from author must always be reviewed
It is probably too late to make such refactor but the asset id type should really be an enum
enum AssetId {
Trusted(u32),
Untrusted(u32),
Foreign(Location),
}
What is the difference between a trusted and untrusted asset? And what would be a remote asset? Token by another chain?
It is probably too late to make such refactor but the asset id type should really be an enum
Yeah it probably would have been better than separate pallet instances for each type. But talk about a big migration. We just didn't know that far ahead when we made the first instance with type u32
, and had to do some refactoring to the Assets pallet to support Location
at all. Anyway, major breaking change plus migration but if the current structure becomes a problem then yeah we'd have to consider it.
What is the difference between a trusted and untrusted asset? And what would be a remote asset?
Not sure what Bryan meant or if it was just an example, but we have TrustBacked
for assets like USDT that anyone can register, because the user "trusts" that they are backed by some off-chain claim. Foreign
assets are assets backed by other locations, which could be protocols, e.g. the asset corresponding to (1, Parachain(9000))
.
/merge
Enabled auto-merge
in Pull Request
Set the maximum asset ID for the creation of trusted assets.
This change will enable us to migrate the trusted assets instance to start auto-incrementing IDs from 50,000,000 with the release following the next one..