I want to send USDT TRC20 tokens using tronpy, while i succeded to transfer TRX, same approach failed for the TRC20 tokens, here's my code:
import codecs
from tronpy.keys import PrivateKey
from hexbytes import HexBytes
def transfer(self,…
have a exceptions when try to get a acount balance use a tronpy
exception: tronpy.exceptions.AddressNotFound: account not found on-chain
have this problem with a new wallet and with a just adress from tronscan
code to create account
tron =…
I'm using tronpy library to send trx, here is my code:
from tronpy import Tron
from tronpy.keys import PrivateKey
# integers representing half & one Tron
HALF_TRON = 500000
ONE_TRON = 1000000 #equals 1 TRX
# your wallet information
WALLET_ADDRESS…
How can I send USDT TRC20 via Python?
I used this code:
from tronpy import Tron
from tronpy.keys import PrivateKey
client = Tron(network='mainnet')
priv_key = PrivateKey(bytes.fromhex("0"))
txn = (
client.trx.transfer(from_="0", to="0",…
When I use python, I want to perform a token-swapping function like sunswap. I implemented the trc20 token exchange function with tronpy, but I couldn't find a trx to usdt exchange
import time
from decimal import Decimal
from typing import List
from…