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

[WIP] Adds reverse lookup support (primary name) #4

Merged
merged 16 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
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
4 changes: 2 additions & 2 deletions core/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ aptos_names_funds = "0x78ee3915e67ef5d19fa91d1e05e60ae08751efd12ce58e23fc1109de8

[dependencies.AptosFramework]
git = 'https://github.com/aptos-labs/aptos-core.git'
rev = 'main'
rev = 'mainnet'
Copy link
Contributor

Choose a reason for hiding this comment

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

Why change this from main to mainnet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ran into build error when using main.

Copy link
Contributor

Choose a reason for hiding this comment

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

What were the errors you ran into?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Check out the github action presubmit from right before my commit which updates this file: https://github.com/aptos-labs/aptos-names-contracts/actions/runs/3705462363/jobs/6279398045

Copy link
Contributor

Choose a reason for hiding this comment

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

That's strange 🤔 Can you try framework-mainnet instead of mainnet? This is the separate branch to track mainnet Move binaries.

subdir = 'aptos-move/framework/aptos-framework'

[dependencies.AptosToken]
git = 'https://github.com/aptos-labs/aptos-core.git'
rev = 'main'
rev = 'mainnet'
subdir = 'aptos-move/framework/aptos-token'
15 changes: 15 additions & 0 deletions core/sources/domain_e2e_tests.move
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,19 @@ module aptos_names::domain_e2e_tests {
// Take the domain name for much longer than users are allowed to register it for
domains::force_create_or_seize_name(rando, option::none(), test_helper::domain_name(), test_helper::two_hundred_year_secs());
}

#[test(myself = @aptos_names, user = @0x077, aptos = @0x1, rando = @0x266f, foundation = @0xf01d)]
fun clear_name_happy_path_e2e_test(myself: &signer, user: signer, aptos: signer, rando: signer, foundation: signer) {
let users = test_helper::e2e_test_setup(myself, user, &aptos, rando, &foundation);
let user = vector::borrow(&users, 0);
let user_addr = signer::address_of(user);

// Register the domain
test_helper::register_name(user, option::none(), test_helper::domain_name(), test_helper::one_year_secs(), test_helper::fq_domain_name(), 1, vector::empty<u8>());

// Clear my reverse lookup.
domains::clear_reverse_lookup(user);

assert!(option::is_none(&domains::get_reverse_lookup(user_addr)), 1);
}
}
Loading