LitListenerSDK
  • Overview
  • Quick Start
  • SDK Reference
    • Instantiate Circuit
    • Set Conditions
    • Conditional Logic
    • Set Actions
    • Execution Constraints
    • IPFS Hash
    • MintGrantBurn PKP
    • Start Circuit
    • Broadcast Transactions
    • Add Secure Key
  • Database and Server Interactions
    • Server-SDK Integration
    • Persistant Circuit Architecture
  • Errors and Logs
    • Logs & Error Handling
    • Error Strict Mode
  • Live
    • No Code Interface
  • Resources
    • Issues
    • Testing
    • Contributors
    • System Architecture
    • About the Devs
    • Storefront
  • Github
  • Lit Developer Docs
Powered by GitBook
On this page
  1. SDK Reference

Execution Constraints

Set Execution Constraints.

The method defines the conditions that govern the execution of the circuit, allowing developers to limit runs based on criteria such as time frame or number of successful completions.

If no executionConstraints are added then the Lit Action Code will run according to the setConditions and conditionalLogic.

const executionOptions = {
    conditionMonitorExecutions: 10,
    startDate: new Date("2023-07-01T00:00:00Z"),
    maxLitActionCompletions: 3
}

newCircuit.executionConstraints(executionOptions);

Execution Constraints Parameters:

/* Optional. The maximum amount of times that the circuit will run before 
    stopping, inclusive of conditions on matched, on unmatched and conditional logic failures.*/
conditionMonitorExecutions?: number;

/* Optional. The circuit will not run before this date.*/
startDate?: Date;

/* Optional. The circuit will stop running once this date has passed.*/
endDate?: Date;

/* Optional. The maximum amount of times that the Lit Action code will be 
    executed before the circuit stops running. This is a full run of the circuit.*/
maxLitActionCompletions?: number;
PreviousSet ActionsNextIPFS Hash

Last updated 1 year ago