Transaction Relay (TX)

Read Contract and View Functions

For your convenience, we've added a simple way to invoke view functions on already deployed contracts. These functions will fail if they modify the blockchain in any way.

DO NOT use this API to:

  • Modify state variables.
  • Emit events.
  • Deploy contracts.
  • Send ether.
  • Call any function which is not marked view or pure.

Read Contract View Function Example


const response = await fetch('https://api.utiliti.ai/transactions/read', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-key': '<YOUR_API_KEY_HERE>', //replace }, body: JSON.stringify({ chain_id: 5, params: { tokenId: 0, }, contract_address: '0x62d100283c2af67452e91cf4d5bad4f2cc9a5947', abi: '<YOUR_CONTRACT_ABI>', contract_function_name: 'ownerOf', }), })
Previous
Overview