Files
tom goriunovandGitHub 3d98f2d702 MegaETH: mini-blocks page (#3024)
* MegaETH: uptime dashboard

Fixes #2906

* basic implementation of mini-blocks

* update socket url and time format

* update mega eth preset

* customize flashblocks name

* clean up

* update color theme variable for mega eth

* [skip ci] don't show alert "scanning new mini-blocks"
2025-10-08 09:35:35 +02:00

38 lines
816 B
TypeScript

import type { Feature } from './types';
import { getEnvValue } from '../utils';
import megaEthFeature from './megaEth';
const title = 'Flashblocks';
const socketUrl = getEnvValue('NEXT_PUBLIC_FLASHBLOCKS_SOCKET_URL');
const config: Feature<{ socketUrl: string; type: 'optimism' | 'megaEth'; name: string }> = (() => {
if (megaEthFeature.isEnabled && megaEthFeature.socketUrl.rpc) {
return Object.freeze({
title,
isEnabled: true,
socketUrl: megaEthFeature.socketUrl.rpc,
type: 'megaEth',
name: 'mini-block',
});
}
if (socketUrl) {
return Object.freeze({
title,
isEnabled: true,
socketUrl,
type: 'optimism',
name: 'flashblock',
});
}
return Object.freeze({
title,
isEnabled: false,
});
})();
export default config;