Repository navigation
feat(sbt): make metadata base URI admin-configurable - #129
moon-code12 wants to merge 2 commits into
Conversation
|
@moon-code12 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! 🚀 |
|
@moon-code12 is attempting to deploy a commit to the alankcr1-6443's projects Team on Vercel. A member of the Team first needs to authorize it. |
Sync with main (docs overhaul, supabase keep-alive). Reword the metadata base URI migration note to match main's warning that the deployed contracts cannot be upgraded in place: init sets the default URI, and instances without the key still fall back to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I merged the latest
Locally, Could a maintainer approve the workflow run and authorize the Vercel deployment? |
Summary
Makes SBT metadata project-owned and admin-configurable.
DataKey::MetadataBaseUri(instance storage, appended at the end of the enum).initwrites the project-owned default base URI.token_urinow builds<base><tier>.jsonfrom the stored base URI.set_metadata_base_uri(admin, base_uri)with the same admin auth/check pattern asmintandrevoke.get_metadata_base_uri()for clients and operators.metadata/bronce.jsonand updated all tier metadata image URLs to this project'spublic/imagesassets.docs/contracts/migration.md.Closes #103
Before / after
Before
token_urimatched the tier against hardcoded URLs underhttps://raw.githubusercontent.com/YORCH12/Stellar-Hack-vinculo-credito/main/metadata/.The project's own
metadata/andpublic/images/assets were unused.After
https://raw.githubusercontent.com/Kalebtron1/Project-Vyn/main/metadata/as the default.token_urireturns:<base>bronce.json<base>plata.json<base>oro.json<base>diamante.json<base>platino.json/.mintandrevoke.Metadata files
metadata/bronce.json(the contract already returned a bronce URL but the file was missing).imageinmetadata/{plata,oro,diamante,platino}.jsontohttps://raw.githubusercontent.com/Kalebtron1/Project-Vyn/main/public/images/<tier>.png.src/stellar/nft-metadata.jsonnow recordsmetadata_base_uriand each level'smetadata_file.Validation
cargo testBuild succeeds;
vinculo_sbt.wasmis 18,409 bytes.URI checks (HTTP 200):
metadata/bronce.jsonis newly added by this PR, so its URL will resolve after merge.Migration / upgrade
docs/contracts/migration.mdnow documents that the new key is additive and thatupgraded instances fall back to the default until the admin calls the setter. No
storage migration is required.