diff --git a/.gitignore b/.gitignore index 85198aa..3248b02 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Compiler files cache/ -out/ +contracts-out/ # Ignores development broadcast logs !/broadcast @@ -12,3 +12,6 @@ docs/ # Dotenv file .env + +node_modules + diff --git a/.gitmodules b/.gitmodules index 888d42d..397ca49 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "lib/forge-std"] path = lib/forge-std url = https://github.com/foundry-rs/forge-std +[submodule "lib/openzeppelin-contracts"] + path = lib/openzeppelin-contracts + url = https://github.com/OpenZeppelin/openzeppelin-contracts +[submodule "lib/layerzero-v2"] + path = lib/layerzero-v2 + url = https://github.com/LayerZero-Labs/layerzero-v2 diff --git a/src/Counter.sol b/contracts/Counter.sol similarity index 100% rename from src/Counter.sol rename to contracts/Counter.sol diff --git a/foundry.toml b/foundry.toml index 25b918f..b6bb0a1 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,6 +1,12 @@ [profile.default] -src = "src" -out = "out" -libs = ["lib"] +src = "contracts" +out = "contracts-out" +libs = [ + "lib" +] -# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options +remappings = [ + '@layerzerolabs/oft-evm/=lib/devtools/packages/oft-evm/', + '@layerzerolabs/oapp-evm/=lib/devtools/packages/oapp-evm/', + '@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/protocol', +] \ No newline at end of file diff --git a/lib/layerzero-v2 b/lib/layerzero-v2 new file mode 160000 index 0000000..7bcfb4d --- /dev/null +++ b/lib/layerzero-v2 @@ -0,0 +1 @@ +Subproject commit 7bcfb4d5dac4192570af5e51dbc67413a6116a14 diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts new file mode 160000 index 0000000..3291252 --- /dev/null +++ b/lib/openzeppelin-contracts @@ -0,0 +1 @@ +Subproject commit 3291252c866ad698f6a55ec660259e49a67eb3d0 diff --git a/remappings.txt b/remappings.txt new file mode 100644 index 0000000..8acf3a5 --- /dev/null +++ b/remappings.txt @@ -0,0 +1,10 @@ +@layerzerolabs/oft-evm/=lib/devtools/packages/oft-evm/ +@layerzerolabs/oapp-evm/=lib/devtools/packages/oapp-evm/ +@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/protocol/ +@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ +ds-test/=lib/layerzero-v2/lib/forge-std/lib/ds-test/src/ +erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/ +forge-std/=lib/forge-std/src/ +halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/ +layerzero-v2/=lib/layerzero-v2/ +openzeppelin-contracts/=lib/openzeppelin-contracts/ diff --git a/script/Counter.s.sol b/script/Counter.s.sol index cdc1fe9..561966b 100644 --- a/script/Counter.s.sol +++ b/script/Counter.s.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.13; import {Script, console} from "forge-std/Script.sol"; -import {Counter} from "../src/Counter.sol"; +import {Counter} from "contracts/Counter.sol"; contract CounterScript is Script { Counter public counter; diff --git a/test/Counter.t.sol b/test/Counter.t.sol index 54b724f..15d4ab5 100644 --- a/test/Counter.t.sol +++ b/test/Counter.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.13; import {Test, console} from "forge-std/Test.sol"; -import {Counter} from "../src/Counter.sol"; +import {Counter} from "contracts/Counter.sol"; contract CounterTest is Test { Counter public counter;