Optional Functions

The DAppControl contract has the option to define functions that execute at the following stages:

  1. PreOps: This function is executed before the User's operation

  2. PreSolver: This function is executed after the User's operation but before a Solver's operation. It occurs inside of a try/catch; if it reverts, the current Solver's solution will fail and the next Solver's solution will begin. If the Solver's operation or the PostSolver function revert, anything accomplished by the PreSolver function will also be reverted.

  3. PostSolver: This function is executed after the User's operation and after a Solver's operation. It occurs inside of a try/catch; if it reverts, the PreSolver function function, and the current Solver's operation will also be reverted and the next Solver's solution will begin.

  4. PostOps: This function is executed after the successful execution of a Solver's operation and the allocation of their solution's value. If this function reverts, the User's operation will also be reverted.

These functions are executed by the Execution Environment via delegatecall.

Last updated