// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import { OrderParameters, OrderComponents, OrderStatus, Order } from "./ConsiderationStructs.sol"; import { OrderFulfiller } from "./OrderFulfiller.sol"; contract Consideration is OrderFulfiller { mapping(bytes32 => OrderStatus) private _orderStatus; constructor(address conduitController, address shadowToken) OrderFulfiller(conduitController, shadowToken) {} function fulfillOrder(Order calldata order, bytes32 fulfillerConduitKey) external payable returns (bool fulfilled) { fulfilled = _validateAndFulfillOrder(order, fulfillerConduitKey); } function repayOrder(OrderParameters calldata parameters, bytes32 fulfillerConduitKey, uint256 payTimes) external payable returns (bool repaid) { repaid = _validateAndRepayOrder(parameters, fulfillerConduitKey, payTimes); } function breakOrder(OrderParameters calldata parameters) external returns (bool broken) { broken = _validateAndBreakOrder(parameters); } function cancel(OrderComponents[] calldata orders) external returns (bool cancelled) { cancelled = _cancel(orders); } function validate(Order[] calldata orders) external returns (bool validated) { validated = _validate(orders); } function incrementCounter() external returns (uint256 newCounter) { newCounter = _incrementCounter(); } function getOrderHash(OrderComponents calldata order) external view returns (bytes32 orderHash) { orderHash = _deriveOrderHash( OrderParameters( order.offerer, order.token, order.identifier, order.currency, order.artist, order.platform, order.startTime, order.endTime, order.duration, order.periods, order.amount, order.ratio, order.royalty, order.fee, order.withdrawFee, order.salt, order.conduitKey ), order.counter ); } function getOrderStatus(bytes32 orderHash) external view returns ( bool isValidated, bool isCancelled, bool isFinalized, bool isBroken, address fulfiller, uint256 startedAt, uint256 shadowId, uint256 paidTimes ) { return _getOrderStatus(orderHash); } function getCounter(address offerer) external view returns (uint256 counter) { counter = _getCounter(offerer); } function information() external view returns ( string memory version, bytes32 domainSeparator, address conduitController ) { return _information(); } }