import { Currency } from '@reservoir0x/reservoir-kit-ui' import { reservoirChains } from '@reservoir0x/reservoir-sdk' import { zeroAddress } from 'viem' import { arbitrum, mainnet, polygon, optimism, Chain, bsc, avalanche, polygonZkEvm, zkSync, linea, zora, base, arbitrumNova, scroll, goerli, } from 'wagmi/chains' import usdcContracts from './usdcContracts' //CONFIGURABLE: The default export controls the supported chains for the marketplace. Removing // or adding chains will result in adding more or less chains to the marketplace. // They are an extension of the wagmi chain objects export type ReservoirChain = Chain & { lightIconUrl: string darkIconUrl: string reservoirBaseUrl: string proxyApi?: string routePrefix: string apiKey?: string coingeckoId?: string collectionSetId?: string community?: string wssUrl?: string listingCurrencies?: Currency[] oracleBidsEnabled?: boolean checkPollingInterval?: number } const nativeCurrencyBase = { contract: zeroAddress, symbol: 'ETH', decimals: 18, coinGeckoId: 'ethereum', } const usdcCurrencyBase = { contract: '', symbol: 'USDC', decimals: 6, coinGeckoId: 'usd-coin', } export const DefaultChain: ReservoirChain = { ...mainnet, // Any url to display the logo of the chain in light mode lightIconUrl: '/icons/eth-icon-dark.svg', // Any url to display the logo of the chain in dark mode darkIconUrl: '/icons/eth-icon-light.svg', // The base url of the reservoir api, this is used in the app when // directly interacting with the reservoir indexer servers (in the api proxy for example) // or when prefetching server side rendered data reservoirBaseUrl: reservoirChains.mainnet.baseApiUrl, // Used on the client side portions of the marketplace that need an api key added // Prevents the api key from being leaked in the clientside requests // If you'd like to disable proxying you can just change the proxyApi to the reservoirBaseUrl // Doing so will omit the api key unless further changes are made proxyApi: '/api/reservoir/ethereum', // A prefix used in the asset specific routes on the app (tokens/collections) routePrefix: 'ethereum', // Coingecko id, used to convert the chain's native prices to usd. Can be found here: // https://www.coingecko.com/en/api/documentation#operations-coins-get_coins_list coingeckoId: 'ethereum', // collectionSetId: process.env.NEXT_PUBLIC_ETH_COLLECTION_SET_ID, // collectionSetId: // '5213bc89ad6f83413e7d0d0f568a389c2afdf6437fda900ad57543e38b91e569', //Sphe GeNTF + Grafs collectionSetId: 'b8ea588c49df7aba7b70a49ec1102b7809158fb6fa470c4fb49f9d588e8aa65a', //PEPE PAINT hardcode// Hamburguer + Grafs community: process.env.NEXT_PUBLIC_ETH_COMMUNITY, wssUrl: 'wss://ws.reservoir.tools', listingCurrencies: [ nativeCurrencyBase, { ...usdcCurrencyBase, contract: usdcContracts[mainnet.id], }, ], oracleBidsEnabled: true, checkPollingInterval: reservoirChains.mainnet.checkPollingInterval, } export default [ DefaultChain, { ...goerli, lightIconUrl: '/icons/goerli-icon-dark.svg', darkIconUrl: '/icons/goerli-icon-light.svg', reservoirBaseUrl: reservoirChains.goerli.baseApiUrl, proxyApi: '/api/reservoir/goerli', routePrefix: 'goerli', coingeckoId: 'ethereum', checkPollingInterval: reservoirChains.goerli.checkPollingInterval, wssUrl: 'wss://ws-goerli.reservoir.tools', }, // { // ...zora, // name: 'Zora', // lightIconUrl: '/icons/zora-icon-dark.svg', // darkIconUrl: '/icons/zora-icon-light.svg', // reservoirBaseUrl: reservoirChains.zora.baseApiUrl, // proxyApi: '/api/reservoir/zora', // routePrefix: 'zora', // coingeckoId: 'ethereum', // checkPollingInterval: reservoirChains.zora.checkPollingInterval, // wssUrl: 'wss://ws-zora.reservoir.tools', // collectionSetId: '0xe27f011e8eb90b4d42fa7658fbe44e240d9c5f03' // collectionSetId: // 'fca7e824931f8de80afa6645a8a872acd4376af6005646a3f9d1f46e9360b781', // collectionSetId: // '4ec91c8de958925ef99b639420a0cab81c5a33f089b5e156c4fe4da6c46b98c6', // }, // { // ...polygon, // lightIconUrl: '/icons/polygon-icon-dark.svg', // darkIconUrl: '/icons/polygon-icon-light.svg', // reservoirBaseUrl: reservoirChains.polygon.baseApiUrl, // proxyApi: '/api/reservoir/polygon', // routePrefix: 'polygon', // coingeckoId: 'matic-network', // collectionSetId: process.env.NEXT_PUBLIC_POLYGON_COLLECTION_SET_ID, // community: process.env.NEXT_PUBLIC_POLYGON_COMMUNITY, // wssUrl: 'wss://ws-polygon.reservoir.tools', // listingCurrencies: [ // { // ...nativeCurrencyBase, // symbol: 'MATIC', // coinGeckoId: 'matic-network', // }, // { // ...usdcCurrencyBase, // contract: usdcContracts[polygon.id], // }, // { // contract: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', // symbol: 'WETH', // decimals: 18, // coinGeckoId: 'weth', // }, // ], // oracleBidsEnabled: true, // checkPollingInterval: reservoirChains.polygon.checkPollingInterval, // }, // { // ...arbitrum, // name: 'Arbitrum', // lightIconUrl: '/icons/arbitrum-icon-dark.svg', // darkIconUrl: '/icons/arbitrum-icon-light.svg', // reservoirBaseUrl: reservoirChains.arbitrum.baseApiUrl, // proxyApi: '/api/reservoir/arbitrum', // routePrefix: 'arbitrum', // coingeckoId: 'arbitrum-iou', // collectionSetId: process.env.NEXT_PUBLIC_ARBITRUM_COLLECTION_SET_ID, // community: process.env.NEXT_PUBLIC_ARBITRUM_COMMUNITY, // wssUrl: 'wss://ws-arbitrum.reservoir.tools', // listingCurrencies: [ // { ...nativeCurrencyBase, coinGeckoId: 'arbitrum-iou' }, // { // ...usdcCurrencyBase, // contract: usdcContracts[arbitrum.id], // }, // ], // checkPollingInterval: reservoirChains.arbitrum.checkPollingInterval, // }, ] as ReservoirChain[]