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 README to DNS example #1542

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions examples/dns/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# DNS Smart contract

The DNS smart contract is our showcase for executing other smart contracts on-chain.
Copy link
Contributor

Choose a reason for hiding this comment

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

This contract doesn't execute any other contracts, it's self contained

Copy link
Author

Choose a reason for hiding this comment

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

Sure, changed it




> This is a port from the blog post's ink! 1.0 based version of the contract to ink! 2.0.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not relevant, and is also outdated. Our current stable release is ink! 3.0, and the contract compiles with the ink! 4.0-beta.

Copy link
Author

Choose a reason for hiding this comment

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

Okay, I've mentioned it in the readme. Also, I will try compiling it against 4.0 beta


Domain name service contract inspired by
[this blog post on medium](https://medium.com/@chainx_org/secure-and-decentralized-polkadot-domain-name-system-e06c35c2a48d).

### Description
The main function of this contract is domain name resolution which refers to the retrieval of numeric values corresponding to readable and easily memorable names such as "polka.dot" which can be used to facilitate transfers, voting and DApp-related operations instead of resorting to long IP addresses that are hard to remember.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you update this to maybe show an example of how this translation would work?

Copy link
Author

Choose a reason for hiding this comment

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

This exact paragraph was written in the comments itself of dns.sol and I've grabbed it from the file. But I think we can make it more clear and show what are the parameters this contract uses.

<br>

![Image](dns_diagram.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the diagram. Can you make a examples/dns/.images folder and put it in there instead?


## Functionalities provided:

- Registration of a new Domain Name
- Transfer the (already exsiting) owner to new Address
- Change the Domain Name

### Other functionalities to be implemented:
- Transfer bidding
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think anybody is going to update this example tbh

Copy link
Author

Choose a reason for hiding this comment

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

Sure, I'll remove it then for now


> __Note:__<br/>
> Depending on your Substrate version you might encounter [a ink_lang dependency error](https://github.com/paritytech/ink/issues/506) which is yet to address.
Copy link
Contributor

Choose a reason for hiding this comment

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

Where did you get this? This issue has been closed for 2+ years

Copy link
Author

Choose a reason for hiding this comment

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

I came across this when compiling the contract. While compiling it gives an error of 'ink_lang'
image

But as mentioned above I was compiling it using the 3.0 version.






Irene-123 marked this conversation as resolved.
Show resolved Hide resolved
Binary file added examples/dns/dns_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.