// SPDX-License-Identifier: -- WISE --

pragma solidity =0.8.23;

import "./PendlePowerFarmController.sol";

contract Create2Deployer {

    address public immutable VE_PENDLE_CONTRACT;
    address public immutable PENDLE_TOKEN;
    address public immutable VOTER_CONTRACT;
    address public immutable VOTER_REWARDS_CLAIMER_ADDRESS;
    address public immutable WISE_ORACLE_HUB;

    constructor(
        address _vePendleContract,
        address _pendleToken,
        address _voterContract,
        address _voterRewardsClaimerAddress,
        address _wiseOracleHub
    )
    {
        VE_PENDLE_CONTRACT = _vePendleContract;
        PENDLE_TOKEN = _pendleToken;
        VOTER_CONTRACT = _voterContract;
        VOTER_REWARDS_CLAIMER_ADDRESS = _voterRewardsClaimerAddress;
        WISE_ORACLE_HUB = _wiseOracleHub;
    }

    function deploy(
        uint256 _salt
    )
        external
        returns (address)
    {
        return _actualDeploy(
            _salt
        );
    }

    function _actualDeploy(
        uint256 _salt
    )
        private
        returns (address)
    {
        PendlePowerFarmController controller = new PendlePowerFarmController{
            salt: bytes32(_salt)
        }(
            VE_PENDLE_CONTRACT,
            PENDLE_TOKEN,
            VOTER_CONTRACT,
            VOTER_REWARDS_CLAIMER_ADDRESS,
            WISE_ORACLE_HUB
        );

        return address(controller);
    }
}
[{"inputs":[{"internalType":"address","name":"_vePendleContract","type":"address"},{"internalType":"address","name":"_pendleToken","type":"address"},{"internalType":"address","name":"_voterContract","type":"address"},{"internalType":"address","name":"_voterRewardsClaimerAddress","type":"address"},{"internalType":"address","name":"_wiseOracleHub","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"PENDLE_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VE_PENDLE_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VOTER_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VOTER_REWARDS_CLAIMER_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WISE_ORACLE_HUB","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_salt","type":"uint256"}],"name":"deploy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}]