From d7c125ad88a76a2942b3b9c89353353bc31e1a03 Mon Sep 17 00:00:00 2001 From: Jack Li Date: Wed, 13 Sep 2023 12:06:00 +0800 Subject: [PATCH] Fix aspect wallet compilation issue --- contracts/samples/AspectEnabledSimpleAccount.sol | 4 +++- contracts/samples/AspectEnabledSimpleAccountFactory.sol | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/contracts/samples/AspectEnabledSimpleAccount.sol b/contracts/samples/AspectEnabledSimpleAccount.sol index 30b1975..297dc2e 100644 --- a/contracts/samples/AspectEnabledSimpleAccount.sol +++ b/contracts/samples/AspectEnabledSimpleAccount.sol @@ -22,6 +22,8 @@ contract AspectEnabledSimpleAccount is SimpleAccount { mapping(address => bool) private _aspectWhitelist; + constructor(IEntryPoint anEntryPoint) SimpleAccount(anEntryPoint) {} + /** * Validate user's signature and nonce. * Subclass doesn't need to override this method. Instead, @@ -71,7 +73,7 @@ contract AspectEnabledSimpleAccount is SimpleAccount { /// implement template method of BaseAspectEnabledAccount // solhint-disable-next-line no-unused-vars function _validateAspectId(address aspectId) - internal override virtual returns (uint256 validationData) { + internal virtual returns (uint256 validationData) { if (_aspectWhitelist[aspectId]) { return 0; } diff --git a/contracts/samples/AspectEnabledSimpleAccountFactory.sol b/contracts/samples/AspectEnabledSimpleAccountFactory.sol index 33e6dfe..e7084dc 100644 --- a/contracts/samples/AspectEnabledSimpleAccountFactory.sol +++ b/contracts/samples/AspectEnabledSimpleAccountFactory.sol @@ -34,7 +34,7 @@ contract AspectEnabledSimpleAccountFactory { } ret = AspectEnabledSimpleAccount(payable(new ERC1967Proxy{salt : bytes32(salt)}( address(accountImplementation), - abi.encodeCall(AspectEnabledSimpleAccount.initialize, (owner)) + abi.encodeCall(SimpleAccount.initialize, (owner)) ))); } @@ -46,7 +46,7 @@ contract AspectEnabledSimpleAccountFactory { type(ERC1967Proxy).creationCode, abi.encode( address(accountImplementation), - abi.encodeCall(AspectEnabledSimpleAccount.initialize, (owner)) + abi.encodeCall(SimpleAccount.initialize, (owner)) ) ))); }