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

feat: update sendCalls to match EIP-5792 spec #2641

Merged
merged 2 commits into from
Aug 22, 2024
Merged

feat: update sendCalls to match EIP-5792 spec #2641

merged 2 commits into from
Aug 22, 2024

Conversation

jxom
Copy link
Member

@jxom jxom commented Aug 22, 2024


PR-Codex overview

This PR deprecates writeContracts in favor of sendCalls and updates its usage to match EIP-5792 spec.

Detailed summary

  • Deprecated writeContracts in favor of sendCalls
  • Updated sendCalls to accept contract function interfaces
  • Updated sendCalls to include chainId per call
  • Improved type definitions for contract calls in sendCalls
  • Added test for contract configuration in sendCalls

The following files were skipped due to too many changes: src/experimental/eip5792/actions/sendCalls.test.ts

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

Copy link

changeset-bot bot commented Aug 22, 2024

🦋 Changeset detected

Latest commit: 9c0532d

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 Aug 22, 2024

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

Name Status Preview Updated (UTC)
viem 🛑 Canceled (Inspect) Aug 22, 2024 2:08am

Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
import * from 'viem' (esm) 60.33 KB (0%) 1.3 s (0%) 1.4 s (-17.09% 🔽) 2.6 s
const viem = require('viem') (cjs) 71 KB (0%) 1.5 s (0%) 1.6 s (-41.42% 🔽) 3 s
import { createClient, http } from 'viem' 6.22 KB (0%) 125 ms (0%) 144 ms (+98.4% 🔺) 269 ms
import * from 'viem/account-abstraction' 43.7 KB (0%) 874 ms (0%) 648 ms (-2.47% 🔽) 1.6 s
import { toCoinbaseSmartAccount } from 'viem/account-abstraction' 33.91 KB (0%) 679 ms (0%) 613 ms (-22.23% 🔽) 1.3 s
import * from 'viem/accounts' 74.61 KB (0%) 1.5 s (0%) 940 ms (+48.83% 🔺) 2.5 s
import { privateKeyToAccount } from 'viem/accounts' 19.37 KB (0%) 388 ms (0%) 259 ms (-40.1% 🔽) 646 ms
import * from 'viem/actions' 45.9 KB (0%) 919 ms (0%) 970 ms (+40.55% 🔺) 1.9 s
import { getBlockNumber } from 'viem/actions' 318 B (0%) 10 ms (0%) 5 ms (-90.56% 🔽) 15 ms
import * from 'viem/chains' 31.09 KB (0%) 622 ms (0%) 510 ms (-18.13% 🔽) 1.2 s
import { mainnet } from 'viem/chains' 324 B (0%) 10 ms (0%) 6 ms (+1.62% 🔺) 16 ms
import * from 'viem/chains/utils' 1.08 KB (0%) 22 ms (0%) 12 ms (+79.16% 🔺) 34 ms
import * from 'viem/ens' 45.45 KB (0%) 909 ms (0%) 516 ms (+43.39% 🔺) 1.5 s
import { getEnsAvatar } from 'viem/ens' 22.13 KB (0%) 443 ms (0%) 499 ms (-40.66% 🔽) 941 ms
import * from 'viem/siwe' 30.23 KB (+0.01% 🔺) 605 ms (+0.01% 🔺) 562 ms (+3.76% 🔺) 1.2 s
import { verifySiweMessage } from 'viem/siwe' 29.11 KB (-0.18% 🔽) 583 ms (-0.18% 🔽) 611 ms (+15.48% 🔺) 1.2 s

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.65%. Comparing base (f383a8e) to head (9c0532d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2641      +/-   ##
==========================================
- Coverage   99.67%   99.65%   -0.02%     
==========================================
  Files         777      777              
  Lines       70293    70392      +99     
  Branches     3276     3280       +4     
==========================================
+ Hits        70062    70150      +88     
- Misses        217      227      +10     
- Partials       14       15       +1     

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

@jxom jxom merged commit 89d11ed into main Aug 22, 2024
35 of 36 checks passed
@jxom jxom deleted the jxom/send-calls-up branch August 22, 2024 02:12
@github-actions github-actions bot mentioned this pull request Aug 22, 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