-
Notifications
You must be signed in to change notification settings - Fork 523
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
Rpc list #68
Open
Whitevotex
wants to merge
31
commits into
antonnell:main
Choose a base branch
from
DefiLlama:rpc-list
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rpc list #68
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
6b2ed4d
Revert "Shutdown notice."
0xngmi 6dd9534
remove multichain & add sorting by chain
0xngmi f3120c6
add SSR and optimize
0xngmi c2ab136
change favicon
0xngmi d063d33
move chains.js
0xngmi 211de94
add yarn.lock
0xngmi 83e4cca
remove unused code
0xngmi 0f96aba
add fathom
0xngmi 4ba7128
add testnets switch
mintdart d89f901
add chainlist.org domain
0xngmi ac9d711
add chain icons
mintdart b5be804
rework chain icons
0xngmi ea313b4
move testnet toggle to header
mintdart 15a06d1
add rpc list url table
mintdart 48183db
fix sorting url list by height and latency
mintdart 7124483
add loading indicator
mintdart f43f870
try using axios to calc latency
mintdart ee04ded
add extra rpcs
0xngmi 2cbf2f1
update rpcs
0xngmi d00a250
update header styles
mintdart 5bc4549
include option to add network with different rpc urls
mintdart e0fdea5
cleanup
mintdart 426c57a
show data of websocket server nodes
mintdart a4b3957
add trust score sto rpc urls
mintdart 3b31001
Update index.js
0xngmi a6b1b75
smol fix
0xngmi c4a998b
update table header
mintdart 3e1bce4
fix harmony rpcs
0xngmi 001eaf5
remove add to wallet buttons for eth mainnet urls
mintdart 2646662
add link to docs on how to add endpoints manually
mintdart 49e4131
cleanup
mintdart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { Paper } from '@material-ui/core'; | ||
import { useEffect } from 'react'; | ||
import { useRPCData } from '../../utils/utils'; | ||
import classes from './index.module.css'; | ||
|
||
export default function RPCList({ chain }) { | ||
const { data } = useRPCData(chain.rpc); | ||
const darkMode = window.localStorage.getItem('yearn.finance-dark-mode') === 'dark'; | ||
|
||
useEffect(() => { | ||
// clear network resources list for better performance to find latency of each rpc url | ||
window.performance.clearResourceTimings(); | ||
|
||
const interval = setInterval(() => { | ||
window.performance.clearResourceTimings(); | ||
}, 15000); | ||
|
||
return () => clearInterval(interval); | ||
}, []); | ||
|
||
return ( | ||
<Paper elevation={1} className={classes.disclosure}> | ||
<table | ||
className={classes.table} | ||
style={{ '--border-color': darkMode ? 'hsl(0deg 0% 39% / 33%)' : 'hsl(0deg 0% 17% / 4%)' }} | ||
> | ||
<caption>{`${chain.name} RPC URL List`}</caption> | ||
<thead> | ||
<tr> | ||
<th>RPC Server Address</th> | ||
<th>Height</th> | ||
<th>Latency</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{data?.map((item, index) => ( | ||
<tr key={index}> | ||
<td>{item.url}</td> | ||
<td>{item.height}</td> | ||
<td>{item.latency}</td> | ||
<td>Add to Wallet</td> | ||
</tr> | ||
))} | ||
</tbody> | ||
</table> | ||
</Paper> | ||
); | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.disclosure { | ||
grid-column: 1 / -1; | ||
position: relative; | ||
padding: 30px; | ||
overflow-x: auto; | ||
} | ||
|
||
.table { | ||
border-collapse: collapse; | ||
margin: 0 auto; | ||
} | ||
|
||
.table { | ||
white-space: nowrap; | ||
} | ||
|
||
.table caption, | ||
.table th, | ||
.table td { | ||
padding: 2px 12px; | ||
border: 1px solid var(--border-color); | ||
} | ||
|
||
.table caption { | ||
font-size: 1rem; | ||
font-weight: 500; | ||
border-bottom: 0; | ||
} | ||
|
||
.table th { | ||
font-weight: 500; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://rpc.ankr.com/avalanche