MiniChefV2
The (older) MasterChef contract gives out a constant number of SYNAPSE tokens per block. It is the only address with minting rights for SYNAPSE. The idea for this MasterChef V2 (MCV2) contract is therefore to be the owner of a dummy token that is deposited into the MasterChef V1 (MCV1) contract. The allocation point for this pool on MCV1 is the total allocation point for all pools that receive double incentives.
Methods
SYNAPSE
Address of SYNAPSE contract.
Returns
_0
contract IERC20
undefined
add
Add a new LP to the pool. Can only be called by the owner. DO NOT add the same LP token more than once. Rewards will be messed up if you do.
Parameters
allocPoint
uint256
AP of the new pool.
_lpToken
contract IERC20
Address of the LP ERC-20 token.
_rewarder
contract IRewarder
Address of the rewarder delegate.
batch
Parameters
calls
bytes[]
undefined
revertOnFail
bool
undefined
Returns
successes
bool[]
undefined
results
bytes[]
undefined
claimOwnership
deposit
Deposit LP tokens to MCV2 for SYNAPSE allocation.
Parameters
pid
uint256
The index of the pool. See poolInfo
.
amount
uint256
LP token amount to deposit.
to
address
The receiver of amount
deposit benefit.
emergencyWithdraw
Withdraw without caring about rewards. EMERGENCY ONLY.
Parameters
pid
uint256
The index of the pool. See poolInfo
.
to
address
Receiver of the LP tokens.
harvest
Harvest proceeds for transaction sender to to
.
Parameters
pid
uint256
The index of the pool. See poolInfo
.
to
address
Receiver of SYNAPSE rewards.
lpToken
Address of the LP token for each MCV2 pool.
Parameters
_0
uint256
undefined
Returns
_0
contract IERC20
undefined
massUpdatePools
Update reward variables for all pools. Be careful of gas spending!
Parameters
pids
uint256[]
Pool IDs of all to be updated. Make sure to update all active pools.
owner
Returns
_0
address
undefined
pendingOwner
Returns
_0
address
undefined
pendingSynapse
View function to see pending SYNAPSE on frontend.
Parameters
_pid
uint256
The index of the pool. See poolInfo
.
_user
address
Address of user.
Returns
pending
uint256
SYNAPSE reward for a given user.
permitToken
Parameters
token
contract IERC20
undefined
from
address
undefined
to
address
undefined
amount
uint256
undefined
deadline
uint256
undefined
v
uint8
undefined
r
bytes32
undefined
s
bytes32
undefined
poolInfo
Info of each MCV2 pool.
Parameters
_0
uint256
undefined
Returns
accSynapsePerShare
uint128
undefined
lastRewardTime
uint64
undefined
allocPoint
uint64
undefined
poolLength
Returns the number of MCV2 pools.
Returns
pools
uint256
undefined
rewarder
Address of each IRewarder
contract in MCV2.
Parameters
_0
uint256
undefined
Returns
_0
contract IRewarder
undefined
set
Update the given pool's SYNAPSE allocation point and IRewarder
contract. Can only be called by the owner.
Parameters
_pid
uint256
The index of the pool. See poolInfo
.
_allocPoint
uint256
New AP of the pool.
_rewarder
contract IRewarder
Address of the rewarder delegate.
overwrite
bool
True if _rewarder should be set
. Otherwise _rewarder
is ignored.
setSynapsePerSecond
Sets the synapse per second to be distributed. Can only be called by the owner.
Parameters
_synapsePerSecond
uint256
The amount of Synapse to be distributed per second.
synapsePerSecond
Returns
_0
uint256
undefined
totalAllocPoint
Total allocation points. Must be the sum of all allocation points in all pools.
Returns
_0
uint256
undefined
transferOwnership
Parameters
newOwner
address
undefined
direct
bool
undefined
renounce
bool
undefined
updatePool
Update reward variables of the given pool.
Parameters
pid
uint256
The index of the pool. See poolInfo
.
Returns
pool
MiniChefV2.PoolInfo
Returns the pool that was updated.
userInfo
Info of each user that stakes LP tokens.
Parameters
_0
uint256
undefined
_1
address
undefined
Returns
amount
uint256
undefined
rewardDebt
int256
undefined
withdraw
Withdraw LP tokens from MCV2.
Parameters
pid
uint256
The index of the pool. See poolInfo
.
amount
uint256
LP token amount to withdraw.
to
address
Receiver of the LP tokens.
withdrawAndHarvest
Withdraw LP tokens from MCV2 and harvest proceeds for transaction sender to to
.
Parameters
pid
uint256
The index of the pool. See poolInfo
.
amount
uint256
LP token amount to withdraw.
to
address
Receiver of the LP tokens and SYNAPSE rewards.
Events
Deposit
Parameters
user indexed
address
undefined
pid indexed
uint256
undefined
amount
uint256
undefined
to indexed
address
undefined
EmergencyWithdraw
Parameters
user indexed
address
undefined
pid indexed
uint256
undefined
amount
uint256
undefined
to indexed
address
undefined
Harvest
Parameters
user indexed
address
undefined
pid indexed
uint256
undefined
amount
uint256
undefined
LogPoolAddition
Parameters
pid indexed
uint256
undefined
allocPoint
uint256
undefined
lpToken indexed
contract IERC20
undefined
rewarder indexed
contract IRewarder
undefined
LogSetPool
Parameters
pid indexed
uint256
undefined
allocPoint
uint256
undefined
rewarder indexed
contract IRewarder
undefined
overwrite
bool
undefined
LogSynapsePerSecond
Parameters
synapsePerSecond
uint256
undefined
LogUpdatePool
Parameters
pid indexed
uint256
undefined
lastRewardTime
uint64
undefined
lpSupply
uint256
undefined
accSynapsePerShare
uint256
undefined
OwnershipTransferred
Parameters
previousOwner indexed
address
undefined
newOwner indexed
address
undefined
Withdraw
Parameters
user indexed
address
undefined
pid indexed
uint256
undefined
amount
uint256
undefined
to indexed
address
undefined
Last updated