mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-18 07:11:53 +03:00
d31b707c4b
* improve leo example run scripts * add leo build warning message, reduce number of calls to snarkvm package open * cargo clippy * Update examples/token/run.sh Co-authored-by: Eric McCarthy <7607035+bendyarm@users.noreply.github.com> Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> * Update examples/token/run.sh Co-authored-by: Eric McCarthy <7607035+bendyarm@users.noreply.github.com> Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> * Update examples/token/run.sh Co-authored-by: Eric McCarthy <7607035+bendyarm@users.noreply.github.com> Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> * Update examples/token/run.sh Co-authored-by: Eric McCarthy <7607035+bendyarm@users.noreply.github.com> Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> * Update examples/token/run.sh Co-authored-by: Eric McCarthy <7607035+bendyarm@users.noreply.github.com> Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> * fix comments * make auctioneer the starting private key in auction example --------- Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com> Co-authored-by: Eric McCarthy <7607035+bendyarm@users.noreply.github.com>
63 lines
3.0 KiB
Bash
Executable File
63 lines
3.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# First check that Leo is installed.
|
|
if ! command -v leo &> /dev/null
|
|
then
|
|
echo "leo is not installed."
|
|
exit
|
|
fi
|
|
|
|
echo "
|
|
###############################################################################
|
|
######## ########
|
|
######## STEP 1: Propose a new ballot ########
|
|
######## ########
|
|
######## --------------------------- ########
|
|
######## | | Yes | No | ########
|
|
######## --------------------------- ########
|
|
######## | Votes | | | ########
|
|
######## --------------------------- ########
|
|
######## ########
|
|
###############################################################################
|
|
"
|
|
# Run the `propose` program function
|
|
(
|
|
leo run propose || exit
|
|
)
|
|
|
|
echo "
|
|
###############################################################################
|
|
######## ########
|
|
######## STEP 2: Issue a new ballot ticket ########
|
|
######## ########
|
|
######## --------------------------- ########
|
|
######## | | Yes | No | ########
|
|
######## --------------------------- ########
|
|
######## | Votes | 0 | 0 | ########
|
|
######## --------------------------- ########
|
|
######## ########
|
|
###############################################################################
|
|
"
|
|
# Run the `new_ticket` program function
|
|
(
|
|
leo run new_ticket || exit
|
|
)
|
|
|
|
echo "
|
|
###############################################################################
|
|
######## ########
|
|
######## STEP 3: Vote 'Yes' on the ballot ticket ########
|
|
######## ########
|
|
######## --------------------------- ########
|
|
######## | | Yes | No | ########
|
|
######## --------------------------- ########
|
|
######## | Votes | 1 | 0 | ########
|
|
######## --------------------------- ########
|
|
######## ########
|
|
###############################################################################
|
|
"
|
|
# Run the `agree` or `disagree` program function
|
|
(
|
|
leo run agree || exit
|
|
# leo run disagree || exit
|
|
)
|