Skip to content

Commit

Permalink
deploy: update script
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoAcosta committed Oct 20, 2024
1 parent fa3d4bf commit 9efac8f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions script/deploy/DeployPoC.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ import { FixedQuestion } from "../../src/voting/FixedQuestion.sol";
contract DeployPoC is Script {
function run() public {
uint256 deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY");
uint256 superAdminPrivateKey = vm.envUint("SUPER_ADMIN_PRIVATE_KEY");

address deployer = vm.addr(deployerPrivateKey);
console.log("Deployer address:", deployer);
address superAdmin = vm.addr(superAdminPrivateKey);
console.log("Deployer address:", vm.addr(deployerPrivateKey));
console.log("Super Admin address:", superAdmin);

DeployPoCArgs deployArgs = new DeployPoCArgs();
DeployPoCArgs.DeploymentArgs memory args = deployArgs.getArgs();

vm.startBroadcast(deployerPrivateKey);

// Deploy Plasa
Plasa plasa = new Plasa(args.initialSuperAdmins[0]);
Plasa plasa = new Plasa(superAdmin);

// Deploy Space 1 with FollowerSincePoints
FollowerSinceStamp stamp1 = new FollowerSinceStamp(args.stampSigner, args.stamp1Platform, args.stamp1Followed);
Expand Down Expand Up @@ -84,6 +86,11 @@ contract DeployPoC is Script {
args.question2OptionDescriptions
);

vm.stopBroadcast();

// Switch to super admin for adding stamps, spaces, and questions
vm.startBroadcast(superAdminPrivateKey);

// Add stamps, spaces, and questions to Plasa and respective spaces
plasa.addStamp(address(stamp1));
plasa.addSpace(address(space1));
Expand Down

0 comments on commit 9efac8f

Please sign in to comment.