-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 ERC7715 grant_permissions support on lab #2500
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
apps/laboratory/src/components/Wagmi/WagmiRequestPermissionsTest.tsx
Outdated
Show resolved
Hide resolved
PR is missing description |
apps/laboratory/src/components/Wagmi/WagmiCreatePrivateKeySignerTest.tsx
Show resolved
Hide resolved
function onCreateNewPrivateKey() { | ||
try { | ||
const privateKey = generatePrivateKey() | ||
setItem(LOCAL_SIGNER_KEY, privateKey) |
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.
should we remove this at some point?
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.
@lukaisailovic do we want a test for this? It's not appkit specific behavior but if we want it to be tested it would require a playwright test
@tomiir I don't think its necessary now, since its not a part of AppKit. This is the preparation for integration of Sessions in our Universal Wallet. At that point we will add tests. |
enabled using local AA infra by setting env variables
const userOpHash = getUserOperationHash({ | ||
userOperation: { | ||
...userOp | ||
}, |
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.
If we don't pass any other fields here, we don't have to destruct the object and directly use the ref. (In case it's not required for cloning object purposes)
const userOpHash = getUserOperationHash({ | |
userOperation: { | |
...userOp | |
}, | |
const userOpHash = getUserOperationHash({ | |
userOperation: userOp, |
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.
My only question is: do we need to clear the signer when the user disconnects?
Else looks good!
Description
This PR is enabling support for ERC 7715 new JSON-RPC method
wallet_grantPermissions
for DApp to request permissions from a wallet in order to execute transactions on users’s behalf. This enables :The PR would need addition of one manadory .env values
NEXT_PUBLIC_PIMLICO_KEY
which is used to submit userOperation.This PR also enable testing this on a local AA infra running over forked sepolia chain.
For more information on how to set up local testing, refer to how to setup local-testing.
When running the project locally and wanting to use the local forked network and AA setup, just add the
.env
variable values, and the project will automatically use the local setup:Interface changes
Page: /library/wagmi-permissions
# Breaking ChangesChanges
Associated Issues
Closes RES-6