-
Notifications
You must be signed in to change notification settings - Fork 0
/
Miso MasterChefV2 Contract
57 lines (32 loc) · 1.19 KB
/
Miso MasterChefV2 Contract
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
//Miso MasterChefV2 Contract
//Address
//Init Function
function init(IERC20 dummyToken) external
/Deposits a dummy tokens to MasterChef contract. This is required because MasterChef holds the minting rights for SUSHI. Any balance of transaction sender from dummyToken is transferred. The allocation point for the pool on MCV1 is the total allocation point for all pools that receive double incentives./
//Deposit and withdraw Functions
function deposit(uint256 pid, uint256 amount, address to) public
/Parameter
Description
pid
The index number of the pool.
amount
Deposit amount number.
to
Address of the deposit owner/.
//Deposit LP tokens to MasterChef for SUSHI allocation.
function withdraw(uint256 pid, uint256 amount, address to) public
/Parameter
Description
pid
The index number of the pool.
amount
Withdraw amount number.
to
Address to withdraw to.
Withdraw LP tokens from MasterChef./
//Read-Only Functions
function pendingSushi(uint256 _pid, address _user) external view returns (uint256)
//View function to see pending SUSHI rewards for given pool Id and user.
function sushiPerBlock() public view returns (uint256 amount)
//Calculates and returns the amount of SUSHI per block.