Skip to content

Commit

Permalink
change pauser roles to admin
Browse files Browse the repository at this point in the history
  • Loading branch information
0xCardinalError committed May 28, 2024
1 parent 8f98518 commit 763e72e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/PostageStamp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('PostageStamp', function () {

it('should assign the pauser role', async function () {
const postageStamp = await ethers.getContract('PostageStamp');
const pauserRole = await postageStamp.PAUSER_ROLE();
const pauserRole = await postageStamp.DEFAULT_ADMIN_ROLE();
expect(await postageStamp.hasRole(pauserRole, deployer)).to.be.true;
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/Redistribution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ describe('Redistribution', function () {
redistribution = await ethers.getContract('Redistribution');
token = await ethers.getContract('TestToken', deployer);

const pauserRole = await read('StakeRegistry', 'PAUSER_ROLE');
const pauserRole = await read('StakeRegistry', 'DEFAULT_ADMIN_ROLE');
await execute('StakeRegistry', { from: deployer }, 'grantRole', pauserRole, pauser);

//initialise, set minimum price, todo: move to deployment
Expand Down
8 changes: 4 additions & 4 deletions test/Staking.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('Staking', function () {
await deployments.fixture();
stakeRegistry = await ethers.getContract('StakeRegistry');

const pauserRole = await read('StakeRegistry', 'PAUSER_ROLE');
const pauserRole = await read('StakeRegistry', 'DEFAULT_ADMIN_ROLE');
await execute('StakeRegistry', { from: deployer }, 'grantRole', pauserRole, pauser);
});

Expand All @@ -88,7 +88,7 @@ describe('Staking', function () {
});

it('should set the pauser role', async function () {
const pauserRole = await stakeRegistry.PAUSER_ROLE();
const pauserRole = await stakeRegistry.DEFAULT_ADMIN_ROLE();
expect(await stakeRegistry.hasRole(pauserRole, pauser)).to.be.true;
});

Expand Down Expand Up @@ -285,7 +285,7 @@ describe('Staking', function () {
await sr_staker_0.depositStake(nonce_0, stakeAmount_0);

const stakeRegistryDeployer = await ethers.getContract('StakeRegistry', deployer);
const pauserRole = await stakeRegistryDeployer.PAUSER_ROLE();
const pauserRole = await stakeRegistryDeployer.DEFAULT_ADMIN_ROLE();
await stakeRegistryDeployer.grantRole(pauserRole, pauser);
});

Expand Down Expand Up @@ -353,7 +353,7 @@ describe('Staking', function () {
updatedBlockNumber = await getBlockNumber();

const stakeRegistryDeployer = await ethers.getContract('StakeRegistry', deployer);
const pauserRole = await stakeRegistryDeployer.PAUSER_ROLE();
const pauserRole = await stakeRegistryDeployer.DEFAULT_ADMIN_ROLE();
await stakeRegistryDeployer.grantRole(pauserRole, pauser);
});

Expand Down
2 changes: 1 addition & 1 deletion test/Stats.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('Stats', async function () {
const priceOracleRole = await read('PostageStamp', 'PRICE_ORACLE_ROLE');
await execute('PostageStamp', { from: deployer }, 'grantRole', priceOracleRole, oracle);

const pauserRole = await read('StakeRegistry', 'PAUSER_ROLE');
const pauserRole = await read('StakeRegistry', 'DEFAULT_ADMIN_ROLE');
await execute('StakeRegistry', { from: deployer }, 'grantRole', pauserRole, pauser);

const priceOracle = await ethers.getContract('PriceOracle', deployer);
Expand Down

0 comments on commit 763e72e

Please sign in to comment.