Skip to content

[cleanup] Fixes for Move-2 #192

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

Merged
merged 4 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 4 additions & 3 deletions .github/workflows/move_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ jobs:
move-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dev dependencies.
run: ./sh_scripts/dev_setup.sh
- name: Install Aptos CLI
run: curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3
shell: bash
- uses: actions/checkout@v4
- name: Runs move tests.
run: ./sh_scripts/move_tests.sh
8 changes: 4 additions & 4 deletions core/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ aptos_names_funds = "_"
router_signer = "_"

[dependencies.AptosFramework]
git = 'https://github.com/aptos-labs/aptos-core.git'
git = 'https://github.com/aptos-labs/aptos-framework.git'
rev = 'mainnet'
subdir = 'aptos-move/framework/aptos-framework'
subdir = 'aptos-framework'

[dependencies.AptosToken]
git = 'https://github.com/aptos-labs/aptos-core.git'
git = 'https://github.com/aptos-labs/aptos-framework.git'
rev = 'mainnet'
subdir = 'aptos-move/framework/aptos-token'
subdir = 'aptos-token'
14 changes: 7 additions & 7 deletions core_v2/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ name = 'aptos_names_v2_1'
version = '1.0.0'

[addresses]
router_signer = "_"
aptos_names_v2_1 = "_"
aptos_names_admin = "_"
aptos_names_funds = "_"
router_signer = "_"

[dependencies.AptosFramework]
git = 'https://github.com/aptos-labs/aptos-core.git'
git = 'https://github.com/aptos-labs/aptos-framework.git'
rev = 'mainnet'
subdir = 'aptos-move/framework/aptos-framework'
subdir = 'aptos-framework'

[dependencies.AptosToken]
git = 'https://github.com/aptos-labs/aptos-core.git'
git = 'https://github.com/aptos-labs/aptos-framework.git'
rev = 'mainnet'
subdir = 'aptos-move/framework/aptos-token'
subdir = 'aptos-token'

