Giter VIP home page Giter VIP logo

cannon's Introduction

Cannon

Cannon

Cannon is a DevOps tool for EVM chains. It's a tool for testing, deploying, and publishing of smart contracts.

This is the monorepo for Cannon. If you're just interested in using the project, visit the website.

โš ๏ธ Cannon is under active development. While the interface and functionality are generally stable, use the tool with caution when conducting high-risk deployments.

For more information, please see documentation in the modules listed below:

  • api: Backend for the website.
  • cli: The command-line interface. Run npx @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.
  • indexer: Processes all data for cannon into a Redis database. Used on the website.
  • registry: The smart contract for the package registry.
  • repo: Backend for our homegrown IPFS hosting service.
  • website: The website, hosted at https://usecannon.com.

Usage Examples:

Cannon is 100% open-source, from the dev tooling to our hosted infrastructure.

Development

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 installing the dependencies from the root directory:

npm ci

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 ./examples/sample-hardhat-project && npx hardhat cannon:build

Preview updates to the website

cd ./packages/website && npm run dev

Contribution Guidelines

See CONTRIBUTING.md

Version and Publish

We bump and publish manually using lerna's version and publish workflow.

Stable Release

  1. To create a stable release, first checkout to a new branch (it can be called release-stable or something similar)
  • Note, DO NOT use the version name as the branch name as this can cause conflicts with tags. (eg v2.12.1 as a branch name is incorrect)
  1. Run npm run version-* where * can be patch, minor or major.
  2. Create PR for the release branch
  3. From the branch, run npm run publish and follow the prompts.
  4. Run npm run update-stables to make sure that all the other private packages reference to new release.
  5. Merge release PR

Alpha Release

  1. To create an alpha release, first checkout to a new branch (it can be called release-alpha or something similar)
  • Note, DO NOT use the version name as the branch name as this can cause conflicts with tags. (eg v2.12.1-alpha.0 as a branch name is incorrect)
  1. Run npm run version-alpha to bump package versions to an alpha version.
  2. Create PR for the branch and merge when required tests are passing
  3. From the main branch, run npm run publish-alpha and follow the prompts.

Changesets

We can also use changesets to manage versions on our monorepo.

Currently our release workflow on our CI handles bumping package versions and publishing releases to npm through lerna. It only publishes releases if any changeset PR's have been added to the commit history merged into main.

To trigger a new version bump run the following command (from the root of the repo):

  npm run changeset

License

License: GPL v3

This project is licensed under the terms of the GNU General Public License v3.0.

Copyright (C) 2024 Taihou Technologies

cannon's People

Contributors

noahlitvin avatar dbeal-eth avatar mjlescano avatar fuzzb0t avatar aminlatifi avatar mohammadpch avatar saeta-eth avatar 0xdmitry avatar mohammadranjbarz avatar ignusmart avatar stuartgavidia avatar github-actions[bot] avatar nicosampler avatar dependabot[bot] avatar avniculae avatar noisekit avatar omahs avatar bernard-wagner avatar gunboatsss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.