Skip to content

Commit

Permalink
feat: output abi, bytecode, and metadata
Browse files Browse the repository at this point in the history
and format the json file
  • Loading branch information
v-stickykeys committed Jan 3, 2021
1 parent b021c43 commit 7cd1de0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function compile(inputFileName: string, evmVersion: string): Promis
evmVersion,
outputSelection: {
'*': {
'*': ['*']
[contractName]: ['abi', 'evm.bytecode', 'metadata']
}
}
}
Expand All @@ -62,8 +62,8 @@ export async function compile(inputFileName: string, evmVersion: string): Promis
} catch (err) {
if (err.code != 'EEXIST') throw err;
}
await fs.promises.writeFile(outputFilePath, output);
console.log('Compilation success', contractName);
await fs.promises.writeFile(outputFilePath, JSON.stringify(outputJson, null, 4));
console.log('Compilation success', outputFileName);
}
}

Expand Down

0 comments on commit 7cd1de0

Please sign in to comment.