Skip to content

Commit

Permalink
Add faucet auth token to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostWalker562 committed Oct 28, 2024
1 parent 46682d8 commit bc6b305
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions examples/simulate_transfer_coin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bc6b305

Please sign in to comment.