Skip to content

Commit

Permalink
Merge pull request #136 from roycoprotocol/feat/relative-imports
Browse files Browse the repository at this point in the history
Relative Imports
  • Loading branch information
corddry authored Dec 7, 2024
2 parents 3feeb92 + 22fd36b commit 788a0af
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 42 deletions.
5 changes: 3 additions & 2 deletions src/Points.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import { PointsFactory } from "src/PointsFactory.sol";
import { Ownable2Step, Ownable } from "lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol";
import { PointsFactory } from "./PointsFactory.sol";
import { Ownable2Step, Ownable } from "../lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol";

/// @title Points
/// @author CopyPaste, Jack Corddry, Shivaansh Kapoor
Expand Down Expand Up @@ -35,6 +35,7 @@ contract Points is Ownable2Step {
STORAGE
//////////////////////////////////////////////////////////////*/
/// @dev Maps a vault to if the vault is allowed to call this contract

mapping(address => bool) public isAllowedVault;

/// @dev The PointsFactory used to create this program
Expand Down
4 changes: 2 additions & 2 deletions src/PointsFactory.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import { Points } from "src/Points.sol";
import { Ownable2Step, Ownable } from "lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol";
import { Points } from "./Points.sol";
import { Ownable2Step, Ownable } from "../lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol";

/// @title PointsFactory
/// @author CopyPaste, Jack Corddry, Shivaansh Kapoor
Expand Down
18 changes: 9 additions & 9 deletions src/RecipeMarketHub.sol
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import { RecipeMarketHubBase, RewardStyle, WeirollWallet } from "src/base/RecipeMarketHubBase.sol";
import { ERC20 } from "lib/solmate/src/tokens/ERC20.sol";
import { ERC4626 } from "lib/solmate/src/tokens/ERC4626.sol";
import { ClonesWithImmutableArgs } from "lib/clones-with-immutable-args/src/ClonesWithImmutableArgs.sol";
import { SafeTransferLib } from "lib/solmate/src/utils/SafeTransferLib.sol";
import { FixedPointMathLib } from "lib/solmate/src/utils/FixedPointMathLib.sol";
import { Points } from "src/Points.sol";
import { PointsFactory } from "src/PointsFactory.sol";
import { Owned } from "lib/solmate/src/auth/Owned.sol";
import { RecipeMarketHubBase, RewardStyle, WeirollWallet } from "./base/RecipeMarketHubBase.sol";
import { ERC20 } from "../lib/solmate/src/tokens/ERC20.sol";
import { ERC4626 } from "../lib/solmate/src/tokens/ERC4626.sol";
import { ClonesWithImmutableArgs } from "../lib/clones-with-immutable-args/src/ClonesWithImmutableArgs.sol";
import { SafeTransferLib } from "../lib/solmate/src/utils/SafeTransferLib.sol";
import { FixedPointMathLib } from "../lib/solmate/src/utils/FixedPointMathLib.sol";
import { Points } from "./Points.sol";
import { PointsFactory } from "./PointsFactory.sol";
import { Owned } from "../lib/solmate/src/auth/Owned.sol";

/// @title RecipeMarketHub
/// @author Jack Corddry, CopyPaste, Shivaansh Kapoor
Expand Down
8 changes: 4 additions & 4 deletions src/VaultMarketHub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ pragma solidity ^0.8.0;

import { ERC20 } from "../lib/solmate/src/tokens/ERC20.sol";
import { ERC4626 } from "../lib/solmate/src/tokens/ERC4626.sol";
import { WrappedVault } from "src/WrappedVault.sol";
import { SafeTransferLib } from "lib/solmate/src/utils/SafeTransferLib.sol";
import { Ownable2Step, Ownable } from "lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol";
import { ReentrancyGuardTransient } from "lib/openzeppelin-contracts/contracts/utils/ReentrancyGuardTransient.sol";
import { WrappedVault } from "./WrappedVault.sol";
import { SafeTransferLib } from "../lib/solmate/src/utils/SafeTransferLib.sol";
import { Ownable2Step, Ownable } from "../lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol";
import { ReentrancyGuardTransient } from "../lib/openzeppelin-contracts/contracts/utils/ReentrancyGuardTransient.sol";

/// @title VaultMarketHub
/// @author Jack Corddry, CopyPaste, Shivaansh Kapoor
Expand Down
8 changes: 4 additions & 4 deletions src/WeirollWallet.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import { VM } from "lib/enso-weiroll/contracts/VM.sol";
import { Clone } from "lib/clones-with-immutable-args/src/Clone.sol";
import { IERC1271 } from "src/interfaces/IERC1271.sol";
import { ECDSA } from "lib/solady/src/utils/ECDSA.sol";
import { VM } from "../lib/enso-weiroll/contracts/VM.sol";
import { Clone } from "../lib/clones-with-immutable-args/src/Clone.sol";
import { IERC1271 } from "./interfaces/IERC1271.sol";
import { ECDSA } from "../lib/solady/src/utils/ECDSA.sol";

/// @title WeirollWallet
/// @author Jack Corddry, Shivaansh Kapoor, CopyPaste
Expand Down
22 changes: 11 additions & 11 deletions src/WrappedVault.sol
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import { ERC20 } from "lib/solmate/src/tokens/ERC20.sol";
import { InitializableERC20 } from "src/periphery/InitializableERC20.sol";
import { SafeCast } from "src/libraries/SafeCast.sol";
import { SafeTransferLib } from "lib/solmate/src/utils/SafeTransferLib.sol";
import { Ownable } from "lib/solady/src/auth/Ownable.sol";
import { Points } from "src/Points.sol";
import { PointsFactory } from "src/PointsFactory.sol";
import { FixedPointMathLib } from "lib/solmate/src/utils/FixedPointMathLib.sol";
import { FixedPointMathLib as SoladyMath } from "lib/solady/src/utils/FixedPointMathLib.sol";
import { IWrappedVault } from "src/interfaces/IWrappedVault.sol";
import { WrappedVaultFactory } from "src/WrappedVaultFactory.sol";
import { ERC20 } from "../lib/solmate/src/tokens/ERC20.sol";
import { InitializableERC20 } from "./periphery/InitializableERC20.sol";
import { SafeCast } from "./libraries/SafeCast.sol";
import { SafeTransferLib } from "../lib/solmate/src/utils/SafeTransferLib.sol";
import { Ownable } from "../lib/solady/src/auth/Ownable.sol";
import { Points } from "./Points.sol";
import { PointsFactory } from "./PointsFactory.sol";
import { FixedPointMathLib } from "../lib/solmate/src/utils/FixedPointMathLib.sol";
import { FixedPointMathLib as SoladyMath } from "../lib/solady/src/utils/FixedPointMathLib.sol";
import { IWrappedVault } from "./interfaces/IWrappedVault.sol";
import { WrappedVaultFactory } from "./WrappedVaultFactory.sol";

/// @title WrappedVault
/// @author Jack Corddry, CopyPaste, Shivaansh Kapoor
Expand Down
10 changes: 5 additions & 5 deletions src/WrappedVaultFactory.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.20;

import { Ownable2Step, Ownable } from "lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol";
import { ERC4626 } from "lib/solmate/src/tokens/ERC4626.sol";
import { LibString } from "lib/solmate/src/utils/LibString.sol";
import { Clones } from "lib/openzeppelin-contracts/contracts/proxy/Clones.sol";
import { WrappedVault } from "src/WrappedVault.sol";
import { Ownable2Step, Ownable } from "../lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol";
import { ERC4626 } from "../lib/solmate/src/tokens/ERC4626.sol";
import { LibString } from "../lib/solmate/src/utils/LibString.sol";
import { Clones } from "../lib/openzeppelin-contracts/contracts/proxy/Clones.sol";
import { WrappedVault } from "./WrappedVault.sol";

/// @title WrappedVaultFactory
/// @author CopyPaste, Jack Corddry, Shivaansh Kapoor
Expand Down
8 changes: 4 additions & 4 deletions src/base/RecipeMarketHubBase.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import { ERC20 } from "lib/solmate/src/tokens/ERC20.sol";
import { WeirollWallet } from "src/WeirollWallet.sol";
import { ReentrancyGuardTransient } from "lib/openzeppelin-contracts/contracts/utils/ReentrancyGuardTransient.sol";
import { Owned } from "lib/solmate/src/auth/Owned.sol";
import { ERC20 } from "../../lib/solmate/src/tokens/ERC20.sol";
import { WeirollWallet } from "../WeirollWallet.sol";
import { ReentrancyGuardTransient } from "../../lib/openzeppelin-contracts/contracts/utils/ReentrancyGuardTransient.sol";
import { Owned } from "../../lib/solmate/src/auth/Owned.sol";

enum RewardStyle {
Upfront,
Expand Down
2 changes: 1 addition & 1 deletion src/periphery/InitializableERC20.sol
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 { Initializable } from "lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol";
import { Initializable } from "../../lib/openzeppelin-contracts/contracts/proxy/utils/Initializable.sol";

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol), Shivaansh Kapoor, Jack Corddry
Expand Down

0 comments on commit 788a0af

Please sign in to comment.