|
|
@ -285,14 +285,10 @@ class App { |
|
|
|
postProcessPure(env) { |
|
|
|
postProcessPure(env) { |
|
|
|
shell.ls(`${env}/**/*.sol`).forEach(file => { |
|
|
|
shell.ls(`${env}/**/*.sol`).forEach(file => { |
|
|
|
const pureRe = /\spure\s/gi; |
|
|
|
const pureRe = /\spure\s/gi; |
|
|
|
const viewRe = /\sview\s/gi; |
|
|
|
|
|
|
|
const constantRe = /\sconstant\s/gi; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const contractPath = this.platformNeutralPath(file); |
|
|
|
const contractPath = this.platformNeutralPath(file); |
|
|
|
let contract = fs.readFileSync(contractPath).toString(); |
|
|
|
let contract = fs.readFileSync(contractPath).toString(); |
|
|
|
contract = contract.replace(pureRe, ' '); |
|
|
|
contract = contract.replace(pureRe, ' '); |
|
|
|
contract = contract.replace(viewRe, ' '); |
|
|
|
|
|
|
|
contract = contract.replace(constantRe, ' '); |
|
|
|
|
|
|
|
fs.writeFileSync(contractPath, contract); |
|
|
|
fs.writeFileSync(contractPath, contract); |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|