🦥
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. Creating a Safety Module

Deploy a Safety Module

PreviousDefine Safety Module ConfigurationNextManage a Safety Module

Last updated 8 months ago

To deploy a SafetyModule, call CozySafetyModuleManager.createSafetyModule:

/// @notice Deploys a new SafetyModule with the provided parameters.
/// @param owner_ The owner of the SafetyModule.
/// @param pauser_ The pauser of the SafetyModule.
/// @param configs_ The configuration for the SafetyModule.
/// @param salt_ Used to compute the resulting address of the SafetyModule.
function createSafetyModule(
    address owner_,
    address pauser_,
    UpdateConfigsCalldataParams calldata configs_,
    bytes32 salt_
) external returns (ISafetyModule safetyModule_);

See for how to define configs_ , and for how to define owner_ and pauser_. It is recommended that the salt_ is randomly generated.

Define Safety Module Configuration
Permissions and Authorization