Skip to content

Commit

Permalink
feat: pull from vault setup
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloetjo committed Aug 23, 2024
1 parent 695462d commit 6fb54be
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions script/ArchitectureDeployments/DeployArcticArchitecture.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ contract DeployArcticArchitecture is Script, ContractNames {
bool finishSetup;
bool setupTestUser;
bool saveDeploymentDetails;
bool initiatePullFundsFromVault;
address deployerAddress;
address balancerVault;
address WETH;
Expand Down Expand Up @@ -634,6 +635,16 @@ contract DeployArcticArchitecture is Script, ContractNames {
);
}

if (
!rolesAuthority.doesRoleHaveCapability(
MULTISIG_ROLE, address(delayedWithdrawer), DelayedWithdraw.setPullFundsFromVault.selector
)
) {
rolesAuthority.setRoleCapability(
MULTISIG_ROLE, address(delayedWithdrawer), DelayedWithdraw.setPullFundsFromVault.selector, true
);
}

// STRATEGIST_MULTISIG_ROLE
if (
!rolesAuthority.doesRoleHaveCapability(
Expand Down Expand Up @@ -677,6 +688,15 @@ contract DeployArcticArchitecture is Script, ContractNames {
STRATEGIST_MULTISIG_ROLE, address(delayedWithdrawer), DelayedWithdraw.setFeeAddress.selector, true
);
}
if (
!rolesAuthority.doesRoleHaveCapability(
STRATEGIST_MULTISIG_ROLE, address(delayedWithdrawer), DelayedWithdraw.setPullFundsFromVault.selector
)
) {
rolesAuthority.setRoleCapability(
STRATEGIST_MULTISIG_ROLE, address(delayedWithdrawer), DelayedWithdraw.setPullFundsFromVault.selector, true
);
}
// STRATEGIST_ROLE
if (
!rolesAuthority.doesRoleHaveCapability(
Expand Down Expand Up @@ -820,6 +840,11 @@ contract DeployArcticArchitecture is Script, ContractNames {
}
}

if (configureDeployment.initiatePullFundsFromVault) {
// Setup pull funds from vault.
delayedWithdrawer.setPullFundsFromVault(configureDeployment.initiatePullFundsFromVault);
}

if (configureDeployment.finishSetup) {
// Setup share lock period.
if (teller.shareLockPeriod() != shareLockPeriod) teller.setShareLockPeriod(shareLockPeriod);
Expand Down

0 comments on commit 6fb54be

Please sign in to comment.