Vyper
1 program
Added 2025-10-23T15:20:30Z
Model: deepseek/deepseek-chat-v3-0324Temp: 0.4
Evidence
Report issue
View issues
Aliases: —
Provenance: commit 0cf9828c53 · authored 2025-10-23T17:20:30+02:00 · model deepseek/deepseek-chat-v3-0324
Sources mentioning this language
3 sources · pl_id:
pl/vyperExtensions claimed by this language
2 claims. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.vy | linguist | primary | 38.4K files |
.vy | pygments | primary | 38.4K files |
Related languages
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Simple Auction Contract
Provenance: commit 0cf9828c53 · authored 2025-10-23T17:20:30+02:00 · model deepseek/deepseek-chat-v3-0324 · Temp 0.4
# @version ^0.3.1
# Simple auction contract
# Auction parameters
beneficiary: public(address)
auctionStart: public(uint256)
auctionEnd: public(uint256)
# Current state of auction
highestBidder: public(address)
highestBid: public(uint256)
pendingReturns: public(HashMap[address, uint256])
# Set to true at the end, disallows any change
ended: public(bool)
# Events that will be fired on changes.
HighestBidIncreased: event({bidder: indexed(address), amount: uint256})
AuctionEnded: event({winner: indexed(address), amount: uint256})
@external
def __init__(_beneficiary: address, _bidding_time: uint256):
self.beneficiary = _beneficiary
self.auctionStart = block.timestamp
self.auctionEnd = self.auctionStart + _bidding_time
@external
@payable
def bid():
# Check if bidding period is over.
assert block.timestamp < self.auctionEnd, "Auction already ended"
# Check if bid is high enough
assert msg.value > self.highestBid, "There already is a higher bid"
# Track the previous bidder's refund
if self.highestBid != 0:
self.pendingReturns[self.highestBidder] += self.highestBid
# Track new highest bid
self.highestBidder = msg.sender
self.highestBid = msg.value
log HighestBidIncreased(msg.sender, msg.value)
@external
def withdraw() -> bool:
pending_amount: uint256 = self.pendingReturns[msg.sender]
if pending_amount > 0:
self.pendingReturns[msg.sender] = 0
send(msg.sender, pending_amount)
return True
@external
def endAuction():
# 1. Conditions
assert block.timestamp >= self.auctionEnd, "Auction not yet ended"
assert not self.ended, "auctionEnd has already been called"
# 2. Effects
self.ended = True
log AuctionEnded(self.highestBidder, self.highestBid)
# 3. Interaction
send(self.beneficiary, self.highestBid)