Skip to content

Commit

Permalink
fix: relative imports for libs to avoid conflicts
Browse files Browse the repository at this point in the history
remappings.txt is causing issues when the same library is included in the base project as well as a lib dependency. Use relative imports for maximum compatibility
  • Loading branch information
joejordan committed Dec 23, 2022
1 parent cab09d3 commit 2b74c6c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/FFICast.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ pragma solidity ^0.8.4;

import { PRBTest } from "@prb/test/PRBTest.sol";

import { BytesLib } from "solidity-bytes-utils/BytesLib.sol";
import { CramBit } from "crambit/CramBit.sol";
import { BytesLib } from "../lib/solidity-bytes-utils/contracts/BytesLib.sol";
import { CramBit } from "../lib/CramBit/src/CramBit.sol";

/**
* @title FFICast
Expand Down
6 changes: 3 additions & 3 deletions src/FoundryRandom.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import { BytesLib } from "solidity-bytes-utils/BytesLib.sol";
import { CramBit } from "crambit/CramBit.sol";
import { BytesLib } from "../lib/solidity-bytes-utils/contracts/BytesLib.sol";
import { CramBit } from "../lib/CramBit/src/CramBit.sol";

import { FFICast } from "src/FFICast.sol";
import { FFICast } from "./FFICast.sol";

/**
* @title FoundryRandom
Expand Down
4 changes: 2 additions & 2 deletions test/FFICast.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "@prb/test/PRBTest.sol";

import { BytesLib } from "solidity-bytes-utils/BytesLib.sol";
import { CramBit } from "crambit/CramBit.sol";
import { CramBit } from "../lib/CramBit/src/CramBit.sol";

import { FFICast } from "src/FFICast.sol";
import { FFICast } from "../src/FFICast.sol";

/// @notice basic functionality test of our FFICast project
contract FFICastTest is PRBTest {
Expand Down
6 changes: 3 additions & 3 deletions test/FoundryRandom.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pragma solidity >=0.8.4;
import { console2 } from "forge-std/console2.sol";
import { PRBTest } from "@prb/test/PRBTest.sol";

import { BytesLib } from "solidity-bytes-utils/BytesLib.sol";
import { CramBit } from "crambit/CramBit.sol";
import { BytesLib } from "../lib/solidity-bytes-utils/contracts/BytesLib.sol";
import { CramBit } from "../lib/CramBit/src/CramBit.sol";

import { FoundryRandom } from "src/FoundryRandom.sol";
import { FoundryRandom } from "../src/FoundryRandom.sol";

/// @notice tests of our Foundry random number generators.
contract FoundryRandomTest is PRBTest, FoundryRandom {
Expand Down

0 comments on commit 2b74c6c

Please sign in to comment.