leo/examples
2023-10-19 21:02:05 -07:00
..
auction Update leo examples (#2501) 2023-07-24 10:33:41 -07:00
basic_bank Update leo examples (#2501) 2023-07-24 10:33:41 -07:00
battleship Update leo examples (#2501) 2023-07-24 10:33:41 -07:00
bubblesort [Feature] Implement leo execute (#2491) 2023-07-19 18:04:09 -07:00
core [examples] Update some example files. (#2493) 2023-07-21 17:13:06 -07:00
fibonacci [Feature] Implement leo execute (#2491) 2023-07-19 18:04:09 -07:00
groups [examples] Update some example files. (#2493) 2023-07-21 17:13:06 -07:00
hackers-delight [Feature] Implement leo execute (#2491) 2023-07-19 18:04:09 -07:00
helloworld chore(leo): bump version for new release 2023-10-19 21:02:05 -07:00
interest [Feature] Implement leo execute (#2491) 2023-07-19 18:04:09 -07:00
lottery commit run scripts, bump rust ci img versions (#2526) 2023-08-15 08:48:18 -07:00
message [Feature] Implement leo execute (#2491) 2023-07-19 18:04:09 -07:00
simple_token [examples] Update some example files. (#2493) 2023-07-21 17:13:06 -07:00
tictactoe Fixing a bug in examples/TicTacToe (#1) 2023-10-05 14:43:55 +05:30
token Commit leo example tests (#2524) 2023-08-14 15:26:55 -07:00
twoadicity [Feature] Implement leo execute (#2491) 2023-07-19 18:04:09 -07:00
vote Update leo examples (#2501) 2023-07-24 10:33:41 -07:00
README.md [Feature] Implement leo execute (#2491) 2023-07-19 18:04:09 -07:00

Leo Examples

This directory includes the following Leo code examples:

  1. Hello World -> Basic Sum of two u32
  2. Groups -> Basic operations over groups
  3. Core -> Core functions over a field type
  4. Bubblesort -> Sorting algorithms over a tuple
  5. Import point -> Import code from another file
  6. Message -> Initialization of a struct
  7. Token -> Record example

Run Guide

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.

Execute Guide

To execute each program call, run:

leo execute main <inputs> --endpoint <endpoint>