-
Notifications
You must be signed in to change notification settings - Fork 670
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
AA-176: Add ERC-165 "supportsInterface" to the EntryPoint #331
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
973ccfb
AA-176: Add ERC-165 "supportsInterface" to the EntryPoint
forshtat 5b1fd76
Update 'gas-checker.txt'
forshtat 9783ff0
WTF
forshtat 3a5c478
Separate main test and other tests
forshtat c7772ff
Remove 'IERC165' from 'IEntryPoint' inheritance
forshtat e4ef73a
Add comment
forshtat 9df75e1
Update 'gas-checker.txt'
forshtat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,28 +12,28 @@ | |
║ │ │ │ (delta for │ (compared to ║ | ||
║ │ │ │ one UserOp) │ account.exec()) ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple │ 1 │ 81899 │ │ ║ | ||
║ simple │ 1 │ 81943 │ │ ║ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cost 40 per op? 250 per 10 ? |
||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple - diff from previous │ 2 │ │ 44186 │ 15172 ║ | ||
║ simple - diff from previous │ 2 │ │ 44208 │ 15194 ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple │ 10 │ 479702 │ │ ║ | ||
║ simple │ 10 │ 479920 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple - diff from previous │ 11 │ │ 44222 │ 15208 ║ | ||
║ simple - diff from previous │ 11 │ │ 44280 │ 15266 ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple paymaster │ 1 │ 88182 │ │ ║ | ||
║ simple paymaster │ 1 │ 88202 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple paymaster with diff │ 2 │ │ 43175 │ 14161 ║ | ||
║ simple paymaster with diff │ 2 │ │ 43197 │ 14183 ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple paymaster │ 10 │ 476938 │ │ ║ | ||
║ simple paymaster │ 10 │ 477156 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ simple paymaster with diff │ 11 │ │ 43234 │ 14220 ║ | ||
║ simple paymaster with diff │ 11 │ │ 43184 │ 14170 ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ big tx 5k │ 1 │ 182932 │ │ ║ | ||
║ big tx 5k │ 1 │ 183000 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ big tx - diff from previous │ 2 │ │ 144721 │ 19461 ║ | ||
║ big tx - diff from previous │ 2 │ │ 144719 │ 19459 ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ big tx 5k │ 10 │ 1485370 │ │ ║ | ||
║ big tx 5k │ 10 │ 1485612 │ │ ║ | ||
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢ | ||
║ big tx - diff from previous │ 11 │ │ 144710 │ 19450 ║ | ||
║ big tx - diff from previous │ 11 │ │ 144720 │ 19460 ║ | ||
╚════════════════════════════════╧═══════╧═══════════════╧════════════════╧═════════════════════╝ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Interface, JsonFragment } from '@ethersproject/abi' | ||
|
||
export function getERC165InterfaceID (abi: JsonFragment[]): string { | ||
let interfaceId = | ||
abi | ||
.filter(it => it.type === 'function' && it.name != null) | ||
.map(it => { | ||
const iface = new Interface([it]) | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
return iface.getSighash(it.name!) | ||
}) | ||
.map((x) => parseInt(x, 16)) | ||
.reduce((x, y) => x ^ y) | ||
interfaceId = interfaceId > 0 ? interfaceId : 0xFFFFFFFF + interfaceId + 1 | ||
return '0x' + interfaceId.toString(16).padStart(8, '0') | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as resolved.
Sorry, something went wrong.