Skip to content

Commit

Permalink
chore: improve layout, remove relative links and image references
Browse files Browse the repository at this point in the history
  • Loading branch information
xadahiya committed Dec 1, 2023
1 parent 2b9c90c commit 38ab720
Show file tree
Hide file tree
Showing 17 changed files with 26 additions and 18 deletions.
4 changes: 2 additions & 2 deletions docs/build-with-powerloom/build-with-powerloom.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand 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

Expand Down
8 changes: 8 additions & 0 deletions docs/build-with-powerloom/building-use-cases/_category_.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/)

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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**

Expand All @@ -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**

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 38ab720

Please sign in to comment.