-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: orchestration support * chore: swapping to final prerelease branch * chore: fix up the ts deployer build command * chore: fixing race condition in tests (xdist); more robust tests * chore: minor tweaks * chore: minor tweaks * chore: regen artifacts * chore: bumping min version BREAKING CHANGE: Support for algokit-cli v2.0 --------- Co-authored-by: Neil Campbell <[email protected]>
- Loading branch information
1 parent
ca96107
commit c1760d4
Showing
50 changed files
with
698 additions
and
596 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,39 @@ | ||
_subdirectory: template_content | ||
_templates_suffix: ".jinja" | ||
|
||
use_workspace: | ||
type: bool | ||
when: false # never prompted to user explicitly, instead expect cli to auto fill (supported cli versions > v1.13.x) | ||
help: Automatically filled by AlgoKit CLI (>1.13.x) - passes the --workspace/--no-workspace flag's value, can be used to reason whether this template is currently being instantiated as part of a workspace or not. | ||
default: no | ||
|
||
# questions | ||
# project_name should never get prompted, AlgoKit should always pass it by convention | ||
project_name: | ||
type: str | ||
help: Name for this project. | ||
placeholder: "algorand-app" | ||
|
||
contract_name: | ||
type: str | ||
help: Name of the default smart contract app. | ||
placeholder: "hello_world" | ||
default: "hello_world" | ||
validator: >- | ||
{% if not (contract_name | regex_search('^[a-z]+(?:_[a-z]+)*$')) %} | ||
contract_name must be formatted in snake case. | ||
{% endif %} | ||
author_name: | ||
type: str | ||
help: Package author name | ||
placeholder: "Your Name" | ||
default: "Your Name" | ||
|
||
author_email: | ||
type: str | ||
help: Package author email | ||
placeholder: "[email protected]" | ||
default: "[email protected]" | ||
|
||
contract_name: | ||
type: str | ||
help: Name of the default smart contract app. | ||
placeholder: "hello_world" | ||
default: "hello_world" | ||
validator: >- | ||
{% if not (contract_name | regex_search('^[a-z]+(?:_[a-z]+)*$')) %} | ||
contract_name must be formatted in snake case. | ||
{% endif %} | ||
preset_name: | ||
type: str | ||
|
47 changes: 38 additions & 9 deletions
47
examples/generators/production_beaker_smart_contract_python/.algokit.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,49 @@ | ||
[algokit] | ||
min_version = "v1.10.0" | ||
min_version = "v2.0.0" | ||
|
||
[deploy] | ||
[generate.smart_contract] | ||
description = "Adds new smart contract to existing project" | ||
path = ".algokit/generators/create_contract" | ||
|
||
[project] | ||
type = 'contract' | ||
name = 'production_beaker_smart_contract_python' | ||
artifacts = 'smart_contracts/artifacts' | ||
|
||
[project.deploy] | ||
command = "poetry run python -m smart_contracts deploy" | ||
environment_secrets = [ | ||
"DEPLOYER_MNEMONIC", | ||
"DISPENSER_MNEMONIC", | ||
] | ||
|
||
[deploy.localnet] | ||
[project.deploy.localnet] | ||
environment_secrets = [] | ||
|
||
[generate.smart_contract] | ||
description = "Adds new smart contract to existing project" | ||
path = ".algokit/generators/create_contract" | ||
[project.run] | ||
# Commands intented for use locally and in CI | ||
build = { commands = [ | ||
'poetry run python -m smart_contracts build', | ||
], description = 'Build all smart contracts in the project' } | ||
test = { commands = [ | ||
'poetry run pytest', | ||
], description = 'Run smart contract tests' } | ||
audit = { commands = [ | ||
'poetry export --without=dev -o requirements.txt', | ||
'poetry run pip-audit -r requirements.txt', | ||
], description = 'Audit with pip-audit' } | ||
lint = { commands = [ | ||
'poetry run black --check .', | ||
'poetry run ruff .', | ||
'poetry run mypy', | ||
], description = 'Perform linting' } | ||
audit-teal = { commands = [ | ||
# 🚨 IMPORTANT 🚨: For strict TEAL validation, remove --exclude statements. The default starter contract is not for production. Ensure thorough testing and adherence to best practices in smart contract development. This is not a replacement for a professional audit. | ||
'algokit task analyze smart_contracts/artifacts --recursive --force --exclude rekey-to --exclude is-updatable --exclude missing-fee-check --exclude is-deletable --exclude can-close-asset --exclude can-close-account --exclude unprotected-deletable --exclude unprotected-updatable', | ||
], description = 'Audit TEAL files' } | ||
|
||
[project] | ||
type = 'contract' | ||
name = 'production_beaker_smart_contract_python' | ||
# Commands indented for CI only, prefixed with `ci-` by convention | ||
ci-teal-diff = { commands = [ | ||
'git add -N ./smart_contracts/artifacts', | ||
'git diff --exit-code --minimal ./smart_contracts/artifacts', | ||
], description = 'Check TEAL files for differences' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 0 additions & 82 deletions
82
examples/generators/production_beaker_smart_contract_python/.github/workflows/checks.yaml
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
examples/generators/production_beaker_smart_contract_python/.github/workflows/pr.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.