Skip to main content

MultiplyTask

This task will multiply a numerical input by a scalar value from a job of subtasks, an aggregator, or a big.

Input: The current running numerical result output from a scalar value, an aggregator, a job of subtasks or a big.

Returns: A numerical result.

Example: Returns the numerical result by multiplying by a job of subtasks.

{
"tasks": [
{
"valueTask": {
"value": 100
}
},
{
"multiplyTask": {
"job": {
"tasks": [
{
"valueTask": {
"value": 10
}
}
]
}
}
}
]
}

Example: Returns the numerical result by multiplying by an aggregator.

{
"tasks": [
{
"valueTask": {
"value": 100
}
},
{
"multiplyTask": {
"aggregatorPubkey": "GvDMxPzN1sCj7L26YDK2HnMRXEQmQ2aemov8YBtPS7vR"
}
}
]
}

Example: Returns the numerical result by multiplying by a big.

{
"tasks": [
{
"cacheTask": {
"cacheItems": [
{
"variableName": "TEN",
"job": {
"tasks": [
{
"valueTask": {
"value": 10
}
}
]
}
}
]
}
},
{
"valueTask": {
"value": 100
}
},
{
"multiplyTask": {
"big": "${TEN}"
}
}
]
}


Fields

NameTypeDescription
 aggregatorPubkey

string

Specifies an aggregator to multiply by.

 big

string

A stringified big.js. Accepts variable expansion syntax.

 job

A job whose result is computed before multiplying our numerical input by that result.

 scalar

double

Specifies a scalar to multiply by.