We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need to calculate energy_used so use tron.trigger_constant_contract like this:
tron.trigger_constant_contract
result = tron.trigger_constant_contract( owner_address="TQYbVpBqboaQu4rc4bLuD9VUqNAAAAAAA", contract_address="TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", function_selector="transfer (address, uint256)", parameter="" # ? ) print(result)
And for calculate parameter i used this:
with open("abi/trc20_abi.json") as f: info_json = json.load(f) # from tronscan bytecode = '60806040526000...' # from tronscan cntr = Contract(name="TetherToken", bytecode=bytecode, abi=info_json) parameter = cntr.constructor.encode_parameter("TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", 18) # like tronpy document print(parameter)
So get this error: TypeError: wrong number of arguments, require 4 got 2
TypeError: wrong number of arguments, require 4 got 2
What is 18 in this method? What is the problem? Is there better way?
The text was updated successfully, but these errors were encountered:
See an example here: https://github.com/bitcart/bitcart/blob/c1715ed9c302b5d2c92003d172a94467b4523284/daemons/trx.py#L388-L399
Sorry, something went wrong.
No branches or pull requests
I need to calculate energy_used so use
tron.trigger_constant_contract
like this:And for calculate parameter i used this:
So get this error:
TypeError: wrong number of arguments, require 4 got 2
What is 18 in this method? What is the problem? Is there better way?
The text was updated successfully, but these errors were encountered: