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

refactor: rename getBytecode to getCode #2411

Merged
merged 2 commits into from
Jun 14, 2024
Merged

refactor: rename getBytecode to getCode #2411

merged 2 commits into from
Jun 14, 2024

Conversation

tmm
Copy link
Member

@tmm tmm commented Jun 14, 2024

  • Renames getBytecode to getCode to align with eth_getCode
  • Deprecates getBytecode-related exports

PR-Codex overview

This PR deprecates getBytecode and introduces getCode instead across multiple files.

Detailed summary

  • Deprecated getBytecode in favor of getCode.
  • Updated function names, imports, and types.
  • Modified test files to reflect the changes.
  • Updated documentation and examples.
  • Renamed getBytecode.md to getCode.md.

The following files were skipped due to too many changes: src/clients/decorators/public.ts, src/actions/public/getBytecode.test.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Jun 14, 2024

🦋 Changeset detected

Latest commit: ff2ff04

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Jun 14, 2024

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

Name Status Preview Updated (UTC)
viem ✅ Ready (Inspect) Visit Preview Jun 14, 2024 9:45pm

@tmm tmm force-pushed the tmm/rename-getBytecode branch from 5b7d746 to 3f3b4f4 Compare June 14, 2024 21:33
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
viem (esm) 58.06 KB (-0.03% 🔽) 1.2 s (-0.03% 🔽) 1.4 s (-7.54% 🔽) 2.6 s
viem (cjs) 69.14 KB (-0.01% 🔽) 1.4 s (-0.01% 🔽) 1.5 s (-46.28% 🔽) 2.9 s
viem (minimal surface - tree-shaking) 3.31 KB (0%) 67 ms (0%) 130 ms (+317.04% 🔺) 196 ms
viem/accounts 73.84 KB (0%) 1.5 s (0%) 491 ms (-32.7% 🔽) 2 s
viem/accounts (tree-shaking) 18.91 KB (0%) 379 ms (0%) 190 ms (-31.67% 🔽) 569 ms
viem/actions 45.04 KB (0%) 901 ms (0%) 777 ms (-25.19% 🔽) 1.7 s
viem/actions (tree-shaking) 318 B (0%) 10 ms (0%) 23 ms (+360.25% 🔺) 33 ms
viem/chains 28.52 KB (0%) 571 ms (0%) 565 ms (-28.58% 🔽) 1.2 s
viem/chains (tree-shaking) 324 B (0%) 10 ms (0%) 11 ms (+95.14% 🔺) 21 ms
viem/chains/utils 1.02 KB (0%) 21 ms (0%) 7 ms (-56.86% 🔽) 28 ms
viem/ens 45.02 KB (-0.06% 🔽) 901 ms (-0.06% 🔽) 950 ms (+52.81% 🔺) 1.9 s
viem/ens (tree-shaking) 21.74 KB (0%) 435 ms (0%) 701 ms (+29.18% 🔺) 1.2 s
viem/siwe 29.53 KB (0%) 591 ms (0%) 291 ms (-13.53% 🔽) 882 ms
viem/siwe (tree-shaking) 28.37 KB (0%) 568 ms (0%) 433 ms (-40.25% 🔽) 1.1 s

Copy link

codecov bot commented Jun 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.61%. Comparing base (dd6cccc) to head (ff2ff04).
Report is 23 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2411      +/-   ##
==========================================
+ Coverage   97.19%   99.61%   +2.42%     
==========================================
  Files         675      684       +9     
  Lines       56885    57609     +724     
  Branches     2484     2785     +301     
==========================================
+ Hits        55287    57386    +2099     
+ Misses       1583      207    -1376     
- Partials       15       16       +1     

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

@tmm tmm marked this pull request as ready for review June 14, 2024 21:43
@tmm tmm merged commit 2fc14e5 into main Jun 14, 2024
34 checks passed
@tmm tmm deleted the tmm/rename-getBytecode branch June 14, 2024 23:28
@github-actions github-actions bot mentioned this pull request Jun 14, 2024
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.

1 participant