eqlabs / pathfinder

A Starknet full node written in Rust
https://eqlabs.github.io/pathfinder/
Other
631 stars 234 forks source link

Bug: undocumented spec divergence on `stateMutability` #814

Closed xJonathanLEI closed 1 year ago

xJonathanLEI commented 1 year ago

As per the JSON-RPC spec 0.2.1, the field stateMutability does not exist on type FUNCTION_ABI_ENTRY, yet the response in pathfinder (v0.4.5) still comes with that.

Reproducer:

curl "https://starknet-goerli.rpc.zklend.com/" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"starknet_getClass","params":["latest","0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918"]}' | jq ".result.abi[3].stateMutability"
xJonathanLEI commented 1 year ago

I ended up supporting this field myself: https://github.com/xJonathanLEI/starknet-rs/pull/288