StakingPoolForUniswapV2Tokens
It is a staking pool for Uniswap V2 LP tokens (stake Uniswap V2 LP tokens -> get LOOKS).
rewardToken
= LOOKS tokens
stakedToken
= UniswapV2 LP tokens
function PRECISION_FACTOR() external view returns (uint256)
Name | Type | Description |
---|
PRECISION_FACTOR | uint256 | - |
function START_BLOCK() external view returns (uint256)
Name | Type | Description |
---|
START_BLOCK | uint256 | start block for the staking |
function accTokenPerShare() external view returns (uint256)
Name | Type | Description |
---|
accTokenPerShare() | uint256 | accumulated token per share |
function adminRewardWithdraw(uint256 amount) external nonpayable
Withdraw rewards (for admin)
Only callable by owner.
Name | Type | Description |
---|
amount | uint256 | amount to withdraw (in looksRareToken) |
function calculatePendingRewards(address user) external view returns (uint256)
View function to see pending rewards on frontend.
Name | Type | Description |
---|
user | address | address of the user |
Name | Type | Description |
---|
- | uint256 | pending rewards (in rewardToken) |
function deposit(uint256 amount) external nonpayable
Deposit staked tokens and collect reward tokens (if any)
Name | Type | Description |
---|
amount | uint256 | amount to deposit (in stakedToken) |
function emergencyWithdraw() external nonpayable
Withdraw staked tokens and give up rewards
Only for emergency. It does not update the pool.
function endBlock() external view returns (uint256)
Name | Type | Description |
---|
endBlock | uint256 | end block for the staking |
function harvest() external nonpayable
Harvest tokens that are pending
function lastRewardBlock() external view returns (uint256)
Name | Type | Description |
---|
lastRewardBlock | uint256 | last reward block |
function looksRareToken() external view returns (contract IERC20)
Name | Type | Description |
---|
looksRareToken | contract IERC20 | address of the LOOKS Token |
function owner() external view returns (address)
Returns the address of the current owner.
Name | Type | Description |
---|
owner | address | address of the current owner |
function pause() external nonpayable
Pause It allows calling emergencyWithdraw
function paused() external view returns (bool)
Returns true if the contract is paused, and false otherwise.
Name | Type | Description |
---|
- | bool | whether the contract is paused (true if paused, false if unpaused) |
function renounceOwnership() external nonpayable
Leaves the contract without owner. It will not be possible to call onlyOwner
functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
function rewardPerBlock() external view returns (uint256)
Name | Type | Description |
---|
rewardPerBlock | uint256 | reward per block (in rewardToken ) |
function stakedToken() external view returns (contract IERC20)
Name | Type | Description |
---|
stakedToken | contract IERC20 | address of the stakedToken (i.e., Uniswap V2 LP tokens) |
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Name | Type | Description |
---|
newOwner | address | address of the new owner |
function unpause() external nonpayable
Unpause
function updateRewardPerBlockAndEndBlock(uint256 newRewardPerBlock, uint256 newEndBlock) external nonpayable
Update reward per block and the end block
Name | Type | Description |
---|
newRewardPerBlock | uint256 | new reward per block |
newEndBlock | uint256 | new end block |
function userInfo(address) external view returns (uint256 amount, uint256 rewardDebt)
Name | Type | Description |
---|
user | address | address of the user |
Name | Type | Description |
---|
amount | uint256 | amount of tokens staked |
rewardDebt | uint256 | reward debt |
function withdraw(uint256 amount) external nonpayable
Withdraw staked tokens and collect reward tokens
Name | Type | Description |
---|
amount | uint256 | amount to withdraw (in stakedToken) |
event AdminRewardWithdraw(uint256 amount)
Name | Type | Description |
---|
amount | uint256 | amount of tokens withdrawn by the owner (in rewardToken ) |
event Deposit(address indexed user, uint256 amount, uint256 harvestedAmount)
Name | Type | Description |
---|
user indexed | address | user address |
amount | uint256 | amount deposited (in stakedToken ) |
harvestedAmount | uint256 | amount harvested (in rewardToken ) |
event EmergencyWithdraw(address indexed user, uint256 amount)
It is only callable if the contract status is paused.
Name | Type | Description |
---|
user indexed | address | user address |
amount | uint256 | amount withdrawn (in stakedToken ) |
event Harvest(address indexed user, uint256 harvestedAmount)
Name | Type | Description |
---|
user indexed | address | user address |
harvestedAmount | uint256 | harvestedAmount (in rewardToken ) |
event NewRewardPerBlockAndEndBlock(uint256 rewardPerBlock, uint256 endBlock)
Name | Type | Description |
---|
rewardPerBlock | uint256 | reward per block (in rewardToken ) |
endBlock | uint256 | new end block for the staking |
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Name | Type | Description |
---|
previousOwner indexed | address | address of the previous owner |
newOwner indexed | address | address of the new owner |
event Paused(address account)
Name | Type | Description |
---|
account | address | - |
event Unpaused(address account)
Name | Type | Description |
---|
account | address | - |
event Withdraw(address indexed user, uint256 amount, uint256 harvestedAmount)
Name | Type | Description |
---|
user indexed | address | user address |
amount | uint256 | amount withdrawn (in stakedToken) |
harvestedAmount | uint256 | harvested amount (in rewardToken) |