Skip to content

justinrandom/topshotoracle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TopShot Nexus

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

TopShot Tiers

This project is designed to help find the tier and badges of NBA Top Shot moments on-chain.

Status

Under review/testing. Will deploy to mainnet soon. Reference

Commands

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

TopShot Badges

This project is designed to help find the badges of NBA Top Shot moments on-chain.

Status

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

Commands

get_all_badges (account) flow-c1 scripts execute ./badges/scripts/get_all_badges.cdc 0xf8d6e0586b0a20c7

TopShot Emulator

  1. Deploy TopShotLocking, TopShot, TopShotTiers, TopShotBadges

JSON looks like this:

"emulator-account": [ "TopShotLocking", "TopShot", "TopShotTiers", "TopShotBadges" ]

flow-c1 project deploy

  1. (Optional) Setup second emulator user

flow accounts create

flow transactions send .\topshot\transactions\setupCollection.cdc --signer=justin

  1. create_set (string) flow-c1 transactions send ./topshot/transactions/create_set.cdc "First Set!"

  2. create_plays (metadata found inside transaction) flow-c1 transactions send ./topshot/transactions/create_plays.cdc

  3. 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

  1. send_moments (recipientAddr: Address, momentIDs: [UInt32]) flow transactions send .\topshot\transactions\send_moments.cdc 0x01cf0e2f2f715450 [1,2,3,4,5]

TopShot Links

Repos

Tools

Flow Community

Repos

Tools

Migration to Cadence 1.0

Flow Ecosystem Analytics

Tokenomics

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published