Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

auction state

Back to all declarations

Denom

untyped string

Denom is the only asset this realm accepts.

Value

"ugnot"

MaxFeeBps

int64

MaxFeeBps is the hard protocol-fee cap: 1000 bps = 10%. The fee applies only to the WINNER's payment at close, never to a refund.

Value

1000

AuctionOpen

untyped string

// accepting bids until endHeight

Value

"open"

AuctionSettled

untyped string

// closed WITH a winner; proceeds credited

Value

"settled"

AuctionClosed

untyped string

// closed with NO bids; nothing to settle

Value

"closed"

AuctionCancelled

untyped string

// seller cancelled before any bid

Value

"cancelled"

MinIncrementBps

int64

MinIncrementBps is the minimum raise over the standing high bid: 500 = 5%. It stops penny-increment griefing without a per-auction knob.

Value

500

MinBid

int64

Input bounds.

Value

1000

MaxBid

int64

// 1,000,000 GNOT

Value

1000000000000

MinDuration

int64

Input bounds.

Value

10

MaxDuration

int64

Input bounds.

Value

7500000

MaxAntiSnipe

int64

Input bounds.

Value

7500000

MaxLotLen

untyped bigint

Input bounds.

Value

(200 <untyped> bigint)

MaxAuctionsPerSeller

untyped bigint

Input bounds.

Value

(50 <untyped> bigint)

RenderLimit

untyped bigint

Input bounds.

Value

(20 <untyped> bigint)

auction

type

Value

auction.auction

admin

.uverse.address

Value

<gnolang.StringValue>

pendingAdmin

.uverse.address

Value

<zero>

feeRecipient

.uverse.address

Value

<gnolang.StringValue>

feeBps

int64

// snapshotted into NEW auctions

Value

0

self

.uverse.address

Value

<gnolang.StringValue>

nextID

int64

Value

1

locked

int64

// Σ current high bids of OPEN auctions (held, not yet claimable)

Value

0

sellerNum

*v0.Tree

// seller.String() -> \*int64, stored auctions

Open
OID
0566b8…549a:14
sellerNum details

Inspect pointer

CreateAuction

func(lot string, reserve int64, durationBlocks int64, antiSnipe int64) int64

