andelf / tronpy

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

I am unable to pay TRX when interacting with the contract #131

Closed testhai001 closed 2 weeks ago

testhai001 commented 4 months ago

I am conducting asset cross chain transactions and need to pay TRX to the contract. I have tried many methods but have been unable to successfully pay TRX, GPT told me to use the call_value method to pass TRX values, but in reality, this method is not available. If you know, please guide me on how to pay TRX while calling the contract. Thank you.

image

Ephraim-Akolo commented 2 months ago

I don't know if this is still relevant but someone might still need this. The with_transfer method sets the call_value of your contract method. Use the with_transfer method instead of the call_value method and pass the amount of TRX in SUN.

MrNaif2018 commented 2 weeks ago

This is documented in the docs. Don't trust AI for everything Thank you for your guidance here @Ephraim-Akolo