Skip to main content

ValueTask

Returns a specified value.

Input: None

Returns: A numerical result.

Example: Returns the value 10

{
"valueTask": {
"value": 10
}
}

Example: Returns the currentRound result of an aggregator

{
"valueTask": {
"aggregatorPubkey": "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR"
}
}

Example: Returns the value stored in a CacheTask variable

{
"valueTask": {
"big": "${ONE}"
}
}

See the ValueTask typescript definition in @switchboard-xyz/common

Fields

NameTypeDescription
 value

double

The value that will be returned from this task.

 aggregatorPubkey

string

Specifies an aggregatorr to pull the value of.

 big

string

A stringified big.js. Accepts variable expansion syntax.