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

function SYNAPSE() external view returns (contract IERC20)

Address of SYNAPSE contract.

Returns

add

function add(uint256 allocPoint, contract IERC20 _lpToken, contract IRewarder _rewarder) external nonpayable

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

batch

function batch(bytes[] calls, bool revertOnFail) external payable returns (bool[] successes, bytes[] results)

Parameters

Returns

claimOwnership

function claimOwnership() external nonpayable

deposit

function deposit(uint256 pid, uint256 amount, address to) external nonpayable

Deposit LP tokens to MCV2 for SYNAPSE allocation.

Parameters

emergencyWithdraw

function emergencyWithdraw(uint256 pid, address to) external nonpayable

Withdraw without caring about rewards. EMERGENCY ONLY.

Parameters

harvest

function harvest(uint256 pid, address to) external nonpayable

Harvest proceeds for transaction sender to to.

Parameters

lpToken

function lpToken(uint256) external view returns (contract IERC20)

Address of the LP token for each MCV2 pool.

Parameters

Returns

massUpdatePools

function massUpdatePools(uint256[] pids) external nonpayable

Update reward variables for all pools. Be careful of gas spending!

Parameters

owner

function owner() external view returns (address)

Returns

pendingOwner

function pendingOwner() external view returns (address)

Returns

pendingSynapse

function pendingSynapse(uint256 _pid, address _user) external view returns (uint256 pending)

View function to see pending SYNAPSE on frontend.

Parameters

Returns

permitToken

function permitToken(contract IERC20 token, address from, address to, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable

Parameters

poolInfo

function poolInfo(uint256) external view returns (uint128 accSynapsePerShare, uint64 lastRewardTime, uint64 allocPoint)

Info of each MCV2 pool.

Parameters

Returns

poolLength

function poolLength() external view returns (uint256 pools)

Returns the number of MCV2 pools.

Returns

rewarder

function rewarder(uint256) external view returns (contract IRewarder)

Address of each IRewarder contract in MCV2.

Parameters

Returns

set

function set(uint256 _pid, uint256 _allocPoint, contract IRewarder _rewarder, bool overwrite) external nonpayable

Update the given pool's SYNAPSE allocation point and IRewarder contract. Can only be called by the owner.

Parameters

setSynapsePerSecond

function setSynapsePerSecond(uint256 _synapsePerSecond) external nonpayable

Sets the synapse per second to be distributed. Can only be called by the owner.

Parameters

synapsePerSecond

function synapsePerSecond() external view returns (uint256)

Returns

totalAllocPoint

function totalAllocPoint() external view returns (uint256)

Total allocation points. Must be the sum of all allocation points in all pools.

Returns

transferOwnership

function transferOwnership(address newOwner, bool direct, bool renounce) external nonpayable

Parameters

updatePool

function updatePool(uint256 pid) external nonpayable returns (struct MiniChefV2.PoolInfo pool)

Update reward variables of the given pool.

Parameters

Returns

userInfo

function userInfo(uint256, address) external view returns (uint256 amount, int256 rewardDebt)

Info of each user that stakes LP tokens.

Parameters

Returns

withdraw

function withdraw(uint256 pid, uint256 amount, address to) external nonpayable

Withdraw LP tokens from MCV2.

Parameters

withdrawAndHarvest

function withdrawAndHarvest(uint256 pid, uint256 amount, address to) external nonpayable

Withdraw LP tokens from MCV2 and harvest proceeds for transaction sender to to.

Parameters

Events

Deposit

event Deposit(address indexed user, uint256 indexed pid, uint256 amount, address indexed to)

Parameters

EmergencyWithdraw

event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount, address indexed to)

Parameters

Harvest

event Harvest(address indexed user, uint256 indexed pid, uint256 amount)

Parameters

LogPoolAddition

event LogPoolAddition(uint256 indexed pid, uint256 allocPoint, contract IERC20 indexed lpToken, contract IRewarder indexed rewarder)

Parameters

LogSetPool

event LogSetPool(uint256 indexed pid, uint256 allocPoint, contract IRewarder indexed rewarder, bool overwrite)

Parameters

LogSynapsePerSecond

event LogSynapsePerSecond(uint256 synapsePerSecond)

Parameters

LogUpdatePool

event LogUpdatePool(uint256 indexed pid, uint64 lastRewardTime, uint256 lpSupply, uint256 accSynapsePerShare)

Parameters

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

Withdraw

event Withdraw(address indexed user, uint256 indexed pid, uint256 amount, address indexed to)

Parameters

Last updated