-
Notifications
You must be signed in to change notification settings - Fork 0
/
MasterChef Contract Admin Functions
99 lines (60 loc) · 1.43 KB
/
MasterChef Contract Admin Functions
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
//Admin Functions Overview
//MasterChef Contract
function addToken(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public
/Parameter
Description
_allocPoint
Number of allocation points for the new LP pool.
_lpToken
LP token contract address.
_withUpdate
Whether update all pools or not./
/Add a new LP to the pool.
Requires Admin Role./
function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public
/Parameter
Description
_pid
Farming pool Id number.
_allocPoint
New number of allocation points.
_withUpdate
Whether update all pools or not.
Update the given pools token allocation point.
Requires Operator Role./
//MasterChefV2 Contract
function add(
uint256 allocPoint,
IERC20 _lpToken,
IRewarder _rewarder
)
public onlyOwner
/Parameter
Description
allocPoint
Allocation point number of the new LP.
_lpToken
LP token address.
_rewarder
Address of the reward contract.
Add a new LP to the pool.
Caller must be Owner of the contract./
function set(
uint256 _pid,
uint256 _allocPoint,
IRewarder _rewarder,
bool overwrite
)
public onlyOwner
/Parameter
Description
_pid
Index of the pool.
_allocPoint
New allocation point number of the LP.
_rewarder
Address of the rewarder delegate.
overwrite
True if _rewarder should be set. Otherwise _rewarder is ignored.
Update the given pool's SUSHI allocation point and IRewarder contract.
Caller must be Owner of the contract./