-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIFeeManager.sol
33 lines (31 loc) · 1.12 KB
/
IFeeManager.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
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
interface IFeeManager {
struct FeeConfig {
address applier;
address feeTaker;
uint256 feeShare;
bool shouldApply;
}
/**
* @notice allows a player to create a dice or coinflip game
* @param applier address that will apply the fee
* @param transferAmount transfaction amount of transfer actiuon
*/
function calculateFeesForTransfer(address applier, uint256 transferAmount) external view returns (address feeTaker, uint256 feeAmount, uint256 sendAmount);
/**
* @notice allows an admin to set fee rules
* @param configs fee rules to be applied
*/
function setFeeConfigs(FeeConfig[] memory configs) external;
/**
* @notice returns configurations on a fee rule
* @param applier list of addresses that wil apply the fee
*/
function getFeeRule(address applier) external view returns (FeeConfig memory feeRule);
/**
* @notice returns wether the fee applier should apply the fee rule
* @param applier list of addresses that wil apply the fee
*/
function shouldApplyFees(address applier) external view returns (bool shouldApply);
}