setResources

Sets the resource consumption metrics.

These metrics define the maximum resources the transaction can consume. They are typically obtained from simulation results and should not be set manually unless you know what you're doing.

Warning: Setting these values too low will cause transaction failure. Setting them too high wastes fees. Always use simulation results when possible.

Resource Types

  • CPU Instructions: WASM instruction count for contract execution

  • Disk Read Bytes: Bytes read from ledger entries

  • Write Bytes: Bytes written to ledger and memory

Return

This builder instance for chaining

Parameters

resources

The resource metrics to set

See also

Throws

If any resource value is negative