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

docs: entrypoint v.7 related update doc #594

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Conversation

denniswon
Copy link
Contributor

@denniswon denniswon commented Apr 18, 2024

Screenshot 2024-04-19 at 1 02 59 AM Screenshot 2024-04-19 at 1 03 19 AM Screenshot 2024-04-19 at 1 03 33 AM Screenshot 2024-04-19 at 1 03 49 AM Screenshot 2024-04-19 at 1 04 34 AM Screenshot 2024-04-19 at 1 04 48 AM Screenshot 2024-04-19 at 1 05 24 AM Screenshot 2024-04-19 at 1 11 35 AM

Pull Request Checklist


PR-Codex overview

This PR updates documentation and migration guides related to EntryPoint support in aa-sdk.

Detailed summary

  • Added EntryPoint Support documentation.
  • Added EntryPoint v0.7 Update Guide.
  • Updated SmartContractAccount instantiation with entryPoint parameter.
  • Updated BundlerClient and SmartAccountClient for EntryPoint version compatibility.
  • Updated UserOperationOverrides for EntryPoint v0.7.

The following files were skipped due to too many changes: site/using-smart-accounts/entrypoint-v7.md

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

@denniswon denniswon force-pushed the denniswon/entrypoint-v7-doc branch 6 times, most recently from 1d3f389 to a0a181d Compare April 19, 2024 07:54
@denniswon denniswon changed the title docs: entrypoint v.7 docs docs: updating to entrypoint v.7 overview Apr 19, 2024
@denniswon denniswon marked this pull request as ready for review April 19, 2024 07:54
@denniswon denniswon force-pushed the denniswon/entrypoint-v7-doc branch from a0a181d to 09356f6 Compare April 19, 2024 08:13
@denniswon
Copy link
Contributor Author

@avasisht23 @dphilipson @rthomare @willhennessy @adam-alchemy @dancoombs

This overview/type PR for updating to Entrypoint v0.7 is ready for review.

@denniswon denniswon force-pushed the denniswon/entrypoint-v7-doc branch 2 times, most recently from 1e7fe6a to 549863f Compare April 19, 2024 22:06
Copy link
Contributor

@dphilipson dphilipson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Some initial comments.

site/migration-guides/entrypoint-v7.md Outdated Show resolved Hide resolved
site/migration-guides/entrypoint-v7.md Outdated Show resolved Hide resolved
site/migration-guides/entrypoint-v7.md Outdated Show resolved Hide resolved

#### `stateOverride` field added to `UserOperationOverrides` for validating and estimating gas for transactions

The state overrides during transaction calls (e.g., [`eth_call`](https://docs.alchemy.com/reference/eth-call) and [`eth_estimateGas`](https://docs.alchemy.com/reference/eth-estimategas)) allow for more flexible testing and gas estimation. However, not all networks support this feature. For networks lacking state overrides, `Entrypoint` v0.7 introduced the `delegateAndRevert()` function to be used as a workaround. It aids in validating and estimating gas for transactions by simulating conditions without permanently changing the on-chain state.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed in person: this is not what delegateAndRevert is for. delegateAndRevert is useful internally for bundlers but not for common uses for most developers.

The new state overrides, as an argument to eth_estimateUserOperationGas are a separate feature and does depend on state overrides being present in the chain using them. This is because general-purpose state overrides can change the state of any address, including balance, code, or storage, while delegateAndRevert is only useful for changing the code of the entry point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-04-19 at 9 42 34 PM but according to the official v0.7 release note, and the linked [PR](https://github.com/eth-infinitism/account-abstraction/pull/365) for `delegateAndRevert`, it says

"Minimal "static" call from EntryPoint to simulate special cases. Equivalent to the EntryPointSimulations in purpose, but doesn't require stateOverride.
Executes code on behalf of entryPoint using delegateCall, and revert with the result"

This sounds like this enables similar start overrides-like simulation to be done on chains without state overrides support in eth_call/eth_estimateGas?

cc: @dancoombs

@denniswon denniswon force-pushed the denniswon/entrypoint-v7-doc branch 4 times, most recently from 603477e to ab62d3d Compare April 21, 2024 01:57
@denniswon denniswon changed the base branch from main to denniswon/nit-doc April 21, 2024 02:04
@denniswon denniswon force-pushed the denniswon/entrypoint-v7-doc branch 3 times, most recently from fe12d27 to bc2f34a Compare April 21, 2024 02:17
@denniswon denniswon changed the base branch from denniswon/nit-doc to denniswon/doc-middleware April 21, 2024 02:24
@denniswon denniswon force-pushed the denniswon/doc-middleware branch from 0508011 to dc44fa5 Compare April 21, 2024 03:54
@denniswon denniswon force-pushed the denniswon/entrypoint-v7-doc branch from bc2f34a to f6675ae Compare April 21, 2024 04:00
@denniswon denniswon deleted the branch main April 21, 2024 16:06
@denniswon denniswon closed this Apr 21, 2024
@denniswon denniswon deleted the denniswon/entrypoint-v7-doc branch April 21, 2024 16:07
@denniswon denniswon restored the denniswon/entrypoint-v7-doc branch April 21, 2024 16:12
@denniswon denniswon reopened this Apr 21, 2024
@denniswon denniswon force-pushed the denniswon/doc-middleware branch from dc44fa5 to 2d4dd10 Compare April 21, 2024 17:49
@denniswon denniswon force-pushed the denniswon/entrypoint-v7-doc branch from f6675ae to e41dcd0 Compare April 21, 2024 17:49
@denniswon denniswon changed the title docs: updating to entrypoint v.7 overview docs: entrypoint v.7 related update doc Apr 22, 2024
@denniswon denniswon force-pushed the denniswon/doc-middleware branch 2 times, most recently from 2e8500f to 1a6bdad Compare April 23, 2024 03:31
Base automatically changed from denniswon/doc-middleware to main April 23, 2024 03:37
@@ -26,6 +26,18 @@ export const sidebar: DefaultTheme.Sidebar = [
{ text: "Send UserOperations", link: "/send-uos" },
],
},
{
text: "Migration Guides",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we weren't going to be adding this section based on offline chats?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what offline chats with me? don't remember, so any suggestions on where to put the Entrypoint v.7 doc then?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't so much a migration guide as those are meant to just be migrations between versions of the SDK. This to me seems more like it should be a doc under Using smart accounts called Switching entry point versions or something. defer to will on the correct name in the side bar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Sounds good. So the plan is remove Migration Guides section, and just put this along side of other guides under Using smart accounts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-04-23 at 9 25 24 AM

@denniswon denniswon force-pushed the denniswon/entrypoint-v7-doc branch from e41dcd0 to 975249b Compare April 23, 2024 16:26
@denniswon denniswon force-pushed the denniswon/entrypoint-v7-doc branch from 975249b to 4355287 Compare April 23, 2024 16:28
@denniswon denniswon merged commit 124b985 into main Apr 23, 2024
2 checks passed
@denniswon denniswon deleted the denniswon/entrypoint-v7-doc branch April 23, 2024 16:42
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.

3 participants