CreateAuction lists a lot for ascending-bid sale. The caller becomes the seller. \`reserve\` is 0 (no reserve) or a floor in \[MinBid, MaxBid] the first bid must meet; the auction runs for \`durationBlocks\` blocks; a bid landing within \`antiSnipe\` blocks of the end extends the end to now+antiSnipe (0 disables). The current protocol fee is snapshotted in. Returns the id.

Open
OID
0566b8…549a:23
CreateAuction details

Inspect func

Cancel

func(auctionID int64)

Cancel withdraws an auction that has not yet received a bid. Seller only. Once any bid stands, the auction can only run to close — a seller cannot pull the lot out from under a committed bidder.

Open
OID
0566b8…549a:24
Cancel details

Inspect func

Bid

func(auctionID int64)

Bid raises the standing high bid on an open auction. The caller attaches the bid; it must beat the current high bid by at least MinIncrementBps (or meet max(reserve, MinBid) if it is the first bid), and the auction must still be open and before its end. The previous high bidder's escrowed bid becomes a pull-claimable refund. A bid inside the anti-snipe window extends the end.

Open
OID
0566b8…549a:25
Bid details

Inspect func

Close

func(auctionID int64)

Close finalizes an auction whose end height has passed. Anyone may call it; no auction's terminal state may depend on a party acting. With a winner, the high bid is credited to the seller (fee split at the ledger) and the auction is Settled; with no bids it is Closed. The winner's escrowed payment moves from \`locked\` into the seller's claimable balance.

Open
OID
0566b8…549a:26
Close details

Inspect func

Claim

func(amount int64)

Claim sends amount ugnot of the caller's claimable balance — outbid refunds and, if the caller is a seller of a settled auction, proceeds — to the caller.

Open
OID
0566b8…549a:27
Claim details

Inspect func

ClaimAll

func()

ClaimAll sends the caller's entire claimable balance to the caller.

Open
OID
0566b8…549a:28
ClaimAll details

Inspect func

SetFeeRecipient

func(recipient .uverse.address)
Open
OID
0566b8…549a:30
SetFeeRecipient details

Inspect func

SweepDenom

func(denom string)

SweepDenom recovers out-of-band coins to the fee recipient. For the ledger denom the reserve is locked + Liabilities() — escrowed high bids, claimable refunds, seller proceeds and the fee pot are all structurally unreachable.

Open
OID
0566b8…549a:32
SweepDenom details

Inspect func

TransferAdmin

func(successor .uverse.address)
Open
OID
0566b8…549a:33
TransferAdmin details

Inspect func

AuctionInfo

func(auctionID int64) (seller .uverse.address, reserve int64, highBid int64, endHeight int64, antiSnipe int64, feeBps int64, createdHeight int64, highBidder .uverse.address, status string)

AuctionInfo returns an auction's terms and standing state. Lot text is a separate view ([Lot](#Lot)) so this stays a numeric/address tuple.

Open
OID
0566b8…549a:35
AuctionInfo details

Inspect func

Lot

func(auctionID int64) string

Lot returns the auction's free-text lot description.

Open
OID
0566b8…549a:36
Lot details

Inspect func

MinNextBid

func(auctionID int64) int64

MinNextBid is the smallest bid that would be accepted right now: the first bid's floor when there are no bids, else the standing high bid plus the minimum increment.

Open
OID
0566b8…549a:37
MinNextBid details

Inspect func

HighBid

func(auctionID int64) int64

HighBid is the standing high bid (0 if none).

Open
OID
0566b8…549a:38
HighBid details

Inspect func

HighBidder

func(auctionID int64) .uverse.address
Open
OID
0566b8…549a:39
HighBidder details

Inspect func

Winner

func(auctionID int64) .uverse.address
Open
OID
0566b8…549a:40
Winner details

Inspect func

EndHeight

func(auctionID int64) int64

EndHeight is the current end height (which anti-snipe may have extended).

Open
OID
0566b8…549a:41
EndHeight details

Inspect func

Reserve

func(auctionID int64) int64

Reserve is the auction's reserve price (0 if none).

Open
OID
0566b8…549a:42
Reserve details

Inspect func

Status

func(auctionID int64) string

Status is the auction's status string.

Open
OID
0566b8…549a:43
Status details

Inspect func

Seller

func(auctionID int64) .uverse.address
Open
OID
0566b8…549a:44
Seller details

Inspect func

IsOpen

func(auctionID int64) bool

IsOpen reports whether the auction is open and still before its end.

Open
OID
0566b8…549a:45
IsOpen details

Inspect func

IsCloseable

func(auctionID int64) bool

IsCloseable reports whether Close would succeed right now.

Open
OID
0566b8…549a:46
IsCloseable details

Inspect func

BlocksLeft

func(auctionID int64) int64

BlocksLeft is how many blocks until the end (0 once ended).

Open
OID
0566b8…549a:47
BlocksLeft details

Inspect func

HasAuction

func(auctionID int64) bool
Open
OID
0566b8…549a:48
HasAuction details

Inspect func

AuctionsOf

func(seller .uverse.address) int64
Open
OID
0566b8…549a:49
AuctionsOf details

Inspect func

PendingAdmin

func() .uverse.address
Open
OID
0566b8…549a:51
PendingAdmin details

Inspect func

FeeRecipient

func() .uverse.address
Open
OID
0566b8…549a:52
FeeRecipient details

Inspect func

ClaimableOf

func(a .uverse.address) int64
Open
OID
0566b8…549a:55
ClaimableOf details

Inspect func

minNextBid

func(a *auction.auction) int64

minNextBid is the smallest acceptable bid: the first-bid floor when no bid stands, else the high bid plus ceil(highBid·MinIncrementBps/10000). highBid is bounded by MaxBid, so the increment product cannot overflow.

Open
OID
0566b8…549a:62
minNextBid details

Inspect func

mustAuction

func(id int64) *auction.auction
Open
OID
0566b8…549a:63
mustAuction details

Inspect func

counter

func(tree *v0.Tree, a .uverse.address) *int64
Open
OID
0566b8…549a:65
counter details

Inspect func

ceilDiv

func(a int64, b int64) int64

ceilDiv returns ceil(a/b) for b>0; a assumed non-negative.

Open
OID
0566b8…549a:66
ceilDiv details

Inspect func

addChecked

func(a int64, b int64) (int64, bool)
Open
OID
0566b8…549a:67
addChecked details

Inspect func

hasPrefix

func(s string, p string) bool
Open
OID
0566b8…549a:71
hasPrefix details

Inspect func

renderAuction

func(idStr string) string
Open
OID
0566b8…549a:74
renderAuction details

Inspect func

highBidderStr

func(a *auction.auction) string
Open
OID
0566b8…549a:75
highBidderStr details

Inspect func
Denom : untyped string ="ugnot"
MaxFeeBps : int64 =1000
AuctionOpen : untyped string ="open"
AuctionSettled : untyped string ="settled"
AuctionClosed : untyped string ="closed"
AuctionCancelled : untyped string ="cancelled"
MinIncrementBps : int64 =500
MinBid : int64 =1000
MaxBid : int64 =1000000000000
MinDuration : int64 =10
MaxDuration : int64 =7500000
MaxAntiSnipe : int64 =7500000
MaxLotLen : untyped bigint =(200 <untyped> bigint)
MaxAuctionsPerSeller : untyped bigint =(50 <untyped> bigint)
RenderLimit : untyped bigint =(20 <untyped> bigint)
auction : type =auction.auction
admin : .uverse.address =<gnolang.StringValue>
pendingAdmin : .uverse.address =<zero>
feeRecipient : .uverse.address =<gnolang.StringValue>
feeBps : int64 =0
self : .uverse.address =<gnolang.StringValue>
nextID : int64 =1
locked : int64 =0
auctions : *v0.Tree Inspect
sellerNum : *v0.Tree Inspect
ledger : *feeledger.Ledger Inspect
init.26 : func() Inspect
CreateAuction : func(lot string, reserve int64, durationBlocks int64, antiSnipe int64) int64 Inspect
Cancel : func(auctionID int64) Inspect
Bid : func(auctionID int64) Inspect
Close : func(auctionID int64) Inspect
Claim : func(amount int64) Inspect
ClaimAll : func() Inspect
SetFeeBps : func(bps int64) Inspect
SetFeeRecipient : func(recipient .uverse.address) Inspect
WithdrawFees : func() Inspect
SweepDenom : func(denom string) Inspect
TransferAdmin : func(successor .uverse.address) Inspect
AcceptAdmin : func() Inspect
AuctionInfo : func(auctionID int64) (seller .uverse.address, reserve int64, highBid int64, endHeight int64, antiSnipe int64, feeBps int64, createdHeight int64, highBidder .uverse.address, status string) Inspect
Lot : func(auctionID int64) string Inspect
MinNextBid : func(auctionID int64) int64 Inspect
HighBid : func(auctionID int64) int64 Inspect
HighBidder : func(auctionID int64) .uverse.address Inspect
Winner : func(auctionID int64) .uverse.address Inspect
EndHeight : func(auctionID int64) int64 Inspect
Reserve : func(auctionID int64) int64 Inspect
Status : func(auctionID int64) string Inspect
Seller : func(auctionID int64) .uverse.address Inspect
IsOpen : func(auctionID int64) bool Inspect
IsCloseable : func(auctionID int64) bool Inspect
BlocksLeft : func(auctionID int64) int64 Inspect
HasAuction : func(auctionID int64) bool Inspect
AuctionsOf : func(seller .uverse.address) int64 Inspect
Admin : func() .uverse.address Inspect
PendingAdmin : func() .uverse.address Inspect
FeeRecipient : func() .uverse.address Inspect
FeeBps : func() int64 Inspect
NumAuctions : func() int64 Inspect
ClaimableOf : func(a .uverse.address) int64 Inspect
FeesAccrued : func() int64 Inspect
Liabilities : func() int64 Inspect
Locked : func() int64 Inspect
Held : func() int64 Inspect
Address : func() .uverse.address Inspect
Height : func() int64 Inspect
minNextBid : func(a *auction.auction) int64 Inspect
mustAuction : func(id int64) *auction.auction Inspect
assertNoSend : func() Inspect
counter : func(tree *v0.Tree, a .uverse.address) *int64 Inspect
ceilDiv : func(a int64, b int64) int64 Inspect
addChecked : func(a int64, b int64) (int64, bool) Inspect
padID : func(id int64) string Inspect
itoa : func(n int64) string Inspect
boolStr : func(b bool) string Inspect
hasPrefix : func(s string, p string) bool Inspect
Render : func(path string) string Inspect
renderHome : func() string Inspect
renderAuction : func(idStr string) string Inspect
highBidderStr : func(a *auction.auction) string Inspect