2022-08-10 01:58:13 +03:00
|
|
|
# Build and run the auction Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`auction\` program..."
|
2022-08-09 01:20:29 +03:00
|
|
|
(
|
2022-08-10 01:58:13 +03:00
|
|
|
cd ./project/examples/auction || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run place_bid || exit
|
|
|
|
$LEO run resolve || exit
|
|
|
|
$LEO run finish || exit
|
2022-09-20 04:59:33 +03:00
|
|
|
|
2023-02-16 19:49:13 +03:00
|
|
|
chmod +x ./run.sh || exit
|
|
|
|
./run.sh || exit
|
2022-08-09 01:20:29 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the auction program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`auction\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-09 01:20:29 +03:00
|
|
|
|
2022-09-22 01:59:33 +03:00
|
|
|
# Build and run the basic_bank Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`basic_bank\` program..."
|
2022-09-20 18:38:05 +03:00
|
|
|
(
|
2022-09-22 01:59:33 +03:00
|
|
|
cd ./project/examples/basic_bank || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run issue || exit
|
|
|
|
$LEO run deposit || exit
|
|
|
|
$LEO run withdraw || exit
|
2022-09-20 18:38:05 +03:00
|
|
|
|
2023-02-16 19:49:13 +03:00
|
|
|
chmod +x ./run.sh || exit
|
|
|
|
./run.sh || exit
|
2022-09-20 18:38:05 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the basic_bank program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`basic_bank\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-20 18:38:05 +03:00
|
|
|
|
2022-09-22 01:59:33 +03:00
|
|
|
# Build and run the battleship Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`battleship\` program..."
|
2022-09-22 01:59:33 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/battleship || exit
|
|
|
|
|
2023-02-16 19:49:13 +03:00
|
|
|
chmod +x ./run.sh || exit
|
|
|
|
./run.sh || exit
|
2022-09-22 01:59:33 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the battleship program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`battleship\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-22 01:59:33 +03:00
|
|
|
|
2022-08-09 01:20:29 +03:00
|
|
|
# Build and run the bubblesort Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`bubblesort\` program..."
|
2022-08-09 01:20:29 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/bubblesort || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run bubblesort || exit
|
2022-08-09 01:32:41 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the bubblesort program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`bubblesort\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-09 01:32:41 +03:00
|
|
|
|
|
|
|
# Build and run the core example Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`core\` program..."
|
2022-08-09 01:32:41 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/core || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run main || exit
|
2022-08-09 01:32:41 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the core program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`core\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-09 01:32:41 +03:00
|
|
|
|
|
|
|
# Build and run the groups example Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`groups\` program..."
|
2022-08-09 01:32:41 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/groups || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run main || exit
|
2022-08-09 01:32:41 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the groups program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`groups\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-09 01:32:41 +03:00
|
|
|
|
2022-09-22 01:59:33 +03:00
|
|
|
# Build and run the hackers-delight/ntzdebruijin program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`hackers-delight/ntzdebruijin\` program..."
|
2022-09-22 01:59:33 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/hackers-delight/ntzdebruijin || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run || exit
|
2022-09-22 01:59:33 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the hackers-delight/ntzdebruijin program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`hackers-delight/ntzdebruijin\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-22 01:59:33 +03:00
|
|
|
|
|
|
|
# Build and run the hackers-delight/ntzgaudet program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`hackers-delight/ntzgaudet\` program..."
|
2022-09-22 01:59:33 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/hackers-delight/ntzgaudet || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run || exit
|
2022-09-22 01:59:33 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the hackers-delight/ntzgaudet program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`hackers-delight/ntzgaudet\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-22 01:59:33 +03:00
|
|
|
|
|
|
|
# Build and run the hackers-delight/ntzloops program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`hackers-delight/ntzloops\` program..."
|
2022-09-22 01:59:33 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/hackers-delight/ntzloops || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run || exit
|
2022-09-22 01:59:33 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the hackers-delight/ntzloops program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`hackers-delight/ntzloops\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-22 01:59:33 +03:00
|
|
|
|
|
|
|
# Build and run the hackers-delight/ntzmasks program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`hackers-delight/ntzmasks\` program..."
|
2022-09-22 01:59:33 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/hackers-delight/ntzmasks || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run || exit
|
2022-09-22 01:59:33 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the hackers-delight/ntzmasks program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`hackers-delight/ntzmasks\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-22 01:59:33 +03:00
|
|
|
|
|
|
|
# Build and run the hackers-delight/ntzreisers program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`hackers-delight/ntzreisers\` program..."
|
2022-09-22 01:59:33 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/hackers-delight/ntzreisers || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run || exit
|
2022-09-22 01:59:33 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the hackers-delight/ntzreisers program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`hackers-delight/ntzreisers\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-22 01:59:33 +03:00
|
|
|
|
|
|
|
# Build and run the hackers-delight/ntzseals program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`hackers-delight/ntzseals\` program..."
|
2022-09-22 01:59:33 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/hackers-delight/ntzseals || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run || exit
|
2022-09-22 01:59:33 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the hackers-delight/ntzseals program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`hackers-delight/ntzseals\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-22 01:59:33 +03:00
|
|
|
|
|
|
|
# Build and run the hackers-delight/ntzsearchtree program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`hackers-delight/ntzsearchtree\` program..."
|
2022-09-22 01:59:33 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/hackers-delight/ntzsearchtree || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run || exit
|
2022-09-22 01:59:33 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the hackers-delight/ntzsearchtree program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`hackers-delight/ntzsearchtree\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-22 01:59:33 +03:00
|
|
|
|
|
|
|
# Build and run the hackers-delight/ntzsmallvals program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`hackers-delight/ntzsmallvals\` program..."
|
2022-09-22 01:59:33 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/hackers-delight/ntzsmallvals || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run || exit
|
2022-09-22 01:59:33 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the hackers-delight/ntzsmallvals program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`hackers-delight/ntzsmallvals\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-22 01:59:33 +03:00
|
|
|
|
2022-08-10 01:58:13 +03:00
|
|
|
# Build and run the helloworld Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`helloworld\` program..."
|
2022-08-10 01:58:13 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/helloworld || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run main || exit
|
2022-08-10 01:58:13 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the helloworld program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`helloworld\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-10 01:58:13 +03:00
|
|
|
|
2022-08-09 01:32:41 +03:00
|
|
|
# Build and run the import point example Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`import_point\` program..."
|
2022-08-09 01:32:41 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/import_point || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run main || exit
|
2022-08-09 01:32:41 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the import point program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`import_point\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-09 01:32:41 +03:00
|
|
|
|
2022-08-09 02:04:03 +03:00
|
|
|
# Build and run the interest example Leo programs.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`interest\` programs..."
|
2022-08-09 02:04:03 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/import_point || exit
|
|
|
|
|
|
|
|
# Run the fixed period interest program.
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run fixed_period_interest || exit
|
2022-08-09 02:04:03 +03:00
|
|
|
|
|
|
|
# Run the bounded period interest program.
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run bounded_period_interest || exit
|
2022-08-09 02:04:03 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the interest programs ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`interest\` programs failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-09 02:04:03 +03:00
|
|
|
|
2022-08-09 01:32:41 +03:00
|
|
|
# Build and run the message example Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`message\` program..."
|
2022-08-09 01:32:41 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/message || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run main || exit
|
2022-08-09 01:32:41 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the message program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`message\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-09 01:32:41 +03:00
|
|
|
|
2022-08-10 02:01:31 +03:00
|
|
|
# Build and run the tic tac toe example Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`tictactoe\` program..."
|
2022-08-10 02:01:31 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/tictactoe || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run new || exit
|
|
|
|
$LEO run make_move || exit
|
2022-09-20 05:32:31 +03:00
|
|
|
|
2023-02-16 19:49:13 +03:00
|
|
|
chmod +x ./run.sh || exit
|
|
|
|
./run.sh || exit
|
2022-08-10 02:01:31 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the tic tac toe program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`tictactoe\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-10 02:01:31 +03:00
|
|
|
|
2022-09-03 02:20:39 +03:00
|
|
|
# Build and run the simple token example programs.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`simple_token\` programs..."
|
2022-08-09 01:32:41 +03:00
|
|
|
(
|
2022-09-03 02:20:39 +03:00
|
|
|
cd ./project/examples/simple_token || exit
|
2022-08-09 01:32:41 +03:00
|
|
|
|
|
|
|
# Run the mint program.
|
|
|
|
$LEO run mint
|
|
|
|
|
|
|
|
# Run the transfer program.
|
|
|
|
$LEO run transfer
|
2022-08-10 02:05:28 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the simple token programs ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`simple_token\` programs failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-10 02:05:28 +03:00
|
|
|
|
2022-09-03 02:20:39 +03:00
|
|
|
# Build and run the token example program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`token\` program..."
|
2022-09-03 02:20:39 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/token || exit
|
|
|
|
|
|
|
|
# Run the mint_public function.
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run mint_public || exit
|
2022-09-03 02:20:39 +03:00
|
|
|
|
|
|
|
# Run the mint_private function.
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run mint_private || exit
|
2022-09-03 02:20:39 +03:00
|
|
|
|
|
|
|
# Run the transfer_public function.
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run transfer_public || exit
|
2022-09-03 02:20:39 +03:00
|
|
|
|
|
|
|
# Run the transfer_private function.
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run transfer_private || exit
|
2022-09-03 02:20:39 +03:00
|
|
|
|
|
|
|
# Run the transfer_private_to_public function.
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run transfer_private_to_public || exit
|
2022-09-03 02:20:39 +03:00
|
|
|
|
|
|
|
# Run the transfer_public_to_private function.
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run transfer_public_to_private || exit
|
2022-09-03 02:20:39 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the token program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`token\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-09-03 02:20:39 +03:00
|
|
|
|
2022-08-10 02:05:28 +03:00
|
|
|
# Build and run the two-adicity program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`twoadicity\` program..."
|
2022-08-10 02:05:28 +03:00
|
|
|
(
|
|
|
|
cd ./project/examples/twoadicity || exit
|
2023-02-16 19:49:13 +03:00
|
|
|
$LEO run main || exit
|
2022-09-03 02:20:39 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the two-adicity program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`twoadicity\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|
2022-08-11 19:38:13 +03:00
|
|
|
|
2022-09-22 01:59:33 +03:00
|
|
|
# Build and run the vote Leo program.
|
2023-02-16 09:02:27 +03:00
|
|
|
echo "Building and running the \`vote\` program..."
|
2022-08-11 19:38:13 +03:00
|
|
|
(
|
2022-09-22 01:59:33 +03:00
|
|
|
cd ./project/examples/vote || exit
|
2022-08-11 19:38:13 +03:00
|
|
|
|
2023-02-16 19:49:13 +03:00
|
|
|
chmod +x ./run.sh || exit
|
|
|
|
./run.sh || exit
|
2023-02-16 09:02:27 +03:00
|
|
|
)
|
2023-02-16 19:49:13 +03:00
|
|
|
# Check that the vote program ran successfully.
|
|
|
|
EXITCODE=$?
|
|
|
|
if [ $EXITCODE -ne 0 ]; then
|
|
|
|
echo "The \`vote\` program failed to run successfully."
|
|
|
|
exit $EXITCODE
|
|
|
|
fi
|