Skip to content

Latest commit

 

History

History
274 lines (190 loc) · 23.5 KB

File metadata and controls

274 lines (190 loc) · 23.5 KB

Contributing to OpenZeppelin Contracts for Compact

👍🎉 First off, thanks for taking the time to contribute! 🎉👍

We really appreciate and value contributions to OpenZeppelin Contracts for Compact. Please take 5' to review the items listed below to make sure that your contributions are merged and questions are answered.

Table Of Contents

Code of Conduct

I don't want to read this whole thing, I just have a question!!!

What should I know before I get started?

How Can I Contribute?

Styleguides

Additional Notes

Code of Conduct

This project and everyone participating in it is governed by the OpenZeppelin Compact Contracts Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to contact@openzeppelin.com.

I don't want to read this whole thing I just have a question!!!

Note: Please don't file an issue to ask a question. You'll get faster results by using the resources below.

We have an official message board where the community chimes in with helpful advice if you have questions.

What should I know before I get started?

What Is OpenZeppelin Contracts for Compact?

A library for secure smart contract development written in Compact for Midnight.

⚠️ WARNING! ⚠️

This repo contains highly experimental code. Expect rapid iteration. Use at your own risk.

Compact Contracts Design Decisions

We try our best to document important design decisions, limitations, and pitfalls in each module using the NatSpec format. If you have a question about module that's not answered by this documentation please use the Discussion Board.

How Can I Contribute?

Reporting Bugs

This section guides you through submitting a bug report for Compact Contracts. Following these guidelines helps maintainers and the community understand your report 📝, reproduce the behavior 💻 💻, and find related reports 🔎.

Before creating bug reports, please check this list as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible. Fill out the required template, the information it asks for helps us resolve issues faster.

Note: If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.

Before Submitting A Bug Report

  • Check the discussions for a list of common questions and problems.
  • Perform a cursory search to see if the problem has already been reported. If it has and the issue is still open, add a comment to the existing issue instead of opening a new one.

How Do I Submit A (Good) Bug Report?

Bugs are tracked as GitHub issues. Create an issue and provide the following information by filling in the template.

Explain the problem and include additional details to help maintainers reproduce the problem:

  • Use a clear and descriptive title for the issue to identify the problem.
  • Describe the exact steps which reproduce the problem in as many details as possible. When listing steps, don't just say what you did, but explain how you did it.
  • Provide specific examples to demonstrate the steps. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
  • Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
  • Explain which behavior you expected to see instead and why.
  • Include screenshots and animated GIFs which show you following the described steps and clearly demonstrate the problem.

Include details about your configuration and environment:

  • Which version of compactc are you using? You can get the exact version by running compactc --version in your terminal.

Suggesting Enhancements

This section guides you through submitting an enhancement suggestion for OpenZeppelin, including completely new features and minor improvements to existing functionality. Following these guidelines helps maintainers and the community understand your suggestion 📝 and find related suggestions 🔎.

Before creating enhancement suggestions, please check this list as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please include as many details as possible. Fill in the template, including the steps that you imagine you would take if the feature you're requesting existed.

Before Submitting An Enhancement Suggestion

  • Check if you're using the latest version of contracts
  • Perform a cursory search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.

How Do I Submit A (Good) Enhancement Suggestion?

Enhancement suggestions are tracked as GitHub issues. Create an issue and provide the following information:

  • Use a clear and descriptive title for the issue to identify the suggestion.
  • Provide a step-by-step description of the suggested enhancement in as many details as possible.
  • Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
  • Describe the current behavior and explain which behavior you expected to see instead and why.
  • Include screenshots and animated GIFs which help you demonstrate the steps or point out the part of the contracts library the suggestion is related to.
  • Explain why this enhancement would be useful to most OpenZeppelin contracts users
  • Specify which version of Compact you're using. You can get the exact version by running compactc --version in your terminal

Your First Code Contribution

Unsure where to begin contributing to Compact Contracts? You can start by looking through these beginner and help-wanted issues:

  • Beginner issues - issues which should only require a few lines of code, and a test or two.
  • Help wanted issues - issues which should be a bit more involved than beginner issues.

Both issue lists are sorted by total number of comments. While not perfect, number of comments is a reasonable proxy for impact a given change will have.

Pull Requests

The process described here has several goals:

  • Maintain Compact Contracts quality.
  • Fix problems that are important to users.
  • Engage the community in working toward the best possible Compact smart contracts library.
  • Enable a sustainable system for Compact Contract's maintainers to review contributions.

