Skip to content
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

feat(governance): add Base supports for cross-chain calls using Connext bridge #13679

Merged
merged 3 commits into from Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 38 additions & 5 deletions governance/scripts/deploy_multisig_mods
Expand Up @@ -6,20 +6,53 @@
*
* Usage: scripts/deploy_multisig_mods
*
* ## How to deploy Zodiac modules
*
* 1. get the modules code
* git clone git@github.com:gnosisguild/zodiac-modifier-delay.git
* git clone git@github.com:gnosisguild/zodiac-module-connext.git
*
* 2. prepare repo
* yarn
* yarn build
*
* 3. add required network in `hardhat.config.ts` with the following pattern
* `
* base: {
* url: "https://rpc.unlock-protocol.com/8453",
* accounts: [process.env.DEPLOYER_PRIVATE_KEY],
* },
* `
* and block explorer api key
*
* `
* etherscan: {
* apiKey: {
* base: '<your-api-key>',
* }
* },
* `
*
* 4. export DEPLOYER_PRIVATE_KEY to env
* 5. run this script to get the commands
*
* NB: the first run will give you instructions for delay module. The second
* one for Connext module.
*
*/

const allNetworks = require('@unlock-protocol/networks')

const owner = '0x246A13358Fb27523642D86367a51C2aEB137Ac6C'
const daoTimelockAddress = '0x17eedfb0a6e6e06e95b3a1f928dc4024240bc76b'
const daoTimelockAddress = '0x17EEDFb0a6E6e06E95B3A1F928dc4024240BC76B'
const daoChainId = 1
const daoDomainId = allNetworks.networks[daoChainId].governanceBridge.domainId

// in seconds
const ONE_DAY = 24 * 3600

// if any network is present this array, only these will be executed
const only = ['polygon', 'gnosis', 'bsc', 'arbitrum', 'optimism']
const only = ['polygon', 'gnosis', 'bsc', 'arbitrum', 'optimism', 'base']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should mobve that config to the package network. Maybe a flag there?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we gain much by automating it here. The script is just a parser to show command line, it does not actually execute anything


// these networks will be excluded from run
const toExclude = ['localhost', 'default', 'networks']
Expand Down Expand Up @@ -50,9 +83,8 @@ for (let i = 0; i < networks.length; i++) {
ONE_DAY * 90, // 90 days expiration
]

console.log(`yarn hardhat setup ${args.join(' ')}`)

console.log(`yarn hardhat verifyEtherscan ${args.join(' ')} --modifier`)
console.log(`# Zodiac Delay Mod`)
console.log(`yarn hardhat deploy ${args.join(' ')}`)
} else {
if (governanceBridge.modules) {
console.log(`Delay mod at ${governanceBridge.modules.delayMod}`)
Expand All @@ -75,6 +107,7 @@ for (let i = 0; i < networks.length; i++) {
governanceBridge.modules.delayMod,
]

console.log(`# Zodiac Connext Module`)
console.log(`yarn hardhat setup ${argsConnext.join(' ')}`)

console.log(
Expand Down
8 changes: 8 additions & 0 deletions packages/networks/src/networks/base.ts
Expand Up @@ -19,6 +19,14 @@ export const base: NetworkConfig = {
},
featured: true,
fullySubsidizedGas: false,
governanceBridge: {
connext: '0xB8448C6f7f7887D36DcA487370778e419e9ebE3F',
domainId: 1650553709,
modules: {
connextMod: '0xfe9fD6af67E48D9f05Aa88679Ac294E3f28532eE',
delayMod: '0x805C2EbaE1510f59E1D717A1A51aFad335FFAec5',
},
},
hooks: {
onKeyPurchaseHook: [
{
Expand Down