Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shaggy-ducks-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Swapped defunct Ankr RPC URLs for Thirdweb
4 changes: 2 additions & 2 deletions site/pages/docs/ethers-migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
```

Expand Down
2 changes: 1 addition & 1 deletion site/pages/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions site/pages/experimental.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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).
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
Expand Down Expand Up @@ -76,4 +76,4 @@ const id = await client.sendCalls({ // [!code focus]
}, // [!code focus]
] // [!code focus]
}) // [!code focus]
```
```
4 changes: 2 additions & 2 deletions site/pages/op-stack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -61,4 +61,4 @@ const l1Gas = await client.estimateL1Gas({ // [!code hl]
to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', // [!code hl]
value: parseEther('1') // [!code hl]
}) // [!code hl]
```
```
2 changes: 1 addition & 1 deletion src/chains/definitions/bsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
6 changes: 1 addition & 5 deletions src/chains/definitions/btr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
},
},
Expand Down
5 changes: 1 addition & 4 deletions src/chains/definitions/chiliz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/chains/definitions/corn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/chains/definitions/cornTestnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/chains/definitions/fantom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/chains/definitions/goerli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/chains/definitions/harmonyOne.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/chains/definitions/polygonMumbai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shut down mumbai btw, so this rpc wont work

},
},
blockExplorers: {
Expand Down
5 changes: 1 addition & 4 deletions src/chains/definitions/swellchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/chain/defineChain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(`
Expand All @@ -28,7 +28,7 @@ test('default', () => {
"rpcUrls": {
"default": {
"http": [
"https://rpc.ankr.com/celo",
"https://42220.rpc.thirdweb.com",
],
},
},
Expand Down
Loading