-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle TMPL_ variables with an underscore
- Loading branch information
1 parent
1f573d4
commit 367ffce
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import beaker | ||
import pyteal | ||
|
||
app = beaker.Application("MultiUnderscoreApp") | ||
|
||
|
||
@app.external | ||
def some_value(*, output: pyteal.abi.Uint64) -> pyteal.Expr: | ||
return output.set(pyteal.Tmpl.Int("TMPL_SOME_VALUE")) | ||
|
||
|
||
@app.update(bare=True, authorize=beaker.Authorize.only_creator()) | ||
def update() -> pyteal.Expr: | ||
return pyteal.Assert(pyteal.Tmpl.Int("TMPL_UPDATABLE"), comment="is updatable") | ||
|
||
|
||
@app.delete(bare=True, authorize=beaker.Authorize.only_creator()) | ||
def delete() -> pyteal.Expr: | ||
return pyteal.Assert(pyteal.Tmpl.Int("TMPL_DELETABLE"), comment="is deletable") | ||
|
||
|
||
@app.create(bare=True) | ||
def create() -> pyteal.Expr: | ||
return pyteal.Approve() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters