-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add an initial implementation of a minimal TLD-operator #70
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, PTAL.
}; | ||
}; | ||
|
||
public shared ({ caller }) func register(domain : Text, records : RegistrationRecords) : async (RegisterResult) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure what is the purpose of the name
argument. The only thing we do with it right now is check that it matches the name of the domain record. Is there some future context that I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my understanding the reason for such a spec is to avoid too many structs: RegistrationRecords
contain DomainRecord
entries, which are also returned by lookup
in DomainLookup
, hence some redundancy (i.e. when registering a domain
one has to check that it matches DomainRecord.name
).
Alternatively, one could have a separate struct for registration, say DomainRecordWithoutName
, and then join domain
with that struct into DomainRecord
. I don't have a strong preference.
@keplervital, please correct if my understanding is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, PTAL.
}; | ||
}; | ||
|
||
public shared ({ caller }) func register(domain : Text, records : RegistrationRecords) : async (RegisterResult) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my understanding the reason for such a spec is to avoid too many structs: RegistrationRecords
contain DomainRecord
entries, which are also returned by lookup
in DomainLookup
, hence some redundancy (i.e. when registering a domain
one has to check that it matches DomainRecord.name
).
Alternatively, one could have a separate struct for registration, say DomainRecordWithoutName
, and then join domain
with that struct into DomainRecord
. I don't have a strong preference.
@keplervital, please correct if my understanding is wrong.
Add a Motoko-implementation of a minimal TLD-operator. This initial implementation has a hard-coded TLD (
.icp
), which will be changed to a configurable init-parameter at a later point.TT-511