DAOBridger is a robust solution designed to support cross-chain DAO functionalities. It allows users to create and vote on proposals across multiple chains without transferring their governance tokens. Follow the steps below to set up the necessary components.
- Clone the Repository: Clone the hyperlane-deploy repo from GitHub:
git clone https://github.com/DAOBridger/hyperlane-deploy
- Install Dependencies: Use Yarn to install dependencies:
yarn install
- Configure Environment Variables: Copy the .env.template file to .env and fill the Infura API key:
cp .env.template .env
- Configure Validators: Update the transaction validators' addresses in
config/multisig_ism.ts
within the lineagoerli section. - Update Block Height: Update the current block height of the linea goerli network in the
config/start_blocks.ts
file. - Deploy Hyperlane Contracts: Deploy with the following command (customize as needed):
yarn ts-node scripts/deploy-hyperlane.ts --local lineagoerli --remotes goerli sepolia --key ${deployer's private key}
- Clone the Binaries Repo: Clone the hyperlane-binaries repo from GitHub:
git clone https://github.com/DAOBridger/hyperlane-binaries
- Build Binaries: Build the necessary binaries:
cargo build --release --bin validator cargo build --release --bin relayer
- Configure Environment Files: Copy and update the environment files:
cp validator.env.template validator.env cp relayer.env.template relayer.env
- Run Validator and Relayer: Run the following in separate terminals:
env $(cat validator.env | grep -v "#" | xargs) ./target/release/validator env $(cat relayer.env | grep -v "#" | xargs) ./target/release/relayer
- Clone Contracts Repo: Clone the contracts repository:
git clone https://github.com/DAOBridger/contracts
- Install Dependencies:
yarn install
- Prepare Hyperlane Artifacts: Delete the existing folder if needed and copy the artifacts:
cp -r ../hyperlane-deploy/artifacts ./hyperlane-artifacts
- Configure Environment Variables: Copy the .env.template file to .env and fill the Infura API key and the Mnemonic:
cp .env.template .env
- Run Migration Scripts: Perform the migration steps across the different networks as follows:
npx truffle migrate --network lineagoerli --tokenAddress $tokenAddress npx truffle migrate --network goerli --tokenAddress $tokenAddress npx truffle migrate --network sepolia --tokenAddress $tokenAddress npx truffle migrate --network lineagoerli npx truffle migrate --network goerli
By following the above steps, you will successfully deploy the governor contract to the linea testnet, goerli, and sepolia chains. Users will now be able to engage in cross-chain DAO activities, including creating proposals and voting without transferring their governance tokens between chains. If you need further assistance or have any questions, please contact [email protected].
- Hyperlane Mailbox:
0xfa9057F23949A70d8c08d3bc7EaeBe6D593B7Ec3
- Hyperlane Interchain Gas Paymaster:
0x8E93E48A05b21f9367e5a45fc037683040Fb81ed
- Governor Contract:
0x33d0360B653127424D4dEF3Aeeac16E30DE51050
- Governance Token:
0xffF278B0c72AFa2ECC56efAba0E54Df8eA56965B
- Governor Contract:
0xc64d6cedC531da06F9688C11cF5288d8B0c19920
- Governance Token:
0x3c9BA54eE1165e60830CA82d840A67D10E23FCD4
- Governor Contract:
0xc64d6cedC531da06F9688C11cF5288d8B0c19920
- Governance Token:
0x3c9BA54eE1165e60830CA82d840A67D10E23FCD4
- Linea: I deployed the governor and the hyperlane contracts on linea.
- https://github.com/DAOBridger/contracts/blob/main/truffle-config.js#L69
- https://github.com/DAOBridger/contracts/blob/main/detailStore/Governor-lineagoerli.json
- https://github.com/DAOBridger/hyperlane-deploy/blob/main/config/chains.ts#L46
- https://github.com/DAOBridger/hyperlane-deploy/blob/main/config/multisig_ism.ts#L21
- https://github.com/DAOBridger/hyperlane-deploy/blob/main/config/start_blocks.ts#L25
- https://github.com/DAOBridger/hyperlane-binaries/blob/main/relayer.env.template#L6
- https://github.com/DAOBridger/hyperlane-binaries/blob/main/validator.env.template#L1
- Truffle: I used truffle to develop, test, and deploy the governor and governance token contracts.
- Infura: I used infura to connect to linea goerli, goerli and sepolia networks to deploy and test the smart contracts.
- Hyperlane: I used hyperlane for cross chain communication between different governor contracts.