Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ankr => thirdweb for default rpc urls #3475

Merged
merged 2 commits into from
Mar 19, 2025
Merged

fix: ankr => thirdweb for default rpc urls #3475

merged 2 commits into from
Mar 19, 2025

Conversation

tmm
Copy link
Member

@tmm tmm commented Mar 19, 2025

ankr rugging public rpc urls, thirdweb better anyway
https://x.com/ankr/status/1901666598257401881

Copy link

vercel bot commented Mar 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
viem ❌ Failed (Inspect) Mar 19, 2025 3:40pm

Copy link

changeset-bot bot commented Mar 19, 2025

⚠️ No Changeset found

Latest commit: 5142ba7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tmm tmm changed the title tmm/rm ankr fix: ankr => thirdweb for default rpc urls Mar 19, 2025
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.66%. Comparing base (7f7706e) to head (778ba49).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3475   +/-   ##
=======================================
  Coverage   99.65%   99.66%           
=======================================
  Files         982      982           
  Lines       76342    76332   -10     
  Branches     3306     3306           
=======================================
- Hits        76078    76075    -3     
+ Misses        241      236    -5     
+ Partials       23       21    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
import * from 'viem' (esm) 66.97 KB (0%) 1.4 s (0%) 4.1 s (+109.29% 🔺) 5.5 s
const viem = require('viem') (cjs) 80.77 KB (0%) 1.7 s (0%) 4.2 s (-59.15% 🔽) 5.9 s
import { createClient, http } from 'viem' 4.25 KB (0%) 85 ms (0%) 1.4 s (+2054.59% 🔺) 1.5 s
import * from 'viem/account-abstraction' 47.68 KB (0%) 954 ms (0%) 3.7 s (+33.09% 🔺) 4.6 s
import * from 'viem/accounts' 82.08 KB (0%) 1.7 s (0%) 1.6 s (-53.13% 🔽) 3.3 s
import { privateKeyToAccount } from 'viem/accounts' 20.67 KB (0%) 414 ms (0%) 2.1 s (-34.15% 🔽) 2.5 s
import { mnemonicToAccount } from 'viem/accounts' 27.04 KB (0%) 541 ms (0%) 2.3 s (-18.59% 🔽) 2.8 s
import * from 'viem/actions' 52.34 KB (0%) 1.1 s (0%) 3.7 s (-6.49% 🔽) 4.7 s
import { getBlockNumber } from 'viem/actions' 318 B (0%) 10 ms (0%) 28 ms (-81.76% 🔽) 38 ms
import * from 'viem/chains' 45.47 KB (-0.13% 🔽) 910 ms (-0.13% 🔽) 5.7 s (+124.24% 🔺) 6.7 s
import { mainnet } from 'viem/chains' 325 B (0%) 10 ms (0%) 20 ms (-71.14% 🔽) 30 ms
import * from 'viem/chains/utils' 1.08 KB (0%) 22 ms (0%) 278 ms (+95.98% 🔺) 299 ms
import * from 'viem/ens' 46.16 KB (0%) 924 ms (0%) 3.1 s (+126.04% 🔺) 4 s
import { getEnsAvatar } from 'viem/ens' 22.46 KB (0%) 450 ms (0%) 1.9 s (-19.99% 🔽) 2.3 s
import * from 'viem/siwe' 31.54 KB (0%) 631 ms (0%) 2.8 s (-9.88% 🔽) 3.5 s
import { verifySiweMessage } from 'viem/siwe' 30.5 KB (0%) 610 ms (0%) 4.4 s (+8.79% 🔺) 5 s

@imornar
Copy link

imornar commented Mar 19, 2025

Hi, thanks for handling this, any ETA when this might get in and released?

Copy link
Contributor

@jnsdls jnsdls left a comment

Choose a reason for hiding this comment

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

tiny nit - otherwise 🎉

@@ -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).

@jxom jxom merged commit cc47bba into main Mar 19, 2025
33 of 35 checks passed
@jxom jxom deleted the tmm/rm-ankr branch March 19, 2025 19:11
@github-actions github-actions bot mentioned this pull request Mar 19, 2025
@@ -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

@jTiKey
Copy link

jTiKey commented Mar 26, 2025

After this change, I'm getting cors errors:

Access to fetch at 'https://56.rpc.thirdweb.com/' from origin '--- has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants