APE Price: $1.16 (+7.17%)

Contract Diff Checker

Contract Name:
Liquidator

Contract Source Code:

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.28;

interface ITopTrader {
    function liquidate(uint256 tournamentId, address[] calldata users, bytes[] calldata priceUpdate) external;
    function owner() external view returns (address);
}

contract Liquidator {
    error FailedToWithdraw();

    ITopTrader public immutable TOP_TRADER;

    constructor(address _topTrader) {
        TOP_TRADER = ITopTrader(_topTrader);
    }

    receive() external payable {}

    function liquidate(uint256 tournamentId, address[] calldata users, bytes[] calldata priceUpdate) external {
        TOP_TRADER.liquidate(tournamentId, users, priceUpdate);
    }

    function withdraw() external {
        (bool success,) = payable(TOP_TRADER.owner()).call{value: address(this).balance}("");
        if (!success) revert FailedToWithdraw();
    }
}

Please enter a contract address above to load the contract details and source code.

Context size (optional):