-
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
Cannot use contract calls with signing middleware: invalid "from" key error #2198
Comments
Hey @Pet3ris. This code is using I'm going to close this for now but if you are still seeing issues with other providers / on a test net... or if I missed something... then please feel free to re-open! |
@Pet3ris I think I understand this a bit better. So the messaging in That line is explicitly saying "every time I make a request, use this address as the So when you send it to Does that make sense? If you remove the line |
@fselmo makes sense! If I remove the line it works, but my understanding from the Would the work-around be to manually specify the "from" address in all the In terms of |
I'm actually going to re-open this to investigate some different scenarios too to see if we can improve this flow a bit more. But I'm glad you were at least able to get unstuck for now. I will update here if / when I have any updates after doing some testing. Thanks for reporting this! |
Thanks - happy to answer more questions or clarify more about use case if at all helpful but love the fact that I can just insert the middleware and reuse the same code across unit tests and prod. |
I think I originally thought this was a missing |
I am also having a similar issue when doing unit tests, using EthereumTesterProvider: I'm creating a local account (using Essentially when I call FYI I think this is possible to do this with Brownie. Ideally I don't want to rewrite my test suite to use Brownie (yet) but it's a good alternative. |
What was wrong?
This test fails with the error
No valid "from" key was provided
. Please note that the deployment transaction succeeds but the contract call fails even though contract calls don't require signing.I've also confirmed that the calls work well without the signing middleware.
How can it be fixed?
Could we remove the from check from
call()
altogether even in signed middleware mode?The text was updated successfully, but these errors were encountered: