Jan 8, 2024

Developer libraries/tools to get the most out of the Chainsight Platform

by Megared

So far, we have built and released several financial/statistical Indexes as Showcase by Chainsight Platform. As shown in these Showcases, any user/developer can retrieve data from anywhere, calculate it, store it on smart contracts or Internet Computer, and build and relay their own Index. To help users get started, we will provide a guide to the technical assets and ecosystem in Chainsight.

Visual Overview

First, let me show you the big picture before I give you the individual elements. Chainsight is a platform built on Internet Computer, and users can quickly create free components (i.e., canisters in Internet Computer) by using the CLI and SDK provided by Chainsight. Chainsight is a platform built on Internet Computer.

chainsight_overview_for_developer_202312.png

chainsight-cli

This CLI will support your activities in Chainsight, from creating Component modules to deploying them.

horizonx-tech/chainsight-cli

chainsight_cli_overview_for_developer.png

There are several types of Canisters, called Components in Chainsight, that run on the Chainsight Platform. (We will discuss these Types a bit in a subsequent SDK.) Parameters necessary for selecting this Type and declaring the Type's Component can be set in YAML format. On top of the Component Module base code generated from this YAML manifest, you can write any logic in Rust programming language. This base code is mainly built using the chainsight-sdk (described below). This CLI also acts as a wrapper for dfx, the CLI for Internet Computer, so you can build modules from the generated code and deploy them using only this CLI

chainsight-sdk

horizonx-tech/chainsight-sdk

Chainsight enables Trustless acquisition/processing/propagation of arbitrary data at low cost. We are developing an SDK to build a component to do this. Snapshot Indexer is responsible for acquiring and storing data, Algorithm Lens and Algorithm Indexer perform calculations using the data and output the calculation results, and Relayer is responsible for data propagation. Templating canister code for these Component types and allowing users the flexibility to make changes on that basis.

Since the SDK generates code for canister, the smart contract on top of Internet Computer, we use the dfinity library (ex: ic-cdk, ic-cdk-macros...) as primitives. In order to do more than that, we have created several OSS to be used in this SDK. These are mainly libraries to enhance the integration between Internet Computer and EVM-compatible.

horizonx-tech/ic-web3-rs

horizonx-tech/ic-solidity-bindgen

chainsight-management-canisters

horizonx-tech/chainsight-management-canisters

So far we have introduced assets to help users develop in Chainsight, but here is the management canister to maintain the Chainsight Platform. It is necessary to maintain the health of the Chainsight Component, such as managing inseparable gas on the Blockchain, Cycles in Internet Computer, and logging for Canister. We also provide a Chainsight UI to help users understand the indicators/indexes built on the Chainsight Platform and the status of the canister, and the management canister is responsible for providing comprehensive functionality here.

It also supports use in a local environment, and by running it on a dfx local node, you can create a development environment for Chainsight itself.


These libraries work and are already integrated with Internet Computer and EVM! Let’s use them to create your own indicators and indexes in Chainsight.

Follow us on Twitter and Medium for updates!

We look forward to your participation.