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
[BUG] estimate_fee_sync
always fails with TRANSACTION_FAILED
#181
Comments
I've tried to replicate using both testnet and devnet using a simple balance contract I've deployed through cairo-lang CLI (I don't have the access to a contract you're using but I don't think that matters), but unfortunately/fortunately it works on my side. Intentionally changing parts of the prepared invoke function caused multiple errors but no like the one you provided. Parhaps older account contract actually is an issue? In starknet.py 0.8.0 we've changed the way we're signing transactions to reflect changes made in the cairo-lang library itself. The way Or this may be an issue with contract/calldata/something but it's hard for me to speculate. |
Thanks so much @cptartur for the attempts to repro, I think I see what you mean - let me redeploy the latest account contract and I'll report back the findings! |
Unfortunately this didn't fix it, can I add you to my repo to have a look? Promise it's not super complex/nested at all :) |
Hey, I'd prefer if we kept this discussion here. Have you tried making the same calls are you trying to do in code through starknet CLI? Are they successful? The error you've posted is from starknet, just forwared through starknet.py. There's of course a chance we have some bug in starknet.py code that's causing this but we'd need more details to verify it though. Perhaps the ABI you're using to create a |
@Pet3ris can you create a full repro showing your issue detached from your codebase? Ideally it would include deploying a simple contract before interacting with it. |
Hey @cptartur @Solpatium - thanks a lot for your guidance, I've done the above and created a separate repository to show how I'm using The code and readme is available below: FYI - I'm running gas estimation on a transaction that succeeds as an invoke with the same arguments, so I think the issue is not in the ABI but rather there is some behavioral difference between estimation and invocation. |
@Pet3ris thank you for preparing a repro, it allowed us to find the issue - Apart from that, I suggest using |
Legends @Solpatium ! |
@Solpatium - I updated |
Are you providing the same signature to # create my_signature signature somehow
estimate = my_invoke.estimate_fee_sync(signature=my_signature) |
That fixed it thanks (and makes sense)! |
Python version
3.9.12
Expected Behavior
estimate_fee_sync
should successfully completeCurrent Behavior
It returns the following error:
Possible Solution
Steps to Reproduce
FYI - I'm using an older version of an account contract to issue transactions but I'm assuming that this should not impact estimate fee as the other
starknet.py
apis are working fine?Context (Environment)
I've been using the excellent
starknet.py
library to power Yagi Keepers (http://www.yagi.fi/automation).I'm trying to upgrade keepers now to use fees on testnet before they are officially mandated.
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered: