Implement update_metadata for bounty titles and add backend PATCH end… - #707
Open
elcabasa wants to merge 1 commit into
Open
Implement update_metadata for bounty titles and add backend PATCH end…#707elcabasa wants to merge 1 commit into
elcabasa wants to merge 1 commit into
Conversation
|
@elcabasa is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@elcabasa 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.
Description
fixes #231
This PR resolves issue #231 by implementing the
update_metadatafunctionality, allowing maintainers to correct bounty titles on non-finalized bounties without having to cancel and recreate them. The implementation spans both the Soroban smart contract and the off-chain backend indexing API endpoint.Scope of Changes
Smart Contract (
contract.rs)BountyMetadataUpdatedcontract type struct for indexer event streams.pub fn update_metadata(env: Env, bounty_id: u64, maintainer: Address, new_title: String)with the following security guardrails:maintainer.require_auth().MaintainerMismatcherror if a non-owner attempts an modification.Released,Refunded, orExpired.BountyMetadataUpdatedevent containing both the old and new titles.Backend REST API
PATCH /api/bounties/:id/metadatacontroller routing endpoint.Acceptance Criteria Verified
update_metadata.Released,Refunded, orExpiredstatuses.BountyMetadataUpdatedevent with old and new title./api/bounties/:id/metadataPATCH endpoint.Testing Matrix
cargo test