ITX and read only contract methods

I’m using Infura as provider, ITX and ether.js for a project. I can deploy my smart contract and send transactions with “relay_sendTransaction”. No problem here.

But I’m trying to call a read-only public view method with the usual ether.js way: contract.METHOD_NAME( ...args [ , overrides ] ), without “relay_sendTransaction”, and the call always reverts with some [CALL_EXCEPTION].

I also tried with ethers.js and contract.callStatic methods but I only get “0x” as result.

So my questions are: How can I interact with a smart contract public view method if ITX is on my Infura project? Is ITX always used? When using ITX, are all my calls to the smart contract considered transactions?

Thank you in advance.

Nevermind, my problem wasn’t with ITX.

My contract wasn’t correctly deployed, therefore read-only methods were not callable. Now everything works fine.

1 Like