You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing vyper integration of /opt/hostedtoolcache/Python/3.12.7/x64/bin/crytic-compile
ERROR:CryticCompile:missing type annotation
(hint: did you mean something like `for i: uint256 in ...`?)
line 111:4
110 refund: uint256 = 0
---> 111 for i in range(MAX_BIDS):
-------------^
112 # Note that loop may break sooner than 128 iterations if i >= _numBids
ERROR:CryticCompile:Vyper compilation errored
vyper test failed
# Taken from https://github.com/vyperlang/vyper/blob/9136169468f317a53b4e7448389aa315f90b95ba/examples/auctions/blind_auction.vy
2
+
# Blind Auction. Adapted to Vyper from [Solidity by Example](https://github.com/ethereum/solidity/blob/develop/docs/solidity-by-example.rst#blind-auction-1)
3
+
4
+
struct Bid:
5
+
blindedBid: bytes32
6
+
deposit: uint256
7
+
8
+
# Note: because Vyper does not allow for dynamic arrays, we have limited the
9
+
# number of bids that can be placed by one address to 128 in this example
10
+
MAX_BIDS: constant(int128) =128
11
+
12
+
# Event for logging that auction has ended
13
+
event AuctionEnded:
14
+
highestBidder: address
15
+
highestBid: uint256
16
+
17
+
# Auction parameters
18
+
beneficiary: public(address)
19
+
biddingEnd: public(uint256)
20
+
revealEnd: public(uint256)
21
+
22
+
# Set to true at the end of auction, disallowing any new bids
23
+
ended: public(bool)
24
+
25
+
# Final auction state
26
+
highestBid: public(uint256)
27
+
highestBidder: public(address)
28
+
29
+
# State of the bids
30
+
bids: HashMap[address, Bid[128]]
31
+
bidCounts: HashMap[address, int128]
32
+
33
+
# Allowed withdrawals of previous bids
34
+
pendingReturns: HashMap[address, uint256]
35
+
36
+
37
+
# Create a blinded auction with `_biddingTime` seconds bidding time and
38
+
# `_revealTime` seconds reveal time on behalf of the beneficiary address
0 commit comments