Get the value from a read function of a target contract. This endpoint is designed to be highly flexible. It can read any contract by providing a contract address for contractIdOrAddress. It can also read using contracts created in the HYCHAIN systems through the POST /v1/contracts endpoint, which will utilize the contract's ABI.

Additionally, reads can be performed as a HYCHAIN app, user or user's session provided, through header authorization, or any arbitrary address or walletId provided through the as query parameter. Alternatively you can omit all of this and perform a read as no specific address.

The func query parameter accepts a complete function signature with parameters, such as getCount() or readCounter(address,uint256), or a known function name without parameters if a contractId was provided for contractIdOrAddress and the contract's ABI is known. Such as readCounter.

Language
URL
Click Try It! to start a request and see the response here!