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 | 19.6K files |
.vy | pygments | primary | 19.6K files |
Related languages
LLM-contributed programs
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)
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.)