-
Notifications
You must be signed in to change notification settings - Fork 36
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
Improve nesting #235
Improve nesting #235
Conversation
Just realized that this may be a bit early for a review(that is why I deleted the previous message), will ping you when it will be ready :) |
@ilionic This is ready for review, other than the |
Thanks @Szegoo. That's correct, recursive calls are only related to burning and root owner lookup.
|
@@ -73,8 +73,6 @@ pub struct NftChild { | |||
/// Abstraction over a Nft system. | |||
#[allow(clippy::upper_case_acronyms)] | |||
pub trait Nft<AccountId, BoundedString, BoundedResourceVec> { | |||
type MaxRecursions: Get<u32>; |
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 we need MaxRecursions
.
Not sure I understand this totally correctly but did you mean that we should somehow be able to get the Edit: Maybe the functions that deal with budget should make it possible(but optional) to define the budget. For example: fn property_set(
sender: T::AccountId,
collection_id: CollectionId,
maybe_nft_id: Option<NftId>,
key: KeyLimitOf<T>,
value: ValueLimitOf<T>,
budget: Option<&dyn Budget> // <- we add this to the functions that deal with budget.
) -> DispatchResult { If the function is called with This would make it possible to look up the owner for any asset(of course it will cost more if the nft is deeply nested) Edit: AFAIU Doing |
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.
LGTM
Closes: #223