contract ControllerDelegator is DelegatorInterface, Adminable {

    constructor(address _oleToken,
        address _xoleToken,
        address _wETH,
        address _lpoolImplementation,
        address _openlev,
        address _dexAggregator,
        bytes memory _oleWethDexData,
        address payable admin_,
        address implementation_) {
        admin = msg.sender;
        // Creator of the contract is admin during initialization
        // First delegate gets to initialize the delegator (i.e. storage contract)
        delegateTo(implementation_, abi.encodeWithSignature("initialize(address,address,address,address,address,address,bytes)",
            _oleToken,
            _xoleToken,
            _wETH,
            _lpoolImplementation,
            _openlev,
            _dexAggregator,
            _oleWethDexData
            ));
        implementation = implementation_;

        // Set the proper admin now that initialization is done
        admin = admin_;
    }

    /**
     * Called by the admin to update the implementation of the delegator
     * @param implementation_ The address of the new implementation for delegation
     */
    function setImplementation(address implementation_) public override onlyAdmin {
        address oldImplementation = implementation;
        implementation = implementation_;
        emit NewImplementation(oldImplementation, implementation);
    }
}
function setImplementation(address implementation_) public override onlyAdmin {
    address oldImplementation = implementation;
    implementation = implementation_;
    emit NewImplementation(oldImplementation, implementation);
}

/**
 * Called by the admin to update the implementation of the delegator
 * @param implementation_ The address of the new implementation for delegation
 */