-
Notifications
You must be signed in to change notification settings - Fork 0
/
Miso MasterChef Contract
76 lines (46 loc) · 1.24 KB
/
Miso MasterChef 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//Miso MasterChef Contract
//Address
//Init Function
function initFarm(
address _rewards,
uint256 _rewardsPerBlock,
uint256 _startBlock,
address _devaddr,
address _admin
)
public override
/Parameter
Description
_rewards
Reward token address
_rewardsPerBlock
Number of rewards available per block.
_startBlock
Block number when rewards start to be distributed.
_devaddr
Developer address.
_admin
Admin address./
//Initializes Farm with required variables.
//Read-Only Functions
function poolLength() external view returns (uint256)
//Returns the number of farming pools.
function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256)
/Parameter
Description
_from
Block number marking the begining of desired period.
_to
Block number marking the end of desired period.
//Returns reward multiplier over the given _from to _to block.
function pendingRewards(uint256 _pid, address _user) external view returns (uint256)
Parameter
/Description
_pid
Farming pool Id number.
_user
User address.
//Function to display pending rewards for a user.
function blocksRemaining() public view returns (uint256)
//Returns the number of blocks remaining with the current rewards balance.