-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Contracts with toString()
functions panic when deployed
#2054
Comments
Can be reproduced with new ethers.Contract(
'0x0000000000000000000000000000000000000000',
['function toString() external']
) |
This should be fixed in 5.5.0. Please try it out and let me know if you still have any issues. |
1 similar comment
This should be fixed in 5.5.0. Please try it out and let me know if you still have any issues. |
Upgrading from 5.4.5 to 5.5.1 solved this issue for me! |
trying to read valueOf function from a contract using version 5.5.2 with: let myContract = new ethers.Contract(address, abi, provider); .. that doesnt seem to fly. im noob though, but spent few hours on this without finding any fault in my code. |
The method You must use the fully qualified method to access this name:
as an example, if your method took in an address and uint. |
Closing, as this seems to be fixed in 5.5.X. Thank you @ricmoo. |
Describe the bug
ethers fails to deploy contracts with a
toString()
function. (I was developing a library, but I assume normal contracts have the same issue). There are probably other function names that conflict with native js functions.valueOf()
is likely another one.Reproduction steps
Create a contract with a
toString()
functionThen, attempting to deploy that contract using ethers and hardhat...
yields this error message:
Environment:
Hardhat 2.4.1, ethers 5.4.6
The text was updated successfully, but these errors were encountered: