diff --git a/references/protocol/addresses.mdx b/references/protocol/addresses.mdx index d8e89422..c1e11256 100644 --- a/references/protocol/addresses.mdx +++ b/references/protocol/addresses.mdx @@ -4,6 +4,8 @@ description: Contract addresses for the Relay Settlement Protocol sidebarTitle: Addresses --- +import { Depositories } from "/snippets/Depositories.mdx" + ## Relay Chain Core settlement contracts deployed on the [Relay Chain](/references/protocol/components/relay-chain) (Chain ID `537713`). @@ -24,84 +26,6 @@ The [Allocator](/references/protocol/components/allocator) and [Security Council ## Depository Contracts -{/* Generated using: "curl https://api.relay.link/chains | jq '.chains[] | "|\(.protocol.v2.chainId)|\(.protocol.v2.depository)|\(.vmType)|\(.id)"" */} - -[Depository](/references/protocol/components/depository) contracts are deployed on every supported origin chain. +[Depository](/references/protocol/components/depository) contracts are deployed on every supported origin chain. The list below is fetched live from the [Chains API](https://api.relay.link/chains) and stays in sync as new chains are added. -| Chain | Address | VM Type | EVM Chain Id | -| -------------- | -------------------------------------------- | ----------- | ------------ | -| ethereum | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 1 | -| optimism | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 10 | -| cronos | 0x59916da825d2d2ec1bf878d71c88826f6633ecca | ethereum-vm | 25 | -| bnb | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 56 | -| gnosis | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 100 | -| unichain | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 130 | -| polygon | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 137 | -| sonic | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 146 | -| manta | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 169 | -| mint | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 185 | -| boba | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 288 | -| zksync | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 324 | -| shape | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 360 | -| appchain | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 466 | -| worldchain | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 480 | -| redstone | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 690 | -| flow | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 747 | -| hyperevm | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 999 | -| metis | 0x59916da825d2d2ec1bf878d71c88826f6633ecca | ethereum-vm | 1088 | -| polygon_zkevm | 0x59916da825d2d2ec1bf878d71c88826f6633ecca | ethereum-vm | 1101 | -| lisk | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 1135 | -| sei | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 1329 | -| perennial | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 1424 | -| story | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 1514 | -| gravity | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 1625 | -| soneium | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 1868 | -| swellchain | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 1923 | -| sanko | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 1996 | -| ronin | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 2020 | -| abstract | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 2741 | -| morph | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 2818 | -| hychain | 0x59916da825d2d2ec1bf878d71c88826f6633ecca | ethereum-vm | 2911 | -| mantle | 0x59916da825d2d2ec1bf878d71c88826f6633ecca | ethereum-vm | 5000 | -| somnia | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 5031 | -| superseed | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 5330 | -| cyber | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 7560 | -| powerloom | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 7869 | -| arena_z | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 7897 | -| b3 | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 8333 | -| base | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 8453 | -| onchain_points | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 17071 | -| apechain | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 33139 | -| funki | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 33979 | -| mode | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 34443 | -| arbitrum | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 42161 | -| arbitrum_nova | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 42170 | -| celo | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 42220 | -| hemi | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 43111 | -| avalanche | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 43114 | -| gunz | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 43419 | -| zircuit | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 48900 | -| superposition | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 55244 | -| ink | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 57073 | -| linea | 0x59916da825d2d2ec1bf878d71c88826f6633ecca | ethereum-vm | 59144 | -| bob | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 60808 | -| anime | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 69000 | -| berachain | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 80094 | -| blast | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 81457 | -| plume | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 98866 | -| taiko | 0x59916da825d2d2ec1bf878d71c88826f6633ecca | ethereum-vm | 167000 | -| syndicate | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 510003 | -| scroll | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 534352 | -| zero | 0xa88cf7864951147a08707ed732237eaa9b1c3b9b | ethereum-vm | 543210 | -| xai | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 660279 | -| katana | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 747474 | -| forma | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 984122 | -| zora | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 7777777 | -| bitcoin | bc1qdqqsq6y7csd0cr3ye45h9lv8ydh777j2wehgl6 | bitcoin-vm | | -| eclipse | 99vQwtBwYtrqqD9YSXbdum3KBdxPAVxYTaQ3cfnJSrN2 | solana-vm | | -| soon | 99vQwtBwYtrqqD9YSXbdum3KBdxPAVxYTaQ3cfnJSrN2 | solana-vm | | -| corn | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 21000000 | -| degen | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 666666666 | -| solana | 99vQwtBwYtrqqD9YSXbdum3KBdxPAVxYTaQ3cfnJSrN2 | solana-vm | | -| ancient8 | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 888888888 | -| rari | 0x4cd00e387622c35bddb9b4c962c136462338bc31 | ethereum-vm | 1380012617 | + diff --git a/snippets/Depositories.mdx b/snippets/Depositories.mdx new file mode 100644 index 00000000..725c125e --- /dev/null +++ b/snippets/Depositories.mdx @@ -0,0 +1,102 @@ +export const VM_TYPE_LABELS = { + evm: "ethereum-vm", + bvm: "bitcoin-vm", + svm: "solana-vm", + tvm: "tron-vm", + hypevm: "hyperliquid-vm", + lvm: "lighter-vm" +} + +export const Depositories = ({ env, id }) => { + const key = `depositories-${env}` + + if (typeof window === "undefined") { + return null + } + + if (!window[key]) { + window[key] = { + fetching: false, + data: null + } + } + if (!window[key].fetching) { + const appendDepositories = (data) => { + const rootElement = document.getElementById(id) + if (!rootElement) { + return + } + const rows = data + .slice() + .filter((chain) => chain.protocol && chain.protocol.v2 && chain.protocol.v2.depository) + .sort((a, b) => a.id - b.id) + .map((chain) => { + return ` + ${chain.name} + ${chain.protocol.v2.depository} + ${VM_TYPE_LABELS[chain.vmType] || chain.vmType} + ${chain.id} + ` + }) + rootElement.innerHTML = rows.join("") + const loaderContainer = document.getElementById(`loader-container-${id}`) + if (loaderContainer) { + loaderContainer.style.display = "none" + } + } + + const fetchChains = async () => { + try { + window[key].fetching = true + window[key].data = null + const response = await fetch( + env === "testnets" + ? "https://api.testnets.relay.link/chains" + : "https://api.relay.link/chains" + ) + const data = await response.json() + window[key].fetching = false + window[key].data = data.chains + appendDepositories(data.chains) + } catch (e) { + window[key].fetching = false + window[key].data = false + } + } + const loaderContainer = document.getElementById(`loader-container-${id}`) + if (loaderContainer) { + loaderContainer.style.display = "flex" + } + if (window[key].data) { + setTimeout(() => { + appendDepositories(window[key].data) + }, 1000) + } else { + fetchChains() + } + } + + return ( + + + + + + + + + + +
+
+
+
ChainAddressVM TypeChain ID
+ ) +}