Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Good project #3

Open
wants to merge 1,040 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
1040 commits
Select commit Hold shift + click to select a range
16456bf
add etn
realdealshaman Sep 13, 2024
3d77095
added French internationalization key (#1271)
StarryHazex Sep 16, 2024
67b2071
improve Chinese translation (#1270)
BlueMistee Sep 16, 2024
a669d5e
Remove Invalid Blast Chain (#1269)
lenoteddy Sep 16, 2024
1d607f9
Add: itrocket story RPC (#1276)
itrocket-team Sep 17, 2024
e453638
Update extraRpcs.js (#1278)
hubofvalley Sep 18, 2024
baf1c07
add aldebaranode story testnet rpc (#1277)
mrheed Sep 18, 2024
42b3463
Add THAT Mainnet (#1280)
baileynahi Sep 20, 2024
b093683
Remove ws endpoint (#1281)
RogerLamTd Sep 20, 2024
163e7c8
Add Tenderly Node RPCs (#1283)
dzimiks Sep 20, 2024
d74ed86
Update extraRpcs.js (#1282)
mrspir Sep 21, 2024
20e0606
add default rpc
realdealshaman Sep 21, 2024
6b4b688
correct my story rpc ednpoint (#1284)
hubofvalley Sep 21, 2024
fd6f1d8
add Grand Valley 0G evm-rpc (#1286)
hubofvalley Sep 22, 2024
00de042
this rpc returns incorrect timestamps for eg block height 6745450
waynebruce0x Sep 23, 2024
0c77d48
Merge pull request #1288 from DefiLlama/faultyrpc
0xngmi Sep 23, 2024
abca630
add Citrea testnet RPC (#1287)
eyusufatik Sep 23, 2024
379985d
Update extraRpcs.js (#1291)
JoGetBlock Sep 25, 2024
1c92a5d
Update extraRpcs.js (#1290)
Josephtran102 Sep 25, 2024
2c74c49
Introduce callStatic mainnet RPCs (#1294)
Callstatic-Admin Sep 25, 2024
31eb7f6
incorrect block heights
waynebruce0x Sep 27, 2024
dd6454d
more bad rpcs
waynebruce0x Sep 27, 2024
1fcd082
another faulty block height
waynebruce0x Sep 27, 2024
3895c51
check rpc list order
realdealshaman Sep 27, 2024
6b8c295
remove katla
realdealshaman Sep 30, 2024
299412c
Add Lisk Chain ID (#1299)
stellardynamic Sep 30, 2024
300d0f9
Update extraRpcs.js (#1297)
Josephtran102 Sep 30, 2024
ce019b6
add Coha05 rpc (#1295)
Coha05 Sep 30, 2024
d7b8aec
add superposition chain
realdealshaman Sep 30, 2024
638ce47
add iotaevm
realdealshaman Sep 30, 2024
e7bda52
update iota testnet rpcs
realdealshaman Sep 30, 2024
e793602
fix syntax
realdealshaman Sep 30, 2024
eeb76ac
Update callStatic privacy statement (#1304)
Callstatic-Admin Oct 1, 2024
2b89789
add network
realdealshaman Oct 1, 2024
8498b0a
Add Roostock BlastAPI endpoint (#1302)
DefiDebauchery Oct 1, 2024
292f106
fix syntax from new entry
realdealshaman Oct 1, 2024
ad09aea
add chain
realdealshaman Oct 4, 2024
08bc982
add matchain (#1306)
alekswoje Oct 4, 2024
e483c4e
Update extraRpcs.js (#1305)
JoGetBlock Oct 4, 2024
3057ed2
add chain
realdealshaman Oct 5, 2024
6b66f70
Bc Hyper chain rpc added and it's privacy policy declaration (#1307)
akashhalder3 Oct 8, 2024
94fdb03
add Glide Protocol (#1308)
icaksh Oct 8, 2024
1bdf65c
Updated Kaia RPC endpoints (#1311)
praveen-kaia Oct 8, 2024
a7d3dd3
feat: added stakely json-rpc for taiko and fantom (#1312)
trikunai Oct 8, 2024
c2cc3eb
update rsk entry
realdealshaman Oct 9, 2024
73ad8f4
Updated Kaia chain extraRpcs (#1324)
praveen-kaia Oct 14, 2024
b429da4
Update extraRpcs.js (#1323)
Orlanduis Oct 14, 2024
b1ae1c8
add buildbear privacystatement
realdealshaman Oct 14, 2024
d16ad1b
Update extraRpcs.js (#1322)
Orlanduis Oct 14, 2024
257764c
fix the buildbear entry
realdealshaman Oct 14, 2024
6570328
Add CheeseChain RPCs (#1321)
bivsk Oct 14, 2024
238aa31
add default rpc
realdealshaman Oct 14, 2024
69d4538
Added dRPC new endpoints (#1320)
maradeeym Oct 14, 2024
6cb7e3b
update zan rpc url (#1317)
dongjl123 Oct 14, 2024
33ea1f5
Delete OnFinality RPC endpoint for Harmony (#1326)
FiveKG Oct 15, 2024
dd7320e
Update extraRpcs.js (#1328)
BlockRazorinc Oct 16, 2024
79ec28f
fix syntax
realdealshaman Oct 18, 2024
5f3f30a
fix url
realdealshaman Oct 18, 2024
d791137
add aiachain and RPCs (#1330)
moumc Oct 20, 2024
3dc4473
update 48Club rpc url (#1331)
du5 Oct 20, 2024
3f2c212
Fix typo - missed comma before BlockRazor block (#1332)
a10zn8 Oct 20, 2024
23ab5c7
Update extraRpcs.js (#1333)
0xx92 Oct 20, 2024
a90f3c0
Add apechain details (#1335)
409H Oct 22, 2024
66926c3
update name to match icon
realdealshaman Oct 22, 2024
3291ea6
Update extraRpcs.js (#1336)
s3unghyeon Oct 22, 2024
90d5bdf
Added Zeniq Smart Chain (#1337)
nomo-app Oct 22, 2024
0cb2cae
add apechain
realdealshaman Oct 22, 2024
a3efd48
add wc
realdealshaman Oct 23, 2024
d690f7e
add apechain
realdealshaman Oct 23, 2024
8b0b9c6
remove duplicate entry
realdealshaman Oct 23, 2024
b8c8088
Add DreyerX chain (#1338)
billalxcode Oct 23, 2024
99e56b2
build
realdealshaman Oct 23, 2024
45a2fa4
fix chiado list
realdealshaman Oct 23, 2024
5aab159
Add latest Omnia RPCs. (#1340)
dumitrucatalin Oct 28, 2024
7d1942f
Update extraRpcs.js (#1342)
maradeeym Oct 28, 2024
7995560
fix rpc for matchain (#1343)
alekswoje Oct 28, 2024
dc54a4c
add Grand Valley Story Protocol Odyssey testnet rpc (#1344)
hubofvalley Oct 30, 2024
065f260
add spidernode rpc to story odyssey
realdealshaman Oct 30, 2024
ed0cc13
add mandragora story odyssey rpc
realdealshaman Oct 30, 2024
84bcdc3
add story odyssey rpc
realdealshaman Oct 30, 2024
725b6ae
Fix ApeChain
MYKatz Oct 30, 2024
2830121
Merge pull request #1349 from ConstellationCrypto/fix-apechain
0xngmi Oct 30, 2024
5908833
Update extraRpcs.js (#1350)
ValidatorVN Oct 31, 2024
4875441
Add: ITRocket Story RPC (#1352)
itrocket-team Oct 31, 2024
6998226
update aldebaranode rpc
realdealshaman Oct 31, 2024
3fd5bd2
Update extraRpcs.js (#1355)
0xx92 Oct 31, 2024
6f561cc
Update extraRpcs.js (#1356)
botxx15 Oct 31, 2024
4abcb0c
Add Morph mainnet (#1357)
zem007 Oct 31, 2024
a6f5d37
Update extraRpcs.js - adding Sophon networks (#1359)
githubdoramon Oct 31, 2024
2e37363
Add ink sepolia (#1365)
CruzMolina Nov 2, 2024
226673e
added BlockHub's Story Protocol RPC (#1360)
botxx15 Nov 2, 2024
0bbfe01
Update Oasis chains (#1361)
aefhm Nov 2, 2024
80ccff3
Updated extraRpcs.js (#1364)
karloinv Nov 2, 2024
93ad78a
fix oasis after updating routes
realdealshaman Nov 2, 2024
5f25332
chain icon
realdealshaman Nov 2, 2024
04d8159
add sapphire icon
realdealshaman Nov 3, 2024
3337181
revert change
realdealshaman Nov 3, 2024
0c552da
add icon
realdealshaman Nov 4, 2024
f4de303
fix chain
realdealshaman Nov 4, 2024
4d8835f
feat: click and copy rpc (+ minor bug fix) (#1375)
melvinmcrn Nov 5, 2024
230e1e8
Update extraRpcs.js (#1374)
maradeeym Nov 5, 2024
8dead81
include default rpc
realdealshaman Nov 5, 2024
15ac8f0
Update extraRpcs.js (#1376)
karloinv Nov 5, 2024
0668669
Update extraRpcs.js (#1377)
karloinv Nov 5, 2024
6eab43a
Update extraRpcs.js (#1378)
karloinv Nov 6, 2024
66cd1f8
Update extraRpcs.js (#1380)
111STAVR111 Nov 6, 2024
3551a92
update privacy policy for bctech
realdealshaman Nov 6, 2024
f64237c
Adding Story RPC from Rawaki (#1383)
rawakinode Nov 8, 2024
e7c619a
remove assert
0xngmi Nov 11, 2024
2596e44
post-export fixes
0xngmi Nov 11, 2024
683e93e
fix imports
0xngmi Nov 11, 2024
04b593a
Add dexrouting Canto RPC (#1384)
0xQuarkus Nov 11, 2024
6073526
Lava (#1366)
LudiSistemas Nov 12, 2024
266e0e4
remove extra key
realdealshaman Nov 12, 2024
3408d8d
[ADD]: add redbelly mainnet rpc (#1390)
callylab520 Nov 15, 2024
3a309fb
add rbn
realdealshaman Nov 18, 2024
219487a
Update extraRpcs.js with Vanar RPCs (#1393)
Qasim-Khan-Bim Nov 22, 2024
bfd9415
add two iotex rpc (#1387)
chaishiqi Nov 22, 2024
839d09e
remove zeeve etherlink rpc
realdealshaman Nov 22, 2024
96b499e
Update extraRpcs.js (#1400)
jbuice Nov 26, 2024
fc40e51
Update extraRpcs.js (#1401)
0xAshcry Nov 26, 2024
9f34910
feat: added corn maizenet and testnet (#1403)
sajanrajdev Nov 28, 2024
9580626
Histori MultiNode RPC urls (#1399)
mikirov Nov 28, 2024
b58a4e0
Update extraRpcs.js (#1410)
YaStaer Dec 2, 2024
c75bbe5
Added my own RPC node to the list. (#1405)
musdasch Dec 2, 2024
3f308d7
added numa rpc (#1402)
shubham-rathod1 Dec 2, 2024
0bb68c1
add default rpcs
realdealshaman Dec 2, 2024
1f27b46
format
realdealshaman Dec 2, 2024
050e1ae
fix syntax
realdealshaman Dec 2, 2024
3c2bfca
remove 2020
realdealshaman Dec 2, 2024
867f631
Fix Oasis Sapphire shortname in mapping of chainIds
aefhm Dec 4, 2024
3b2c04f
Merge pull request #1416 from aefhm/main
0xngmi Dec 5, 2024
7b493d3
Update extraRpcs.js (#1417)
karloinv Dec 5, 2024
1d1dc1d
Revert "Update extraRpcs.js (#1417)" (#1419)
realdealshaman Dec 5, 2024
c8b0712
re-add removed rpc
realdealshaman Dec 5, 2024
565174c
update rpc list
mintdart Dec 9, 2024
4039acf
cleanup
mintdart Dec 9, 2024
09b3f4c
Revert "update rpc list"
mintdart Dec 9, 2024
9a699f6
fix
mintdart Dec 9, 2024
cd7b2bb
Update extraRpcs.js (#1423)
0xx92 Dec 10, 2024
8d182bb
Update extraRpcs.js (#1421)
karloinv Dec 10, 2024
89c99e8
add sepolia rpc
realdealshaman Dec 10, 2024
8b60ee6
remove incorrectly placed rpc
realdealshaman Dec 10, 2024
52dfb14
Update extraRpcs.js (#1412)
0xx92 Dec 10, 2024
82454b2
Update extraRpcs.js (#1424)
maradeeym Dec 10, 2024
2297cd1
add MemeCore formicarium rpc (#1422)
tech-memecore Dec 10, 2024
205373a
feat: added rpcs and chain id
sajanrajdev Dec 12, 2024
5ce4172
Merge pull request #1429 from sajanrajdev/main
0xngmi Dec 13, 2024
46c494e
Update extraRpcs.js (#1434)
Josephtran102 Dec 15, 2024
efd55be
add vana rpc from pr, manually
realdealshaman Dec 15, 2024
93437f9
add hydration chain id (#1432)
nohaapav Dec 15, 2024
7984935
add quicknode rpc for world chain (#1425)
dcbuild3r Dec 15, 2024
a91dd22
Update extraRpcs.js (#1411)
Saksham-somnia Dec 15, 2024
5cb793a
fix auto search
mintdart Dec 17, 2024
cd84564
fix auto search
mintdart Dec 17, 2024
c7b4ee6
fix auto search
mintdart Dec 17, 2024
8eb6bed
update code to filter chains (#1436)
mintdart Dec 17, 2024
f7c34fc
add inc chain rpc
realdealshaman Dec 17, 2024
4719075
Adding in Ink Mainnet Information (#1438)
alexanderbradshaw Dec 18, 2024
e358ea2
remove dupe
realdealshaman Dec 18, 2024
94f7072
Add XDC Apothem RPC (#1439)
AnilChinchawale Dec 18, 2024
2397b5c
feat: add alchemy and quiknode rpcs for nova (#1437)
fionnachan Dec 18, 2024
a06ea56
feat: add HashKey Chain (#1444)
HashKeyCloud Dec 20, 2024
1d5cd84
Update extraRpcs.js (#1443)
maradeeym Dec 20, 2024
ba823c8
Updated Kaia RPC endpoint (#1441)
praveen-kaia Dec 20, 2024
24ba113
Update extraRpcs.js (#1446)
AutomatedEngineering Dec 21, 2024
5c0a149
Add Powerloom Mainnet (#1447)
SwaroopH Dec 22, 2024
14e5e4e
remove chain not yet listed on DefiLlama
realdealshaman Dec 22, 2024
3eb4db2
fix syntax error
realdealshaman Dec 22, 2024
d5d3d03
Add callStatic Sonic mainnet RPC (#1448)
Callstatic-Admin Dec 22, 2024
b30c43d
Update extraRpcs.js (#1453)
Coha05 Dec 27, 2024
367f5fe
add sonic to chainIds
realdealshaman Dec 31, 2024
80913be
[Auranode] add rpc story odyssey (#1455)
hidayahhtaufik Dec 31, 2024
896c5b8
fix chain api
mintdart Jan 4, 2025
d2330ed
Removed wrong rpc from kaia kairos testnet (#1467)
praveen-kaia Jan 6, 2025
f20acc6
Metis Mainnet and Testnet RPCs added (#1466)
nidhinakranii Jan 6, 2025
2bf2e1a
Add DTEAM Story mainnet RPC to extraRpcs.js (#1464)
doodleoo3 Jan 6, 2025
732bf27
Add an extra, third DTEAM Story Odyssey RPC to extraRpcs.js (#1463)
doodleoo3 Jan 6, 2025
fb8c80c
Add an extra, second DTEAM Story Odyssey RPC to extraRpcs.js (#1462)
doodleoo3 Jan 6, 2025
6c16676
Add RPC Story Odyssey to extraRpcs.js (#1461)
doodleoo3 Jan 6, 2025
08029b5
fix
realdealshaman Jan 7, 2025
45f3e1b
Added OnFinality Arbiturm Sepolia (#1472)
Danielvul Jan 7, 2025
32c02ed
add karak
realdealshaman Jan 7, 2025
ef866b2
add crossfi chain (#1473)
crossfidev Jan 9, 2025
98942cc
Update extraRpcs.js (#1474)
georgefuru Jan 11, 2025
fdf2f5e
Update extraRpcs.js (#1476)
Josephtran102 Jan 12, 2025
68a2fac
Update extraRpcs.js (#1477)
McDaan Jan 13, 2025
f8f4f0a
fix syntax
realdealshaman Jan 13, 2025
cda7533
add chain
realdealshaman Jan 14, 2025
e5c3e38
add more chains
realdealshaman Jan 15, 2025
693596d
add BC Hyper Chain
realdealshaman Jan 15, 2025
a5e5ae3
refactor(Home): improve search filtering logic (#1479)
kKaskak Jan 15, 2025
026ef25
add edu chain
realdealshaman Jan 17, 2025
a81558c
add sei
realdealshaman Jan 17, 2025
d88122a
Add: ITRocket services for 0G (#1496)
itrocket-team Jan 20, 2025
dd25d39
add WMC testnet rpc (#1482)
dmitrii602 Jan 20, 2025
8ff71fb
Update extraRpcs.js (#1481)
maradeeym Jan 22, 2025
27f6108
update chain
realdealshaman Jan 22, 2025
a1b961b
add new chainids
realdealshaman Jan 24, 2025
7d16e38
update 7181 rpc (#1504)
MarkStephon Jan 25, 2025
b5f75c9
Add OnFinality RPC endpoint for optimism-sepolia (#1502)
FiveKG Jan 25, 2025
60f401d
add new chains
realdealshaman Jan 27, 2025
da39bd3
add chain
realdealshaman Jan 28, 2025
222d58b
Update extraRpcs.js (#1507)
maradeeym Jan 30, 2025
2e73f80
Update extraRpcs.js (#1523)
sSelmann Feb 4, 2025
9875273
Update extraRpcs.js (#1521)
maradeeym Feb 4, 2025
bd43820
update the RPC to fix the issue while adding (#1520)
udhaykumarbala Feb 4, 2025
c8b0cbc
add Grand Valley's Story Mainnet rpc (#1514)
hubofvalley Feb 4, 2025
0f8d861
Remove Envelop Blast node (#1513)
maxsiz Feb 4, 2025
9c8324e
Update extraRpcs.js (#1512)
maradeeym Feb 4, 2025
516a611
add default rpcs
realdealshaman Feb 4, 2025
eff5d62
Add 0xRPC.io public nodes (#1501)
0xRPC Feb 4, 2025
54f7dc4
Add block gas limit in each chain card (#1511)
Setland34 Feb 4, 2025
e2a119c
Add ankr public RPC to Matchain Mainnet (#1526)
alekswoje Feb 4, 2025
0b12fea
Added owlracle Proxy Nodes to RPC list. (#1528)
werlang Feb 6, 2025
daef687
feat: add BirdLayer Chain (#1529)
yongjun925 Feb 7, 2025
3437132
add more rpcs and new chainid
realdealshaman Feb 7, 2025
991ecdc
Update extraRpcs.js (#1531)
doodleoo3 Feb 7, 2025
7f00507
Update extraRpcs.js (#1542)
botxx15 Feb 11, 2025
fd6d756
Update extraRpcs.js (#1540)
Boomtokn Feb 11, 2025
a1dedb2
Add darwinia mapping (#1539)
fewensa Feb 11, 2025
805a9e3
Update extraRpcs.js (#1538)
0xWyc Feb 11, 2025
02a87c8
add default berachain rpc
realdealshaman Feb 11, 2025
59e1e6f
add berachain chainid
realdealshaman Feb 11, 2025
72c831c
Update extraRpcs.js (#1533)
doodleoo3 Feb 11, 2025
db2095a
add rpc
realdealshaman Feb 11, 2025
9b62d4b
add unichain
realdealshaman Feb 11, 2025
3852ad5
add chain
realdealshaman Feb 12, 2025
bc7c218
Add silent validator RPC for Story mainnet (#1545)
silentnoname Feb 12, 2025
d8c518f
Add Story RPC (#1544)
0xlimon Feb 12, 2025
3bbe0ab
Add NodeStake RPC for Story mainnet(1514). (#1543)
nodestake Feb 12, 2025
34d1974
add story
realdealshaman Feb 13, 2025
0d84dc5
update chain name
realdealshaman Feb 13, 2025
05d2134
update
realdealshaman Feb 13, 2025
6522dc3
Add story rpc aldebaranode (#1554)
mrheed Feb 18, 2025
a8a2cb7
Add Story Aeneid testnet RPC | J-Node (#1553)
Josephtran102 Feb 18, 2025
f2c346b
Add uni endpoint for 0xrpc.io (#1551)
0xRPC Feb 18, 2025
9d7fbd3
Added multiple RPC endpoitns | Update extraRpcs.js (#1550)
maradeeym Feb 18, 2025
ea281f9
format
realdealshaman Feb 18, 2025
64564c1
Add Mandragora's Story's mainnet RPC (#1549)
McDaan Feb 18, 2025
cfda89b
Add Allnodes RPC to Unichain and Berachain (#1548)
3eph1r0th Feb 18, 2025
23d821e
Added OnFinality Unichain RPCs (#1546)
Danielvul Feb 18, 2025
92c3bc1
add conet
realdealshaman Feb 18, 2025
dbfa653
add hyperevm
realdealshaman Feb 18, 2025
fcd70f1
add block explorer
realdealshaman Feb 18, 2025
f4d94dd
add lumia
realdealshaman Feb 20, 2025
cd504f6
fix typo
realdealshaman Feb 20, 2025
00cf157
add MemeCore mainnet rpc (#1559)
tech-memecore Feb 20, 2025
8c482d6
add new hyperliquid testnet rpc
realdealshaman Feb 20, 2025
e0949e7
small change
realdealshaman Feb 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ yarn-error.log*

# vercel
.vercel

# others
build.log
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ You can start editing the page by modifying `pages/index.js`. The page auto-upda

## Adding your RPC

If you wish to add your RPC, please follow the [PR template](https://github.com/DefiLlama/chainlist/blob/main/pull_request_template.md)
If you wish to add your RPC, please follow this [PR template](https://github.com/DefiLlama/chainlist/blob/main/pull_request_template.md)
93 changes: 93 additions & 0 deletions components/AdBanner/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import * as Fathom from "fathom-client";
import { useEffect, useState } from "react";

import { FATHOM_ADS_ID } from "../../hooks/useAnalytics";
import { notTranslation as useTranslations, shuffleArray } from "../../utils";

const BANNERS = [
{
image: "brave.png",
name: "Brave",
url: "https://brave.com/wallet/?mtm_source=chainlist&mtm_medium=paid&mtm_campaign=q3wallet",
isActive: true,
},
{
image: "llamanodes.png",
name: "LlamaNodes",
url: "https://llamanodes.com",
isActive: true,
},
{
image: "gmx.png",
name: "GMX",
url: "https://app.gmx.io/#/trade/?ref=chainlist",
isActive: false,
},
].filter((banner) => banner.isActive);

export const AdBanner = () => {
const t = useTranslations("Common");
const [banner, setBanner] = useState();

// only render banner client-side to prevent hydration errors due to the random banners
useEffect(() => {
setBanner(BANNERS[Math.floor(Math.random() * BANNERS.length)]);
}, []);

if (!banner) {
return null;
}

const srcLarge = `./banners/large/${banner.image}`;
const srcSmall = `./banners/small/${banner.image}`;
const srcName = banner.name;

return (
<div className="flex flex-col w-full h-full justify-center gap-2">
<div className="w-full h-full rounded-[10px]">
<a
href={banner.url}
rel="noopener noreferrer"
target="_blank"
onClick={() => Fathom.trackGoal(FATHOM_ADS_ID[banner.name.toLowerCase()], 0)}
>
<picture className="rounded-[10px] duration-500 w-full h-full">
<source
srcSet={srcSmall}
media="(max-width: 420px)"
className="rounded-[10px] duration-500 w-full h-full"
/>
<source
srcSet={srcLarge}
media="(max-width: 639px)"
className="rounded-[10px] duration-500 w-full h-full"
/>
<source
srcSet={srcSmall}
media="(max-width: 1399px)"
className="rounded-[10px] duration-500 w-full h-full"
/>
<source
srcSet={srcLarge}
media="(max-width: 1679px)"
className="rounded-[10px] duration-500 w-full h-full"
/>
<source
srcSet={srcSmall}
media="(max-width: 2000px)"
className="rounded-[10px] duration-500 w-full h-full"
/>

<img src={srcLarge} alt={srcName} className="rounded-[10px] duration-500 w-full h-full" />
</picture>
</a>
</div>

<div className="w-full text-center text-xs text-gray-500 dark:text-[#B3B3B3] italic">
<a href="mailto:[email protected]" rel="noopener noreferrer" target="_blank">
{`${t("your-ad-here")}, ${t("contact-us").toLowerCase()}`}
</a>
</div>
</div>
);
};
59 changes: 54 additions & 5 deletions components/Layout/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
import * as React from "react";
import { useEffect } from "react";
import Header from "../header";
// import { useTranslations } from "next-intl";
import { notTranslation as useTranslations } from "../../utils";
import Logo from "./Logo";
import { useRouter } from "next/router";

const toggleTheme = (e) => {
e.preventDefault();
const element = document.body;
document.getElementById("theme-toggle-dark-icon").classList.toggle("hidden");
document.getElementById("theme-toggle-light-icon").classList.toggle("hidden");
const result = element.classList.toggle("dark");
localStorage.setItem("theme", result ? "dark" : "light");
};

const initTheme = () => {
const element = document.body;
if (element.classList.contains("dark")) {
document.getElementById("theme-toggle-light-icon").classList.remove("hidden");
} else {
document.getElementById("theme-toggle-dark-icon").classList.remove("hidden");
}
};

export default function Layout({ children, lang }) {
useEffect(() => {
initTheme();
}, []);

const t = useTranslations("Common", lang);

const router = useRouter();
Expand All @@ -16,7 +39,7 @@ export default function Layout({ children, lang }) {

return (
<div className="grid grid-cols-1 lg:grid-cols-[40vw,_auto]">
<div className="relative h-full">
<div className="dark:text-[#B3B3B3] text-black dark:bg-[#0D0D0D] bg-white relative h-full">
<div className="p-5 sticky top-0 bottom-0 m-auto flex flex-col items-center gap-8 justify-center h-screen max-w-[480px] mx-auto">
<figure className="lg:mr-auto">
<Logo />
Expand All @@ -27,7 +50,7 @@ export default function Layout({ children, lang }) {

<div className="flex flex-col gap-4 w-full">
<a
className="flex items-center justify-center mx-auto lg:ml-0 gap-2 rounded-[50px] max-w-[16.25rem] font-medium py-[18px] px-6 shadow-lg w-full bg-[#2F80ED] text-white"
className="flex items-center justify-center mx-auto lg:ml-0 gap-2 rounded-[50px] max-w-[16.25rem] font-medium py-[18px] px-6 shadow-lg w-full dark:bg-[#2F80ED] bg-[#2F80ED] dark:text-black text-white"
href="https://github.com/ethereum-lists/chains"
target="_blank"
rel="noopener noreferrer"
Expand All @@ -46,7 +69,7 @@ export default function Layout({ children, lang }) {
</a>

<a
className="flex items-center justify-center mx-auto lg:ml-0 gap-2 rounded-[50px] max-w-[16.25rem] font-medium py-[17px] px-6 w-full bg-white text-[#2F80ED] border border-[#EAEAEA]"
className="flex items-center justify-center mx-auto lg:ml-0 gap-2 rounded-[50px] max-w-[16.25rem] font-medium py-[17px] px-6 w-full dark:bg-[#0D0D0D] bg-white dark:text-[#2F80ED] text-[#2F80ED] border dark:border-[#171717] border-[#EAEAEA]"
href="https://github.com/DefiLlama/chainlist/blob/main/constants/extraRpcs.js"
target="_blank"
rel="noopener noreferrer"
Expand Down Expand Up @@ -79,10 +102,36 @@ export default function Layout({ children, lang }) {
</svg>
<span className="text-base font-medium">{t("view-source-code")}</span>
</a>

<a className="flex items-center gap-2 mx-auto lg:ml-0" href="#" onClick={toggleTheme} id="theme-toggle">
<svg
id="theme-toggle-dark-icon"
className="w-5 h-5 hidden"
fill="#2F80ED"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"></path>
</svg>
<svg
id="theme-toggle-light-icon"
className="w-5 h-5 hidden"
fill="#2F80ED"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"
fillRule="evenodd"
clipRule="evenodd"
></path>
</svg>
<span className="text-base font-medium">{t("toggle-theme")}</span>
</a>
</div>
</div>
<div className="bg-[#f3f3f3] p-5 relative flex flex-col gap-5">
<Header lang={lang} chainName={chainName} key={chainName} />
<div className="dark:bg-[#181818] bg-[#f3f3f3] p-5 relative flex flex-col gap-5">
<Header lang={lang} chainName={chainName} key={chainName + "header"} />

{children}
</div>
Expand Down
80 changes: 29 additions & 51 deletions components/RPCList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function RPCList({ chain, lang }) {
let trust = "transparent";
let disableConnect = false;

if (!height || !latency || topRpc.height - height > 3 || topRpc.latency - latency > 5000) {
if (!height || !latency || topRpc.height - height > 3 || latency - topRpc.latency > 5000) {
trust = "red";
} else if (topRpc.height - height < 2 && topRpc.latency - latency > -600) {
trust = "green";
Expand All @@ -79,30 +79,13 @@ export default function RPCList({ chain, lang }) {

const { rpcData, hasLlamaNodesRpc } = useLlamaNodesRpcData(chain.chainId, data);

const isEthMainnet = chain?.name === "Ethereum Mainnet";

return (
<div className="shadow bg-white p-8 rounded-[10px] flex flex-col gap-3 overflow-hidden col-span-full relative overflow-x-auto">
{isEthMainnet && (
<p className="text-center">
Follow{" "}
<a
href="https://docs.llama.fi/chainlist/how-to-change-ethereums-rpc"
target="_blank"
rel="noopener noreferrer"
className="underline"
>
this guide
</a>{" "}
to change RPC endpoint's of Ethereum Mainnet
</p>
)}

<table className="m-0 border-collapse whitespace-nowrap">
<div className="shadow dark:bg-[#0D0D0D] bg-white p-8 rounded-[10px] flex flex-col gap-3 overflow-hidden col-span-full relative overflow-x-auto">
<table className="m-0 border-collapse whitespace-nowrap dark:text-[#B3B3B3] text-black">
<caption className="relative w-full px-3 py-1 text-base font-medium border border-b-0">
<span className="mr-4">{`${chain.name} RPC URL List`}</span>
<button
className="text-sm font-normal flex items-center gap-1 absolute right-4 top-[2px] bottom-[2px] hover:bg-[#EAEAEA] px-2 rounded-[10px]"
className="text-sm font-normal flex items-center gap-1 absolute right-4 top-[2px] bottom-[2px] dark:hover:bg-[#171717] hover:bg-[#EAEAEA] px-2 rounded-[10px]"
onClick={() => setSorting(!sortChains)}
>
{sortChains ? (
Expand Down Expand Up @@ -136,23 +119,22 @@ export default function RPCList({ chain, lang }) {

<tbody>
{rpcData.map((item, index) => {
let className = 'bg-inherit';
let className = "bg-inherit";

if (hasLlamaNodesRpc && index === 0) {
className = 'bg-[#F9F9F9]';
className = "dark:bg-[#0D0D0D] bg-[#F9F9F9]";
}

return (
<Row
values={item}
chain={chain}
isEthMainnet={isEthMainnet}
key={index}
key={"rpc" + index}
privacy={urlToData[item.data.url]}
lang={lang}
className={className}
/>
)
);
})}
</tbody>
</table>
Expand All @@ -161,7 +143,7 @@ export default function RPCList({ chain, lang }) {
}

const Shimmer = () => {
return <div className="rounded h-5 w-full min-w-[40px] animate-pulse bg-[#EAEAEA]"></div>;
return <div className="rounded h-5 w-full min-w-[40px] animate-pulse dark:bg-[#171717] bg-[#EAEAEA]"></div>;
};

function PrivacyIcon({ tracking, isOpenSource = false }) {
Expand All @@ -181,7 +163,7 @@ function PrivacyIcon({ tracking, isOpenSource = false }) {
return <EmptyIcon />;
}

const Row = ({ values, chain, isEthMainnet, privacy, lang, className }) => {
const Row = ({ values, chain, privacy, lang, className }) => {
const t = useTranslations("Common", lang);
const { data, isLoading, refetch } = values;

Expand Down Expand Up @@ -225,27 +207,23 @@ const Row = ({ values, chain, isEthMainnet, privacy, lang, className }) => {
</>
)}
</td>
<td className="px-3 py-1 text-sm border">
<Tooltip content={privacy?.trackingDetails || t('no-privacy-info')}>
{isLoading ? <Shimmer /> : <PrivacyIcon tracking={privacy?.tracking} isOpenSource={privacy?.isOpenSource} />}
</Tooltip>
</td>
<td className="px-3 py-1 text-sm border">
<Tooltip content={privacy?.trackingDetails || t("no-privacy-info")}>
{isLoading ? <Shimmer /> : <PrivacyIcon tracking={privacy?.tracking} isOpenSource={privacy?.isOpenSource} />}
</Tooltip>
</td>
<td className="px-3 py-1 text-sm text-center border">
{isLoading ? (
<Shimmer />
) : (
<>
{isEthMainnet ? (
<CopyUrl url={data?.url} />
) : (
!data.disableConnect && (
<button
className="px-2 py-[2px] -my-[2px] text-center text-sm hover:bg-[#EAEAEA] rounded-[50px]"
onClick={() => addToNetwork({ address, chain, rpc: data?.url })}
>
{t(renderProviderText(account))}
</button>
)
{!data.disableConnect && (
<button
className="px-2 py-[2px] -my-[2px] text-center text-sm dark:hover:bg-[#171717] hover:bg-[#EAEAEA] rounded-[50px]"
onClick={() => addToNetwork({ address, chain, rpc: data?.url })}
>
{t(renderProviderText(account))}
</button>
)}
</>
)}
Expand All @@ -255,31 +233,31 @@ const Row = ({ values, chain, isEthMainnet, privacy, lang, className }) => {
};

const CopyUrl = ({ url = "" }) => {
const { hasCopied, onCopy } = useClipboard()
const { hasCopied, onCopy } = useClipboard();

const handleCopy = () => {
if (url.includes("eth.llamarpc")) {
Fathom.trackGoal(FATHOM_DROPDOWN_EVENTS_ID[1], 0);
}

return onCopy(url)
}
return onCopy(url);
};

return (
<button
className="px-2 py-[2px] -my-[2px] text-sm hover:bg-[#EAEAEA] rounded-[50px] mx-auto"
className="px-2 py-[2px] -my-[2px] text-sm dark:hover:bg-[#171717] hover:bg-[#EAEAEA] rounded-[50px] mx-auto"
onClick={handleCopy}
>
{!hasCopied ? 'Copy URL' : 'Copied!'}
{!hasCopied ? "Copy URL" : "Copied!"}
</button>
);
};

const EmptyIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" fill="none" className="w-4 h-4 mx-auto">
<circle cx="12.2844" cy="12.6242" r="11.0662" stroke="black" strokeWidth="1.47549" strokeDasharray="2.95 2.95"/>
<circle cx="12.2844" cy="12.6242" r="11.0662" stroke="black" strokeWidth="1.47549" strokeDasharray="2.95 2.95" />
</svg>
)
);

const RedIcon = () => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="red" className="w-5 h-5 mx-auto">
Expand Down
Loading