Domain Operations

Contract: NameRegistry.CheckAddress

Checks that there is a valid domain record with the specified name and the address.
Entrypoint: check_address
Parameter
Type
Description
name
bytes
The UTF-8 encoded name to check.
address
address
The expected address.
CameLIGO
Michelson
1
type check_address_param = [@layout:comb] {
2
name: bytes;
3
address: address
4
}
5
6
(* Checks that a name corresponds to an address. *)
7
| Check_address of check_address_param
Copied!
1
parameter (or
2
(pair %check_address
3
(bytes %name)
4
(address %address)
5
# ... more entrypoints outside of this interoperability spec
6
);
Copied!
Error
Description
AMOUNT_NOT_ZERO
The transferred amount of tez is not zero.
NAME_ADDRESS_MISMATCH
There is no valid domain record with the specified name or it resolves to an address different from the expected one.

Contract: NameRegistry.ClaimReverseRecord

Claims a reverse record corresponding to a domain (a forward record). The claimed reverse record will map the sender's address to the specified domain name.
Entrypoint: claim_reverse_record
Parameter
Type
Description
name
bytes
The UTF-8 encoded name to claim.
owner
address
The owner of the record allowed to make changes.
CameLIGO
1
type claim_reverse_record_param = [@layout:comb] {
2
name: bytes option;
3
owner: address;
4
}
5
6
| Claim_reverse_record of claim_reverse_record_param
Copied!
Error
Description
AMOUNT_NOT_ZERO
The transferred amount of tez is not zero.
NAME_ADDRESS_MISMATCH
There is no domain record with the specified name or it resolves to an address different from the sender's address.

Contract: NameRegistry.SetChildRecord

Creates or overwrites an existing domain record. The current sender must be the owner of the parent record.
If there was an existing corresponding reverse record referencing this domain and the address of this domain changed, the reverse record's name will be updated to None to preserve consistency.
Entrypoint: set_child_record
Parameter
Type
Description
label
bytes
The UTF-8 encoded label.
parent
bytes
The UTF-8 encoded parent domain.
address
address option
The optional address the record resolves to.
owner
address
The owner of the record allowed to make changes.
data
(string, bytes) map
A map of any additional data clients wish to store with the domain.
expiry
timestamp option
The expiry of this record. Only applicable to second-level domains as all higher-level domains share the expiry of their ancestor 2LD.
CameLIGO
1
type set_child_record_param = [@layout:comb] {
2
label: bytes;
3
parent: bytes;
4
address: address option;
5
owner: address;
6
data: (string, bytes) map;
7
expiry: timestamp option;
8
}
9
10
| Set_child_record of set_child_record_param
Copied!
Error
Description
AMOUNT_NOT_ZERO
The transferred amount of tez is not zero.
PARENT_NOT_FOUND
There is no record for the specified parent domain.
NOT_AUTHORIZED
The current sender is not the current record owner.
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.

Contract: NameRegistry.UpdateRecord

Updates an existing domain record. The current sender must be its owner.
If there was an existing corresponding reverse record referencing this domain and the address of this domain changed, the reverse record's name will be updated to None to preserve consistency.
Entrypoint: update_record
Parameter
Type
Description
name
bytes
The UTF-8 encoded name of the domain to update.
address
address option
The optional new address the record resolves to.
owner
address
The new owner of the record allowed to make changes.
data
(string, bytes) map
The new map of any additional data that clients wish to store with the domain.
CameLIGO
1
type update_record_param = [@layout:comb] {
2
name: bytes;
3
address: address option;
4
owner: address;
5
data: (string, bytes) map;
6
}
7
8
| Update_record of update_record_param
Copied!
Error
Description
AMOUNT_NOT_ZERO
The transferred amount of tez is not zero.
RECORD_NOT_FOUND
There is no domain record for the specified name.
NOT_AUTHORIZED
The current sender is not the current record owner.

Contract: NameRegistry.UpdateReverseRecord

Updates an existing reverse record. The current sender must be its owner. There must be a corresponding domain record.
Entrypoint: claim_reverse_record
Parameter
Type
Description
address
address
The address of the reverse record to update.
name
bytes option
The new UTF-8 encoded name the record resolves to.
owner
address
The owner of the record allowed to make changes.
CameLIGO
1
type update_reverse_record_param = [@layout:comb] {
2
address: address;
3
name: bytes option;
4
owner: address;
5
}
6
7
| Update_reverse_record of update_reverse_record_param
Copied!
Error
Description
AMOUNT_NOT_ZERO
The transferred amount of tez is not zero.
RECORD_NOT_FOUND
There is no reverse record with the specified address.
NOT_AUTHORIZED
The current sender is not the current record owner.
NAME_ADDRESS_MISMATCH
There is no domain record with the specified name or it resolves to a different address. This can occur only if the name is specified.
Last modified 6mo ago