andelf / tronpy

TRON Python Client Library.
MIT License
212 stars 96 forks source link

Contract. The functions provides. Transfer error #47

Closed flllkis closed 1 year ago

flllkis commented 2 years ago

txn = ( ... contract.functions.transfer('to address ', 1_000) ... .with_owner('address ') # address of the private key ... .fee_limit(5_000_000) ... .build() ... .sign(priv_key) ... ) An error: Traceback (most recent call last): File "zz.py", line 16, in .sign(priv_key) NameError: name 'priv_key' is not defined

danielqba commented 2 years ago

Looks like an error on your code, the var priv_key is not defined, did you do this before?

priv_key = "xxxxxxxxxxxxxxxxxx"