-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
@olanod asset creation is permissionless, so i don't see how such organization you are striving for will be enforced. Do you have a more concrete idea on how you want to use this stuff? |
But it also can be permissioned only right? At least some of the assets in our chain will be created only by an authority i.e. a set of valid collaterals for a given stable coin. Also I'm looking into assets pallet mostly as an implementor of the |
@olanod no, it is current not possible to make it permissioned without some sort of wrapper on what functions can be called: https://github.com/paritytech/substrate/blob/master/frame/assets/src/lib.rs#L368 |
@shawntabrizi but that's fine no? I can have that wrapper as an extra pallet or a proxy that filters calls and still benefit from the instantiability of Assets pallet. I would say it's even more compelling to have different instances in this case, say I have one instance with some access control filter for cool people only and another one that is general purpose. |
e7d5712
to
080dcf0
Compare
@olanod please take a look at the diff that github provides. We do not use spaces in Substrate, so please update them to tabs. Otherwise the changes look reasonable. |
My bad ... will have to disable the format on save 😅 |
080dcf0
to
125d904
Compare
@thiolliere can you take a quick look here? |
The easiest way I found to revert the spaces formatting was to format again overriding the |
125d904
to
b913af3
Compare
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.
ah I forgot, benchmarks need to be updated too, right now benchmark are only generated for default instance not for other ones.
diff --git a/frame/assets/src/benchmarking.rs b/frame/assets/src/benchmarking.rs
index 227d45623d..d02fe7b74b 100644
--- a/frame/assets/src/benchmarking.rs
+++ b/frame/assets/src/benchmarking.rs
@@ -135,7 +135,7 @@ fn assert_event<T: Config>(generic_event: <T as Config>::Event) {
}));
}
-benchmarks! {
+benchmarks_instance_pallet! {
create {
let caller: T::AccountId = whitelisted_caller();
let caller_lookup = T::Lookup::unlookup(caller.clone());
But there will be other changes inside the file
@thiolliere check again? |
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
bot merge |
Trying merge. |
Awesome! thanks @shawntabrizi was delaying that for the weekend 👍🏽 |
As mentioned in paritytech/polkadot-sdk#327, making the assets pallet instantiable allows one to better group sets of assets that share something in common instead of putting everything in a single big group that might require some sort of filtering on the pallets that depend on some fungibles.