UNPKG

443 BPlain TextView Raw
1import { compileContract, CompileContractResult } from './compileContract';
2import { findContract } from './findContract';
3
4export interface Options {
5 readonly dir: string;
6 readonly contractName: string;
7}
8
9export const findAndCompileContract = async ({ dir, contractName }: Options): Promise<CompileContractResult> => {
10 const { filePath, name } = await findContract(dir, contractName);
11
12 return compileContract({ filePath, name });
13};