Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 15 additions & 1 deletion .github-import-state.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,25 @@
"lastImported": "2025-09-28T12:31:39.523Z",
"ref": "chore/fix-docs"
},
"algorandfoundation/puya-ts@devportal": {
"name": "Algorand Typescript",
"repoId": "algorandfoundation/puya-ts@devportal",
"lastCommitSha": "e47bd211ffe3de89a8ee6818ee9849b32802dc2f",
"lastImported": "2025-10-31T11:01:46.827Z",
"ref": "devportal"
},
"algorandfoundation/puya@devportal": {
"name": "Algorand Python",
"repoId": "algorandfoundation/puya@devportal",
"lastCommitSha": "3d88a33396fdd9ce3ea311f5a1c69848dda7266e",
"lastImported": "2025-11-10T10:03:34.401Z",
"ref": "devportal"
},
"algorandfoundation/algokit-utils-py@main": {
"name": "AlgoKit Utils Python Docs",
"repoId": "algorandfoundation/algokit-utils-py@main",
"lastCommitSha": "97fb35c271555ec58ccbaec3851ee32382c6ec68",
"lastImported": "2025-10-25T12:50:45.443Z",
"lastImported": "2025-11-10T10:37:29.827Z",
"ref": "main"
},
"algorandfoundation/puya-ts@devportal": {
Expand Down
22 changes: 4 additions & 18 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,8 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Setup Python for importing docs
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Setup submodules
run: git submodule update --init


node-version: "20"
cache: "pnpm"
- name: Install Dependencies
run: pnpm install

Expand All @@ -64,23 +51,22 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache: "pnpm"

- name: Install D2
run: curl -fsSL https://d2lang.com/install.sh | sh -s -- --tala

- name: Setup Python for importing docs
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: "3.12"

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Setup submodules
run: git submodule update --init


- name: Install Dependencies
run: pnpm install

Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,13 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Setup Python for importing docs
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@v1
node-version: "20"

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.6.3

- name: Setup submodules
run: git submodule update --init


- name: Install dependencies
run: pnpm install

Expand Down
52 changes: 0 additions & 52 deletions .gitmodules

This file was deleted.

83 changes: 40 additions & 43 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ export default defineConfig({
starlightLinksValidator({
errorOnRelativeLinks: false,
errorOnInvalidHashes: false,
exclude: [
'**[FUTURELINK]*',
'**/reference/algorand-python/**',
'**/reference/algorand-teal/**',
'**/reference/algorand-typescript/**',
'**/reference/rest-api/**',
'**/reference/sdk/**',
],
exclude: ['**/reference/rest-api/**', '**/reference/sdk/**'],
}),
starlightLlmsTxt({
minify: {
Expand Down Expand Up @@ -157,6 +150,7 @@ export default defineConfig({
SiteTitle: './src/components/SiteTitle.astro',
ThemeProvider: './src/components/CustomThemeProvider.astro',
ThemeSelect: './src/components/ThemeSelect.astro',
PageTitle: './src/components/PageTitle.astro',
},
logo: {
light: '/src/assets/images/portal-logo-light-mode.svg',
Expand Down Expand Up @@ -196,6 +190,11 @@ export default defineConfig({
link: 'https://tutorials.dev.algorand.co',
attrs: { target: '_blank', rel: 'noopener' },
},
{
label: 'AlgoKit 3.0 Video Course',
link: 'https://youtube.com/playlist?list=PLwRyHoehE4356E8tPKxC2XJtFEyLOHHEB&si=kfoKgu0jVObIJGWO',
attrs: { target: '_blank', rel: 'noopener' },
},
{
label: 'Why Algorand?',
link: 'getting-started/why-algorand',
Expand Down Expand Up @@ -828,6 +827,18 @@ export default defineConfig({
label: 'Overview',
link: 'algokit/languages/python/overview',
},
{
label: 'Migration Guide v4.x to 5.0',
link: 'algokit/languages/python/lg-migration-4-5',
},
{
label: 'Language Guide',
link: 'algokit/languages/python/language-guide',
},
{
label: 'Guiding Principles',
link: 'algokit/languages/python/principles',
},
{
label: 'Program Structure',
link: 'algokit/languages/python/lg-structure',
Expand All @@ -844,10 +855,6 @@ export default defineConfig({
label: 'Module Level Constructs',
link: 'algokit/languages/python/lg-modules',
},
{
label: 'Overview',
link: 'algokit/languages/python/lg-modules',
},
{
label: 'Python Built-Ins',
link: 'algokit/languages/python/lg-builtins',
Expand Down Expand Up @@ -1006,6 +1013,20 @@ export default defineConfig({
},
],
},
{
label: 'Language Servers',
collapsed: true,
items: [
{
label: 'Algorand Python',
link: 'algokit/language-servers/algorand-python',
},
{
label: 'Algorand TypeScript',
link: 'algokit/language-servers/algorand-typescript',
}
],
},
{
label: 'Subscriber',
collapsed: true,
Expand Down Expand Up @@ -1161,37 +1182,9 @@ export default defineConfig({
{
label: 'Algorand Python',
collapsed: true,
items: [
{
label: 'API Reference',
items: [
{
label: 'algopy.arc4',
link: 'reference/algorand-python/api-reference/algopy-arc4',
},
{
label: 'algopy.gtxn',
link: 'reference/algorand-python/api-reference/algopy-gtxn',
},
{
label: 'algopy.itxn',
link: 'reference/algorand-python/api-reference/algopy-itxn',
},
{
label: 'algopy.op',
link: 'reference/algorand-python/api-reference/algopy-op',
},
{
label: 'algopy',
link: 'reference/algorand-python/api-reference/algopy',
},
],
},
{
label: 'Overview',
link: 'reference/algorand-python/overview',
},
],
autogenerate: {
directory: 'reference/algorand-python/api',
},
},
{
label: 'Algorand Typescript',
Expand Down Expand Up @@ -1282,6 +1275,10 @@ export default defineConfig({
label: 'Overview',
link: 'resources/overview',
},
{
label: 'Liquid Auth',
link: 'resources/liquid-auth',
},
{
label: 'Algorand Specifications',
link: 'https://specs.algorand.co',
Expand Down
11 changes: 11 additions & 0 deletions auto-sidebar-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,14 @@ configs:
collapsed: true
cascade:
- collapsed
- folder: reference/algorand-python/api
content: |
collapsed: true
cascade:
- collapsed
- folder: reference/algorand-python/api/front-end-guide
content: |
label: Front-end Guide
collapsed: true
cascade:
- collapsed
22 changes: 22 additions & 0 deletions examples/algokit/py/algokit-py-lang-servers-bug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from algopy import ARC4Contract, arc4, Txn, BoxMap
from algopy.arc4 import abimethod

class UserVotes(ARC4Contract):
def __init__(self) -> None:
# Each user can vote for multiple proposals
self.votes = BoxMap(arc4.Address, arc4.DynamicArray[arc4.UInt64])

@abimethod()
def cast_vote(self, proposal_id: arc4.UInt64) -> arc4.DynamicArray[arc4.UInt64]:
voter = arc4.Address(Txn.sender)

if voter in self.votes:
current_votes = self.votes[voter].copy()
current_votes.append(proposal_id)

# Bug in next line: mutable reference to ARC-4-encoded value must be copied using .copy() when being assigned
self.votes[voter] = current_votes
else:
self.votes[voter] = arc4.DynamicArray[arc4.UInt64](proposal_id)

return self.votes[voter]
22 changes: 22 additions & 0 deletions examples/algokit/py/algokit-py-lang-servers-fixed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from algopy import ARC4Contract, arc4, Txn, BoxMap
from algopy.arc4 import abimethod

class UserVotes(ARC4Contract):
def __init__(self) -> None:
# Each user can vote for multiple proposals
self.votes = BoxMap(arc4.Address, arc4.DynamicArray[arc4.UInt64])

@abimethod()
def cast_vote(self, proposal_id: arc4.UInt64) -> arc4.DynamicArray[arc4.UInt64]:
voter = arc4.Address(Txn.sender)

if voter in self.votes:
current_votes = self.votes[voter].copy()
current_votes.append(proposal_id)

# Bug Fixed in next line: Added mutable reference to ARC-4-encoded value must be copied using .copy() when being assigned
self.votes[voter] = current_votes.copy()
else:
self.votes[voter] = arc4.DynamicArray[arc4.UInt64](proposal_id)

return self.votes[voter]
23 changes: 23 additions & 0 deletions examples/algokit/ts/algokit-ts-lang-servers-bug.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { BoxMap, clone, Contract, Txn } from '@algorandfoundation/algorand-typescript'
import { Address, DynamicArray, Uint64 } from '@algorandfoundation/algorand-typescript/arc4'

export class UserVotes extends Contract {
// Each user can vote for multiple proposals
votes = BoxMap<Address, DynamicArray<Uint64>>({ keyPrefix: '' })

castVote(proposalId: Uint64): DynamicArray<Uint64> {
const voter = new Address(Txn.sender)

if (this.votes(voter).exists) {

// Bug in line below: cannot create multiple references to a mutable stack type, the value must be copied using clone(...) when being assigned to another variable
const currentVotes = this.votes(voter).value
currentVotes.push(proposalId)
this.votes(voter).value = clone(currentVotes)
} else {
this.votes(voter).value = new DynamicArray(proposalId)
}

return this.votes(voter).value
}
}
Loading
Loading