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

Signature

1
{
2
secretType!: string,
3
walletAddress!: string,
4
contractAddress!: string,
5
functionName!: string,
6
inputs!: [
7
{
8
type!: string,
9
value!: string
10
}
11
],
12
outputs!: [
13
{
14
type!: string
15
}
16
]
17
}
Copied!

Parameters

Parameter
Required
Type
Description
secretType
True
​SecretType​
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

1
{
2
"secretType": "MATIC",
3
"walletAddress": "0x0000000000000000000000000000000000000000",
4
"contractAddress": "0xE80F3baA739c18fd4eBf97716529a4b85BE464Dd",
5
"functionName": "balanceOf",
6
"inputs": [
7
{
8
"type": "address",
9
"value": "0x427d0addaa77d8bb871dbea3458dea4b5198730c"
10
},
11
{
12
"type": "uint256",
13
"value": "202"
14
}
15
],
16
"outputs": [
17
{
18
"type": "uint256"
19
}
20
]
21
}
Copied!

Function Types