[dependencies.AptosTokenObjects]
git = 'https://github.com/aptos-labs/aptos-core.git'
git = 'https://github.com/aptos-labs/aptos-framework.git'
rev = 'mainnet'
subdir = 'aptos-move/framework/aptos-token-objects'
subdir = 'aptos-token-objects'
2 changes: 1 addition & 1 deletion core_v2/sources/v2_1_domains.move
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ module aptos_names_v2_1::v2_1_domains {
public fun is_name_registerable(
domain_name: String,
subdomain_name: Option<String>,
): bool acquires DomainObject, NameRecord, SubdomainExt {
): bool acquires NameRecord, SubdomainExt {
// If this is a subdomain, ensure the domain also exists, and is not expired: i.e not registerable
// So if the domain name is registerable, we return false, as the subdomain is not registerable
if (is_subdomain(subdomain_name) && is_name_registerable(domain_name, option::none())) {
Expand Down
10 changes: 8 additions & 2 deletions distribute/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
name = 'aptos_names_distribute'
version = '1.0.0'

[addresses]
aptos_names = "_"
aptos_names_admin = "_"
aptos_names_funds = "_"
router_signer = "_"

[dependencies.aptos_names]
local = "../core"

[dependencies.AptosToken]
git = 'https://github.com/aptos-labs/aptos-core.git'
git = 'https://github.com/aptos-labs/aptos-framework.git'
rev = 'mainnet'
subdir = 'aptos-move/framework/aptos-token'
subdir = 'aptos-token'
19 changes: 13 additions & 6 deletions router/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@
name = 'router'
version = '1.0.0'

[addresses]
aptos_names = "_"
aptos_names_v2_1 = "_"
aptos_names_admin = "_"
aptos_names_funds = "_"
router_signer = "_"

[dependencies.aptos_names]
local = "../core"

[dependencies.aptos_names_v2_1]
local = "../core_v2"

[dependencies.AptosFramework]
git = 'https://github.com/aptos-labs/aptos-core.git'
git = 'https://github.com/aptos-labs/aptos-framework.git'
rev = 'mainnet'
subdir = 'aptos-move/framework/aptos-framework'
subdir = 'aptos-framework'

[dependencies.AptosToken]
git = 'https://github.com/aptos-labs/aptos-core.git'
git = 'https://github.com/aptos-labs/aptos-framework.git'
rev = 'mainnet'
subdir = 'aptos-move/framework/aptos-token'
subdir = 'aptos-token'

[dependencies.AptosTokenObjects]
git = 'https://github.com/aptos-labs/aptos-core.git'
git = 'https://github.com/aptos-labs/aptos-framework.git'
rev = 'mainnet'
subdir = 'aptos-move/framework/aptos-token-objects'
subdir = 'aptos-token-objects'
23 changes: 0 additions & 23 deletions sh_scripts/dev_setup.sh

This file was deleted.

18 changes: 9 additions & 9 deletions sh_scripts/move_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ APTOS_NAMES_V2_1="0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd
ADMIN="0x91945b4672607a327019e768dd6045d1254d1102d882df434ca734250bb3581d"
FUNDS="0x78ee3915e67ef5d19fa91d1e05e60ae08751efd12ce58e23fc1109de87ea7865"
ROUTER="0x867ed1f6bf916171b1de3ee92849b8978b7d1b9e0a8cc982a3d19d535dfd9c0c"
ROUTER_SIGNER=0x$(./aptos account derive-resource-account-address \
ROUTER_SIGNER=0x$(aptos account derive-resource-account-address \
--address $ROUTER \
--seed "ANS ROUTER" \
--seed-encoding utf8 | \
grep "Result" | \
sed -n 's/.*"Result": "\([^"]*\)".*/\1/p')
BULK="0x53febacc40e549ced4132bf3c3313076c3a81c631c8deda28cad871e34f6de0b"

./aptos move test \
aptos move test \
--package-dir core \
--named-addresses aptos_names=$APTOS_NAMES,aptos_names_admin=$ADMIN,aptos_names_funds=$FUNDS,router_signer=$ROUTER_SIGNER
./aptos move test \
--named-addresses aptos_names=$APTOS_NAMES,aptos_names_admin=$ADMIN,aptos_names_funds=$FUNDS,router_signer="$ROUTER_SIGNER"
aptos move test \
--package-dir core_v2 \
--named-addresses aptos_names=$APTOS_NAMES,aptos_names_v2_1=$APTOS_NAMES_V2_1,aptos_names_admin=$ADMIN,aptos_names_funds=$FUNDS,router=$ROUTER,router_signer=$ROUTER_SIGNER
./aptos move test \
--named-addresses aptos_names=$APTOS_NAMES,aptos_names_v2_1=$APTOS_NAMES_V2_1,aptos_names_admin=$ADMIN,aptos_names_funds=$FUNDS,router=$ROUTER,router_signer="$ROUTER_SIGNER"
aptos move test \
--package-dir router \
--named-addresses aptos_names=$APTOS_NAMES,aptos_names_v2_1=$APTOS_NAMES_V2_1,aptos_names_admin=$ADMIN,aptos_names_funds=$FUNDS,router=$ROUTER,router_signer=$ROUTER_SIGNER
./aptos move test \
--named-addresses aptos_names=$APTOS_NAMES,aptos_names_v2_1=$APTOS_NAMES_V2_1,aptos_names_admin=$ADMIN,aptos_names_funds=$FUNDS,router=$ROUTER,router_signer="$ROUTER_SIGNER"
aptos move test \
--package-dir bulk \
--named-addresses aptos_names=$APTOS_NAMES,aptos_names_v2_1=$APTOS_NAMES_V2_1,aptos_names_admin=$ADMIN,aptos_names_funds=$FUNDS,router=$ROUTER,router_signer=$ROUTER_SIGNER,bulk=$BULK
--named-addresses aptos_names=$APTOS_NAMES,aptos_names_v2_1=$APTOS_NAMES_V2_1,aptos_names_admin=$ADMIN,aptos_names_funds=$FUNDS,router=$ROUTER,router_signer="$ROUTER_SIGNER",bulk=$BULK
12 changes: 12 additions & 0 deletions transfer/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,17 @@
name = 'aptos_names_transfer'
version = '1.0.0'

[addresses]
aptos_names = "_"
aptos_names_admin = "_"
aptos_names_funds = "_"
router_signer = "_"

[dev-addresses]
aptos_names = "0x5555000"
aptos_names_admin = "0x5555002"
aptos_names_funds = "0x5555003"
router_signer = "0x5555004"

[dependencies.aptos_names]
local = "../core"
Loading