Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NBA-3112 : Added Contract NFT Display Data #79

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion pds/contracts/PackNFT_TopShot.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ access(all) contract PackNFT: NonFungibleToken, IPackNFT {
)
let squareImage = MetadataViews.Media(
file: MetadataViews.HTTPFile(
url: "https://nbatopshot.com/static/img/og/og.png"
url: "https://nbatopshot.com/static/favicon/favicon.svg"
),
mediaType: "image/png"
)
Expand Down Expand Up @@ -439,6 +439,31 @@ access(all) contract PackNFT: NonFungibleToken, IPackNFT {
})
)
return collectionData
case Type<MetadataViews.NFTCollectionDisplay>():
let bannerImage = MetadataViews.Media(
file: MetadataViews.HTTPFile(
url: "https://nbatopshot.com/static/img/top-shot-logo-horizontal-white.svg"
),
mediaType: "image/svg+xml"
)
let squareImage = MetadataViews.Media(
file: MetadataViews.HTTPFile(
url: "https://nbatopshot.com/static/favicon/favicon.svg"
),
mediaType: "image/png"
)
return MetadataViews.NFTCollectionDisplay(
name: "NBA-Top-Shot-Packs",
description: "NBA Top Shot is your chance to own, sell, and trade official digital collectibles of the NBA and WNBA's greatest plays and players",
externalURL: MetadataViews.ExternalURL("https://nbatopshot.com/"),
squareImage: squareImage,
bannerImage: bannerImage,
socials: {
"twitter": MetadataViews.ExternalURL("https://twitter.com/nbatopshot"),
"discord": MetadataViews.ExternalURL("https://discord.com/invite/nbatopshot"),
"instagram": MetadataViews.ExternalURL("https://www.instagram.com/nbatopshot")
}
)
}
return nil
}
Expand Down
Loading