Skip to content

Commit b46badb

Browse files
committed
initial commit.
0 parents  commit b46badb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4149
-0
lines changed

.algokit.toml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[algokit]
2+
min_version = "v1.12.1"
3+
4+
[project]
5+
type = 'workspace'
6+
projects_root_path = 'projects'
7+
8+
[generate.devcontainer]
9+
description = "Generate a default 'devcontainer.json' configuration that pre-installs algokit and launches Algorand sandbox as part of codespace container provisioning."
10+
path = ".algokit/generators/create-devcontainer"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
_tasks:
2+
- "echo '==== Successfully generated new .devcontainer.json file 🚀 ===='"
3+
4+
_templates_suffix: ".j2"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"forwardPorts": [4001, 4002, 8980, 5173],
3+
"portsAttributes": {
4+
"4001": {
5+
"label": "algod"
6+
},
7+
"4002": {
8+
"label": "kmd"
9+
},
10+
"8980": {
11+
"label": "indexer"
12+
},
13+
"5173": {
14+
"label": "vite"
15+
}
16+
},
17+
"postCreateCommand": "mkdir -p ~/.config/algokit && pipx install algokit && sudo chown -R codespace:codespace ~/.config/algokit",
18+
"postStartCommand": "for i in {1..5}; do algokit localnet status > /dev/null 2>&1 && break || sleep 30; algokit localnet reset; done"
19+
}

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[*]
2+
charset = utf-8
3+
insert_final_newline = true
4+
end_of_line = lf
5+
indent_style = space
6+
indent_size = 2
7+
tab_width = 2
8+
max_line_length = 140
9+
trim_trailing_whitespace = true
10+
single_quote = true

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release shared-resources
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
deploy-testnet:
8+
runs-on: "ubuntu-latest"
9+
10+
environment: contract-testnet
11+
steps:
12+
- name: Checkout source code
13+
uses: actions/checkout@v4
14+
15+
- name: Install poetry
16+
run: pipx install poetry
17+
18+
- name: Set up Python 3.12
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.12"
22+
cache: "poetry"
23+
24+
- name: Install algokit
25+
run: pipx install algokit
26+
27+
- name: Bootstrap dependencies
28+
run: algokit project bootstrap all --project-name 'shared-resources'
29+
30+
- name: Configure git
31+
shell: bash
32+
run: |
33+
# set git user and email as test invoke git
34+
git config --global user.email "[email protected]" && git config --global user.name "github-actions"
35+
36+
- name: Deploy to testnet
37+
run: algokit deploy testnet --project-name 'shared-resources'
38+
env:
39+
# This is the account that becomes the creator of the contract
40+
DEPLOYER_MNEMONIC: ${{ secrets.DEPLOYER_MNEMONIC }}
41+
# The dispenser account is used to ensure the deployer account is funded
42+
DISPENSER_MNEMONIC: ${{ secrets.DISPENSER_MNEMONIC }}
+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Validate shared-resources
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
validate:
8+
runs-on: "ubuntu-latest"
9+
steps:
10+
- name: Checkout source code
11+
uses: actions/checkout@v4
12+
13+
- name: Install poetry
14+
run: pipx install poetry
15+
16+
- name: Set up Python 3.12
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
cache: "poetry"
21+
22+
- name: Install algokit
23+
run: pipx install algokit
24+
25+
- name: Start LocalNet
26+
run: algokit localnet start
27+
28+
- name: Bootstrap dependencies
29+
run: algokit project bootstrap all --project-name 'shared-resources'
30+
31+
- name: Configure git
32+
shell: bash
33+
run: |
34+
# set git user and email as test invoke git
35+
git config --global user.email "[email protected]" && git config --global user.name "github-actions"
36+
37+
- name: Audit python dependencies
38+
run: algokit project run audit --project-name 'shared-resources'
39+
40+
- name: Lint and format python dependencies
41+
run: algokit project run lint --project-name 'shared-resources'
42+
43+
- name: Run tests
44+
shell: bash
45+
run: |
46+
set -o pipefail
47+
algokit project run test --project-name 'shared-resources'
48+
49+
- name: Build smart contracts
50+
run: algokit project run build --project-name 'shared-resources'
51+
52+
- name: Scan TEAL files for issues
53+
run: algokit project run audit-teal --project-name 'shared-resources'
54+
55+
# # Uncomment to enable TEAL static analysis with snapshoting using Tealer package
56+
# # Would first require running locally using audit-teal command and committing the snapshots into source control
57+
# # Please note, tealer has a known bug that may result in large snapshot file sizes, track resolution here:
58+
# # https://github.com/crytic/tealer/issues/101
59+
# - name: Check output stability of the smart contracts
60+
# run: algokit project run ci-teal-diff --project-name 'shared-resources'
61+
62+
- name: Run deployer against LocalNet
63+
run: algokit project deploy localnet --project-name 'shared-resources'

.gitignore

+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/#use-with-ide
110+
.pdm.toml
111+
112+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113+
__pypackages__/
114+
115+
# Celery stuff
116+
celerybeat-schedule
117+
celerybeat.pid
118+
119+
# SageMath parsed files
120+
*.sage.py
121+
122+
# Environments
123+
.env
124+
.venv
125+
env/
126+
venv/
127+
ENV/
128+
env.bak/
129+
venv.bak/
130+
131+
# Spyder project settings
132+
.spyderproject
133+
.spyproject
134+
135+
# Rope project settings
136+
.ropeproject
137+
138+
# mkdocs documentation
139+
/site
140+
141+
# mypy
142+
.mypy_cache/
143+
.dmypy.json
144+
dmypy.json
145+
146+
# Pyre type checker
147+
.pyre/
148+
149+
# pytype static type analyzer
150+
.pytype/
151+
152+
# Ruff (linter)
153+
.ruff_cache/
154+
155+
# Cython debug symbols
156+
cython_debug/
157+
158+
# PyCharm
159+
.idea/
160+
!.idea/runConfigurations
161+
162+
# macOS
163+
.DS_Store
164+
165+
# Received approval test files
166+
*.received.*
167+
168+
# NPM
169+
node_modules
170+

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
// Disabled due to matangover.mypy extension not supporting monorepos
3+
// To be addressed as part of https://github.com/matangover/mypy-vscode/issues/82
4+
"mypy.enabled": false
5+
}

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# shared-resources
2+
3+
Welcome to your new AlgoKit project!
4+
5+
This is your workspace root. A `workspace` in AlgoKit is an orchestrated collection of standalone projects (backends, smart contracts, frontend apps and etc).
6+
7+
By default, `projects_root_path` parameter is set to `projects`. Which instructs AlgoKit CLI to create a new directory under `projects` directory when new project is instantiated via `algokit init` at the root of the workspace.
8+
9+
## Getting Started
10+
11+
To get started refer to `README.md` files in respective sub-projects in the `projects` directory.
12+
13+
To learn more about algokit, visit [documentation](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/algokit.md).
14+
15+
### GitHub Codespaces
16+
17+
To get started execute:
18+
19+
1. `algokit generate devcontainer` - invoking this command from the root of this repository will create a `devcontainer.json` file with all the configuration needed to run this project in a GitHub codespace. [Run the repository inside a codespace](https://docs.github.com/en/codespaces/getting-started/quickstart) to get started.
20+
2. `algokit init` - invoke this command inside a github codespace to launch an interactive wizard to guide you through the process of creating a new AlgoKit project
21+
22+
Powered by [Copier templates](https://copier.readthedocs.io/en/stable/).

projects/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)