Auction Operations

Contract: TLDRegistrar.Bid

Places a new highest bid on a domain that is currently in auction. The bid will record the indicated amount and the sender as the new highest bidder. The bid amount has to be higher than round_to_nearest_tenth(previous_highest_bid * (100 + min_bid_increase_ratio) / 100).

Additionally:

  • If there is a previous highest bid, it is replaced and its amount is credited to the previous highest bidder.

  • Any excess amount sent with the bid is credited to the sender.

  • If the current auction end is lower than NOW + bid_additional_period, it is updated to NOW + bid_additional_period.

Entrypoint: bid

Amount restriction: The amount sent in this transaction plus the in-contract balance of the sender has to be higher or equal to the bid amount.

Parameter

Type

Description

label

bytes

The UTF-8 encoded label the bid relates to.

bid

tez

Ownership duration represented in days.

CamelLIGO
CamelLIGO
type bid_param = [@layout:comb] {
label: bytes;
bid: tez;
}
| Bid of bid_param

Error

Description

AUCTION_ENDED

The auction has already ended.

LABEL_TAKEN

The requested label already exists and it is not expired.

LABEL_NOT_AVAILABLE

The requested label is currently not available for registration.

INVALID_LABEL

The given label is not valid. See Label Validation.

LABEL_EMPTY

The given label is empty.

LABEL_TOO_LONG

The label is too long.

NAME_TOO_LONG

The name (label + parent) is too long.

BID_TOO_LOW

The bid amount does not meet the requirement for a new highest bid.

AMOUNT_TOO_LOW

The amount sent (plus the in-contract balance) does not cover the bid.

Contract: TLDRegistrar.Settle

Settles an auction that has ended. Removes the auction record and assigns the domain to the new owner. This call can only be made by the auction's highest bidder.

The settlement period must not be expired, i.e. this call will only succeed during the period of min_duration days after an auction end.

Entrypoint: settle

Parameter

Type

Description

label

bytes

The UTF-8 encoded label of the second-level domain to buy.

owner

address

The new owner of the given domain.

address

address option

The optional address the given domain resolves to.

data

(string, bytes) map

A map of any additional data clients wish to store with the given domain.

CamelLIGO
CamelLIGO
type settle_param = [@layout:comb] {
label: bytes;
owner: address;
address: address option;
data: data_map;
}
| Settle of settle_param

Error

Description

LABEL_TAKEN

The requested label already exists and it is not expired.

LABEL_NOT_AVAILABLE

The requested label is currently not available for registration.

NOT_SETTLEABLE

The settlement period is over or there is no such auction.

NOT_AUTHORIZED

The call has not been made by the auction's highest bidder.

AMOUNT_NOT_ZERO

The transferred amount of tez is not zero.

Contract: TLDRegistrar.Withdraw

Makes a withdrawal of the caller's full in-contract balance. If the caller has no in-contract balance, the operation does nothing.

Entrypoint: withdraw

Type

Description

address

The address the caller's balance should be sent to.

CamelLIGO
CamelLIGO
type withdraw_param = address
| Widthdraw of withdraw_param

Error

Description

INVALID_RECIPIENT

The recipient address is invalid.

AMOUNT_NOT_ZERO

The transferred amount of tez is not zero.