ContractReadRequest

Data structure as input for performing a contract read on a blockchain

Signature

{
    secretType!: string,
    walletAddress!: string,
    contractAddress!: string,
    functionName!: string,
    inputs!: [
        {
            type!: string,
            value!: string
        }
    ],
    outputs!: [
        {
            type!: string
        }
    ]
}

Parameters

ParameterRequiredTypeDescription

secretType

True

On which blockchain the tx will be executed

walletAddress

False

String

Wallet address, available if required

contractAddress

True

String

The address of the contract to read

functionName

True

String

Contract function to call

inputs

True

Array

Array of inputs needed to call the function

inputs.type

True

String

Type of the input

inputs.value

True

String

Value of the input

outputs

True

Array

Array of expected outputs

outputs.value

True

String

The type of the output

Example

{
    "secretType": "MATIC",
    "walletAddress": "0x0000000000000000000000000000000000000000",
    "contractAddress": "0xE80F3baA739c18fd4eBf97716529a4b85BE464Dd",
    "functionName": "balanceOf",
    "inputs": [
        {
            "type": "address",
            "value": "0x427d0addaa77d8bb871dbea3458dea4b5198730c"
        },
        {
            "type": "uint256",
            "value": "202"
        }
    ],
    "outputs": [
        {
            "type": "uint256"
        }
    ]
}

Function Types

pagereadContract

Last updated