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 = {
172172 enabled : process . env . REPORT_GAS ? true : false ,
173173 showTimeSpent : true ,
174174 currency : 'USD' ,
175- outputFile : 'gas-report.log' ,
175+ outputFile : 'reports/ gas-report.log' ,
176176 } ,
177177}
178178
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ contract AppWithAction is CounterfactualApp {
3333 returns (address )
3434 {
3535 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];
3738 }
3839
3940 /// @dev NOTE: there is a slight difference here vs. the connext
Original file line number Diff line number Diff line change 8585 "prettier" : " npm run prettier:ts && npm run prettier:sol" ,
8686 "prettier:ts" : " prettier --write 'test/**/*.ts'" ,
8787 "prettier:sol" : " prettier --write 'contracts/*.sol'" ,
88+ "analyze" : " scripts/analyze" ,
8889 "flatten" : " scripts/flatten" ,
8990 "abi:extract" : " truffle-abi -d ./build/contracts -o ./build/abis/ -v" ,
9091 "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 11#! /bin/bash
22
3- OUT_DIR=" build/full "
3+ OUT_DIR=" build/flatten "
44
55echo ${OUT_DIR} /contracts
66mkdir -p ${OUT_DIR} /contracts
@@ -17,4 +17,4 @@ for path in $files; do
1717 truffle-flattener " ${path} " > " ${OUT_DIR} /${name} "
1818done
1919
20- echo " Done. "
20+ echo " Done! "
Original file line number Diff line number Diff line change 3535
3636# ## Main
3737
38+ mkdir -p reports
39+
3840npm run compile
3941npm run typechain
4042
You can’t perform that action at this time.
0 commit comments