mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 07:07:07 +03:00
e5ae160d1a
* 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> |
||
---|---|---|
.. | ||
auction | ||
basic_bank | ||
battleship | ||
bubblesort | ||
core | ||
fibonacci | ||
groups | ||
hackers-delight | ||
helloworld | ||
interest | ||
message | ||
simple_token | ||
tictactoe | ||
token | ||
twoadicity | ||
vote | ||
README.md |
Leo Examples
This directory includes the following Leo code examples:
- Hello World -> Basic Sum of two u32
- Groups -> Basic operations over groups
- Core -> Core functions over a field type
- Bubblesort -> Sorting algorithms over a tuple
- Import point -> Import code from another file
- Message -> Initialization of a struct
- Token -> Record example
Build Guide
To compile each example, run:
leo build
When you run this command for the first time the snarkvm parameters (universal setup) will be downloaded, these are necessary to run the programs.
To run each program, run:
leo run main
This command will look in the input file inputs/*.in where should find a section [main] and use the variables as inputs to the program.