Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
a7b170a
WIP: Migrate Account code
ernestognw Nov 26, 2024
1859385
Merge branch 'master' into aa/accounts
ernestognw Nov 29, 2024
7847e80
Merge branch 'master' into aa/accounts
ernestognw Dec 3, 2024
25de3ac
Checkpoint
ernestognw Dec 5, 2024
292dae1
Fix lint
ernestognw Dec 5, 2024
f8657e7
Checkpoint
ernestognw Dec 5, 2024
8699232
up
ernestognw Dec 6, 2024
7bdf69e
up
ernestognw Dec 6, 2024
efd52cd
Adjust
ernestognw Dec 6, 2024
87fcd0e
up
ernestognw Dec 6, 2024
549ab8e
Simplify CallReceiverMock
ernestognw Dec 6, 2024
90c7f5e
Fix slither + Codespell
ernestognw Dec 6, 2024
2e345c3
Fix coverage
ernestognw Dec 6, 2024
af200e4
Merge branch 'master' into aa/accounts
ernestognw Dec 6, 2024
4d03f45
Remove entrypoint
ernestognw Dec 6, 2024
9caded9
Readd entrypoint
ernestognw Dec 6, 2024
f6b4454
Run --ir-minimum in forge coverage
ernestognw Dec 6, 2024
2d2300f
up
ernestognw Dec 7, 2024
d6ba190
Make Accounts initializable
ernestognw Dec 7, 2024
208386f
Finish docs
ernestognw Dec 7, 2024
49fc47d
Merge branch 'master' into aa/accounts
ernestognw Dec 7, 2024
d715e4c
rewrite helpers/signers as alternative to ethers.SigningKey and
Amxx Dec 9, 2024
8ad95a1
Rename _validateNestedEIP712Signature -> _validateSignature
ernestognw Dec 9, 2024
885efdd
Read virtual to ERC7739Signer functions
ernestognw Dec 9, 2024
d5f0dac
lint
ernestognw Dec 9, 2024
130ce04
Implement review recommendations
ernestognw Dec 9, 2024
dcdae8d
Include signer into account factory hash
ernestognw Dec 9, 2024
03d935d
Update Account inheritance order
ernestognw Dec 10, 2024
5456f26
up
ernestognw Dec 10, 2024
9412b65
Merge branch 'master' into aa/accounts
ernestognw Dec 10, 2024
524bf15
Remove ERC1155HolderLean
ernestognw Dec 10, 2024
4718b87
Abstract AccountSignerDomain
ernestognw Dec 10, 2024
c8ad19d
up
ernestognw Dec 10, 2024
ed66cca
Merge branch 'master' into aa/accounts
ernestognw Dec 10, 2024
c41956c
Remove signed hash fn
ernestognw Dec 11, 2024
7e51cd2
Add standalone example of usage
ernestognw Dec 13, 2024
459d594
Merge branch 'master' into aa/accounts
ernestognw Dec 13, 2024
f497fd1
Remove docs
ernestognw Dec 13, 2024
6409cb3
ERC4337 userOp validation should not be 7739 wrapped
Amxx Dec 13, 2024
97b33df
documentation
Amxx Dec 13, 2024
ddd17e9
Rename `_validateSignature` to `_rawSignatureValidation` and remove _…
ernestognw Dec 13, 2024
e8ef6d1
errata
ernestognw Dec 13, 2024
d706876
Default _signableUserOpHash to a typed userop signature
ernestognw Dec 13, 2024
188e71d
Remove docs mocks
ernestognw Dec 13, 2024
6ace1a7
Remove ERC7739 from AccountBase
ernestognw Dec 14, 2024
9793e49
Make ERC7739Signer validations private
ernestognw Dec 14, 2024
9e34432
Move EIP712 userop signing to Accountbase
ernestognw Dec 14, 2024
ae6a665
Split AccountCore / Account
Amxx Dec 16, 2024
07ca067
remove intermediary variable
Amxx Dec 16, 2024
6aa5597
doc
Amxx Dec 16, 2024
0513f3a
spelling
Amxx Dec 16, 2024
e3ce6b5
abstract signer
Amxx Dec 16, 2024
69cc3da
docs
Amxx Dec 16, 2024
d0bd34f
ERC7702 signer
Amxx Dec 16, 2024
3b1c1f4
fix
Amxx Dec 16, 2024
190b5a5
doc example for ERC7739 use signers
Amxx Dec 16, 2024
a6ab43b
Complete minimal documentation
ernestognw Dec 17, 2024
5c210cf
Update CHANGELOG.md
ernestognw Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
ernestognw committed Dec 9, 2024
commit d5f0dac22440ecd70192c81c5f158688c888b9bf
5 changes: 1 addition & 4 deletions contracts/account/draft-AccountP256.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ abstract contract AccountP256 is ERC165, ERC7739Signer, ERC721Holder, ERC1155Hol
* This function provides a nested EIP-712 hash. Developers must override only this
* function to ensure no raw message signing is possible.
*/
function _validateSignature(
bytes32 hash,
bytes calldata signature
) internal view virtual override returns (bool) {
function _validateSignature(bytes32 hash, bytes calldata signature) internal view virtual override returns (bool) {
if (signature.length < 0x40) return false;
bytes32 r = bytes32(signature[0x00:0x20]);
bytes32 s = bytes32(signature[0x20:0x40]);
Expand Down
5 changes: 1 addition & 4 deletions contracts/account/draft-AccountRSA.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,7 @@ abstract contract AccountRSA is ERC165, ERC7739Signer, ERC721Holder, ERC1155Hold
* This function provides a nested EIP-712 hash. Developers must override only this
* function to ensure no raw message signing is possible.
*/
function _validateSignature(
bytes32 hash,
bytes calldata signature
) internal view virtual override returns (bool) {
function _validateSignature(bytes32 hash, bytes calldata signature) internal view virtual override returns (bool) {
(bytes memory e, bytes memory n) = signer();
return RSA.pkcs1Sha256(abi.encodePacked(hash), signature, e, n);
}
Expand Down
5 changes: 1 addition & 4 deletions contracts/mocks/docs/account/MyAccountCustom.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ contract MyAccountCustom is ERC7739Signer, AccountBase, Initializable {
}

/// @dev Receives a hash wrapped in an EIP-712 domain separator.
function _validateSignature(
bytes32 hash,
bytes calldata signature
) internal view virtual override returns (bool) {
function _validateSignature(bytes32 hash, bytes calldata signature) internal view virtual override returns (bool) {
// Custom signing logic
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ contract ERC7739SignerECDSAMock is ERC7739Signer {
_signer = signerAddr;
}

function _validateSignature(
bytes32 hash,
bytes calldata signature
) internal view virtual override returns (bool) {
function _validateSignature(bytes32 hash, bytes calldata signature) internal view virtual override returns (bool) {
(address recovered, ECDSA.RecoverError err, ) = ECDSA.tryRecover(hash, signature);
return _signer == recovered && err == ECDSA.RecoverError.NoError;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ contract ERC7739SignerP256Mock is ERC7739Signer {
_qy = qy;
}

function _validateSignature(
bytes32 hash,
bytes calldata signature
) internal view virtual override returns (bool) {
function _validateSignature(bytes32 hash, bytes calldata signature) internal view virtual override returns (bool) {
bytes32 r = bytes32(signature[0x00:0x20]);
bytes32 s = bytes32(signature[0x20:0x40]);
return P256.verify(hash, r, s, _qx, _qy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ contract ERC7739SignerRSAMock is ERC7739Signer {
_n = n;
}

function _validateSignature(
bytes32 hash,
bytes calldata signature
) internal view virtual override returns (bool) {
function _validateSignature(bytes32 hash, bytes calldata signature) internal view virtual override returns (bool) {
return RSA.pkcs1Sha256(hash, signature, _e, _n);
}
}
Loading