Skip to content

Commit ab636ff

Browse files
committed
controller: deploy the contract paused by default to allow for configuring everything and avoid actions until the deployment is verified, then manually unpause to start
1 parent 63a5a1e commit ab636ff

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

contracts/governance/Controller.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ contract Controller is IController, Governed, Pausable {
1616

1717
constructor() public {
1818
Governed._initialize(msg.sender);
19+
_setPaused(true);
20+
_setRecoveryPaused(true);
1921
}
2022

2123
/**

contracts/rewards/RewardsManager.sol

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ contract RewardsManager is RewardsManagerV1Storage, GraphUpgradeable, IRewardsMa
260260
* Called from the Curation contract on mint() and burn()
261261
* @return Accumulated rewards per signal
262262
*/
263-
function updateAccRewardsPerSignal() public override notPaused returns (uint256) {
263+
function updateAccRewardsPerSignal() public override returns (uint256) {
264264
accRewardsPerSignal = getAccRewardsPerSignal();
265265
accRewardsPerSignalLastBlockUpdated = block.number;
266266
return accRewardsPerSignal;
@@ -276,7 +276,6 @@ contract RewardsManager is RewardsManagerV1Storage, GraphUpgradeable, IRewardsMa
276276
function onSubgraphSignalUpdate(bytes32 _subgraphDeploymentID)
277277
public
278278
override
279-
notPaused
280279
returns (uint256)
281280
{
282281
// Called since `total signalled GRT` will change
@@ -303,7 +302,6 @@ contract RewardsManager is RewardsManagerV1Storage, GraphUpgradeable, IRewardsMa
303302
function onSubgraphAllocationUpdate(bytes32 _subgraphDeploymentID)
304303
public
305304
override
306-
notPaused
307305
returns (uint256)
308306
{
309307
Subgraph storage subgraph = subgraphs[_subgraphDeploymentID];

test/lib/fixtures.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ export class NetworkFixture {
5050
await gns.connect(deployer).approveAll()
5151
await rewardsManager.connect(deployer).setIssuanceRate(deployment.defaults.rewards.issuanceRate)
5252

53+
// Unpause the protocol
54+
await controller.connect(deployer).setPaused(false)
55+
await controller.connect(deployer).setRecoveryPaused(false)
56+
5357
return {
5458
controller,
5559
disputeManager,

0 commit comments

Comments
 (0)