Skip to content

Commit

Permalink
Merge pull request #315 from invariant-labs/update-docs
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
wojciech-cichocki authored Dec 5, 2023
2 parents e50d469 + f20f5b7 commit 5194aa4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 22 deletions.
14 changes: 7 additions & 7 deletions docs/docs/aleph_zero/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Installation
slug: /aleph_zero/installation
---

This section provides detailed instructions on how to install the Invariant protocol smart contract on Aleph Zero, including prerequisites and steps for setting up the development environment.
This section provides detailed instructions on how to install the Invariant protocol on Aleph Zero, including prerequisites and steps for setting up the development environment.

## Prerequisites

Expand All @@ -27,19 +27,19 @@ rustup component add rust-src && cargo install --force --locked cargo-contract
```bash
cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git
```
## Installation
## Build protocol

* Clone repository
```
git clone [email protected]:invariant-labs/protocol-a0.git
```

* Run tests
* Build contract
```
cargo test --features e2e-tests
cargo contract build
```

* Build contract
* Run tests
```
cargo test --features e2e-tests
```
cargo contract build
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Project Structure
title: Overview

slug: /aleph_zero/project_structure
---
Expand All @@ -8,15 +8,20 @@ This section provides an overview of the structural organization of the Invarian

## Contract Architecture

To optimize cost-effectiveness, we centralize data in a singular contract, reducing expenses tied to pool and position creation. This streamlined approach not only cuts costs but also simplifies processes, enhancing accessibility. By concentrating state changes and entrypoints within this central contract, we eliminate the intricacies of managing external contracts, while smart mapping intelligently conserves storage resources and bolsters system efficiency.
To optimize gas usage, we centralize data and entrypoints in a singular contract, reducing expenses associated with pool and position creation. This streamlined approach not only cuts costs but also simplifies processes, enhancing accessibility. By concentrating state changes and entrypoints within this central contract, we eliminate the intricacies of managing external contracts, while smart mapping intelligently conserves storage resources and bolsters system efficiency.

## Simplified
## Project structure

The following presents the project's overall structure, supplying insights into the logical segmentation into modules/

```
📦protocol-a0
┣ 📂contracts
┃ ┣ 📜storage
┃ ┗ 📜collections
┃ ┣ 📂collections
┃ ┣ 📂logic
┃ ┣ 📂storage
| ┗ 📜entrypoints
┣ 📂e2e
┣ 📂decimal
┣ 📂math
┣ 📂test_helpers
Expand Down Expand Up @@ -49,9 +54,7 @@ In the "Traceable Result" directory, you will find a comprehensive library compr


### Source Code Access
For a detailed exploration of our contract structures, collections, and associated logic, please refer to the corresponding [Source Code Repository](https://github.com/invariant-labs/protocol-a0). This repository contains the complete and up-to-date implementation of our contract architecture.

## Extended
For a detailed exploration of our contract structures, collections, and associated logic, please refer to the corresponding [Source Code Repository](https://github.com/invariant-labs/protocol-a0). This repository contains the complete and up-to-date implementation of our contract architecture. Here lies the comprehensive project structure, which can be represented as follows.

```
📦protocol-a0
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/aleph_zero/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ In this example, the result of creation should be interpreted as 12.042, calcula
|Name|Decimals|Primitive type|Big type|Description|
|-|-|-|-|-|
|SqrtPrice|24|u128|U256|Square root of price value|
|FeeGrowth|28|u128|U256|Accumulated amount of fees|
|FeeGrowth|28|u128|U256|Accumulated amount of fees per unit of liquidity|
|FixedPoint|12|u128|U256|Number with fixed number of decimal places|
|Liquidity|6|u128|U256|Amount of virtual liquidity|
|Percentage|12|u64|U256|Represents values as fractions of 100|
|SecondsPerLiquidity|24|u128|U256|Measures the time inside/outside liquidity|
|Percentage|12|u64|U256|A numerical percentage value|
|SecondsPerLiquidity|24|u128|U256|Measures the time in seconds per unit of liquidity|
|TokenAmount|0|u128|U256|Quantity of specific token|

## Definitions
Expand Down
6 changes: 3 additions & 3 deletions 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/project_structure', label: 'Aleph Zero', position: 'left' }
{ to: '/docs/aleph_zero/installation', label: 'Aleph Zero', position: 'left' }
]
},
footer: {
Expand Down Expand Up @@ -99,7 +99,7 @@ module.exports = {
redirects: [
{
from: '/docs/aleph_zero/',
to: '/docs/aleph_zero/project_structure',
to: '/docs/aleph_zero/installation',
},
{
from: '/docs/solana/',
Expand All @@ -108,7 +108,7 @@ module.exports = {
],
createRedirects(existingPath) {
if(existingPath === "/docs/aleph_zero/" ) {
return "/docs/aleph_zero/project_structure";
return "/docs/aleph_zero/installation";
}
if (existingPath === "/docs/solana/") {
return '/docs/solana/introduction';
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/project_structure','aleph_zero/installation','aleph_zero/entrypoints', 'aleph_zero/collections','aleph_zero/storage','aleph_zero/types', 'aleph_zero/listing_pool_to_azero', 'aleph_zero/invariant_errors']
items: ['aleph_zero/installation', 'aleph_zero/overview', 'aleph_zero/types', 'aleph_zero/storage', 'aleph_zero/collections', 'aleph_zero/entrypoints', 'aleph_zero/invariant_errors', 'aleph_zero/listing_pool_to_azero',]
},
'faq',
'resources',
Expand Down

1 comment on commit 5194aa4

@vercel
Copy link

@vercel vercel bot commented on 5194aa4 Dec 5, 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.