curl --request POST \
--url https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_call",
"params": [
{
"calldata": [
"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a"
],
"contract_address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"entry_point_selector": "0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e"
},
"pending"
]
}'
starknet_call
curl --request POST \
--url https://starknet-mainnet.core.chainstack.com/365cf697a3ad6d950b4c4a911e2e4f4d \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_call",
"params": [
{
"calldata": [
"0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a"
],
"contract_address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"entry_point_selector": "0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e"
},
"pending"
]
}'
request
— the details of the function call:
contract_address
— the address of the contract to be called.entry_point_selector
— the selector of the function to be called.calldata
— the parameters passed to the function.block_id
— the hash of the requested block, or number (height) of the requested block, or a block tag, for the block referencing the state or call the transaction on.result
— the function’s return value, as defined in the Cairo output.starknet_call
is to interact with a contract’s function without creating a transaction or changing the state. This can be useful for querying contract state or testing function calls.
curl --request POST \
--url 'https://alpha-mainnet.starknet.io/feeder_gateway/call_contract?blockNumber=pending' \
--header 'Content-Type: application/json' \
--data-raw '{
"contract_address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"entry_point_selector": "0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e",
"calldata": ["0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a"]
}'
Successful response