Skip to content

Commit

Permalink
Remove gas pool interface and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RickGriff committed Jan 20, 2024
1 parent 6300d31 commit ba5e791
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
4 changes: 1 addition & 3 deletions contracts/src/GasPool.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;

import './Interfaces/IGasPool.sol';

/**
* The purpose of this contract is to hold Bold tokens for gas compensation:
* https://github.com/liquity/dev#gas-compensation
Expand All @@ -13,6 +11,6 @@ import './Interfaces/IGasPool.sol';
* 50 Bold debt on the trove is cancelled.
* See this issue for more context: https://github.com/liquity/dev/issues/186
*/
contract GasPool is IGasPool {
contract GasPool {
// do nothing, as the core contracts have permission to send to and burn from this address
}
7 changes: 0 additions & 7 deletions contracts/src/Interfaces/IGasPool.sol

This file was deleted.

6 changes: 4 additions & 2 deletions contracts/src/test/TestContracts/BaseTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import "../../Interfaces/IActivePool.sol";
import "../../Interfaces/IBoldToken.sol";
import "../../Interfaces/IBorrowerOperations.sol";
import "../../Interfaces/ICollSurplusPool.sol";
import "../../Interfaces/IGasPool.sol";
import "../../Interfaces/IDefaultPool.sol";
import "../../Interfaces/IPriceFeed.sol";
import "../../Interfaces/ISortedTroves.sol";
import "../../Interfaces/IStabilityPool.sol";
import "../../Interfaces/ITroveManager.sol";

import "../../GasPool.sol";

import "forge-std/Test.sol";
import "forge-std/console2.sol";

Expand All @@ -35,14 +36,15 @@ contract BaseTest is Test {
IActivePool activePool;
IBorrowerOperations borrowerOperations;
ICollSurplusPool collSurplusPool;
IGasPool gasPool;
IDefaultPool defaultPool;
IPriceFeed priceFeed;
ISortedTroves sortedTroves;
IStabilityPool stabilityPool;
ITroveManager troveManager;
IBoldToken boldToken;

GasPool gasPool;

function createAccounts() public {
address[10] memory tempAccounts;
for (uint256 i = 0; i < accounts.getAccountsCount(); i++) {
Expand Down
6 changes: 3 additions & 3 deletions contracts/src/test/deployment.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ contract Deployment is DevTestSetup {

// Active Pool

function testActivePoolHasCorrectActivePoolAddress() public {
function testActivePoolHasCorrectStabilityPoolAddress() public {
address stabilityPoolAddress = address(stabilityPool);
address recordedStabilityPoolAddress = activePool.stabilityPoolAddress();
assertEq(stabilityPoolAddress, recordedStabilityPoolAddress);
Expand Down Expand Up @@ -131,13 +131,13 @@ contract Deployment is DevTestSetup {

// Sorted Troves

function testSortedTrovesHasCorrectTroveManagerAddress() public {
function testSortedTrovesHasCorrectBorrowerOperationsAddress() public {
address borrowerOperationsAddress = address(borrowerOperations);
address recordedBorrowerOperationsAddress = sortedTroves.borrowerOperationsAddress();
assertEq(borrowerOperationsAddress, recordedBorrowerOperationsAddress);
}

function testSortedTrovesHasCorrectBorrowerOperationsAddress() public {
function testSortedTrovesHasCorrectTroveManagerAddress() public {
address troveManagerAddress = address(troveManager);
address recordedTroveManagerAddress = address(sortedTroves.troveManager());
assertEq(troveManagerAddress, recordedTroveManagerAddress);
Expand Down

0 comments on commit ba5e791

Please sign in to comment.