File tree Expand file tree Collapse file tree 6 files changed +27
-48
lines changed Expand file tree Collapse file tree 6 files changed +27
-48
lines changed Original file line number Diff line number Diff line change 22
33pragma solidity ^ 0.8.20 ;
44
5- import {IEntryPoint} from "../interfaces/IERC4337.sol " ;
6- import {Account } from "./Account .sol " ;
7- import {ECDSA } from "../utils/cryptography/ECDSA .sol " ;
8- import {Clones } from "../proxy/Clones .sol " ;
9- import {EIP712 } from "../utils/cryptography/EIP712 .sol " ;
5+ import {IEntryPoint} from "../../ interfaces/IERC4337.sol " ;
6+ import {ECDSA } from "../../utils/cryptography/ECDSA .sol " ;
7+ import {Clones } from "../../proxy/Clones .sol " ;
8+ import {EIP712 } from "../../utils/cryptography/EIP712 .sol " ;
9+ import {Account } from "./../Account .sol " ;
1010
1111abstract contract AccountECDSA is Account {
1212 /// @custom:oz-upgrades-unsafe-allow state-variable-immutable
@@ -22,13 +22,7 @@ abstract contract AccountECDSA is Account {
2222 }
2323}
2424
25- contract AccountECDSAClonable is AccountECDSA {
26- constructor (
27- IEntryPoint entryPoint_ ,
28- string memory name ,
29- string memory version
30- ) Account (entryPoint_) EIP712 (name, version) {}
31-
25+ abstract contract AccountECDSAClonable is AccountECDSA {
3226 function signer () public view override returns (address ) {
3327 return abi.decode (Clones.fetchCloneArgs (address (this )), (address ));
3428 }
Original file line number Diff line number Diff line change 22
33pragma solidity ^ 0.8.20 ;
44
5- import {IEntryPoint} from "../interfaces/IERC4337.sol " ;
5+ import {IEntryPoint} from "../../interfaces/IERC4337.sol " ;
6+ import {AccountFactory} from "./../AccountFactory.sol " ;
67import {AccountECDSAClonable} from "./AccountECDSA.sol " ;
7- import {AccountFactory} from "./AccountFactory.sol " ;
88
99abstract contract AccountECDSAFactory is AccountFactory {
1010 constructor (IEntryPoint entryPoint_ , string memory name , string memory version ) {
1111 _accountImplementation = address (new AccountECDSAClonable (entryPoint_, name, version));
1212 }
1313
1414 function clone (address signer , bytes32 salt ) external returns (address ) {
15- bytes memory encodedSigner = abi.encode (signer);
16- return _clone (encodedSigner, salt);
15+ return _clone (abi.encode (signer), salt);
1716 }
1817}
Original file line number Diff line number Diff line change 22
33pragma solidity ^ 0.8.20 ;
44
5- import {IEntryPoint} from "../interfaces/IERC4337.sol " ;
6- import {Account } from "./Account .sol " ;
7- import {P256 } from "../utils/cryptography/P256 .sol " ;
8- import {Clones } from "../proxy/Clones .sol " ;
9- import {EIP712 } from "../utils/cryptography/EIP712 .sol " ;
5+ import {IEntryPoint} from "../../ interfaces/IERC4337.sol " ;
6+ import {P256 } from "../../utils/cryptography/P256 .sol " ;
7+ import {Clones } from "../../proxy/Clones .sol " ;
8+ import {EIP712 } from "../../utils/cryptography/EIP712 .sol " ;
9+ import {Account } from "./../Account .sol " ;
1010
1111abstract contract AccountP256 is Account {
1212 /// @custom:oz-upgrades-unsafe-allow state-variable-immutable
@@ -31,13 +31,7 @@ abstract contract AccountP256 is Account {
3131 }
3232}
3333
34- contract AccountP256Clonable is AccountP256 {
35- constructor (
36- IEntryPoint entryPoint_ ,
37- string memory name ,
38- string memory version
39- ) Account (entryPoint_) EIP712 (name, version) {}
40-
34+ abstract contract AccountP256Clonable is AccountP256 {
4135 function signer () public view override returns (bytes32 qx , bytes32 qy ) {
4236 return abi.decode (Clones.fetchCloneArgs (address (this )), (bytes32 , bytes32 ));
4337 }
Original file line number Diff line number Diff line change 22
33pragma solidity ^ 0.8.20 ;
44
5- import {IEntryPoint} from "../interfaces/IERC4337.sol " ;
5+ import {IEntryPoint} from "../../interfaces/IERC4337.sol " ;
6+ import {AccountFactory} from "./../AccountFactory.sol " ;
67import {AccountP256Clonable} from "./AccountP256.sol " ;
7- import {AccountFactory} from "./AccountFactory.sol " ;
88
99abstract contract AccountP256Factory is AccountFactory {
1010 constructor (IEntryPoint entryPoint_ , string memory name , string memory version ) {
1111 _accountImplementation = address (new AccountP256Clonable (entryPoint_, name, version));
1212 }
1313
1414 function clone (bytes32 qx , bytes32 qy , bytes32 salt ) external returns (address ) {
15- bytes memory encodedSigner = abi.encode (qx, qy);
16- return _clone (encodedSigner, salt);
15+ return _clone (abi.encode (qx, qy), salt);
1716 }
1817}
Original file line number Diff line number Diff line change 22
33pragma solidity ^ 0.8.20 ;
44
5- import {IEntryPoint} from "../interfaces/IERC4337.sol " ;
6- import {Account } from "./Account .sol " ;
7- import {RSA } from "../utils/cryptography/RSA .sol " ;
8- import {Clones } from "../proxy/Clones .sol " ;
9- import {EIP712 } from "../utils/cryptography/EIP712 .sol " ;
5+ import {IEntryPoint} from "../../ interfaces/IERC4337.sol " ;
6+ import {RSA } from "../../utils/cryptography/RSA .sol " ;
7+ import {Clones } from "../../proxy/Clones .sol " ;
8+ import {EIP712 } from "../../utils/cryptography/EIP712 .sol " ;
9+ import {Account } from "./../Account .sol " ;
1010
1111abstract contract AccountRSA is Account {
1212 // NOTE: There is no way to store immutable byte arrays in a contract, so we use private instead
@@ -26,13 +26,7 @@ abstract contract AccountRSA is Account {
2626 }
2727}
2828
29- contract AccountRSAClonable is AccountRSA {
30- constructor (
31- IEntryPoint entryPoint_ ,
32- string memory name ,
33- string memory version
34- ) Account (entryPoint_) EIP712 (name, version) {}
35-
29+ abstract contract AccountRSAClonable is AccountRSA {
3630 function signer () public view override returns (bytes memory e , bytes memory m ) {
3731 return abi.decode (Clones.fetchCloneArgs (address (this )), (bytes , bytes ));
3832 }
Original file line number Diff line number Diff line change 22
33pragma solidity ^ 0.8.20 ;
44
5- import {IEntryPoint} from "../interfaces/IERC4337.sol " ;
5+ import {IEntryPoint} from "../../interfaces/IERC4337.sol " ;
6+ import {AccountFactory} from "./../AccountFactory.sol " ;
67import {AccountRSAClonable} from "./AccountRSA.sol " ;
7- import {AccountFactory} from "./AccountFactory.sol " ;
88
99abstract contract AccountRSAFactory is AccountFactory {
1010 constructor (IEntryPoint entryPoint_ , string memory name , string memory version ) {
1111 _accountImplementation = address (new AccountRSAClonable (entryPoint_, name, version));
1212 }
1313
1414 function clone (bytes memory e , bytes memory m , bytes32 salt ) external returns (address ) {
15- bytes memory encodedSigner = abi.encode (e, m);
16- return _clone (encodedSigner, salt);
15+ return _clone (abi.encode (e, m), salt);
1716 }
1817}
You can’t perform that action at this time.
0 commit comments