-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sign All Gas Limit and Price Parameters (#261)
Fixes #250 This PR changes the `SafeOperation` type to include ALL gas parameters for signing, instead of packing them. This ensures the maximum amount of data is available to the user when signing user operations, instead of trusting gas parameters from a Dapp. Note a subtle change in the order of the "fee per gas" fields, this was done to match the order in the `PackedUserOperation` struct, as well as the order in EIP-1559 transactions. I figured, since we are changing the signing format anyway (notice the different integer types), this wouldn't be a big deal. Additionally, we have a new test that verifies that `safeOp` hashes are computed off-chain in the same way they are computed on-chain. This is to catch issues with field orders being slightly different in the `EncodedSafeOp` struct that we would otherwise miss. Notably, the "fee per gas" parameters are always set to the same value, and our existing test suite was not able to catch swapped order in `EncodedSafeOp` fields.
- Loading branch information
Showing
12 changed files
with
1,586 additions
and
2,022 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.