Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function compile(vyperConfig: VyperConfig, paths: ProjectPaths) {
const vyperVersion = vyperConfig.version;
const dockerImage = {
repository: VYPER_DOCKER_REPOSITORY,
tag: vyperVersion
};
await validateDockerIsInstalled();
const docker = await handleCommonErrors(BuidlerDocker.create());
await handleCommonErrors(
pullImageIfNecessary(docker, dockerImage, paths.cache)
);
const files = await getVyperSources(paths);
let someContractFailed = false;
for (const file of files) {
const pathFromCWD = path.relative(process.cwd(), file);
const pathFromSources = path.relative(paths.sources, file);
if (await isAlreadyCompiled(file, paths, vyperVersion, files)) {
console.log(pathFromCWD, "is already compiled");
continue;