@@ -5,7 +5,6 @@ import { Test } from "forge-std/Test.sol";
55
66import { CustomRedStoneOracleAdapter } from "src/oracles/providers/CustomRedStoneOracleAdapter.sol " ;
77import { ICustomSetOracle } from "src/interfaces/oracles/ICustomSetOracle.sol " ;
8- import { ISecurityBase } from "src/interfaces/security/ISecurityBase.sol " ;
98import { IAccessController } from "src/interfaces/security/IAccessController.sol " ;
109import { ISystemRegistry } from "src/interfaces/ISystemRegistry.sol " ;
1110import { Roles } from "src/libs/Roles.sol " ;
@@ -59,9 +58,7 @@ contract CustomRedStoneOracleAdapterTest is Test {
5958
6059 ///@dev Get the Redstone payload snapshot for a given feedId
6160 ///@return data The real Redstone payload from their API
62- function getRedstonePayload (
63- bytes32 feedId
64- ) internal pure returns (bytes memory data ) {
61+ function getRedstonePayload (bytes32 feedId ) internal pure returns (bytes memory data ) {
6562 //solhint-disable max-line-length
6663 if (feedId == bytes32 ("pxETH/ETH " )) {
6764 data =
@@ -187,9 +184,8 @@ contract UpdatePriceWithFeedId is CustomRedStoneOracleAdapterTest {
187184
188185 redstoneAdapter.registerFeedId (feedIds[0 ], PXETH_MAINNET, true );
189186
190- IAccessController mainnetAccessController = ISecurityBase (address (customOracle)).accessController ();
191187 vm.prank (TREASURY);
192- mainnetAccessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
188+ accessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
193189
194190 vm.prank (RANDOM);
195191 // solhint-disable-next-line avoid-low-level-calls
@@ -206,9 +202,8 @@ contract UpdatePriceWithFeedId is CustomRedStoneOracleAdapterTest {
206202 bytes memory encodedFunction = abi.encodeWithSignature ("updatePriceWithFeedId(bytes32[]) " , feedIds);
207203 bytes memory encodedFunctionWithRedstonePayload = abi.encodePacked (encodedFunction, redstonePayload);
208204
209- IAccessController mainnetAccessController = ISecurityBase (address (customOracle)).accessController ();
210205 vm.prank (TREASURY);
211- mainnetAccessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
206+ accessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
212207
213208 vm.prank (MAINNET_ORACLE_EXECUTOR);
214209 // solhint-disable-next-line avoid-low-level-calls
@@ -225,9 +220,8 @@ contract UpdatePriceWithFeedId is CustomRedStoneOracleAdapterTest {
225220 bytes memory encodedFunction = abi.encodeWithSignature ("updatePriceWithFeedId(bytes32[]) " , feedIds);
226221 bytes memory encodedFunctionWithRedstonePayload = abi.encodePacked (encodedFunction, redstonePayload);
227222
228- IAccessController mainnetAccessController = ISecurityBase (address (customOracle)).accessController ();
229223 vm.prank (TREASURY);
230- mainnetAccessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
224+ accessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
231225
232226 vm.prank (MAINNET_ORACLE_EXECUTOR);
233227 // solhint-disable-next-line avoid-low-level-calls
@@ -254,9 +248,8 @@ contract UpdatePriceWithFeedId is CustomRedStoneOracleAdapterTest {
254248 bytes memory encodedFunction = abi.encodeWithSignature ("updatePriceWithFeedId(bytes32[]) " , feedIds);
255249 bytes memory encodedFunctionWithRedstonePayload = abi.encodePacked (encodedFunction, redstonePayload);
256250
257- IAccessController mainnetAccessController = ISecurityBase (address (customOracle)).accessController ();
258251 vm.prank (TREASURY);
259- mainnetAccessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
252+ accessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
260253
261254 (uint192 priceBefore ,,) = customOracle.prices (address (CRV_MAINNET));
262255
@@ -281,9 +274,8 @@ contract UpdatePriceWithFeedId is CustomRedStoneOracleAdapterTest {
281274 bytes memory encodedFunction = abi.encodeWithSignature ("updatePriceWithFeedId(bytes32[]) " , feedIds);
282275 bytes memory encodedFunctionWithRedstonePayload = abi.encodePacked (encodedFunction, redstonePayload);
283276
284- IAccessController mainnetAccessController = ISecurityBase (address (customOracle)).accessController ();
285277 vm.prank (TREASURY);
286- mainnetAccessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
278+ accessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
287279
288280 (uint192 priceBefore ,,) = customOracle.prices (address (PXETH_MAINNET));
289281
@@ -328,9 +320,8 @@ contract UpdatePriceWithFeedId is CustomRedStoneOracleAdapterTest {
328320 redstoneAdapter.registerFeedId (feedIds[1 ], WSTETH_MAINNET, true );
329321 redstoneAdapter.registerFeedId (feedIds[2 ], RETH_MAINNET, true );
330322
331- IAccessController mainnetAccessController = ISecurityBase (address (customOracle)).accessController ();
332323 vm.prank (TREASURY);
333- mainnetAccessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
324+ accessController .grantRole (Roles.CUSTOM_ORACLE_EXECUTOR, address (redstoneAdapter));
334325
335326 (uint192 ezEthPriceBefore ,,) = customOracle.prices (EZETH_MAINNET);
336327 (uint192 wstEthPriceBefore ,,) = customOracle.prices (WSTETH_MAINNET);
0 commit comments