11. Contracts
Storage
Development
Introduction
How does a smart contract
work?
● Contract developer writes Solidity code (or Vyper, etc)
● Compiles to bytecode for the Ethereum Virtual Machine
● Contract is deployed in a transaction
● Once a contract is deployed, you can call its functions
● Read-only functions are “free” and fast
● Modifying state costs gas and happens asynchronously
Contract basics
12. Contracts
Storage
Development
Introduction
What is an NFT, when you
get right down to it?
• Has a unique identity on a blockchain smart contract
• Can be owned and transferred to a new owner
• Can generally store a small amount of data on-chain
• Can link to external (off-chain) data using a URI
Key Properties
13. Standards
● First formal NFT standard
● Evolution of CryptoPunks & other early NFT projects
● Defines ownership mechanics
● Allows each token to have a unique metadata URI
● Defines a basic “baseline” metadata schema
ERC-721
14. Standards
● “Multi-token” standard
● Allows many token types to share one contract
● Supports efficient batch transfers
● Tokens can be fungible, non-fungible, or
“semi-fungible”
● Made for gaming use case, but not gaming
specific
ERC-1155
20. PSA:
Friends don’t let friends
mint NFTs with HTTP links
● On-chain data storage is incredibly expensive
● Almost all NFTs contain links to off-chain data
● HTTP links are familiar and easy to use
● But, they’re super fragile!
● Data at the other end of the link can change or disappear
without any change to the NFT on-chain