-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add ability to get NFTs owned by a user to Marmalade #24
Comments
In ERC 721 this seems similar to the optional tokenOfOwnerByIndex method |
The question for me is not whether there is utility in this function, but whether it's the responsibility of the interface, the specific NFT contract implementation, or the service providing the NFTs. Consider what happens in each of the 3 scenarios:
To me, 2 and 3 are the most viable options, with the 3rd being the "optimal" solution in my mind - it already exists, and data storage is both opt-in, and potentially more cost-effective for both party and counterparty. However, depending on how people feel about this, I'm open to 2. Thoughts? |
@emilypi regarding Regarding the |
Two points on that
The issue here is that there will be multiple different specs which will lead to difficulties making UIs to handle all kinds of NFTs. It's not very scalable from a web developer side.
This is precisely the issue I'm proposing to avoid. The two issues with this are
|
Nice that's a good datapoint for people building on the thing. Glad it's a quick experience!
Gas is not an issue when dry-running, but dry-running computation does come at a cost to the nodes. If you or your organization have a node set up, then that's great - spam all you like. However, I imagine node operators would not be too stoked on having people hit them with arbitrarily complex computations in general. The question is whether or not we want expensive computational data to be propagated throughout the network unless it's absolutely necessary. So, my bias here is towards the health of the network: market data and associated computations that are not absolutely necessary for the contract to function should remain off chain. Remember - anything that happens on chain is forever. Do we really need it when events suffice, even if more complicated to monitor? If so, we can provide help for off-chain market data computation in the form of more complex additions to the API. Currently, a GraphQL endpoint is in the works, which would make data aggregation of this kind easier for services, however, this will not be available for a few months. But because we can do this off-chain, I'm leaning towards that as a solution.
This would effectively let the service API bleed into the language design. Pact needs to remain agnostic of such things as a language. Chainweb is not the only one using
Regarding the first point: yes, point taken. However, we take a defensive tack towards this kind of thing. If some service decides to mint a billion NFTs and sell them extremely cheaply, that's a billion records that get to be stored on chain in perpetuity and constantly read-accessed on chain if anyone decides to not use the
I agree - 2 is suboptimal for this reason.
Yes. Ideally, if you're offering a service to people, you'd be running your own node and I think my main balk here is the fact that we're asking for
But if you're listening for |
And ftr, I'm happy to help work on that so we get you folks everything you need in terms of tooling for |
Thanks for the response ! Appreciate you going through the pints In regards to
The issue isn't for kitty kads, but for making generic services that let people select and interact with their nfts on different smart contracts . Examples are
This is why having a consistent way to quickly and easily get data about nfts is useful
I think the methods are roughly equivalent and the difference is language implementation to an extent . IDs in pact tables are similar to indices in solidity. But practically having a method to get all ids for a user would also work
Node operators could also charge users for accessing their nodes for read only / local reads . I think on ethereum some nodes already do this .
Side question about this philosophy - is marmalade storing the nft metadata on chain going against this principle ? Since we just need to store the hash of the metadata on chain, things like the features of nfts etc can all be stored off chain and loaded via a uri ? |
I don't think we'd be opposed to an extension interface (much like interface |
I've raised another proposal which handles this and a few other issues related to making Dapps easier. At the moment the proposal doesn't use methods like I can close off this issue or keep it open as it is possible to decouple the two |
Token policies ( A token policy can be shared across collection entries really easily. |
Problem:
There is no standard and easy way to show all the NFTs owned by a user when looking at NFTs in the current marmalade ledger.
This makes it difficult to create nice user experiences which allow users to easily select NFTs they own.
Proposal
Add a new function
get-nfts-for-owner
to thetoken-policy
interface which will return all the NFTs for a given userCurrent alternatives
Look up events related to ownership transfer. However this
The text was updated successfully, but these errors were encountered: