From f0a45ce672a290f2ee3528f8efdbb047381a8918 Mon Sep 17 00:00:00 2001 From: yashreltime Date: Thu, 20 Feb 2025 11:57:16 +0530 Subject: [PATCH 1/2] Add Reltime chain to Chainscout --- components/Header.tsx | 2 +- data/chains.json | 16 ++++++++++++++++ next.config.mjs | 42 ++++++++++++++++++++++++++++++++++-------- 3 files changed, 51 insertions(+), 9 deletions(-) diff --git a/components/Header.tsx b/components/Header.tsx index 0b9da42..6185e2c 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -35,10 +35,10 @@ export default function Header() { Blockscout Logo diff --git a/data/chains.json b/data/chains.json index 7687714..ebc5a6a 100644 --- a/data/chains.json +++ b/data/chains.json @@ -12295,5 +12295,21 @@ "hostedBy": "self" } ] + }, + "32323": { + "name": "Reltime", + "description": "Reltime (RTC) is a private blockchain network built on Hyperledger Besu—a robust Ethereum client designed for enterprise applications. It operates in a permissioned environment where smart contracts can run securely and efficiently.", + "logo": "https://purple-alecia-8.tiiny.site/Footerlogo.svg", + "ecosystem": "Ethereum", + "isTestnet": false, + "layer": 1, + "rollupType": null, + "website": "https://www.reltime.com/", + "explorers": [ + { + "url": "http://explorer.reltime.com", + "hostedBy": "self" + } + ] } } diff --git a/next.config.mjs b/next.config.mjs index c8f2b97..c5afb1b 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -2,14 +2,40 @@ const nextConfig = { reactStrictMode: true, images: { - domains: [ - 'uploads-ssl.webflow.com', - 'd2e6b8w31txsjq.cloudfront.net', - 'cdn.prod.website-files.com', - 'docs.inkonchain.com', - 'haust.network', - 'avatars.githubusercontent.com', - ], + remotePatterns: [ + { + protocol: 'https', + hostname: 'uploads-ssl.webflow.com' + }, + { + protocol: 'https', + hostname: 'd2e6b8w31txsjq.cloudfront.net' + }, + { + protocol: 'https', + hostname: 'cdn.prod.website-files.com' + }, + { + protocol: 'https', + hostname: 'docs.inkonchain.com' + }, + { + protocol: 'https', + hostname: 'haust.network' + }, + { + protocol: 'https', + hostname: 'avatars.githubusercontent.com' + }, + { + protocol: 'https', + hostname: 'blockscout-icons.s3.us-east-1.amazonaws.com' + }, + { + protocol: 'https', + hostname: 'blockscout-icons.s3.amazonaws.com' + } + ] }, webpack(config) { const fileLoaderRule = config.module.rules.find( From 61b63a0a150b79b16541d37606c50469178668ff Mon Sep 17 00:00:00 2001 From: Max Alekseenko Date: Tue, 25 Feb 2025 12:17:03 +0000 Subject: [PATCH 2/2] allow any domain for images, make small fixes --- README.md | 14 +------------- components/ChainCard.tsx | 5 +++-- data/chains.json | 4 ++-- next.config.mjs | 30 +----------------------------- 4 files changed, 7 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index ccbafe9..2dd85ea 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,6 @@ We welcome contributions to Chainscout! Here's how you can help: 1. Fork the repository and create a new branch for your addition. 2. Open the file `data/chains.json`. 3. Add a new entry for the chain, following the existing format: - ```json "chainId": { "name": "Chain Name", @@ -85,18 +84,7 @@ We welcome contributions to Chainscout! Here's how you can help: "logo": "https://example.com/path/to/logo.png" } ``` -4. If the logo URL uses a new domain, add it to the `images.domains` array in `next.config.mjs`: -```javascript -module.exports = { - images: { - domains: [ - 'existing-domain.com', - 'new-logo-domain.com' - ], - }, -}; -``` -5. Create a pull request with your changes. +4. Create a pull request with your changes. ### Adding an Explorer to an Existing Chain diff --git a/components/ChainCard.tsx b/components/ChainCard.tsx index ca184a2..e5997a7 100644 --- a/components/ChainCard.tsx +++ b/components/ChainCard.tsx @@ -1,6 +1,7 @@ import { ChainData } from '@/types'; import Image from 'next/image'; import Link from 'next/link'; +import React from 'react'; import { HOSTING_PROVIDERS, HostingProvider, ROLLUP_TYPES, RollupType } from '@/utils/constants'; import LinkIcon from '@/public/link.svg'; @@ -84,7 +85,7 @@ export default function ChainCard({ { href: website, text: 'Project Website' }, { href: url, text: 'Blockscout Explorer' }, ].map(({ href, text }, index, array) => ( - <> + {text} @@ -92,7 +93,7 @@ export default function ChainCard({ {index < array.length - 1 &&
} - +
))} diff --git a/data/chains.json b/data/chains.json index ebc5a6a..dfa3f40 100644 --- a/data/chains.json +++ b/data/chains.json @@ -866,7 +866,7 @@ "210": { "name": "Bitnet BTN", "description": "Per-to-peer blockchain and financial network - made for everyone.", - "logo": "https://blockscout-icons.s3.us-east-1.amazonaws.com/bitnet-btn", + "logo": "https://blockscout-icons.s3.us-east-1.amazonaws.com/bitnet-btn.png", "ecosystem": "Ethereum", "isTestnet": false, "layer": 1, @@ -7082,7 +7082,7 @@ "45510": { "name": "DeeLance Mainnet", "description": "A decentralized blockchain built to connect freelancers and recruiters.", - "logo": "x", + "logo": "", "ecosystem": "Ethereum", "isTestnet": false, "layer": 1, diff --git a/next.config.mjs b/next.config.mjs index c5afb1b..4ef518d 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -5,36 +5,8 @@ const nextConfig = { remotePatterns: [ { protocol: 'https', - hostname: 'uploads-ssl.webflow.com' + hostname: '**', }, - { - protocol: 'https', - hostname: 'd2e6b8w31txsjq.cloudfront.net' - }, - { - protocol: 'https', - hostname: 'cdn.prod.website-files.com' - }, - { - protocol: 'https', - hostname: 'docs.inkonchain.com' - }, - { - protocol: 'https', - hostname: 'haust.network' - }, - { - protocol: 'https', - hostname: 'avatars.githubusercontent.com' - }, - { - protocol: 'https', - hostname: 'blockscout-icons.s3.us-east-1.amazonaws.com' - }, - { - protocol: 'https', - hostname: 'blockscout-icons.s3.amazonaws.com' - } ] }, webpack(config) {