Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .algokit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[algokit]
min_version = "v2.0.0"

[project]
type = 'workspace'
projects_root_path = 'projects'

[project.run]
build = ['AlgoFire-contracts', 'AlgoFire-frontend']
10 changes: 10 additions & 0 deletions .algokit/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 2.1.6
_src_path: gh:algorandfoundation/algokit-fullstack-template
author_email: cordesir@gmail.com
author_name: Corey Stedman
cloud_provider: netlify
contract_name: algofire
preset_name: production
project_name: AlgoFire

4 changes: 4 additions & 0 deletions .algokit/generators/create-devcontainer/copier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
_tasks:
- "echo '==== Successfully generated new .devcontainer.json file 🚀 ===='"

_templates_suffix: ".j2"
19 changes: 19 additions & 0 deletions .algokit/generators/create-devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"forwardPorts": [4001, 4002, 8980, 5173],
"portsAttributes": {
"4001": {
"label": "algod"
},
"4002": {
"label": "kmd"
},
"8980": {
"label": "indexer"
},
"5173": {
"label": "vite"
}
},
"postCreateCommand": "mkdir -p ~/.config/algokit && pipx install algokit && sudo chown -R codespace:codespace ~/.config/algokit",
"postStartCommand": "for i in {1..5}; do algokit localnet status > /dev/null 2>&1 && break || sleep 30; algokit localnet reset; done"
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*]
charset = utf-8
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2
tab_width = 2
max_line_length = 140
trim_trailing_whitespace = true
single_quote = true
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
45 changes: 45 additions & 0 deletions .github/workflows/algofire-contracts-cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release AlgoFire-contracts

on:
workflow_call:

jobs:
deploy-testnet:
runs-on: "ubuntu-latest"

environment: contract-testnet
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install algokit
run: pipx install algokit

- name: Bootstrap dependencies
run: algokit project bootstrap all --project-name 'AlgoFire-contracts'

- name: Configure git
shell: bash
run: |
# set git user and email as test invoke git
git config --global user.email "actions@github.com" && git config --global user.name "github-actions"

- name: Deploy to testnet
run: algokit project deploy testnet --project-name 'AlgoFire-contracts'
env:
# This is the account that becomes the creator of the contract
DEPLOYER_MNEMONIC: ${{ secrets.DEPLOYER_MNEMONIC }}
# The dispenser account is used to ensure the deployer account is funded
DISPENSER_MNEMONIC: ${{ secrets.DISPENSER_MNEMONIC }}
72 changes: 72 additions & 0 deletions .github/workflows/algofire-contracts-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Validate AlgoFire-contracts

on:
workflow_call:

jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
cache-dependency-path: "**/package-lock.json"

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install algokit
run: pipx install algokit

- name: Start LocalNet
run: algokit localnet start

- name: Bootstrap dependencies
run: algokit project bootstrap all --project-name 'AlgoFire-contracts'

- name: Configure git
shell: bash
run: |
# set git user and email as test invoke git
git config --global user.email "actions@github.com" && git config --global user.name "github-actions"


- name: Audit dependencies
run: algokit project run audit --project-name 'AlgoFire-contracts'



- name: Lint and format
run: algokit project run lint --project-name 'AlgoFire-contracts'



- name: Run tests
shell: bash
run: |
set -o pipefail
algokit project run test --project-name 'AlgoFire-contracts'


- name: Build smart contracts
run: algokit project run build --project-name 'AlgoFire-contracts'

- name: Scan TEAL files for issues
run: algokit project run audit-teal --project-name 'AlgoFire-contracts'

# # Uncomment to enable TEAL static analysis with snapshoting using Tealer package
# # Would first require running locally using audit-teal command and committing the snapshots into source control
# # Please note, tealer has a known bug that may result in large snapshot file sizes, track resolution here:
# # https://github.com/crytic/tealer/issues/101
# - name: Check output stability of the smart contracts
# run: algokit project run ci-teal-diff --project-name 'AlgoFire-contracts'

- name: Run deployer against LocalNet
run: algokit project deploy localnet --project-name 'AlgoFire-contracts'
36 changes: 36 additions & 0 deletions .github/workflows/algofire-frontend-cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release AlgoFire-frontend

on:
workflow_call:
permissions:
contents: read
packages: read

jobs:

deploy:
runs-on: ubuntu-latest
name: Deploy to Netlify
environment: frontend-prod

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install algokit
run: pipx install algokit

- name: Bootstrap dependencies
run: algokit project bootstrap all --project-name 'AlgoFire-frontend'

- name: Publish to Netlify
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: algokit project run ci-deploy-netlify

47 changes: 47 additions & 0 deletions .github/workflows/algofire-frontend-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Validate AlgoFire-frontend

on:

workflow_call:


jobs:
validate:
runs-on: 'ubuntu-latest'
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install poetry
run: pipx install poetry

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"

- name: Install algokit
run: pipx install algokit

- name: Install dependencies
run: algokit project bootstrap all --project-name 'AlgoFire-frontend'


- name: Run linters
run: algokit project run lint --project-name 'AlgoFire-frontend'


- name: Run unit tests
run: algokit project run test --project-name 'AlgoFire-frontend'


- name: Build
run: algokit project run build --project-name 'AlgoFire-frontend'
38 changes: 38 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '**.md'
- '.vscode/**'
- '.idea/**'

permissions:
contents: read
packages: read

jobs:
AlgoFire-contracts-validate:
name: Run AlgoFire-contracts release
secrets: inherit
uses: ./.github/workflows/AlgoFire-contracts-ci.yaml

AlgoFire-contracts-release:
name: Run AlgoFire-contracts release
secrets: inherit
uses: ./.github/workflows/AlgoFire-contracts-cd.yaml
needs: AlgoFire-contracts-validate

AlgoFire-frontend-validate:
name: Run AlgoFire-frontend release
secrets: inherit
uses: ./.github/workflows/AlgoFire-frontend-ci.yaml

AlgoFire-frontend-release:
name: Run AlgoFire-frontend release
secrets: inherit
uses: ./.github/workflows/AlgoFire-frontend-cd.yaml
needs: AlgoFire-frontend-validate
14 changes: 14 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Pull Request validation

on: [pull_request]


jobs:
AlgoFire-contracts-ci:
name: Run AlgoFire-contracts validation
uses: ./.github/workflows/AlgoFire-contracts-ci.yaml

AlgoFire-frontend-ci:
name: Run AlgoFire-frontend validation
uses: ./.github/workflows/AlgoFire-frontend-ci.yaml

Loading