Skip to content
This repository was archived by the owner on Feb 8, 2025. It is now read-only.

Commit 4f74e1f

Browse files
committed
refactor: remove DeploymentRefunder
Activations are included as a `paymasterFee`, improving UX and reducing complexity
1 parent 2599a2f commit 4f74e1f

File tree

7 files changed

+4
-340
lines changed

7 files changed

+4
-340
lines changed

contracts/contracts/Account.sol

+2-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {ERC721Receiver} from './standards/ERC721Receiver.sol';
1919
import {SignatureValidator} from './base/SignatureValidator.sol';
2020
import {TransactionUtil} from './TransactionUtil.sol';
2121
import {PaymasterUtil} from './paymaster/PaymasterUtil.sol';
22-
import {DeploymentRefunder} from './base/DeploymentRefunder.sol';
2322

2423
contract Account is
2524
IAccount,
@@ -29,8 +28,7 @@ contract Account is
2928
Executor,
3029
ERC165,
3130
ERC721Receiver,
32-
SignatureValidator,
33-
DeploymentRefunder
31+
SignatureValidator
3432
{
3533
using TransactionHelper for Transaction;
3634
using TransactionUtil for Transaction;
@@ -50,15 +48,14 @@ contract Account is
5048
INITIALIZATION
5149
//////////////////////////////////////////////////////////////*/
5250

53-
constructor() DeploymentRefunder(_isValidSignature) {
51+
constructor() {
5452
// Disable initializing the implementation contract; avoiding any potential nonsense (e.g. selfdestruct)
5553
_disableInitializers();
5654
}
5755

5856
function initialize(Policy[] calldata policies) external initializer {
5957
// _initializeArbitraryNonceOrdering();
6058
_addPolicies(policies);
61-
_initializeDeployRefunder();
6259
}
6360

6461
/*//////////////////////////////////////////////////////////////

contracts/contracts/Factory.sol

-17
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ import {DEPLOYER_SYSTEM_CONTRACT} from '@matterlabs/zksync-contracts/l2/system-c
55
import {IContractDeployer} from '@matterlabs/zksync-contracts/l2/system-contracts/interfaces/IContractDeployer.sol';
66
import {SystemContractsCaller} from '@matterlabs/zksync-contracts/l2/system-contracts/libraries/SystemContractsCaller.sol';
77

8-
import {IDeploymentRefunder, DeploymentRefundMessage} from './base/IDeploymentRefunder.sol';
9-
10-
struct RefundDeploymentArgs {
11-
DeploymentRefundMessage message;
12-
bytes signature;
13-
uint256 amount;
14-
}
15-
168
contract Factory {
179
IContractDeployer.AccountAbstractionVersion private constant AA_VERSION =
1810
IContractDeployer.AccountAbstractionVersion.Version1;
@@ -47,13 +39,4 @@ contract Factory {
4739

4840
(account) = abi.decode(data, (address));
4941
}
50-
51-
function deployWithRefund(
52-
bytes calldata constructorArgsData,
53-
bytes32 salt,
54-
RefundDeploymentArgs calldata refund
55-
) external payable returns (address account) {
56-
account = deploy(constructorArgsData, salt);
57-
IDeploymentRefunder(account).refundDeployment(refund.message, refund.signature, refund.amount);
58-
}
5942
}

contracts/contracts/base/DeploymentRefunder.sol

-90
This file was deleted.

contracts/contracts/base/IDeploymentRefunder.sol

-32
This file was deleted.

contracts/contracts/test/TestDeploymentRefunder.sol

-17
This file was deleted.

contracts/test/DeploymentRefunder.ts

-135
This file was deleted.

0 commit comments

Comments
 (0)