feat(soroban): implement royalty recipient update, deployment verific… - #699
Merged
Eniola3321 merged 1 commit intoJul 29, 2026
Merged
Conversation
…ation, gas stats, and one-time metadata update (ANYTECHS#672, ANYTECHS#686, ANYTECHS#684, ANYTECHS#683) - Issue ANYTECHS#672: Add update_royalty_recipient() method and RoyaltyRecipientUpdated event in Soroban contract with PATCH /nfts/:id/royalty-recipient endpoint and Swagger docs. - Issue ANYTECHS#686: Add contract name() and symbol() view methods, deployment verification script, and GET /nfts/deployment-status endpoint. - Issue ANYTECHS#684: Add GasMetricsService to record and expose contract function gas statistics via GET /nfts/gas-stats endpoint. - Issue ANYTECHS#683: Add update_metadata() method enforcing one-time metadata update limit for NFT owners with PATCH /nfts/:id/metadata endpoint.
|
@Mosas2000 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses and resolves Soroban NFT smart contract enhancements and API integrations across issues #672, #686, #684, and #683.
Related Issues
Key Changes
1. Update Royalty Recipient (#672)
update_royalty_recipient(env, token_id, new_recipient)restricting execution to current recipient authorization (current_recipient.require_auth()) and emittingRoyaltyRecipientUpdated.PATCH /nfts/:id/royalty-recipientendpoint with request/response DTOs (UpdateRoyaltyRecipientDto,UpdateRoyaltyRecipientResponseDto) and full OpenAPI documentation.transfer_with_royaltyandpay_royaltyto direct future royalties to the updated recipient address.2. Deployment Verification Script (#686)
name()("ClipCash NFT") andsymbol()("CLIP").scripts/verify-deployment.tsand executablescripts/verify-deployment.shthat queriesname(),symbol(), and default royalty configuration to produce a structured verification report.GET /nfts/deployment-statusendpoint returning post-deploy verification status.3. Gas Usage Monitoring (#684)
GasMetricsService(src/nft/gas-metrics.service.ts) to track, benchmark, and log CPU instructions, memory bytes, and gas units consumed in key operations (mint,transfer).GET /nfts/gas-statsendpoint returning average gas metrics and benchmark history examples (GasStatsResponseDto).4. Limited Metadata Update (#683)
update_metadata(env, token_id, new_metadata)requiring token owner authorization (token_data.owner.require_auth()), enforcing a strict single-update limit (Error::MetadataAlreadyUpdated), and emittingMetadataUpdated.PATCH /nfts/:id/metadataendpoint with error response payload (MetadataUpdateLimitErrorDto) returning HTTP 400 Bad Request if a second update is attempted.Verification & Testing
Automated Test Suites
cargo testincontracts/nft-contract—66 passed, 0 failed.npm test -- src/nft/nft-enhancements.spec.ts—6 passed, 6 total.npx ts-node scripts/verify-deployment.ts— output verified:Status: SUCCESS (ALL CHECKS PASSED).Verification Commands Executed