MetaMask / MetaMask/metamask-sdk

Support Metadata Rendering for Bridged ERC-721 and ERC-1155 NFTs from Ethereum to Taiko

Open
#1,291 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
338
Forks
260
PR merge metrics
No merged PRs in 30d

Description

# Feature Request

**Background**
Taiko Alethia supports NFT bridging from Ethereum for both ERC-721 and ERC-1155 tokens. However, the bridged contracts on Taiko do not carry over metadata directly, and instead expose a tokenURI or uri that encodes a reference to the source contract and chain. Without explicit support, these NFTs display with blank metadata in wallets and dapps.

**Request**
Add support for resolving and rendering NFT metadata for ERC-721 and ERC-1155 bridged tokens that use the `ethereum:@1/...` format returned by the tokenURI or uri function on Taiko.

**Information**
Format Returned by Bridged Contracts on Taiko Alethia:
ERC-721:
```tokenURI(tokenId) → ethereum:0x1cacc96e5f01e2849e6036f25531a9a064d2fb5f@1/tokenURI?uint256=```

ERC-1155:
```uri(tokenId) → ethereum:0x1cacc96e5f01e2849e6036f25531a9a064d2fb5f@1/uri?uint256=```

These are not standard URLs. Instead, they point to a method that should be called on Ethereum (chain ID 1), at the specified contract address, with the provided token ID.

**Potential Logic**
1. Detect this pattern in the returned `tokenURI` or `uri` string:
```ethereum:@1/?uint256=```

2. Extract:
- `contract_address` (Ethereum source contract)
- `token_id`
- `method`: `tokenURI` (ERC-721) or `uri` (ERC-1155)

3. Call the method on Ethereum mainnet:
For ERC-721:
```function tokenURI(uint256 tokenId) external view returns (string)```

For ERC-1155:
```function uri(uint256 tokenId) external view returns (string)```

(then substitute {id} with the 64-character hex of tokenId per EIP-1155)

4. Fetch the metadata from the resolved URI
- Standard JSON metadata with name, image, attributes, etc.

5. Render the NFT metadata as you would for native Ethereum NFTs.

**Example**

ERC-721 Bridged to Taiko
On Taiko:
```tokenURI(123) → "ethereum:0x1234...abcd@1/tokenURI?uint256=123"```

Your app:
- Call Ethereum mainnet `tokenURI(123)` on `0x1234...abcd`
- Receive `https://ipfs.io/ipfs/Qm...`
- Fetch metadata → render NFT

ERC-1155 Bridged to Taiko
On Taiko:
```uri(456) → "ethereum:0xdeadbeef@1/uri?uint256=456"```

Your app:
- Call `uri(456)` on Ethereum
- Receive: `https://example.com/{id}.json`
- Replace `{id}` with `000...1c8` (64-char hex)
- Fetch metadata → render NFT

**Why This Matters**
- Without this logic, all bridged NFTs on Taiko appear blank or missing in UI
- Users expect seamless cross-chain experiences
- NFT creators are already bridging NFTs and need renderer support

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are identified. Search the TypeScript SDK for NFT metadata rendering and tokenURI/uri handling, then trace how chain-specific calls are resolved. Done means bridged ERC-721 and ERC-1155 examples resolve their Ethereum metadata and render it like native NFTs, including ERC-1155 {id} substitution.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.