diff --git a/.changeset/shaggy-ducks-give.md b/.changeset/shaggy-ducks-give.md new file mode 100644 index 0000000000..3e5c45d979 --- /dev/null +++ b/.changeset/shaggy-ducks-give.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Swapped defunct Ankr RPC URLs for Thirdweb diff --git a/site/pages/docs/ethers-migration.mdx b/site/pages/docs/ethers-migration.mdx index 65562361d0..c8b52e18f2 100644 --- a/site/pages/docs/ethers-migration.mdx +++ b/site/pages/docs/ethers-migration.mdx @@ -47,7 +47,7 @@ Custom Chain: ```ts import { providers } from 'ethers' -const provider = new providers.JsonRpcProvider('https://rpc.ankr.com/fantom/​', { // [!code hl] +const provider = new providers.JsonRpcProvider('https://250.rpc.thirdweb.com', { // [!code hl] name: 'Fantom', // [!code hl] id: 250 // [!code hl] }) // [!code hl] @@ -74,7 +74,7 @@ import { fantom } from 'viem/chains' const client = createPublicClient({ // [!code hl] chain: fantom, // [!code hl] - transport: http('https://rpc.ankr.com/fantom/​') // [!code hl] + transport: http('https://250.rpc.thirdweb.com') // [!code hl] }) // [!code hl] ``` diff --git a/site/pages/docs/getting-started.mdx b/site/pages/docs/getting-started.mdx index 084b012e15..2bf3fff1eb 100644 --- a/site/pages/docs/getting-started.mdx +++ b/site/pages/docs/getting-started.mdx @@ -46,7 +46,7 @@ const client = createPublicClient({ // [!code focus] ``` :::info -In a production app, it is highly recommended to pass through your authenticated RPC provider URL (Alchemy, Infura, Ankr, etc). If no URL is provided, viem will default to a public RPC provider. [Read more](/docs/clients/transports/http#usage). +In a production app, it is highly recommended to pass through your authenticated RPC provider URL (Alchemy, Infura, Thirdweb, etc). If no URL is provided, viem will default to a public RPC provider. [Read more](/docs/clients/transports/http#usage). ::: ### 2. Consume Actions diff --git a/site/pages/experimental.mdx b/site/pages/experimental.mdx index 1bef666c5c..add926065f 100644 --- a/site/pages/experimental.mdx +++ b/site/pages/experimental.mdx @@ -31,7 +31,7 @@ const client = createWalletClient({ // [!code focus] ``` :::info -In a production app, it is highly recommended to pass through your authenticated RPC provider URL (Alchemy, Infura, Ankr, etc). If no URL is provided, viem will default to a public RPC provider. [Read more](/docs/clients/transports/http#usage). +In a production app, it is highly recommended to pass through your authenticated RPC provider URL (Alchemy, Infura, Thirdweb, etc). If no URL is provided, viem will default to a public RPC provider. [Read more](/docs/clients/transports/http#usage). ::: ### 2. Extend Client with Experimental Actions @@ -76,4 +76,4 @@ const id = await client.sendCalls({ // [!code focus] }, // [!code focus] ] // [!code focus] }) // [!code focus] -``` \ No newline at end of file +``` diff --git a/site/pages/op-stack.mdx b/site/pages/op-stack.mdx index 675775dd2d..e8dfebbb99 100644 --- a/site/pages/op-stack.mdx +++ b/site/pages/op-stack.mdx @@ -25,7 +25,7 @@ const client = createPublicClient({ // [!code focus] ``` :::info -In a production app, it is highly recommended to pass through your authenticated RPC provider URL (Alchemy, Infura, Ankr, etc). If no URL is provided, viem will default to a public RPC provider. [Read more](/docs/clients/transports/http#usage). +In a production app, it is highly recommended to pass through your authenticated RPC provider URL (Alchemy, Infura, Thirdweb, etc). If no URL is provided, viem will default to a public RPC provider. [Read more](/docs/clients/transports/http#usage). ::: ### 2. Extend Client with the OP Stack @@ -61,4 +61,4 @@ const l1Gas = await client.estimateL1Gas({ // [!code hl] to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', // [!code hl] value: parseEther('1') // [!code hl] }) // [!code hl] -``` \ No newline at end of file +``` diff --git a/src/chains/definitions/bsc.ts b/src/chains/definitions/bsc.ts index 17a68a3cf9..29b48e1840 100644 --- a/src/chains/definitions/bsc.ts +++ b/src/chains/definitions/bsc.ts @@ -9,7 +9,7 @@ export const bsc = /*#__PURE__*/ defineChain({ symbol: 'BNB', }, rpcUrls: { - default: { http: ['https://rpc.ankr.com/bsc'] }, + default: { http: ['https://56.rpc.thirdweb.com'] }, }, blockExplorers: { default: { diff --git a/src/chains/definitions/btr.ts b/src/chains/definitions/btr.ts index 1da7a4d474..6e2eefee9a 100644 --- a/src/chains/definitions/btr.ts +++ b/src/chains/definitions/btr.ts @@ -10,11 +10,7 @@ export const btr = /*#__PURE__*/ defineChain({ }, rpcUrls: { default: { - http: [ - 'https://rpc.bitlayer.org', - 'https://rpc.bitlayer-rpc.com', - 'https://rpc.ankr.com/bitlayer', - ], + http: ['https://rpc.bitlayer.org', 'https://rpc.bitlayer-rpc.com'], webSocket: ['wss://ws.bitlayer.org', 'wss://ws.bitlayer-rpc.com'], }, }, diff --git a/src/chains/definitions/chiliz.ts b/src/chains/definitions/chiliz.ts index c187502b48..e5edbb992b 100644 --- a/src/chains/definitions/chiliz.ts +++ b/src/chains/definitions/chiliz.ts @@ -11,10 +11,7 @@ export const chiliz = /*#__PURE__*/ defineChain({ }, rpcUrls: { default: { - http: [ - 'https://rpc.ankr.com/chiliz', - 'https://chiliz-rpc.publicnode.com', - ], + http: ['https://chiliz-rpc.publicnode.com'], }, }, blockExplorers: { diff --git a/src/chains/definitions/corn.ts b/src/chains/definitions/corn.ts index 50ad405fb4..d4d3a491f0 100644 --- a/src/chains/definitions/corn.ts +++ b/src/chains/definitions/corn.ts @@ -11,7 +11,7 @@ export const corn = /*#__PURE__*/ defineChain({ symbol: 'BTCN', }, rpcUrls: { - default: { http: ['https://rpc.ankr.com/corn_maizenet'] }, + default: { http: ['https://21000000.rpc.thirdweb.com'] }, }, blockExplorers: { default: { diff --git a/src/chains/definitions/cornTestnet.ts b/src/chains/definitions/cornTestnet.ts index 64fb0d10b1..19cd9048cd 100644 --- a/src/chains/definitions/cornTestnet.ts +++ b/src/chains/definitions/cornTestnet.ts @@ -11,7 +11,7 @@ export const cornTestnet = /*#__PURE__*/ defineChain({ symbol: 'BTCN', }, rpcUrls: { - default: { http: ['https://rpc.ankr.com/corn_testnet'] }, + default: { http: ['https://21000001.rpc.thirdweb.com'] }, }, blockExplorers: { default: { diff --git a/src/chains/definitions/fantom.ts b/src/chains/definitions/fantom.ts index ed9dcf1951..62b6c53ce6 100644 --- a/src/chains/definitions/fantom.ts +++ b/src/chains/definitions/fantom.ts @@ -9,7 +9,7 @@ export const fantom = /*#__PURE__*/ defineChain({ symbol: 'FTM', }, rpcUrls: { - default: { http: ['https://rpc.ankr.com/fantom'] }, + default: { http: ['https://250.rpc.thirdweb.com'] }, }, blockExplorers: { default: { diff --git a/src/chains/definitions/goerli.ts b/src/chains/definitions/goerli.ts index 63addf29a9..73dcee7dbf 100644 --- a/src/chains/definitions/goerli.ts +++ b/src/chains/definitions/goerli.ts @@ -6,7 +6,7 @@ export const goerli = /*#__PURE__*/ defineChain({ nativeCurrency: { name: 'Goerli Ether', symbol: 'ETH', decimals: 18 }, rpcUrls: { default: { - http: ['https://rpc.ankr.com/eth_goerli'], + http: ['https://5.rpc.thirdweb.com'], }, }, blockExplorers: { diff --git a/src/chains/definitions/harmonyOne.ts b/src/chains/definitions/harmonyOne.ts index 4ca027592a..5adbf068f6 100644 --- a/src/chains/definitions/harmonyOne.ts +++ b/src/chains/definitions/harmonyOne.ts @@ -9,7 +9,7 @@ export const harmonyOne = /*#__PURE__*/ defineChain({ decimals: 18, }, rpcUrls: { - default: { http: ['https://rpc.ankr.com/harmony'] }, + default: { http: ['https://1666600000.rpc.thirdweb.com'] }, }, blockExplorers: { default: { diff --git a/src/chains/definitions/polygonMumbai.ts b/src/chains/definitions/polygonMumbai.ts index 2dc8f8fde7..90a9c9a0ec 100644 --- a/src/chains/definitions/polygonMumbai.ts +++ b/src/chains/definitions/polygonMumbai.ts @@ -6,7 +6,7 @@ export const polygonMumbai = /*#__PURE__*/ defineChain({ nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 }, rpcUrls: { default: { - http: ['https://rpc.ankr.com/polygon_mumbai'], + http: ['https://80001.rpc.thirdweb.com'], }, }, blockExplorers: { diff --git a/src/chains/definitions/swellchain.ts b/src/chains/definitions/swellchain.ts index c5e2e3b871..89b15d6615 100644 --- a/src/chains/definitions/swellchain.ts +++ b/src/chains/definitions/swellchain.ts @@ -8,10 +8,7 @@ export const swellchain = /*#__PURE__*/ defineChain({ nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, rpcUrls: { default: { - http: [ - 'https://swell-mainnet.alt.technology', - 'https://rpc.ankr.com/swell', - ], + http: ['https://swell-mainnet.alt.technology'], }, }, blockExplorers: { diff --git a/src/utils/chain/defineChain.test.ts b/src/utils/chain/defineChain.test.ts index 075add2fa0..9e947370a4 100644 --- a/src/utils/chain/defineChain.test.ts +++ b/src/utils/chain/defineChain.test.ts @@ -10,7 +10,7 @@ test('default', () => { network: 'celo', nativeCurrency: { name: 'Celo', symbol: 'CELO', decimals: 18 }, rpcUrls: { - default: { http: ['https://rpc.ankr.com/celo'] }, + default: { http: ['https://42220.rpc.thirdweb.com'] }, }, }), ).toMatchInlineSnapshot(` @@ -28,7 +28,7 @@ test('default', () => { "rpcUrls": { "default": { "http": [ - "https://rpc.ankr.com/celo", + "https://42220.rpc.thirdweb.com", ], }, },