Skip to content

Tbaut/Multix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6acd1ba · Mar 24, 2025
Mar 19, 2025
Sep 7, 2023
Mar 24, 2025
Feb 5, 2025
Nov 7, 2023
May 12, 2023
Dec 2, 2024
Jul 11, 2023
Sep 7, 2023
Jan 26, 2023
Nov 29, 2023
Dec 9, 2024
Jul 13, 2023
Mar 24, 2025
Mar 24, 2025

Repository files navigation

Multix

an interface to easily manage complex multisigs.

This repo contains the code to run an indexer see ./squid and a front-end, see ./packages/ui.

Running the project

You can run most of the project locally, except for the database that will run in a docker.

Environment variables

You need to set up the squid/.env file to tell the indexer what network to index. The following environment variables are expected. You can copy packages/squid/.env.example into packages/squid/.env as follow:

DB_PORT=5432
GQL_PORT=4350
SQD_DEBUG=sqd:processor:mapping

# rococo
BLOCK_START=3510000 # this is the starting block of the indexer
PREFIX=42 # the ss58 prefix for the chain
RPC_WS="wss://rococo-rpc.polkadot.io" # a WS endpoint to connect to the blockchain
ARCHIVE_NAME="rococo" # the archive name from subsquid archives
CHAIN_ID='rococo' # the name that will prefix most ids in the indexer's DB

Running the project locally

Running the indexer locally

Install and launch the indexer and its DB. This will block the terminal

cd squid;
npm install;
docker compose up db -d;
npm run codegen;
npm run build;
npm run db:migrate;
npm run start # this will start the indexer using the environment variables set in your .env
# alternatively, you can run with predefined values, see in /squid/assets/envs/, e.g here with polkadot
node -r dotenv/config lib/main dotenv_config_path=assets/envs/.env.polkadot

In the squid directory but another terminal window, run the graphql server

npm run start:graphql-server

Running the front-end (user interface) locally

From the repository root

# install all dependencies
yarn;

# start Multix UI (accessible on localhost:3333 per default)
yarn ui:start

Running tests in Cypress

Make sure you have docker.

# install all dependancies
yarn && cd squid && npm ci

# go back to the root
cd ..

# Launch the full setup. It will:
# - delete any previous Chopsticks database
# - launch a docker with the indexer db
# - launch a Chopsticks node
# - build and launch a subsquid indexer pointed at Chopsticks
# - launch a graphQL server for the squid
# - launch the UI with local env pointed at Chopsticks
rm db.sqlite*; npm run start:chopsticks-test-build-and-launch-all

yarn ui:test