This is the monorepo for Cannon. If you’re just interested in using the project, visit the website.
For more information, please see documentation in the modules listed below:
cli
: The command-line interface. Runnpx @usecannon/cli --help
for usage information.builder
: Builds chain data from cannonfiles. (This is used by the CLI.)hardhat-cannon
: Code for the Hardhat plug-in, which wraps the CLI functionality with defaults pulled from a Hardhat project configuration.registry
: The smart contract for the package registry.registry-subgraph
: Indexes the registry contract onto The Graph for display on the website.website
: The website, hosted at https://usecannon.comsample-hardhat-project
: Hardhat project that demonstrates the core functionality of thehardhat-cannon
modulesample-foundry-project
: Foundry project that demonstrates the core functionality of thecli
modulecontracts
: Cannonfiles for standard contracts
Community contributions to Cannon are greatly appreciated. Please open pull requests, issues, and discussions in the GitHub repository.
To load a development version of Cannon, start by bootstrapping the project from the root directory:
npx lerna bootstrap
npm i
After making changes, rebuild the project:
npm run build
Use the development version of the CLI:
cd ./packages/cli && npm start -- <package:version>
Test changes to the Hardhat plug-in in the sample project:
cd ./packages/sample-hardhat-project && npx hardhat cannon:build
Preview updates to the website
cd ./packages/website && npm run dev
With appropriate permissions on npm, publish updates using the lerna publish command. For example, npx lerna publish patch
will publish updated packages as the next patch version.
This project is licensed under the terms of the GNU General Public License v3.0, except for the code available in packages/contracts
which is licensed under the terms of the MIT License.
Copyright (C) 2023 Daniel Beal, Noah Litvin, Matías Lescano