// File: contracts/TransferProxy.sol



// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.22;

interface IStakeTogetherV2 {
    function emitTransfer(address _from, address _to, uint256 _amount) external;
}

contract TransferProxy {
    IStakeTogetherV2 public stakeTogetherContract;
    address public owner;

    constructor(address _stakeTogetherAddress) {
        stakeTogetherContract = IStakeTogetherV2(_stakeTogetherAddress);
        owner = msg.sender; 
    }

    modifier onlyOwner() {
        require(msg.sender == owner, "Only owner can call this function");
        _;
    }

    function batchEmitTransfers(
        address[] calldata _froms,
        address[] calldata _tos,
        uint256[] calldata _amounts
    ) external onlyOwner {
        require(_froms.length == _tos.length && _tos.length == _amounts.length, "Arrays must have the same length");

        for (uint256 i = 0; i < _froms.length; i++) {
            stakeTogetherContract.emitTransfer(_froms[i], _tos[i], _amounts[i]);
        }
    }
}