// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";

interface ISmartInvoiceFactory {
    function create(
        address _client,
        address _provider,
        address _dao,
        address _daoToken,
        address _resolver,
        address _token,
        uint256[] calldata _amounts,
        uint256 _terminationTime,
        uint256[4] calldata _rates,
        bytes32 _details
    ) external returns (address);

    function createDeterministic(
        address _client,
        address _provider,
        address _dao,
        address _daoToken,
        address _resolver,
        address _token,
        uint256[] calldata _amounts,
        uint256 _terminationTime,
        uint256[4] calldata _rates,
        bytes32 _details,
        bytes32 _salt
    ) external returns (address);

    function predictDeterministicAddress(bytes32 _salt)
        external
        returns (address);
}
[{"inputs":[{"internalType":"address","name":"_implementation","type":"address"},{"internalType":"address","name":"_wrappedNativeToken","type":"address"},{"internalType":"uint256","name":"_conversionMulNative","type":"uint256"},{"internalType":"uint256","name":"_minDaoRate","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"invoice","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"indexed":false,"internalType":"uint256","name":"conversionMulNative","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"daoRate","type":"uint256"}],"name":"LogNewInvoice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"conversionMulNative","type":"uint256"}],"name":"UpdateConversionMulNative","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"minDaoRate","type":"uint256"}],"name":"UpdateMinDaoRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"resolver","type":"address"},{"indexed":true,"internalType":"uint256","name":"resolutionRate","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"details","type":"bytes32"}],"name":"UpdateResolutionRate","type":"event"},{"inputs":[],"name":"conversionMulNative","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_client","type":"address"},{"internalType":"address","name":"_provider","type":"address"},{"internalType":"address","name":"_dao","type":"address"},{"internalType":"address","name":"_daoToken","type":"address"},{"internalType":"address","name":"_resolver","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"uint256","name":"_terminationTime","type":"uint256"},{"internalType":"uint256[4]","name":"_rates","type":"uint256[4]"},{"internalType":"bytes32","name":"_details","type":"bytes32"}],"name":"create","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_client","type":"address"},{"internalType":"address","name":"_provider","type":"address"},{"internalType":"address","name":"_dao","type":"address"},{"internalType":"address","name":"_daoToken","type":"address"},{"internalType":"address","name":"_resolver","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"uint256","name":"_terminationTime","type":"uint256"},{"internalType":"uint256[4]","name":"_rates","type":"uint256[4]"},{"internalType":"bytes32","name":"_details","type":"bytes32"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"createDeterministic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getInvoiceAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"invoiceCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDaoRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"predictDeterministicAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"resolutionRates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minDaoRate","type":"uint256"}],"name":"updateMinDaoRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_conversionMulNative","type":"uint256"}],"name":"updateNativeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_resolutionRate","type":"uint256"},{"internalType":"bytes32","name":"_details","type":"bytes32"}],"name":"updateResolutionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrappedNativeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]