10802 commits in all time Jan 20, 2026 03:29 – Apr 20, 2026 03:29 UTC
achidlow puya
Merge 13950bd6a22861d897027ec5c9dc70b6896601ac into ac3f3fa69648dabbdbe542599a1f4024567c6979
Git Commit 49015c80 Branch pull/707/merge Document 56/2,692 ++ 3 --
achidlow puya
chore: compile all
Git Commit 13950bd6 Branch fix/logical-fold-non-bool Document 23/54 ++ 100 --
achidlow puya
fix: proactive fix to fold && and || to 0/1 instead of operand values
Currently, neither Algorand Python nor puya-ts emit non-boolean operands for these ops.
Git Commit bba1f8ad Branch fix/logical-fold-non-bool Document 1/2 ++ 2 --
achidlow puya
test: add regression test for && and || non-boolean constant folding
The intrinsic simplifier uses Python's `and`/`or` to fold AVM `&&`/`||`, which returns operand values instead of 0/1 for non-boolean constants. For example, `int(5 and 3)` returns 3, but AVM `&&` returns 1.

This is only reachable from AWST (not Algorand Python source), so the test uses a hand-crafted AWST JSON test case.
Git Commit f222dcfd Branch fix/logical-fold-non-bool Document 55/2,736 ++ 1 --
Merge 2f70bdccc1b4caeabfad5d4ceadf1bc71faf32a8 into 5523fbf696623f4b6976a538563b4b95cdf659fb
Git Commit 848b41cd Branch pull/825/merge Document 1/1 ++ 1 --
build(deps-dev): update eslint requirement from ^10.2.0 to ^10.2.1
Updates the requirements on [eslint](https://github.com/eslint/eslint) to permit the latest version.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.2.0...v10.2.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.2.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Git Commit 2f70bdcc Branch dependabot/npm_and_yarn/eslint-tw-10.2.1 Document 1/1 ++ 1 --
achidlow puya
fix: guard extract/substring constant fold against OOB indices
Three related fixes:

1. Extract folding now checks len(source) < S+L before slicing,
   preventing Python's silent truncation from masking the AVM panic.

2. Substring folding now checks S <= E <= len(source) using a chained
   comparison, adding the missing upper bound check.

3. _get_bytes_length_safe now inductively verifies the source length
   before trusting an extract instruction's immediate length. Without
   this, a secondary optimization path could fold using an incorrect
   length even after the direct fold guard fires.
Git Commit 32abcc2c Branch main Document 2/52 ++ 3 --
achidlow puya
test: add regression test for OOB extract/substring constant folding
The intrinsic simplifier folds extract and substring even when the indices are out of bounds, silently truncating the result. The AVM panics in these cases.

Three separate contracts (ExtractLengthOOB, ExtractStartOOB, SubstringEndOOB) allow the on-chain tests to verify each error message independently.
Git Commit 05c02161 Branch main Document 153/1,435 ++ 0 --
achidlow puya
chore: compile all
Git Commit ac3f3fa6 Branch main Document 143/8,125 ++ 5,856 --
achidlow puya
chore: compile all
Git Commit ca4acda4 Branch pull/706/head Document 143/8,125 ++ 5,856 --
achidlow puya
fix: guard extract/substring constant fold against OOB indices
Three related fixes:

1. Extract folding now checks len(source) < S+L before slicing,
   preventing Python's silent truncation from masking the AVM panic.

2. Substring folding now checks S <= E <= len(source) using a chained
   comparison, adding the missing upper bound check.

3. _get_bytes_length_safe now inductively verifies the source length
   before trusting an extract instruction's immediate length. Without
   this, a secondary optimization path could fold using an incorrect
   length even after the direct fold guard fires.
Git Commit 492255dc Branch pull/706/head Document 2/52 ++ 3 --
achidlow puya
test: add regression test for OOB extract/substring constant folding
The intrinsic simplifier folds extract and substring even when the indices are out of bounds, silently truncating the result. The AVM panics in these cases.

Three separate contracts (ExtractLengthOOB, ExtractStartOOB, SubstringEndOOB) allow the on-chain tests to verify each error message independently.
Git Commit f42ad0ba Branch pull/706/head Document 153/1,435 ++ 0 --
achidlow puya
test: add regression test for uint64 overflow constant folding
The intrinsic simplifier folds uint64 add/mul/exp even when the result exceeds 2^64-1. The AVM panics on overflow, but the optimizer produces oversized constants that propagate through subsequent folds.

Three separate contracts (add, mul, exp) allow the on-chain tests to verify each overflow error message independently.
Git Commit c7b46e15 Branch main Document 153/1,438 ++ 0 --
achidlow puya
fix: guard uint64 constant fold against overflow
The uint64 binary op folding only guarded against negative results
but not overflow beyond MAX_UINT64. Operations like (2^64-1) + 1
produced oversized constants that propagated through subsequent folds.

Now checks 0 <= c <= MAX_UINT64 before folding, preserving the AVM
overflow panic.
Git Commit 6cf6b7c1 Branch main Document 2/45 ++ 5 --
achidlow puya
chore: compile all
Git Commit 58547280 Branch main Document 66/5,937 ++ 3,423 --
achidlow puya
fix: guard triple uint64 constant simplifier against overflow
Git Commit 756c1828 Branch main Document 1/13 ++ 4 --
achidlow puya
chore: compile all
Git Commit a3a40148 Branch main Document 74/2,360 ++ 13 --
achidlow puya
test: add regression test for uint64 triple constant fold overflow
Git Commit e6aee8d2 Branch main Document 45/566 ++ 0 --
achidlow puya
chore: compile all
Git Commit 35569793 Branch pull/704/head Document 74/2,360 ++ 13 --
achidlow puya
fix: guard triple uint64 constant simplifier against overflow
Git Commit f17eeb8d Branch pull/704/head Document 1/13 ++ 4 --
achidlow puya
test: add regression test for uint64 triple constant fold overflow
Git Commit a34eff51 Branch pull/704/head Document 45/566 ++ 0 --
achidlow puya
chore: compile all
Git Commit 5c89bec3 Branch pull/704/head Document 66/5,937 ++ 3,423 --
achidlow puya
fix: guard uint64 constant fold against overflow
The uint64 binary op folding only guarded against negative results
but not overflow beyond MAX_UINT64. Operations like (2^64-1) + 1
produced oversized constants that propagated through subsequent folds.

Now checks 0 <= c <= MAX_UINT64 before folding, preserving the AVM
overflow panic.
Git Commit 080ecf0e Branch pull/704/head Document 2/45 ++ 5 --
achidlow puya
test: add regression test for uint64 overflow constant folding
The intrinsic simplifier folds uint64 add/mul/exp even when the result exceeds 2^64-1. The AVM panics on overflow, but the optimizer produces oversized constants that propagate through subsequent folds.

Three separate contracts (add, mul, exp) allow the on-chain tests to verify each overflow error message independently.
Git Commit 64a2ad6d Branch pull/704/head Document 153/1,438 ++ 0 --
achidlow puya
chore: compile all
Git Commit 92573d66 Branch main Document 42/1,927 ++ 550 --