Step 1: Create a new Aleo wallet in seconds:
• Already have a wallet? Skip this step ✅
• Visithttps://aleo.tools/ and click "Generate" to create a secure wallet. Save the output 🔒
Finally, use your keys to add variables to your server with these commands
Step 2: Get tokens for your wallet
Simply text +1-867-888-5688 with the format below and receive 50 credits instantly.
Send: "50 credits to aleo1jjjnu3xk05h239ak5w2x5ejfh6del0whpe7pgya0pu00cp4pn5yq40ykus"
Step 3: Grab packages and start a slick tmux session.
sudoaptupdate&&\sudoaptinstallmakeclangpkg-configlibssl-devbuild-essentialgccxz-utilsgitcurlvimtmuxntpjqllvmufw-y&&\tmuxnew-sdeploy
Building a binary requires creating a tmux session, which may take some time. But don't worry - if your ssh connection is lost, you won't have to rebuild everything. Just reconnect to your existing tmux session and pick up where you left off.
Step 4: Add your wallet and private key as a variable.
echoEnteryourPrivateKey:&&readPK&&\echoEnteryourViewKey:&&readVK&&\echoEnteryourAddress:&&readADDRESS
Step 5: Make sure the data is correct. If not, you can do step 4 again.
echoPrivateKey:$PK&&\echoViewKey:$VK&&\echoAddress:$ADDRESS
Once you get a message from the bot confirming your wallet has been replenished, head tohttps://faucet.aleo.org/ and double-check the transaction went through.
Use the Transaction ID as the answer when using the following command.
echoEnteryourTransactionID:&&readTI
CIPHERTEXT=$(curl-shttps://vm.aleo.org/api/testnet3/transaction/$TI | jq -r '.execution.transitions[0].outputs[0].value')
Step 6: Install required software
cd$HOMEgitclonehttps://github.com/AleoHQ/snarkOS.git --depth 1cdsnarkOSbash./build_ubuntu.shsource$HOME/.bashrcsource$HOME/.cargo/env
cd$HOMEgitclonehttps://github.com/AleoHQ/leo.gitcdleocargoinstall--path.
Step 7: Deploy a contract
NAME=helloworld_"${ADDRESS:4:6}"mkdir$HOME/leo_deploycd$HOME/leo_deployleonew$NAME
RECORD=$(snarkosdeveloperdecrypt--ciphertext$CIPHERTEXT--view-key$VK)
snarkosdeveloperdeploy"$NAME.aleo"\--private-key"$PK"\--query"https://vm.aleo.org/api"\--path"$HOME/leo_deploy/$NAME/build/"\--broadcast"https://vm.aleo.org/api/testnet3/transaction/broadcast"\--fee4000000\--record"$RECORD"
After executing the command, you should see a similar result.
root@DS-A-1:~/Leo_deploy# snarkos developer deploy "$NAME.aleo" --private-key "$PK" --query "https://vm.aleo.org/api" --path "$HOME/Leo_deploy/SNAME/build/" --broadcast "https://vm.aleo.org/api/testn
et3/transaction/broadcast" --fee 4000000 --record "$RECORD"
Creating deployment transaction for 'helloworld_1m3y73.aleo'...
Created deployment transaction for 'helloworld_1m3y73.aleo'
Successfully deployed helloworld_1m3y73.aleo' to https: //vm.aleo.org/api/testnet3/transaction/broadcast.
Use the resulting transaction hash to find your contract in Explorer:https://explorer.hamp.app/
If your contract shows up in Explorer, you can go to the next step.
Step 8: Execute a contract
Use the transaction hash as the answer for the following command.
echoEnteryourDeployhash:&&readDH
CIPHERTEXT=$(curl-shttps://vm.aleo.org/api/testnet3/transaction/$DH | jq -r '.fee.transition.outputs[].value')
RECORD=$(snarkosdeveloperdecrypt--ciphertext$CIPHERTEXT--view-key$VK)
snarkosdeveloperexecute"$NAME.aleo""hello""1u32""2u32"\--private-key$PK\--query"https://vm.aleo.org/api"\--broadcast"https://vm.aleo.org/api/testnet3/transaction/broadcast"\--fee1000000\--record"$RECORD"
After execution, you should see the following output
root@DS-A-1:~/leo_deploy# snarkos developer execute "$NAME.aleo" "hello" "1u32" "2u32" --private-key $PK --query "https://vm.aleo.org/api" --broadcast "https://vm.aleo.org/api/testnet3/transaction/br
oadcast"
--fee 1000000 --record "$RECORD"
w Creating execution transaction for 'helloworld_1m3y73.aleo'
© Created execution transaction for 'helloworld_1m3y73.aleo/hello'
© Successfully broadcast execution 'helloworld_1m3y73.aleo/hello' to thehttps://vm.aleo.org/api/testnet3/transaction/broadcast.
Use the resulting transaction hash to find your contract in Explorer:https://explorer.hamp.app/
Congratulations you have deployed the contract to Aleo!
Top comments(1)
For further actions, you may consider blocking this person and/orreporting abuse