Skip to content

Commit

Permalink
Merge pull request #295 from invariant-labs/add-project_structure-to-…
Browse files Browse the repository at this point in the history
…aleph-zero-docs

add project structure file and update docusaurus config
  • Loading branch information
zielvna authored Nov 7, 2023
2 parents d956900 + 47242a4 commit fcbde4d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
40 changes: 40 additions & 0 deletions docs/docs/aleph_zero/project_structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Project Structure

slug: /aleph_zero/project_structure
---

```
📦protocol-a0
┣ 📂contracts
┃ ┣ 📜storage
┃ ┗ 📜collections
┣ 📂decimal
┣ 📂math
┣ 📂test_helpers
┣ 📂token
┗ 📂traceable_result
```
### Contracts
Within this directory, we house our contract structures, collections, and associated logic. These components are pivotal in facilitating the seamless operation of our contract.

#### Storage
The "Storage" directory is home to the essential data structures utilized for contract storage. These structures are instrumental in securely and efficiently storing critical information within our contract.

#### Collections
Our "Collections" directory is dedicated to collections of data that leverage structs with mappings or vectors. These collections play a crucial role in organizing and managing data in a structured manner, enhancing the overall functionality and performance of our contract.

### Decimal
Contained within the "Decimal" directory is a specialized decimal library. This library serves as the foundation for creating custom data types and executing precise mathematical calculations, ensuring accuracy and reliability in our contract.

### Math
The "Math" directory serves as a repository for core mathematical functions, constants, and custom data types that are meticulously crafted using the Decimal library. These mathematical components are indispensable for performing complex calculations in our contract.

### Test Helpers
Our "Test Helpers" directory is equipped with macros designed to streamline end-to-end testing processes. These macros are instrumental in simplifying and enhancing the efficiency of our testing procedures, ensuring the robustness of our contract.

### Token
The "Token" directory is dedicated to the implementation of a fundamental PSP22 token. This token serves as a foundational element in our end-to-end tests, enabling us to simulate production-ready token interactions and transactions.

### Traceable Result
In the "Traceable Result" directory, you will find a comprehensive library comprising data structures used in debugging processes. In the event of an error, this library generates a detailed stack trace, providing valuable insights that aid in the identification and resolution of issues, thereby promoting the reliability and stability of our contract.
2 changes: 1 addition & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
},
items: [
{ to: '/docs/solana/introduction', label: 'Solana', position: 'left' },
{ to: '/docs/aleph_zero/entrypoints', label: 'Aleph Zero', position: 'left' }
{ to: '/docs/aleph_zero/project_structure', label: 'Aleph Zero', position: 'left' }
]
},
footer: {
Expand Down
2 changes: 1 addition & 1 deletion docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = {
type: 'category',
label: 'Aleph Zero',
collapsed: true,
items: ['aleph_zero/entrypoints']
items: ['aleph_zero/project_structure', 'aleph_zero/entrypoints']
},
'faq',
'resources',
Expand Down

1 comment on commit fcbde4d

@vercel
Copy link

@vercel vercel bot commented on fcbde4d Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.