This repository serves as a template monorepo for developing on multiple blockchains. The goal is to provide the generally recommended starting setups for each runtime along with pre-configured CI.
Run npm ci
at the root of this repo to install Prettier.
Required versions are defined in ./svm/rust-toolchain.toml and ./svm/Anchor.toml
Recommended VSCode settings and extensions have been included as workspace settings in this repository (.vscode
).
This includes:
- Foundry's forge formatting
- Prettier
- This should work after running
npm ci
at the root of this repo.
- This should work after running
Additional, related settings may be required based on your use.
- Default branch:
main
- Disallow merge commits
- Always suggest updating pull request branches
- Automatically delete head branches
- Ruleset Name: Require PRs
- Enforcement status: Active
- Target branches / Add target: Include default branch
- Branch rules
- Restrict deletions
- Require linear history
- Require a pull request before merging
- Required approvals: 1 (or more/less depending on your number of contributors)
- Dismiss stale pull request approvals when new commits are pushed
- Require review from Code Owners
- Require approval of the most recent reviewable push
- Require conversation resolution before merging
- Require status checks to pass
- Require branches to be up to date before merging
- Add checks
- Anchor Test
- Foundry project
- prettier
- spellcheck
- Block force pushes
- Restrictions [Enterprise Only]
- Restrict commit metadata
- Add restriction
- Applies to: Commit message
- Requirement: Must match a given regex pattern
- Matching pattern:
^(ci|evm|svm|readme){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)
for file/folder prefixes- or
^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)
to enforce conventional commits
- Add restriction
- Restrict commit metadata