forked from balancer/balancer-deployments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
18 lines (14 loc) · 823 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { Task, TaskRunOptions } from '@src';
import { ManagedPoolDeployment } from './input';
export default async (task: Task, { force, from }: TaskRunOptions = {}): Promise<void> => {
const input = task.input() as ManagedPoolDeployment;
const addRemoveTokenLib = await task.deployAndVerify('ManagedPoolAddRemoveTokenLib', [], from, force);
const circuitBreakerLib = await task.deployAndVerify('CircuitBreakerLib', [], from, force);
const args = [input.Vault, input.ProtocolFeePercentagesProvider];
const factory = await task.deployAndVerify('ManagedPoolFactory', args, from, force, {
CircuitBreakerLib: circuitBreakerLib.address,
ManagedPoolAddRemoveTokenLib: addRemoveTokenLib.address,
});
const math = await factory.getWeightedMath();
await task.verify('ExternalWeightedMath', math, []);
};