Fix bridged HRC1155 token URI API - #82
Open
dicnunz wants to merge 1 commit into
Open
Conversation
2 tasks
dicnunz
force-pushed
the
codex/bridged-hrc1155-token-uri-125
branch
from
May 20, 2026 14:59
191fbbe to
e9d2a7b
Compare
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.
PR Checklist
PR Type
What is the current behavior?
The Ethereum-side
BridgedHRC1155TokenSDK wrapper includes ABI entries forname(),symbol(), anduri(uint256), and the bridged Solidity contract implements all three. The TypeScript wrapper only exposed generic contract metadata helpers, so SDK users could not read the bridged collection name, symbol, or per-token ERC1155 metadata URI through the typed SDK API.This is inconsistent with the Harmony-side
HRC1155wrapper and with the bridged HRC20/HRC721 wrappers, which expose the common token metadata readers.Related bounty: harmony-one/bounties#125
What is the new behavior?
Adds typed SDK methods to
BridgedHRC1155Token:name()-> reads bridged collection namesymbol()-> reads bridged collection symboltokenURI(id)-> validates the token id, callsuri(uint256), and returns the metadata URI stringFocused tests cover name, symbol, numeric ids, string ids, and invalid ids.
Does this PR introduce a breaking change?
Other information
Validation run:
npm ci --ignore-scripts --no-audit --fund=falsenpx mocha -t 120000 --require ts-node/register src/tests/bridged-hrc1155-token.spec.ts --exit-> 5 passingnpx tsc --noEmit --pretty false --target es2020 --module commonjs --esModuleInterop src/tests/bridged-hrc1155-token.spec.ts src/bridge/bridgedHrc1155Token/index.tsnpm run buildgit diff --check