Skip to content

Commit

Permalink
expose this.deploys()
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrower95 committed Nov 19, 2024
1 parent e5f4967 commit 1fc4608
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/templates/EOADeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import {ZeusScript} from "../utils/ZeusScript.sol";
* @notice Template for an Externally Owned Account (EOA) deploy script.
*/
abstract contract EOADeployer is ZeusScript {

Deployment[] private _deployments;

/**
* @notice Struct for deployment information.
* @param deployedTo The address where the contract is deployed.
Expand Down Expand Up @@ -36,9 +39,15 @@ abstract contract EOADeployer is ZeusScript {

function deploySingleton(address deployedTo, string memory name) internal {
emit ZeusDeploy(name, deployedTo, true /* singleton */ );
_deployments.push(Deployment(deployedTo, name, true));
}

function deployInstance(address deployedTo, string memory name) internal {
emit ZeusDeploy(name, deployedTo, false /* singleton */ );
_deployments.push(Deployment(deployedTo, name, true));
}

function deploys() public view returns (Deployment[] memory) {
return _deployments;
}
}

0 comments on commit 1fc4608

Please sign in to comment.