1. THE ART OF NON-
FUNGIBLE TOKENS
NFT Contracts
10/7/2021
2. DISCLAIMER
§ The views and opinions expressed by the Presenter are those of the Presenter.
§ Presentation is not intended as legal or financial advice and may not be used as legal or
financial advice.
§ Every effort has been made to assure this information is up-to-date as of the date of
publication.
4. BUZZ AND REALITY
What we read in news
Celebrities, Billionaires, Athletes
purchasing NFTs
… NFT was sold on … for $.....
What’s going on
One form of smart contracts,
ERC-721 has interesting
characteristics:
Can verifiably prove ownership
Ownership of NFTs can grant
some privileges within online
communities
5. DEFINITION
“A non-fungible token (NFT) is a unique
and non-interchangeable unit of data stored
on a digital ledger (blockchain). NFTs can be
used to represent easily-reproducible items
such as photos, videos, audio, and other
types of digital files as unique items, and use
blockchain technology to establish a verified
and public proof of ownership.”
6. “NFT” NAME ORIGIN
“NFT” was satisfactory to nearly everyone surveyed and is widely
applicable to a broad universe of distinguishable digital assets. We
recognize that “deed” is very descriptive for certain applications of
this standard (notably, physical property).
Alternatives considered: distinguishable asset, title,
token, asset, equity, ticket
8. HISTORY: COLORED COINS. 2012
Field Description Size
OAP Marker
A tag indicating that this
transaction is an Open
Assets transaction. It is
always 0x4f41.
2 bytes
Version number
The major revision
number of the Open
Assets Protocol. For this
version, it is 1 (0x0100).
2 bytes
Asset quantity count
A var-
integer representing the
number of items in
the asset quantity
list field.
1-9 bytes
Asset quantity list
A list of zero or
more LEB128-
encoded unsigned
integers representing
the asset quantity of
every output in order
(excluding the marker
output).
Variable
Metadata length
The var-integer encoded
length of
the metadata field.
1-9 bytes
OP_RETURN
9. HISTORY: PEPE MEMS. 2017
March 2017 — Rare Pepes on Ethereum -
Peperium “decentralized meme marketplace
and trading card game (TCG) that allowed
anyone to create memes that live eternally on
IPFS and Ethereum.”
13. COMMON USE CASES
Art Games Luxury brands
Event and other
tickets
Sports
Athletic and
other
memorabilia
Supply chain
and logistics
Real estate
Proof of
ownership
Licenses and
certificates
Domain name
records
20. COMMON TOKEN STANDARDS
ERC-721
Default
Gold Standard
Most widely used
Not suitable for minting NFTs in
mass
Transferring one token at a time
Contains “symbol” and “name”
ERC-1155
Dual purpose: fungible and non
fungible
Used often to tokenize things
like common gaming skins and
other commoditized items
Single contract to make various
types of NFT
Less information in blockchain
logs (in events)
All metadata in URI
22. ERC-721 METADATA EXTENSION
name()
symbol()
tokenURI(uint256_tokenId)
{
"title": "Asset Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which
this NFT represents"
},
"description": {
"type": "string",
"description": "Describes the asset to which
this NFT represents"
},
"image": {
"type": "string",
"description": "A URI pointing to a resource
with mime type image/* representing the asset to
which this NFT represents. Consider making any
images at a width between 320 and 1080 pixels and
aspect ratio between 1.91:1 and 4:5 inclusive."
}
}
}
28. URI WITH NAME, DESCRIPTION,
AND IMAGE
{
name: "Thor's hammer",
description: "Mj�lnir, the legendary hammer
of the Norse god of thunder.",
image: "https://cdn.pixabay.com/photo/2013/07
/12/12/58/tv-test-pattern-
146649_960_720.png",
strength: 20
}
29. URI WITH NAME, DESCRIPTION,
AND IMAGE
{
name: "Thor's hammer",
description: "Mj�lnir, the legendary hammer
of the Norse god of thunder.",
image: "https://cdn.pixabay.com/photo/2013/07
/12/12/58/tv-test-pattern-
146649_960_720.png",
strength: 20
}
https://eips.ethereum.org/EIPS/eip-721
https://docs.openzeppelin.com/contracts/3.x/api/token/erc721#IERC721
interface ERC721Metadata /* is ERC721 */ { /// @notice A descriptive name for a collection of NFTs in this contract function name() external view returns (string _name); /// @notice An abbreviated name for NFTs in this contract function symbol() external view returns (string _symbol); /// @notice A distinct Uniform Resource Identifier (URI) for a given asset. /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC /// 3986. The URI may point to a JSON file that conforms to the "ERC721 /// Metadata JSON Schema". function tokenURI(uint256 _tokenId) external view returns (string); }