Skip to content

Commit

Permalink
Merge pull request #149 from ProjectTwelve/deploy-p12TestNet
Browse files Browse the repository at this point in the history
Deploy to p12 testNet
  • Loading branch information
noyyyy authored Aug 21, 2022
2 parents d3f3d80 + d6bca1b commit a192e0a
Show file tree
Hide file tree
Showing 21 changed files with 15,703 additions and 5 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ cache
coverage*
gasReporterOutput.json
typechain
deployments
6 changes: 3 additions & 3 deletions contracts/staking/P12MineUpgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ contract P12MineUpgradeable is
@notice Get pending rewards
@param lpToken Address of lpToken
*/
function claim(address lpToken) public virtual override nonReentrant whenNotPaused returns (uint256){
function claim(address lpToken) public virtual override nonReentrant whenNotPaused returns (uint256) {
uint256 pid = getPid(lpToken);
require(userInfo[pid][msg.sender].amount > 0, 'P12Mine: no staked token');
PoolInfo storage pool = poolInfos[pid];
Expand All @@ -318,7 +318,7 @@ contract P12MineUpgradeable is
/**
@notice Get all pending rewards
*/
function claimAll() public virtual override nonReentrant whenNotPaused returns (uint256){
function claimAll() public virtual override nonReentrant whenNotPaused returns (uint256) {
uint256 length = poolInfos.length;
uint256 pending = 0;
for (uint256 pid = 0; pid < length; pid++) {
Expand Down Expand Up @@ -358,7 +358,7 @@ contract P12MineUpgradeable is
pool.amount -= amount;
user.rewardDebt = (user.amount * pool.accP12PerShare) / ONE;
IERC20Upgradeable(pool.lpToken).safeTransfer(address(_who), amount);
emit ExecuteWithdraw(_who, pid,id, amount, user.amount, pool.amount);
emit ExecuteWithdraw(_who, pid, id, amount, user.amount, pool.amount);
}

/**
Expand Down
11 changes: 9 additions & 2 deletions contracts/staking/interfaces/IP12MineUpgradeable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ import './IGaugeController.sol';

interface IP12MineUpgradeable {
event Deposit(address indexed user, uint256 indexed pid, uint256 amount, uint256 userAmount, uint256 poolAmount); // deposit lpToken log
event ExecuteWithdraw(address indexed user, uint256 indexed pid,bytes32 indexed withdrawId, uint256 amount, uint256 userAmount, uint256 poolAmount); // withdraw lpToken log
event ExecuteWithdraw(
address indexed user,
uint256 indexed pid,
bytes32 indexed withdrawId,
uint256 amount,
uint256 userAmount,
uint256 poolAmount
); // withdraw lpToken log
event QueueWithdraw(
address indexed user,
uint256 pid,
Expand Down Expand Up @@ -72,5 +79,5 @@ interface IP12MineUpgradeable {

function claimAll() external returns (uint256); // get all pending rewards

function checkpoint(address lpToken) external ;
function checkpoint(address lpToken) external;
}
Loading

0 comments on commit a192e0a

Please sign in to comment.