-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
18 lines (15 loc) · 948 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Task from '../../src/task';
import { VaultDeployment } from './input';
import { TaskRunOptions } from '../../src/types';
export default async (task: Task, { force, from }: TaskRunOptions = {}): Promise<void> => {
const input = task.input() as VaultDeployment;
const vaultArgs = [input.Authorizer, input.weth, input.pauseWindowDuration, input.bufferPeriodDuration];
const vault = await task.deployAndVerify('Vault', vaultArgs, from, force);
// The vault automatically also deploys the protocol fees collector: we must verify it
const feeCollector = await vault.getProtocolFeesCollector();
const feeCollectorArgs = [vault.address]; // See ProtocolFeesCollector constructor
await task.verify('ProtocolFeesCollector', feeCollector, feeCollectorArgs);
await task.save({ ProtocolFeesCollector: feeCollector });
const helpersArgs = [vault.address];
await task.deployAndVerify('BalancerHelpers', helpersArgs, from, force);
};