Skip to content

Commit 56414be

Browse files
authored
docs: contribution guidelines (#26)
1 parent 02b1f9f commit 56414be

8 files changed

+167
-3
lines changed

CODE_OF_CONDUCT.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Code of Conduct
2+
3+
## My Pledge
4+
5+
In the interest of fostering an open and welcoming environment, I pledge to make participation in my project and community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## My Standards
8+
9+
Examples of behavior that contribute to creating a positive environment include:
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior include:
18+
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## My Responsibilities
26+
27+
As the project maintainer, I am responsible for clarifying the standards of acceptable behavior and am expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
## Scope
30+
31+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
32+
33+
## Enforcement
34+
35+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting me at <hello@emmanueljet.com>. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. I am obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
36+
37+
## Attribution
38+
39+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [http://contributor-covenant.org/version/2/1][version].
40+
41+
[homepage]: http://contributor-covenant.org
42+
[version]: http://contributor-covenant.org/version/2/1/

CONTRIBUTING.md

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Contributing to MultiSigEnterpriseVault
2+
3+
Thank you for considering contributing to MultiSigEnterpriseVault! I welcome contributions from the community and am excited to work with you.
4+
5+
## How to Contribute
6+
7+
### Reporting Bugs
8+
9+
- Ensure the bug was not already reported by searching on GitHub under [Issues](https://github.com/emmanuelJet/MultiSigEnterpriseVault/issues).
10+
- If you're unable to find an open issue addressing the problem, open a new one. Be sure to include a title and clear description, as much relevant information as possible, and a code sample or an executable test case demonstrating the expected behavior that is not occurring.
11+
- When opening a new issue, select the appropriate template that best matches your report (e.g., [Bug Report](.github/ISSUE_TEMPLATE/bug-report.md)).
12+
13+
### Suggesting Enhancements
14+
15+
- Search the existing [Issues](https://github.com/emmanuelJet/MultiSigEnterpriseVault/issues) for enhancement suggestions to avoid duplicates.
16+
- If you find a related issue, feel free to add your thoughts and suggestions.
17+
- If you don't find an existing issue, open a new one and describe the enhancement in detail.
18+
- Use the provided template for [feature requests](.github/ISSUE_TEMPLATE/feature-implementation.md) to ensure all necessary information is included.
19+
20+
### Submitting Pull Requests
21+
22+
- Fork the repository and create your branch from `main`.
23+
- If you've added code that should be tested, add tests.
24+
- Ensure the test suite passes.
25+
- Make sure your code lints.
26+
- Use the [pull request template](.github/PULL_REQUEST_TEMPLATE.md) to ensure all necessary information is included.
27+
- Follow the checklist in the template to verify that your pull request meets the project requirements.
28+
- Issue that pull request!
29+
30+
## Code Style
31+
32+
- Follow the existing code style and use `forge fmt` to format your code.
33+
- Document all functions using [NatSpec comments](https://docs.soliditylang.org/en/v0.8.20/natspec-format.html).
34+
- Write clear, concise commit messages.
35+
36+
## Branch Naming Guidelines
37+
38+
To keep a clean and understandable Git history, always base new branches off the `main` branch and follow these branch naming conventions:
39+
40+
- Feature Branches: For new features use: `feat/<feature-name>`
41+
- Example: feat/owner-role
42+
- Enhancement Branches: For existing feature enhancements or improvements use: `perf/<enhancement-description>`
43+
- Example: perf/owner-access
44+
- Bug Fixes: For bug fixes, use: `fix/<issue-description>`
45+
- Example: fix/gas-estimation
46+
- Chores or Refactoring: For maintenance or refactoring tasks, use: `chore/<task-description>`
47+
- Example: chore/update-dependencies
48+
49+
## Commit Message Guidelines
50+
51+
To maintain a clean and readable commit history, follow these guidelines:
52+
53+
- Use Conventional Commits: Format your commit messages as follows:
54+
55+
```txt
56+
<type>: <short summary>
57+
```
58+
59+
Examples:
60+
- feat: signer role functionality
61+
- fix: gas estimation bug
62+
- Types of Commits:
63+
- feat: A new feature
64+
- fix: A bug fix
65+
- perf: A feature enhancement
66+
- docs: Documentation-only changes
67+
- test: Adding or updating tests
68+
- chore: Routine tasks like refactoring or updating dependencies
69+
70+
## Community
71+
72+
- Follow best practices for collaboration, and ensure tests are written for all new code.
73+
- Be respectful and considerate in your communication.
74+
- Follow the [Code of Conduct](CODE_OF_CONDUCT.md).
75+
76+
## Getting Help
77+
78+
If you have any questions, feel free to reach out by opening an issue, join the community chat, or send an email to <hello@emmanueljet.com>.
79+
80+
I appreciate your contributions and thank you for your support!
81+
82+
Emmanuel Joseph (JET)

README.md

+36-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Solidity](https://img.shields.io/badge/Solidity-363636.svg?logo=solidity&logoColor=white)](https://soliditylang.org)
44
[![Foundry Framework](https://custom-icon-badges.demolab.com/badge/Foundry-E8E8E8.svg?logo=foundry)](https://getfoundry.sh)
5+
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)
56
![Build Status](https://github.com/emmanuelJet/MultiSigEnterpriseVault/actions/workflows/ci.yml/badge.svg?branch=main)
67

78
An open-source, enterprise-grade Multi-Signature Vault smart contract developed using Solidity and Foundry. It provides advanced security, customizable timelocks, and role-based access control for managing digital assets.
@@ -11,8 +12,8 @@ An open-source, enterprise-grade Multi-Signature Vault smart contract developed
1112
- Multi-Signature Vault functionality to manage **ETH** and **ERC20** tokens.
1213
- Separate timelocks for transactions and owner overrides with delays.
1314
- Role-based access control (Owner, Executor, Signers).
14-
- Secure self-destruct mechanism with safety checks.
1515
- Flexible and administrative threshold settings.
16+
- Designed to be secure and gas-efficient.
1617

1718
## Use Cases
1819

@@ -68,7 +69,7 @@ This command outputs a single Solidity file containing all dependencies.
6869

6970
## Deployment Guide
7071

71-
This section explains how to deploy the MultiSigEnterpriseVault contract to PulseChain Testnet v4.
72+
This section explains how to deploy the MultiSigEnterpriseVault contract to PulseChain Testnet v4 using GitHub Actions.
7273

7374
### Prerequisites
7475

@@ -91,9 +92,37 @@ Set the following environment variables:
9192

9293
After a successful deployment, artifacts will be stored in the `dist/` directory:
9394

94-
- `deployment_output.json`: Contains the contract ABI and details.
95+
- `deployment_abi.json`: Contains the contract ABI.
9596
- `deployment_result.txt`: Contains the contract address and deployment transaction details.
9697

98+
## Local Deployment
99+
100+
- Create the `.env` file from the `.env.example` file and fill in the environment variables;
101+
102+
```bash
103+
cp .env.example .env
104+
```
105+
106+
- Load the variables in the `.env` file;
107+
108+
```bash
109+
source .env
110+
```
111+
112+
- Deploy `MultiSigEnterpriseVault` contract using `forge script`
113+
114+
```bash
115+
forge script script/MultiSigEnterpriseVaultScript.s.sol:MultiSigEnterpriseVaultScript --chain pulsechain-testnet --private-key $PRIVATE_KEY --rpc-url $PULSECHAIN_TESTNET_RPC_URL --broadcast --verify --verifier blockscout --verifier-url https://api.scan.v4.testnet.pulsechain.com/api/ | tee .private/deployment_result.txt
116+
```
117+
118+
## Contribution
119+
120+
I welcome contributions to this project. If you’re interested in contributing, please check the [Contribution Guidelines](CONTRIBUTING.md) for detailed instructions.
121+
122+
## Code of Conduct
123+
124+
Please read the [Code of Conduct](CODE_OF_CONDUCT.md) to understand the rules and expectations for participation in the project.
125+
97126
## License
98127

99128
```md
@@ -109,3 +138,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
109138
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
110139
GNU General Public License for more details.
111140
```
141+
142+
## Disclaimer
143+
144+
**This project has not been audited and is not recommended for production use.** Use this code at your own risk. The project maintainer takes no responsibility for any losses or issues that arise from using the code in a live environment.

foundry.toml

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ multiline_func_header = "params_first"
1111
single_line_statement_blocks = "preserve"
1212

1313
[rpc_endpoints]
14+
sepolia = "${SEPOLIA_RPC_URL}"
15+
mainnet = "${ETH_MAINNET_RPC_URL}"
1416
pulsechain = "${PULSECHAIN_RPC_URL}"
1517
pulsechain-testnet = "${PULSECHAIN_TESTNET_RPC_URL}"
1618

src/interfaces/IMultiSigTimelock.sol

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {ActionType} from '../utilities/VaultEnums.sol';
55

66
/**
77
* @title IMultiSigTimelock Interface
8+
* @author Emmanuel Joseph (JET)
89
* @dev Interface defining errors and events for timelock management.
910
*/
1011
interface IMultiSigTimelock {

src/interfaces/IMultiSigTransaction.sol

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pragma solidity ^0.8.20;
33

44
/**
55
* @title IMultiSigTransaction Interface
6+
* @author Emmanuel Joseph (JET)
67
* @dev Interface defining custom errors, events, and external functions for transaction management.
78
*/
89
interface IMultiSigTransaction {

src/interfaces/user/roles/IExecutorRole.sol

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ interface IExecutorRole {
4141

4242
/**
4343
* @dev Error thrown when trying to approve an owner override before the timelock has passed.
44+
* @param currentTime The current time when the error is thrown.
45+
* @param requiredTime The required time that must elapse before the owner override can be executed.
4446
*/
4547
error OwnerOverrideTimelockNotElapsed(uint256 currentTime, uint256 requiredTime);
4648

src/libraries/AddressUtils.sol

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import '@openzeppelin/contracts/utils/Address.sol';
55

66
/**
77
* @title AddressUtils Library
8+
* @author Emmanuel Joseph (JET)
89
* @dev Extends OpenZeppelin's Address library to add custom utility functions.
910
*/
1011
library AddressUtils {

0 commit comments

Comments
 (0)