Skip to content

Commit

Permalink
feat: add additional subpath to deployments contracts to allow having…
Browse files Browse the repository at this point in the history
… project as submodule
  • Loading branch information
ashhanai committed Apr 19, 2024
1 parent 555bb71 commit 9d8086e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Deployments.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ abstract contract Deployments is CommonBase {
using stdJson for string;
using Strings for uint256;

string public deploymentsSubpath;

uint256[] deployedChains;
Deployment deployment;

Expand Down Expand Up @@ -53,7 +55,7 @@ abstract contract Deployments is CommonBase {

function _loadDeployedAddresses() internal {
string memory root = vm.projectRoot();
string memory path = string.concat(root, "/deployments/latest.json");
string memory path = string.concat(root, deploymentsSubpath, "/deployments/latest.json");
string memory json = vm.readFile(path);
bytes memory rawDeployedChains = json.parseRaw(".deployedChains");
deployedChains = abi.decode(rawDeployedChains, (uint256[]));
Expand Down

0 comments on commit 9d8086e

Please sign in to comment.