Read a contract
Endpoint that allows you to read contract functions.
This function is only available for EVM-based chains.
Request Endpoint: reference
This endpoint allows you to read contract functions. This function is only available for EVM-based chains.
HTTP
POST /api/contracts/readsecretType
Body
On which blockchain the contract exists
String
✅
contractAddress
Body
The contract address that you want to read
String
✅
functionName
Body
The contract function that you want to call
String
✅
inputs
Body
TArray of inputs needed to call the function
Array
✅
inputs.type
Body
Type of the input parameter (ex. uint256)
String
✅
inputs.value
Body
Value of the input parameter. This needs to be passed as a string value
Object
✅
outputs
Body
An array of expected outputs
Array
✅
outputs.type
Body
Type of output
String
✅
Examples
1. Get balance of
This example will get the balance of a certain NFT for a specific wallet.
HTTP
Request Body:
JSON
Response Body:
JSON
2. Get Mint Number
This example will get the mint number for a specific NFT.
HTTP
Request Body:
JSON
Response Body:
JSON
3. Get Contract URI
This example will fetch the contract URI, which contains the metadata, for a specific contract.
HTTP
Request Body:
JSON
Response Body:
JSON
Last updated