File tree Expand file tree Collapse file tree 3 files changed +24
-5
lines changed
src/middlewareV2/registrar Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import {AVSRegistrarStorage} from "./AVSRegistrarStorage.sol";
1616import {Initializable} from "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol " ;
1717
1818/// @notice A minimal AVSRegistrar contract that is used to register/deregister operators for an AVS
19- contract AVSRegistrar is Initializable , AVSRegistrarStorage {
19+ abstract contract AVSRegistrar is Initializable , AVSRegistrarStorage {
2020 using OperatorSetLib for OperatorSet;
2121
2222 modifier onlyAllocationManager () {
Original file line number Diff line number Diff line change @@ -16,6 +16,21 @@ import {
1616import {ArrayLib} from "eigenlayer-contracts/src/test/utils/ArrayLib.sol " ;
1717import "test/utils/Random.sol " ;
1818
19+ contract AVSRegistrarImplementation is AVSRegistrar {
20+ constructor (
21+ IAllocationManager _allocationManager ,
22+ IKeyRegistrar _keyRegistrar
23+ ) AVSRegistrar (_allocationManager, _keyRegistrar) {
24+ _disableInitializers ();
25+ }
26+
27+ function initialize (
28+ address _owner
29+ ) external initializer {
30+ __AVSRegistrar_init (_owner);
31+ }
32+ }
33+
1934abstract contract AVSRegistrarBase is
2035 MockEigenLayerDeployer ,
2136 IAVSRegistrarErrors ,
Original file line number Diff line number Diff line change @@ -8,15 +8,19 @@ contract AVSRegistrarUnitTests is AVSRegistrarBase {
88 function setUp () public override {
99 super .setUp ();
1010
11- avsRegistrarImplementation = new AVSRegistrar (
12- IAllocationManager (address (allocationManagerMock)),
13- IKeyRegistrar (address (keyRegistrarMock))
11+ avsRegistrarImplementation = AVSRegistrar (
12+ new AVSRegistrarImplementation (
13+ IAllocationManager (address (allocationManagerMock)),
14+ IKeyRegistrar (address (keyRegistrarMock))
15+ )
1416 );
1517
1618 avsRegistrar = AVSRegistrar (
1719 address (
1820 new TransparentUpgradeableProxy (
19- address (avsRegistrarImplementation), address (proxyAdmin), ""
21+ address (avsRegistrarImplementation),
22+ address (proxyAdmin),
23+ abi.encodeWithSelector (AVSRegistrarImplementation.initialize.selector , AVS)
2024 )
2125 )
2226 );
You can’t perform that action at this time.
0 commit comments