diff --git a/.github/workflows/pages-deployment.yaml b/.github/workflows/pages-deployment.yaml index 6aea45954..f92265db5 100644 --- a/.github/workflows/pages-deployment.yaml +++ b/.github/workflows/pages-deployment.yaml @@ -3,6 +3,7 @@ name: Cloudflare Pages env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} NEXT_PUBLIC_INTERCOM_ID: re9q5yti + NEXT_PUBLIC_DRPC_KEY: ${{ github.ref == 'refs/heads/main' && AnmpasF2C0JBqeAEzxVO8aTteiMlrW4R75hpDonbV6cR || '' }} on: [push] jobs: diff --git a/src/components/pages/profile/[name]/registration/Registration.tsx b/src/components/pages/profile/[name]/registration/Registration.tsx index 48ce3df24..3294b044d 100644 --- a/src/components/pages/profile/[name]/registration/Registration.tsx +++ b/src/components/pages/profile/[name]/registration/Registration.tsx @@ -359,11 +359,6 @@ const Registration = ({ nameDetails, isLoading }: Props) => { <Typography fontVariant="bodyBold" color="grey"> {t('steps.info.moonpayModalHeader')} </Typography> - {chainId === 5 && ( - <Typography fontVariant="body" color="grey"> - {`${t('steps.info.moonpayTestCard')}: 4000 0209 5159 5032, 12/2030, 123`} - </Typography> - )} </MoonPayHeader> <MoonPayIFrame title="Moonpay Checkout" diff --git a/src/constants/chains.ts b/src/constants/chains.ts index 3be53d40e..4bb193d91 100644 --- a/src/constants/chains.ts +++ b/src/constants/chains.ts @@ -1,5 +1,5 @@ import { holesky } from 'viem/chains' -import { goerli, localhost, mainnet, sepolia } from 'wagmi/chains' +import { localhost, mainnet, sepolia } from 'wagmi/chains' import { addEnsContracts } from '@ensdomains/ensjs' @@ -25,13 +25,11 @@ export const mainnetWithEns = { }, }, } -export const goerliWithEns = addEnsContracts(goerli) export const sepoliaWithEns = addEnsContracts(sepolia) export const holeskyWithEns = addEnsContracts(holesky) export const chainsWithEns = [ mainnetWithEns, - goerliWithEns, sepoliaWithEns, holeskyWithEns, localhostWithEns, @@ -42,7 +40,6 @@ export const getSupportedChainById = (chainId: number | undefined) => export type SupportedChain = | typeof mainnetWithEns - | typeof goerliWithEns | typeof sepoliaWithEns | typeof holeskyWithEns | typeof localhostWithEns diff --git a/src/constants/resolverAddressData.test.ts b/src/constants/resolverAddressData.test.ts index 4e9b21134..085912d78 100644 --- a/src/constants/resolverAddressData.test.ts +++ b/src/constants/resolverAddressData.test.ts @@ -1,7 +1,7 @@ import { getChainContractAddress } from 'viem/utils' -import { describe, expect, it } from 'vitest' +import { expect, it } from 'vitest' -import { goerliWithEns, localhostWithEns, mainnetWithEns, sepoliaWithEns } from './chains' +import { mainnetWithEns, sepoliaWithEns } from './chains' ;(process.env as any).NODE_ENV = 'development' @@ -12,9 +12,6 @@ it('should have the most recent resolver as the first address', async () => { expect(KNOWN_RESOLVER_DATA['1']![0].address).toEqual( getChainContractAddress({ chain: mainnetWithEns, contract: 'ensPublicResolver' }), ) - expect(KNOWN_RESOLVER_DATA['5']![0].address).toEqual( - getChainContractAddress({ chain: goerliWithEns, contract: 'ensPublicResolver' }), - ) expect(KNOWN_RESOLVER_DATA['11155111']![0].address).toEqual( getChainContractAddress({ chain: sepoliaWithEns, contract: 'ensPublicResolver' }), ) diff --git a/src/constants/resolverAddressData.ts b/src/constants/resolverAddressData.ts index 70b710b82..eecb73d9d 100644 --- a/src/constants/resolverAddressData.ts +++ b/src/constants/resolverAddressData.ts @@ -123,183 +123,6 @@ export const KNOWN_RESOLVER_DATA: KnownResolverData = { ], }, ], - '5': [ - { - address: '0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750', - deployer: 'ENS Labs', - tag: 'latest', - isNameWrapperAware: true, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.DnsRecordResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - RESOLVER_INTERFACE_IDS.VersionableResolver, - ], - }, - { - address: '0x342cf18D3e41DE491aa1a3067574C849AdA6a2Ad', - deployer: 'ENS Labs', - tag: null, - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.DnsRecordResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - RESOLVER_INTERFACE_IDS.VersionableResolver, - ], - }, - { - address: '0x19c2d5D0f035563344dBB7bE5fD09c8dad62b001', - deployer: 'ENS Labs', - tag: null, - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.DnsRecordResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - RESOLVER_INTERFACE_IDS.VersionableResolver, - ], - }, - { - address: '0x2800Ec5BAB9CE9226d19E0ad5BC607e3cfC4347E', - deployer: 'ENS Labs', - tag: null, - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.DnsRecordResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - RESOLVER_INTERFACE_IDS.VersionableResolver, - ], - }, - { - address: '0x121304143ea8101E69335F309e2062d299A234B5', - deployer: 'ENS Labs', - tag: null, - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.DnsRecordResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - ], - }, - { - address: '0x4B1488B7a6B320d2D721406204aBc3eeAa9AD329', - deployer: 'ENS Labs', - tag: null, - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.DnsRecordResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - ], - }, - { - address: '0xfF77b96d6bafCec0D684bB528b22e0Ab09C70663', - deployer: 'ENS Labs', - tag: null, - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.DnsRecordResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - ], - }, - { - address: '0x6e1b40ed2d626b97A43d2c12e48a6De49A03c7A4', - deployer: 'ENS Labs', - tag: null, - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - ], - }, - { - address: '0xc1EA41786094D1fBE5aded033B5370d51F7a3F96', - deployer: 'ENS Labs', - tag: 'outdated', - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - ], - }, - { - address: '0xBbe3fD189D18C8b73BA54e9dD01F89E6b3Ee71f0', - deployer: 'ENS Labs', - tag: 'outdated', - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - ], - }, - { - address: '0x4B1488B7a6B320d2D721406204aBc3eeAa9AD329', - deployer: 'ENS Labs', - tag: 'outdated', - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.DnsRecordResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - ], - }, - ], '11155111': [ { address: '0x8948458626811dd0c23EB25Cc74291247077cC51', diff --git a/src/hooks/useEthPrice.ts b/src/hooks/useEthPrice.ts index 4fd8cef70..1861ed2a2 100644 --- a/src/hooks/useEthPrice.ts +++ b/src/hooks/useEthPrice.ts @@ -1,21 +1,16 @@ import { Address } from 'viem' -import { useChainId, useReadContract } from 'wagmi' -import { goerli } from 'wagmi/chains' +import { useReadContract } from 'wagmi' import { useAddressRecord } from './ensjs/public/useAddressRecord' const ORACLE_ENS = 'eth-usd.data.eth' -const ORACLE_GOERLI = '0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e' as const export const useEthPrice = () => { - const chainId = useChainId() - const { data: address_ } = useAddressRecord({ name: ORACLE_ENS, - enabled: chainId !== goerli.id, }) - const address = chainId === 5 ? ORACLE_GOERLI : (address_?.value as Address) || undefined + const address = (address_?.value as Address) || undefined return useReadContract({ abi: [ diff --git a/src/utils/query/wagmi.ts b/src/utils/query/wagmi.ts index 4799fefbc..31e44228f 100644 --- a/src/utils/query/wagmi.ts +++ b/src/utils/query/wagmi.ts @@ -1,11 +1,10 @@ import { createClient, type FallbackTransport, type HttpTransport, type Transport } from 'viem' import { createConfig, createStorage, fallback, http } from 'wagmi' -import { goerli, holesky, localhost, mainnet, sepolia } from 'wagmi/chains' +import { holesky, localhost, mainnet, sepolia } from 'wagmi/chains' import { ccipRequest } from '@ensdomains/ensjs/utils' import { - goerliWithEns, holeskyWithEns, localhostWithEns, mainnetWithEns, @@ -24,12 +23,16 @@ const connectors = getDefaultWallets({ const infuraKey = process.env.NEXT_PUBLIC_INFURA_KEY || 'cfa6ae2501cc4354a74e20432507317c' const tenderlyKey = process.env.NEXT_PUBLIC_TENDERLY_KEY || '4imxc4hQfRjxrVB2kWKvTo' +const drpcKey = process.env.NEXT_PUBLIC_DRPC_KEY || 'AnmpasF2C0JBqeAEzxVO8aRuvzLTrWcR75hmDonbV6cR' export const infuraUrl = (chainName: string) => `https://${chainName}.infura.io/v3/${infuraKey}` -const cloudflareUrl = (chainName: string) => `https://web3.ens.domains/v1/${chainName}` const tenderlyUrl = (chainName: string) => `https://${chainName}.gateway.tenderly.co/${tenderlyKey}` +const drpcUrl = (chainName: string) => + `https://lb.drpc.org/ogrpc?network=${ + chainName === 'mainnet' ? 'ethereum' : chainName + }&dkey=${drpcKey}` -type SupportedUrlFunc = typeof infuraUrl | typeof cloudflareUrl | typeof tenderlyUrl +type SupportedUrlFunc = typeof infuraUrl | typeof drpcUrl | typeof tenderlyUrl const initialiseTransports = <const UrlFuncArray extends SupportedUrlFunc[]>( chainName: string, @@ -83,7 +86,6 @@ const localStorageWithInvertMiddleware = (): Storage | undefined => { const chains = [ ...(isLocalProvider ? ([localhostWithEns] as const) : ([] as const)), mainnetWithEns, - goerliWithEns, sepoliaWithEns, holeskyWithEns, ] as const @@ -97,10 +99,9 @@ const transports = { // this is a hack to make the types happy, dont remove pls [localhost.id]: HttpTransport })), - [mainnet.id]: initialiseTransports('mainnet', [infuraUrl, cloudflareUrl, tenderlyUrl]), - [sepolia.id]: initialiseTransports('sepolia', [infuraUrl, cloudflareUrl, tenderlyUrl]), - [goerli.id]: initialiseTransports('goerli', [infuraUrl, cloudflareUrl, tenderlyUrl]), - [holesky.id]: initialiseTransports('holesky', [tenderlyUrl]), + [mainnet.id]: initialiseTransports('mainnet', [drpcUrl, infuraUrl, tenderlyUrl]), + [sepolia.id]: initialiseTransports('sepolia', [drpcUrl, infuraUrl, tenderlyUrl]), + [holesky.id]: initialiseTransports('holesky', [drpcUrl, tenderlyUrl]), } as const const wagmiConfig_ = createConfig({