Commit Graph

221 Commits

Author SHA1 Message Date
d0cd
b236918df4
[Feature] Support ChaCha::rand_* (#2433)
* Add tests for ChaCha::rand*

* Add Chacha::rand* to AST, tyc, and codegen

* Add lottery example

* Regen expectations

* Add check asserting that command is only used in finalize block

* Update example and related CI
2023-06-28 21:02:50 -07:00
Collin Chin
e5ae160d1a
Implement new hash and commit functions (#2415)
* refactor hash -> hash_to_field

* refactor commit -> commit_to_field

* implement commit_to_address

* implement hash_to_address

* update hash and commit examples

* implement hash_to_scalar

* update tests

* implement bhp hash to integer variants

* implement bhp pedersen and poseidon integer variants

* Update compiler/passes/src/type_checking/checker.rs

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* Update compiler/passes/src/type_checking/checker.rs

Co-authored-by: Alessandro Coglio <coglio@kestrel.edu>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* fix pedersen hash type checks

---------

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Co-authored-by: Alessandro Coglio <coglio@kestrel.edu>
2023-06-15 19:55:03 -07:00
Collin Chin
d83c4be330
Implement Mapping::get_or_use (#2413)
* get_or_init -> get_or_use

* use mapping get_or_use in examples

* fix codegen for Mapping::get_or_use

* fix tests for Mapping::get_or_use

* fix warnings, update snarvm rev

* bump circle rust img v1.70

* fix codegen

* update snarkvm rev and regen tests

* Update compiler/parser/src/parser/expression.rs

Co-authored-by: d0cd <pranavsaig@gmail.com>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* Delete program.json

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* Delete program.json

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

---------

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Co-authored-by: d0cd <pranavsaig@gmail.com>
2023-06-13 12:09:33 -07:00
Collin Chin
42d97d3d89
implement group::GEN Leo syntax (#2401)
* implement group::GEN Leo syntax

* revert unrelated test changes

* move new errors to bottom of file to keep previous error codes consistent
2023-05-31 16:05:56 -07:00
d0cd
d0c29ce8e0
[Update] snarkvm 0.11.0 (#2377)
* Remove gates from tests

* Remove Finalize test namespace

* Remove gates from examples

* Remove gates from compiler

* Regen expectations

* Add test that gates is allowed as a standard field of a record

* Update Rust version in CI

* Add check for MAX_MAPPINGS
2023-05-10 21:32:37 -07:00
Pranav Gaddamadugu
f88ddfead5 Update examples 2023-04-18 17:14:01 -07:00
Pranav Gaddamadugu
571786c3c6 Fix example 2023-04-18 17:08:09 -07:00
Pranav Gaddamadugu
9cb5ac1d91 Update examples 2023-04-18 16:59:07 -07:00
Pranav Gaddamadugu
a0b00ac78c Update examples; fmt 2023-04-18 16:59:07 -07:00
Pranav Gaddamadugu
2881fce2ec Update examples 2023-04-18 16:37:45 -07:00
d0cd
751e79a66e More fixes to example scripts
WIP scripts

WIP alias leo

WIP alias leo

WIP alias leo
2023-02-16 12:51:19 -08:00
d0cd
9ad7a0477c Update example scripts 2023-02-16 09:13:51 -08:00
d0cd
48a1f0590b
Rename console.assert* to assert*. (#2205)
* Add assert statements to AST

* Add support in passes

* Add parser support

* Add tyc support

* Add support for assert statements in the remaining passes

* Fix examples, tests, and regen expectations

* Fmt

* Regen expectations
2022-12-06 21:56:48 -08:00
collin
f6f286ac8a pull testnet3, regen tests 2022-11-23 02:37:57 -05:00
d0cd
21a015ede4 Update examples 2022-11-12 11:28:03 -08:00
Tom-OriginStorage
64bd319f3d Fix issues highlighted in #2156 2022-11-05 15:25:06 +08:00
Tom-OriginStorage
e5d053e471 Add Fibonacci example 2022-11-04 18:57:55 +08:00
Eric McCarthy
24540a5c67 fix typo in program name 2022-10-06 21:30:30 -07:00
Pranav Gaddamadugu
d7813923d2 More examples 2022-10-06 00:17:51 -07:00
Pranav Gaddamadugu
35f77f2a12 More examples 2022-10-05 23:52:22 -07:00
Pranav Gaddamadugu
8283c922f6 Some bug fixes; update some examples 2022-10-05 15:27:54 -07:00
Pranav Gaddamadugu
a886357585 Update examples to use transition keyword 2022-10-03 11:22:37 -07:00
Pranav Gaddamadugu
99ec270f8a Rename examples 2022-09-30 10:37:29 -07:00
Alessandro Coglio
cc40de6247 [examples] Add battleship diagram to TOC. 2022-09-26 09:37:58 -07:00
Alessandro Coglio
ae42bac1c0 [examples] Fix typo. 2022-09-23 20:34:48 -07:00
Alessandro Coglio
ad5b15bda8 [examples] Add battleship diagram. 2022-09-23 20:30:37 -07:00
Alessandro Coglio
5456795771 Merge with testnet3. 2022-09-21 18:20:02 -07:00
Alessandro Coglio
06e8036081 [examples] Improve/fix battleship README. 2022-09-21 18:14:52 -07:00
collin
6e89652210 update check-examples circle ci script 2022-09-21 16:45:13 -07:00
collin
eafd265f75 unify leo examples with workshop, run all examples in circleci 2022-09-21 15:59:33 -07:00
Collin Chin
2374f386e9
Merge pull request #2089 from AleoHQ/fix-battleship-readme
fix battleship readme - does not change any code
2022-09-21 15:20:35 -07:00
Collin Chin
716633a740
Merge pull request #2083 from AleoHQ/doc-fixes
[examples] Some doc fixes.
2022-09-21 15:19:16 -07:00
Collin Chin
efd4de44fa
Merge pull request #2082 from AleoHQ/example/update-readmes
Update READMEs for example.
2022-09-21 15:17:58 -07:00
collin
8be9c1fdb3 fix battleship readme - does not change any code 2022-09-21 15:05:21 -07:00
Alessandro Coglio
4002ad8215 Merge with testnet3. 2022-09-21 13:33:56 -07:00
Pranav Gaddamadugu
bf50384dd5 Update examples to use async before finalize 2022-09-21 13:23:24 -07:00
Collin Chin
b3aad45164
Merge pull request #2081 from AleoHQ/feat/battleship
Commit battleship example
2022-09-21 00:36:21 -07:00
collin
0ce3fcd966 commit bash script 2022-09-21 00:09:40 -07:00
Alessandro Coglio
2419408444 [examples] Some doc fixes. 2022-09-21 00:07:10 -07:00
collin
75e90c4eaa fully working with correct readme 2022-09-20 23:50:27 -07:00
Pranav Gaddamadugu
ad93709036 Update 2022-09-20 23:45:44 -07:00
Pranav Gaddamadugu
67aeaa3412 Update docs 2022-09-20 23:32:12 -07:00
Pranav Gaddamadugu
f7b5e213e6 Battleship example compiles 2022-09-20 21:45:16 -07:00
Pranav Gaddamadugu
975677f832 WIP docs 2022-09-20 19:20:22 -07:00
collin
48530523d9 wip need to finish external inputs 2022-09-20 18:26:22 -07:00
collin
368d4c530c push code to parse returning external records + battleship example 2022-09-20 17:17:43 -07:00
collin
0a86a05d20 push code to parse external calls 2022-09-20 13:58:52 -07:00
Pranav Gaddamadugu
91a2137136 Update docs for auction example 2022-09-20 13:00:14 -07:00
Pranav Gaddamadugu
48cb481d73 Update README for tictactoe 2022-09-20 11:52:21 -07:00
collin
b2550b556f remove import_point example - will add after imports stabilized 2022-09-20 10:46:58 -07:00