()
| 4 | const Web3 = require('web3'); |
| 5 | |
| 6 | async function readFiles() { |
| 7 | if (fs.existsSync("./build/contracts/")) { |
| 8 | return fs.readdirSync("./build/contracts/"); |
| 9 | } else { |
| 10 | console.log(chalk.yellow('Compiling contracts. This may take a while, please wait.')); |
| 11 | exec('truffle compile'); |
| 12 | return fs.readdirSync("./build/contracts/"); |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | async function checkClashes() { |
| 17 | console.log(chalk.green("Starting function selector clash check")); |