Skip to content
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

RPC08 - add Support for ENTRYPOINT_NOT_FOUND Error in starknet_call #2392

Open
wojciechos opened this issue Jan 21, 2025 · 0 comments
Open
Labels
RPC JSON RPC API

Comments

@wojciechos
Copy link
Contributor

In RPC spec v0.8, a new error ENTRYPOINT_NOT_FOUND was introduced. It should return error code 21 when the specified entry_point_selector in starknet_call does not exist in the contract:

starkware-libs/starknet-specs@85811f9

Sample request on sepolia:

{
    "jsonrpc": "2.0",
    "method": "starknet_call",
    "params": {
        "request": {
            "contract_address": "0x78d8ada537ab1132e600b7553c3e574336c4e0f24fb584b8b2d5faff8a37590",
            "entry_point_selector": "0x11c957afc7e84fbf8aac7ff9c79910a53a64edf9a779b18b411fbb1982fb84f", //does not exist
            "calldata": []
        },
        "block_id": "pending"
    },
    "id": 1
}

Expected Response:

    "jsonrpc": "2.0",
    "error": {
        "code": 21,
        "message": "Requested entrypoint does not exist in the contract"
    },
    "id": 1
}
@wojciechos wojciechos added the RPC JSON RPC API label Jan 21, 2025
@wojciechos wojciechos changed the title RPC08 - Add Support for ENTRYPOINT_NOT_FOUND Error in starknet_call RPC08 - add Support for ENTRYPOINT_NOT_FOUND Error in starknet_call Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RPC JSON RPC API
Projects
None yet
Development

No branches or pull requests

1 participant