-
Notifications
You must be signed in to change notification settings - Fork 341
/
Copy pathIKyberStorage.sol
100 lines (78 loc) · 2.91 KB
/
IKyberStorage.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
pragma solidity 0.6.6;
import "./IKyberNetworkProxy.sol";
import "./IKyberReserve.sol";
interface IKyberStorage {
enum ReserveType {NONE, FPR, APR, BRIDGE, UTILITY, CUSTOM, ORDERBOOK, LAST}
function addKyberProxy(address kyberProxy, uint256 maxApprovedProxies)
external;
function removeKyberProxy(address kyberProxy) external;
function setContracts(address _kyberFeeHandler, address _kyberMatchingEngine) external;
function setKyberDaoContract(address _kyberDao) external;
function getReserveId(address reserve) external view returns (bytes32 reserveId);
function getReserveIdsFromAddresses(address[] calldata reserveAddresses)
external
view
returns (bytes32[] memory reserveIds);
function getReserveAddressesFromIds(bytes32[] calldata reserveIds)
external
view
returns (address[] memory reserveAddresses);
function getReserveIdsPerTokenSrc(IERC20 token)
external
view
returns (bytes32[] memory reserveIds);
function getReserveAddressesPerTokenSrc(IERC20 token, uint256 startIndex, uint256 endIndex)
external
view
returns (address[] memory reserveAddresses);
function getReserveIdsPerTokenDest(IERC20 token)
external
view
returns (bytes32[] memory reserveIds);
function getReserveAddressesByReserveId(bytes32 reserveId)
external
view
returns (address[] memory reserveAddresses);
function getRebateWalletsFromIds(bytes32[] calldata reserveIds)
external
view
returns (address[] memory rebateWallets);
function getKyberProxies() external view returns (IKyberNetworkProxy[] memory);
function getReserveDetailsByAddress(address reserve)
external
view
returns (
bytes32 reserveId,
address rebateWallet,
ReserveType resType,
bool isFeeAccountedFlag,
bool isEntitledRebateFlag
);
function getReserveDetailsById(bytes32 reserveId)
external
view
returns (
address reserveAddress,
address rebateWallet,
ReserveType resType,
bool isFeeAccountedFlag,
bool isEntitledRebateFlag
);
function getFeeAccountedData(bytes32[] calldata reserveIds)
external
view
returns (bool[] memory feeAccountedArr);
function getEntitledRebateData(bytes32[] calldata reserveIds)
external
view
returns (bool[] memory entitledRebateArr);
function getReservesData(bytes32[] calldata reserveIds, IERC20 src, IERC20 dest)
external
view
returns (
bool areAllReservesListed,
bool[] memory feeAccountedArr,
bool[] memory entitledRebateArr,
IKyberReserve[] memory reserveAddresses);
function isKyberProxyAdded() external view returns (bool);
}