1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

37 lines
718 B
TypeScript

import { useStaticQuery, graphql } from 'gatsby'
import { UseNetworkMetadata } from './types'
const networksQuery = graphql`
query {
allNetworksMetadataJson {
edges {
node {
chain
network
networkId
chainId
rpc
explorers {
url
}
nativeCurrency {
name
symbol
decimals
}
}
}
}
}
`
export default function useNetworkMetadata(): UseNetworkMetadata {
const data = useStaticQuery(networksQuery)
const networksList: { node: EthereumListsChain }[] =
data.allNetworksMetadataJson.edges
return { networksList }
}
export * from './utils'