OpenZeppelin / OpenZeppelin/stellar-contracts

🎁 [Feature Request]: `get_owner_tokens`

Open
#368 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
95
Forks
68
Avg merge
4d 42m
Merged PRs (30d)
20

Description

What is the feature you would like to see?

It would be convenient from a client perspective to be able to query an interface method that can answer the question - "which token IDs belong to this account?"

Protocol 23 lowers the cost of reads and storage, so maybe under the new constraints this becomes acceptable for one of the extensions(Enumerable)?

Example - https://github.com/stellar/smart-wallet-demo-app/blob/79a9e5c75ed393f0a8ea8fb92b000848e6c79266/contracts/nft/src/contract.rs#L108

Example storage - https://stellar.expert/explorer/testnet/contract/CACLJVCL6KCFOZO3ML5LP3YQYSS2LIVNGFFUIQ2XZW4N7YPT2PC4JD3J/storage

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked smart-wallet-demo-app contract example and the referenced Stellar Expert storage entry to understand the expected get_owner_tokens behavior. Then inspect the repository's Enumerable extension and existing token ownership interfaces. Done means agreeing on the Protocol 23 storage and read-cost constraints and defining a supported interface for returning token IDs belonging to an account.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.