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 get_owner() msg to *DNS* contract #1118

Merged
merged 1 commit into from
Feb 1, 2022

Conversation

agryaznov
Copy link
Contributor

As domain name is a tradable entity, there should be a way to get its current owner in a UI-friendly way, to ensure that the seller (which could be a contract) owns the domain being sold.

For that, get_owner() message is proposed.

Case study:

Let say a domain name is being put on a candle auction. Before trading starts, the domain owner should transfer the domain to the auction contract instance. Bidders need some method to check that the auction contract has the ownership of the domain in question. For that, they would use this get_owner() message.

@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2022

Codecov Report

Merging #1118 (49a6775) into master (7721622) will increase coverage by 0.32%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1118      +/-   ##
==========================================
+ Coverage   75.34%   75.67%   +0.32%     
==========================================
  Files         252      252              
  Lines        9395     9395              
==========================================
+ Hits         7079     7110      +31     
+ Misses       2316     2285      -31     
Impacted Files Coverage Δ
...ates/storage/src/collections/hashmap/fuzz_tests.rs 95.74% <0.00%> (+2.12%) ⬆️
crates/engine/src/ext.rs 72.41% <0.00%> (+6.89%) ⬆️
crates/engine/src/test_api.rs 94.04% <0.00%> (+20.23%) ⬆️
crates/primitives/src/key_ptr.rs 100.00% <0.00%> (+25.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7721622...49a6775. Read the comment docs.

@paritytech-cicd-pr
Copy link

🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑

These are the results when building the examples/* contracts from this branch with cargo-contract 0.17.0-06c5598 and comparing them to ink! master:

Δ Optimized Size Δ Used Gas Total Optimized Size Total Used Gas
accumulator 1.44 K
adder 2.94 K
contract-terminate 1.31 K 200_778
contract-transfer 7.98 K 1_399
delegator 10.06 K 9_510
dns +0.31 K +327 10.78 K 14_615
erc1155 27.50 K 47_811
erc20 10.22 K 9_757
erc721 13.70 K 34_702
flipper 1.76 K 347
incrementer 1.64 K 340
multisig 28.56 K 54_896
proxy 3.81 K 2_629
rand-extension 5.12 K 6_654
subber 2.96 K
trait-erc20 10.52 K 10_644
trait-flipper 1.53 K 342
trait-incrementer 1.62 K 680

Link to the run | Last update: Mon Jan 31 10:17:11 CET 2022

Copy link
Collaborator

@cmichi cmichi left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@cmichi cmichi merged commit 903abeb into use-ink:master Feb 1, 2022
@agryaznov agryaznov deleted the get_dns_owner branch February 1, 2022 12:14
xgreenx pushed a commit to Supercolony-net/ink that referenced this pull request Feb 8, 2022
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.

None yet

4 participants