Any non-trivial code contribution must be first discussed with the maintainers in an issue (see Opening an issue). Only very minor changes are accepted without prior discussion.

Please follow these steps to have your contribution considered by the maintainers:

  1. Open an issue.
  2. Fork the repository and create a new branch.
  3. Follow all instructions in the template
  4. Follow the engineering guidelines.
  5. Follow the styleguides
  6. If the PR includes non-trivial changes, additions, or deletions (especially in Compact modules and/or witnesses), add an entry to the CHANGELOG.
  7. After you submit your pull request, verify that all status checks are passing.
    What if the status checks are failing? If a status check is failing, and you believe that the failure is unrelated to your change, please leave a comment on the pull request explaining why you believe the failure is unrelated. A maintainer will re-run the status check for you. If we conclude that the failure was a false positive, then we will open an issue to track that problem with our status check suite.

While the prerequisites above must be satisfied prior to having your pull request reviewed, the reviewer(s) may ask you to complete additional design work, tests, or other changes before your pull request can be ultimately accepted.

Styleguides

TypeScript Styleguide

All TypeScript code is linted with Biomejs.

Quickly fix all formatting and linting errors with the turbo fmt:fix and turbo lint:fix commands.

Opening an issue

You can open an issue to suggest a feature or report a minor bug. For serious bugs please do not open an issue, instead refer to our security policy for appropriate steps.

If you believe your issue may be due to user error and not a problem in the library, consider instead posting a question on the [OpenZeppelin Forum].

Before opening an issue, be sure to search through the existing open and closed issues, and consider posting a comment in one of those instead.

When requesting a new feature, include as many details as you can, especially around the use cases that motivate it. Features are prioritized according to the impact they may have on the ecosystem, so we appreciate information showing that the impact could be high.

Additional Notes

Issue and Pull Request Labels

This section lists the labels we use to help us track and manage issues and pull requests.

GitHub search makes it easy to use labels for finding groups of issues or pull requests you're interested in. For example, you might be interested in open issues across OpenZeppelin and all OpenZeppelin-owned packages which are labeled as bugs, but still need to be reliably reproduced or perhaps open pull requests in OpenZeppelin/compact-contracts which haven't been reviewed yet. To help you find issues and pull requests, each label is listed with search links for finding open items with that label in OpenZeppelin/compact-contracts only and also across all OpenZeppelin repositories. We encourage you to read about other search filters which will help you write more focused queries.

The labels are loosely grouped by their purpose, but it's not required that every issue has a label from every group or that an issue can't have more than one label from the same group.

Please open an issue on OpenZeppelin/compact-contracts if you have suggestions for new labels, and if you notice some labels are missing on some repositories, then please open an issue on that repository.

Type of Issue and Issue State

Label name OpenZeppelin/compact-contracts 🔎 OpenZeppelin‑org 🔎 Description
enhancement search search Feature requests.
bug search search Confirmed bugs or reports that are very likely to be bugs.
question search search Questions more than bug reports or feature requests (e.g. how do I do X).
feedback search search General feedback more than bug reports or feature requests.
help-wanted search search The OpenZeppelin core team would appreciate help from the community in resolving these issues.
beginner search search Less complex issues which would be good first issues to work on for users who want to contribute to OpenZeppelin.
more-information-needed search search More information needs to be collected about these problems or feature requests (e.g. steps to reproduce).
needs-reproduction search search Likely bugs, but haven't been reliably reproduced.
blocked search search Issues blocked on other issues.
duplicate search search Issues which are duplicates of other issues, i.e. they have been reported before.
wontfix search search The OpenZeppelin core team has decided not to fix these issues for now, either because they're working as intended or for some other reason.
invalid search search Issues which aren't valid (e.g. user errors).

Topic Categories

Label name OpenZeppelin/compact-contracts 🔎 OpenZeppelin‑org 🔎 Description
documentation search search Improvements or additions to documentation.
performance search search Improvements related to circuit size, gas optimization, or code efficiency.
security search search Related to security.
deprecation-help search search Issues for helping package authors remove usage of deprecated APIs in packages.

Pull Request Labels

Label name OpenZeppelin/compact-contracts 🔎 OpenZeppelin‑org 🔎 Description
work-in-progress search search Pull requests which are still being worked on, more changes will follow.
needs-review search search Pull requests which need code review, and approval from maintainers or OpenZeppelin core team.
under-review search search Pull requests being reviewed by maintainers or OpenZeppelin core team.
requires-changes search search Pull requests which need to be updated based on review comments and then reviewed again.
needs-testing search search Pull requests which need manual testing.