Skip to main content

MXC Contributing Guide

Table of contents:

Make a contribution

Here are some ways you can contribute:

Check out the coding standards and documentation standards before you start working on a pull request.

Claim a MXC Contributor GitPOAP

A MXC Contributor GitPOAP is rewarded to anyone that merges in a pull request to one of mxc's GitHub repositories (for example: 2023 MXC Contributor GitPOAP).

After your pull request is merged, a bot will automatically leave a comment with instructions to receive your GitPOAP. You only receive a MXC Contributor GitPOAP for the first pull request you merge in a given year.

Coding standards

Pull requests

Specify the scope of your change with a conventional commit in the PR title (for example, feat(scope): description of feature). This will be squashed and merged into the main branch.

Because we squash all of the changes into a single commit, please try to keep the PR limited to the scope specified in the commit message. This commit message will end up in the automated changelog by checking which packages are affected by the commit. For example, feat(scope): description of feature should only impact the scope package. If your change is a global one, you can use feat: description of feature, for example.

Source code comments

Follow the NatSpec format for documenting smart contract source code. Please adhere to a few additional standards:

  • Choose /** */ over /// for multi-line NatSpec comments to save column space.
  • Omit the usage of @notice and let the compiler automatically pick it up to save column space.
    • For example: /** @notice This is a notice */ becomes /** This is a notice */.

Documentation standards

Use the Microsoft Writing Style Guide as a base point of reference.

Philosophy

  • Create the minimum viable documentation.
  • Don't repeat yourself, use links to existing documentation or inherit it.
  • Keep documentation close to what it's describing (for example, in the source code).

Document types

Group documentation under one of the four categories (adopted from Diátaxis):

  • How to
  • Concepts
  • Tutorials
  • Reference

Images

  • Use SVG files or crushed PNG images.
  • Provide alt text.