Skip to content

feat(#674): store original clip ID on-chain and expose get_clip_id() - #708

Merged
Eniola3321 merged 1 commit into
ANYTECHS:mainfrom
ellaevans2323-pixel:feat/674-store-clip-id-onchain
Aug 1, 2026
Merged

feat(#674): store original clip ID on-chain and expose get_clip_id()#708
Eniola3321 merged 1 commit into
ANYTECHS:mainfrom
ellaevans2323-pixel:feat/674-store-clip-id-onchain

Conversation

@ellaevans2323-pixel

Copy link
Copy Markdown
Contributor

Summary

Closes #674

Every NFT minted by the ClipCash contract already stores the backend clip_id inside TokenData at mint time. This PR adds the missing query surface so callers can verify the on-chain NFT ↔ database link without trusting off-chain metadata.

Changes

Soroban contract (contracts/nft-contract/src/lib.rs)

  • Add get_clip_id(token_id: u64) -> Option<String> view function that reads TokenData.clip_id for any token

NestJS backend

  • AdminContractService.getClipId(tokenId) — queries the on-chain get_clip_id via Soroban simulation (no signing required)
  • GET /nfts/tokens/:tokenId/clip-id — new public endpoint with full Swagger/OpenAPI docs
  • NftPrepareMintResponseDto.clipId — updated description to document that this value is stored on-chain and queryable via get_clip_id

Acceptance Criteria

  • Every NFT stores its original clip ID (already stored in TokenData.clip_id since contract v1)
  • The value is queryable on-chain via get_clip_id(token_id)
  • API response models include clipId with Swagger documentation

…ip_id()

- Add get_clip_id(token_id) view function to Soroban contract that
  returns the clip_id stored in TokenData at mint time
- Add getClipId() method to AdminContractService that queries the
  on-chain get_clip_id via Soroban simulation
- Expose GET /nfts/tokens/:tokenId/clip-id endpoint with full Swagger
  documentation
- Update NftPrepareMintResponseDto to document the clipId field as the
  on-chain ClipCash database link

Every NFT already stores clip_id inside TokenData; this PR adds the
query surface so callers can verify the NFT <-> database link on-chain.

Closes ANYTECHS#674
@drips-wave

drips-wave Bot commented Jul 31, 2026

Copy link
Copy Markdown

@ellaevans2323-pixel Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Eniola3321
Eniola3321 merged commit ae35ca6 into ANYTECHS:main Aug 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Soroban] Store Original Clip ID On-chain

2 participants