Open rheaplex opened 3 years ago
Good idea. I would generalize this from "contract type" to "parent type", and make the result optional, as not every type has a parent type
@turbolent or maybe something like getLocation()
or just.location
?
@rheaplex: Curious to get your thought on this pattern:
assert(nft.getType() == collection.nftType())
Or
assert(collection.supportsNftType(nft.getType()))
Seems like that is more flexible and can be implemented without language changes...
Given a standard NonFungibleToken standard contract that implements the contract-level interface, and the NFT and Collection resources, it would be useful to be able to check the type of instances of related objects at runtime.
This would work as follows:
and/or:
and/or:
This would allow more robust runtime checking of capabilities that are meant to be of related types in the nftStorefront, and elsewhere where this is desirable.