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: add ability to pass fully formed UserOperations to AA Actions. #2638

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

jxom
Copy link
Member

@jxom jxom commented Aug 22, 2024


PR-Codex overview

This PR enhances the toSmartAccount function by adding a nonceKeyManager property and allows passing full-formed User Operations to sendUserOperation and estimateUserOperationGas.

Detailed summary

  • Added nonceKeyManager property to toSmartAccount
  • Enhanced sendUserOperation to accept full-formed User Operations

The following files were skipped due to too many changes: src/account-abstraction/actions/bundler/sendUserOperation.ts, src/account-abstraction/actions/bundler/estimateUserOperationGas.ts, src/account-abstraction/actions/bundler/estimateUserOperationGas.test.ts

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

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 ✅ Ready (Inspect) Visit Preview Aug 22, 2024 2:44am

Copy link

changeset-bot bot commented Aug 22, 2024

🦋 Changeset detected

Latest commit: 0f049d4

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
Contributor

github-actions bot commented Aug 22, 2024

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.6 s (-25.8% 🔽) 2.8 s
const viem = require('viem') (cjs) 71 KB (0%) 1.5 s (0%) 1.4 s (-28.54% 🔽) 2.8 s
import { createClient, http } from 'viem' 6.22 KB (0%) 125 ms (0%) 98 ms (-0.92% 🔽) 223 ms
import * from 'viem/account-abstraction' 43.74 KB (+0.1% 🔺) 875 ms (+0.1% 🔺) 1.1 s (-39.43% 🔽) 2 s
import { toCoinbaseSmartAccount } from 'viem/account-abstraction' 34.01 KB (+0.32% 🔺) 681 ms (+0.32% 🔺) 925 ms (-19.57% 🔽) 1.7 s
import * from 'viem/accounts' 74.61 KB (0%) 1.5 s (0%) 823 ms (+22.79% 🔺) 2.4 s
import { privateKeyToAccount } from 'viem/accounts' 19.37 KB (0%) 388 ms (0%) 607 ms (-7.24% 🔽) 995 ms
import * from 'viem/actions' 45.9 KB (0%) 919 ms (0%) 2.3 s (+149.98% 🔺) 3.3 s
import { getBlockNumber } from 'viem/actions' 318 B (0%) 10 ms (0%) 7 ms (-33.1% 🔽) 17 ms
import * from 'viem/chains' 31.09 KB (0%) 622 ms (0%) 806 ms (+27.11% 🔺) 1.5 s
import { mainnet } from 'viem/chains' 324 B (0%) 10 ms (0%) 11 ms (+59.7% 🔺) 21 ms
import * from 'viem/chains/utils' 1.08 KB (0%) 22 ms (0%) 10 ms (-82.56% 🔽) 32 ms
import * from 'viem/ens' 45.45 KB (0%) 909 ms (0%) 653 ms (+84.87% 🔺) 1.6 s
import { getEnsAvatar } from 'viem/ens' 22.13 KB (0%) 443 ms (0%) 769 ms (+20.79% 🔺) 1.3 s
import * from 'viem/siwe' 30.23 KB (0%) 605 ms (0%) 727 ms (-49.06% 🔽) 1.4 s
import { verifySiweMessage } from 'viem/siwe' 29.17 KB (0%) 584 ms (0%) 1.2 s (+15.93% 🔺) 1.8 s

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 99.15254% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.65%. Comparing base (9a1c6ab) to head (0f049d4).
Report is 5 commits behind head on main.

Files Patch % Lines
...t-abstraction/actions/bundler/sendUserOperation.ts 98.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2638      +/-   ##
==========================================
- Coverage   99.65%   99.65%   -0.01%     
==========================================
  Files         777      777              
  Lines       70307    70435     +128     
  Branches     3275     3287      +12     
==========================================
+ Hits        70063    70189     +126     
- Misses        229      231       +2     
  Partials       15       15              

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

@jxom jxom merged commit 9cbd082 into main Aug 22, 2024
33 of 36 checks passed
@jxom jxom deleted the jxom/aa-tweaks branch August 22, 2024 02:22
@github-actions github-actions bot mentioned this pull request Aug 22, 2024
@tmm tmm mentioned this pull request Dec 21, 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