For the system-contract addresses 0x1 and 0x2 (which have no Cairo class), Juno returns success 0x0 where the spec - return CONTRACT_NOT_FOUND. getClassAt errors too, but with the inconsistent code CLASS_HASH_NOT_FOUND.
Repro:
curl -s http://localhost:6060/rpc/v0_10 -H 'content-type: application/json' -d \
'{"jsonrpc":"2.0","id":1,"method":"starknet_getClassHashAt","params":[{"block_number":8314364},"0x2"]}'
method (addr 0x2) |
Juno |
expected |
getClassHashAt |
"0x0" |
CONTRACT_NOT_FOUND |
getNonce |
"0x0" |
CONTRACT_NOT_FOUND |
getClassAt |
CLASS_HASH_NOT_FOUND |
CONTRACT_NOT_FOUND |
0x1/0x2 are protocol system contracts, not deployed classes — see Starknet docs: system contracts 0x1 & 0x2.
Juno should return CONTRACT_NOT_FOUND for class/nonce reads on them, consistently across the three methods.
For the system-contract addresses
0x1and0x2(which have no Cairo class), Juno returns success0x0where the spec - returnCONTRACT_NOT_FOUND.getClassAterrors too, but with the inconsistent codeCLASS_HASH_NOT_FOUND.Repro:
0x2)getClassHashAt"0x0"CONTRACT_NOT_FOUNDgetNonce"0x0"CONTRACT_NOT_FOUNDgetClassAtCLASS_HASH_NOT_FOUNDCONTRACT_NOT_FOUND0x1/0x2are protocol system contracts, not deployed classes — see Starknet docs: system contracts 0x1 & 0x2.Juno should return
CONTRACT_NOT_FOUNDfor class/nonce reads on them, consistently across the three methods.