Contributing
How to contribute
Thank you for your interest in contributing to Blobscan! We welcome contributions from everyone, and this document provides some guidelines to make the contribution process smoother.
Code of Conduct
All contributors are expected to follow our Code of Conduct. Please make sure you are welcoming and friendly in all our spaces.
Getting Started
- Ensure you have a GitHub account.
- Look for an issue to tackle in our issue tracker on GitHub.
- Once you've chosen an issue, comment on it to let others know you're working on it.
Making Changes
- Begin by setting up Blobscan locally.
- Proceed to make your changes.
- Ensure you've tested your changes comprehensively. Refer to our Testing Guide for details on our testing setup.
- Once done, push your changes to your GitHub fork.
- Create a pull request against our main repository.
Contact
If you have questions or need help with your contribution, join our Discord server and ask in the #🔎-blobscan channel.
Examples
Add support for a new network
Steps:
- Add a new chain file under
packages/chains/src/chains/(see existing chains for reference) and export it frompackages/chains/src/chains/index.ts - Add the new network name to the
networkSchemaenum inpackages/env/index.ts - Update environment documentation in
apps/docs/src/app/docs/environment/page.md
Check out the following PRs:
- https://github.com/Blobscan/blobscan/pull/823
- https://github.com/Blobscan/blobscan/commit/0a2a94c587e9b93f6b36ad15fd55065e824b5049
- https://github.com/Blobscan/blobscan/pull/826
Add a new storage provider
Steps:
- Add the new storage value to the
BlobStorageenum inpackages/db/prisma/schema.prismaand create a Prisma migration - Implement the storage class in
packages/blob-storage-manager/src/storages/extendingBlobStorageand export it from itsindex.ts - Add any new environment variables to
packages/env/index.tsand document them inapps/docs/src/app/docs/environment/page.md - Wire up the new storage in
packages/blob-storage-manager/src/utils/storage.ts(createStorageFromEnv) - Add a worker processor file in
packages/blob-propagator/src/worker-processors/and register it inpackages/blob-propagator/src/BlobPropagator.ts - Add an SVG icon to
apps/web/src/icons/blob-storages/, register it inapps/web/src/icons/blob-storages/index.ts, and add the badge entry inapps/web/src/components/Badges/StorageBadge.tsx - Add tests for the new storage class and worker processor
Check out the following PRs:
- https://github.com/Blobscan/blobscan/pull/820
Label a new rollup
Steps:
- Add the new rollup value to the
Rollupenum inpackages/db/prisma/schema.prismaand create a Prisma migration - Add the sender address(es) → rollup mapping in
packages/rollups/src/index.ts(per chain ID) - Add an SVG (or PNG) icon to
apps/web/src/icons/rollups/(orapps/web/public/rollups/for PNGs) - Register the icon in
apps/web/src/icons/rollups/index.ts - Add the badge style (and optional label override) in the
ROLLUP_CONFIGobject inapps/web/src/components/Badges/RollupBadge.tsx
Check out the following PRs:
- https://github.com/Blobscan/blobscan/pull/923