Skip to content

Commit

Permalink
docs: add warnings at the top of all example token contracts
Browse files Browse the repository at this point in the history
discourage people from using them in production
  • Loading branch information
charles-cooper committed Nov 23, 2023
1 parent 4dd47e3 commit 6909a6b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 6 deletions.
6 changes: 5 additions & 1 deletion examples/crowdfund.vy
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Setup private variables (only callable from within the contract)
###########################################################################
## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR!
###########################################################################

# example of a crowd funding contract

funders: HashMap[address, uint256]
beneficiary: address
Expand Down
7 changes: 6 additions & 1 deletion examples/tokens/ERC1155ownable.vy
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
###########################################################################
## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR!
###########################################################################

# @version >=0.3.4
"""
@dev Implementation of ERC-1155 non-fungible token standard ownable, with approval, OPENSEA compatible (name, symbol)
@dev example implementation of ERC-1155 non-fungible token standard ownable, with approval, OPENSEA compatible (name, symbol)
@author Dr. Pixel (github: @Doc-Pixel)
"""

############### imports ###############
from vyper.interfaces import ERC165

Expand Down
6 changes: 5 additions & 1 deletion examples/tokens/ERC20.vy
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# @dev Implementation of ERC-20 token standard.
###########################################################################
## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR!
###########################################################################

# @dev example implementation of an ERC20 token
# @author Takayuki Jimba (@yudetamago)
# https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md

Expand Down
7 changes: 7 additions & 0 deletions examples/tokens/ERC4626.vy
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# NOTE: Copied from https://github.com/fubuloubu/ERC4626/blob/1a10b051928b11eeaad15d80397ed36603c2a49b/contracts/VyperVault.vy

# example implementation of an ERC4626 vault

###########################################################################
## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR!
###########################################################################

from vyper.interfaces import ERC20
from vyper.interfaces import ERC4626

Expand Down
6 changes: 5 additions & 1 deletion examples/tokens/ERC721.vy
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# @dev Implementation of ERC-721 non-fungible token standard.
###########################################################################
## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR!
###########################################################################

# @dev example implementation of ERC-721 non-fungible token standard.
# @author Ryuya Nakamura (@nrryuya)
# Modified from: https://github.com/vyperlang/vyper/blob/de74722bf2d8718cca46902be165f9fe0e3641dd/examples/tokens/ERC721.vy

Expand Down
7 changes: 5 additions & 2 deletions examples/wallet/wallet.vy
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# An example of how you can do a wallet in Vyper.
# Warning: NOT AUDITED. Do not use to store substantial quantities of funds.
###########################################################################
## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR!
###########################################################################

# An example of how you can implement a wallet in Vyper.

# A list of the owners addresses (there are a maximum of 5 owners)
owners: public(address[5])
Expand Down

0 comments on commit 6909a6b

Please sign in to comment.