Skip to content

Commit

Permalink
fix: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
57Ark committed Nov 25, 2024
2 parents 6fd7fec + 7b37a78 commit 70af6af
Show file tree
Hide file tree
Showing 16 changed files with 2,199 additions and 2,294 deletions.
12 changes: 6 additions & 6 deletions bindings/AdapterData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// (c) Gearbox Foundation, 2023
pragma solidity ^0.8.17;

import {Tokens} from "./Tokens.sol";
import "./Tokens.sol";
import {Contracts} from "./SupportedContracts.sol";
import {AdapterType} from "./AdapterType.sol";

Expand All @@ -15,33 +15,33 @@ struct SimpleAdapter {
struct CurveAdapter {
Contracts targetContract;
AdapterType adapterType;
Tokens lpToken;
uint256 lpToken;
Contracts basePool;
}

struct CurveStETHAdapter {
Contracts curveETHGateway;
AdapterType adapterType;
Tokens lpToken;
uint256 lpToken;
}

struct CurveWrapper {
Contracts targetContract;
AdapterType adapterType;
Tokens lpToken;
uint256 lpToken;
uint256 nCoins;
}

struct ConvexBasePoolAdapter {
Contracts targetContract;
AdapterType adapterType;
Tokens stakedToken;
uint256 stakedToken;
}

struct StakingRewardsAdapter {
Contracts targetContract;
AdapterType adapterType;
Tokens stakedToken;
uint256 stakedToken;
}

contract AdapterData {
Expand Down
14 changes: 7 additions & 7 deletions bindings/CreditConfigLive.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
// (c) Gearbox Foundation, 2023
pragma solidity ^0.8.17;

import {Tokens} from "./Tokens.sol";
import "./Tokens.sol";
import {Contracts} from "./SupportedContracts.sol";

/// @dev A struct containing parameters for a recognized collateral token in the system
struct CollateralTokenHuman {
/// @dev Address of the collateral token
Tokens token;
uint256 token;
/// @dev Address of the liquidation threshold
uint16 liquidationThreshold;
}
Expand All @@ -20,21 +20,21 @@ struct BalancerPool {
}

struct UniswapV2Pair {
Tokens token0;
Tokens token1;
uint256 token0;
uint256 token1;
bool whitelisted;
}

struct UniswapV3Pool {
Tokens token0;
Tokens token1;
uint256 token0;
uint256 token1;
uint24 fee;
bool whitelisted;
}

/// @dev A struct representing the initial Credit Manager configuration parameters
struct CreditManagerV3HumanOpts {
Tokens underlying;
uint256 underlying;
/// @dev The minimal debt principal amount
uint128 minBorrowedAmount;
/// @dev The maximal debt principal amount
Expand Down
9 changes: 4 additions & 5 deletions bindings/PoolConfigLive.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
// Gearbox. Generalized leverage protocol that allows to take leverage and then use it across other DeFi protocols and platforms in a composable way.
// (c) Gearbox Foundation, 2023
pragma solidity ^0.8.17;

import {Tokens} from "./Tokens.sol";
import "./Tokens.sol";

struct QuotedTokenParams {
Tokens token;
uint256 token;
uint16 minRiskRate;
uint16 maxRate;
uint96 limit;
Expand All @@ -25,8 +24,8 @@ struct PoolParams {
}

contract PoolConfigLive {
mapping(Tokens => PoolParams) poolParams;
Tokens[] underlyings;
mapping(uint256 => PoolParams) poolParams;
uint256[] underlyings;

constructor() {
PoolParams storage pp;
Expand Down
38 changes: 19 additions & 19 deletions bindings/PriceFeedDataLive.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@
// (c) Gearbox Foundation, 2023
pragma solidity ^0.8.17;

import {Tokens} from "./Tokens.sol";
import "./Tokens.sol";
import {Contracts} from "./SupportedContracts.sol";

import {TokensLib} from "./TokensLib.sol";

struct ChainlinkPriceFeedData {
Tokens token;
uint256 token;
address priceFeed;
uint32 stalenessPeriod;
bool reserve;
bool trusted;
}

struct CurvePriceFeedData {
Tokens lpToken;
Tokens[] assets;
uint256 lpToken;
uint256[] assets;
Contracts pool;
bool reserve;
bool trusted;
}

struct CrvUsdPriceFeedData {
Tokens token;
Tokens underlying;
uint256 token;
uint256 underlying;
Contracts pool;
bool reserve;
bool trusted;
}

struct TheSamePriceFeedData {
Tokens token;
Tokens tokenHasSamePriceFeed;
uint256 token;
uint256 tokenHasSamePriceFeed;
bool reserve;
bool trusted;
}

struct SingeTokenPriceFeedData {
Tokens token;
uint256 token;
bool reserve;
bool trusted;
}
Expand All @@ -60,7 +60,7 @@ struct CompositePriceFeedDataShort {
}

struct CompositePriceFeedData {
Tokens token;
uint256 token;
// Target data
bool isTargetRedstone;
RedStonePriceFeedDataShort redstoneTargetToBaseData;
Expand All @@ -77,7 +77,7 @@ struct CompositePriceFeedData {
}

struct BoundedPriceFeedData {
Tokens token;
uint256 token;
address priceFeed;
uint32 stalenessPeriod;
uint256 upperBound;
Expand All @@ -86,21 +86,21 @@ struct BoundedPriceFeedData {
}

struct GenericLPPriceFeedData {
Tokens lpToken;
Tokens underlying;
uint256 lpToken;
uint256 underlying;
bool reserve;
bool trusted;
}

struct BalancerLPPriceFeedData {
Tokens lpToken;
Tokens[] assets;
uint256 lpToken;
uint256[] assets;
bool reserve;
bool trusted;
}

struct RedStonePriceFeedData {
Tokens token;
uint256 token;
string dataServiceId;
bytes32 dataFeedId;
address[10] signers;
Expand All @@ -110,7 +110,7 @@ struct RedStonePriceFeedData {
}

struct PythPriceFeedData {
Tokens token;
uint256 token;
bytes32 priceFeedId;
string ticker;
address pyth;
Expand All @@ -119,8 +119,8 @@ struct PythPriceFeedData {
}

struct PendlePriceFeedData {
Tokens token;
Tokens underlying;
uint256 token;
uint256 underlying;
address market;
uint32 twapWindow;
bool reserve;
Expand Down
4 changes: 2 additions & 2 deletions bindings/TokensData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
// (c) Gearbox Foundation, 2023
pragma solidity ^0.8.17;

import {Tokens, TokenType} from "./Tokens.sol";
import "./Tokens.sol";

interface IERC20Check {
function totalSupply() external view returns (uint256);
}

struct TokenData {
Tokens id;
uint256 id;
address addr;
string symbol;
TokenType tokenType;
Expand Down
Loading

0 comments on commit 70af6af

Please sign in to comment.