A DEX explorer for Penumbra.
Warning
This repository is deprecated in favor of the Penumbra web monorepo. It is no longer maintained and will not receive updates. Please refer to the monorepo for the latest developments and features.
The application is written in NextJS, and uses pnpm for package management. The fastest way to get started on the development environment is to use Nix:
sh <(curl -L https://nixos.org/nix/install)
nix develop
just dev
However, you still need a database to connect to.
The DEX explorer application requires a PostgreSQL database containing ABCI event information as written by pindexer. You can set up a local devnet by following the Penumbra devnet quickstart guide, or plug in credentials for an already running database via environment variables:
# add these to e.g. `.envrc`:
export PENUMBRA_GRPC_ENDPOINT="https://testnet.plinfra.net"
export PENUMBRA_INDEXER_ENDPOINT="postgresql://<PGUSER>:<PGPASS>@<PGHOST>:<PGPORT>/<PGDATABASE>?sslmode=require""
export PENUMBRA_CHAIN_ID="penumbra-testnet-phobos-2"
# optional: if you see "self-signed certificate in certificate chain" errors,
# you'll likely need to export a `ca-cert.pem` file for the DB TLS.
# export PENUMBRA_INDEXER_CA_CERT="$(cat ca-cert.pem)"
If you see an error self-signed certificate in certificate chain
, then you'll need to:
- obtain the CA certificate file for the backend database you're connecting to, and export it as
PENUMBRA_INDEXER_CA_CERT
. - remove the
sslmode=require
string on thePENUMBRA_INDEXER_ENDPOINT
var.
See context in #55. After configuring that information, run just dev
again in the nix shell, and you should have events visible.
Merges to main will automatically build a container, hosted at ghcr.io/penumbra-zone/dex-explorer
.
In order to run the dex-explorer, you'll need to deploy a Penumbra fullnode,
with ABCI event indexing enabled. The relevant env vars
you'll want to set are:
PENUMBRA_GRPC_ENDPOINT
: the URL to a remote node'spd
gRPC servicePENUMBRA_INDEXER_ENDPOINT
: the URL to a Postgre database containing ABCI eventsPENUMBRA_INDEXER_CA_CERT
: optional; if set, the database connection will use the provided certificate authority when validating TLSPENUMBRA_CHAIN_ID
: the chain id for the network being indexed, controls asset-registry lookupsPENUMBRA_CUILOA_URL
: the URL for a block-explorer application, for generating URLs for more block/transaction info
It'd be nice to have a cool name for the DEX explorer. We don't have one yet.
Using https://buf.build/penumbra-zone/penumbra/sdks/main
Read the sub-article about the code structure here.