Skip to content

Commit 7deeb0f

Browse files
committed
fixed issue with CLI and added more flattener commands
1 parent c5fe850 commit 7deeb0f

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

CLI/commands/common/common_functions.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,8 @@ module.exports = {
9393

9494
let block = await web3.eth.getBlock("latest");
9595
let networkGasLimit = block.gasLimit;
96-
97-
try {
98-
let gas = Math.round(factor * (await action.estimateGas({ from: from.address, value: value})));
99-
if (gas > networkGasLimit) gas = networkGasLimit;
100-
} catch(exception) {
101-
gas = networkGasLimit;
102-
}
96+
let gas = Math.round(factor * (await action.estimateGas({ from: from.address, value: value})));
97+
if (gas > networkGasLimit) gas = networkGasLimit;
10398

10499
console.log(chalk.black.bgYellowBright(`---- Transaction executed: ${action._method.name} - Gas limit provided: ${gas} ----`));
105100

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
"flatten-mocks": "sol-merger './contracts/mocks/*.sol' ./flat/mocks",
3030
"flatten-oracles": "sol-merger './contracts/oracles/*.sol' ./flat/oracles",
3131
"flatten-proxies": "sol-merger './contracts/proxy/*.sol' ./flat/proxy",
32+
"flatten-proxyFactories": "sol-merger './contracts/modules/STO/ProxyFactory/*.sol' ./flat/modules/STO/proxy",
3233
"flatten": "sol-merger './contracts/*.sol' ./flat",
33-
"flatten-all": "npm run flatten-modules && npm run flatten-token && npm run flatten-mocks && npm run flatten-oracles && npm run flatten-proxies && npm run flatten",
34+
"flatten-all": "npm run flatten-modules && npm run flatten-token && npm run flatten-mocks && npm run flatten-oracles && npm run flatten-proxies && npm run flatten && npm run flatten-proxyFactories",
3435
"ethereum-bridge": "node_modules/.bin/ethereum-bridge -H localhost:8545 -a 9 --dev",
3536
"st20generator": "node demo/ST20Generator",
3637
"pretty": "prettier --write --print-width 140 --tab-width 4 \"**/*.js\""

0 commit comments

Comments
 (0)