I want to encode the parameters needed to call a contract method. In web3js I would use web3.eth.abi.encodeParameters(types, values); I need to do the same in python I found a function called encodeABI() which takes arguments: fn_name, args=None, kwargs=None, data=None Unfortunately the documentation for this method is missing. So my question is how to encode these parameters using web3py?

  • 1
    The arguments you describe seem straightforward. What did you try, and where did you run into trouble? – smarx Jan 5 at 10:50
  • I did not try this yet, because there is no documentation for this method I would like to know what stays for args, kwargs and why I need to specify the function name when in web3js it's not needed – Marcello Bardus Jan 5 at 14:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.