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: examples/generators/production_python_smart_contract_python/.algokit/generators/create_env_file/{% if use_generic_env %}.env.j2{% endif %}
Copy file name to clipboardExpand all lines: examples/generators/production_python_smart_contract_python/README.md
+20-2Lines changed: 20 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Run the following commands within the project folder:
28
28
-**Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+.
29
29
-**Setup Project**: Execute `algokit project bootstrap all` to:
30
30
- Install dependencies and setup a Python virtual environment in `.venv`.
31
-
-Copy `.env.template` to `.env`.
31
+
-Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)).
32
32
-**Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network.
33
33
34
34
### Development Workflow
@@ -58,7 +58,25 @@ While primarily optimized for VS Code, JetBrains IDEs are supported:
58
58
## AlgoKit Workspaces and Project Management
59
59
This project supports both standalone and monorepo setups through AlgoKit workspaces. Leverage [`algokit project run`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/run.md) commands for efficient monorepo project orchestration and management across multiple projects within a workspace.
60
60
61
-
> For guidance on `smart_contracts` folder and adding new contracts to the project please see [README](smart_contracts/README.md) on the respective folder.### Continuous Integration / Continuous Deployment (CI/CD)
61
+
## AlgoKit Generators
62
+
63
+
This template provides a set of [algokit generators](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/generate.md) that allow you to further modify the project instantiated from the template to fit your needs, as well as giving you a base to build your own extensions to invoke via the `algokit generate` command.
64
+
65
+
### Generate Smart Contract
66
+
67
+
By default the template creates a single `HelloWorld` contract under hello_world folder in the `smart_contracts` directory. To add a new contract:
68
+
69
+
1. From the root of the project (`../`) execute `algokit generate smart-contract`. This will create a new starter smart contract and deployment configuration file under `{your_contract_name}` subfolder in the `smart_contracts` directory.
70
+
2. Each contract potentially has different creation parameters and deployment steps. Hence, you need to define your deployment logic in `deploy_config.py`file.
71
+
3.`config.py` file will automatically build all contracts in the `smart_contracts` directory. If you want to build specific contracts manually, modify the default code provided by the template in `config.py` file.
72
+
73
+
> Please note, above is just a suggested convention tailored for the base configuration and structure of this template. The default code supplied by the template in `config.py` and `index.ts` (if using ts clients) files are tailored for the suggested convention. You are free to modify the structure and naming conventions as you see fit.
74
+
75
+
### Generate '.env' files
76
+
77
+
By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`.
78
+
79
+
To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file`### Continuous Integration / Continuous Deployment (CI/CD)
62
80
63
81
This project uses [GitHub Actions](https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions) to define CI/CD workflows, which are located in the [.github/workflows](`.github/workflows`) folder.
0 commit comments