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
secretTypeTrueSecretTypeOn which blockchain the tx will be executed
walletAddressFalseStringWallet address, available if required
contractAddressTrueStringThe address of the contract to read
functionNameTrueStringContract function to call
inputsTrueArrayArray of inputs needed to call the function
inputs.typeTrueStringType of the input
inputs.valueTrueStringValue of the input
outputsTrueArrayArray of expected outputs
outputs.valueTrueStringThe 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

๐Ÿ“˜