Skip to content

Commit

Permalink
Merge pull request #12 from ProjectOpenSea/ryan/solady-path
Browse files Browse the repository at this point in the history
solady remapping without src for compatibility with downstream projects
  • Loading branch information
emo-eth authored Oct 3, 2023
2 parents 31b49fd + fb1d457 commit 8c74bb7
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 19 deletions.
3 changes: 1 addition & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ out = "out"
libs = ["lib"]
remappings = [
'forge-std/=lib/forge-std/src',
'solady/=lib/solady/src/',
'solady-test/=lib/solady/test/',
'solady/=lib/solady/',
'openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/',
'seaport-types/=lib/seaport-types/src/',
'solarray/=lib/solarray/src/',
Expand Down
4 changes: 2 additions & 2 deletions src/dynamic-traits/OnchainTraits.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ pragma solidity ^0.8.17;

import {DynamicTraits} from "./DynamicTraits.sol";
import {Metadata} from "../onchain/Metadata.sol";
import {Ownable} from "solady/auth/Ownable.sol";
import {SSTORE2} from "solady/utils/SSTORE2.sol";
import {Ownable} from "solady/src/auth/Ownable.sol";
import {SSTORE2} from "solady/src/utils/SSTORE2.sol";
import {EnumerableSet} from "openzeppelin-contracts/contracts/utils/structs/EnumerableSet.sol";
import {
TraitLabelStorage,
Expand Down
4 changes: 2 additions & 2 deletions src/dynamic-traits/lib/TraitLabelLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma solidity ^0.8.17;
import {DisplayType, Metadata} from "../../onchain/Metadata.sol";
import {json} from "../../onchain/json.sol";
import {Solarray} from "solarray/Solarray.sol";
import {LibString} from "solady/utils/LibString.sol";
import {SSTORE2} from "solady/utils/SSTORE2.sol";
import {LibString} from "solady/src/utils/LibString.sol";
import {SSTORE2} from "solady/src/utils/SSTORE2.sol";

///@notice Bitmap type for storing allowed editors
type Editors is uint8;
Expand Down
4 changes: 2 additions & 2 deletions src/onchain/Metadata.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
pragma solidity ^0.8.17;

import {json} from "./json.sol";
import {LibString} from "solady/utils/LibString.sol";
import {LibString} from "solady/src/utils/LibString.sol";
import {Solarray} from "solarray/Solarray.sol";
import {Base64} from "solady/utils/Base64.sol";
import {Base64} from "solady/src/utils/Base64.sol";

enum DisplayType {
String,
Expand Down
2 changes: 1 addition & 1 deletion src/onchain/json.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import {LibString} from "solady/utils/LibString.sol";
import {LibString} from "solady/src/utils/LibString.sol";

/**
* @title JSON
Expand Down
2 changes: 1 addition & 1 deletion src/onchain/svg.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import {LibString} from "solady/utils/LibString.sol";
import {LibString} from "solady/src/utils/LibString.sol";

/**
* @title Core SVG utilitiy library which helps us construct SVG's with a simple, web-like API.
Expand Down
2 changes: 1 addition & 1 deletion src/reference/AbstractNFT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.17;
import {ERC721ConduitPreapproved_Solady, ERC721} from "../tokens/erc721/ERC721ConduitPreapproved_Solady.sol";
import {json} from "../onchain/json.sol";
import {svg} from "../onchain/svg.sol";
import {LibString} from "solady/utils/LibString.sol";
import {LibString} from "solady/src/utils/LibString.sol";
import {Solarray} from "solarray/Solarray.sol";
import {Metadata} from "../onchain/Metadata.sol";

Expand Down
4 changes: 2 additions & 2 deletions src/reference/ERC5192.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import {ERC721} from "solady/tokens/ERC721.sol";
import {ERC721} from "solady/src/tokens/ERC721.sol";
import {IERC5192} from "../interfaces/IERC5192.sol";
import {LibString} from "solady/utils/LibString.sol";
import {LibString} from "solady/src/utils/LibString.sol";

contract ERC5192 is ERC721, IERC5192 {
error TokenLocked(uint256 tokenId);
Expand Down
2 changes: 1 addition & 1 deletion src/reference/ExampleNFT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.17;

import {json} from "../onchain/json.sol";
import {svg} from "../onchain/svg.sol";
import {LibString} from "solady/utils/LibString.sol";
import {LibString} from "solady/src/utils/LibString.sol";
import {Solarray} from "solarray/Solarray.sol";
import {Metadata, DisplayType} from "../onchain/Metadata.sol";
import {AbstractNFT} from "./AbstractNFT.sol";
Expand Down
2 changes: 1 addition & 1 deletion src/tokens/erc1155/ERC1155ConduitPreapproved_Solady.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import {ERC1155} from "solady/tokens/ERC1155.sol";
import {ERC1155} from "solady/src/tokens/ERC1155.sol";
import {
CONDUIT,
_APPROVAL_FOR_ALL_EVENT_SIGNATURE,
Expand Down
2 changes: 1 addition & 1 deletion src/tokens/erc721/ERC721ConduitPreapproved_Solady.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import {ERC721} from "solady/tokens/ERC721.sol";
import {ERC721} from "solady/src/tokens/ERC721.sol";
import {
CONDUIT, _APPROVAL_FOR_ALL_EVENT_SIGNATURE, SOLADY_ERC721_MASTER_SLOT_SEED_MASKED
} from "../../lib/Constants.sol";
Expand Down
2 changes: 1 addition & 1 deletion test-ffi/onchain/svg.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import {Base64} from "solady/utils/Base64.sol";
import {Base64} from "solady/src/utils/Base64.sol";
import {Test} from "forge-std/Test.sol";
import {svg} from "../../src/onchain/svg.sol";
import {ExampleNFT} from "src/reference/ExampleNFT.sol";
Expand Down
2 changes: 1 addition & 1 deletion test-ffi/reference/ExampleNFT.t.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import {Base64} from "solady/utils/Base64.sol";
import {Base64} from "solady/src/utils/Base64.sol";
import {Test} from "forge-std/Test.sol";
import {ExampleNFT} from "src/reference/ExampleNFT.sol";

Expand Down
2 changes: 1 addition & 1 deletion test/onchain/json.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.4;

import {Test} from "forge-std/Test.sol";
import {json} from "src/onchain/json.sol";
import {LibString} from "solady/utils/LibString.sol";
import {LibString} from "solady/src/utils/LibString.sol";
import {StringTestUtility} from "./helpers/StringTestUtility.sol";

contract JsonTest is Test {
Expand Down

0 comments on commit 8c74bb7

Please sign in to comment.