Skip to content

Commit

Permalink
chore(sol): remove KUMOToken and KUMOStaking from all contracts and i…
Browse files Browse the repository at this point in the history
…nterfaces
  • Loading branch information
arthurka-o committed Sep 27, 2023
1 parent e36545a commit a93bd93
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 39 deletions.
9 changes: 0 additions & 9 deletions packages/contracts/contracts/BorrowerOperations.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import "./Interfaces/ITroveManagerDiamond.sol";
import "./Interfaces/IKUSDToken.sol";
import "./Interfaces/ICollSurplusPool.sol";
import "./Interfaces/ISortedTroves.sol";
import "./Interfaces/IKUMOStaking.sol";
import "./Interfaces/IStabilityPoolFactory.sol";
import "./Dependencies/KumoBase.sol";
import "./Dependencies/CheckContract.sol";
Expand All @@ -33,9 +32,6 @@ contract BorrowerOperations is KumoBase, CheckContract, IBorrowerOperations {

ICollSurplusPool collSurplusPool;

IKUMOStaking public kumoStaking;
address public kumoStakingAddress;

IKUSDToken public kusdToken;

// A doubly linked list of Troves, sorted by their collateral ratios
Expand Down Expand Up @@ -127,7 +123,6 @@ contract BorrowerOperations is KumoBase, CheckContract, IBorrowerOperations {
address _collSurplusPoolAddress,
address _sortedTrovesAddress,
address _kusdTokenAddress,
address _kumoStakingAddress,
address _kumoParamsAddress
) external override onlyOwner {
// This makes impossible to open a trove with zero withdrawn KUSD
Expand All @@ -139,7 +134,6 @@ contract BorrowerOperations is KumoBase, CheckContract, IBorrowerOperations {
checkContract(_collSurplusPoolAddress);
checkContract(_sortedTrovesAddress);
checkContract(_kusdTokenAddress);
checkContract(_kumoStakingAddress);
checkContract(_kumoParamsAddress);
// isInitialized = true;

Expand All @@ -151,8 +145,6 @@ contract BorrowerOperations is KumoBase, CheckContract, IBorrowerOperations {
collSurplusPool = ICollSurplusPool(_collSurplusPoolAddress);
sortedTroves = ISortedTroves(_sortedTrovesAddress);
kusdToken = IKUSDToken(_kusdTokenAddress);
kumoStakingAddress = _kumoStakingAddress;
kumoStaking = IKUMOStaking(_kumoStakingAddress);

setKumoParameters(_kumoParamsAddress);

Expand All @@ -162,7 +154,6 @@ contract BorrowerOperations is KumoBase, CheckContract, IBorrowerOperations {
emit CollSurplusPoolAddressChanged(_collSurplusPoolAddress);
emit SortedTrovesAddressChanged(_sortedTrovesAddress);
emit KUSDTokenAddressChanged(_kusdTokenAddress);
emit KUMOStakingAddressChanged(_kumoStakingAddress);

_renounceOwnership();
}
Expand Down
1 change: 0 additions & 1 deletion packages/contracts/contracts/Interfaces/IActivePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ interface IActivePool is IPool {
event BorrowerOperationsAddressChanged(address _newBorrowerOperationsAddress);
event TroveManagerAddressChanged(address _newTroveManagerAddress);
event CollSurplusPoolAddressChanged(address _newCollSurplusPoolAddress);
event KumoStakingAddressChanged(address _newKumoStakingAddress);
event ActivePoolKUSDDebtUpdated(address _asset, uint256 _KUSDDebt);
event ActivePoolAssetBalanceUpdated(address _asset, uint256 _assetBalance);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ interface IBorrowerOperations {
event PriceFeedAddressChanged(address _newPriceFeedAddress);
event SortedTrovesAddressChanged(address _sortedTrovesAddress);
event KUSDTokenAddressChanged(address _kusdTokenAddress);
event KUMOStakingAddressChanged(address _kumoStakingAddress);

event TroveCreated(address indexed _asset, address indexed _borrower, uint256 arrayIndex);
event TroveUpdated(
Expand All @@ -37,7 +36,6 @@ interface IBorrowerOperations {
address _collSurplusPoolAddress,
address _sortedTrovesAddress,
address _kusdTokenAddress,
address _kumoStakingAddress,
address _kumoParamsAddress
) external;

Expand Down
12 changes: 1 addition & 11 deletions packages/contracts/contracts/Interfaces/IKumoParameters.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import "./IKumoBase.sol";
import "./IKUSDToken.sol";
import "./IStabilityPoolFactory.sol";
import "./ISortedTroves.sol";
import "./IKUMOToken.sol";
import "./IKUMOStaking.sol";

interface IKumoParameters {
error SafeCheckError(string parameter, uint256 valueEntered, uint256 minValue, uint256 maxValue);
Expand All @@ -38,8 +36,6 @@ interface IKumoParameters {
event GasPoolAddressChanged(address _gasPoolAddress);
event CollSurplusPoolAddressChanged(address _collSurplusPoolAddress);
event SortedTrovesAddressChanged(address _sortedTrovesAddress);
event KUMOTokenAddressChanged(address _kumoTokenAddress);
event KUMOStakingAddressChanged(address _kumoStakingAddress);
event TroveRedemptorAddressChanged(address _troveRedemptorAddress);

function BOOTSTRAP_PERIOD() external view returns (uint256);
Expand Down Expand Up @@ -88,10 +84,6 @@ interface IKumoParameters {

function sortedTroves() external view returns (ISortedTroves);

function kumoToken() external view returns (IKUMOToken);

function kumoStaking() external view returns (IKUMOStaking);

function setAddresses(
address _activePool,
address _defaultPool,
Expand All @@ -101,9 +93,7 @@ interface IKumoParameters {
address _collSurplusPoolAddress,
address _kusdTokenAddress,
address _stabilityPoolFactoryAddress,
address _sortedTrovesAddress,
address _kumoTokenAddress,
address _kumoStakingAddress
address _sortedTrovesAddress
) external;

function setPriceFeed(address _priceFeed) external;
Expand Down
12 changes: 1 addition & 11 deletions packages/contracts/contracts/KumoParameters.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ contract KumoParameters is IKumoParameters, Ownable, CheckContract {
IStabilityPoolFactory public override stabilityPoolFactory;
address public gasPoolAddress;
ISortedTroves public override sortedTroves;
IKUMOToken public override kumoToken;
IKUMOStaking public override kumoStaking;
// address public adminContract;

bool public isInitialized;
Expand All @@ -81,9 +79,7 @@ contract KumoParameters is IKumoParameters, Ownable, CheckContract {
address _collSurplusPoolAddress,
address _kusdTokenAddress,
address _stabilityPoolFactoryAddress,
address _sortedTrovesAddress,
address _kumoTokenAddress,
address _kumoStakingAddress
address _sortedTrovesAddress
) external onlyOwner {
require(!isInitialized, "Already initalized");
checkContract(_activePool);
Expand All @@ -94,8 +90,6 @@ contract KumoParameters is IKumoParameters, Ownable, CheckContract {
checkContract(_kusdTokenAddress);
checkContract(_stabilityPoolFactoryAddress);
checkContract(_sortedTrovesAddress);
checkContract(_kumoTokenAddress);
checkContract(_kumoStakingAddress);
isInitialized = true;

activePool = IActivePool(_activePool);
Expand All @@ -107,17 +101,13 @@ contract KumoParameters is IKumoParameters, Ownable, CheckContract {
stabilityPoolFactory = IStabilityPoolFactory(_stabilityPoolFactoryAddress);
gasPoolAddress = _gasPoolAddress;
sortedTroves = ISortedTroves(_sortedTrovesAddress);
kumoToken = IKUMOToken(_kumoTokenAddress);
kumoStaking = IKUMOStaking(_kumoStakingAddress);

emit BorrowerOperationsAddressChanged(_borrowerOperationsAddress);
emit StabilityPoolFactoryAddressChanged(_stabilityPoolFactoryAddress);
emit GasPoolAddressChanged(_gasPoolAddress);
emit CollSurplusPoolAddressChanged(_collSurplusPoolAddress);
emit KUSDTokenAddressChanged(_kusdTokenAddress);
emit SortedTrovesAddressChanged(_sortedTrovesAddress);
emit KUMOTokenAddressChanged(_kumoTokenAddress);
emit KUMOStakingAddressChanged(_kumoStakingAddress);
}

function setPriceFeed(address _priceFeed) external override onlyOwner {
Expand Down
2 changes: 0 additions & 2 deletions packages/contracts/contracts/Proxy/BorrowerWrappersScript.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ import "../Interfaces/IBorrowerOperations.sol";
import "../Interfaces/ITroveManagerDiamond.sol";
import "../Interfaces/IStabilityPool.sol";
import "../Interfaces/IPriceFeed.sol";
import "../Interfaces/IKUMOStaking.sol";
import "./BorrowerOperationsScript.sol";
import "./ETHTransferScript.sol";
import "./KUMOStakingScript.sol";
import "hardhat/console.sol";

contract BorrowerWrappersScript {
Expand Down
4 changes: 1 addition & 3 deletions packages/contracts/contracts/TestContracts/EchidnaTester.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ contract EchidnaTester {
address(collSurplusPool),
address(sortedTroves),
address(kusdToken),
address(0),
address(kumoParams)
);

Expand All @@ -89,8 +88,7 @@ contract EchidnaTester {
address(troveManager),
address(stabilityPoolFactory),
address(defaultPool),
address(collSurplusPool),
address(0)
address(collSurplusPool)
);
defaultPool.setAddresses(address(troveManager), address(activePool));

Expand Down

0 comments on commit a93bd93

Please sign in to comment.