How to query methods inside a smart contract?

I have some code that interacts with the Crypto Kitties smart contract. When it runs it gets the tokenID of a particular kitty. There’s a method in the smart contract called getKitty that takes this tokenID and returns information about the token that I want. How would make this call with Infura?


We have a topic like that on our blog (particularly Using eth_call section ). Additionally you can also check here the JSON-RPC method

The payload would look like :


instead of from you should use your address/smart contract and also make sure you use the projectID provided by infura …e.g: before the JSON payload.


1 Like