The function to call is called xyz()
.
My code:
web3.sha3("xyz()").substr(0,10)
Error:
AttributeError: module 'web3' has no attribute 'sha3'
In newer versions of web3, the above error occurs. What else can be used to get the hexadecimal equivalent of the function name?
Source of code: How to know the hex code to use in data to call a specific contract function? (the solution doesn't work on newer versions of web3)