-
Notifications
You must be signed in to change notification settings - Fork 0
/
RouWithCoeff.sol
69 lines (58 loc) · 1.3 KB
/
RouWithCoeff.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
// SPDX-License-Identifier: MIT
pragma solidity =0.7.5;
import "LibBaseAuth.sol";
contract WithCoeff is BaseAuth {
uint16 private _v1ClaimRatio;
uint16 private _v2ClaimRatio;
uint16 private _v1BonusCoeff;
uint16 private _v2BonusCoeff;
constructor ()
{
_v1ClaimRatio = 133;
_v2ClaimRatio = 200;
_v1BonusCoeff = 50;
_v2BonusCoeff = 100;
}
function setCoeff(
uint16 v1ClaimRatio_,
uint16 v2ClaimRatio_,
uint16 v1BonusCoeff_,
uint16 v2BonusCoeff_
)
external
onlyAgent
{
_v1ClaimRatio = v1ClaimRatio_;
_v2ClaimRatio = v2ClaimRatio_;
_v1BonusCoeff = v1BonusCoeff_;
_v2BonusCoeff = v2BonusCoeff_;
}
function v1ClaimRatio()
internal
view
returns (uint16)
{
return _v1ClaimRatio;
}
function v2ClaimRatio()
internal
view
returns (uint16)
{
return _v2ClaimRatio;
}
function v1BonusCoeff()
internal
view
returns (uint16)
{
return _v1BonusCoeff;
}
function v2BonusCoeff()
internal
view
returns (uint16)
{
return _v2BonusCoeff;
}
}