Cover photo

Program execution and deployment on Aleo

First, you need to create a wallet and request test tokens. Go to https://aleo.tools and generate wallet.

Save all data
Save all data

Install this extension. You will need it in the future

Next, go to Twitter and make a tweet:

@AleoFaucet send 10 credits to YOUR_WALLET_ADDRESS

Test tokens will come when your tweet is Quote.

The faucet works very badly, sometimes you have to wait up to 6 hours.
The faucet works very badly, sometimes you have to wait up to 6 hours.

After you have received the test tokens we will need a terminal. I will use Gitpod.

Enter command into the terminal (below is one command).

curl -o script.sh -L https://raw.githubusercontent.com/Salvatorenodes/Aleo-Deploy/main/script.sh && chmod +x script.sh && ./script.sh
Enter the name of the repository where you created the Gitpod session
Enter the name of the repository where you created the Gitpod session

It will be a long installation, do not close the terminal window.

Deploy

When the installation is finished, continue entering commands.

mkdir demo_deploy_Leo_app && cd demo_deploy_Leo_app
WALLETADDRESS="YOUR_ALEO_WALLET_ADDRESS"
APPNAME=helloworld_"${WALLETADDRESS:4:6}"
leo new "${APPNAME}"
cd "${APPNAME}" && leo run && cd -
PATHTOAPP=$(realpath -q $APPNAME)
cd $PATHTOAPP && cd ..
PRIVATEKEY="ALEO_WALLET_PRIVATE_KEY"
RECORD="YOUR_RECORD"

To find the RECORD value, follow the link from Quote to the message in which you requested the tokens

post image
post image

Copy the value and go to https://aleo.tools, click Record tab, paste your copied value and View Key.

Copy code and put it between "" and paste it into the terminal.

post image

Run last command:

snarkos developer deploy "${APPNAME}.aleo" --private-key "${PRIVATEKEY}" --query "https://vm.aleo.org/api" --path "./${APPNAME}/build/" --broadcast "https://vm.aleo.org/api/testnet3/transaction/broadcast" --fee 600000 --record "${RECORD}"

GG you made it

post image

P.S. if you want to use a different account, go back to the initial location and start with the Deploy chapter

cd /workspace/YOUR_REPOSITORY_NAME/
rm -r demo_deploy_Leo_app