pragma solidity ^0.8.24;
import {VotingSystemFacade} from "bundle/voting-system/interfaces/VotingSystemFacade.sol";
library VotingSystemDeployer {
string internal constant BUNDLE_NAME = "VotingSystem";
function deploy(MCDevKit storage mc, address initialMember) internal returns(address votingSystem) {
mc.init(BUNDLE_NAME);
address _vote = address(new Vote());
_use(Vote.vote.selector, _vote);
address _tally = address(new Tally());
_use(Tally.tally.selector, _tally);
mc.useFacade(address(new VotingSystemFacade()));
return mc.deploy(
abi.encodeCall(Initialize.initialize, (initialMember))
).toProxyAddress();
}
}