Skip to content

Commit

Permalink
chore: move strategies into their own folders
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlak committed Dec 15, 2023
1 parent e3594aa commit 90b331f
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion contracts/PositionRenderer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "./libraries/StringsLib.sol";
import "./libraries/AssemblyLib.sol";
import { PoolIdLib } from "./libraries/PoolLib.sol";
import "./interfaces/IPortfolio.sol";
import "./strategies/NormalStrategy.sol";
import "./strategies/NormalStrategy/NormalStrategy.sol";

/**
* @title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ pragma solidity 0.8.19;

import "./IG3MStrategy.sol";
import "./G3MStrategyLib.sol";
import "../interfaces/IPortfolio.sol";
import "../libraries/SwapLib.sol";
import "../libraries/AssemblyLib.sol";
import "../libraries/PoolLib.sol";
import "../../interfaces/IPortfolio.sol";
import "../../libraries/SwapLib.sol";
import "../../libraries/AssemblyLib.sol";
import "../../libraries/PoolLib.sol";

contract G3MStrategy is IG3MStrategy {
using AssemblyLib for *;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import "../interfaces/IStrategy.sol";
import "../../interfaces/IStrategy.sol";

interface IG3MStrategy is IStrategy {
error NotPortfolio();
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import "../interfaces/IStrategy.sol";
import "../../interfaces/IStrategy.sol";

/**
* @title
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.19;

import "../interfaces/IPortfolio.sol";
import "../libraries/BisectionLib.sol";
import "../libraries/PortfolioLib.sol";
import "../../interfaces/IPortfolio.sol";
import "../../libraries/PortfolioLib.sol";
import "./BisectionLib.sol";
import "./INormalStrategy.sol";
import "./NormalStrategyLib.sol";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ pragma solidity ^0.8.18;
import "solstat/Gaussian.sol";
import "solmate/utils/FixedPointMathLib.sol";
import "solmate/utils/SafeCastLib.sol";
import "../libraries/AssemblyLib.sol";
import "../libraries/BisectionLib.sol";
import { PortfolioPool } from "../libraries/PoolLib.sol";
import { Order } from "../libraries/SwapLib.sol";
import "../../libraries/AssemblyLib.sol";
import "./BisectionLib.sol";
import { PortfolioPool } from "../../libraries/PoolLib.sol";
import { Order } from "../../libraries/SwapLib.sol";
import {
SQRT_WAD,
SECONDS_PER_YEAR,
SECONDS_PER_DAY,
DOUBLE_WAD
} from "../libraries/ConstantsLib.sol";
} from "../../libraries/ConstantsLib.sol";

using FixedPointMathLib for uint256;
using FixedPointMathLib for uint128;
Expand Down
4 changes: 2 additions & 2 deletions test/Setup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import "contracts/test/SimpleRegistry.sol";
import "contracts/Portfolio.sol";

// Strategy to test
import "contracts/strategies/NormalStrategy.sol";
import "contracts/strategies/G3MStrategy.sol";
import "contracts/strategies/NormalStrategy/NormalStrategy.sol";
import "contracts/strategies/G3MStrategy/G3MStrategy.sol";

// Contracts in the test environment
struct SubjectsType {
Expand Down
2 changes: 1 addition & 1 deletion test/TestBisectionLib.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity ^0.8.4;

import "forge-std/Test.sol";
import "contracts/libraries/BisectionLib.sol" as BisectionLib;
import "contracts/strategies/NormalStrategy/BisectionLib.sol" as BisectionLib;

contract TestBisectionLib is Test {
function simplePolynomial(
Expand Down
2 changes: 1 addition & 1 deletion test/TestPortfolioBalanceOf.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.4;
import "solmate/tokens/ERC1155.sol";
import "../contracts/libraries/AssemblyLib.sol";
import "./Setup.sol";
import "../contracts/strategies/NormalStrategy.sol";
import "../contracts/strategies/NormalStrategy/NormalStrategy.sol";

contract TestPortfolioBalanceOf is Setup {
function test_balanceOf_allocating_increases_balance()
Expand Down
2 changes: 1 addition & 1 deletion test/TestPositionRendererUri.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.4;
import "solmate/tokens/ERC1155.sol";
import "../contracts/libraries/AssemblyLib.sol";
import "./Setup.sol";
import "../contracts/strategies/NormalStrategy.sol";
import "../contracts/strategies/NormalStrategy/NormalStrategy.sol";

contract TestPositionRendererUri is Setup {
struct MetaContext {
Expand Down
2 changes: 1 addition & 1 deletion test/strategies/NormalStrategy/NormalConfiguration.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using AssemblyLib for uint128;
using AssemblyLib for uint32;

// Strategy contract
import "contracts/strategies/NormalStrategyLib.sol";
import "contracts/strategies/NormalStrategy/NormalStrategyLib.sol";

uint256 constant NormalConfiguration_DEFAULT_PRICE = 1 ether;
uint256 constant NormalConfiguration_DEFAULT_STRIKE_WAD = 1 ether;
Expand Down
2 changes: 1 addition & 1 deletion test/utils/GhostType.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "contracts/interfaces/IStrategy.sol";
import "contracts/interfaces/IPortfolio.sol";
import "contracts/libraries/PortfolioLib.sol";
import "solmate/test/utils/mocks/MockERC20.sol";
import "contracts/strategies/NormalStrategyLib.sol";
import "contracts/strategies/NormalStrategy/NormalStrategyLib.sol";
import "contracts/Portfolio.sol";

import { Coin } from "./CoinType.sol";
Expand Down

0 comments on commit 90b331f

Please sign in to comment.