forked from balancer/balancer-deployments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
16 lines (12 loc) · 802 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { Task, TaskRunOptions } from '@src';
import { BatchRelayerDeployment } from './input';
export default async (task: Task, { force, from }: TaskRunOptions = {}): Promise<void> => {
const input = task.input() as BatchRelayerDeployment;
const relayerLibraryArgs = [input.Vault, input.wstETH, input.BalancerMinter];
const relayerLibrary = await task.deployAndVerify('BatchRelayerLibrary', relayerLibraryArgs, from, force);
// The relayer library automatically also deploys the relayer itself: we must verify it
const relayer: string = await relayerLibrary.getEntrypoint();
const relayerArgs = [input.Vault, relayerLibrary.address]; // See BalancerRelayer's constructor
await task.verify('BalancerRelayer', relayer, relayerArgs);
await task.save({ BalancerRelayer: relayer });
};