From f34923b47cca48606f29b8594988ea6080c723da Mon Sep 17 00:00:00 2001 From: Charles Cooper Date: Thu, 8 Feb 2024 15:42:45 -0500 Subject: [PATCH] add pragma version to all examples --- examples/auctions/blind_auction.vy | 2 ++ examples/auctions/simple_open_auction.vy | 2 ++ examples/crowdfund.vy | 2 ++ examples/factory/Exchange.vy | 2 ++ examples/factory/Factory.vy | 2 ++ examples/market_maker/on_chain_market_maker.vy | 2 ++ examples/name_registry/name_registry.vy | 1 + examples/safe_remote_purchase/safe_remote_purchase.vy | 2 ++ examples/stock/company.vy | 2 ++ examples/storage/advanced_storage.vy | 2 ++ examples/storage/storage.vy | 2 ++ examples/tokens/ERC1155ownable.vy | 3 ++- examples/tokens/ERC20.vy | 2 ++ examples/tokens/ERC4626.vy | 2 ++ examples/tokens/ERC721.vy | 2 ++ examples/voting/ballot.vy | 2 ++ examples/wallet/wallet.vy | 2 ++ 17 files changed, 33 insertions(+), 1 deletion(-) diff --git a/examples/auctions/blind_auction.vy b/examples/auctions/blind_auction.vy index 776688f8b0..966565138f 100644 --- a/examples/auctions/blind_auction.vy +++ b/examples/auctions/blind_auction.vy @@ -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: diff --git a/examples/auctions/simple_open_auction.vy b/examples/auctions/simple_open_auction.vy index 3b884e162f..499e12af16 100644 --- a/examples/auctions/simple_open_auction.vy +++ b/examples/auctions/simple_open_auction.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + # Open Auction # Auction params diff --git a/examples/crowdfund.vy b/examples/crowdfund.vy index 4011b86186..50ec005924 100644 --- a/examples/crowdfund.vy +++ b/examples/crowdfund.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + ########################################################################### ## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR! ########################################################################### diff --git a/examples/factory/Exchange.vy b/examples/factory/Exchange.vy index 91163b8123..e66c60743a 100644 --- a/examples/factory/Exchange.vy +++ b/examples/factory/Exchange.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + from ethereum.ercs import ERC20 diff --git a/examples/factory/Factory.vy b/examples/factory/Factory.vy index 4091650384..4fec723197 100644 --- a/examples/factory/Factory.vy +++ b/examples/factory/Factory.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + from ethereum.ercs import ERC20 interface Exchange: diff --git a/examples/market_maker/on_chain_market_maker.vy b/examples/market_maker/on_chain_market_maker.vy index 4f9859584c..74b1307dc1 100644 --- a/examples/market_maker/on_chain_market_maker.vy +++ b/examples/market_maker/on_chain_market_maker.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + from ethereum.ercs import ERC20 diff --git a/examples/name_registry/name_registry.vy b/examples/name_registry/name_registry.vy index 7152851dac..937b41856b 100644 --- a/examples/name_registry/name_registry.vy +++ b/examples/name_registry/name_registry.vy @@ -1,3 +1,4 @@ +#pragma version >0.3.10 registry: HashMap[Bytes[100], address] diff --git a/examples/safe_remote_purchase/safe_remote_purchase.vy b/examples/safe_remote_purchase/safe_remote_purchase.vy index 2b90b42800..91f0159a2d 100644 --- a/examples/safe_remote_purchase/safe_remote_purchase.vy +++ b/examples/safe_remote_purchase/safe_remote_purchase.vy @@ -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 diff --git a/examples/stock/company.vy b/examples/stock/company.vy index 1e2997818b..0bd3216f65 100644 --- a/examples/stock/company.vy +++ b/examples/stock/company.vy @@ -1,3 +1,5 @@ +#pragma version>0.3.10 + # Financial events the contract logs event Transfer: diff --git a/examples/storage/advanced_storage.vy b/examples/storage/advanced_storage.vy index 38d7cf15a5..42a455cbf1 100644 --- a/examples/storage/advanced_storage.vy +++ b/examples/storage/advanced_storage.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + event DataChange: setter: indexed(address) value: int128 diff --git a/examples/storage/storage.vy b/examples/storage/storage.vy index 041ed5a5bf..30f570f212 100644 --- a/examples/storage/storage.vy +++ b/examples/storage/storage.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + storedData: public(int128) @deploy diff --git a/examples/tokens/ERC1155ownable.vy b/examples/tokens/ERC1155ownable.vy index 3f5f9ff921..d88d459d64 100644 --- a/examples/tokens/ERC1155ownable.vy +++ b/examples/tokens/ERC1155ownable.vy @@ -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) diff --git a/examples/tokens/ERC20.vy b/examples/tokens/ERC20.vy index 22c4c6e39e..0e94b32b9d 100644 --- a/examples/tokens/ERC20.vy +++ b/examples/tokens/ERC20.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + ########################################################################### ## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR! ########################################################################### diff --git a/examples/tokens/ERC4626.vy b/examples/tokens/ERC4626.vy index 8ff21d1250..699b5edd42 100644 --- a/examples/tokens/ERC4626.vy +++ b/examples/tokens/ERC4626.vy @@ -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 diff --git a/examples/tokens/ERC721.vy b/examples/tokens/ERC721.vy index 6942532301..70dff96051 100644 --- a/examples/tokens/ERC721.vy +++ b/examples/tokens/ERC721.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + ########################################################################### ## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR! ########################################################################### diff --git a/examples/voting/ballot.vy b/examples/voting/ballot.vy index 927c35c052..daaf712e0f 100644 --- a/examples/voting/ballot.vy +++ b/examples/voting/ballot.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + # Voting with delegation. # Information about voters diff --git a/examples/wallet/wallet.vy b/examples/wallet/wallet.vy index 2984119b88..7e92c7e89c 100644 --- a/examples/wallet/wallet.vy +++ b/examples/wallet/wallet.vy @@ -1,3 +1,5 @@ +#pragma version >0.3.10 + ########################################################################### ## THIS IS EXAMPLE CODE, NOT MEANT TO BE USED IN PRODUCTION! CAVEAT EMPTOR! ###########################################################################