Skip to content

Commit

Permalink
forge fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
RickGriff committed Jan 21, 2025
1 parent b1e188d commit c2bb401
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
9 changes: 1 addition & 8 deletions contracts/test/OracleMainnet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ contract OraclesMainnet is TestAccounts {
mockRethToken = new RETHTokenMock();
mockWstethToken = new WSTETHTokenMock();



// Record contracts
for (uint256 c = 0; c < vars.numCollaterals; c++) {
contractsArray.push(result.contractsArray[c]);
Expand Down Expand Up @@ -349,8 +347,6 @@ contract OraclesMainnet is TestAccounts {
assertLt(relativeDelta, 1e16);
}



// // --- Basic actions ---

function testOpenTroveWETH() public {
Expand Down Expand Up @@ -2093,16 +2089,13 @@ contract OraclesMainnet is TestAccounts {
// Etch gas guzzler to the LST
etchGasGuzzlerMockToRethToken(address(gasGuzzlerToken).code);

// After etching the gas guzzler to the LST, confirm the same call with 500k gas now reverts due to OOG
// After etching the gas guzzler to the LST, confirm the same call with 500k gas now reverts due to OOG
vm.expectRevert(MainnetPriceFeedBase.InsufficientGasForExternalCall.selector);
// just catch return val to suppress warning
(success,) = address(rethPriceFeed).call{gas: 10000}(abi.encodeWithSignature("fetchPrice()"));
assertFalse(success);
}




// - More basic actions tests (adjust, close, etc)
// - liq tests (manipulate aggregator stored price)
}
4 changes: 1 addition & 3 deletions contracts/test/TestContracts/GasGuzzlerToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@

pragma solidity 0.8.24;



// Mock token that uses all available gas on exchange rate calls.
// This contract code is etched over LST token addresses in mainnet fork tests.
// Has exchange rate functions for WSTETH and RETH.
contract GasGuzzlerToken {
uint256 pointlessStorageVar = 42;

// RETH exchange rate getter
function getExchangeRate() external view returns (uint256) {
// Expensive SLOAD loop that hits the block gas limit before completing
Expand Down

0 comments on commit c2bb401

Please sign in to comment.