Skip to content

Commit 3046014

Browse files
committed
Update CONTRIBUTING.md
1 parent c944a22 commit 3046014

1 file changed

Lines changed: 53 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
1-
## How to contribute to ERC2535 Diamond Template
1+
# Contributing to Diamond Lib
22

3-
#### **Make PR 😀**
3+
Thanks for your interest in contributing! This is a reusable Foundry library for the [EIP-2535 Diamond Standard](https://eips.ethereum.org/EIPS/eip-2535), so contributions that improve reliability, gas efficiency, or developer experience are welcome.
4+
5+
## Prerequisites
6+
7+
- [Foundry](https://book.getfoundry.sh/getting-started/installation) installed
8+
- Familiarity with the [EIP-2535 Diamond Standard](https://eips.ethereum.org/EIPS/eip-2535)
9+
10+
## Setup
11+
12+
```sh
13+
git clone https://github.com/dadadave80/diamond-lib.git
14+
cd diamond-lib
15+
forge install
16+
forge build
17+
```
18+
19+
## Running Tests
20+
21+
Tests use FFI for selector extraction, so the `--ffi` flag is required:
22+
23+
```sh
24+
forge test --ffi -vvv
25+
```
26+
27+
## Making Changes
28+
29+
1. Fork the repo and create a branch from `main`.
30+
2. Make your changes in the appropriate directory:
31+
- `src/facets/` — Facet contracts
32+
- `src/libraries/` — Core libraries
33+
- `src/interfaces/` — Interfaces
34+
- `src/initializers/` — Initializer contracts
35+
3. Add or update tests in `test/` to cover your changes.
36+
4. Run `forge fmt` to format your code.
37+
5. Ensure all tests pass with `forge test --ffi`.
38+
6. Open a pull request against `main`.
39+
40+
## Guidelines
41+
42+
- Keep gas efficiency in mind — this library is optimized for minimal overhead.
43+
- Follow existing code style and naming conventions.
44+
- One logical change per PR — avoid bundling unrelated changes.
45+
- Include test cases for both success and failure paths.
46+
47+
## Reporting Issues
48+
49+
If you find a bug, please open an issue with:
50+
- A clear description of the problem
51+
- Steps to reproduce
52+
- Expected vs. actual behavior
53+
54+
For security vulnerabilities, please follow the process in [SECURITY.md](SECURITY.md) instead.

0 commit comments

Comments
 (0)