How to Navigate the Polkadot and Substrate Networks Using the Portal

Jan 20, 2024 | Blockchain

Are you looking to dive into the world of Polkadot and Substrate networks? The Polkadot Apps Portal provides a seamless view and interaction layer directly from your browser. This article will guide you through using this portal effectively, whether you prefer hosted applications or decentralized options using IPFS.

Getting Started with the Polkadot Apps Portal

To begin exploring supported Polkadot and Substrate chains, you have several options:

For developers wanting to enhance UI support for their chains, all local configurations can be handled through the apps-config package, which accommodates API types, settings, and logos.

Setting Up Local Development

If you’re interested in contributing to the portal, here is a step-by-step guide to set up your local environment:

  1. Clone the repo locally using:
  2. git clone https://github.com/polkadot-js/apps
  3. Make sure you have Node.js installed (recommended version: 16). You can download it from Node.js.
  4. Ensure Yarn is installed (recommended version: 1.22). Get it from Yarn.
  5. Install the dependencies by running:
  6. yarn
  7. Launch the UI (assuming you have a local Polkadot Node running):
  8. yarn run start
  9. Access the UI through http://localhost:3000.

Using Docker for a Seamless Experience

If you prefer using Docker, you can run a container with the following command:

docker run --rm -it --name polkadot-ui -e WS_URL=ws://someip:9944 -p 80:80 jacogr/polkadot-js-apps:latest

To build a Docker container with your local changes, you can use:

docker build -t jacogr/polkadot-js-apps -f docker/Dockerfile .

Access the UI via http://localhost:80 or just http://localhost.

Understanding IPFS Pinnings

IPFS (InterPlanetary File System) enhances data sharing in a decentralized way. Nodes can improve accessibility by pinning data. If you’re running an IPFS node, the following command will pin the UI:

curl -s https://polkadot.js.org/apps/ipfs/pin.json | jq -jr .IpfsHash | xargs -0 -I CID ipfs pin add --progress CID

To automate this pinning process, you might want to set up a cron job:

crontab -e
# Add this line to pin every hour
0 * * * * /usr/local/bin/polkadotjs-ipfs-pin.sh > /dev/null 2>&1

Troubleshooting Tips

If you encounter any issues, here are a few troubleshooting ideas:

  • Ensure that you are using a supported version of Node.js and Yarn.
  • Double-check your command syntax, especially when using Docker or IPFS commands.
  • If the UI doesn’t load, verify that your local Polkadot Node is running properly.

For connectivity and data queries via IPFS, you can use commands such as ipfs pin ls or ipfs dht findprovs [CID] to ensure everything is functioning correctly.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Enhanced Security with the Desktop App

For those prioritizing security, the Desktop App offers encrypted account storage on your filesystem, making it less susceptible to attacks compared to browser local storage. You can find accounts saved in the following directories:

  • Mac: ~/Library/Application Support/polkadot-apps/polkadot-accounts
  • Linux: ~/.config/polkadot-apps/polkadot-accounts
  • Windows: %APPDATA%/polkadot-apps/polkadot-accounts

Explore more about the desktop app in the Electron package README.

Conclusion

In this guide, we navigated through the Polkadot and Substrate portal, learned how to set up our local environment and explored the benefits of using Docker and IPFS. This exciting technology landscape awaits you!

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox