From c1dfd390f568f6326873a5fa8dda0b2a1686f4df Mon Sep 17 00:00:00 2001 From: Josh Crites Date: Fri, 15 Sep 2023 15:03:12 -0400 Subject: [PATCH 1/2] export $CONTRACT var --- yarn-project/end-to-end/src/guides/up_quick_start.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/yarn-project/end-to-end/src/guides/up_quick_start.sh b/yarn-project/end-to-end/src/guides/up_quick_start.sh index c27ff3454f3..79914310665 100755 --- a/yarn-project/end-to-end/src/guides/up_quick_start.sh +++ b/yarn-project/end-to-end/src/guides/up_quick_start.sh @@ -16,36 +16,37 @@ aztec-cli deploy \ # docs:end:deploy aztec-cli check-deploy --contract-address 0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f +CONTRACT=0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f # docs:start:get-balance aztec-cli call getBalance \ --args $ALICE \ --contract-abi PrivateTokenContractAbi \ - --contract-address 0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f + --contract-address $CONTRACT # docs:end:get-balance # docs:start:transfer aztec-cli send transfer \ --args 500 $ALICE $BOB \ --contract-abi PrivateTokenContractAbi \ - --contract-address 0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f \ + --contract-address $CONTRACT \ --private-key 0xb2803ec899f76f6b2ac011480d24028f1a29587f8a3a92f7ee9d48d8c085c284 aztec-cli call getBalance \ --args $ALICE \ --contract-abi PrivateTokenContractAbi \ - --contract-address 0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f + --contract-address $CONTRACT aztec-cli call getBalance \ --args $BOB \ --contract-abi PrivateTokenContractAbi \ - --contract-address 0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f + --contract-address $CONTRACT # docs:end:transfer aztec-cli get-logs # Test end result -BOB_BALANCE=$(aztec-cli call getBalance --args $BOB --contract-abi PrivateTokenContractAbi --contract-address 0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f) +BOB_BALANCE=$(aztec-cli call getBalance --args $BOB --contract-abi PrivateTokenContractAbi --contract-address $CONTRACT) if ! echo $BOB_BALANCE | grep -q 500; then echo "Incorrect Bob balance after transaction (expected 500 but got $BOB_BALANCE)" exit 1 From d6bdf846227268ac8612c19e9627eea18f020d98 Mon Sep 17 00:00:00 2001 From: josh crites Date: Fri, 15 Sep 2023 16:10:01 -0400 Subject: [PATCH 2/2] Update up_quick_start.sh --- yarn-project/end-to-end/src/guides/up_quick_start.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yarn-project/end-to-end/src/guides/up_quick_start.sh b/yarn-project/end-to-end/src/guides/up_quick_start.sh index 79914310665..a64931e3552 100755 --- a/yarn-project/end-to-end/src/guides/up_quick_start.sh +++ b/yarn-project/end-to-end/src/guides/up_quick_start.sh @@ -16,7 +16,9 @@ aztec-cli deploy \ # docs:end:deploy aztec-cli check-deploy --contract-address 0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f +# docs:start:declare-contract CONTRACT=0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f +# docs:end:declare-contract # docs:start:get-balance aztec-cli call getBalance \