Admin Functions Overview

MasterChef Contract

1
function addToken(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public
Copied!
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.
1
function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public
Copied!
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

1
function add(
2
uint256 allocPoint,
3
IERC20 _lpToken,
4
IRewarder _rewarder
5
)
6
public onlyOwner
Copied!
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.
1
function set(
2
uint256 _pid,
3
uint256 _allocPoint,
4
IRewarder _rewarder,
5
bool overwrite
6
)
7
public onlyOwner
Copied!
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.
Last modified 6mo ago