@@ -35,7 +35,7 @@ contract TokenGeyser is IStaking, Ownable {
3535 // amount: Unlocked tokens, total: Total locked tokens
3636 event TokensUnlocked (uint256 amount , uint256 total );
3737
38- TokenPool public stakingPool ;
38+ TokenPool private _stakingPool ;
3939 TokenPool private _unlockedPool;
4040 TokenPool private _lockedPool;
4141
@@ -110,7 +110,7 @@ contract TokenGeyser is IStaking, Ownable {
110110 require (bonusPeriodSec_ != 0 , 'TokenGeyser: bonus period is zero ' );
111111 require (initialSharesPerToken > 0 , 'TokenGeyser: initialSharesPerToken is zero ' );
112112
113- stakingPool = new TokenPool (stakingToken);
113+ _stakingPool = new TokenPool (stakingToken);
114114 _unlockedPool = new TokenPool (distributionToken);
115115 _lockedPool = new TokenPool (distributionToken);
116116 startBonus = startBonus_;
@@ -123,7 +123,7 @@ contract TokenGeyser is IStaking, Ownable {
123123 * @return The token users deposit as stake.
124124 */
125125 function getStakingToken () public view returns (IERC20 ) {
126- return stakingPool .token ();
126+ return _stakingPool .token ();
127127 }
128128
129129 /**
@@ -186,7 +186,7 @@ contract TokenGeyser is IStaking, Ownable {
186186 // _lastAccountingTimestampSec = now;
187187
188188 // interactions
189- require (stakingPool .token ().transferFrom (staker, address (stakingPool ), amount),
189+ require (_stakingPool .token ().transferFrom (staker, address (_stakingPool ), amount),
190190 'TokenGeyser: transfer into staking pool failed ' );
191191
192192 emit Staked (beneficiary, amount, totalStakedFor (beneficiary), "" );
@@ -266,7 +266,7 @@ contract TokenGeyser is IStaking, Ownable {
266266 // _lastAccountingTimestampSec = now;
267267
268268 // interactions
269- require (stakingPool .transfer (msg .sender , amount),
269+ require (_stakingPool .transfer (msg .sender , amount),
270270 'TokenGeyser: transfer out of staking pool failed ' );
271271 require (_unlockedPool.transfer (msg .sender , rewardAmount),
272272 'TokenGeyser: transfer out of unlocked pool failed ' );
@@ -328,7 +328,7 @@ contract TokenGeyser is IStaking, Ownable {
328328 * @return The total number of deposit tokens staked globally, by all users.
329329 */
330330 function totalStaked () public view returns (uint256 ) {
331- return stakingPool .balance ();
331+ return _stakingPool .balance ();
332332 }
333333
334334 /**
@@ -503,10 +503,14 @@ contract TokenGeyser is IStaking, Ownable {
503503
504504 /**
505505 * @dev Lets the owner rescue funds air-dropped to the staking pool.
506+ * @param _tokenToRescue Address of the token to be rescued.
507+ * @param to Address to which the rescued funds are to be sent.
508+ * @param amount Amount of tokens to be rescued.
509+ * @return Transfer success.
506510 */
507511 function rescueFundsFromStakingPool (address _tokenToRescue , address to , uint256 amount )
508512 public onlyOwner returns (bool ) {
509513
510- return stakingPool .rescueFunds (_tokenToRescue, to, amount);
514+ return _stakingPool .rescueFunds (_tokenToRescue, to, amount);
511515 }
512516}
0 commit comments