[BUG] `estimate_fee_sync` always fails with `TRANSACTION_FAILED`
See original GitHub issuePython version
3.9.12
Expected Behavior
estimate_fee_sync
should successfully complete
Current Behavior
It returns the following error:
{"code": "StarknetErrorCode.TRANSACTION_FAILED", "message": "Error at pc=0:392:\nUnknown value for memory cell at address 12:0.\nCairo traceback (most recent call last):\nUnknown location (pc=0:534)\nUnknown location (pc=0:468)"}
Possible Solution
Steps to Reproduce
(nonce,) = keeper_contract.functions["get_nonce"].call_sync()
task_address_felt = int(task["address"], 16)
args, signature = get_account_message_args_sig(keeper_address, registry, "executeTask", [task_address_felt], nonce, key)
unsigned_invocation = keeper_contract.functions["execute"].prepare(*args)
# This is where the error occurs
estimation = unsigned_invocation.estimate_fee_sync()
# This normally runs perfectly fine if I don't do gas estimation for all these transactions that are failing with `estimate_fee`
invocation = unsigned_invocation.invoke_sync(signature=signature, max_fee=0)
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
Issue Analytics
- State:
- Created a year ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Explanation of "Transaction failure predicted" and "Could not ...
To protect your assets we try to predict when your transaction may fail due to a factor out of our control, such as...
Read more >Error: cannot estimate gas; transaction may fail or may require ...
This is a SCAM and your money WILL be stolen. NEVER SYNC in ANY FORM: QR Codes, seed phrases, secret recovery phrase, private...
Read more >Polygon transactions are stuck/transaction underpriced error
The transaction fails even before asking the user for a transaction most of the time. With error "err: max fee per gas less...
Read more >Out of gas issue (ERC20) - Failed transactions - Ledger Support
Ledger Live automatically estimates the optimal fee required for your ETH and ERC20 transactions. However, Ethereum transactions might still ...
Read more >How To Fix MOST PancakeSwap Errors! (Cannot Estimate ...
(Cannot Estimate Gas, Pancake K, Insufficient Output, Undefined) ... Cannot Estimate Gas Error 06:52 Transaction From Failed (SCAM Error ) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That fixed it thanks (and makes sense)!
Are you providing the same signature to
Contract.estimate_fee()
as you’d be using inContract.invoke()
? It’s