-
Notifications
You must be signed in to change notification settings - Fork 170
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
Update MetadataViews Collection views to include more flexible public & private types #164
Comments
I support this. I'm not a fan of preconditions that limit creativity and possible use cases. However, I suggested a similar case for the FT standard and got denied. 🥲 |
@lukaracki Can you link to your proposal for the FT standard? I don't remember it. maybe we need to reconsider. I'm fine with this change |
@lukaracki Thats a complete different issue. Here we're talking about removing type restrictions from a metadata view. You're were referring to removing an important security precondition from the |
@joshuahannan well it's a condition that limits implementation creativity, that's what I meant 😁 |
if we have valid non hypothetical case, we can discuss I guess. But this as is prevents a lot of wrong linking on contract side. @bjartek and @austinkline had experience on this. |
@sisyphusSmiling Want to share your example? |
So Flowty actually uses neither of these, but I know that other platforms definitely do. My main callout here is about who is using this metadata view? You don't have to be compliant with all metadata views to follow the NFT standard, and metadata views like this are generally not for the collection itself but for general-purpose products that need to use it. To touch on each of these hypotheticals:
If you only want to allow private deposits, you should not return this metadata view at all, because you can't know if another platform will use that
Similarly, if you want to have a public provider, why not specify it in another path so that it doesn't get overridden? If it's core to your collection's intended functionality, then putting them in places that other platforms churn often is high-risk because you don't know how much effort others can reasonably put into following what you want.
To reframe this question, would dapper let someone into the nft catalog that didn't permit public deposits? It would mean consumers of the catalog cannot trust what's there, or that collections can't trust that being on it won't break things. |
Find market used CollectionPublic and MetadataViews.ResolverCollection |
I think this is covered in the current pre condition. ( with subtype ) |
This is all really useful feedback and context!
Yeah, this is a good point.
The concrete context is the implementation of NFT & MetadataViews standards in the FLIP#72 implementation, with the idea being that implementing MDV standards would facilitate easier implementation of the new linked account standard. In the proposed standard, That said, it looks like the solution in that specific concrete case is to simply not resolve the With regard to this issue in the context of Of course, if others have opinions on how this is handled in the linked account standard, please feel free to provide feedback on the FLIP or PR, |
@sisyphusSmiling thanks for the context! I'll check out the PR |
I think what you could do is add some kind of pre-approval step that cannot be set via any public methods. The receiver itself doesn't have to be a pass-through method, it can do whatever checks it needs to like looking for a duplicate AccountInfo object or vetting that the account being shared is in some approved list that only the parent account can set (and must set) before the deposit can work. As @bluesign mentioned, you can't trust anyone setting this collection up to make Capabilities private, anyone can change that. The contract itself must handle those core requirements.
I think this is accurate. What you are proposing might adhere to an NFT collection's requirements, but it is only really useful when interacting directly with concrete types apart from some metadata resolution which I can still do by using |
This is a really valid use case; but on the other hand, I am not sure how I feel about those stuff ( child accounts ) presented as NFT. ( In one way it is great idea, in another little confusing ) Technically it allows ( considering deposit is public ) to link my account to my address ( without using FCL login ) Technically dapp can never touch FCL. |
Originally, I thought it would be nice to increase flexibility of interface usage but agree with your point after our discussion here @austinkline.
My hope after @dete suggested it was that it would be easier for wallets & dapps to build on or at least resolve metadata about a user's linked accounts. If we can get the public/private linked types to match existing expectations around NFT collections, do you think that would resolve concerns about potential confusion @bluesign?
Yeah the idea is to require a "handshake" of sorts between delegator & delegatee. So the linking account must sign to provide a linked account and the receiving account must add the account link to their collection themselves or, as @austinkline suggested in this PR, authorize the linking account to be added via public Capability. |
So are we not gonna do this any more @sisyphusSmiling ? Should we close this issue? |
Consensus looks to be against the change, so I'll close the issue |
Issue To Be Solved
Currently,
MetadataViews.NFTCollectionData
has pre-conditions which prescriptively define that public and private types anNonFungibleToken
implementingCollection
can define. While these conditions are logical, these are not necessarily part of theNonFungibleToken
standard and reduce the flexibility of the standard set of interfaces and how they can be combined.A counter-example to Collections of these sets of restricted composite public & private types is an NFT Collection that only allows private deposits. Another might be one that allows public withdrawals. In both cases, the set of public and private types would differ from those defined in the pre-condition above - are we to say that they're not NFT compliant if the contract successfully implements the NFT standard?
Suggest A Solution
Remove the pre-condition from
MetadataViews.NFTCollectionData.init()
. Alternatively, define a minimum viable set of interfaces that are not as prescriptive as those currently defined.Context
This came up as a result of implementing the
NonFungibleToken
,MetadataViews
, andResolver
standards in a new FLIP#72 iteration.The text was updated successfully, but these errors were encountered: