Skip to content

IPFS Resolution for NBA Assets#301

Merged
Deewai merged 9 commits into
masterfrom
sid/ipfs-resolver
Apr 23, 2026
Merged

IPFS Resolution for NBA Assets#301
Deewai merged 9 commits into
masterfrom
sid/ipfs-resolver

Conversation

@sid42
Copy link
Copy Markdown
Contributor

@sid42 sid42 commented Apr 2, 2026

IPFS CIDs for NBA assets have already been uploaded: https://dapperlabs.github.io/dapperlabs-ipfs-reference-app/. There's also a store in NBA's backend to associate all the assets for a given (play_id, set_id, subedtion_id) tuple.

A separate job would be needed for the backfill from NBA BE into the new TopShotIPFSResolver contract

Expected resolution on MetadataViews.Medias (sourced from forked mainnet testing on emulator using get_topshot_nft_media_views.cdc)

Result: A.1d7e57aa55817448.MetadataViews.Medias(items: [A.1d7e57aa55817448.MetadataViews.Media(file: A.1d7e57aa55817448.MetadataViews.HTTPFile(url: "https://assets.nbatopshot.com/media/51489691?width=512"), mediaType: "image/jpeg"), A.1d7e57aa55817448.MetadataViews.Media(file: A.1d7e57aa55817448.MetadataViews.HTTPFile(url: "https://assets.nbatopshot.com/media/51489691/video"), mediaType: "video/mp4"), A.1d7e57aa55817448.MetadataViews.Media(file: A.1d7e57aa55817448.MetadataViews.IPFSFile(cid: "QmPtNTEDUxh8KMviQNuXLXuN1yU4EiTjjLH6nRFMehMJYM", path: nil), mediaType: "HERO"), A.1d7e57aa55817448.MetadataViews.Media(file: A.1d7e57aa55817448.MetadataViews.HTTPFile(url: "https://ipfs.dapperlabs.com/ipfs/QmPtNTEDUxh8KMviQNuXLXuN1yU4EiTjjLH6nRFMehMJYM"), mediaType: "HERO")])
image

@sid42 sid42 marked this pull request as ready for review April 3, 2026 19:22
@sid42 sid42 requested a review from a team as a code owner April 3, 2026 19:22
Comment thread contracts/TopShot.cdc
Comment on lines +847 to +854
items.append(
MetadataViews.Media(
file: MetadataViews.HTTPFile(
url: TopShotIPFSResolver.gateway.concat(cid)
),
mediaType: mediaType
)
)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolving to the IPFS HTTP Gateway for convenience

@sid42 sid42 changed the title IPFS resolution for NBA assets IPFS Resolution for NBA Assets Apr 3, 2026
Copy link
Copy Markdown
Contributor

@Deewai Deewai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@sid42
Copy link
Copy Markdown
Contributor Author

sid42 commented Apr 15, 2026

@Deewai Deewai merged commit da2bc95 into master Apr 23, 2026
1 check 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.

3 participants