You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: template_content/README.md.jinja
+44-4Lines changed: 44 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,10 @@ This starter React project has been generated using AlgoKit. See below for defau
8
8
9
9
1. Clone this repository locally
10
10
2. Install pre-requisites:
11
+
- Make sure to have [Docker](https://www.docker.com/) installed and running on your machine.
11
12
- Install `AlgoKit` - [Link](https://github.com/algorandfoundation/algokit-cli#install): The minimum required version is `1.1`. Ensure you can execute `algokit --version` and get `1.1` or later.
12
13
- Bootstrap your local environment; run `algokit bootstrap all` within this folder, which will run `npm install` to install NPM packages and dependencies for your frontend component/webapp.
14
+
- Run `algokit localnet start` to start a local Algorand network in Docker. If you are using VS Code launch configurations provided by the template, this will be done automatically for you.
13
15
3. Open the project and start debugging / developing via:
14
16
- VS Code
15
17
1. Open the repository root in VS Code
@@ -24,6 +26,8 @@ This starter React project has been generated using AlgoKit. See below for defau
24
26
1. If you update to the latest source code and there are new dependencies you will need to run `algokit bootstrap all` again
25
27
2. Follow step 3 above
26
28
29
+
> Please note, by default frontend is pre configured to run against Algorand LocalNet. If you want to run against TestNet or MainNet, comment out the current environment variable and uncomment the relevant one in [`.env`](.env) file that is created after running bootstrap command and based on [`.env.template`](.env.template).
30
+
27
31
{%ifuse_github_actions -%}
28
32
29
33
### Continuous Integration
@@ -44,6 +48,19 @@ The project template provides base Github Actions workflows for continuous deplo
44
48
45
49
{%endif -%}
46
50
51
+
# Algorand Wallet integrations
52
+
53
+
The template comes with [`use-wallet`](https://github.com/txnlab/use-wallet) integration, which provides a React hook for connecting to an Algorand wallet providers. The following wallet providers are included by default:
54
+
- LocalNet:
55
+
- - [KMD/Local Wallet](https://github.com/TxnLab/use-wallet#kmd-algorand-key-management-daemon) - Algorand's Key Management Daemon (KMD) is a service that manages Algorand private keys and signs transactions. Works best with AlgoKit LocalNet and allows you to easily test and interact with your dApps locally.
56
+
- TestNet and others:
57
+
- - [Pera Wallet](https://perawallet.app).
58
+
- - [Defly Wallet](https://defly.app).
59
+
- - [Exodus Wallet](https://www.exodus.com).
60
+
- - [Daffi Wallet](https://www.daffi.me).
61
+
62
+
Refer to official [`use-wallet`](https://github.com/txnlab/use-wallet) documentation for detailed guidelines on how to integrate with other wallet providers (such as WalletConnect v2). Too see implementation details on the use wallet hook and initialization of extra wallet providers refer to [`App.tsx`](./src/App.tsx).
63
+
47
64
# Tools
48
65
49
66
This project makes use of React and Tailwind to provider a base project configuration to develop frontends for your Algorand dApps and interactions with smart contracts. The following tools are in use:
@@ -54,9 +71,9 @@ This project makes use of React and Tailwind to provider a base project configur
54
71
- [Tailwind CSS](https://tailwindcss.com/) - A utility-first CSS framework for rapidly building custom designs.
55
72
{%endif -%}{%ifuse_daisy_ui -%}
56
73
- [daisyUI](https://daisyui.com/) - A component library for Tailwind CSS.
57
-
{%endif -%}{%ifuse_wallet -%}
58
-
- [use-wallet](https://github.com/txnlab/use-wallet) - A React hook for connecting to an Algorand wallet providers. Includes integrations with [Exodus](https://www.exodus.com/), [Pera](https://perawallet.app/), and [Defly](https://defly.app/).
@@ -75,4 +92,27 @@ It has also been configured to have a productive dev experience out of the box i
75
92
76
93
# Integrating with smart contracts and application clients
77
94
78
-
Refer to the detailed guidance on [integrating with smart contracts and application clients](./src/contracts/README.md). In essence, for any smart contract codebase generated with AlgoKit or ther tools that produce compile contracts into ARC34 compliant app specifications, you can use the `algokit generate` command to generate TypeScript or Python typed client. Once generated simply drag and drop the generated client into `./src/contracts` and import it into your React components as you see fit.
95
+
Refer to the detailed guidance on [integrating with smart contracts and application clients](./src/contracts/README.md). In essence, for any smart contract codebase generated with AlgoKit or other tools that produce compile contracts into ARC34 compliant app specifications, you can use the `algokit generate` command to generate TypeScript or Python typed client. Once generated simply drag and drop the generated client into `./src/contracts` and import it into your React components as you see fit.
96
+
97
+
# Vite compatibility with `js-algorand-sdk` and `algokit clients`
98
+
99
+
If you are receiving `address malformed` errors when sending direct calls to abi methods on AlgoKit typed clients where ABI parameters expect ABI transactions to be passed, this is a known edge case and a bug that occurs on [Vite in dev mode](https://github.com/vitejs/vite/issues/9528). A fix is in the works on [js-algorand-sdk](https://github.com/algorand/js-algorand-sdk/issues/740) side (which is used as a main low-level dependency by AlgoKit to generate typed clients), but in the meantime you can use a simple workaround described below:
{this.state.error?.message.includes('Attempt to get default algod configuration')
33
+
? 'Please make sure to set up your environment variables correctly. Create a .env file based on .env.template and fill in the required values. This controls the network and credentials for connections with Algod and Indexer.'
0 commit comments