Skip to content

Commit

Permalink
feat(governance): add Base supports for cross-chain calls using Conne…
Browse files Browse the repository at this point in the history
…xt bridge (#13679)

* add base governance bridge

* add docs

* simplify networks
  • Loading branch information
clemsos committed Apr 26, 2024
1 parent 409f22c commit 396cdf4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 14 deletions.
52 changes: 38 additions & 14 deletions governance/scripts/deploy_multisig_mods
Expand Up @@ -6,29 +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']

// these networks will be excluded from run
const toExclude = ['localhost', 'default', 'networks']

//
const networks = only.length
? only
: Object.keys(allNetworks).filter((n) => !toExclude.includes(n))

const networks = ['polygon', 'gnosis', 'bsc', 'arbitrum', 'optimism', 'base']
console.log(`Running task for the following networks: ${networks.toString()}`)

for (let i = 0; i < networks.length; i++) {
Expand All @@ -50,9 +74,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 +98,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

0 comments on commit 396cdf4

Please sign in to comment.