To be able to interact with an ETH RPC, you can send a request via CURL/POSTMAN directly to a contract
For eg, contract - https://etherscan.io/address/0xdac17f958d2ee523a2206206994597c13d831ec7#code
Calling read only function totalBalance
curl \\
-X POST \\
-H "Content-Type: application/json" \\
--data '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"data": "0x18160ddd"
},
"latest"
],
"id": 1
}' \\
<YOUR_RPC_ENDPOINT>
data is the first 4 bytes of the keccak-256 hash of the function name (totalSupply)
Ref - https://emn178.github.io/online-tools/keccak_256.html
balanceOf requires an argument (the address of the user whose balance you want). To find data there, you need to
balanceOf(address)000000000000000000000000587EFaEe4f308aB2795ca35A27Dff8c1dfAF9e3f)data = 0x70a08231000000000000000000000000587EFaEe4f308aB2795ca35A27Dff8c1dfAF9e3fcurl \\
-X POST \\
-H "Content-Type: application/json" \\
--data '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"data": "0x70a08231000000000000000000000000587EFaEe4f308aB2795ca35A27Dff8c1dfAF9e3f"
},
"latest"
],
"id": 1
}' \\
<YOUR_RPC_ENDPOINT>