Skip to content

Commit

Permalink
chore: improve deployment notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
0xApotheosis committed Sep 16, 2024
1 parent 0b50a32 commit 3b892e8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,15 @@ Test: `npx hardhat test`
## Deploy with Ignition

`npx hardhat ignition deploy ignition/modules/StakingRewards.ts`

### Deployment notes

The `rewardsDistribution` address has exclusive permissions to call the `notifyRewardAmount` function, which is used to add new rewards to the contract.

The `owner` address has exclusive permissions to call:

- The `recoverERC20` function, which is used to recover any ERC20 tokens that are accidentally sent to the contract (except the staking token).

- The `setRewardsDuration` function, which is used to set the rewards duration.

- The `owner` can nominate a new owner for the contract.
2 changes: 1 addition & 1 deletion ignition/modules/StakingRewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { buildModule } from '@nomicfoundation/hardhat-ignition/modules';

const OWNER = '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266';
const REWARDS_DISTRIBUTION = '0x70997970C51812dc3A010C7d01b50e0d17dc79C8';
const REWARDS_TOKEN = '0xc770eefad204b5180df6a14ee197d99d808ee52d';
const REWARDS_TOKEN = '0xc770eefad204b5180df6a14ee197d99d808ee52d'; // FOX
const STAKING_TOKEN = '0x470e8de2ebaef52014a47cb5e6af86884947f08c'; // ETH/FOX Pool

const StakingRewardsModule = buildModule('StakingRewardsModule', (m) => {
Expand Down
2 changes: 1 addition & 1 deletion test/StakingRewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('StakingRewards', function () {
});

describe('Function permissions', () => {
it('only owner can call notifyRewardAmount', async () => {
it('only rewardsDistribution can call notifyRewardAmount', async () => {
const { rewardsDistribution, stakingRewards, rewardsToken, stakingAccount2 } = await loadFixture(deployStakingRewardsFixture);
const rewardAmount = parseEther('1');

Expand Down

0 comments on commit 3b892e8

Please sign in to comment.