Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add warnings at the top of all example token contracts #3676

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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