Metafactory deploys MVD, Governor Contract, Treasury, Token, and any other associated modules.
The Metafactory contract acts as a factory proxy which quickly sets up a MVD and attaches any modules that a user would like to include. It creates permissions in the access control and removes renounces its role at the end of setup
Clone the repository:
git clone ...
Lookup the recommended Node version to use in the .nvmrc file and install and use the correct version:
nvm install
nvm use
Install necessary dependencies:
npm install
Add .env
values replacing the private key and provider values for desired networks
cp .env.example .env
Compile contracts to create typechain files:
npm run compile
Run the tests
npm run test
npx hardhat deploy --network <network>
To deploy the base Fractal contracts open a terminal and run:
npx hardhat node
This will deploy the following contracts and log the addresses they were deployed to:
- MetaFactory
Deploys all other contracts for testing purposes
Each module should inherit the MVD contracts to include:
- moduleBase.sol
- IModuleBaseFactory.sol
npm i fractal-contracts-package
Including un-compiled contracts within typechain-types. Follow theses steps hardhat plug-in https://www.npmjs.com/package/hardhat-dependency-compiler