diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e8d435..0f18cde 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,9 @@ jobs: with: version: nightly + - name: Update package + run: forge soldeer update + - name: Run Forge build run: | forge --version diff --git a/.gitignore b/.gitignore index 5168248..29328c4 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,6 @@ docs/ # Dotenv file .env node_modules -.yarn \ No newline at end of file +.yarn + +dependencies/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index b618289..0000000 --- a/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "lib/forge-std"] - path = lib/forge-std - url = https://github.com/foundry-rs/forge-std - shallow = true -[submodule "lib/openzeppelin-contracts"] - path = lib/openzeppelin-contracts - url = https://github.com/OpenZeppelin/openzeppelin-contracts -[submodule "lib/lib/openzeppelin-contracts"] - shallow = true diff --git a/foundry.toml b/foundry.toml index 9082196..9143dd0 100644 --- a/foundry.toml +++ b/foundry.toml @@ -29,3 +29,7 @@ runs = 256 [invariant] runs = 256 + +[dependencies] +forge-std = { version = "1.8.2" } +"@openzeppelin-contracts" = { version = "4.9.6" } diff --git a/lib/forge-std b/lib/forge-std deleted file mode 160000 index b6a506d..0000000 --- a/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b6a506db2262cad5ff982a87789ee6d1558ec861 diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts deleted file mode 160000 index 6b4ec6c..0000000 --- a/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6b4ec6c6c6b67d7350f5b449c0a2fd2dab1af3c7 diff --git a/remappings.txt b/remappings.txt new file mode 100644 index 0000000..4902534 --- /dev/null +++ b/remappings.txt @@ -0,0 +1,2 @@ +@forge-std-1.8.2=dependencies/forge-std-1.8.2 +@openzeppelin-contracts-4.9.6=dependencies/@openzeppelin-contracts-4.9.6 \ No newline at end of file diff --git a/soldeer.lock b/soldeer.lock new file mode 100644 index 0000000..45fd5b1 --- /dev/null +++ b/soldeer.lock @@ -0,0 +1,12 @@ + +[[dependencies]] +name = "forge-std" +version = "1.8.2" +source = "https://soldeer-revisions.s3.amazonaws.com/forge-std/1_8_2_19-05-2024_18:52:07_forge-std-1.8.2.zip" +checksum = "88a37e1d79f60b8aad08c7bd50a7a5ef973fc172b1495028d0725a17f5a4976c" + +[[dependencies]] +name = "@openzeppelin-contracts" +version = "4.9.6" +source = "https://soldeer-revisions.s3.amazonaws.com/@openzeppelin-contracts/4_9_6_14-03-2024_06:11:55_contracts.zip" +checksum = "57f2cae4b45b91b0847e58c36ea70aee0fb3212cc09b47279627f0764f87e5ee" diff --git a/src/legacy/transfers/RONTransferHelper.sol b/src/legacy/transfers/RONTransferHelper.sol index 93f16b0..15ee670 100644 --- a/src/legacy/transfers/RONTransferHelper.sol +++ b/src/legacy/transfers/RONTransferHelper.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import { Strings } from "../../../lib/openzeppelin-contracts/contracts/utils/Strings.sol"; +import { Strings } from "../../../dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol"; /** * @title RONTransferHelper diff --git a/src/legacy/transfers/TransferFromHelper.sol b/src/legacy/transfers/TransferFromHelper.sol index 19a98d6..c3139b5 100644 --- a/src/legacy/transfers/TransferFromHelper.sol +++ b/src/legacy/transfers/TransferFromHelper.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import { Strings } from "../../../lib/openzeppelin-contracts/contracts/utils/Strings.sol"; +import { Strings } from "../../../dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol"; /** * @title TransferFromHelper diff --git a/src/legacy/transfers/TransferHelper.sol b/src/legacy/transfers/TransferHelper.sol index 9f9a4ec..29c920b 100644 --- a/src/legacy/transfers/TransferHelper.sol +++ b/src/legacy/transfers/TransferHelper.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; -import { Strings } from "../../../lib/openzeppelin-contracts/contracts/utils/Strings.sol"; +import { Strings } from "../../../dependencies/@openzeppelin-contracts-4.9.6/utils/Strings.sol"; /** * @title TransferHelper diff --git a/test/transfers/LibNativeTransfer.t.sol b/test/transfers/LibNativeTransfer.t.sol index 5eddad0..b4ccc26 100644 --- a/test/transfers/LibNativeTransfer.t.sol +++ b/test/transfers/LibNativeTransfer.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; -import { Test } from "forge-std/Test.sol"; +import { Test } from "../../dependencies/forge-std-1.8.2/src/Test.sol"; import { LibNativeTransfer } from "src/transfers/LibNativeTransfer.sol"; contract LibNativeTransferTest is Test {