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

[SDK] Feature: Adds eagerDeployment on smart account creation #5845

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Dec 27, 2024

  • Also reverts back to using ERC-1271 for deployed accounts.

PR-Codex overview

This PR introduces the eagerDeployment option for smart accounts, allowing them to deploy before signing messages. This feature is designed for accounts needing EIP-1271 signatures, enhancing the signing process with improved deployment behavior.

Detailed summary

  • Added eagerDeployment option in types.ts.
  • Updated documentation to explain eagerDeployment usage.
  • Modified smart-wallet.ts to deploy accounts before signing messages if eagerDeployment is true.
  • Renamed signing functions for clarity (deployAndSignMessage to smartAccountSignMessage).
  • Enhanced error handling in verifyEip1271Signature.
  • Added tests for eagerDeployment behavior in smart-wallet-integration-v07.test.ts and smart-wallet-integration.test.ts.
  • Introduced forceDeploySmartAccount function to handle forced deployments.

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

@gregfromstl gregfromstl requested review from a team as code owners December 27, 2024 20:45
Copy link

linear bot commented Dec 27, 2024

Copy link

changeset-bot bot commented Dec 27, 2024

🦋 Changeset detected

Latest commit: 61f9bbc

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

This PR includes changesets to release 2 packages
Name Type
thirdweb Minor
@thirdweb-dev/wagmi-adapter 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 Dec 27, 2024

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 27, 2024 9:24pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 27, 2024 9:24pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 27, 2024 9:24pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 27, 2024 9:24pm

Copy link

graphite-app bot commented Dec 27, 2024

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link
Contributor

github-actions bot commented Dec 27, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 45.05 KB (-0.05% 🔽) 901 ms (-0.05% 🔽) 2.7 s (-2.25% 🔽) 3.6 s
thirdweb (cjs) 110.72 KB (-0.2% 🔽) 2.3 s (-0.2% 🔽) 8.2 s (+24.7% 🔺) 10.4 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 251 ms (-26.98% 🔽) 363 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 78 ms (-17.92% 🔽) 88 ms
thirdweb/react (minimal + tree-shaking) 19.15 KB (+0.16% 🔺) 383 ms (+0.16% 🔺) 661 ms (+60.54% 🔺) 1.1 s

Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 81.94444% with 26 lines in your changes missing coverage. Please review.

Project coverage is 54.56%. Comparing base (7293dfa) to head (4a5b4b4).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/thirdweb/src/wallets/smart/lib/signing.ts 79.36% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5845      +/-   ##
==========================================
+ Coverage   54.53%   54.56%   +0.03%     
==========================================
  Files        1105     1105              
  Lines       59332    59409      +77     
  Branches     4924     4931       +7     
==========================================
+ Hits        32354    32414      +60     
- Misses      26258    26274      +16     
- Partials      720      721       +1     
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 7293dfa
packages 52.06% <81.94%> (+0.04%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
packages/thirdweb/src/auth/verify-hash.ts 72.82% <100.00%> (+2.03%) ⬆️
packages/thirdweb/src/wallets/create-wallet.ts 26.48% <ø> (ø)
packages/thirdweb/src/wallets/smart/index.ts 56.54% <100.00%> (+0.22%) ⬆️
...ackages/thirdweb/src/wallets/smart/smart-wallet.ts 78.43% <ø> (ø)
packages/thirdweb/src/wallets/smart/types.ts 69.04% <ø> (ø)
packages/thirdweb/src/wallets/smart/lib/signing.ts 85.65% <79.36%> (-1.50%) ⬇️

... and 4 files with indirect coverage changes

feat(sdk): add eagerDeployment option to smart wallets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages SDK Involves changes to the thirdweb SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant