File tree Expand file tree Collapse file tree 6 files changed +28
-4
lines changed
contracts/connext/test-fixtures Expand file tree Collapse file tree 6 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ const config = {
172
172
enabled : process . env . REPORT_GAS ? true : false ,
173
173
showTimeSpent : true ,
174
174
currency : 'USD' ,
175
- outputFile : 'gas-report.log' ,
175
+ outputFile : 'reports/ gas-report.log' ,
176
176
} ,
177
177
}
178
178
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ contract AppWithAction is CounterfactualApp {
33
33
returns (address )
34
34
{
35
35
State memory state = abi.decode (encodedState, (State));
36
- return participants[state.counter > 0 ? 0 : 1 ];
36
+ uint256 p = state.counter > 0 ? 0 : 1 ;
37
+ return participants[p];
37
38
}
38
39
39
40
/// @dev NOTE: there is a slight difference here vs. the connext
Original file line number Diff line number Diff line change 85
85
"prettier" : " npm run prettier:ts && npm run prettier:sol" ,
86
86
"prettier:ts" : " prettier --write 'test/**/*.ts'" ,
87
87
"prettier:sol" : " prettier --write 'contracts/*.sol'" ,
88
+ "analyze" : " scripts/analyze" ,
88
89
"flatten" : " scripts/flatten" ,
89
90
"abi:extract" : " truffle-abi -d ./build/contracts -o ./build/abis/ -v" ,
90
91
"typechain" : " typechain --target ethers-v5 --outDir build/typechain/contracts 'build/abis/*.json'" ,
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # # Before running:
4
+ # This tool requires to have solc installed.
5
+ # Ensure that you have the binaries installed by pip3 in your path.
6
+ # Install: https://github.com/crytic/slither#how-to-install
7
+ # Usage: https://github.com/crytic/slither/wiki/Usage
8
+
9
+ mkdir -p reports
10
+
11
+ pip3 install --user slither-analyzer && \
12
+ npm run build && \
13
+
14
+ echo " Analyzing contracts..."
15
+ slither . \
16
+ --filter-paths " staking/libs/abdk-libraries-solidity/*|connext/test-fixtures/*|bancor/*" \
17
+ & > reports/analyzer-report.log && \
18
+ slither-check-erc build/flatten/GraphToken.sol GraphToken & > reports/analyzer-report-erc.log
19
+
20
+ echo " Done!"
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- OUT_DIR=" build/full "
3
+ OUT_DIR=" build/flatten "
4
4
5
5
echo ${OUT_DIR} /contracts
6
6
mkdir -p ${OUT_DIR} /contracts
@@ -17,4 +17,4 @@ for path in $files; do
17
17
truffle-flattener " ${path} " > " ${OUT_DIR} /${name} "
18
18
done
19
19
20
- echo " Done. "
20
+ echo " Done! "
Original file line number Diff line number Diff line change 35
35
36
36
# ## Main
37
37
38
+ mkdir -p reports
39
+
38
40
npm run compile
39
41
npm run typechain
40
42
You can’t perform that action at this time.
0 commit comments