Skip to content

Fix bridged HRC1155 token URI API - #82

Open
dicnunz wants to merge 1 commit into
blockcoders:mainfrom
dicnunz:codex/bridged-hrc1155-token-uri-125
Open

Fix bridged HRC1155 token URI API#82
dicnunz wants to merge 1 commit into
blockcoders:mainfrom
dicnunz:codex/bridged-hrc1155-token-uri-125

Conversation

@dicnunz

@dicnunz dicnunz commented May 20, 2026

Copy link
Copy Markdown

PR Checklist

  • The commit message follows the project style
  • Tests for the changes have been added
  • Docs have been added / updated

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

The Ethereum-side BridgedHRC1155Token SDK wrapper includes ABI entries for name(), symbol(), and uri(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 HRC1155 wrapper 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 name
  • symbol() -> reads bridged collection symbol
  • tokenURI(id) -> validates the token id, calls uri(uint256), and returns the metadata URI string

Focused tests cover name, symbol, numeric ids, string ids, and invalid ids.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Validation run:

  • npm ci --ignore-scripts --no-audit --fund=false
  • npx mocha -t 120000 --require ts-node/register src/tests/bridged-hrc1155-token.spec.ts --exit -> 5 passing
  • npx tsc --noEmit --pretty false --target es2020 --module commonjs --esModuleInterop src/tests/bridged-hrc1155-token.spec.ts src/bridge/bridgedHrc1155Token/index.ts
  • npm run build
  • git diff --check

@dicnunz
dicnunz force-pushed the codex/bridged-hrc1155-token-uri-125 branch from 191fbbe to e9d2a7b Compare May 20, 2026 14:59
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.

1 participant