Skip to content

Commit

Permalink
chore: transferring the advanced examples from avm-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev committed Oct 14, 2024
1 parent fee21cf commit 0efe5c4
Show file tree
Hide file tree
Showing 41 changed files with 177,431 additions and 4,011 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"txn-group-sources": []
"txn-group-sources": [
{
"sourcemap-location": "../../puya/.algokit/sources/contract/ProofOfAttendance.approval.puya.map",
"hash": "cqTkXo2HRQY5h4/nvU46XmZrHlAe5gCdC/Q9eBAPl5k="
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"version": 3,
"sources": [
"opup.teal"
],
"names": [],
"mappings": ";AACA"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#pragma version 6
int 1
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"txn-group-sources": [
{
"sourcemap-location": "contract/ProofOfAttendance.approval.puya.map",
"hash": "cqTkXo2HRQY5h4/nvU46XmZrHlAe5gCdC/Q9eBAPl5k="
"sourcemap-location": "../../ProofOfAttendance.approval.puya.map",
"hash": "9OQMiPyi2J20NA7qdxurd6RlJi8dTAlzNxPzdR7pjPc="
},
{
"sourcemap-location": "opup/approval.teal.map",
"hash": "p0zHRDBy7V/S2TDcAaXYEd2OF8KSxV/1y0ceYEL6qxU="
}
]
}
13 changes: 8 additions & 5 deletions examples/multiRootWorkspace/puya/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@
{
"type": "avm",
"request": "launch",
"name": "Debug Recursive App",

"name": "Debug Puya App",
"simulateTraceFile": "${workspaceFolder}/debug_traces/simulate-response.trace.avm.json",
"programSourcesDescription": {
"txn-group-sources": [
{
"sourcemap-location": "./contract/ProofOfAttendance.approval.puya.map",
"hash": "cqTkXo2HRQY5h4/nvU46XmZrHlAe5gCdC/Q9eBAPl5k="
"sourcemap-location": "../../ProofOfAttendance.approval.puya.map",
"hash": "9OQMiPyi2J20NA7qdxurd6RlJi8dTAlzNxPzdR7pjPc="
},
{
"sourcemap-location": "opup/approval.teal.map",
"hash": "p0zHRDBy7V/S2TDcAaXYEd2OF8KSxV/1y0ceYEL6qxU="
}
]
},
},
"programSourcesDescriptionFolder": "${workspaceFolder}/.algokit/sources/",
"stopOnEntry": true
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import algopy
from algopy import TemplateVar
from algopy import UInt64


class ProofOfAttendance(algopy.ARC4Contract):
Expand All @@ -22,7 +24,7 @@ def confirm_attendance(self) -> None:
assert self.total_attendees < self.max_attendees, "Max attendees reached"

minted_asset = self._mint_poa(algopy.Txn.sender)
self.total_attendees += 1
self.total_attendees += TemplateVar[UInt64]("INCREMENT")

_id, has_claimed = algopy.op.Box.get(algopy.Txn.sender.bytes)
assert not has_claimed, "Already claimed POA"
Expand Down
Loading

0 comments on commit 0efe5c4

Please sign in to comment.