Skip to content

Commit

Permalink
feat: add some control on deployer address and multisig address
Browse files Browse the repository at this point in the history
  • Loading branch information
nlecoufl committed Nov 20, 2024
1 parent 5f69c90 commit ddf53c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion deploy/foundry/merklDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,14 @@ contract MainDeployScript is Script, BaseScript, JsonReader {
console.log("ANGLE_LABS:", ANGLE_LABS);

// Compute addresses from private keys
// DEPLOYER_ADDRESS = vm.addr(DEPLOYER_PRIVATE_KEY);
DEPLOYER_ADDRESS = vm.addr(DEPLOYER_PRIVATE_KEY);
MERKL_DEPLOYER_ADDRESS = vm.addr(MERKL_DEPLOYER_PRIVATE_KEY);
console.log("DEPLOYER_ADDRESS:", DEPLOYER_ADDRESS);
console.log("MERKL_DEPLOYER_ADDRESS:", MERKL_DEPLOYER_ADDRESS);
console.log("DISPUTE TOKEN:", DISPUTE_TOKEN);

if (DEPLOYER_ADDRESS == ANGLE_LABS) revert("ANGLE_LABS cannot be the deployer address");

// 1. Deploy using DEPLOYER_PRIVATE_KEY
vm.startBroadcast(DEPLOYER_PRIVATE_KEY);

Expand Down Expand Up @@ -251,6 +252,11 @@ contract MainDeployScript is Script, BaseScript, JsonReader {

function deployDisputer(address distributor) public returns (address) {
console.log("\n=== Deploying Disputer ===");
// Check if deployer is the guardian
if (DEPLOYER_ADDRESS != GUARDIAN_ADDRESS) {
console.log("Skipping Disputer deployment - deployer is not the guardian");
return address(0);
}

// Check if dispute token is set
if (address(Distributor(distributor).disputeToken()) == address(0)) {
Expand Down

0 comments on commit ddf53c2

Please sign in to comment.