Skip to content

Metadata Update - #46

Merged
p3ris0n merged 3 commits into
BCPathway:mainfrom
Ndanusa:issue-19-metadata-update
Apr 28, 2026
Merged

Metadata Update#46
p3ris0n merged 3 commits into
BCPathway:mainfrom
Ndanusa:issue-19-metadata-update

Conversation

@Ndanusa

@Ndanusa Ndanusa commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Feature: Add metadata update functionality (update name/symbol)

Overview

This pull request introduces metadata update capabilities to the BcForgeToken contract.

Previously, the token name and symbol were structurally immutable on initialize(). In a future organizational restructuring scenario, an administrative identity will require mechanisms to adjust formal branding variables. With this change, administrators can conditionally adjust the branding strings while preserving state integrity.

Key Changes

Smart Contract (contracts/token/src/lib.rs & events.rs)

  • update_name & update_symbol Functions: Implemented new admin-only functions permitting token string revisions.
  • Security & Authorization: Guarded requests with rigorous admin.require_auth() isolation, ensuring only the authorized administrator can trigger the update.
  • Event Emission: Introduced emit_update_name and emit_update_symbol events to notify off-chain indexers and explorers whenever a successful metadata update occurs, providing full transparency.

SDK Expansion (sdk/src/client.ts)

  • Client Support: Included companion methods (updateName and updateSymbol) within the standard SDK bindings to allow seamless interaction with the new update endpoints.

Testing & Validation

How has this been tested?

  • Rust unit tests pass (cargo test)
  • SDK compiles (npm run build in sdk/)
  • Manual testing against Soroban testnet
  • New tests added for changes

Test commands run:

# Contract tests
cargo test

# SDK build
cd sdk && npm run build

Checklist

  • My code follows the project's style guidelines
  • I have added NatSpec-style comments to new Rust functions
  • I have added JSDoc comments to new TypeScript functions
  • I have updated the README if needed
  • My branch follows the naming convention: issue-19-metadata-update
  • I have not modified files outside the scope of this issue

Closes #19

@drips-wave

drips-wave Bot commented Apr 26, 2026

Copy link
Copy Markdown

@Ndanusa 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

@p3ris0n
p3ris0n merged commit 4af98f3 into BCPathway:main Apr 28, 2026
1 of 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.

[Contract]: Add metadata update functionality (update name/symbol)

2 participants