Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: export $CONTRACT var in end to end test #2344

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions yarn-project/end-to-end/src/guides/up_quick_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,39 @@ aztec-cli deploy \
# docs:end:deploy

aztec-cli check-deploy --contract-address 0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f
# docs:start:declare-contract
Copy link
Member

@Maddiaa0 Maddiaa0 Sep 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tag is created but i dont see where it is used

Copy link
Contributor Author

@critesjosh critesjosh Sep 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually be part of this PR: #2322

EDIT: I will move this changes to that PR since it's where it's relevant.

CONTRACT=0x03b030d48607ba8a0562f0f1f82be26c3f091e45e10f74c2d8cebb80d526a69f
critesjosh marked this conversation as resolved.
Show resolved Hide resolved
# docs:end:declare-contract

# 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
Expand Down