Skip to content

Commit 9978d7a

Browse files
error for zero beacon owner
1 parent d8b81e0 commit 9978d7a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/concrete/deploy/OffchainAssetReceiptVaultBeaconSetDeployer.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {BeaconProxy} from "openzeppelin-contracts/contracts/proxy/beacon/BeaconP
1010
import {
1111
ZeroReceiptImplementation,
1212
ZeroVaultImplementation,
13+
ZeroBeaconOwner,
1314
InitializeNonZeroReceipt,
1415
InitializeReceiptFailed,
1516
InitializeVaultFailed
@@ -48,6 +49,8 @@ contract OffchainAssetReceiptVaultBeaconSetDeployer {
4849
revert InitializeNonZeroReceipt(config.receiptVaultConfig.receipt);
4950
}
5051

52+
if (config.initialAdmin == address(0)) revert ZeroBeaconOwner();
53+
5154
Receipt receipt = Receipt(address(new BeaconProxy(address(I_RECEIPT_BEACON), "")));
5255
OffchainAssetReceiptVault offchainAssetReceiptVault = OffchainAssetReceiptVault(
5356
payable(address(new BeaconProxy(address(I_OFFCHAIN_ASSET_RECEIPT_VAULT_BEACON), "")))

src/error/ErrDeployer.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ error ZeroReceiptImplementation();
99
/// Thrown when constructing a deployer with a zero vault implementation address.
1010
error ZeroVaultImplementation();
1111

12+
/// Thrown when the beacon owner is set to the zero address.
13+
error ZeroBeaconOwner();
14+
1215
/// Thrown when attempting to initialize with a non-zero receipt address.
1316
/// @param receipt The receipt address that is not zero in the initialization
1417
/// config.

0 commit comments

Comments
 (0)