Skip to content
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

add reverse record #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cloud8little
Copy link
Contributor

@cloud8little cloud8little commented Jun 16, 2022

  1. add setReverseRecord method, if there is any domain name ever set TXT record with this address, set successful. if the domain name is expired, set failed.
  2. add getReverseRecord method, if there is any domain name ever set TXT record with this address, and setReverseRecord already, get the name. if the domain name is expired, get failed.
  3. when register for expired token, clear the reverse record.

StorageContext context = Storage.CurrentContext;
StorageMap reverseMap = new(context, Prefix_ReverseRecord);
string record = GetRecord(name, RecordType.TXT);
if (record == owner.ToAddress(53))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to use the protocol settings value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to use the protocol settings value

how to get the settings value from smart contract?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.Runtime.GetAddressVersion

@cloud8little cloud8little changed the title add reverse record and clear records of expired token add reverse record Jun 17, 2022
@gsmachado gsmachado mentioned this pull request Oct 27, 2022
@cschuchardt88
Copy link
Member

Any update on this?

@Jim8y
Copy link

Jim8y commented Dec 17, 2023

@cloud8little any plan to complete this?

@cloud8little
Copy link
Contributor Author

@cloud8little any plan to complete this?

We have a seperate smart contract to analyze the reverse record now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants