-
Notifications
You must be signed in to change notification settings - Fork 20
Testing Multix with Chopsticks
Navigate to the root directory and delete the following files if they exist:
db.sqlite
db.sqlite-shm
db.sqlite-wal
Configure the environments for Chopsticks, Squid, and UI.
Set up chopsticks with your desired network specifics, example:
endpoint: wss://rococo-rpc.polkadot.io
mock-signature-host: true
block: 8012793
db: ./db.sqlite
runtime-log-level: 5
import-storage:
System:
Account:
- - - 5G4Akuy6urEH5akKM3WkeU5BKW8fffnX417nzFAp6EDVbE8Q
- providers: 1
data:
free: '98700000000000000000'
ParasDisputes:
$removePrefix: ['disputes']
example:
DB_PORT=5432
GQL_PORT=4350
SQD_DEBUG=sqd:processor:mapping
#rococo
BLOCK_START=8012793
PREFIX=42
RPC_WS="ws://localhost:8000/"
ARCHIVE_NAME="rococo"
CHAIN_ID='rococo'
example:
VITE_CHAIN_ID="rococo"
VITE_NETWORK_NAME="rococo"
VITE_WS_PROVIDER="ws://localhost:8000/"
VITE_GRAPHQL_WS_PROVIDER="ws://localhost:4350/graphql"
VITE_GRAPHQL_HTTP_PROVIDER="http://localhost:4350/graphql"
Ensure each is set with the 'block start number' and other necessary parameters.
Open four new terminal windows.
In the root directory of the project, launch Chopsticks with your configuration by executing:
npx --yes @acala-network/chopsticks@latest --config ./chopsticks-config.yml
Navigate to the ./squid
directory and run the following command:
docker compose down; docker compose up db -d; npm run codegen; npm run typegen; npm run build; npm run db:migrate; node -r dotenv/config lib/main dotenv_config_path=.env
In ./squid
, execute:
npm run start:graphql-server
Navigate to ./packages/ui
and execute:
yarn && yarn start
Now that everything is set up, navigate to the locally hosted version of Multix at http://localhost:3333, and select the network Local
to connect to your fork