// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

interface IERC20Min {
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

/**
 * @title MockFlushSink, TEST-ONLY stand-in for AereSink's flush(address,uint256) surface.
 * @notice AereSpokePool routes the 50 bps protocol fee to its SINK via
 *         `flush(address,uint256)`. Tests that exercise the ORDER path (not the sink
 *         economics) use this minimal sink: it pulls the approved fee and records it, so
 *         the fee leg succeeds deterministically without deploying the full AereSink
 *         swap/burn stack. Not for production.
 */
contract MockFlushSink {
    uint256 public totalReceived;
    mapping(address => uint256) public receivedOf;

    function flush(address token, uint256 amount) external {
        require(IERC20Min(token).transferFrom(msg.sender, address(this), amount), "flush: transferFrom");
        totalReceived += amount;
        receivedOf[token] += amount;
    }
}
