Skip to content

Commit

Permalink
add pragma version to all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Feb 8, 2024
1 parent c33facc commit f34923b
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/auctions/blind_auction.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

# Blind Auction. Adapted to Vyper from [Solidity by Example](https://github.com/ethereum/solidity/blob/develop/docs/solidity-by-example.rst#blind-auction-1)

struct Bid:
Expand Down
2 changes: 2 additions & 0 deletions examples/auctions/simple_open_auction.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

# Open Auction

# Auction params
Expand Down
2 changes: 2 additions & 0 deletions examples/crowdfund.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

###########################################################################
## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR!
###########################################################################
Expand Down
2 changes: 2 additions & 0 deletions examples/factory/Exchange.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

from ethereum.ercs import ERC20


Expand Down
2 changes: 2 additions & 0 deletions examples/factory/Factory.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

from ethereum.ercs import ERC20

interface Exchange:
Expand Down
2 changes: 2 additions & 0 deletions examples/market_maker/on_chain_market_maker.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

from ethereum.ercs import ERC20


Expand Down
1 change: 1 addition & 0 deletions examples/name_registry/name_registry.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma version >0.3.10

registry: HashMap[Bytes[100], address]

Expand Down
2 changes: 2 additions & 0 deletions examples/safe_remote_purchase/safe_remote_purchase.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

# Safe Remote Purchase
# Originally from
# https://github.com/ethereum/solidity/blob/develop/docs/solidity-by-example.rst
Expand Down
2 changes: 2 additions & 0 deletions examples/stock/company.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version>0.3.10

# Financial events the contract logs

event Transfer:
Expand Down
2 changes: 2 additions & 0 deletions examples/storage/advanced_storage.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

event DataChange:
setter: indexed(address)
value: int128
Expand Down
2 changes: 2 additions & 0 deletions examples/storage/storage.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

storedData: public(int128)

@deploy
Expand Down
3 changes: 2 additions & 1 deletion examples/tokens/ERC1155ownable.vy
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#pragma version >0.3.10

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

# @version >=0.3.4
"""
@dev example implementation of ERC-1155 non-fungible token standard ownable, with approval, OPENSEA compatible (name, symbol)
@author Dr. Pixel (github: @Doc-Pixel)
Expand Down
2 changes: 2 additions & 0 deletions examples/tokens/ERC20.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

###########################################################################
## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR!
###########################################################################
Expand Down
2 changes: 2 additions & 0 deletions examples/tokens/ERC4626.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

# NOTE: Copied from https://github.com/fubuloubu/ERC4626/blob/1a10b051928b11eeaad15d80397ed36603c2a49b/contracts/VyperVault.vy

# example implementation of an ERC4626 vault
Expand Down
2 changes: 2 additions & 0 deletions examples/tokens/ERC721.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

###########################################################################
## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR!
###########################################################################
Expand Down
2 changes: 2 additions & 0 deletions examples/voting/ballot.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

# Voting with delegation.

# Information about voters
Expand Down
2 changes: 2 additions & 0 deletions examples/wallet/wallet.vy
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma version >0.3.10

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

0 comments on commit f34923b

Please sign in to comment.