From 705097599408a4370ff8a821972c1a60414b4211 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Wed, 17 Sep 2025 15:25:02 +0100 Subject: [PATCH 1/3] Refactor SuperchainContractTable: Introduce config URL generation, TOML parsing, and address extraction functions --- components/SuperchainContractTable.tsx | 72 ++++++++++++++++---------- 1 file changed, 46 insertions(+), 26 deletions(-) diff --git a/components/SuperchainContractTable.tsx b/components/SuperchainContractTable.tsx index e9ad34c32..d75509c66 100644 --- a/components/SuperchainContractTable.tsx +++ b/components/SuperchainContractTable.tsx @@ -1,9 +1,46 @@ import type { ReactElement } from 'react'; import { useEffect, useState } from 'react'; -import { AddressTable, TableAddresses } from '@/components/AddressTable'; -import toml from 'toml'; +import { AddressTable, type TableAddresses } from './AddressTable'; -const CONFIG_URL = 'https://raw.githubusercontent.com/ethereum-optimism/superchain-registry/main/superchain/configs/mainnet/superchain.toml'; +function getConfigUrl(chain: string): string { + const isTestnet = chain === '11155111'; + const network = isTestnet ? 'sepolia' : 'mainnet'; + return `https://raw.githubusercontent.com/ethereum-optimism/superchain-registry/main/superchain/configs/${network}/superchain.toml`; +} + +function parseSimpleToml(tomlText: string): Record { + const result: Record = {}; + const lines = tomlText.split('\n'); + + for (const line of lines) { + const trimmed = line.trim(); + if (trimmed && !trimmed.startsWith('#') && trimmed.includes('=')) { + const [key, value] = trimmed.split('=', 2); + const cleanKey = key.trim(); + const cleanValue = value.trim().replace(/['"]/g, ''); + + if (/^0x[a-fA-F0-9]{40}$/.test(cleanValue)) { + result[cleanKey] = cleanValue; + } + } + } + + return result; +} + +function extractAddresses(obj: Record): TableAddresses { + const addresses: TableAddresses = {}; + for (const [key, value] of Object.entries(obj)) { + if (typeof value === 'string' && /^0x[a-fA-F0-9]{40}$/.test(value)) { + let newKey = key; + if (key === 'protocol_versions_addr') newKey = 'ProtocolVersions'; + if (key === 'superchain_config_addr') newKey = 'SuperchainConfig'; + if (key === 'op_contracts_manager_proxy_addr') newKey = 'OPContractsManagerProxy'; + addresses[newKey] = value; + } + } + return addresses; +} export function SuperchainContractTable({ chain, @@ -19,12 +56,14 @@ export function SuperchainContractTable({ useEffect(() => { async function fetchAddresses() { try { - const response = await fetch(CONFIG_URL); + const configUrl = getConfigUrl(chain); + const response = await fetch(configUrl); if (!response.ok) { - throw new Error('Failed to fetch config'); + throw new Error(`Failed to fetch config from ${configUrl}`); } const text = await response.text(); - const data = toml.parse(text); + + const data = parseSimpleToml(text); setConfig(data); } catch (err) { setError(err.message); @@ -35,7 +74,7 @@ export function SuperchainContractTable({ } fetchAddresses(); - }, []); + }, [chain]); if (loading) { return
Loading...
; @@ -45,25 +84,6 @@ export function SuperchainContractTable({ return
Error: {error}
; } -// Helper function to recursively extract Ethereum addresses with renamed keys -function extractAddresses(obj: Record, prefix = ''): TableAddresses { - const addresses: TableAddresses = {}; - for (const [key, value] of Object.entries(obj)) { - if (typeof value === 'string' && /^0x[a-fA-F0-9]{40}$/.test(value)) { - // Rename specific keys - let newKey = `${prefix}${key}`; - if (key === 'protocol_versions_addr') newKey = 'ProtocolVersions'; - if (key === 'superchain_config_addr') newKey = 'SuperchainConfig'; - if (key === 'op_contracts_manager_proxy_addr') newKey = 'OPContractsManagerProxy'; - addresses[newKey] = value; - } else if (typeof value === 'object' && value !== null) { - Object.assign(addresses, extractAddresses(value, `${key}.`)); // Recurse into nested objects - } - } - return addresses; -} - - const addresses = extractAddresses(config || {}); return ( From 10ff97226f2ef7f3de8a0e5e6dd5e665e8fed470 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Wed, 17 Sep 2025 15:25:25 +0100 Subject: [PATCH 2/3] Auto-fix: Update breadcrumbs, spelling dictionary and other automated fixes --- words.txt | 260 ++++++++++++++++++++++++------------------------------ 1 file changed, 113 insertions(+), 147 deletions(-) diff --git a/words.txt b/words.txt index 55af6d53a..830fb3158 100644 --- a/words.txt +++ b/words.txt @@ -1,66 +1,60 @@ -accountqueue ACCOUNTQUEUE -accountslots +accountqueue ACCOUNTSLOTS +accountslots ACDC ADDI ADDIU ADDU airgap Allnodes -allocs -alphanet Alphanet -alphanets +alphanet Alphanets +alphanets altda ANDI -Ankr Apeworx Arweave authrpc -autorelay Autorelay +autorelay autorelayer basefee bcde -betanet Betanet -betanets +betanet Betanets +betanets BGEZ BGTZ Biconomy BLEZ -blobpool BLOBPOOL +blobpool blobspace Blockdaemon blockhash blocklists -blocklogs BLOCKLOGS -blockprofilerate +blocklogs BLOCKPROFILERATE +blockprofilerate Blockscout -blockspace Blockspace +blockspace blocktime -blocktimes Blocktimes -bloomfilter +blocktimes BLOOMFILTER +bloomfilter BLTZ Bootcamp bootnode -bootnodes -Bootnodes BOOTNODES +Bootnodes +bootnodes bottlenecked -brotli -Brotli -callouts -Callouts CCIP cdef Celestia @@ -72,72 +66,66 @@ Chainstack chaosnet Chugsplash Clabby -codebases -collateralized Collateralized +collateralized compr Comprensive -computependingblock COMPUTEPENDINGBLOCK +computependingblock confs corsdomain counterfactually -crosschain Crosschain +crosschain Crossmint daserver -datacap DATACAP -datadir -DATADIR +datacap Defi Defillama's delegatecall -devnet Devnet -devnets +devnet Devnets -devs +devnets direnv -disabletxpoolgossip DISABLETXPOOLGOSSIP -discv +disabletxpoolgossip Discv +discv DIVU Drand dripcheck Drippie Eigen -EIPs -enabledeprecatedpersonal ENABLEDEPRECATEDPERSONAL +enabledeprecatedpersonal enginekind -erigon Erigon -etherbase +erigon ETHERBASE +etherbase Ethernity Ethernow -ethstats ETHSTATS -evmtimeout +ethstats EVMTIMEOUT +evmtimeout executability -exfiltrate -exitwhensynced EXITWHENSYNCED +exitwhensynced extensibly -extradata EXTRADATA +extradata Farcaster Faultproof -fdlimit FDLIMIT +fdlimit flashblock flashblock's -flashblocks -Flashblocks FLASHBLOCKS +Flashblocks +flashblocks Flashbots forkable forkchoice @@ -145,51 +133,50 @@ FPVM FPVMs Fraxtal Funct -gascap GASCAP +gascap gaslessly -gcmode GCMODE +gcmode Gelato gifs -globalqueue GLOBALQUEUE -globalslots +globalqueue GLOBALSLOTS +globalslots gokzg growthepie hardfork hardforks -healthcheck HEALTHCHECK +healthcheck healthchecks -historicalrpc HISTORICALRPC -historicalrpctimeout +historicalrpc HISTORICALRPCTIMEOUT -holesky -Holesky +historicalrpctimeout HOLESKY +Holesky +holesky IERC -ignoreprice IGNOREPRICE -Immunefi -inator +ignoreprice Inator -influxdbv +inator INFLUXDBV +influxdbv initcode -ipcdisable IPCDISABLE +ipcdisable ipcfile -ipcpath IPCPATH +ipcpath IPFS JALR -journalremotes JOURNALREMOTES -jspath +journalremotes JSPATH +jspath jwtsecret Keccak leveldb @@ -198,34 +185,33 @@ Lisk logfile logfmt Mainnets -maxage MAXAGE -maxbackups +maxage MAXBACKUPS -maxpeers +maxbackups MAXPEERS -maxpendpeers +maxpeers MAXPENDPEERS -maxprice +maxpendpeers MAXPRICE -memprofilerate +maxprice MEMPROFILERATE -merkle +memprofilerate Merkle +merkle MFHI MFLO Mgas Minato -minfreedisk MINFREEDISK -minsuggestedpriorityfee +minfreedisk MINSUGGESTEDPRIORITYFEE +minsuggestedpriorityfee Mintable Mintplex MIPSEVM -Mitigations -monitorism Monitorism +monitorism Moralis Mordor MOVN @@ -234,156 +220,141 @@ MTHI MTLO MULT multiaddr -multichain Multichain +multichain multiclient multisigs MULTU Nethermind -netrestrict NETRESTRICT -networkid +netrestrict NETWORKID -newpayload +networkid NEWPAYLOAD -nextra -nocompaction +newpayload NOCOMPACTION -nodekey +nocompaction NODEKEY -nodekeyhex +nodekey NODEKEYHEX +nodekeyhex nodename Nodies -nodiscover NODISCOVER -nolocals +nodiscover NOLOCALS -noprefetch +nolocals NOPREFETCH -nopruning +noprefetch NOPRUNING -nosyncserve +nopruning NOSYNCSERVE +nosyncserve Numba NVME -offchain Offchain +offchain onlyreqtostatic opchaina opchainb -opcm OPCM +opcm Openfort oplabs opnode's -outfile outperformance pcscdpath -pectra Pectra +pectra Pectra's -peerstore Peerstore +peerstore peerstores -permissioned Permissioned +permissioned permissioning -permissionless Permissionless +permissionless permissionlessly Perps Peta Pimlico POAP POAPs -pprof PPROF -precommitments +pprof Precommitments +precommitments preconfigured predeploy -predeployed Predeployed -predeploys +predeployed Predeploys +predeploys prefunded -preimage Preimage -preimages +preimage PREIMAGES -preinstall -preinstalls +preimages Preinstalls -prestate +preinstalls Prestate +prestate prestates PREVRANDAO -pricebump PRICEBUMP -pricelimit +pricebump PRICELIMIT +pricelimit productionize productionized Protip -proxied -Proxied -proxyd Proxyd -Pyth -Pyth's +proxyd QRNG -quicknode Quicknode +quicknode quickstarts -rebalancing reemit Reemitting -regenesis Regenesis -Reimagine -rejournal +regenesis REJOURNAL -remotedb +rejournal REMOTEDB +remotedb Reown Reown's replayability replayor reposts reproven -requiredblocks REQUIREDBLOCKS +requiredblocks rollouts -rollups Rollups +rollups Routescan rpckind -rpcprefix RPCPREFIX -rpcs +rpcprefix RPGF -runbooks Runbooks -RWAs +runbooks safedb Schnorr -sepolia -Sepolia -SEPOLIA seqnr -sequencerhttp SEQUENCERHTTP +sequencerhttp serv -signup SLLV SLTI SLTIU SLTU smartcard snapshotlog -snapsync Snapsync +snapsync solady Solana Soneium @@ -391,37 +362,34 @@ soyboy Spearbit SRAV SRLV -stablecoins Stablecoins +stablecoins statefulset -structs subcomponents subgame subheaders subsecond SUBU Sunnyside -superchain -Superchain SUPERCHAIN -superchainerc +Superchain +superchain Superchain's +superchainerc Superlend Superloans Superscan Superseed -supersim Supersim -syncmode +supersim SYNCMODE -synctarget +syncmode SYNCTARGET +synctarget syscalls SYSCON thirdweb threadcreate -timeseries -topline triggerable trustlessly trustrpc @@ -429,32 +397,30 @@ Twei txfeecap txmgr txns -txpool TXPOOL +txpool txproxy txproxyd uncensorable uncountered undercollateralize Unichain -Unprotect unsubmitted UPNP -verkle VERKLE -vhosts +verkle VHOSTS -viem +vhosts Viem -viem's +viem Viem's -vmdebug +viem's VMDEBUG -vmodule +vmdebug VMODULE +vmodule xlarge XORI -ZKPs ZKVM -zora Zora +zora From 38f99bc7bf1cb812261fe5d998de409bfb6e10a3 Mon Sep 17 00:00:00 2001 From: krofax Date: Wed, 17 Sep 2025 15:35:06 +0100 Subject: [PATCH 3/3] update words --- words.txt | 258 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 146 insertions(+), 112 deletions(-) diff --git a/words.txt b/words.txt index 830fb3158..78a281d30 100644 --- a/words.txt +++ b/words.txt @@ -1,60 +1,66 @@ -ACCOUNTQUEUE accountqueue -ACCOUNTSLOTS +ACCOUNTQUEUE accountslots +ACCOUNTSLOTS ACDC ADDI ADDIU ADDU airgap Allnodes -Alphanet +allocs alphanet -Alphanets +Alphanet alphanets +Alphanets altda ANDI +Ankr Apeworx Arweave authrpc -Autorelay autorelay +Autorelay autorelayer basefee bcde -Betanet betanet -Betanets +Betanet betanets +Betanets BGEZ BGTZ Biconomy BLEZ -BLOBPOOL blobpool +BLOBPOOL blobspace Blockdaemon blockhash blocklists -BLOCKLOGS blocklogs -BLOCKPROFILERATE +BLOCKLOGS blockprofilerate +BLOCKPROFILERATE Blockscout -Blockspace blockspace +Blockspace blocktime -Blocktimes blocktimes -BLOOMFILTER +Blocktimes bloomfilter +BLOOMFILTER BLTZ Bootcamp bootnode -BOOTNODES -Bootnodes bootnodes +Bootnodes +BOOTNODES bottlenecked +brotli +Brotli +callouts +Callouts CCIP cdef Celestia @@ -66,66 +72,72 @@ Chainstack chaosnet Chugsplash Clabby -Collateralized +codebases collateralized +Collateralized compr Comprensive -COMPUTEPENDINGBLOCK computependingblock +COMPUTEPENDINGBLOCK confs corsdomain counterfactually -Crosschain crosschain +Crosschain Crossmint daserver -DATACAP datacap +DATACAP +datadir +DATADIR Defi Defillama's delegatecall -Devnet devnet -Devnets +Devnet devnets +Devnets +devs direnv -DISABLETXPOOLGOSSIP disabletxpoolgossip -Discv +DISABLETXPOOLGOSSIP discv +Discv DIVU Drand dripcheck Drippie Eigen -ENABLEDEPRECATEDPERSONAL +EIPs enabledeprecatedpersonal +ENABLEDEPRECATEDPERSONAL enginekind -Erigon erigon -ETHERBASE +Erigon etherbase +ETHERBASE Ethernity Ethernow -ETHSTATS ethstats -EVMTIMEOUT +ETHSTATS evmtimeout +EVMTIMEOUT executability -EXITWHENSYNCED +exfiltrate exitwhensynced +EXITWHENSYNCED extensibly -EXTRADATA extradata +EXTRADATA Farcaster Faultproof -FDLIMIT fdlimit +FDLIMIT flashblock flashblock's -FLASHBLOCKS -Flashblocks flashblocks +Flashblocks +FLASHBLOCKS Flashbots forkable forkchoice @@ -133,50 +145,51 @@ FPVM FPVMs Fraxtal Funct -GASCAP gascap +GASCAP gaslessly -GCMODE gcmode +GCMODE Gelato gifs -GLOBALQUEUE globalqueue -GLOBALSLOTS +GLOBALQUEUE globalslots +GLOBALSLOTS gokzg growthepie hardfork hardforks -HEALTHCHECK healthcheck +HEALTHCHECK healthchecks -HISTORICALRPC historicalrpc -HISTORICALRPCTIMEOUT +HISTORICALRPC historicalrpctimeout -HOLESKY -Holesky +HISTORICALRPCTIMEOUT holesky +Holesky +HOLESKY IERC -IGNOREPRICE ignoreprice -Inator +IGNOREPRICE +Immunefi inator -INFLUXDBV +Inator influxdbv +INFLUXDBV initcode -IPCDISABLE ipcdisable +IPCDISABLE ipcfile -IPCPATH ipcpath +IPCPATH IPFS JALR -JOURNALREMOTES journalremotes -JSPATH +JOURNALREMOTES jspath +JSPATH jwtsecret Keccak leveldb @@ -185,33 +198,34 @@ Lisk logfile logfmt Mainnets -MAXAGE maxage -MAXBACKUPS +MAXAGE maxbackups -MAXPEERS +MAXBACKUPS maxpeers -MAXPENDPEERS +MAXPEERS maxpendpeers -MAXPRICE +MAXPENDPEERS maxprice -MEMPROFILERATE +MAXPRICE memprofilerate -Merkle +MEMPROFILERATE merkle +Merkle MFHI MFLO Mgas Minato -MINFREEDISK minfreedisk -MINSUGGESTEDPRIORITYFEE +MINFREEDISK minsuggestedpriorityfee +MINSUGGESTEDPRIORITYFEE Mintable Mintplex MIPSEVM -Monitorism +Mitigations monitorism +Monitorism Moralis Mordor MOVN @@ -220,141 +234,156 @@ MTHI MTLO MULT multiaddr -Multichain multichain +Multichain multiclient multisigs MULTU Nethermind -NETRESTRICT netrestrict -NETWORKID +NETRESTRICT networkid -NEWPAYLOAD +NETWORKID newpayload -NOCOMPACTION +NEWPAYLOAD +nextra nocompaction -NODEKEY +NOCOMPACTION nodekey -NODEKEYHEX +NODEKEY nodekeyhex +NODEKEYHEX nodename Nodies -NODISCOVER nodiscover -NOLOCALS +NODISCOVER nolocals -NOPREFETCH +NOLOCALS noprefetch -NOPRUNING +NOPREFETCH nopruning -NOSYNCSERVE +NOPRUNING nosyncserve +NOSYNCSERVE Numba NVME -Offchain offchain +Offchain onlyreqtostatic opchaina opchainb -OPCM opcm +OPCM Openfort oplabs opnode's +outfile outperformance pcscdpath -Pectra pectra +Pectra Pectra's -Peerstore peerstore +Peerstore peerstores -Permissioned permissioned +Permissioned permissioning -Permissionless permissionless +Permissionless permissionlessly Perps Peta Pimlico POAP POAPs -PPROF pprof -Precommitments +PPROF precommitments +Precommitments preconfigured predeploy -Predeployed predeployed -Predeploys +Predeployed predeploys +Predeploys prefunded -Preimage preimage -PREIMAGES +Preimage preimages -Preinstalls +PREIMAGES +preinstall preinstalls -Prestate +Preinstalls prestate +Prestate prestates PREVRANDAO -PRICEBUMP pricebump -PRICELIMIT +PRICEBUMP pricelimit +PRICELIMIT productionize productionized Protip -Proxyd +proxied +Proxied proxyd +Proxyd +Pyth +Pyth's QRNG -Quicknode quicknode +Quicknode quickstarts +rebalancing reemit Reemitting -Regenesis regenesis -REJOURNAL +Regenesis +Reimagine rejournal -REMOTEDB +REJOURNAL remotedb +REMOTEDB Reown Reown's replayability replayor reposts reproven -REQUIREDBLOCKS requiredblocks +REQUIREDBLOCKS rollouts -Rollups rollups +Rollups Routescan rpckind -RPCPREFIX rpcprefix +RPCPREFIX +rpcs RPGF -Runbooks runbooks +Runbooks +RWAs safedb Schnorr +sepolia +Sepolia +SEPOLIA seqnr -SEQUENCERHTTP sequencerhttp +SEQUENCERHTTP serv +signup SLLV SLTI SLTIU SLTU smartcard snapshotlog -Snapsync snapsync +Snapsync solady Solana Soneium @@ -362,34 +391,37 @@ soyboy Spearbit SRAV SRLV -Stablecoins stablecoins +Stablecoins statefulset +structs subcomponents subgame subheaders subsecond SUBU Sunnyside -SUPERCHAIN -Superchain superchain +Superchain +SUPERCHAIN Superchain's superchainerc Superlend Superloans Superscan Superseed -Supersim supersim -SYNCMODE +Supersim syncmode -SYNCTARGET +SYNCMODE synctarget +SYNCTARGET syscalls SYSCON thirdweb threadcreate +timeseries +topline triggerable trustlessly trustrpc @@ -397,30 +429,32 @@ Twei txfeecap txmgr txns -TXPOOL txpool +TXPOOL txproxy txproxyd uncensorable uncountered undercollateralize Unichain +Unprotect unsubmitted UPNP -VERKLE verkle -VHOSTS +VERKLE vhosts -Viem +VHOSTS viem -Viem's +Viem viem's -VMDEBUG +Viem's vmdebug -VMODULE +VMDEBUG vmodule +VMODULE xlarge XORI +ZKPs ZKVM -Zora zora +Zora