diff --git a/.github/workflows/move_tests.yaml b/.github/workflows/move_tests.yaml index 8fd339ee..dc0c4a6d 100644 --- a/.github/workflows/move_tests.yaml +++ b/.github/workflows/move_tests.yaml @@ -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 diff --git a/core/Move.toml b/core/Move.toml index b652c816..fcac1899 100644 --- a/core/Move.toml +++ b/core/Move.toml @@ -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' diff --git a/core_v2/Move.toml b/core_v2/Move.toml index 09a5b1c8..84055903 100644 --- a/core_v2/Move.toml +++ b/core_v2/Move.toml @@ -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' diff --git a/core_v2/sources/v2_1_domains.move b/core_v2/sources/v2_1_domains.move index 01ada218..6139d1c9 100644 --- a/core_v2/sources/v2_1_domains.move +++ b/core_v2/sources/v2_1_domains.move @@ -1056,7 +1056,7 @@ module aptos_names_v2_1::v2_1_domains { public fun is_name_registerable( domain_name: String, subdomain_name: Option, - ): 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())) { diff --git a/distribute/Move.toml b/distribute/Move.toml index 9cd6fe42..f9a7d914 100644 --- a/distribute/Move.toml +++ b/distribute/Move.toml @@ -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' diff --git a/router/Move.toml b/router/Move.toml index b6b7f9c8..e5f44de1 100644 --- a/router/Move.toml +++ b/router/Move.toml @@ -2,6 +2,13 @@ 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" @@ -9,16 +16,16 @@ local = "../core" 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' diff --git a/sh_scripts/dev_setup.sh b/sh_scripts/dev_setup.sh deleted file mode 100755 index dfdb09ac..00000000 --- a/sh_scripts/dev_setup.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -set -e - -echo "##### Installing aptos cli dependencies #####" -sudo apt-get update -sudo apt-get install libssl-dev - -echo "##### Installing aptos cli #####" -if ! command -v aptos &>/dev/null; then - echo "aptos could not be found" - echo "installing it..." - TARGET=Ubuntu-x86_64 - VERSION=4.2.1 - wget https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-v$VERSION/aptos-cli-$VERSION-$TARGET.zip - unzip aptos-cli-$VERSION-$TARGET.zip - chmod +x aptos -else - echo "aptos already installed" -fi - -echo "##### Info #####" -./aptos info diff --git a/sh_scripts/move_tests.sh b/sh_scripts/move_tests.sh index 0d6b93c0..838abf65 100755 --- a/sh_scripts/move_tests.sh +++ b/sh_scripts/move_tests.sh @@ -8,7 +8,7 @@ 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 | \ @@ -16,15 +16,15 @@ ROUTER_SIGNER=0x$(./aptos account derive-resource-account-address \ 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 diff --git a/transfer/Move.toml b/transfer/Move.toml index 22e9605b..6498a60b 100644 --- a/transfer/Move.toml +++ b/transfer/Move.toml @@ -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"