forked from LaTribuWeb3/fei-protocol-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrapper.ts
More file actions
23 lines (16 loc) · 704 Bytes
/
Copy pathwrapper.ts
File metadata and controls
23 lines (16 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { DeployUpgradeFunc } from '@custom-types/types';
import { ethers } from 'hardhat';
export const deploy: DeployUpgradeFunc = async (deployAddress: string, addresses, logging = false) => {
const { core } = addresses;
const DEPOSIT = process.env.DEPOSIT;
if (!DEPOSIT) {
throw new Error('DEPOSIT environment variable contract address is not set');
}
if (!core) {
throw new Error('An environment variable contract address is not set');
}
const wrapperFactory = await ethers.getContractFactory('PCVDepositWrapper');
const wrapper = await wrapperFactory.deploy(DEPOSIT);
logging && console.log('wrapperFactory deployed to: ', wrapper.address);
return { wrapper };
};