-
Notifications
You must be signed in to change notification settings - Fork 144
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
Conversation
1d3f389
to
a0a181d
Compare
a0a181d
to
09356f6
Compare
@avasisht23 @dphilipson @rthomare @willhennessy @adam-alchemy @dancoombs This overview/type PR for updating to Entrypoint v0.7 is ready for review. |
1e7fe6a
to
549863f
Compare
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.
Looking good! Some initial comments.
|
||
#### `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. |
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.
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.
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.
![Screenshot 2024-04-19 at 9 42 34 PM](https://private-user-images.githubusercontent.com/3278577/324154254-b9225524-77fc-4d80-b849-c154153467d6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2Njg4NDQsIm5iZiI6MTczOTY2ODU0NCwicGF0aCI6Ii8zMjc4NTc3LzMyNDE1NDI1NC1iOTIyNTUyNC03N2ZjLTRkODAtYjg0OS1jMTU0MTUzNDY3ZDYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTZUMDExNTQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDdjMGYwOTFiMWZiYzkyZWY3M2MxNzY3NTdhOTE1OGM2MWFiMzk0ODFlYjNjZjgzYmY1NGFkYTY5YWYyMGY3MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.djFsoHa7rMls-mpcLzMca4reqdNNFJpEIN6d6Z6Wz_k)
"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
603477e
to
ab62d3d
Compare
fe12d27
to
bc2f34a
Compare
0508011
to
dc44fa5
Compare
bc2f34a
to
f6675ae
Compare
dc44fa5
to
2d4dd10
Compare
f6675ae
to
e41dcd0
Compare
2e8500f
to
1a6bdad
Compare
site/.vitepress/sidebar/index.ts
Outdated
@@ -26,6 +26,18 @@ export const sidebar: DefaultTheme.Sidebar = [ | |||
{ text: "Send UserOperations", link: "/send-uos" }, | |||
], | |||
}, | |||
{ | |||
text: "Migration Guides", |
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.
I thought we weren't going to be adding this section based on offline chats?
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 offline chats with me? don't remember, so any suggestions on where to put the Entrypoint v.7 doc then?
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 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
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.
Agreed. Sounds good. So the plan is remove Migration Guides section, and just put this along side of other guides under Using smart accounts.
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.
updated @willhennessy @moldy530
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.
e41dcd0
to
975249b
Compare
975249b
to
4355287
Compare
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 updates documentation and migration guides related to
EntryPoint
support inaa-sdk
.Detailed summary
EntryPoint Support
documentation.EntryPoint v0.7 Update Guide
.SmartContractAccount
instantiation withentryPoint
parameter.BundlerClient
andSmartAccountClient
forEntryPoint
version compatibility.UserOperationOverrides
forEntryPoint
v0.7.