Skip to content

Commit

Permalink
chore: update links (#527)
Browse files Browse the repository at this point in the history
* chore: update explore links
* chore: update explore command and docs
  • Loading branch information
neilcampbell authored Jun 25, 2024
1 parent 2c7999d commit 4391a50
Show file tree
Hide file tree
Showing 39 changed files with 108 additions and 118 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ AlgoKit helps you develop Algorand solutions:
- **Interaction**: AlgoKit exposes a number of interaction methods, namely:
- [**AlgoKit CLI**](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/algokit.md): A Command Line Interface (CLI) so you can quickly access AlgoKit capabilities
- [VS Code](https://code.visualstudio.com/): All AlgoKit project templates include VS Code configurations so you have a smooth out-of-the-box development experience using VS Code
- [Dappflow](https://dappflow.org/): AlgoKit has integrations with Dappflow; a web-based user interface that let's you visualise an Algorand network and deploy and call smart contracts via a graphical user interface
- [lora](https://lora.algokit.io/): AlgoKit has integrations with lora; a web-based user interface that let's you visualise and interact with an Algorand network
- **Getting Started**: AlgoKit helps you get started quickly when building new solutions:
- [**AlgoKit Templates**](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/init.md): Template libraries to get you started faster and quickly set up a productive dev experience
- **Development**: AlgoKit provides SDKs, tools and libraries that help you quickly and effectively build high quality Algorand solutions:
Expand Down Expand Up @@ -247,6 +247,6 @@ Per the above output, the doctor command output is a helpful tool if you need to

## Troubleshooting

| Issue Description | OS(s) | Steps to mitigate |
| Issue Description | OS(s) | Steps to mitigate |
| --------------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SSL module not available in Python installation, causing `pipx install algokit` to fail | Debian 12 | Run `pipx install algokit --python $(which python3)` to explicitly use the Python 3 version with SSL support. Ensure that latest pip version is installed, update `python` alias if needed. |
2 changes: 1 addition & 1 deletion docs/algokit.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For details on how to use individual features see the following
- [Deploy](./features/project/deploy.md) - Deploy your smart contracts effortlessly to various networks
- [Dispenser](./features/dispenser.md) - Fund your TestNet account with ALGOs from the AlgoKit TestNet Dispenser
- [Doctor](./features/doctor.md) - Check AlgoKit installation and dependencies
- [Explore](./features/explore.md) - Explore Algorand Blockchains using Dappflow
- [Explore](./features/explore.md) - Explore Algorand Blockchains using lora
- [Generate](./features/generate.md) - Generate code for an Algorand project
- [Goal](./features/goal.md) - Run the Algorand goal CLI against the AlgoKit Sandbox
- [Init](./features/init.md) - Quickly initialize new projects using official Algorand Templates or community provided templates
Expand Down
6 changes: 3 additions & 3 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ Copy the contents of the doctor message (in Markdown format) in your clipboard.

## explore

Explore the specified network in the browser using Dappflow.
Explore the specified network using lora.

```shell
algokit explore [OPTIONS] [[localnet|testnet|mainnet]]
Expand Down Expand Up @@ -754,15 +754,15 @@ algokit localnet console [OPTIONS]

### explore

Explore the AlgoKit LocalNet using Dappflow
Explore the AlgoKit LocalNet using lora.

```shell
algokit localnet explore [OPTIONS]
```

### logs

See the output of the Docker containers
See the output of the Docker containers.

```shell
algokit localnet logs [OPTIONS]
Expand Down
8 changes: 4 additions & 4 deletions docs/features/explore.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# AlgoKit explore

AlgoKit provides a quick shortcut to [explore](../cli/index.md#explore) various Algorand networks using [Dappflow](https://app.dappflow.org/) including [AlogKit LocalNet](./localnet.md)!
AlgoKit provides a quick shortcut to [explore](../cli/index.md#explore) various Algorand networks using [lora](https://lora.algokit.io/) including [AlgoKit LocalNet](./localnet.md)!

## LocalNet

The following three commands are all equivalent and will open Dappflow pointing to the local [AlgoKit LocalNet](./localnet.md) instance:
The following three commands are all equivalent and will open lora pointing to the local [AlgoKit LocalNet](./localnet.md) instance:

- `algokit explore`
- `algokit explore localnet`
- `algokit localnet explore`

## Testnet

`algokit explore testnet` will open Dappflow pointing to TestNet via the <https://testnet-api.algonode.cloud> [node](https://algonode.io/api/).
`algokit explore testnet` will open lora pointing to TestNet via the <https://testnet-api.algonode.cloud> [node](https://algonode.io/api/).

## Mainnet

`algokit explore mainnet` will open Dappflow pointing to MainNet via the <https://mainnet-api.algonode.cloud> [node](https://algonode.io/api/).
`algokit explore mainnet` will open lora pointing to MainNet via the <https://mainnet-api.algonode.cloud> [node](https://algonode.io/api/).

To learn more about the `algokit explore` command, please refer to [explore](../cli/index.md#explore) in the AlgoKit CLI reference documentation.
24 changes: 1 addition & 23 deletions src/algokit/cli/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,26 +100,4 @@ def get_explorer_url(identifier: str | int, network: str, entity_type: ExplorerE
ValueError: If the network or explorer type is invalid.
"""

base_urls: dict[str, dict[str, str]] = {
"testnet": {
ExplorerEntityType.TRANSACTION.value: "https://testnet.explorer.perawallet.app/tx/",
ExplorerEntityType.ASSET.value: "https://testnet.explorer.perawallet.app/asset/",
ExplorerEntityType.ADDRESS.value: "https://testnet.explorer.perawallet.app/address/",
},
"mainnet": {
ExplorerEntityType.TRANSACTION.value: "https://explorer.perawallet.app/tx/",
ExplorerEntityType.ASSET.value: "https://explorer.perawallet.app/asset/",
ExplorerEntityType.ADDRESS.value: "https://explorer.perawallet.app/tx/address/",
},
}

if network == "localnet":
return f"https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/{entity_type.value}/{identifier}/"

if network not in base_urls:
raise ValueError(f"Invalid network: {network}")

if entity_type.value not in base_urls[network]:
raise ValueError(f"Invalid explorer type: {entity_type}")

return base_urls[network][entity_type.value] + str(identifier)
return f"https://explore.algokit.io/{network}/{entity_type.value}/{identifier}"
18 changes: 15 additions & 3 deletions src/algokit/cli/explore.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,26 @@ class NetworkConfiguration(NetworkConfigurationRequired, total=False):
}


# lora doesn't currently support custom networks, so use Dappflow for now.
def get_dappflow_url(network: NetworkConfiguration) -> str:
query_string = urlencode(network)
return f"https://app.dappflow.org/setup-config?{query_string}"


@click.command("explore", help="Explore the specified network in the browser using Dappflow.")
def get_algokit_url(network: str) -> str:
return f"https://explore.algokit.io/{network}"


def get_explore_url(network: str) -> str:
if network == "localnet" and NETWORKS[network].get("algod_url") != DEFAULT_ALGOD_SERVER:
return get_dappflow_url(NETWORKS[network])

return get_algokit_url(network)


@click.command("explore", help="Explore the specified network using lora.")
@click.argument("network", type=click.Choice(list(NETWORKS)), default="localnet", required=False)
def explore_command(network: str) -> None:
url = get_dappflow_url(NETWORKS[network])
logger.info(f"Opening {network} in https://app.dappflow.org using default browser")
url = get_explore_url(network)
logger.info(f"Opening {network} explorer in your default browser")
click.launch(url)
4 changes: 2 additions & 2 deletions src/algokit/cli/localnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@ def localnet_console(context: click.Context) -> None:
context.invoke(goal_command, console=True)


@localnet_group.command("explore", short_help="Explore the AlgoKit LocalNet using Dappflow")
@localnet_group.command("explore", short_help="Explore the AlgoKit LocalNet using lora.")
@click.pass_context
def localnet_explore(context: click.Context) -> None:
context.invoke(explore_command)


@localnet_group.command(
"logs",
short_help="See the output of the Docker containers",
short_help="See the output of the Docker containers.",
)
@click.option(
"--follow/-f",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DEBUG: HTTP Request: POST https://snapshottest.dispenser.com/fund/0 "HTTP/1.1 200 OK"
Successfully funded 1000000 μAlgo. Browse transaction at https://testnet.explorer.perawallet.app/tx/dummy_tx_id
Successfully funded 1000000 μAlgo. Browse transaction at https://explore.algokit.io/testnet/transaction/dummy_tx_id
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DEBUG: HTTP Request: POST https://snapshottest.dispenser.com/fund/0 "HTTP/1.1 200 OK"
Successfully funded 1000000 μAlgo. Browse transaction at https://testnet.explorer.perawallet.app/tx/dummy_tx_id
Successfully funded 1000000 μAlgo. Browse transaction at https://explore.algokit.io/testnet/transaction/dummy_tx_id
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DEBUG: Converted algos to microAlgos: 1000000
DEBUG: HTTP Request: POST https://snapshottest.dispenser.com/fund/0 "HTTP/1.1 200 OK"
Successfully funded 1.0 Algo. Browse transaction at https://testnet.explorer.perawallet.app/tx/dummy_tx_id
Successfully funded 1.0 Algo. Browse transaction at https://explore.algokit.io/testnet/transaction/dummy_tx_id
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DEBUG: Using CI access token over keyring credentials
DEBUG: HTTP Request: POST https://snapshottest.dispenser.com/fund/0 "HTTP/1.1 200 OK"
Successfully funded 1000000 μAlgo. Browse transaction at https://testnet.explorer.perawallet.app/tx/dummy_tx_id
Successfully funded 1000000 μAlgo. Browse transaction at https://explore.algokit.io/testnet/transaction/dummy_tx_id
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEBUG: Converted algos to microAlgos: 1000000
DEBUG: Using CI access token over keyring credentials
DEBUG: HTTP Request: POST https://snapshottest.dispenser.com/fund/0 "HTTP/1.1 200 OK"
Successfully funded 1.0 Algo. Browse transaction at https://testnet.explorer.perawallet.app/tx/dummy_tx_id
Successfully funded 1.0 Algo. Browse transaction at https://explore.algokit.io/testnet/transaction/dummy_tx_id
4 changes: 2 additions & 2 deletions tests/explore/test_explore.test_explore.localnet.approved.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Opening localnet in https://app.dappflow.org using default browser
Opening localnet explorer in your default browser
----
launch args:
----
call('https://app.dappflow.org/setup-config?algod_url=http%3A%2F%2Flocalhost&indexer_url=http%3A%2F%2Flocalhost&algod_port=4001&algod_token=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&indexer_port=8980&indexer_token=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&kmd_token=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&kmd_port=4002&kmd_url=http%3A%2F%2Flocalhost')
call('https://explore.algokit.io/localnet')
4 changes: 2 additions & 2 deletions tests/explore/test_explore.test_explore.mainnet.approved.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Opening mainnet in https://app.dappflow.org using default browser
Opening mainnet explorer in your default browser
----
launch args:
----
call('https://app.dappflow.org/setup-config?algod_url=https%3A%2F%2Fmainnet-api.algonode.cloud&indexer_url=https%3A%2F%2Fmainnet-idx.algonode.cloud')
call('https://explore.algokit.io/mainnet')
4 changes: 2 additions & 2 deletions tests/explore/test_explore.test_explore.testnet.approved.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Opening testnet in https://app.dappflow.org using default browser
Opening testnet explorer in your default browser
----
launch args:
----
call('https://app.dappflow.org/setup-config?algod_url=https%3A%2F%2Ftestnet-api.algonode.cloud&indexer_url=https%3A%2F%2Ftestnet-idx.algonode.cloud')
call('https://explore.algokit.io/testnet')
4 changes: 2 additions & 2 deletions tests/localnet/test_localnet.test_localnet_help.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Commands:
console Run the Algorand goal CLI against the AlgoKit LocalNet via a Bash
console so you can execute multiple goal commands and/or interact
with a filesystem.
explore Explore the AlgoKit LocalNet using Dappflow
logs See the output of the Docker containers
explore Explore the AlgoKit LocalNet using lora.
logs See the output of the Docker containers.
reset Reset the AlgoKit LocalNet.
start Start the AlgoKit LocalNet.
status Check the status of the AlgoKit LocalNet.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Performing opt-in. This may take a few seconds...
Successfully performed opt-in.
Check opt-in status for asset 123 at: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/asset/dummy_txn_id/
Check opt-in status for asset 123 at: https://explore.algokit.io/localnet/asset/dummy_txn_id
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Enter the mnemonic phrase (25 words separated by whitespace):
Performing opt-in. This may take a few seconds...
Successfully performed opt-in.
Check opt-in status for asset 123 at: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/asset/dummy_txn_id/
Check opt-in status for asset 123 at: https://explore.algokit.io/localnet/asset/dummy_txn_id
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Enter the mnemonic phrase (25 words separated by whitespace):
Performing opt-out. This may take a few seconds...
Successfully performed opt-out.
Check opt-in status for asset 123 at: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/transaction/dummy_txn_id/
Check opt-in status for asset 123 at: https://explore.algokit.io/localnet/transaction/dummy_txn_id
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Enter the mnemonic phrase (25 words separated by whitespace):
Performing opt-out. This may take a few seconds...
Successfully performed opt-out.
Check opt-in status for asset 123 at: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/transaction/dummy_txn_id/
Check opt-in status for asset 123 at: https://explore.algokit.io/localnet/transaction/dummy_txn_id
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Performing opt-out. This may take a few seconds...
Successfully performed opt-out.
Check opt-in status for asset 123 at: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/transaction/dummy_txn_id/
Check opt-in status for asset 123 at: https://explore.algokit.io/localnet/transaction/dummy_txn_id
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ DEBUG: Asset config params: {
}

Successfully minted the asset!
Browse your asset at: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/asset/123/
Check transaction status at: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/transaction/dummy_tx_id/
Browse your asset at: https://explore.algokit.io/localnet/asset/123
Check transaction status at: https://explore.algokit.io/localnet/transaction/dummy_tx_id
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ DEBUG: Asset config params: {
}

Successfully minted the asset!
Browse your asset at: https://explorer.perawallet.app/asset/123
Check transaction status at: https://explorer.perawallet.app/tx/dummy_tx_id
Browse your asset at: https://explore.algokit.io/mainnet/asset/123
Check transaction status at: https://explore.algokit.io/mainnet/transaction/dummy_tx_id
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ DEBUG: Asset config params: {
}

Successfully minted the asset!
Browse your asset at: https://testnet.explorer.perawallet.app/asset/123
Check transaction status at: https://testnet.explorer.perawallet.app/tx/dummy_tx_id
Browse your asset at: https://explore.algokit.io/testnet/asset/123
Check transaction status at: https://explore.algokit.io/testnet/transaction/dummy_tx_id
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ DEBUG: Asset config params: {
}

Successfully minted the asset!
Browse your asset at: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/asset/123/
Check transaction status at: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/transaction/dummy_tx_id/
Browse your asset at: https://explore.algokit.io/localnet/asset/123
Check transaction status at: https://explore.algokit.io/localnet/transaction/dummy_tx_id
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ DEBUG: Asset config params: {
}

Successfully minted the asset!
Browse your asset at: https://explorer.perawallet.app/asset/123
Check transaction status at: https://explorer.perawallet.app/tx/dummy_tx_id
Browse your asset at: https://explore.algokit.io/mainnet/asset/123
Check transaction status at: https://explore.algokit.io/mainnet/transaction/dummy_tx_id
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ DEBUG: Asset config params: {
}

Successfully minted the asset!
Browse your asset at: https://testnet.explorer.perawallet.app/asset/123
Check transaction status at: https://testnet.explorer.perawallet.app/tx/dummy_tx_id
Browse your asset at: https://explore.algokit.io/testnet/asset/123
Check transaction status at: https://explore.algokit.io/testnet/transaction/dummy_tx_id
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Transaction group successfully sent with txid: dummy_tx_id
Check transaction group status at: https://app.dappflow.org/setnetwork?name=sandbox&redirect=explorer/transaction/dummy_tx_id/
Check transaction group status at: https://explore.algokit.io/localnet/transaction/dummy_tx_id
Loading

1 comment on commit 4391a50

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit
   __init__.py15753%6–13, 17–24, 32–34
   __main__.py440%1–7
src/algokit/cli
   __init__.py47394%31–34
   codespace.py50982%28, 114, 137, 150–155
   completions.py108992%63–64, 83, 93–99
   dispenser.py121199%77
   doctor.py53394%146–148
   explore.py561573%34–39, 41–46, 80–81, 90
   generate.py70396%76–77, 155
   goal.py47198%79
   init.py3092492%493–494, 499–500, 503, 524, 527–529, 540, 544, 602, 628, 657, 690, 699–701, 704–709, 722, 741, 753–754
   localnet.py1523279%65, 86–113, 133–137, 170, 182, 197–207, 220, 271, 292–293
   task.py34391%25–28
src/algokit/cli/project
   bootstrap.py32197%33
   deploy.py992080%47, 49, 101, 124, 146–148, 227, 234, 248–256, 259–268
   link.py891682%60, 65–66, 101–105, 115–120, 148–149, 218–219, 223
   list.py33585%21–23, 51–56
   run.py46393%38, 71, 160
src/algokit/cli/tasks
   analyze.py81199%81
   assets.py821384%65–66, 72, 74–75, 105, 119, 125–126, 132, 134, 136–137
   ipfs.py51884%52, 80, 92, 94–95, 105–107
   mint.py66494%48, 70, 91, 250
   send_transaction.py651085%52–53, 57, 89, 158, 170–174
   sign_transaction.py59886%21, 28–30, 71–72, 109, 123
   transfer.py39392%26, 90, 117
   utils.py994555%26–34, 40–43, 75–76, 100–101, 125–133, 152–162, 209, 258–259, 279–290, 297–299
   vanity_address.py561082%41, 45–48, 112, 114, 121–123
   wallet.py79495%21, 66, 136, 162
src/algokit/core
   codespace.py1756861%34–37, 41–44, 48–71, 111–112, 125–133, 191, 200–202, 210, 216–217, 229–236, 251–298, 311–313, 338–344, 348, 395
   conf.py57984%12, 24, 28, 36, 38, 73–75, 80
   dispenser.py2022687%91, 123–124, 141–149, 191–192, 198–200, 218–219, 259–260, 318, 332–334, 345–346, 356, 369, 384
   doctor.py65789%67–69, 92–94, 134
   generate.py48394%44, 81, 99
   goal.py65494%21, 36–37, 47
   init.py671085%53, 57–62, 70, 81, 88, 108–109
   log_handlers.py68790%50–51, 63, 112–116, 125
   proc.py45198%99
   sandbox.py2612391%32, 89–92, 97, 101–103, 153, 201–208, 219, 587, 603, 628, 636
   typed_client_generation.py1702088%62–64, 103–108, 132, 135–138, 156, 159–162, 229, 232–235
   utils.py1484073%50–51, 57–69, 125–131, 155, 158, 164–177, 198–200, 229–232, 254
src/algokit/core/compilers
   python.py28582%19–20, 25, 49–50
src/algokit/core/config_commands
   container_engine.py412149%24, 29–31, 47–76
   version_prompt.py921485%37–38, 68, 87–90, 108, 118–125, 148
src/algokit/core/project
   __init__.py53394%50, 86, 145
   bootstrap.py120893%47, 126–127, 149, 176, 207–209
   deploy.py54983%61–64, 73–75, 79, 84
   run.py1251588%83, 88, 97–98, 133–134, 138–139, 143, 147, 261–269, 284
src/algokit/core/tasks
   analyze.py93397%105–112, 187
   ipfs.py63789%58–64, 140, 144, 146, 152
   nfd.py491373%25, 31, 34–41, 70–72, 99–101
   vanity_address.py903462%49–50, 54, 59–75, 92–108, 128–131
   wallet.py71593%37, 129, 155–157
src/algokit/core/tasks/mint
   mint.py781087%123–133, 187
   models.py901188%50, 52, 57, 71–74, 85–88
TOTAL463164186% 

Tests Skipped Failures Errors Time
488 0 💤 0 ❌ 0 🔥 25.599s ⏱️

Please sign in to comment.