Skip to content

Commit

Permalink
use constant address
Browse files Browse the repository at this point in the history
  • Loading branch information
hujw77 committed Feb 20, 2024
1 parent 90c30b2 commit bfd9894
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
9 changes: 1 addition & 8 deletions src/KTONStakingRewards.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract KTONStakingRewards is IStakingRewards, RewardsDistributionRecipient, Re

/* ========== STATE VARIABLES ========== */

IERC20 public stakingToken;
IERC20 public constant stakingToken = IERC20(0x0000000000000000000000000000000000000402);
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public rewardsDuration = 7200;
Expand All @@ -29,13 +29,6 @@ contract KTONStakingRewards is IStakingRewards, RewardsDistributionRecipient, Re
uint256 private _totalSupply;
mapping(address => uint256) private _balances;

/* ========== CONSTRUCTOR ========== */

constructor(address _rewardsDistribution, address _stakingToken) public {
stakingToken = IERC20(_stakingToken);
rewardsDistribution = _rewardsDistribution;
}

/* ========== VIEWS ========== */

function totalSupply() external view returns (uint256) {
Expand Down
3 changes: 2 additions & 1 deletion src/RewardsDistributionRecipient.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pragma solidity ^0.5.16;

contract RewardsDistributionRecipient {
address public rewardsDistribution;
// "KTONStakingRewards" in bytes.
address public constant rewardsDistribution = 0x4b544f4e5374616b696e67526577617264730000;

function notifyRewardAmount() external payable;

Expand Down

0 comments on commit bfd9894

Please sign in to comment.