diff --git a/aea/cli/init.py b/aea/cli/init.py index fcbaf8eeba..0f52d26639 100644 --- a/aea/cli/init.py +++ b/aea/cli/init.py @@ -28,6 +28,7 @@ from aea.cli.login import do_login from aea.cli.register import do_register from aea.cli.registry.settings import ( + DEFAULT_IPFS_URL, DEFAULT_REGISTRY_CONFIG, REGISTRY_CONFIG_KEY, REGISTRY_LOCAL, @@ -54,7 +55,9 @@ @click.option("--no-subscribe", is_flag=True, help="For developers subscription.") @registry_flag(mark_default=False) @remote_registry_flag(mark_default=False) -@click.option("--ipfs-node", type=str, default=None, help="Multiaddr for IPFS node.") +@click.option( + "--ipfs-node", type=str, default=DEFAULT_IPFS_URL, help="Multiaddr for IPFS node." +) @pass_ctx def init( # pylint: disable=unused-argument ctx: Context, diff --git a/aea/cli/registry/settings.py b/aea/cli/registry/settings.py index 2cd5e1d1da..16b463377e 100644 --- a/aea/cli/registry/settings.py +++ b/aea/cli/registry/settings.py @@ -39,7 +39,9 @@ # but the name of the field in the configuration file. AUTH_TOKEN_KEY = "auth_token" # nosec -DEFAULT_IPFS_URL = "/ip4/127.0.0.1/tcp/5001" +DEFAULT_IPFS_URL = "/dns/registry.autonolas.tech/tcp/443/https" +DEFAULT_IPFS_URL_LOCAL = "/ip4/127.0.0.1/tcp/5001" + DEFAULT_REGISTRY_CONFIG: Dict = { "default": None, "settings": { diff --git a/plugins/aea-cli-ipfs/aea_cli_ipfs/core.py b/plugins/aea-cli-ipfs/aea_cli_ipfs/core.py index 80e10a89be..716cb305d4 100644 --- a/plugins/aea-cli-ipfs/aea_cli_ipfs/core.py +++ b/plugins/aea-cli-ipfs/aea_cli_ipfs/core.py @@ -33,7 +33,7 @@ ) from aea_cli_ipfs.registry import register_item_to_local_registry -from aea.cli.utils.config import load_item_config +from aea.cli.utils.config import get_ipfs_node_multiaddr, load_item_config from aea.configurations.constants import CONFIG_FILE_TO_PACKAGE_TYPE @@ -41,7 +41,7 @@ @click.pass_context def ipfs(click_context: click.Context) -> None: """IPFS Commands""" - ipfs_tool = IPFSTool() + ipfs_tool = IPFSTool(get_ipfs_node_multiaddr()) click_context.obj = ipfs_tool try: ipfs_tool.check_ipfs_node_running() diff --git a/plugins/aea-cli-ipfs/aea_cli_ipfs/registry.py b/plugins/aea-cli-ipfs/aea_cli_ipfs/registry.py index 87beae9c10..1c51e70bbf 100644 --- a/plugins/aea-cli-ipfs/aea_cli_ipfs/registry.py +++ b/plugins/aea-cli-ipfs/aea_cli_ipfs/registry.py @@ -30,7 +30,7 @@ from aea_cli_ipfs.exceptions import HashNotProvided from aea_cli_ipfs.ipfs_utils import DownloadError, IPFSTool, NodeError -from aea.cli.registry.settings import DEFAULT_IPFS_URL +from aea.cli.registry.settings import DEFAULT_IPFS_URL_LOCAL from aea.cli.utils.config import get_ipfs_node_multiaddr from aea.configurations.base import PublicId @@ -161,7 +161,7 @@ def fetch_ipfs( if remote: ipfs_tool = IPFSTool(get_ipfs_node_multiaddr()) else: - ipfs_tool = IPFSTool(addr=DEFAULT_IPFS_URL) + ipfs_tool = IPFSTool(addr=DEFAULT_IPFS_URL_LOCAL) try: package_hash = public_id.hash diff --git a/scripts/whitelist.py b/scripts/whitelist.py index 822b22239d..b6795a04c5 100644 --- a/scripts/whitelist.py +++ b/scripts/whitelist.py @@ -301,3 +301,4 @@ SERVICES # unused variable (aea/configurations/constants.py:57) DEFAULT_SERVICE_CONFIG_FILE # unused variable (aea/configurations/constants.py:65) _.get_method_data # unused method (aea/contracts/base.py:283) +DEFAULT_IPFS_URL_LOCAL # unused variable (aea/cli/registry/settings.py:43)