@@ -108,7 +108,9 @@ contract BidPoolTest is HookProtocolTest {
108108 }
109109
110110 function testSetProtocol () public {
111+ vm.startPrank (address (admin));
111112 // deploy a new protocol
113+
112114 HookProtocol protocol2 = new HookProtocol (
113115 admin,
114116 admin,
@@ -137,13 +139,14 @@ contract BidPoolTest is HookProtocolTest {
137139 );
138140
139141 vm.startPrank (bidder);
140- vm.expectRevert (" Ownable: caller is not the owner " );
142+ vm.expectRevert ();
141143 emit ProtocolAddressSet (address (protocol2));
142144 bidPool.setProtocol (address (protocol2));
143145 }
144146
145147 function testSetPriceOracleSigner () public {
146148 address newSigner = address (0x1234 );
149+ vm.startPrank (admin);
147150 vm.expectEmit (true , true , true , true );
148151 emit PriceOracleSignerUpdated (newSigner);
149152 bidPool.setPriceOracleSigner (newSigner);
@@ -152,7 +155,7 @@ contract BidPoolTest is HookProtocolTest {
152155 function testSetPriceOracleSignerNotOwner () public {
153156 address newSigner = address (0x1234 );
154157 vm.startPrank (bidder);
155- vm.expectRevert (" Ownable: caller is not the owner " );
158+ vm.expectRevert ();
156159 emit PriceOracleSignerUpdated (newSigner);
157160 bidPool.setPriceOracleSigner (newSigner);
158161 }
@@ -161,19 +164,21 @@ contract BidPoolTest is HookProtocolTest {
161164 address newSigner = address (0x1234 );
162165 vm.expectEmit (true , true , true , true );
163166 emit OrderValidityOracleSignerUpdated (newSigner);
167+ vm.startPrank (admin);
164168 bidPool.setOrderValidityOracleSigner (newSigner);
165169 }
166170
167171 function testSetOrderValidityOracleSignerNotOwner () public {
168172 address newSigner = address (0x1234 );
169173 vm.startPrank (bidder);
170- vm.expectRevert (" Ownable: caller is not the owner " );
174+ vm.expectRevert ();
171175 emit OrderValidityOracleSignerUpdated (newSigner);
172176 bidPool.setOrderValidityOracleSigner (newSigner);
173177 }
174178
175179 function testSetFeeBips () public {
176180 uint64 newBips = 3737 ;
181+ vm.prank (address (admin));
177182 vm.expectEmit (true , true , true , true );
178183 emit FeesUpdated (newBips);
179184 bidPool.setFeeBips (newBips);
@@ -182,7 +187,7 @@ contract BidPoolTest is HookProtocolTest {
182187 function testSetFeeBipsNotOwner () public {
183188 uint64 newBips = 3737 ;
184189 vm.startPrank (bidder);
185- vm.expectRevert (" Ownable: caller is not the owner " );
190+ vm.expectRevert ();
186191 emit FeesUpdated (newBips);
187192 bidPool.setFeeBips (newBips);
188193 }
@@ -191,47 +196,52 @@ contract BidPoolTest is HookProtocolTest {
191196 uint64 newBips = 10001 ;
192197 vm.expectRevert ("Fee bips over 10000 " );
193198 emit FeesUpdated (newBips);
199+ vm.prank (address (admin));
194200 bidPool.setFeeBips (newBips);
195201 }
196202
197203 function testSetFeeRecipient () public {
198204 address newRecipient = address (0x1234 );
199205 vm.expectEmit (true , true , true , true );
200206 emit ProtocolFeeRecipientUpdated (newRecipient);
207+ vm.prank (address (admin));
201208 bidPool.setFeeRecipient (newRecipient);
202209 }
203210
204211 function testSetFeeRecipientNotOwner () public {
205212 address newRecipient = address (0x1234 );
206213 vm.startPrank (bidder);
207- vm.expectRevert (" Ownable: caller is not the owner " );
214+ vm.expectRevert ();
208215 emit ProtocolFeeRecipientUpdated (newRecipient);
209216 bidPool.setFeeRecipient (newRecipient);
210217 }
211218
212219 function testSetProtocolPaused () public {
220+ vm.startPrank (address (admin));
213221 vm.expectEmit (true , true , true , true );
214222 emit PauseUpdated (true );
215223 bidPool.setPoolPaused (true );
216224 }
217225
218226 function testSetProtocolPausedNotOwner () public {
219227 vm.startPrank (bidder);
220- vm.expectRevert (" Ownable: caller is not the owner " );
228+ vm.expectRevert ();
221229 emit PauseUpdated (true );
222230 bidPool.setPoolPaused (true );
223231 }
224232
225233 function testSetProtocolPausedAlreadyPaused () public {
234+ vm.startPrank (address (admin));
226235 vm.expectEmit (true , true , true , true );
227236 emit PauseUpdated (true );
228237 bidPool.setPoolPaused (true );
229- vm.expectRevert ("sMP-must change " );
238+ vm.expectRevert ("cannot set to current state " );
230239 bidPool.setPoolPaused (true );
231240 }
232241
233242 function testSetProtocolPausedAlreadyNotPaused () public {
234- vm.expectRevert ("sMP-must change " );
243+ vm.expectRevert ("cannot set to current state " );
244+ vm.prank (address (admin));
235245 bidPool.setPoolPaused (false );
236246 }
237247
0 commit comments