UNPKG

@omni-kit/omni-deployer

Version:

Deploy smart contracts across multiple chains using SuperchainFactory

20 lines (19 loc) 734 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.loadArtifact = loadArtifact; const fs_1 = __importDefault(require("fs")); /** * Loads the compiled contract artifact. * @param contractName - Name of the contract. * @returns Compiled artifact. */ function loadArtifact(contractName) { const artifactPath = `./out/${contractName}.sol/${contractName}.json`; if (!fs_1.default.existsSync(artifactPath)) { throw new Error(`Artifact not found at ${artifactPath}`); } return JSON.parse(fs_1.default.readFileSync(artifactPath, 'utf8')); }