-
Notifications
You must be signed in to change notification settings - Fork 126
/
IBaseExchange.sol
56 lines (42 loc) · 1.54 KB
/
IBaseExchange.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;
import "../libraries/Orders.sol";
interface IBaseExchange {
event Cancel(bytes32 indexed hash);
event Execute(
bytes32 indexed hash,
address bidder,
uint256 amount,
uint256 price,
address recipient,
address referrer
);
event Bid(bytes32 indexed hash, address bidder, uint256 amount, uint256 price, address recipient, address referrer);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function factory() external view returns (address);
function royaltyFeeInfo() external view returns (address recipient, uint8 permil);
function canTrade(address token) external view returns (bool);
function bestBid(bytes32 hash)
external
view
returns (
address bidder,
uint256 amount,
uint256 price,
address recipient,
address referrer,
uint256 blockNumber
);
function isCancelled(bytes32 hash) external view returns (bool);
function amountFilled(bytes32 hash) external view returns (uint256);
function cancel(Orders.Ask memory order) external;
function bid(Orders.Ask memory askOrder, Orders.Bid memory bidOrder) external returns (bool executed);
function bid(
Orders.Ask memory askOrder,
uint256 bidAmount,
uint256 bidPrice,
address bidRecipient,
address bidReferrer
) external returns (bool executed);
function claim(Orders.Ask memory order) external;
}