Skip to content

Commit 03d3b2f

Browse files
authored
Merge pull request #3 from dapperlabs/sadie/update-docs
update specs for MomentNFT smart contract
2 parents 0bb113a + dbd88bc commit 03d3b2f

File tree

1 file changed

+37
-27
lines changed

1 file changed

+37
-27
lines changed

README.md

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,87 @@
11
# NFL Smart Contracts
22

33
## NFL Contract Addresses
4-
TBC
5-
4+
| Testnet | b69482c096f1e0ca |
5+
| Mainnet | TBC |
66

77
## Entities
88

99
### Series
1010
Series encompass periods of time and will be named using strings like: `Summer 2021` or `Series 3`.
1111
More that one series can be open at any given time, and in order for an Edition to be created, it must have a SeriesID.
1212

13-
**Fields**
13+
**On Chain Fields**
1414
- FlowID
1515
- Name
16+
- Active
1617

1718
**Transactions**
18-
- MintSeries: Mints a new series onto Flow
19+
- CreateSeries: Mints a new series onto Flow
1920
- CloseSeries: Stops any new Editions from using the specified series
20-
2121
### Sets
22-
Sets are categories of plays: `Greatest Touchdowns` or similar. Sets have a name and description.
23-
There can be many sets but only one may be used on an Edition. An Edition must have a SetID to be created.
24-
Sets do not close and cannot be retired.
22+
Sets are categories: `Greatest Touchdowns` or similar. Sets have a unique name.An Edition must have a SetID to be created.
23+
Sets do not close and cannot be retired. Sets contain a dictionary of all the SetID/PlayID combinations that exist within
24+
an Edition. This is checked everytime a new Edition is created to ensure they are unique.
2525

26-
**Fields**
26+
**On Chain Fields**
2727
- FlowID
2828
- Name
29-
- Description
3029

3130
**Transactions**
32-
- MintSet: Mints a new set onto Flow
31+
- CreateSet: Mints a new set onto Flow
3332
### Plays
34-
Plays contain the actual play metadata, including stats from Sport Radar.
33+
Plays contain the actual play metadata, including stats from NFL and Elias.
3534
This will contain Player, Team, and Game metadata some of which may be blank depending on the type of moment.
3635

37-
**Fields**
36+
**On Chain Fields**
3837
- FlowID
39-
- Classification (Name TBC: example, PLAYER, TEAM, PLAYER_MELT, TEAM_MELT)
40-
- Metadata
38+
- Classification (Name TBC: example, PLAYER_GAME, TEAM_GAME, PLAYER_MELT, TEAM_MELT)
39+
- Metadata (stored as a string map. This can technically be anything, but the agreeed upon fields are as follows)
40+
- PlayType
41+
- HomeTeamName
42+
- AwayTeamName
43+
- TeamName
44+
- GameDate
45+
- HomeTeamScore
46+
- AwayTeamScore
47+
- PlayerFirstName
48+
- PlayerLastName
49+
- PlayerPosition
50+
- PlayerNumber
4151

4252
**Transactions**
43-
- MintPlay: Mints a new Play on Flow
44-
45-
53+
- CreatePlay: Mints a new Play on Flow
4654
### Editions
4755
Editions are the combination of a SeriesID, SetID, and PlayID and are what moments are minted out of.
4856
They also have a Max and Current Edition size so we can specify how many moments can ever be minted from
4957
the edition.
5058

51-
The MaxEditionSize should be able to be added at any point and if empty allows for perpetual minting(for example, for editions we want to mint an unlimited number of).
52-
Once it exists it is locked and cannot be changed.
53-
Moments are minted out of editions, given an EditionID and a number to mint.
59+
The MaxEditionSize is optional. If it is not set, moments can be minted unlimitedly. An Edition will close, if either of these things happen:
60+
- The max number of moments are minted
61+
- The CloseEdition transaction is used
62+
-
63+
`MaxEditionSize` cannot be changed once it is set.
5464

5565
**Fields**
5666
- FlowID
5767
- SeriesID
5868
- SetID
5969
- PlayID
6070
- MaxEditionSize
61-
- CurrentEditionSize
6271
- Tier
72+
- NumMinted
6373

6474
**Transactions**
65-
- MintEdition: Mints a new Edition on Flow. It should check that no edition exists with the specific SetID/PlayID combination
66-
- SetMaxEditionSizeFromCurrentSize: Should set the max edition size to whatever the current edition size is to avoid minting any more moments
67-
75+
- CreateEdition: Mints a new Edition on Flow.
76+
- CloseEdition: Closes an Edition so no new moments can be minted from it. This is irreversible. The Edition is closed by setting the MaxEditionSize to the value of NumMinted.
6877

6978
### Moment NFT
70-
Moments are minted out of editions. These are the NFTs that will be sold in packs
79+
Moments are minted out of editions. You can think of Editions as a "cookie cutter" for moments. The Serial Number is what makes each MomentNFT unique. These are the NFTs that will be sold in packs.
7180

7281
**Fields**
7382
- FlowID
7483
- EditionID
84+
- Serial Number
7585

7686
**Transactions**
77-
- MintMoments: Mints moments out of the EditionID. Can only mint up to the MaxEditionSize
87+
- MintMomentNFT: Mints a moment out of an EditionID

0 commit comments

Comments
 (0)