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