Skip to content

Commit

Permalink
fix lint in 99_deploy script
Browse files Browse the repository at this point in the history
await for prettier format result
  • Loading branch information
technophile-04 committed Jun 28, 2024
1 parent 96e01bb commit bcc2ba8
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/hardhat/deploy/99_generateTsAbis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,14 @@ const generateTsAbis: DeployFunction = async function () {
if (!fs.existsSync(TARGET_DIR)) {
fs.mkdirSync(TARGET_DIR);
}
fs.writeFileSync(
`${TARGET_DIR}deployedContracts.ts`,
prettier.format(
`${generatedContractComment} import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; \n\n
const formattedContent = await prettier.format(
`${generatedContractComment} import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; \n\n
const deployedContracts = {${fileContent}} as const; \n\n export default deployedContracts satisfies GenericContractsDeclaration`,
{
parser: "typescript",
},
),
{
parser: "typescript",
},
);
fs.writeFileSync(`${TARGET_DIR}deployedContracts.ts`, formattedContent);

console.log(`📝 Updated TypeScript contract definition file on ${TARGET_DIR}deployedContracts.ts`);
};
Expand Down

0 comments on commit bcc2ba8

Please sign in to comment.