From 098ad8a737b2674e9dc2850511d6c46a27764434 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 10 Sep 2024 19:06:03 -0400 Subject: [PATCH] added example script for sending tokens --- example-send-token.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 example-send-token.py diff --git a/example-send-token.py b/example-send-token.py new file mode 100644 index 0000000..c32bdcc --- /dev/null +++ b/example-send-token.py @@ -0,0 +1,20 @@ +from core import * + +tokenA_address = '' +tokenA_info = get_token_info(tokenA_address) +tokenA_amount = 1 + +wallet_address = '' +destination_address = '' +set_logging(wallet_address, 'INFO') +account = load_wallet(wallet_address, os.getenv('SECRET')) + +if send_tokens( + account, + tokenA_address, + destination_address, + tokenA_amount +): + logging.info("Sent {} {} to {}".format(tokenA_amount, tokenA_info['symbol'], destination_address)) +else: + logging.info("Failed to send {} {} to {}".format(tokenA_amount, tokenA_info['symbol'], destination_address))