From 38ab720859b8c25b2195d9fe3d84208f0ed6b129 Mon Sep 17 00:00:00 2001 From: Akshay Dahiya Date: Fri, 1 Dec 2023 18:35:40 +0530 Subject: [PATCH] chore: improve layout, remove relative links and image references --- docs/build-with-powerloom/build-with-powerloom.md | 4 ++-- .../building-use-cases/_category_.json | 8 ++++++++ .../activity-tracking/_category_.json | 0 .../activity-tracking/index.md | 0 .../uniswapv2-dashboard/_category_.json | 0 .../extending-uniswapv2-dashboard.md | 2 +- .../uniswapv2-dashboard/index.md | 8 ++++---- .../tour-of-existing-implementation/_category_.json | 0 .../closer-inspection-of-the-snapshot-datasets.md | 10 +++++----- .../fetching-higher-order-datapoints.md | 4 ++-- .../tour-of-existing-implementation/index.md | 2 +- .../joining-powerloom-network/_category_.json | 4 ++-- .../joining-powerloom-network/incentivized_testnet.md | 0 .../snapshotter-node/_category_.json | 2 +- .../snapshotter-node/health-tracking.md | 0 .../snapshotter-node/overview.md | 0 .../snapshotter-node/troubleshooting.md | 0 17 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 docs/build-with-powerloom/building-use-cases/_category_.json rename docs/build-with-powerloom/{ => building-use-cases}/activity-tracking/_category_.json (100%) rename docs/build-with-powerloom/{ => building-use-cases}/activity-tracking/index.md (100%) rename docs/build-with-powerloom/{ => building-use-cases}/uniswapv2-dashboard/_category_.json (100%) rename docs/build-with-powerloom/{ => building-use-cases}/uniswapv2-dashboard/extending-uniswapv2-dashboard.md (97%) rename docs/build-with-powerloom/{ => building-use-cases}/uniswapv2-dashboard/index.md (90%) rename docs/build-with-powerloom/{ => building-use-cases}/uniswapv2-dashboard/tour-of-existing-implementation/_category_.json (100%) rename docs/build-with-powerloom/{ => building-use-cases}/uniswapv2-dashboard/tour-of-existing-implementation/closer-inspection-of-the-snapshot-datasets.md (94%) rename docs/build-with-powerloom/{ => building-use-cases}/uniswapv2-dashboard/tour-of-existing-implementation/fetching-higher-order-datapoints.md (95%) rename docs/build-with-powerloom/{ => building-use-cases}/uniswapv2-dashboard/tour-of-existing-implementation/index.md (92%) rename docs/{snapshotter-node => build-with-powerloom}/joining-powerloom-network/_category_.json (75%) rename docs/{snapshotter-node => build-with-powerloom}/joining-powerloom-network/incentivized_testnet.md (100%) rename docs/{ => build-with-powerloom}/snapshotter-node/_category_.json (90%) rename docs/{ => build-with-powerloom}/snapshotter-node/health-tracking.md (100%) rename docs/{ => build-with-powerloom}/snapshotter-node/overview.md (100%) rename docs/{ => build-with-powerloom}/snapshotter-node/troubleshooting.md (100%) diff --git a/docs/build-with-powerloom/build-with-powerloom.md b/docs/build-with-powerloom/build-with-powerloom.md index 377e2a4..d7b4215 100644 --- a/docs/build-with-powerloom/build-with-powerloom.md +++ b/docs/build-with-powerloom/build-with-powerloom.md @@ -62,7 +62,7 @@ For Pooler to work properly, it needs certain configuration files: ``` -- Copy over [`config/projects.example.json`](https://github.com/PowerLoom/pooler/blob/main/config/projects.example.json) to `config/projects.json`. For more details, read on in the [UniswapV2 Dashboard Implementation](../build-with-powerloom/uniswapv2-dashboard/index.md) for this current implementation. +- Copy over [`config/projects.example.json`](https://github.com/PowerLoom/pooler/blob/main/config/projects.example.json) to `config/projects.json`. For more details, read on in the [UniswapV2 Dashboard Implementation](/build-with-powerloom/building-usecases/uniswapv2-dashboard) for this current implementation. In Pooler, `config/aggregator.json` is a file that outlines different types of data aggregation tasks performed over a span of snapshots. To set this up: @@ -97,7 +97,7 @@ In Pooler, `config/aggregator.json` is a file that outlines different types of d ``` -The following configuration generates a collection of data sets of 24 hour trade volume as calculated by the worker above across multiple pair contracts. This can be seen by the `aggregate_on` key being set to `MultiProject`. * `projects_to_wait_for` specifies the exact project IDs on which this collection will be generated once a snapshot build has been achieved for an [`epochId`](../protocol/specifications/epoch.md). +The following configuration generates a collection of data sets of 24 hour trade volume as calculated by the worker above across multiple pair contracts. This can be seen by the `aggregate_on` key being set to `MultiProject`. * `projects_to_wait_for` specifies the exact project IDs on which this collection will be generated once a snapshot build has been achieved for an [`epochId`](/docs/protocol/specifications/epoch.md). ```json diff --git a/docs/build-with-powerloom/building-use-cases/_category_.json b/docs/build-with-powerloom/building-use-cases/_category_.json new file mode 100644 index 0000000..59c0db8 --- /dev/null +++ b/docs/build-with-powerloom/building-use-cases/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Building Use Cases", + "position": 1, + "link": { + "type": "generated-index", + "description": "Build robust Web3 Data applications with powerloom. Explore existing implementations." + } + } \ No newline at end of file diff --git a/docs/build-with-powerloom/activity-tracking/_category_.json b/docs/build-with-powerloom/building-use-cases/activity-tracking/_category_.json similarity index 100% rename from docs/build-with-powerloom/activity-tracking/_category_.json rename to docs/build-with-powerloom/building-use-cases/activity-tracking/_category_.json diff --git a/docs/build-with-powerloom/activity-tracking/index.md b/docs/build-with-powerloom/building-use-cases/activity-tracking/index.md similarity index 100% rename from docs/build-with-powerloom/activity-tracking/index.md rename to docs/build-with-powerloom/building-use-cases/activity-tracking/index.md diff --git a/docs/build-with-powerloom/uniswapv2-dashboard/_category_.json b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/_category_.json similarity index 100% rename from docs/build-with-powerloom/uniswapv2-dashboard/_category_.json rename to docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/_category_.json diff --git a/docs/build-with-powerloom/uniswapv2-dashboard/extending-uniswapv2-dashboard.md b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/extending-uniswapv2-dashboard.md similarity index 97% rename from docs/build-with-powerloom/uniswapv2-dashboard/extending-uniswapv2-dashboard.md rename to docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/extending-uniswapv2-dashboard.md index df47e30..6414486 100644 --- a/docs/build-with-powerloom/uniswapv2-dashboard/extending-uniswapv2-dashboard.md +++ b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/extending-uniswapv2-dashboard.md @@ -10,7 +10,7 @@ This documentation provides a step-by-step guide for developers looking to exten :::tip Prerequisities: Before we dive into the implementation of new data points, you may want to look at the concept of how the pooler functions and how it retrives and processes the data. -[Closer look into the Snapshot Datasets](/docs/build-with-powerloom/uniswapv2-dashboard/Tour%20of%20the%20existing%20implementation/closer-inspection-of-the-snapshot-datasets) +[Closer look into the Snapshot Datasets](/docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/closer-inspection-of-the-snapshot-datasets) ::: ### Scenario: 2-Hour Aggregate of Swap Events diff --git a/docs/build-with-powerloom/uniswapv2-dashboard/index.md b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/index.md similarity index 90% rename from docs/build-with-powerloom/uniswapv2-dashboard/index.md rename to docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/index.md index 7636af0..57aeb64 100644 --- a/docs/build-with-powerloom/uniswapv2-dashboard/index.md +++ b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/index.md @@ -54,15 +54,15 @@ Let's explore the details of the Pooler implementation. The image provided illus Data points are key metrics sourced from Uniswap V2 pair contracts, detailing how token trades are conducted. Our Pooler system processes this data into aggregated metrics, providing an overview of market trends, such as trade frequencies and average prices. These insights aid users in understanding market movements and asset performance, crucial for informed trading decisions within Uniswap V2. - For an in-depth look, visit [Tour of Existing Implementation](../uniswapv2-dashboard/tour-of-existing-implementation/index.md). + For an in-depth look, visit [Tour of Existing Implementation](/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/index.md). --- -### Pooler APIs +### Snapshotter Core API -The Core API is a crucial element, allowing access to finalized protocol states on the anchor chain’s smart contract. Pooler’s functionality can be observed in action through the Uniswap v2 dashboards, like [uniswapv2.powerloom.io](https://uniswapv2.powerloom.io/), powered by the Pooler foundation's API. +The Core API is a crucial element, allowing access to finalized protocol states on the anchor chain’s smart contract. This functionality can be observed in action through the Uniswap v2 dashboards, like [uniswapv2.powerloom.io](https://uniswapv2.powerloom.io/), powered by the Snapshotter Core API hosted by Powerloom foundation. -Access [Pooler API Documentation](../Pooler-API-Docs/) +Access [Snapshotter Core API Documentation](/docs/snapshotter-core-api/) --- diff --git a/docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/_category_.json b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/_category_.json similarity index 100% rename from docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/_category_.json rename to docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/_category_.json diff --git a/docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/closer-inspection-of-the-snapshot-datasets.md b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/closer-inspection-of-the-snapshot-datasets.md similarity index 94% rename from docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/closer-inspection-of-the-snapshot-datasets.md rename to docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/closer-inspection-of-the-snapshot-datasets.md index 0713b20..fb96d27 100644 --- a/docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/closer-inspection-of-the-snapshot-datasets.md +++ b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/closer-inspection-of-the-snapshot-datasets.md @@ -22,7 +22,7 @@ Pooler focuses on several key data points: Pooler uses decentralized CIDs (Content Identifiers) to query individual pair contract projects. This is crucial for accessing reliable and decentralized data. The CIDs correspond to specific data sets, making it easier to fetch relevant information. ### Fetching CID and Verifying it On-Chain! -![API Calls for the a certain CID](../../../../static/images/uniswap-inspect.png) +![API Calls for the a certain CID](/images/uniswap-inspect.png) The Uniswap v2 dashboard at https://uniswapv2.powerloom.io/ connects to a backend hosted by the Powerloom Foundation. This backend includes a service called `core_api.py` in the 'pooler' section. This service links directly to the protocol's final state as defined in the contract. @@ -42,7 +42,7 @@ Once you have these details: This will allow you to connect to the Powerloom Prost 1D Chain testnet. -![Chain-Details](../../../../static/images/Chain-details.png) +![Chain-Details](/images/Chain-details.png) **Accessing the ABI of the protocol state Contract** @@ -57,7 +57,7 @@ To access and utilize the ABI of the protocol state contract from the Powerloom 7. Save the file in Remix. This process will allow you to have the protocol state contract’s ABI available in the Remix editor for further development or interaction. -![ABI Interacting](../../../../static/images/abi-interaction.png) +![ABI Interacting](/images/abi-interaction.png) **Verify Uniswap v2 dashboard datasets** @@ -124,7 +124,7 @@ The `TradeVolumeProcessor` collects and stores information about trades that hap - As we explored in the previous section, the `TradeVolumeProcessor` logic takes care of capturing a snapshot of information regarding Uniswap v2 trades between the block heights of `min_chain_height` and `max_chain_height`. -- The epoch size as described in the prior section on [epoch generation](../../../protocol/specifications/epoch.md) can be considered to be constant for this specific implementation of the Uniswap v2 use case on PowerLoom Protocol, and by extension, the time duration captured within the epoch. +- The epoch size as described in the prior section on [epoch generation](/docs/protocol/specifications/epoch.md) can be considered to be constant for this specific implementation of the Uniswap v2 use case on PowerLoom Protocol, and by extension, the time duration captured within the epoch. - The finalized state and data CID corresponding to each epoch can be accessed on the smart contract on the anchor chain that holds the protocol state. The corresponding helpers for that can be found in `get_project_epoch_snapshot()` in [`pooler/snapshotter/utils/data_utils.py`](hhttps://github.com/PowerLoom/pooler/blob/main/snapshotter/utils/data_utils.py) @@ -157,4 +157,4 @@ Each finalized `epochId` is registered with a snapshot commit against the aggreg ## Extending Pooler for more Datapoints. -Implementing custom data points on top of existing pooler is easy. We have a section in [Build with Powerloom](../../build-with-powerloom.md) which covers this in detail. \ No newline at end of file +Implementing custom data points on top of existing pooler is easy. We have a section in [Build with Powerloom](/docs/build-with-powerloom) which covers this in detail. \ No newline at end of file diff --git a/docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/fetching-higher-order-datapoints.md b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/fetching-higher-order-datapoints.md similarity index 95% rename from docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/fetching-higher-order-datapoints.md rename to docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/fetching-higher-order-datapoints.md index 7abdfef..06a4899 100644 --- a/docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/fetching-higher-order-datapoints.md +++ b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/fetching-higher-order-datapoints.md @@ -19,7 +19,7 @@ Project IDs are unique identifiers in Pooler that correspond to specific pair co #### Config File: `projects.json` defines project types and associated smart contract addresses. - **Structure:** -- `project_type` - unique identifier prefix for the usecase, [used to generate project ID](../../../protocol/specifications/snapshotter/snapshot-build.md) +- `project_type` - unique identifier prefix for the usecase, [used to generate project ID](protocol/specifications/snapshotter/snapshot-build.md) - `projects` - smart contracts to extract data from, pooler can generate different snapshots from multiple sources as long as the Contract ABI is same - `processor` - the actual compuation logic reference, while you can write the logic anywhere, it is recommended to write your implementation in pooler/modules folder ```json reference @@ -80,6 +80,6 @@ try { } ``` -Check out our [Pooler API Docs](../../../Pooler-API-Docs/) for more information. +Check out our [Snapshotter Core API docs](/docs/snapshotter-core-api/) for more information. Coming up, we're going to have a closer look at snapshot datasets in Pooler. You'll learn how they are made and how to get data from them. \ No newline at end of file diff --git a/docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/index.md b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/index.md similarity index 92% rename from docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/index.md rename to docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/index.md index b681043..145bff0 100644 --- a/docs/build-with-powerloom/uniswapv2-dashboard/tour-of-existing-implementation/index.md +++ b/docs/build-with-powerloom/building-use-cases/uniswapv2-dashboard/tour-of-existing-implementation/index.md @@ -6,7 +6,7 @@ sidebar_position: 0 ### Data Points in Pooler -![UniswapV2 Dashboard Powerloom](../../../../static/images/uniswapv2-dashboard-powerloom.png) +![UniswapV2 Dashboard Powerloom](/images/uniswapv2-dashboard-powerloom.png) In Pooler, data points are specific, quantifiable elements derived from Uniswap V2 trading activities. These include: diff --git a/docs/snapshotter-node/joining-powerloom-network/_category_.json b/docs/build-with-powerloom/joining-powerloom-network/_category_.json similarity index 75% rename from docs/snapshotter-node/joining-powerloom-network/_category_.json rename to docs/build-with-powerloom/joining-powerloom-network/_category_.json index f35ba97..30b13d4 100644 --- a/docs/snapshotter-node/joining-powerloom-network/_category_.json +++ b/docs/build-with-powerloom/joining-powerloom-network/_category_.json @@ -1,6 +1,6 @@ { - "label": "Joining Powerloom Network", - "position": 0, + "label": "Joining the Network", + "position": 2, "link": { "type": "generated-index", "description": "Learn more about joining the different networks as a snapshotter and participate in Powerloom Protocol" diff --git a/docs/snapshotter-node/joining-powerloom-network/incentivized_testnet.md b/docs/build-with-powerloom/joining-powerloom-network/incentivized_testnet.md similarity index 100% rename from docs/snapshotter-node/joining-powerloom-network/incentivized_testnet.md rename to docs/build-with-powerloom/joining-powerloom-network/incentivized_testnet.md diff --git a/docs/snapshotter-node/_category_.json b/docs/build-with-powerloom/snapshotter-node/_category_.json similarity index 90% rename from docs/snapshotter-node/_category_.json rename to docs/build-with-powerloom/snapshotter-node/_category_.json index abba328..6ffa3e5 100644 --- a/docs/snapshotter-node/_category_.json +++ b/docs/build-with-powerloom/snapshotter-node/_category_.json @@ -1,6 +1,6 @@ { "label": "Snapshotter Node", - "position": 2, + "position": 0, "link": { "type": "generated-index", "description": "Dive deep into how snapshotter peers transform the powerloom network" diff --git a/docs/snapshotter-node/health-tracking.md b/docs/build-with-powerloom/snapshotter-node/health-tracking.md similarity index 100% rename from docs/snapshotter-node/health-tracking.md rename to docs/build-with-powerloom/snapshotter-node/health-tracking.md diff --git a/docs/snapshotter-node/overview.md b/docs/build-with-powerloom/snapshotter-node/overview.md similarity index 100% rename from docs/snapshotter-node/overview.md rename to docs/build-with-powerloom/snapshotter-node/overview.md diff --git a/docs/snapshotter-node/troubleshooting.md b/docs/build-with-powerloom/snapshotter-node/troubleshooting.md similarity index 100% rename from docs/snapshotter-node/troubleshooting.md rename to docs/build-with-powerloom/snapshotter-node/troubleshooting.md