diff --git a/.env.sample b/.env.sample
index 28af456..ada836c 100644
--- a/.env.sample
+++ b/.env.sample
@@ -1,5 +1,2 @@
-# requires full url
-NEXT_PUBLIC_BACKEND_APP_URL = 'http://0.0.0.0:8000/api/...'
-
-# client app public URL
-NEXT_PUBLIC_CLIENT_DOMAIN =
\ No newline at end of file
+# client app public URL (used in og:image and og:url metadata)
+NEXT_PUBLIC_CLIENT_DOMAIN =
diff --git a/next.config.js b/next.config.js
index 9099da9..af67520 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,32 +1,39 @@
/** @type {import('next').NextConfig} */
+const GRAFANA_DASHBOARD_URL =
+ 'https://chainstack.grafana.net/public-dashboards/65c0fcb02f994faf845d4ec095771bd0?orgId=1';
+
+const cspDirectives = [
+ "default-src 'self'",
+ "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.segment.com https://www.googletagmanager.com https://www.google-analytics.com",
+ "style-src 'self' 'unsafe-inline' https://fonts.googleapis.com",
+ "font-src 'self' https://fonts.gstatic.com data:",
+ "img-src 'self' data: https:",
+ "frame-src https://chainstack.grafana.net",
+ "connect-src 'self' https://api.segment.io https://*.segment.io https://www.google-analytics.com",
+ "frame-ancestors 'none'",
+ "base-uri 'self'",
+ "form-action 'self'",
+].join('; ');
+
const nextConfig = {
async headers() {
return [
{
- source: '/api/:path*',
+ source: '/(.*)',
headers: [
- { key: 'Access-Control-Allow-Credentials', value: 'true' },
- { key: 'Access-Control-Allow-Origin', value: '*' },
- {
- key: 'Access-Control-Allow-Methods',
- value: 'GET,DELETE,PATCH,POST,PUT',
- },
- {
- key: 'Access-Control-Allow-Headers',
- value:
- 'X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version',
- },
+ { key: 'Content-Security-Policy', value: cspDirectives },
+ { key: 'X-Content-Type-Options', value: 'nosniff' },
+ { key: 'Referrer-Policy', value: 'no-referrer-when-downgrade' },
+ { key: 'Strict-Transport-Security', value: 'max-age=63072000; includeSubDomains; preload' },
],
},
];
},
async redirects() {
return [
- {
- source: '/dashboard',
- destination: 'https://chainstack.grafana.net/public-dashboards/65c0fcb02f994faf845d4ec095771bd0?orgId=1',
- permanent: true
- }
+ { source: '/compare-single', destination: '/', permanent: true },
+ { source: '/compare-double', destination: '/', permanent: true },
+ { source: '/dashboard', destination: GRAFANA_DASHBOARD_URL, permanent: true },
];
},
reactStrictMode: false,
@@ -39,4 +46,4 @@ const withMDX = require('@next/mdx')({
},
});
-module.exports = withMDX(nextConfig);
\ No newline at end of file
+module.exports = withMDX(nextConfig);
diff --git a/src/app/compare-double/page.js b/src/app/compare-double/page.js
deleted file mode 100644
index 64efc4a..0000000
--- a/src/app/compare-double/page.js
+++ /dev/null
@@ -1,401 +0,0 @@
-'use client';
-import { useEffect, useState } from 'react';
-
-import Header from '@/components/Header/Header';
-import ResultCard from '@/components/ResultCard/ResultCard';
-import ExplainResultsIcon from '../../components/Icons/ExplainResultsIcon';
-
-import { CodeIcon, ShareIcon } from '@iconicicons/react';
-import { Button, Loading, Badge } from '@lemonsqueezy/wedges';
-import { ClipboardIcon, CheckIcon, PlusIcon } from '@iconicicons/react';
-import { Chart } from 'react-google-charts';
-import Link from 'next/link';
-
-import {
- NODE_ENDPOINT,
- NODE_ENDPOINT_2,
- SET_NODE_ENDPOINT,
- SET_NODE_ENDPOINT_2,
- METHODS,
- METHODS_2,
- SET_METHOD_RESPONSE_DATA,
- SET_METHOD_RESPONSE_DATA_2,
- GET_METHODS_NAMES,
-} from '../store/store';
-
-import { useSearchParams } from 'next/navigation';
-
-const Result = () => {
- const searchParams = useSearchParams();
- let url1 = searchParams.get('url1');
- let url2 = searchParams.get('url2');
-
- const nodeEndpoint = url1 ? url1 : NODE_ENDPOINT.use();
- const nodeEndpoint2 = url2 ? url2 : NODE_ENDPOINT_2.use();
- const methods = METHODS.use();
- const methods2 = METHODS_2.use();
- const methodsNames = GET_METHODS_NAMES.use();
-
- const [copiedToClipboard, setCopiedToClipboard] = useState(false);
- const [copiedToClipboard2, setCopiedToClipboard2] = useState(false);
- const [compareLinkCopiedToClipboard, setCompareLinkCopiedToClipboard] =
- useState(false);
- const [chartData, setChartData] = useState(null);
- const [chartData2, setChartData2] = useState(null);
- const [explainIsDisabled, setExplainIsDisabled] = useState(false);
-
- const downloadJson = () => {
- const jsonString = `data:text/json;chatset=utf-8,${encodeURIComponent(
- JSON.stringify([
- {
- endpoint: nodeEndpoint,
- results: methods.map((method) => {
- return {
- method: method.method_used,
- results: method.data,
- };
- }),
- },
- {
- endpoint: nodeEndpoint2,
- results: methods2.map((method) => {
- return {
- method: method.method_used,
- results: method.data,
- };
- }),
- },
- ])
- )}`;
- const link = document.createElement('a');
- link.href = jsonString;
- link.download = 'data.json';
-
- link.click();
- };
-
- useEffect(() => {
- if (
- methods.every((item) => Object.keys(item.data).length != 0) === true &&
- methods2.every((item) => Object.keys(item.data).length != 0) === true
- ) {
- let chart = [methods[1], methods2[1]];
- 2;
- let chart2 = [methods[0], methods2[0]];
-
- setChartData([
- [
- '',
- ...chart.map((item, index) => {
- return `Endpoint ${index + 1}`;
- }),
- ],
- [
- '',
- ...chart.map((item) => {
- if (
- Object.keys(item.data).length != 0 &&
- item.data.hasOwnProperty('error') === false
- ) {
- return +item.data.blocks_per_seconds.toFixed(2);
- } else {
- return 0;
- }
- }),
- ],
- ]);
-
- setChartData2([
- [
- '',
- ...chart2.map((item, index) => {
- return `Endpoint ${index + 1}`;
- }),
- ],
- [
- '',
- ...chart2.map((item) => {
- if (
- Object.keys(item.data).length != 0 &&
- item.data.hasOwnProperty('error') === false
- ) {
- return +item.data.blocks_per_seconds.toFixed(2);
- } else {
- return 0;
- }
- }),
- ],
- ]);
- }
- }, [methods, methods2]);
-
- let grid = 'grid grid-cols-2 gap-10';
-
- return (
-
-
-
- {/* URLS */}
-
- {[
- {
- endpoint: nodeEndpoint,
- copied: copiedToClipboard,
- clip(value) {
- setCopiedToClipboard(value);
- },
- },
- {
- endpoint: nodeEndpoint2,
- copied: copiedToClipboard2,
- clip(value) {
- setCopiedToClipboard2(value);
- },
- },
- ].map((item, index) => {
- return (
-
-
[{index + 1}]
-
- {item.endpoint}
-
-
- ) : (
-
- )
- }
- variant="transparent"
- onClick={() => {
- navigator.clipboard.writeText(item.endpoint);
- item.clip(true);
- setTimeout(() => {
- item.clip(false);
- }, 1000);
- }}
- />
-
- );
- })}
-
- {/* URLS */}
-
- {/* eth_getBlockByNumber */}
-
- {[
- {
- config: methods[0],
- endpoint: nodeEndpoint,
- setResponse: SET_METHOD_RESPONSE_DATA,
- },
- {
- config: methods2[0],
- endpoint: nodeEndpoint2,
- setResponse: SET_METHOD_RESPONSE_DATA_2,
- },
- ].map((item, index) => {
- return (
-
- );
- })}
-
- {/* eth_getBlockByNumber */}
-
- {/* eth_call */}
-
- {[
- {
- config: { ...methods[1] },
- endpoint: nodeEndpoint,
- setResponse: SET_METHOD_RESPONSE_DATA,
- },
- {
- config: { ...methods2[1] },
- endpoint: nodeEndpoint2,
- setResponse: SET_METHOD_RESPONSE_DATA_2,
- },
- ].map((item, index) => {
- return (
-
- );
- })}
-
- {/* eth_call */}
-
-
-
- Compare results
-
-
-
-
-
} color="blue" stroke className="">
- {methodsNames[1]}
-
-
Blocks per second
-
- {!chartData ? (
-
-
-
- ) : (
-
- )}
-
-
-
-
} color="blue" stroke className="">
- {methodsNames[0]}
-
-
Blocks per second
-
- {!chartData2 ? (
-
-
-
- ) : (
-
- )}
-
-
-
- }
- variant="tertiary"
- disabled={explainIsDisabled}
- onClick={downloadJson}
- >
- Download JSON
-
-
- ) : (
-
- )
- }
- variant="tertiary"
- disabled={explainIsDisabled}
- onClick={() => {
- navigator.clipboard.writeText(
- `https://compare.chainstack.com/compare-double?url1=${nodeEndpoint}&url2=${nodeEndpoint2}`
- );
- setCompareLinkCopiedToClipboard(true);
- setTimeout(() => {
- setCompareLinkCopiedToClipboard(false);
- }, 1000);
- }}
- >
- Copy link
-
-
- }
- variant="tertiary"
- disabled={explainIsDisabled}
- >
- New test
-
-
-
-
-
-
- Learn how Chainstack Compare works
- under the hood and why we built it ↗.
-
-
-
-
- );
-};
-
-export default Result;
diff --git a/src/app/compare-single/page.js b/src/app/compare-single/page.js
deleted file mode 100644
index 1f6b8d8..0000000
--- a/src/app/compare-single/page.js
+++ /dev/null
@@ -1,183 +0,0 @@
-'use client';
-import { useEffect, useState } from 'react';
-
-import Header from '@/components/Header/Header';
-import ResultCard from '@/components/ResultCard/ResultCard';
-import ExplainResultsIcon from '../../components/Icons/ExplainResultsIcon';
-
-import { Button, Loading } from '@lemonsqueezy/wedges';
-import { ClipboardIcon, CheckIcon, PlusIcon } from '@iconicicons/react';
-import { Chart } from 'react-google-charts';
-import Link from 'next/link';
-
-import {
- NODE_ENDPOINT,
- METHODS,
- SET_METHOD_RESPONSE_DATA,
-} from '../store/store';
-
-const Result = () => {
- const nodeEndpoint = NODE_ENDPOINT.use();
- const methods = METHODS.use();
-
- const [copiedToClipboard, setCopiedToClipboard] = useState(false);
- const [chartData, setChartData] = useState(null);
- const [explainIsDisabled, setExplainIsDisabled] = useState(true);
-
- const downloadJson = () => {
- const jsonString = `data:text/json;chatset=utf-8,${encodeURIComponent(
- JSON.stringify(
- methods.map((method) => {
- return {
- method: method.method_used,
- results: method.data,
- };
- })
- )
- )}`;
- const link = document.createElement('a');
- link.href = jsonString;
- link.download = 'data.json';
-
- link.click();
- };
-
- useEffect(() => {
- if (methods.every((item) => Object.keys(item.data).length != 0) === true) {
- setChartData([
- ['', ...methods.map((item) => item.method_used)],
- [
- '',
- ...methods.map((item) => {
- if (
- Object.keys(item.data).length != 0 &&
- item.data.hasOwnProperty('error') === false
- ) {
- return +item.data.blocks_per_seconds.toFixed(2);
- } else {
- return 0;
- }
- }),
- ],
- ]);
- setExplainIsDisabled(false);
- }
- }, [methods]);
-
- return (
-
-
-
-
-
{nodeEndpoint}
-
- ) : (
-
- )
- }
- variant="transparent"
- onClick={() => {
- navigator.clipboard.writeText(nodeEndpoint);
- setCopiedToClipboard(true);
- setTimeout(() => {
- setCopiedToClipboard(false);
- }, 1000);
- }}
- />
-
- {methods.map((item, index) => {
- return (
-
- );
- })}
-
-
- {!chartData ? (
-
-
-
- ) : (
-
- )}
-
-
-
- }
- variant="tertiary"
- disabled={explainIsDisabled}
- onClick={downloadJson}
- >
- Download JSON
-
-
- }
- variant="tertiary"
- disabled={explainIsDisabled}
- >
- New test
-
-
-
-
-
-
- Learn how Chainstack Compare works
- under the hood and why we built it ↗.
-
-
-
-
- );
-};
-
-export default Result;
diff --git a/src/app/injection-result-double/page.js b/src/app/injection-result-double/page.js
deleted file mode 100644
index 8db746d..0000000
--- a/src/app/injection-result-double/page.js
+++ /dev/null
@@ -1,284 +0,0 @@
-'use client';
-import { useEffect, useState } from 'react';
-import ResultCard from '@/components/ResultCard/ResultCard';
-import { Button } from '@lemonsqueezy/wedges';
-import { ClipboardIcon, CheckIcon } from '@iconicicons/react';
-
-import Link from 'next/link';
-import Script from 'next/script';
-
-import {
- NODE_ENDPOINT,
- NODE_ENDPOINT_2,
- METHODS,
- METHODS_2,
- SET_METHOD_RESPONSE_DATA,
- SET_METHOD_RESPONSE_DATA_2,
- GET_METHODS_NAMES,
-} from '../store/store';
-
-const Result = () => {
- const nodeEndpoint = NODE_ENDPOINT.use();
- const nodeEndpoint2 = NODE_ENDPOINT_2.use();
- const methods = METHODS.use();
- const methods2 = METHODS_2.use();
- const methodsNames = GET_METHODS_NAMES.use();
-
- const [copiedToClipboard, setCopiedToClipboard] = useState(false);
- const [copiedToClipboard2, setCopiedToClipboard2] = useState(false);
- const [chartData, setChartData] = useState(null);
- const [chartData2, setChartData2] = useState(null);
- const [explainIsDisabled, setExplainIsDisabled] = useState(false);
-
- const downloadJson = () => {
- const jsonString = `data:text/json;chatset=utf-8,${encodeURIComponent(
- JSON.stringify([
- {
- endpoint: nodeEndpoint,
- results: methods.map((method) => {
- return {
- method: method.method_used,
- results: method.data,
- };
- }),
- },
- {
- endpoint: nodeEndpoint2,
- results: methods2.map((method) => {
- return {
- method: method.method_used,
- results: method.data,
- };
- }),
- },
- ])
- )}`;
- const link = document.createElement('a');
- link.href = jsonString;
- link.download = 'data.json';
-
- link.click();
- };
-
- useEffect(() => {
- if (
- methods.every((item) => Object.keys(item.data).length != 0) === true &&
- methods2.every((item) => Object.keys(item.data).length != 0) === true
- ) {
- let chart = [methods[1], methods2[1]];
- let chart2 = [methods[0], methods2[0]];
-
- setChartData([
- [
- '',
- ...chart.map((item, index) => {
- return `Endpoint ${index + 1}`;
- }),
- ],
- [
- '',
- ...chart.map((item) => {
- if (
- Object.keys(item.data).length != 0 &&
- item.data.hasOwnProperty('error') === false
- ) {
- return +item.data.blocks_per_seconds.toFixed(2);
- } else {
- return 0;
- }
- }),
- ],
- ]);
-
- setChartData2([
- [
- '',
- ...chart2.map((item, index) => {
- return `Endpoint ${index + 1}`;
- }),
- ],
- [
- '',
- ...chart2.map((item) => {
- if (
- Object.keys(item.data).length != 0 &&
- item.data.hasOwnProperty('error') === false
- ) {
- return +item.data.blocks_per_seconds.toFixed(2);
- } else {
- return 0;
- }
- }),
- ],
- ]);
- }
- }, [methods, methods2]);
-
- let grid = 'grid grid-cols-2 gap-10';
-
- return (
- //
- <>
-
- {/* URLS */}
-
- {[
- {
- endpoint: nodeEndpoint,
- copied: copiedToClipboard,
- clip(value) {
- setCopiedToClipboard(value);
- },
- },
- {
- endpoint: nodeEndpoint2,
- copied: copiedToClipboard2,
- clip(value) {
- setCopiedToClipboard2(value);
- },
- },
- ].map((item, index) => {
- return (
-
-
[{index + 1}]
-
- {item.endpoint}
-
-
- ) : (
-
- )
- }
- variant="transparent"
- onClick={() => {
- navigator.clipboard.writeText(item.endpoint);
- item.clip(true);
- setTimeout(() => {
- item.clip(false);
- }, 1000);
- }}
- />
-
- );
- })}
-
- {/* URLS */}
-
- {/* eth_getBlockByNumber */}
-
- {[
- {
- config: methods[0],
- endpoint: nodeEndpoint,
- setResponse: SET_METHOD_RESPONSE_DATA,
- },
- {
- config: methods2[0],
- endpoint: nodeEndpoint2,
- setResponse: SET_METHOD_RESPONSE_DATA_2,
- },
- ].map((item, index) => {
- return (
-
- );
- })}
-
- {/* eth_getBlockByNumber */}
-
- {/* eth_call */}
-
- {[
- {
- config: { ...methods[1] },
- endpoint: nodeEndpoint,
- setResponse: SET_METHOD_RESPONSE_DATA,
- },
- {
- config: { ...methods2[1] },
- endpoint: nodeEndpoint2,
- setResponse: SET_METHOD_RESPONSE_DATA_2,
- },
- ].map((item, index) => {
- return (
-
- );
- })}
-
- {/* eth_call */}
-
-
- {/*
- Full results
- */}
-
- }
- variant="primary"
- disabled={explainIsDisabled}
- >
- See full results
-
-
- {/*
- }
- variant="tertiary"
- disabled={explainIsDisabled}
- >
- New test
-
- */}
-
-
-
- >
- );
-};
-
-export default Result;
diff --git a/src/app/injection-start/page.js b/src/app/injection-start/page.js
deleted file mode 100644
index 13c24be..0000000
--- a/src/app/injection-start/page.js
+++ /dev/null
@@ -1,95 +0,0 @@
-'use client';
-import { useEffect, useState } from 'react';
-import { Button, Input } from '@lemonsqueezy/wedges';
-import Link from 'next/link';
-
-import {
- NODE_ENDPOINT,
- NODE_ENDPOINT_2,
- SET_NODE_ENDPOINT,
- SET_NODE_ENDPOINT_2,
- CLEAR_METHODS_DATA,
-} from '../store/store';
-
-export default function Home() {
- const nodeEndpoint = NODE_ENDPOINT.use();
- const nodeEndpoint2 = NODE_ENDPOINT_2.use();
-
- // error state for input
- const [input1, setInput1] = useState(false);
- const [input2, setInput2] = useState(false);
-
- useEffect(() => {
- CLEAR_METHODS_DATA();
- }, []);
-
- let emptyInput = { border: '1px solid red' };
-
- return (
-
-
-
-
-
-
{
- if (nodeEndpoint.length === 0) {
- setInput1(true);
- }
- if (nodeEndpoint2.length === 0) {
- setInput2(true);
- }
- }}
- >
- Run test →
-
-
-
-
- );
-}
diff --git a/src/app/page.js b/src/app/page.js
index 3baa3e5..03ac5e8 100644
--- a/src/app/page.js
+++ b/src/app/page.js
@@ -1,256 +1,93 @@
'use client';
-import { useEffect } from 'react';
-import { Button, Badge, Tabs, Input } from '@lemonsqueezy/wedges';
-import Bento from '@/components/Bento/Bento';
-import FaqBasic from '@/components/Faq/FaqBasic';
-import Footer from '@/components/Footer/Footer';
import Header from '@/components/Header/Header';
-import ProtocolIcon from '@/components/ProtocolIcon/ProtocolIcon';
-import Link from 'next/link';
+import Footer from '@/components/Footer/Footer';
-import { ColumnsIcon, StopIcon } from '@iconicicons/react';
+const DASHBOARD_URL =
+ 'https://chainstack.grafana.net/public-dashboards/' +
+ '65c0fcb02f994faf845d4ec095771bd0' +
+ '?orgId=1&theme=dark&kiosk=1';
-import {
- NODE_ENDPOINT,
- NODE_ENDPOINT_2,
- SET_NODE_ENDPOINT,
- SET_NODE_ENDPOINT_2,
- CLEAR_METHODS_DATA,
- SUPPORTED_NETWORKS,
- COMPARE_MODE,
- SET_COMPARE_MODE,
-} from './store/store';
+const IFRAME_STYLE = {
+ width: '100%',
+ height: 'calc(100vh - 200px)',
+ minHeight: '800px',
+ border: 0,
+ borderRadius: '12px',
+ background: '#0b0f1f',
+};
export default function Home() {
- const nodeEndpoint = NODE_ENDPOINT.use();
- const nodeEndpoint2 = NODE_ENDPOINT_2.use();
- const supportedNetworks = SUPPORTED_NETWORKS.use();
- const compareMode = COMPARE_MODE.use();
-
-useEffect(() => {
- CLEAR_METHODS_DATA();
-
- // Inject GA4 script
- const script = document.createElement('script');
- script.src = 'https://www.googletagmanager.com/gtag/js?id=G-8R3NNPM8SV';
- script.async = true;
- document.head.appendChild(script);
-
- const inlineScript = document.createElement('script');
- inlineScript.innerHTML = `
- window.dataLayer = window.dataLayer || [];
- function gtag(){dataLayer.push(arguments);}
- gtag('js', new Date());
- gtag('config', 'G-8R3NNPM8SV');
- `;
- document.head.appendChild(inlineScript);
-
- return () => {
- // Cleanup if necessary
- document.head.removeChild(script);
- document.head.removeChild(inlineScript);
- };
-}, []);
-
return (
-
-
+ <>
+
+
+
-
- Test RPC endpoint
-
- performance
-
-
- Chainstack Compare runs profiles based on standard
-
- Ethereum RPC methods that fetch blockchain data.
-
-
-
- {/*
*/}
-
-
SET_COMPARE_MODE(value)}
- >
-
- }>
- Two endpoints comparison
-
- }>
- Single endpoint performance
-
-
-
- {/* // CONTENT 1 */}
-
-
-
- {
- SET_NODE_ENDPOINT(e.target.value);
- }}
- />
-
-
- Run test →
-
-
-
-
-
- {/* // CONTENT 2 */}
-
-
-
-
-
-
- Run test →
-
-
-
-
+
+
+ RPC node
+
+ performance dashboard
+
+
+ Real-time and historical performance analytics for RPC providers
+
+ across major chains and regions.
- {/*
*/}
-
-
- Supported networks
-
-
- {supportedNetworks.map((item, i) => (
- <>
- {item.networks.map((network, idx) => {
- return (
- }
- >
- {network}
-
- );
- })}
- >
- ))}
-
+ {/* Desktop / tablet: full-bleed iframe */}
+
+
-
-
-
- Chainstack Compare is tool to measure the node performance metrics
- that make sense.
-
-
-
- The tool runs server-side on an instance maintained by Chainstack.
-
-
-
Server-side instance specs:
-
2 vCPUs with 2GB of RAM
-
-
-
-
-
- The tool does a few calls to the exact same dummy contracts
- deployed on a few EVM networks. The tool measures the performance
- from three data points:
-
-
-
- the number of processed blocks with the calls;
- the time it takes to process the blocks with the calls;
-
- the resulting blocks-per-second metric, or the expected data
- throughput.
-
-
-
- As you can see, all the parameters are uniform except for the one
- you care about and feed to the tool — your node endpoint.
-
-
-
- Learn how Chainstack Compare works under the hood and why we
- built it ↗.
-
-
-
+ {/* Mobile (<768px): the Grafana dashboard is too dense to be usable;
+ show a styled CTA that opens it in a new tab instead. */}
+
+
+ Best viewed on desktop
+
+
+ The performance dashboard is information-dense and works best on
+ larger screens. Open it in a new tab for the full Grafana
+ experience.
+
+
+ Open dashboard in a new tab ↗
+
- {/* FORM */}
-
- {/* BENTO */}
-
-
-
- {/* FAQ */}
-
-
+
-
-
+
+
+
+
+ >
);
}
diff --git a/src/app/store/store.js b/src/app/store/store.js
index eea4d25..7404b94 100644
--- a/src/app/store/store.js
+++ b/src/app/store/store.js
@@ -1,175 +1,5 @@
'use client';
-// state management https://simpler-state.js.org/quick-start.html
-import { entity } from 'simpler-state';
-import { produce } from 'immer';
-
-export const NODE_ENDPOINT = entity('');
-
-export const SET_NODE_ENDPOINT = (value) => {
- NODE_ENDPOINT.set(value);
-};
-
-export const NODE_ENDPOINT_2 = entity('');
-
-export const SET_NODE_ENDPOINT_2 = (value) => {
- NODE_ENDPOINT_2.set(value);
-};
-
-// single or double
-export const COMPARE_MODE = entity('double');
-
-export const SET_COMPARE_MODE = (value) => {
- COMPARE_MODE.set(value);
-};
-
-export const METHODS = entity([
- {
- id: 0,
- order: 1,
- method_used: 'eth_getBlockByNumber',
- method_url: process.env.NEXT_PUBLIC_BACKEND_APP_URL + 'test-get-block',
- perform: true,
- isLoading: true,
- data: {},
- },
- {
- id: 1,
- order: 1,
- method_used: 'eth_call',
- method_url: process.env.NEXT_PUBLIC_BACKEND_APP_URL + 'test-eth-call',
- perform: true,
- isLoading: true,
- data: {},
- },
-]);
-
-export const METHODS_2 = entity([
- {
- id: 0,
- order: 2,
- method_used: 'eth_getBlockByNumber',
- method_url: process.env.NEXT_PUBLIC_BACKEND_APP_URL + 'test-get-block',
- perform: true,
- isLoading: true,
- data: {},
- },
- {
- id: 1,
- order: 2,
- method_used: 'eth_call',
- method_url: process.env.NEXT_PUBLIC_BACKEND_APP_URL + 'test-eth-call',
- perform: true,
- isLoading: true,
- data: {},
- },
-]);
-
-export const GET_METHODS_NAMES = entity(
- METHODS.get().map((item) => item.method_used)
-);
-
-export const SET_METHOD_RESPONSE_DATA = (id, payload) => {
- METHODS.set(
- produce((value) => {
- value[id].data = payload;
- // keep this code to test rate limits
- // let x = payload;
- // x.blocks_processed_successfully = 78;
- // value[id].data = x;
- })
- );
-};
-
-export const SET_METHOD_RESPONSE_DATA_2 = (id, payload) => {
- METHODS_2.set(
- produce((value) => {
- value[id].data = payload;
- // keep this code to test rate limits
- // let x = payload;
- // x.blocks_processed_successfully = 78;
- // value[id].data = x;
- })
- );
-};
-
-// export const SET_METHOD_IS_LOADING = (id, payload) => {
-// METHODS.set(
-// produce((value) => {
-// value[id].isLoading = payload;
-// })
-// );
-// };
-
-export const CLEAR_METHODS_DATA = () => {
- METHODS.get().forEach((item) => {
- METHODS.set(
- produce((value) => {
- value[item.id].data = {};
- value[item.id].isLoading = true;
- })
- );
- });
- METHODS_2.get().forEach((item) => {
- METHODS_2.set(
- produce((value) => {
- value[item.id].data = {};
- value[item.id].isLoading = true;
- })
- );
- });
-};
-
-export const SUPPORTED_NETWORKS = entity([
- {
- protocol: 'Ethereum',
- networks: ['Mainnet', 'Holešky Testnet', 'Sepolia Testnet'],
- },
- {
- protocol: 'Polygon',
- networks: ['Mainnet', 'Mumbai Testnet'],
- },
- {
- protocol: 'BNB Smart Chain',
- networks: ['Mainnet', 'Testnet'],
- },
- {
- protocol: 'Base',
- networks: ['Mainnet', 'Sepolia Testnet'],
- },
- {
- protocol: 'Avalanche',
- networks: ['Mainnet', 'Fuji Testnet'],
- },
- {
- protocol: 'Arbitrum',
- networks: ['Mainnet', 'Sepolia Testnet'],
- },
- {
- protocol: 'Optimism',
- networks: ['Mainnet', 'Sepolia Testnet'],
- },
- {
- protocol: 'Scroll',
- networks: ['Mainnet', 'Sepolia Testnet'],
- },
- {
- protocol: 'Ronin',
- networks: ['Saigon Testnet'],
- },
- {
- protocol: 'Gnosis Chain',
- networks: ['Mainnet', 'Chiado Testnet'],
- },
- {
- protocol: 'Cronos',
- networks: ['Mainnet', 'Testnet'],
- },
- {
- protocol: 'Fantom',
- networks: ['Mainnet', 'Testnet'],
- },
- {
- protocol: 'Harmony',
- networks: ['Mainnet', 'Testnet'],
- },
-]);
+// Store kept intentionally empty after the SEC-359 deprecation of the
+// in-app comparison flow. The landing page now embeds a Grafana dashboard
+// and no longer needs client-side state for endpoint inputs or method
+// results. Reintroduce entities here if a future feature needs them.
diff --git a/src/components/Bento/Bento.js b/src/components/Bento/Bento.js
deleted file mode 100644
index ce56864..0000000
--- a/src/components/Bento/Bento.js
+++ /dev/null
@@ -1,114 +0,0 @@
-import React from 'react';
-
-import GithubIcon from '@/components/Icons/GithubIcon';
-import BarChartIcon from '@/components/Icons/BarChartIcon';
-import Customization from '@/components/Icons/Customization';
-import Profiling from '@/components/Icons/Profiling';
-
-import Image from 'next/image';
-
-import { Badge } from '@lemonsqueezy/wedges';
-
-const Bento = () => {
- const bentoConfig = [
- {
- badge: {
- color: 'blue',
- stroke: false,
- text: 'Data',
- icon:
,
- },
- heading: 'Metrics that make sense',
- copy: 'No random latency numbers.\nChainstack Compare measures how your node performs based on real data-fetching.',
- image: {
- url: '/bento-[0].png',
- size: [360, 233],
- alt: '',
- style: 'mt-8 hidden lg:block absolute lg:-right-2 lg:-bottom-10',
- },
- },
- {
- badge: {
- color: 'green',
- stroke: false,
- text: 'Multiple modes',
- icon:
,
- },
- heading: 'Different testing methods',
- copy: 'Test a single endpoint or compare a few different ones. Do an eth_call, trace a transaction (upcoming), and more.',
- },
- {
- badge: {
- color: '',
- stroke: false,
- text: 'GitHub',
- icon:
,
- },
- heading: 'Open source',
- copy: 'We believe in giving back to the community. Our tool will be open source, accessible to all.',
- },
- {
- badge: {
- color: 'pink',
- stroke: false,
- text: 'Realistic scenarios',
- icon:
,
- },
- heading: "Different profiles",
- copy: 'Profiles based on the most common industry scenarios.',
- image: {
- url: '/bento-[3].png',
- size: [463, 242],
- alt: '',
- style: 'mt-8 hidden lg:block absolute -right-20 -bottom-14',
- },
- },
- ];
-
- return (
-
-
- Performance
-
-
- {bentoConfig.map((item, i) => (
-
-
- {item.badge.text}
-
-
{item.heading}
-
- {item.copy}
-
- {item.hasOwnProperty('image') && (
-
- )}
-
- ))}
-
-
- );
-};
-
-export default Bento;
diff --git a/src/components/Faq/FaqAccordion.js b/src/components/Faq/FaqAccordion.js
deleted file mode 100644
index 2c0c299..0000000
--- a/src/components/Faq/FaqAccordion.js
+++ /dev/null
@@ -1,70 +0,0 @@
-import React, { useState } from 'react';
-
-const FaqAccordion = () => {
- const [accordions, setAccordion] = useState([
- {
- key: 1,
- title: 'Q?',
- data: `ANSWER`,
- isOpen: false,
- },
- {
- key: 2,
- title: 'Questions?',
- data: `Free Tutorials, Millions of Articles, Live, Online and Classroom Courses.`,
- isOpen: false,
- },
- ]);
-
- const toggleAccordion = (accordionkey) => {
- const updatedAccordions = accordions.map((accord) => {
- if (accord.key === accordionkey) {
- return { ...accord, isOpen: !accord.isOpen };
- } else {
- return { ...accord, isOpen: false };
- }
- });
-
- setAccordion(updatedAccordions);
- };
-
- function Accordion(props) {
- return (
-
-
- {props.title}
-
- ↓
-
-
- {props.isOpen &&
{props.data}
}
-
- );
- }
-
- return (
-
-
FAQ
-
- {accordions.map((accordion) => (
-
toggleAccordion(accordion.key)}
- />
- ))}
-
-
- );
-};
-
-export default FaqAccordion;
diff --git a/src/components/Faq/FaqBasic.js b/src/components/Faq/FaqBasic.js
deleted file mode 100644
index 3076566..0000000
--- a/src/components/Faq/FaqBasic.js
+++ /dev/null
@@ -1,31 +0,0 @@
-import React from 'react';
-import { MDXProvider } from '@mdx-js/react';
-import Post from './post.mdx';
-
-const FaqBasic = () => {
- return (
-
-
- FAQ
-
-
-
- );
- },
- p(props) {
- return
;
- },
- }}
- >
-
-
-
-
- );
-};
-
-export default FaqBasic;
diff --git a/src/components/Faq/post.mdx b/src/components/Faq/post.mdx
deleted file mode 100644
index cdd7623..0000000
--- a/src/components/Faq/post.mdx
+++ /dev/null
@@ -1,11 +0,0 @@
-## What is your stack?
-
-We selected Python to leverage its concurrency capabilities, aiming to highlight how RPC nodes perform in fetching data efficiently while keeping a developer-friendly approach.
-
-## Which chains/protocols/networks are supported?
-
-Chainstack Compare is designed to test EVM-based RPC nodes. If you have a network that's not supported by the tool yet, let us know!
-
-## Which methods are used for measurements?
-
-Chainstack Compare runs profiles based on standard Ethereum RPC methods that fetch blockchain data. Currently, it tests RPC endpoints using `eth_getBlockByNumber` and `eth_call`. More methods coming up.
diff --git a/src/components/Header/Header.js b/src/components/Header/Header.js
index 128e3b2..9cd7447 100644
--- a/src/components/Header/Header.js
+++ b/src/components/Header/Header.js
@@ -3,7 +3,6 @@ import Logo from '@/components/Logo/Logo';
import { Button } from '@lemonsqueezy/wedges';
import GithubIcon from '@/components/Icons/GithubIcon';
import ChainstackIcon from '@/components/Icons/ChainstackIcon';
-import GrafanaIcon from '@/components/Icons/GrafanaIcon';
const Header = () => {
return (
@@ -25,11 +24,6 @@ const Header = () => {
*/}
-
- } className="mr-4">
- Dashboard
-
-
}>
Start for free
diff --git a/src/components/Icons/BarChartIcon.js b/src/components/Icons/BarChartIcon.js
deleted file mode 100644
index b14cce7..0000000
--- a/src/components/Icons/BarChartIcon.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import React from 'react';
-
-const BarChartIcon = (props) => {
- return (
-
-
-
- );
-};
-
-export default BarChartIcon;
diff --git a/src/components/Icons/Customization.js b/src/components/Icons/Customization.js
deleted file mode 100644
index 8d81a08..0000000
--- a/src/components/Icons/Customization.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import React from 'react';
-
-const Customization = (props) => {
- return (
-
-
-
- );
-};
-
-export default Customization;
diff --git a/src/components/Icons/ExplainResultsIcon.js b/src/components/Icons/ExplainResultsIcon.js
deleted file mode 100644
index d7c39e6..0000000
--- a/src/components/Icons/ExplainResultsIcon.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from 'react';
-
-const ExplainResultsIcon = () => {
- return (
-
-
-
- );
-};
-
-export default ExplainResultsIcon;
diff --git a/src/components/Icons/GrafanaIcon.js b/src/components/Icons/GrafanaIcon.js
deleted file mode 100644
index 8078166..0000000
--- a/src/components/Icons/GrafanaIcon.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from 'react';
-
-const GrafanaIcon = (props) => {
- return (
-
-
-
- );
-};
-
-export default GrafanaIcon;
\ No newline at end of file
diff --git a/src/components/Icons/Profiling.js b/src/components/Icons/Profiling.js
deleted file mode 100644
index 2084c5c..0000000
--- a/src/components/Icons/Profiling.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import React from 'react';
-
-const Profiling = (props) => {
- return (
-
-
-
- );
-};
-
-export default Profiling;
diff --git a/src/components/Performance/Compare.js b/src/components/Performance/Compare.js
deleted file mode 100644
index 048a623..0000000
--- a/src/components/Performance/Compare.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import React from 'react';
-
-const Compare = () => {
- return (
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default Compare;
diff --git a/src/components/Performance/Preformance.js b/src/components/Performance/Preformance.js
deleted file mode 100644
index 29f9d8f..0000000
--- a/src/components/Performance/Preformance.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import React from 'react';
-
-const Preformance = () => {
- return (
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default Preformance;
diff --git a/src/components/ProtocolIcon/ProtocolIcon.js b/src/components/ProtocolIcon/ProtocolIcon.js
deleted file mode 100644
index cbe9d17..0000000
--- a/src/components/ProtocolIcon/ProtocolIcon.js
+++ /dev/null
@@ -1,129 +0,0 @@
-import React from 'react';
-import Image from 'next/image';
-// import { ReactComponent as Aptos } from './aptos.svg';
-// import { ReactComponent as Arbitrum } from './arbitrum.svg';
-// import { ReactComponent as Aurora } from './aurora.svg';
-// import { ReactComponent as Avalanche } from './avalanche.svg';
-// import { ReactComponent as Base } from './base.svg';
-// import { ReactComponent as Bitcoin } from './bitcoin.svg';
-// import { ReactComponent as Bnb } from './bnb.svg';
-// import { ReactComponent as Cronos } from './cronos.svg';
-// import { ReactComponent as Ethereum } from './ethereum.svg';
-// import { ReactComponent as Fantom } from './fantom.svg';
-// import { ReactComponent as Filecoin } from './filecoin.svg';
-// import { ReactComponent as Fuse } from './fuse.svg';
-// import { ReactComponent as Gnosis } from './gnosis.svg';
-// import { ReactComponent as Harmony } from './harmony.svg';
-// import { ReactComponent as Near } from './near.svg';
-// import { ReactComponent as Optimism } from './optimism.svg';
-// import { ReactComponent as PolygonPOS } from './polygonPOS.svg';
-// import { ReactComponent as PolygonZkEvm } from './polygonZkEvm.svg';
-// import { ReactComponent as Ronin } from './ronin.svg';
-// import { ReactComponent as Scroll } from './scroll.svg';
-// import { ReactComponent as Solana } from './solana.svg';
-// import { ReactComponent as Starknet } from './starknet.svg';
-// import { ReactComponent as Tezos } from './tezos.svg';
-// import { ReactComponent as ZkSync } from './zkSync.svg';
-
-import Aptos from './aptos.svg';
-import Arbitrum from './arbitrum.svg';
-import Aurora from './aurora.svg';
-import Avalanche from './avalanche.svg';
-import Base from './base.svg';
-import Bitcoin from './bitcoin.svg';
-import Bnb from './bnb.svg';
-import Cronos from './cronos.svg';
-import Ethereum from './ethereum.svg';
-import Fantom from './fantom.svg';
-import Filecoin from './filecoin.svg';
-import Fuse from './fuse.svg';
-import Gnosis from './gnosis.svg';
-import Harmony from './harmony.svg';
-import Near from './near.svg';
-import Optimism from './optimism.svg';
-import PolygonPOS from './polygonPOS.svg';
-import PolygonZkEvm from './polygonZkEvm.svg';
-import Ronin from './ronin.svg';
-import Scroll from './scroll.svg';
-import Solana from './solana.svg';
-import Starknet from './starknet.svg';
-import Tezos from './tezos.svg';
-import ZkSync from './zkSync.svg';
-
-// const iconTypes = {
-// Aptos: ,
-// Arbitrum: ,
-// Aurora: ,
-// Avalanche: ,
-// Base: ,
-// Bitcoin: ,
-
-// 'BNB Chain': ,
-// 'BNB Smart Chain': ,
-
-// Cronos: ,
-// Ethereum: ,
-// Fantom: ,
-// Filecoin: ,
-// Fuse: ,
-
-// Gnosis: ,
-// 'Gnosis Chain': ,
-
-// Harmony: ,
-// Near: ,
-// Optimism: ,
-
-// Polygon: ,
-// 'Polygon POS': ,
-// 'Polygon zkEVM': ,
-
-// Ronin: ,
-// Scroll: ,
-// Solana: ,
-// Starknet: ,
-// Tezos: ,
-// zkSync: ,
-// };
-const iconTypes = {
- Aptos: Aptos,
- Arbitrum: Arbitrum,
- Aurora: Aurora,
- Avalanche: Avalanche,
- Base: Base,
- Bitcoin: Bitcoin,
-
- 'BNB Chain': Bnb,
- 'BNB Smart Chain': Bnb,
-
- Cronos: Cronos,
- Ethereum: Ethereum,
- Fantom: Fantom,
- Filecoin: Filecoin,
- Fuse: Fuse,
-
- Gnosis: Gnosis,
- 'Gnosis Chain': Gnosis,
-
- Harmony: Harmony,
- Near: Near,
- Optimism: Optimism,
-
- Polygon: PolygonPOS,
- 'Polygon POS': PolygonPOS,
- 'Polygon zkEVM': PolygonZkEvm,
-
- Ronin: Ronin,
- Scroll: Scroll,
- Solana: Solana,
- Starknet: Starknet,
- Tezos: Tezos,
- zkSync: ZkSync,
-};
-
-const ProtocolIcon = ({ protocolName }) => {
- // return iconTypes[protocolName];
- return ;
-};
-
-export default ProtocolIcon;
diff --git a/src/components/ProtocolIcon/aptos.svg b/src/components/ProtocolIcon/aptos.svg
deleted file mode 100644
index 5792e2b..0000000
--- a/src/components/ProtocolIcon/aptos.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/arbitrum.svg b/src/components/ProtocolIcon/arbitrum.svg
deleted file mode 100644
index d97dfba..0000000
--- a/src/components/ProtocolIcon/arbitrum.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/aurora.svg b/src/components/ProtocolIcon/aurora.svg
deleted file mode 100644
index 9d00bc6..0000000
--- a/src/components/ProtocolIcon/aurora.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/avalanche.svg b/src/components/ProtocolIcon/avalanche.svg
deleted file mode 100644
index 28acb21..0000000
--- a/src/components/ProtocolIcon/avalanche.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/base.svg b/src/components/ProtocolIcon/base.svg
deleted file mode 100644
index 4885897..0000000
--- a/src/components/ProtocolIcon/base.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/bitcoin.svg b/src/components/ProtocolIcon/bitcoin.svg
deleted file mode 100644
index 2a14e3d..0000000
--- a/src/components/ProtocolIcon/bitcoin.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/bnb.svg b/src/components/ProtocolIcon/bnb.svg
deleted file mode 100644
index 2eec090..0000000
--- a/src/components/ProtocolIcon/bnb.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/cronos.svg b/src/components/ProtocolIcon/cronos.svg
deleted file mode 100644
index 342386e..0000000
--- a/src/components/ProtocolIcon/cronos.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/ethereum.svg b/src/components/ProtocolIcon/ethereum.svg
deleted file mode 100644
index b4cb9cc..0000000
--- a/src/components/ProtocolIcon/ethereum.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/fantom.svg b/src/components/ProtocolIcon/fantom.svg
deleted file mode 100644
index 34b9052..0000000
--- a/src/components/ProtocolIcon/fantom.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/filecoin.svg b/src/components/ProtocolIcon/filecoin.svg
deleted file mode 100644
index a6224da..0000000
--- a/src/components/ProtocolIcon/filecoin.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/fuse.svg b/src/components/ProtocolIcon/fuse.svg
deleted file mode 100644
index 1a666df..0000000
--- a/src/components/ProtocolIcon/fuse.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/gnosis.svg b/src/components/ProtocolIcon/gnosis.svg
deleted file mode 100644
index f00a561..0000000
--- a/src/components/ProtocolIcon/gnosis.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/harmony.svg b/src/components/ProtocolIcon/harmony.svg
deleted file mode 100644
index ee92b9c..0000000
--- a/src/components/ProtocolIcon/harmony.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/near.svg b/src/components/ProtocolIcon/near.svg
deleted file mode 100644
index 7330ea0..0000000
--- a/src/components/ProtocolIcon/near.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/optimism.svg b/src/components/ProtocolIcon/optimism.svg
deleted file mode 100644
index 1771918..0000000
--- a/src/components/ProtocolIcon/optimism.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/polygonPOS.svg b/src/components/ProtocolIcon/polygonPOS.svg
deleted file mode 100644
index 55956ab..0000000
--- a/src/components/ProtocolIcon/polygonPOS.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/polygonZkEvm.svg b/src/components/ProtocolIcon/polygonZkEvm.svg
deleted file mode 100644
index 3ef2255..0000000
--- a/src/components/ProtocolIcon/polygonZkEvm.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/ronin.svg b/src/components/ProtocolIcon/ronin.svg
deleted file mode 100644
index a482c47..0000000
--- a/src/components/ProtocolIcon/ronin.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/scroll.svg b/src/components/ProtocolIcon/scroll.svg
deleted file mode 100644
index a84e97b..0000000
--- a/src/components/ProtocolIcon/scroll.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/solana.svg b/src/components/ProtocolIcon/solana.svg
deleted file mode 100644
index 79f3597..0000000
--- a/src/components/ProtocolIcon/solana.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/starknet.svg b/src/components/ProtocolIcon/starknet.svg
deleted file mode 100644
index c272a3a..0000000
--- a/src/components/ProtocolIcon/starknet.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/tezos.svg b/src/components/ProtocolIcon/tezos.svg
deleted file mode 100644
index 443e3e6..0000000
--- a/src/components/ProtocolIcon/tezos.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ProtocolIcon/zkSync.svg b/src/components/ProtocolIcon/zkSync.svg
deleted file mode 100644
index 6f2c434..0000000
--- a/src/components/ProtocolIcon/zkSync.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/ResultCard/ResultCard.js b/src/components/ResultCard/ResultCard.js
deleted file mode 100644
index b0e49f1..0000000
--- a/src/components/ResultCard/ResultCard.js
+++ /dev/null
@@ -1,161 +0,0 @@
-'use client';
-import React, { useEffect, useState } from 'react';
-import { CodeIcon } from '@iconicicons/react';
-import { Badge, Loading, Tooltip } from '@lemonsqueezy/wedges';
-
-import {
- SET_METHOD_RESPONSE_DATA,
- SET_METHOD_RESPONSE_DATA_2,
-} from '../../app/store/store';
-
-const ResultCard = ({ config, endpoint, setMethodResponseData }) => {
- const [cardData, setCardData] = useState(config);
-
- const [normalResult, setNormalResult] = useState(false);
- const [rateLimitResult, setRateLimitResult] = useState(false);
- const [fetchErrorResult, setFetchErrorResult] = useState(false);
-
- const fetchData = async () => {
- const response = await fetch(cardData.method_url, {
- body: JSON.stringify({ rpc_url: endpoint }),
- headers: {
- accept: 'application/json',
- 'Content-Type': 'application/json',
- },
-
- method: 'POST',
- });
- if (!response.ok) {
- throw new Error(
- 'Fetch failed. ' + response.status + ' ' + response.statusText
- );
- }
- const body = await response.json();
- return body;
- };
-
- useEffect(() => {
- if (endpoint === '' || config.data.length === 0) {
- window.location.replace('/');
- } else {
- Object.keys(cardData.data).length === 0 &&
- fetchData()
- .then((res) => {
- setCardData((prev) => {
- return {
- ...prev,
- isLoading: false,
- data: res,
- };
- });
- setMethodResponseData(cardData.id, res);
- })
- .catch((error) => {
- setCardData((prev) => {
- return {
- ...prev,
- isLoading: false,
- data: { error: error.message },
- };
- });
- setMethodResponseData(cardData.id, {
- error: error.message,
- });
- });
- }
- }, []);
-
- useEffect(() => {
- // no errors
- if (
- Object.keys(cardData.data).length != 0 &&
- cardData.data.hasOwnProperty('error') === false
- ) {
- setNormalResult(true);
- }
-
- // show rate limit warning
- if (
- cardData.data.target_blocks !==
- cardData.data.blocks_processed_successfully
- ) {
- setRateLimitResult(true);
- }
-
- // fetch error
- if (cardData.data.hasOwnProperty('error') === true) {
- setFetchErrorResult(cardData.data.error);
- }
- }, [cardData]);
-
- return (
-
-
- } color="blue" stroke>
- {cardData.method_used}
-
- {cardData.isLoading === true && }
-
-
- {normalResult && (
-
-
-
- {cardData.data.blocks_processed_successfully}/
- {cardData.data.target_blocks}
-
-
-
-
-
-
- {cardData.data.time_taken_in_seconds.toFixed(2)} s
-
-
Time taken
-
-
-
- {cardData.data.blocks_per_seconds.toFixed(2)}
-
-
Blocks per second
-
-
- )}
-
- {rateLimitResult && (
-
- Rate limit exceeded. Success rate{' '}
- {(
- (cardData.data.blocks_processed_successfully /
- cardData.data.target_blocks) *
- 100
- ).toFixed(2)}
- %.
-
- )}
-
- {fetchErrorResult !== false && (
-
- {fetchErrorResult}
-
- )}
-
- );
-};
-
-export default ResultCard;