-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
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
Error when invoking ambiguous contract functions #3482
Comments
Appreciate you reaching out about this, @falvaradorodriguez I have found another report of a similar issue happening with overloaded events as well (#1704). I've been working on a fix for these in #3476. |
Thank you very much for your quick response @reedsa! Perfect, we look forward to this being released in a future release. Thanks. |
Hi @reedsa! |
@falvaradorodriguez thanks for following up on this. I have encountered an issue with the contract caller API that causes conflicts in the functions and events with names that overlap with internal variables of the contract classes. Once I have those nailed down, we will release the fix. The PR that includes these changes are in #3491 |
What happened?
Migrating from version 6 to version 7 of the
safe-eth-py
library we have detected a problem invoking a function of a contract with the same name but ambiguous arguments.Specifically, the function names are:
isValidSignature(bytes32,bytes)
andisValidSignature(bytes,bytes)
.The values I am passing as an argument (for example) are:
self.safe_hash_preimage = b'\x9c’\xff_!\xf0\xb8\x1b11>c\xf7\xdbm\xa9O\xedxedxef\x11\xb2\x11\x9b@\x88\xb8\x96d\xfb9a<\xb6X‘
self.contract_signature = b''
.The code we execute is similar to the one indicated in the guide for this case and in the migration guide from version 6 to 7 I don't see any entry related to this problem.
Code that produced the error
Full error output
Fill this section in if you know how this could or should be fixed
Debugging the
BaseContractFunction
call function I see that the execution flow goes through theencode_transaction_data
function of web3._utils.contracts.py.In this function, it is executed:
where
abi_callable
, which represents the selected signature, is not being taken into account, so the result will be ambiguous as the arguments are valid for both functions.web3 Version
7.2.0
Python Version
3.12
Operating System
osx
Output from
pip freeze
The text was updated successfully, but these errors were encountered: