-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathTaxOffice.sol
More file actions
60 lines (44 loc) · 1.92 KB
/
TaxOffice.sol
File metadata and controls
60 lines (44 loc) · 1.92 KB
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
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "./owner/Operator.sol";
import "./interfaces/ITaxable.sol";
contract TaxOffice is Operator {
address public grape;
constructor(address _grape) public {
require(_grape != address(0), "grape address cannot be 0");
grape = _grape;
}
function setTaxTiersTwap(uint8 _index, uint256 _value) public onlyOperator returns (bool) {
return ITaxable(grape).setTaxTiersTwap(_index, _value);
}
function setTaxTiersRate(uint8 _index, uint256 _value) public onlyOperator returns (bool) {
return ITaxable(grape).setTaxTiersRate(_index, _value);
}
function enableAutoCalculateTax() public onlyOperator {
ITaxable(grape).enableAutoCalculateTax();
}
function disableAutoCalculateTax() public onlyOperator {
ITaxable(grape).disableAutoCalculateTax();
}
function setTaxRate(uint256 _taxRate) public onlyOperator {
ITaxable(grape).setTaxRate(_taxRate);
}
function setBurnThreshold(uint256 _burnThreshold) public onlyOperator {
ITaxable(grape).setBurnThreshold(_burnThreshold);
}
function setTaxCollectorAddress(address _taxCollectorAddress) public onlyOperator {
ITaxable(grape).setTaxCollectorAddress(_taxCollectorAddress);
}
function excludeAddressFromTax(address _address) external onlyOperator returns (bool) {
return ITaxable(grape).excludeAddress(_address);
}
function includeAddressInTax(address _address) external onlyOperator returns (bool) {
return ITaxable(grape).includeAddress(_address);
}
function setTaxableGrapeOracle(address _grapeOracle) external onlyOperator {
ITaxable(grape).setGrapeOracle(_grapeOracle);
}
function transferTaxOffice(address _newTaxOffice) external onlyOperator {
ITaxable(grape).setTaxOffice(_newTaxOffice);
}
}