🦥
Cozy Safety Module
  • User Guides
    • Introduction
    • User FAQs
  • Developer Guides
    • Creating a Safety Module
      • Define Safety Module Configuration
      • Deploy a Safety Module
    • Manage a Safety Module
      • Replacing Triggers
    • Safety Module Deposits
    • Safety Module Redemptions / Withdrawals
    • Safety Module States
    • Safety Module Fees
    • Safety Module Slashing
    • Shared Safety Module Functionality
    • Create a Rewards Manager
      • Define a Rewards Manager Configuration
      • Deploy a Rewards Manager
      • Reward Pool Drip Models
    • Manage a Rewards Manager
      • Deposit Rewards
      • Update a Rewards Manager Configuration
    • Stake into a Rewards Manager
      • Stake
      • Claim Rewards
      • Unstake
    • Rewards Manager Accounting
    • Rewards Manager States
    • Create a Trigger
      • UMA Trigger Factory
      • Chainlink Trigger Factory
      • Ownable Trigger Factory
    • Permissions and Authorization
    • Token Integration Guidelines
    • Contract Deployments Registry
    • Payout Vaults
  • FAQ
    • Security FAQ
Powered by GitBook
On this page
  1. Developer Guides
  2. Create a Trigger

Ownable Trigger Factory

The OwnableTriggerFactory deploys triggers that allow an authed address to transition the trigger to the TRIGGERED state.

Determine Trigger Parameters

struct TriggerMetadata {
  // The name that should be used for safety modules that use the trigger.
  string name;
  // A human-readable description of the trigger.
  string description;
  // The URI of a logo image to represent the trigger.
  string logoURI;
  // Extra metadata for the trigger.
  string extraData;
}

/// @notice Deploys a new OwnableTrigger contract with the supplied owner and deploy salt.
/// @param _owner The owner of the trigger, allowed to trigger the deployed trigger.
/// @param _metadata The metadata of the trigger.
/// @param _salt Used during deployment to compute the address of the new OwnableTrigger.
function deployTrigger(address _owner, TriggerMetadata memory _metadata, bytes32 _salt)
    external
returns (OwnableTrigger _trigger);

The _owner address is allowed to call OwnableTrigger.trigger() to transition the trigger to the TRIGGERED state.

/// @notice Callable by the owner to transition the state of the trigger to triggered.
function trigger() external;
PreviousChainlink Trigger FactoryNextPermissions and Authorization

Last updated 8 months ago