This repo is meant as a way to share important utilities, contracts, and tools for the NBA TopShot community. It is a work in progress and will be updated as new tools are developed.
Currently the repo contains the following projects: TopShot Tiers TopShot Badges TopSHot Emulator
This project is designed to help find the tier and badges of NBA Top Shot moments on-chain.
Under review/testing. Will deploy to mainnet soon. Reference
get_tier (account, momentID)
- flow-c1 scripts execute ./tiers/scripts/getTier.cdc 0xf8d6e0586b0a20c7 1
(Admin) update_default_tier (setID: UInt32, tierRawValue: UInt8)
- flow-c1 transactions send ./tiers/transactions/update_default_tier.cdc 1 2
(Admin) update_mixed_tier (setID: UInt32, playID: UInt32, tierRawValue: UInt8)
- flow-c1 transactions send ./tiers/transactions/update_mixed_tier.cdc
(Admin) remove_playid.cdc (setID: UInt32, playID: UInt32)
- flow-c1 transactions send ./tiers/transactions/remove_playid.cdc 1 245
This project is designed to help find the badges of NBA Top Shot moments on-chain.
The following are implemented:
- Rookie Mint
- Rookie of the Year
- MVP Year
- Rookie Year
- Championship Year
The following are in-progress:
- Rookie Premiere
- Top Shot Debut
- Challenge Reward
- Crafting Challenge Reward
- Leaderboard Reward
get_all_badges (account) flow-c1 scripts execute ./badges/scripts/get_all_badges.cdc 0xf8d6e0586b0a20c7
- Deploy TopShotLocking, TopShot, TopShotTiers, TopShotBadges
JSON looks like this:
"emulator-account": [ "TopShotLocking", "TopShot", "TopShotTiers", "TopShotBadges" ]
flow-c1 project deploy
- (Optional) Setup second emulator user
flow accounts create
flow transactions send .\topshot\transactions\setupCollection.cdc --signer=justin
-
create_set (string) flow-c1 transactions send ./topshot/transactions/create_set.cdc "First Set!"
-
create_plays (metadata found inside transaction) flow-c1 transactions send ./topshot/transactions/create_plays.cdc
-
mint_moment(setID: UInt32, playID: UInt32, recipientAddr: Address)
flow-c1 transactions send ./topshot/transactions/mint_moment.cdc 1 1 0xf8d6e0586b0a20c7
or mint_moments(setID: UInt32, playID: UInt32, recipientAddr: Address)
flow-c1 transactions send ./topshot/transactions/mint_moments.cdc 1 1 5 0xf8d6e0586b0a20c7
- send_moments (recipientAddr: Address, momentIDs: [UInt32]) flow transactions send .\topshot\transactions\send_moments.cdc 0x01cf0e2f2f715450 [1,2,3,4,5]
Repos
Tools
Repos
Tools
- Flow Developer Documentation
- Flow NFT Catalog
- Graffle
- ECDAO Documentation
- ECDAO Links
- Dapper Labs Developer Portal
Migration to Cadence 1.0
- Migration ChatGPT Bot
- Contract Browser
- Cadence Migration Guide
- Previewnet Deployment - Dapper team's most recent deployment to Previewnet for C1
- Previewnet NFT Contract - Most recent NFT contract on Previewnet
- NBA-2865-upgrade-flow-sdk branch They are actively updating the content for C1. You can dig through some of the branches for the latest C1 code.
- FlowDiver Analytics
- FindLabs API
- FindLabs is working on a new API, but the historical API 1.1.0 should work:
- Flipside Crypto Flow Models