```\nfunction validateOrderParam(IPerpetual perpetual, LibOrder.OrderParam memory orderParam)\n    internal\n    view\n    returns (bytes32)\n{\n    address broker = perpetual.currentBroker(orderParam.trader);\n    require(broker == msg.sender, "invalid broker");\n    require(orderParam.getOrderVersion() == 2, "unsupported version");\n    require(orderParam.getExpiredAt() >= block.timestamp, "order expired");\n\n    bytes32 orderHash = orderParam.getOrderHash(address(perpetual), broker);\n    require(orderParam.signature.isValidSignature(orderHash, orderParam.trader), "invalid signature");\n    require(filled[orderHash] < orderParam.amount, "fullfilled order");\n\n    return orderHash;\n}\n```\n