-
Notifications
You must be signed in to change notification settings - Fork 158
fix: prevent unpausing gateways if they're not configured (OZ M-01 from #700) #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,29 @@ import { task } from 'hardhat/config' | |
import { cliOpts } from '../../cli/defaults' | ||
import GraphChain from '../../gre/helpers/network' | ||
|
||
task('migrate:unpause', 'Unpause protocol and bridge') | ||
task('migrate:unpause', 'Unpause protocol (except bridge)') | ||
.addOptionalParam('addressBook', cliOpts.addressBook.description) | ||
.addOptionalParam('graphConfig', cliOpts.graphConfig.description) | ||
.setAction(async (taskArgs, hre) => { | ||
const graph = hre.graph(taskArgs) | ||
const { governor } = await graph.getNamedAccounts() | ||
const { Controller, L1GraphTokenGateway, L2GraphTokenGateway } = graph.contracts | ||
const { Controller } = graph.contracts | ||
|
||
console.log('> Unpausing protocol') | ||
const tx = await Controller.connect(governor).setPaused(false) | ||
await tx.wait() | ||
|
||
console.log('Done!') | ||
}) | ||
|
||
task('migrate:unpause-bridge', 'Unpause bridge') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. which is pending merge after audit. I'd still make the change here and later we solve the conflict whenever it shows up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oooh oops, sorry I missed that. But yeah, let's keep the change here so that we have e2e passing here. |
||
.addOptionalParam('addressBook', cliOpts.addressBook.description) | ||
.addOptionalParam('graphConfig', cliOpts.graphConfig.description) | ||
.setAction(async (taskArgs, hre) => { | ||
const graph = hre.graph(taskArgs) | ||
const { governor } = await graph.getNamedAccounts() | ||
const { L1GraphTokenGateway, L2GraphTokenGateway } = graph.contracts | ||
|
||
console.log('> Unpausing bridge') | ||
const GraphTokenGateway = GraphChain.isL2(graph.chainId) | ||
? L2GraphTokenGateway | ||
|
Uh oh!
There was an error while loading. Please reload this page.