A starter kit for creating Zodiac Modules and Modifiers.
The repo contains a sample based on the "Zodiac: build your own module" tutorial found here.
This starter kit is set up to be used with Hardhat. A starter kit using Foundry is available here.
To see available commands run yarn hardhat
.
Some helpful commands:
yarn install # install dependencies
yarn build # compiles contracts
yarn test # runs the tests
yarn deploy # deploys the contracts add the `--network` param to select a network
This project is set up for deployment via the Mastercopy / Minimal Proxy pattern (using our ModuleProxyFactory).
yarn deploy
This will set up a minimal sample Zodiac Module in the following steps:
- Deploy the Singleton Factory EIP-2470, if its not already deployed to the current chain. This is used for deploying Zodiac Modules (and the Module Factory) to the same address deterministic across chains.
- Deploy the Module, MyModule (
contracts/MyModule.sol
). - Deploy the Zodiac Module Factory.
- Deploy a Test Avatar.
- Deploy a Button contract.
- Set the Test Avatar as the Button owner.
- Deploy a minimal proxy (clone) of the MyModule Module using the Zodiac Module Factory.
This deployment uses the Singleton Factory contract (EIP-2470). See a list of supported networks here. For adding support to other chains, check out the documentation here and here.
Once you have created a module and want to add it to a Gnosis Safe:
- In the Gnosis Safe app, navigate to the "apps" tab and select the Zodiac Safe App.
- Select "custom module", enter the address of your newly deployed module, and hit "Add Module".
It will then show up under Modules and Modifiers in the Gnosis Safe's Zodiac app.