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

Packing UserOperation and paymaster gas limits #393

Merged
merged 10 commits into from
Jan 3, 2024

Conversation

drortirosh
Copy link
Contributor

@drortirosh drortirosh commented Jan 3, 2024

Supplement the main "Packing UserOperation" PR: #363

shahafn and others added 10 commits January 2, 2024 11:19
* Removing obsolete gnosis safe module
* add separate test for paymaster with postOp

we use our "gas tests" to check the impact of specific version.
it is important to to break tests.
This PR make "simple paymaster" simple again, and adds a separte test of
"paymaster with postOp"

tests are ordered so that they can be directly diff'ed with (say) v0.6.0
contracts
* separate TestPaymasterWithPostOp
* upgrade solidity to 0.8.23
* Use OpenZeppelin v0.5
* AA-237: paymaster: check EntryPoint's interface

verify the paymaster is configured with EntryPoint with the expected
IEntryPoint interface.

* update sample for contract with supportsInterface() method
process the entire UserOp during account execution.

The account MAY implement a method:
```javascript
function executeUserOp(UserOperation userOp, bytes32 userOpHash)
```
if it needs parts of the UserOp during its execution.

(note that account is not required to use it: it may continue to use standard "execute" methods, and even support both calling conventions, for different userops)

To signal the EntryPoint to call this method, the wallet should start the `userOp.callData` with the "magic" value - `executeUserOp.selector`

Note that the calldata is no longer directly callable - since obviously the rest of the callData is NOT the parameters of executeUserOp.

The account should parse the callData to remove this 4-byte prefix and process the rest of the callData as it sees fit.
See the `TestExecAccount` for a sample that uses this callData.

The calling wallet should properly encode this call data.

### Passing information between validation and execution.

If the account needs to transfer information from the validateUserOp to the executeUserOp, it should use storage (or, when available, `transient storage`) based on the **userOpHash**, which is the same value for both validate and execute.
update storage mapping for major use-case (handleOps)
@drortirosh drortirosh merged commit 87a8eac into packed-gas-limits Jan 3, 2024
8 checks passed
@drortirosh drortirosh changed the title PackedUserOp merge develop Packing UserOperation and paymaster gas limits Jan 10, 2024
@drortirosh drortirosh deleted the dror-packeduserop branch January 28, 2024 17:33
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.

2 participants