-
Notifications
You must be signed in to change notification settings - Fork 183
Add Account and increase pragma to 0.8.27 #486
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
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
c307896
WIP: Add Account
ernestognw bdff9fd
Fix imports and bump OZ Contracts
ernestognw 5c6d48e
Rewrite
ernestognw f08c43e
UI Update
ernestognw 8db6933
Add ERC-7821 execution
ernestognw dee4c35
Add Paymaster
ernestognw c2d9203
UI Changes
ernestognw 194d983
Change compiler version and fix resolution of isValidSignature
ernestognw 6e3d64f
Merge branch 'master' into feature/accounts
ernestognw 9eb0614
Merge branch 'master' into feature/accounts
ernestognw b192934
Deprecate AccountCore
ernestognw 3d858f0
Add 7821 explanation
ernestognw 2684262
Merge branch 'master' into feature/accounts
ernestognw 131d4a1
Adjust CHANGELOG
ernestognw 57bfd02
up
ernestognw 089fa74
Use 0.8.27
ernestognw 41ca8cc
Remove paymaster
ernestognw 6004cd3
Update
ernestognw 3179fca
Merge branch 'master' into feature/accounts
ernestognw 91ff04a
up
ernestognw 6b44292
Update snapshots
ernestognw 3e35883
up
ernestognw 2791da4
lint
ernestognw c7a6905
update language.ts
ernestognw e2c5cf5
ADd solidityAccountAIFunctionDefinition
ernestognw 9ba59e4
Upgrade to hardhat 2.22.11 with support for Solidity 0.8.27
ernestognw bfc82d7
Upgrade to hardhat 2.22.11 with support for Solidity 0.8.27
ernestognw 5c1eaf8
Improve comments
ernestognw cdc8591
chore: empty commit
ernestognw ebee0c8
Update packages/ui/src/solidity/AccountControls.svelte
ernestognw 066fd4a
Update packages/ui/src/solidity/AccountControls.svelte
ernestognw 3081dfb
Update packages/ui/src/solidity/AccountControls.svelte
ernestognw 85ead5c
Update packages/ui/src/solidity/AccountControls.svelte
ernestognw 105ef3d
Update packages/ui/src/solidity/AccountControls.svelte
ernestognw fbd7ca8
Apply suggestions from code review
ernestognw 111ab67
Update packages/ui/src/solidity/AccountControls.svelte
ernestognw 5fa3f9c
Apply review suggestions
ernestognw bfdaa32
up
ernestognw be23c70
Update AccountOptions
ernestognw 505ae67
fix test
ernestognw d7796cf
Fix issues
ernestognw bcc673d
up
ernestognw 498a46d
Use ExpandableToggleRadio for signer
ernestognw 8f0cd8f
up
ernestognw f3a9e50
up
ernestognw 3b7ab59
Adjust styling and grammar
ericglau d65e8f2
Remove upgradeable and access from Account options type
ericglau 7f9db90
Format svelte
ericglau 872129f
Revert "Remove upgradeable and access from Account options type"
ericglau 2020082
Set access ai options to false
ericglau ad55698
Force upgradeable and access to false
ericglau cd84fe5
Update CHANGELOG.md
ericglau 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 hidden or 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 |
|---|---|---|
|
|
@@ -35,4 +35,4 @@ | |
| "typescript-eslint": "^8.29.0", | ||
| "wsrun": "^5.2.4" | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,109 @@ | ||
| import test from 'ava'; | ||
| import { account } from '.'; | ||
|
|
||
| import type { AccountOptions } from './account'; | ||
| import { buildAccount } from './account'; | ||
| import { printContract } from './print'; | ||
|
|
||
| /** | ||
| * Tests external API for equivalence with internal API | ||
| */ | ||
| function testAPIEquivalence(title: string, opts?: AccountOptions) { | ||
| test(title, t => { | ||
| t.is( | ||
| account.print(opts), | ||
| printContract( | ||
| buildAccount({ | ||
| name: 'MyAccount', | ||
| signatureValidation: 'ERC7739', | ||
| ERC721Holder: true, | ||
| ERC1155Holder: true, | ||
| batchedExecution: false, | ||
| ERC7579Modules: false, | ||
| ...opts, | ||
| }), | ||
| ), | ||
| ); | ||
| }); | ||
| } | ||
|
|
||
| function testAccount(title: string, opts: Partial<AccountOptions>) { | ||
| const fullOpts = { | ||
| name: 'MyAccount', | ||
| ERC1271: false as const, | ||
| ERC721Holder: false, | ||
| ERC1155Holder: false, | ||
| ERC7821: false as const, | ||
| ERC7579: false as const, | ||
| ...opts, | ||
| }; | ||
| test(title, t => { | ||
| const c = buildAccount(fullOpts); | ||
| t.snapshot(printContract(c)); | ||
| }); | ||
| testAPIEquivalence(`${title} API equivalence`, fullOpts); | ||
| } | ||
|
|
||
| testAPIEquivalence('account API default'); | ||
|
|
||
| test('account API assert defaults', async t => { | ||
| t.is(account.print(account.defaults), account.print()); | ||
| }); | ||
|
|
||
| for (const signer of [undefined, 'ERC7702', 'ECDSA', 'P256', 'RSA'] as const) { | ||
| let title = 'Account'; | ||
| if (signer) { | ||
| title += ` with Signer${signer}`; | ||
| } | ||
|
|
||
| testAccount(`${title} named`, { | ||
| name: `Custom${title}`, | ||
| signer, | ||
| }); | ||
|
|
||
| testAccount(`${title} with ERC1271`, { | ||
| name: `Custom${title}ERC1271`, | ||
| signatureValidation: 'ERC1271', | ||
| signer, | ||
| }); | ||
|
|
||
| testAccount(`${title} with ERC7739`, { | ||
| name: `Custom${title}ERC7739`, | ||
| signatureValidation: 'ERC7739', | ||
| signer, | ||
| }); | ||
|
|
||
| testAccount(`${title} with ERC721Holder`, { | ||
| name: `Custom${title}ERC721Holder`, | ||
| ERC721Holder: true, | ||
| signer, | ||
| }); | ||
|
|
||
| testAccount(`${title} with ERC1155Holder`, { | ||
| name: `Custom${title}ERC1155Holder`, | ||
| ERC1155Holder: true, | ||
| signer, | ||
| }); | ||
|
|
||
| testAccount(`${title} with ERC721Holder and ERC1155Holder`, { | ||
| name: `Custom${title}ERC721HolderERC1155Holder`, | ||
| ERC721Holder: true, | ||
| ERC1155Holder: true, | ||
| signer, | ||
| }); | ||
|
|
||
| testAccount(`${title} with ERC7821 Execution`, { | ||
| signer, | ||
| batchedExecution: true, | ||
| }); | ||
|
|
||
| testAccount(`${title} with ERC7579`, { | ||
| signer, | ||
| ERC7579Modules: 'AccountERC7579', | ||
| }); | ||
|
|
||
| testAccount(`${title} with ERC7579 hooks`, { | ||
| signer, | ||
| ERC7579Modules: 'AccountERC7579Hooked', | ||
| }); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.