-
Notifications
You must be signed in to change notification settings - Fork 138
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 low level support for 7702 #1193
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “graphite-merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
const implAddress = await account.getImplementationAddress(); | ||
if ( | ||
code === | ||
"0x00000000000000000000000000000000000000000000000001ff00" + |
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.
This isn't right, it should be 0xef0100 ++ address
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 could do starts with 0xEF
as a check since contracts can never be deployed with the EF
byte
} & Omit<CustomSource, "signTransaction" | "address">; | ||
} & Omit< | ||
CustomSource, | ||
"signTransaction" | "address" | "experimental_signAuthorization" |
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.
one caveat here: viem by default will use current nonce to sign the 1559 transaction, and use nonce +1 to sign authorization tuple. if we support 4337, UO is not tracked by native nonce, but by EP's nonce tracking. That means we have to override the default nonce viem used current nonce.
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.
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.
alternatively, I think we can set delegate: true
to skip incrementing the nonce
Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)PR-Codex overview
This PR primarily updates the
VERSION
across multiple files and introduces a new middleware function for signing user operations, along with related type and interface adjustments.Detailed summary
VERSION
to"4.6.0"
in multiple files.signAuthorization
method inSmartContractAccount
.default7702UserOpSigner
middleware function.UserOperationRequest
to include optionalauthorizationTuple
.default7702UserOpSigner
.