Web App for exploring Substrate-based Chains using Subxt

Overview

Subxt Explorer

Check it out at https://paritytech.github.io/subxt-explorer/.

An SPA for exploring metadata of substrate based blockchains in the Browser. Uses Subxt in WASM to connect to nodes, fetch storage values and generate example code snippets of how to interact with the chain using Subxt.

Development:

Prerequisites:

  • node.js
  • rust + cargo (nightly)
  • wasm-pack
# build the wasm module
cd codegen
wasm-pack build --no-default-features --features web
cd ..

# run the frontend
npm install
npm run dev
Comments
  • Show the `index` for calls

    Show the `index` for calls

    It's handy that pallets have indexes. It'd be really nice to do this for calls as well! (just now I was manually building an extrinsic for a pallet and wanted to check on the call index for it, and realised I couldn't via subxt-explorer :)

    opened by jsdw 0
  • Bump rustix from 0.37.23 to 0.37.25 in /codegen

    Bump rustix from 0.37.23 to 0.37.25 in /codegen

    Bumps rustix from 0.37.23 to 0.37.25.

    Commits
    • 00b84d6 chore: Release rustix version 0.37.25
    • cad15a7 Fixes for Dir on macOS, FreeBSD, and WASI.
    • df3c3a1 Merge pull request from GHSA-c827-hfw6-qwvm
    • b78aeff chore: Release rustix version 0.37.24
    • c0c3f01 Add GNU/Hurd support (#852)
    • f416b6b Fix the test_ttyname_ok test when /dev/stdin is inaccessable. (#821)
    • aee5b09 Downgrade dependencies and disable tests to compile under Rust 1.48.
    • 6d42c38 Disable MIPS in CI. (#793)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies rust 
    opened by dependabot[bot] 0
  • Light Client Support

    Light Client Support

    Users can now use their own chain_spec.json files to connect via the Smoldot lightclient integration that subxt can use under the unstable-lightclient feature flag. Also at the start of the web app, chain spec presets are fetched from This Repo via the github API. Currently this amounts to 4 chain specs. They are loaded in about 100ms, so it is not that bad. Users can select these presets instead of supplying their own chain specs: image

    Also the app state has been cleaned up a little. Creating a client now involves two data structures, a ClientCreationConfig and ClientCreationData. At any point of the app lifecycle, a ClientCreationConfig can be derived from the query params. This is also done at app start. Any ClientCreationConfig can be used to generate ClientCreationData, which then is passed to the Rust Code in WASM to initiate the connection. However the opposite way (ClientCreationData -> ClientCreationConfig) is not always possible. That is because a ClientCreationConfig should be 100% representable in terms of query params. Which is e.g. not possible if a user uploads a file.

    There is now the option to share URLs that use light client presets. For this a url needs to contain ?lightclient=Polkadot. This creates a ClientCreationConfig at app starts that is checked against any chain specs obtained from the aforementioned substrate connect repo.

    Currently connecting with a light client is super slow. Ofter 30+ seconds. I think it is due to some state synching smoldot is doing. Also Smoldot makes a lot of P2P requests to random IP addresses that sometimes fail (sometimes a lot), which currently clutters the Javascript Console with error messages.

    opened by tadeohepperle 1
  • Sharible URLs if using `Node Url` or `ChainSpec Preset` mode

    Sharible URLs if using `Node Url` or `ChainSpec Preset` mode

    Introduce a mode variable to the app state: | Mode | User Input | Metadata | Connection | Sharable Links | | ---------------- | -------------------------------------- | -------------------------------------- | ---------------- | -------------- | | Metadata File | a metadata file, e.g. metadata.scale | decoded from uploaded file | - | No | | Node Url | a url to a a node, e.g. | Fetched when constructing OnlineClient | Jsonrpsee Client | Yes | | ChainSpec File | a chainspec file, e.g. polkadot.json | Fetched when constructing LightClient | LightClient | No | | ChainSpec Preset | selection of a chainspec file preset | Fetched when constructing LightClient | LightClient | Yes |

    opened by tadeohepperle 0
  • Integration of Light Client Connection

    Integration of Light Client Connection

    It should be possible to connect to a chain using the Lightclient in WASM. It needs a chainspec to connect to a chain. There should be two ways to connect:

    • Drag and Drop a chainspec file, similarly how you can drag and drop metadata in right now.
    • Have a list of chain specs ready to select from. These can be fetched via GET requests if they are hosted alongside the Webapp.
    opened by tadeohepperle 0
  • `None` in the `QueueConfig` storage item of `XcmpQueue`

    `None` in the `QueueConfig` storage item of `XcmpQueue`

    When using the Polkadot Explorer with wss://polkadot-asset-hub-rpc.polkadot.io navigating to https://paritytech.github.io/subxt-explorer/#/pallets/XcmpQueue/storage_entries#QueueConfig shows None for the QueueConfig storage item while polkadot Js can retrieve it: https://cloudflare-ipfs.com/ipns/dotapps.io/?rpc=wss%3A%2F%2Fpolkadot-asset-hub-rpc.polkadot.io#/chainstate

    opened by tadeohepperle 0
Owner
Parity Technologies
Solutions for a trust-free world
Parity Technologies
Alternative client for Substrate-based chains.

Lightweight Substrate and Polkadot client. Introduction smoldot is an alternative client of Substrate-based chains, including Polkadot. There exists t

null 14 Feb 16, 2023
Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking ?? Getting Started This project contains some configuration files to help

HoangDuong 1 Oct 19, 2021
Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking ?? Getting Started This project contains some configuration files to help

HoangDuong 1 Oct 19, 2021
Substrate blockchain generated with Substrate Startkit

Substrate Node Template A new FRAME-based Substrate node, ready for hacking ?? Getting Started This project contains some configuration files to help

Liam Parry 0 Nov 6, 2021
Polkadex - An Orderbook-based Decentralized Exchange using the Substrate Blockchain Framework.

What is Polkadex? ?? Polkadex is a Open Source, Decentralized Exchange Platform made using Substrate Blockchain Framework that provides traders with t

Polkadex 243 Dec 16, 2022
A template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it.

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it. To understan

null 1 Mar 7, 2022
Smart Contract built in Rust to run inside Cosmos SDK module on all chains that enable it

CoinSwap is a Smart Contract that is built on the terra blockchain and can be used to swap cryptocurrencies such as LUNA, UST, TerraUSD, Anchor, Mirror Protocol, LUNI and other CW20 tokens. The Project also contains a smart contract which works as a analysis tool for the gas fees on the Terra Blockchain.

Prajjwal Chittori 9 Oct 11, 2022
Substreams development kit for Ethereum chains, contains Firehose Block model and helpers as well as utilities for Ethereum ABI encoding/decoding.

Substreams Ethereum Substreams development kit for Ethereum chains, contains Rust Firehose Block model and helpers as well as utilities for Ethereum A

StreamingFast 15 Oct 25, 2022
A framework for developing EVM-compatible chains

rt-evm A compact development framework for creating EVM-compatible runtimes/chains. Usage Check the example for details. Projects referenced trie, MPT

Rust Util Collections 4 Mar 15, 2023
`llm-chain` is a powerful rust crate for building chains in large language models allowing you to summarise text and complete complex tasks

llm-chain ?? llm-chain is a collection of Rust crates designed to help you work with Large Language Models (LLMs) more effectively. Our primary focus

Sobel IO 36 Apr 6, 2023
Starknet Stack let's you easily create new Cairo Starknet chains with their own sequencers, provers and verifiers

Starknet Stack flowchart LR A("Client") ==>|"Starknet Transactions"| subGraph0["Sequencer"] subGraph0 -.->|"Blocks with txs"| 300319["Watcher prover

Lambdaclass 7 Jul 11, 2023
generate peerid from secret_ed25119 for chains made with polkadot-sdk

genpeerid genpeerid is a command-line tool designed to generate a PeerId from an ED25519 secret key, formatted specifically for Polkadot and Substrate

Rotko Networks 3 Apr 3, 2024
An API and test-app that exposes zcash functionality for app consumption

Zingolib This repo provides both a library for zingoproxyclient and zingo-mobile, as well as an included cli application to interact with zcashd via l

ZingoLabs 5 Dec 15, 2022
Implementation of Proof of Existence consensus using Substrate Framework, Frame, Pallets, RUST

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

Vijayendra Gaur 1 Jun 8, 2022
A Substrate-based PoA node supporting dynamic addition/removal of authorities.

Substrate PoA A sample Substrate runtime for a PoA blockchain that allows: Dynamically add/remove authorities. Automatically remove authorities when t

Gautam Dhameja 10 Jun 16, 2022
xx network Substrate based blockchain node

xx network Substrate based blockchain node Rust Setup First, complete the basic Rust setup instructions. MacOS users: setup to compile for Linux Befor

xx network 11 Dec 20, 2022
The Data Highway Substrate-based blockchain node.

DataHighway-Parachain, a parachain on the Polkadot network. Planned features include a decentralized LPWAN roaming hub for LoRaWAN IoT devices and network operator roaming agreements, participative mining, an inter-chain data market, and DAO governance.

DataHighway 11 Dec 2, 2022
A Web3.0 forum implemented based on Substrate

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

Daogang Tang 5 Mar 24, 2022
A Web3.0 forum implemented based on Substrate

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking ?? Getting Started Follow the steps below to get started with the Node T

Mike Tang 5 Mar 24, 2022