Skip to content

Commit

Permalink
added fund flow controller to test setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
BkChoy committed Oct 10, 2024
1 parent 5070f79 commit d2043a1
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions scripts/test/deploy/modules/deploy-link-staking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ async function deployOperatorVCS(vaultDepositController: string) {
{ LINK_OperatorVCS: operatorVCS.target.toString() },
{ LINK_OperatorVCS: 'OperatorVCS' }
)

return operatorVCS.target
}

// Community Vault Controller Strategy
Expand Down Expand Up @@ -128,6 +130,8 @@ async function deployCommunityVCS(vaultDepositController: string) {
{ LINK_CommunityVCS: communityVCS.target },
{ LINK_CommunityVCS: 'CommunityVCS' }
)

return communityVCS.target
}

// Wrapped stLINK
Expand Down Expand Up @@ -199,11 +203,6 @@ export async function deployLINKStaking() {
])
console.log('stLINK_SDLRewardsPool deployed: ', stLinkSDLRewardsPool.target)

await (await sdlPoolPrimary.addToken(stakingPool.target, stLinkSDLRewardsPool.target)).wait()
await (await stakingPool.setPriorityPool(priorityPool.target)).wait()
await (await priorityPool.setDistributionOracle(accounts[0])).wait()
await (await priorityPool.setWithdrawalPool(withdrawalPool.target)).wait()

updateDeployments(
{
LINK_StakingPool: stakingPool.target.toString(),
Expand All @@ -221,8 +220,26 @@ export async function deployLINKStaking() {
}
)

await (await sdlPoolPrimary.addToken(stakingPool.target, stLinkSDLRewardsPool.target)).wait()
await (await stakingPool.setPriorityPool(priorityPool.target)).wait()
await (await priorityPool.setDistributionOracle(accounts[0])).wait()
await (await priorityPool.setWithdrawalPool(withdrawalPool.target)).wait()

const vaultDepositController = await deploy('VaultDepositController')

await deployOperatorVCS(vaultDepositController.target)
await deployCommunityVCS(vaultDepositController.target)
const operatorVCS = await deployOperatorVCS(vaultDepositController.target)
const communityVCS = await deployCommunityVCS(vaultDepositController.target)

const fundFlowController = await deployUpgradeable('FundFlowController', [
operatorVCS,
communityVCS,
28 * 86400,
7 * 86400,
5,
])
console.log('FundFlowController deployed at', fundFlowController.target)

updateDeployments({
FundFlowController: fundFlowController.target,
})
}

0 comments on commit d2043a1

Please sign in to comment.