diff --git a/auction/.env b/auction/.env index 253455a..3f4c532 100644 --- a/auction/.env +++ b/auction/.env @@ -1,4 +1,3 @@ - -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2GUmKbVsuc1NSj28pa1WTQuZaK5f1DQJAT6vPcHyWokG - +ENDPOINT=https://api.explorer.aleo.org/v1 diff --git a/auction/README.md b/auction/README.md index d9a3963..1f0f711 100644 --- a/auction/README.md +++ b/auction/README.md @@ -81,8 +81,9 @@ Swap in the private key and address of the first bidder to `.env`. ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env ``` @@ -100,8 +101,9 @@ Swap in the private key of the second bidder to `.env`. ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env ``` @@ -119,8 +121,9 @@ Swap in the private key of the auctioneer to `.env`. ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2GUmKbVsuc1NSj28pa1WTQuZaK5f1DQJAT6vPcHyWokG +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env ``` diff --git a/auction/run.sh b/auction/run.sh index 903c0b8..b40d69f 100755 --- a/auction/run.sh +++ b/auction/run.sh @@ -44,8 +44,9 @@ Let's take the role of the first bidder - we'll swap in the private key and addr We're going to run the transition function "place_bid", slotting in the first bidder's public address and the amount that is being bid. The inputs are the user's public address and the amount being bid. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run place_bid aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px 10u64 @@ -53,8 +54,9 @@ leo run place_bid aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9p # Swap in the private key of the first bidder to .env. echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env # Have the first bidder place a bid of 10. @@ -78,8 +80,9 @@ echo " Now we're going to place another bid as the second bidder, so let's switch our keys to the second bidder and run the same transition function, this time with the second bidder's keys, public address, and different amount. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run place_bid aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 90u64 @@ -87,8 +90,9 @@ leo run place_bid aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4 # Swap in the private key of the second bidder to .env. echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env # Have the second bidder place a bid of 90. @@ -112,8 +116,9 @@ echo " Now, let's take the role of the auctioneer, so we can determine which bid wins. Let's swap our keys to the auctioneer and run the resolve command on the output of the two bids from before. The resolve command takes the two output records from the bids as inputs and compares them to determine which bid wins. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2GUmKbVsuc1NSj28pa1WTQuZaK5f1DQJAT6vPcHyWokG +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run resolve '{ @@ -133,8 +138,9 @@ leo run resolve '{ # Swaps in the private key of the auctioneer to .env. echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2GUmKbVsuc1NSj28pa1WTQuZaK5f1DQJAT6vPcHyWokG +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env # Have the auctioneer select the winning bid. diff --git a/basic_bank/.env b/basic_bank/.env index 6a4fe03..1d0b187 100644 --- a/basic_bank/.env +++ b/basic_bank/.env @@ -1,4 +1,4 @@ - -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 diff --git a/basic_bank/README.md b/basic_bank/README.md index 335cabb..a8f8e2f 100644 --- a/basic_bank/README.md +++ b/basic_bank/README.md @@ -71,8 +71,9 @@ Let's make some bank transactions. We'll take the role of the bank and issue 100 ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run issue aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 100u64 @@ -84,8 +85,9 @@ Now, let's have the user deposit 50 of their tokens with the bank. We'll take th ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run deposit "{ @@ -109,8 +111,9 @@ Now, let's have the bank withdraw all tokens after 15 periods. Let's switch to t ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run withdraw aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 50u64 1234u64 15u64 diff --git a/basic_bank/run.sh b/basic_bank/run.sh index 8bc6398..552227e 100755 --- a/basic_bank/run.sh +++ b/basic_bank/run.sh @@ -22,8 +22,9 @@ echo " Let's make some bank transactions. We'll take the role of the bank and issue 100 tokens to the user. We swap the private key into .env and run the issue transition function. The inputs are simply the recipient of the issuance and the amount. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run issue aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 100u64 @@ -31,8 +32,9 @@ leo run issue aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 10 # Swap in the private key of the bank to .env. echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env # Have the bank issue 100 tokens to the user. @@ -83,8 +85,9 @@ echo " Now, let's have the user deposit 50 of their tokens with the bank. We'll take the role of the user and call the deposit function, having the user use the output record that was issued to them by the bank. The inputs are the output record from the issue transition and the amount the user wishes to deposit. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run deposit '{ @@ -96,8 +99,9 @@ leo run deposit '{ # Swap in the private key of the user to .env. echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env # Have the user deposit 50 tokens into the bank. @@ -199,8 +203,9 @@ echo " Now, let's have the bank withdraw all tokens after 15 periods. Let's switch to the bank role, and call the withdraw transition function. The inputs are the recipient's address, amount, rate, and periods. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run withdraw aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 50u64 1234u64 15u64 @@ -208,8 +213,9 @@ leo run withdraw aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t " # Swap in the private key of the bank to .env. echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env # Have the bank withdraw all of the user's tokens with compound interest over 15 periods at 12.34%. diff --git a/battleship/.env b/battleship/.env index 6a4fe03..0c6428d 100644 --- a/battleship/.env +++ b/battleship/.env @@ -1,4 +1,3 @@ - -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH - +ENDPOINT=https://api.explorer.aleo.org/v1 \ No newline at end of file diff --git a/battleship/README.md b/battleship/README.md index e098446..66fa54a 100644 --- a/battleship/README.md +++ b/battleship/README.md @@ -69,8 +69,9 @@ With Player 1's private key, they initialize the board with the placement of 4 s ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run initialize_board 34084860461056u64 551911718912u64 7u64 1157425104234217472u64 aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t @@ -156,8 +157,9 @@ We switch our .env to Player 2's private key and similarly run initialize_board ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run initialize_board 31u64 2207646875648u64 224u64 9042383626829824u64 aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px @@ -248,8 +250,9 @@ We switch the .env back to Player 1, and we run the transition function play. ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run play "{ @@ -304,8 +307,9 @@ We switch the .env back to Player 2, and we run the transition function play. ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run play "{ @@ -365,8 +369,9 @@ We switch the .env back to Player 1, and we run the transition function play. ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run play "{ @@ -433,8 +438,9 @@ We switch the .env back to Player 2, and we run the transition function play. ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run play "{ diff --git a/battleship/run.sh b/battleship/run.sh index 6a7ae92..5c33665 100755 --- a/battleship/run.sh +++ b/battleship/run.sh @@ -26,14 +26,16 @@ echo " ############################################################################### echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env echo " @@ -92,16 +94,18 @@ echo " We switch our .env to Player 2's private key and similarly run initialize_board to create a new and different board for player two. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run initialize_board 31u64 2207646875648u64 224u64 9042383626829824u64 aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run initialize_board 31u64 2207646875648u64 224u64 9042383626829824u64 aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px @@ -162,8 +166,9 @@ echo " We switch the .env back to Player 1, and we run the transition function play. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run play '{ @@ -186,8 +191,9 @@ leo run play '{ " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run play "{ @@ -218,8 +224,9 @@ echo " We switch the .env back to Player 2, and we run the transition function play. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run play '{ @@ -242,8 +249,9 @@ leo run play '{ " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run play "{ @@ -274,8 +282,9 @@ echo " We switch the .env back to Player 1, and we run the transition function play. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run play '{ @@ -298,8 +307,9 @@ leo run play '{ " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run play "{ @@ -330,8 +340,9 @@ echo " We switch the .env back to Player 2, and we run the transition function play. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run play '{ @@ -354,8 +365,9 @@ leo run play '{ " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run play "{ @@ -377,6 +389,7 @@ leo run play "{ }" 4u64 echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env diff --git a/tictactoe/.env b/tictactoe/.env index c7836c7..0c6428d 100644 --- a/tictactoe/.env +++ b/tictactoe/.env @@ -1,2 +1,3 @@ -NETWORK=mainnet +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 \ No newline at end of file diff --git a/token/.env b/token/.env index d4e429c..5b20bd9 100644 --- a/token/.env +++ b/token/.env @@ -1,4 +1,4 @@ - -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 diff --git a/token/README.md b/token/README.md index bf277ec..5e7629e 100644 --- a/token/README.md +++ b/token/README.md @@ -46,8 +46,9 @@ Let's play Alice. Swap in her private key and publicly mint 100 tokens. ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run mint_public aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px 100u64 @@ -61,8 +62,9 @@ Now let's privately mint 100 tokens for Bob. Switch to Bob's private key and pri ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run mint_private aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 100u64 @@ -76,8 +78,9 @@ Let's publicly transfer 10 tokens from Alice to Bob. Swap the private key back t ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run transfer_public aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 10u64 @@ -91,8 +94,9 @@ Let's privately transfer 20 tokens from Bob to Alice. Switch to Bob's private ke ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run transfer_private "{ @@ -110,8 +114,9 @@ Let's convert 30 of Alice's public tokens into 30 private tokens for Bob. Switch ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run transfer_public_to_private aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 30u64 @@ -125,8 +130,9 @@ Let's convert 40 of Bob's private tokens into 40 public tokens for Alice. Switch ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run transfer_private_to_public "{ diff --git a/token/run.sh b/token/run.sh index 549a576..9b46317 100755 --- a/token/run.sh +++ b/token/run.sh @@ -22,16 +22,18 @@ echo " Let's play Alice. Swap in her private key and publicly mint 100 tokens. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run mint_public aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px 100u64 " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run mint_public aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px 100u64 @@ -68,16 +70,18 @@ echo " Now let's privately mint 100 tokens for Bob. Switch to Bob's private key and privately mint 100 tokens for Bob. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run mint_private aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 100u64 " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run mint_private aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 100u64 @@ -114,16 +118,18 @@ echo " Let's publicly transfer 10 tokens from Alice to Bob. Swap the private key back to Alice and call the public transfer transition. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run transfer_public aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 10u64 " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run transfer_public aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 10u64 @@ -160,8 +166,9 @@ echo " Let's privately transfer 20 tokens from Bob to Alice. Switch to Bob's private key and call the private transfer transition. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run transfer_private '{ @@ -172,8 +179,9 @@ leo run transfer_private '{ " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run transfer_private "{ @@ -214,16 +222,18 @@ echo " Let's convert 30 of Alice's public tokens into 30 private tokens for Bob. Switch the private key back to Alice. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run transfer_public_to_private aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 30u64 " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run transfer_public_to_private aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t 30u64 @@ -261,8 +271,9 @@ echo " Let's convert 40 of Bob's private tokens into 40 public tokens for Alice. Switch the private key back to Bob. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run transfer_private_to_public '{ @@ -273,8 +284,9 @@ leo run transfer_private_to_public '{ " echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run transfer_private_to_public "{ diff --git a/vote/.env b/vote/.env index 253455a..e3d2142 100644 --- a/vote/.env +++ b/vote/.env @@ -1,4 +1,4 @@ - -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2GUmKbVsuc1NSj28pa1WTQuZaK5f1DQJAT6vPcHyWokG +ENDPOINT=https://api.explorer.aleo.org/v1 diff --git a/vote/README.md b/vote/README.md index 1196705..696b3ab 100644 --- a/vote/README.md +++ b/vote/README.md @@ -72,8 +72,9 @@ Let's propose a new ballot. Take on the role of the proposer and run the propose ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run propose "{ @@ -91,8 +92,9 @@ Let's create a new private ticket to make a vote. Take on the role of voter 1 an ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run new_ticket 2264670486490520844857553240576860973319410481267184439818180411609250173817field aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t @@ -116,8 +118,9 @@ Let's create a new private ticket for voter 2. Take on the role of voter 1 and r ```bash echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2GUmKbVsuc1NSj28pa1WTQuZaK5f1DQJAT6vPcHyWokG +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env leo run new_ticket 2158670485494560943857353240576760973319410481267184429818180411607250143681field aleo1ashyu96tjwe63u0gtnnv8z5lhapdu4l5pjsl2kha7fv7hvz2eqxs5dz0rg diff --git a/vote/run.sh b/vote/run.sh index 18920cd..053b327 100755 --- a/vote/run.sh +++ b/vote/run.sh @@ -26,8 +26,9 @@ echo " Let's propose a new ballot. Take on the role of the proposer and run the propose transition function. We've provided the necessary information as inputs to the propose function. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run propose '{ @@ -39,8 +40,9 @@ leo run propose '{ # swaps in the private key of the proposer to .env echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp8CZNn3yeCseEtxuVPbDCwSyhGW6yZKUYKfgXmcpoGPWH +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env # runs the propose transition function with proposal info as the input @@ -72,8 +74,9 @@ echo " Let's create a new private ticket to make a vote. Take on the role of voter 1 and run the new_ticket transition. The inputs take a unique ticket ID and the voter's public address. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run new_ticket 2264670486490520844857553240576860973319410481267184439818180411609250173817field aleo1s3ws5tra87fjycnjrwsjcrnw2qxr8jfqqdugnf0xzqqw29q9m5pqem2u4t @@ -81,8 +84,9 @@ leo run new_ticket 2264670486490520844857553240576860973319410481267184439818180 # Swap in the private key of voter 1 to .env. echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2RWGDcde3efb89rjhME1VYA8QMxcxep5DShNBR6n8Yjh +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env # Runs the new_ticket transition function with unique id and voter address as inputs. @@ -140,8 +144,9 @@ echo " Let's create a new private ticket for voter 2. Take on the role of voter 1 and run the new_ticket transition. The inputs take a unique ticket ID and the voter's public address. echo ' -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2GUmKbVsuc1NSj28pa1WTQuZaK5f1DQJAT6vPcHyWokG +ENDPOINT=https://api.explorer.aleo.org/v1 ' > .env leo run new_ticket 2158670485494560943857353240576760973319410481267184429818180411607250143681field aleo1ashyu96tjwe63u0gtnnv8z5lhapdu4l5pjsl2kha7fv7hvz2eqxs5dz0rg @@ -149,8 +154,9 @@ leo run new_ticket 2158670485494560943857353240576760973319410481267184429818180 # Swap in the private key of voter 2 to .env. echo " -NETWORK=testnet3 +NETWORK=testnet PRIVATE_KEY=APrivateKey1zkp2GUmKbVsuc1NSj28pa1WTQuZaK5f1DQJAT6vPcHyWokG +ENDPOINT=https://api.explorer.aleo.org/v1 " > .env # Run the new_ticket transition function with unique id and voter address as inputs.