Skip to content

Commit

Permalink
fix: contractType update
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmikko committed Jul 18, 2024
1 parent 24544a1 commit 8956443
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion contracts/compressors/PoolCompressor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@ contract PoolCompressorV3 {

result.version = _rateKeeper.version();
if (result.version == 3_00) {
result.rateKeeperType = uint16(RateKeeperType.Gauge);
result.contractType = "RK_GAUGE";
_pqk = IPoolQuotaKeeperV3(PoolV3(IGaugeV3(rateKeeper).pool()).poolQuotaKeeper());
result.serialisedData = GaugeSerializer(gaugeSerializer).serialize(rateKeeper);
} else {
// TODO: add querying data for 3.1
// resuilt.rateKeeperType = uint16(_rateKeeper.rateKeeperType());
// _pqk = IPoolQuotaKeeperV3(IGaugeV3(rateKeeper).quotaKeeper());
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/types/CreditFacadeState.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ pragma solidity ^0.8.17;

struct CreditFacadeState {
address addr;
uint16 creditFacadeType;
uint256 version;
bytes32 contractType;
address creditManager;
address creditConfigurator;
uint256 minDebt;
Expand Down
2 changes: 1 addition & 1 deletion contracts/types/CreditManagerState.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ pragma solidity ^0.8.17;

struct CreditManagerState {
address addr;
uint16 creditManagerType;
uint256 version;
bytes32 contractType;
string name;
address creditFacade; // V2 only: address of creditFacade
address creditConfigurator; // V2 only: address of creditConfigurator
Expand Down
2 changes: 1 addition & 1 deletion contracts/types/InterestRateModelState.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.17;

struct InterestRateModelState {
address addr;
uint16 modelType;
uint256 version;
bytes32 contractType;
bytes serializedParams;
}
2 changes: 1 addition & 1 deletion contracts/types/LossLiquidatorState.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity ^0.8.17;

struct LossLiquidatorState {
address addr;
uint16 lossLiquidatorType;
uint256 version;
bytes32 contractType;
bytes serialisedData;
}
1 change: 1 addition & 0 deletions contracts/types/MarketData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ struct MarketData {
address[] emergencyLiquidators;
}
// LossLiquidatorPolicy
// ControllerTimelock (?)

struct TokenBalance {
address token;
Expand Down
1 change: 1 addition & 0 deletions contracts/types/PoolQuotaKeeperState.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pragma solidity ^0.8.17;
struct PoolQuotaKeeperState {
address addr;
uint256 version;
bytes32 contractType;
address rateKeeper;
QuotaTokenParams[] quotas;
address[] creditManagers;
Expand Down
2 changes: 1 addition & 1 deletion contracts/types/PoolState.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ pragma solidity ^0.8.17;
struct PoolState {
// contract properties
address addr;
uint16 poolType;
uint256 version;
bytes32 contractType;
//
// ERC20 Properties
string symbol;
Expand Down
1 change: 1 addition & 0 deletions contracts/types/PriceOracleState.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pragma solidity ^0.8.17;
struct PriceOracleState {
address addr;
uint256 version;
bytes32 contractType;
PriceFeedMapEntry priceFeedMapping;
PriceFeedTreeNode priceFeedStructure;
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/types/RateKeeperState.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ pragma solidity ^0.8.17;

struct RateKeeperState {
address addr;
uint16 rateKeeperType;
uint256 version;
bytes32 contractType;
Rate[] rates;
bytes serialisedData;
}
Expand Down

0 comments on commit 8956443

Please sign in to comment.