UNPKG

harsta

Version:

Harsta is a contract development tool based on Hardhat, designed to streamline the development, testing, and referencing of contracts, addresses, ABIs, and contract instances.

11 lines (9 loc) 359 B
import path from 'pathe' import fs from 'fs-extra' import { absolutePaths } from '../../constants' import { environment } from '../imports' export function exists(name: string) { const directory = path.resolve(absolutePaths.harstaDeployments, environment.network.alias) const file = path.resolve(directory, `${name}.json`) return fs.existsSync(file) }