// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; /** * @title SOMA SomaEscrow Factory Contract. * @author SOMA.finance. * @notice A factory that produces SomaEscrow contracts via the TemplateFactory. */ interface ISomaEscrowFactory { /** * @notice Emitted when a SomaEscrow is created. * @param id The ID (deployment index) of the SomaEscrow. * @param asset The stablecoin asset of the SomaEscrow. * @param instance The address of the created SomaEscrow. */ event SomaEscrowCreated(uint256 id, address asset, address instance); /** * @notice The SomaEscrow's CREATE_ROLE. * @dev Returns keccak256('SomaEscrow.CREATE_ROLE'). */ function CREATE_ROLE() external pure returns (bytes32); /** * @notice Creates a SomaEscrow instance. * @param asset The stablecoin the escrow holds. * @param withdrawTo The destination for settled buy proceeds. * @param settlementFunder The treasury that funds sell payouts. * @param minSettlementWindow The settlement window required before expiry to lock an order. * @custom:emits SomaEscrowCreated * @custom:requirement The function caller must have the CREATE_ROLE. * @return instance The address of the created SomaEscrow. */ function create(address asset, address withdrawTo, address settlementFunder, uint48 minSettlementWindow) external returns (address instance); }