Submission Guidelines
Submission Guidelines Checklist
Every developer must adhere to the following guidelines when submitting code to Decentra projects. Failure to comply with these rules will result in invalidated submissions.
This checklist ensures that all contributions are consistent, high-quality, and secure.
Follow Style Guide
Adhere to the standard coding conventions and style guidelines.
Ensure code is well-structured, readable, and follows naming conventions.
Refer to the Style Guide for detailed instructions.
Include Comprehensive Tests
Achieve 100% test coverage with unit tests, integration tests, and security tests.
Ensure all functions and interactions are thoroughly tested.
Refer to the Testing Guidelines page for specific instructions.
Comply to Smart Contract Security standards
Address common attack vectors and ensure the code is secure.
Conduct thorough tests to identify and mitigate potential vulnerabilities such as reentrancy, overflow/underflow, and unauthorized access.
Refer to the Addressing Common Attack Vectors page for detailed instructions.
Test for Gas Efficiency
Ensure the code is optimized for gas efficiency.
Document gas usage in the PR, highlighting any optimizations made.
Use tools to measure gas consumption and verify improvements.
Add Natspec Documentation
Provide detailed Natspec comments for all functions, events, and complex code sections.
Ensure the documentation explains the purpose and functionality clearly.
Refer to the Style Guide for best practices on writing Natspec comments.
Document New Functionalities
Clearly document any new functionalities added to the project.
Ensure documentation is comprehensive and easy to understand.
Use diagrams or flowcharts if necessary to illustrate complex functionalities.
Justification for Coding Choices
Explain your coding choices and security considerations in the PR description.
Discuss any security measures implemented, such as input validation, access control, and error handling.
Provide a rationale for design decisions, especially for complex or unconventional approaches.
Follow PR Template
Use the platformβs structured PR template for all submissions.
Ensure all sections of the PR template are completed accurately and thoroughly.
Detailed instructions on how to use the PR template can be found on the How to Contribute page.
Add Screenshots or Evidence (if applicable)
For changes that affect the UI or have visual components, include screenshots in the PR.
Provide evidence of test results, gas efficiency measurements, and security tests.
Review and Self-Check
Before submitting, review your code and ensure it meets all the guidelines.
Conduct a self-check against this checklist to ensure compliance with all requirements.
By following this submission checklist, you ensure that your contributions to Decentra projects are consistent, high-quality, and secure. This not only facilitates a smoother review process but also helps maintain the overall integrity and reliability of the platform.