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
{{ message }}
This repository was archived by the owner on Nov 27, 2024. It is now read-only.
Copy file name to clipboardexpand all lines: template_content/smart_contracts/README.md.jinja
+5-5
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
By the default the template creates a single `HelloWorld` contract under {{ contract_name }} folder in the `smart_contracts` directory. To add a new contract:
4
4
5
-
1. Create a new folder under `smart_contracts` directory and add define your new contract in `contract.py` file.
6
-
2. Each contract has potentially has different creation parameters and deployment steps. Hence, you need to define your deployment logic in {%ifdeployment_language == 'python'%}`deploy_config.py`{%elifdeployment_language == 'typescript'%}`deploy-config.ts`{%endif%}file.
7
-
3. Reference your contract in `config.py` file. This will tell instruct the helper scripts on which exact contracts require building and generation of typed clients.
5
+
1. From the root of the repository execute `algokit generate smart-contract`. This will create a new starter smart contract and deployment configuration file under `{your_contract_name}` subfolder under `smart_contracts` directory.
6
+
2. Each contract potentially has different creation parameters and deployment steps. Hence, you need to define your deployment logic in {%ifdeployment_language == 'python'%}`deploy_config.py`{%elifdeployment_language == 'typescript'%}`deploy-config.ts`{%endif%}file.
7
+
3. `config.py` filewill automatically build all contracts under `smart_contracts` directory. If you want to build specific contracts manually, modify the default code provided by the template in `config.py` file.
8
8
{%- ifdeployment_language == 'typescript'%}
9
-
4. Since you are generating a TypeScript client, you also need to reference your contract in `index.ts` file. This will instruct the TypeScript specific helper scripts on how exactly to deploy your contract.
9
+
4. Since you are generating a TypeScript client, you also need to reference your contract deployment logic in `index.ts` file. However, similar to config.py, by default, `index.ts` will auto import all TypeScript deployment files under `smart_contracts` directory. If you want to manually import specific contracts, modify the default code provided by the template in `index.ts` file.
10
10
{%- endif%}
11
11
12
-
> Please note, above is just a suggested convention tailored for the base configuration and structure of this template. You are free to modify the structure and naming conventions as you see fit.
12
+
> Please note, above is just a suggested convention tailored for the base configuration and structure of this template. 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.
0 commit comments