ContractExecutionDto
Data structure for performing a contract call on a blockchain

Signature

1
{
2
walletId! : string;
3
to! : string;
4
secretType! : SecretType;
5
functionName! : string;
6
value! : BigDecimal;
7
inputs! : [ {
8
type! : string;
9
value! : string;
10
} ],
11
chainSpecificFields! : Object;
12
}
Copied!
The chainSpecificFields depend on the chain uses to execute the smart contract call. For an overview of the available fields take a look at Contract calls in the Deep dive section.

Parameters

Parameter
Required
Type
Description
walletId
True
String
ID of the wallet one wants to sign with.
to
True
String
Destination address of the transaction.
secretType
True
​SecretType​
Chain the transaction will be executed on.
value
True
Number
The amount that will be sent with the contract execution. Value will be passed as-is. This means that for example in Etheruem the value is in WEI
functionName
True
String
Name of the function on the contract that needs to be executed
inputs[]
True
Array
Array of inputs needed to execute the function
inputs[].type
True
String
Type of the input parameter (ex. uint256)
inputs[].value
True
String
Value of the input parameter. Needs to be passed as a string value, will be parsed by Venly
True
Object
Fields that contain chain specific values. For possible values, please see chain specific fields documentation.

Example

1
{
2
"walletId" : "adc4c08a-b8fa-4e4c-z5a2-92c87b80f174",
3
"to" : "0xdc71b72db51e227e65a45004ab2798d31e8934c9",
4
"secretType" : "ETHEREUM",
5
"functionName" : "transfer",
6
"value" : 0,
7
"inputs" : [ {
8
"type" : "address",
9
"value" : "0x80cbb6c4342948e5be81987dce8251dbedd69138"
10
}, {
11
"type" : "uint256",
12
"value" : 73680000
13
} ],
14
"chainSpecificFields" : {
15
"gasLimit" : "300000"
16
}
17
}
Copied!

Function Types

​