Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Jør∂¡ committed Mar 22, 2024
1 parent e464f21 commit 7b2fe38
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
29 changes: 22 additions & 7 deletions script/Deploy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pragma solidity ^0.8.13;

import {Script, console2} from "forge-std/Script.sol";
import {VmSafe} from "forge-std/Vm.sol";
import {OptimisticTokenVotingPluginSetup} from "../src/setup/OptimisticTokenVotingPluginSetup.sol";
import {MultisigPluginSetup} from "../src/setup/MultisigPluginSetup.sol";
import {EmergencyMultisigPluginSetup} from "../src/setup/EmergencyMultisigPluginSetup.sol";
Expand Down Expand Up @@ -48,10 +49,11 @@ contract Deploy is Script {
);
pluginRepoFactory = vm.envAddress("PLUGIN_REPO_FACTORY");
tokenAddress = vm.envAddress("TOKEN_ADDRESS");
multisigMembers = vm.parseJsonAddressArray(
vm.envString("MULTISIG_MEMBERS_JSON"),
"MULTISIG_MEMBERS"
);

string memory root = vm.projectRoot();
string memory path = string.concat(root, "/utils/members.json");
string memory json = vm.readFile(path);
multisigMembers = vm.parseJsonAddressArray(json, "$.addresses");

lzAppEndpoint = vm.envAddress("LZ_APP_ENTRY_POINT");
}
Expand Down Expand Up @@ -114,7 +116,20 @@ contract Deploy is Script {
}

function getDeployerWallet() private returns (address) {
return msg.sender;
VmSafe.Wallet memory wallet = vm.createWallet(
vm.envUint("PRIVATE_KEY")
);

return
address(
uint160(
uint256(
keccak256(
abi.encode(wallet.publicKeyX, wallet.publicKeyY)
)
)
)
);
}

function prepareDao() internal returns (DAO dao) {
Expand Down Expand Up @@ -307,10 +322,10 @@ contract Deploy is Script {
PluginSetupRef(PluginRepo.Tag(1, 1), pluginRepo),
plugin,
preparedSetupData.permissions,
preparedSetupData.helpers
hashHelpers(preparedSetupData.helpers)
)
)
);
dao.execute(0x1, actions, 0);
dao.execute(bytes32(uint256(0x1)), actions, 0);
}
}
3 changes: 3 additions & 0 deletions utils/members.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"members": ["0x1234567890123456789012345678901234567890"]
}

0 comments on commit 7b2fe38

Please sign in to comment.