Comments (3)
Are you sure that you use RPC 0.6.0 (alchemy and infura)? simulation_flags
was added in 0.6.0. If you want to use RPC 0.5 the recommended version of starknet.py will be 0.18.2
from starknet.py.
Had the same issue with alchemy provider
Req:
{
"jsonrpc": "2.0",
"method": "starknet_estimateFee",
"id": 0,
"params": {
"request": [
{
"type": "INVOKE",
"version": "0x100000000000000000000000000000003",
"signature": [
"0x4e66d21d3d7f3114feb4e71e58e45ae0822eab8942770e163a285ed270aad7b",
"0x7386eeb3be2626b055d6938780ef4a995ec28c51127325abc91d215a47d4278"
],
"nonce": "0x6e",
"tip": "0x0",
"nonce_data_availability_mode": "L1",
"fee_data_availability_mode": "L1",
"paymaster_data": [],
"resource_bounds": {
"l1_gas": {
"max_amount": "0x0"
}
}
}
]
}
}
Res:
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32602,
"message": "Invalid params",
"data": {
"reason": "unknown field `simulation_flags`, expected `request` or `block_id` at line 1 column 2169"
}
}
}
from starknet.py.
In starknet-spec RPC 0.6.0 starknet_estimateFee
has required param simulation_flags
https://github.com/starkware-libs/starknet-specs/blob/159fb9c887402a96056dc405f374c4df27a14bf8/api/starknet_api_openrpc.json#L638. It seems to be a problem with alchemy. Probably they use an older version of the RPC. I suggest ensuring which version of RPC is used on Alchemy and using the relevant version of starknet.py
from starknet.py.
Related Issues (20)
- Add estimate_fee to Account
- Update changelog before release
- [refactor] Rename all classes *StarknetBlock* to *BlockWithTxs* HOT 1
- [BUG] <starknet_py.abi.v2.parser.AbiParsingError> HOT 1
- Error when requesting tx receipt
- `get_events` does not return full event information
- Allow ignoring unknown keys in RPC responses
- `get_class_by_hash` returns a string in abi for Cairo 1 classes
- Remove goerli network HOT 1
- Add compiled_class_hash for contract compiled with cairo 2.6.0
- Split RPC schemas into multiple files HOT 1
- Update node version on github action HOT 1
- Move compiling contracts on github actions HOT 1
- Remove unknown=EXCLUDE after devnet fix response HOT 1
- Add support for ByteArray
- Change chainId in devnet tests
- Remove declaration of cairo 0 contracts
- Add utility to convert fee estimation to resource bounds
- [BUG] get_block not working anymore HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starknet.py.