From bc6b3059cb2b7eff260ced23346a41638b5054fc Mon Sep 17 00:00:00 2001 From: Philip Vu Date: Mon, 28 Oct 2024 16:19:38 -0700 Subject: [PATCH] Add faucet auth token to tests --- examples/common.py | 1 + examples/simulate_transfer_coin.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/common.py b/examples/common.py index 6ac9d84..46a3e00 100644 --- a/examples/common.py +++ b/examples/common.py @@ -13,6 +13,7 @@ "APTOS_FAUCET_URL", "https://faucet.devnet.aptoslabs.com", ) +FAUCET_AUTH_TOKEN = os.getenv("APTOS_FAUCET_AUTH_TOKEN") INDEXER_URL = os.getenv( "APTOS_INDEXER_URL", "https://api.devnet.aptoslabs.com/v1/graphql", diff --git a/examples/simulate_transfer_coin.py b/examples/simulate_transfer_coin.py index 137b2e1..599f689 100644 --- a/examples/simulate_transfer_coin.py +++ b/examples/simulate_transfer_coin.py @@ -14,12 +14,14 @@ ) from aptos_sdk.type_tag import StructTag, TypeTag -from .common import FAUCET_URL, NODE_URL +from .common import FAUCET_URL, FAUCET_AUTH_TOKEN, NODE_URL async def main(): rest_client = RestClient(NODE_URL) - faucet_client = FaucetClient(FAUCET_URL, rest_client) # <:!:section_1 + faucet_client = FaucetClient( + FAUCET_URL, rest_client, FAUCET_AUTH_TOKEN + ) # <:!:section_1 alice = Account.generate() bob = Account.generate()