Skip to content

Commit

Permalink
Merge pull request #212 from valory-xyz/feat/default-ipfs-url
Browse files Browse the repository at this point in the history
Update default IPFS node address
  • Loading branch information
angrybayblade authored Jul 6, 2022
2 parents c3523e7 + a03acae commit 26d26b2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion aea/cli/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion aea/cli/registry/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions plugins/aea-cli-ipfs/aea_cli_ipfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
)
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


@click.group()
@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()
Expand Down
4 changes: 2 additions & 2 deletions plugins/aea-cli-ipfs/aea_cli_ipfs/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 26d26b2

Please sign in to comment.