This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/teal/example.teal
iscke de5b0e698c
Add a teal lexer (#1671)
* Add a teal lexer

* fix an indent

* convert tests, fix version, alias

* fix examplefile
2021-03-14 17:17:57 +01:00

26 lines
466 B
Text

//example teal code taken from https://developer.algorand.org/tutorials/writing-simple-smart-contract/
// Check the Fee is resonable
// In this case 10,000 microalgos
txn Fee
int 10000
<=
// Check the length of the passphrase is correct
arg 0
len
int 73
==
&&
// The sha256 value of the passphrase
arg 0
sha256
byte base64 30AT2gOReDBdJmLBO/DgvjC6hIXgACecTpFDcP1bJHU=
==
&&
// Make sure the CloseRemainderTo is not set
txn CloseRemainderTo
txn Receiver
==
&&