Skip to main content

MAX_OUTPUTS

Constant MAX_OUTPUTS 

Source
pub const MAX_OUTPUTS: usize = 16;
Expand description

The largest number of outputs that a payload can declare.

This constant is helpful for transaction generation to check whether a created transaction doesn’t exceed this limit.

Every #[output] argument and return value of the payload’s methods writes one of the declared outputs, and several methods can write the same one. Slots, inputs and outputs refer to a declared output by its index, which is below this limit.

Overflow will result in an error before any method is called.