-
Notifications
You must be signed in to change notification settings - Fork 618
[SDK] Feature: Adds deploySmartAccount and re-adds 1271 signatures
#5845
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 deploySmartAccount and re-adds 1271 signatures
#5845
Conversation
🦋 Changeset detectedLatest commit: 720f290 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
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
*This pull request uses carry forward flags. Click here to find out more.
|
61f9bbc to
4a5b4b4
Compare
jnsdls
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conflicts, otherwise LGTM
| return hexToBool(result); | ||
| } catch (err) { | ||
| console.error("Error verifying ERC-6492 signature", err); | ||
| } catch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the actual issue here?
6492 should automatically use 1271 if the account is already deployed, the deployed check happens inside the universal validator contract.
We shouldn't need to force it manually ever
| contract, | ||
| }); | ||
| return result === EIP_1271_MAGIC_VALUE; | ||
| } catch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally really want to log something for the dev to understand why the sig was not valid, same with the catch above
| if (!deployTx) { | ||
| throw new Error("Create account override not provided"); | ||
| if (options.eagerDeployment) { | ||
| await forceDeploySmartAccount({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should only do this if the account is not deployed yet
4a5b4b4 to
f4678cd
Compare
eagerDeployment on smart account creationdeploySmartAccount and re-adds 1271 signatures
…ven-when-already-deployed
3664a2e to
ce0a301
Compare
c9a7120 to
7846be4
Compare
5f9ec1a to
d6f4727
Compare
d6f4727 to
11aa29f
Compare
11aa29f to
720f290
Compare
PR-Codex overview
This PR introduces the
deploySmartAccountfunction to facilitate the deployment of smart accounts and updates the handling of signatures for already deployed accounts to use ERC-1271 signatures.Detailed summary
deploySmartAccountfunction for deploying smart accounts.createWalletto include connection with smart wallets.decodeError,decodeFunctionData, anddecodeFunctionResultto useox__Abi.verifyHashandverifyEip1271Signature.