-
Notifications
You must be signed in to change notification settings - Fork 1
/
start-solidity-qa-workflows.sh
executable file
·888 lines (861 loc) · 43.2 KB
/
start-solidity-qa-workflows.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
#! /bin/bash
clear
TIMESTAMP=$(date)
NODEJS_VERSION="22"
if [ "$1" == "Stop-Local-Blockchain-Nodes-And-Delete-Logs" ]; then
echo
echo "------------------------------------[[[[ Stop-Local-Blockchain-Nodes-And-Delete-Logs ]]]]------------------------------------"
echo
echo "This command will stop any locally running network nodes and clean up any logs leftover from old runs. Feel free to run this command multiple times to clean up files listed below. This run started on $TIMESTAMP."
echo
killall rust > /dev/null 2>&1
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
killall anvil > /dev/null 2>&1
killall yarn > /dev/null 2>&1
pkill rust > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
pkill anvil > /dev/null 2>&1
pkill yarn > /dev/null 2>&1
rm -rf ./solidity-hardhat-multichain-tools/logs/*.log
rm -rf ./solidity-truffle-web3js-tools/logs/*.log
rm -rf ./solidity-foundry-playwright-wagmi-tools/logs/*.log
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
fi
if [ "$1" == "Install-Tools-On-MacOS-Or-Linux" ]; then
echo
echo "------------------------------------[[[[ Install-Tools-On-MacOS-Or-Linux ]]]]------------------------------------"
echo
echo "This command will install all of the required Node.js packages. This project was built using a stable LTS Node.js version. This run started on $TIMESTAMP."
echo
## If you're using a Linux Distro, make sure that wget is installed.
brew install libusb
rm -rf $HOME/.foundry
curl -L https://foundry.paradigm.xyz | bash
source "$HOME"/.bashrc
foundryup
export PATH="$PATH:$HOME/.foundry/bin/"
echo
echo
echo "Checking the Foundry Forge command..."
forge -V
echo
echo
echo "Checking the Foundry Anvil command..."
anvil -V
echo
echo
echo "Checking the Foundry Cast command..."
cast -V
echo
echo
brew install git
brew install wget
CURRENT_PATH=$(pwd)
cd "$CURRENT_PATH"/solidity-foundry-playwright-wagmi-tools
rm -rf ./main.zip
rm -rf ./dapp-e2e-*
wget https://github.com/jg8481/dapp-e2e-example/archive/refs/heads/main.zip
unzip ./main.zip
rm -rf ./main.zip
cd "$CURRENT_PATH"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash &&
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install $NODEJS_VERSION
nvm use $NODEJS_VERSION
nvm alias default $NODEJS_VERSION
npm install npm --global
npm update
npm install -g solhint
npm install -g solgraph
npm install -g surya
npm install --save-dev hardhat
npm install --save-dev @nomicfoundation/hardhat-toolbox@2
npm install [email protected]
#npm install --save-dev @nomicfoundation/hardhat-toolbox
npm install -g truffle
npm install @truffle/contract
npm install web3
npm install robotremote
npm install yarn -g
npm update
## If there are no serious issues with your local install, do not un-comment the following line.
#npm audit fix --force
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit 0
fi
if [ "$1" == "Install-Solidity-Security-Testing-Tools-On-MacOS" ]; then
echo
echo "------------------------------------[[[[ Install-Solidity-Security-Testing-Tools-On-MacOS ]]]]------------------------------------"
echo
echo "This command will install all of the required tools for Solidity fuzz testing using this tool runner script. This run started on $TIMESTAMP."
echo
rm -rf ./foundry/src/implementation/
rm -rf ./foundry/lib/forge-std
rm -rf ./foundry/lib/openzeppelin-contracts
rm -rf ./echidna/openzeppelin-contracts
git clone https://github.com/OpenZeppelin/openzeppelin-contracts.git ./foundry/lib/openzeppelin-contracts
git clone https://github.com/OpenZeppelin/openzeppelin-contracts.git ./echidna/openzeppelin-contracts
git clone https://github.com/foundry-rs/forge-std.git ./foundry/lib/forge-std
rm -rf ../foundry/lib/forge-std/lib/ds-test
git clone https://github.com/dapphub/ds-test.git ./foundry/lib/forge-std/lib/ds-test
npm -g i ganache
brew install git
brew install libusb && curl -L https://foundry.paradigm.xyz | bash && source $HOME/.bashrc && foundryup
pip3.10 install --user pysha3
pip3.10 install --user etheno
source $HOME/.bashrc
$HOME/.foundry/bin/forge -h
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit 0
fi
if [ "$1" == "Start-Default-Hardhat-Network-And-Robotremoteserver" ]; then
echo
echo "------------------------------------[[[[ Start-Default-Hardhat-Network-And-Robotremoteserver ]]]]------------------------------------"
echo
echo "This command was designed to run a local Ethereum blockchain using the Hardhat Network's built-in simulator in its own terminal window. It will also start the node-robotremoteserver. This run started on $TIMESTAMP."
echo
echo "Please read this documentation to learn more about the Hardhat Network tool... https://hardhat.org/hardhat-network/docs/overview"
echo
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
cd ./solidity-hardhat-multichain-tools
rm -rf ./logs/hardhat-default-network-node-standalone-mode.log
rm -rf ./logs/robotframework-hardhat-remote-library-standalone-mode.log
rm -rf ./logs/hardhat-contract-compile.log
echo "Ethereum" > ./logs/blockchain-type.log
echo
echo
npx hardhat compile > ./logs/hardhat-contract-compile.log &&
echo
echo
npx hardhat node > ./logs/hardhat-default-network-node-standalone-mode.log &
sleep 10
echo
echo
npx hardhat run --network localhost ./scripts/deploy.js >> ./logs/hardhat-contract-deployment-standalone-mode.log &&
echo
echo
export HARDHAT_NETWORK=localhost && nohup node ./robotframework-hardhat-remote-library.js > ./logs/robotframework-hardhat-remote-library-standalone-mode.log &
sleep 10
TIMESTAMP2=$(date)
echo "------------------------------------[[[[ Hardhat-Network-Ethereum-Node-And-Robotremoteserver-Log-Output ]]]]------------------------------------"
echo
echo "************************************"
echo "The following log output comes from the hardhat-contract-deployment-standalone-mode.log"
cat ./logs/hardhat-contract-deployment-standalone-mode.log
echo
echo "************************************"
echo "The following log output comes from the robotframework-hardhat-remote-library-standalone-mode.log"
cat ./logs/robotframework-hardhat-remote-library-standalone-mode.log
echo
echo "************************************"
echo "The following log output comes from the hardhat-default-network-node-standalone-mode.log"
tail -F ./logs/hardhat-default-network-node-standalone-mode.log
echo
echo "This run ended on $TIMESTAMP2."
fi
if [ "$1" == "Start-Multichain-Hardhat-Network-And-Robotremoteserver" ]; then
echo
echo "------------------------------------[[[[ Start-Multichain-Hardhat-Network-And-Robotremoteserver ]]]]------------------------------------"
echo
echo "This command was designed to run a forked EVM compatible blockchain mainnet on Hardhat Network using a specific configuration in its own terminal window. Ethereum, Fantom, Avalanche and Polygon are included, but many more are possible. It will also start the node-robotremoteserver. This run started on $TIMESTAMP."
echo
echo "Please read this documentation to learn more about the Hardhat Network tool... https://hardhat.org/hardhat-network/docs/overview"
echo
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
cd ./solidity-hardhat-multichain-tools
rm -rf ./logs/hardhat-default-network-node-standalone-mode.log
rm -rf ./logs/robotframework-hardhat-remote-library-standalone-mode.log
rm -rf ./logs/hardhat-contract-compile.log
read -p 'In this prompt please type in (or copy paste) one of the following blockchain options exactly as they are shown here --> Ethereum, Fantom, Polygon, or Avalanche : ' BLOCKCHAIN_TYPE
echo "$BLOCKCHAIN_TYPE" > ./logs/blockchain-type.log
echo
echo
npx hardhat compile > ./logs/hardhat-contract-compile.log &&
echo
echo
npx hardhat node --config "$BLOCKCHAIN_TYPE".config.js > ./logs/hardhat-"$BLOCKCHAIN_TYPE"-network-node-standalone-mode.log &
sleep 10
echo
echo
npx hardhat run --network hardhat ./scripts/deploy.js >> ./logs/hardhat-"$BLOCKCHAIN_TYPE"-contract-deployment-standalone-mode.log &&
echo
echo
export HARDHAT_NETWORK=localhost && nohup node ./robotframework-hardhat-remote-library.js > ./logs/robotframework-hardhat-remote-library-standalone-mode.log &
sleep 10
TIMESTAMP2=$(date)
echo "------------------------------------[[[[ Hardhat-Network-Node-And-Robotremoteserver-Log-Output ]]]]------------------------------------"
echo
echo "************************************"
echo "The following log output comes from the hardhat-"$BLOCKCHAIN_TYPE"-contract-deployment-standalone-mode.log"
cat ./logs/hardhat-"$BLOCKCHAIN_TYPE"-contract-deployment-standalone-mode.log
echo
echo "************************************"
echo "The following log output comes from the robotframework-hardhat-remote-library-standalone-mode.log"
cat ./logs/robotframework-hardhat-remote-library-standalone-mode.log
echo
echo "************************************"
echo "The following log output comes from the hardhat-default-network-node-standalone-mode.log"
tail -F ./logs/hardhat-"$BLOCKCHAIN_TYPE"-network-node-standalone-mode.log
echo
echo "This run ended on $TIMESTAMP2."
fi
if [ "$1" == "Run-Smart-Contract-Tests-Default-NonForked-Hardhat-Network" ]; then
clear
echo
echo "------------------------------------[[[[ Run-Smart-Contract-Tests-Default-NonForked-Hardhat-Network ]]]]------------------------------------"
echo
echo "This command uses the CONTRACT_ADDRESS variable in the hardhat-environment-variables.env file to run Robot Framework Javascript automation that will perform an interactive test on Solidity Smart Contracts using the built-in Hardhat Network designed for local development. This run started on $TIMESTAMP."
echo
echo "ATTENTION: If you're forking mainnets this seems to only work on the Fantom config provided with this repo. This test will sometimes display only 1 passing test and many failed tests if you attempt to run it on other local forked mainnets in the Hardhat Network Node. If you want to quickly check your local forked mainnet then run the 'Run-Smart-Contract-Tests-Forked-Mainnet-Hardhat-Network' command please."
echo
cd ./solidity-hardhat-multichain-tools
source ./hardhat-environment-variables.env
export BLOCKCHAIN_TYPE=$(cat ./logs/blockchain-type.log)
BLOCKCHAIN_TYPE_FILE=./logs/blockchain-type.log
if [ -f "$BLOCKCHAIN_TYPE_FILE" ]; then
echo
echo "BLOCKCHAIN_TYPE_FILE is set and the test will now continue without interuptions."
echo
else
echo
echo "BLOCKCHAIN_TYPE_FILE is not set. Please run the 'Start-Default-Hardhat-Network-And-Robotremoteserver' command or 'Start-Multichain-Hardhat-Network-And-Robotremoteserver' command, follow the instructions, and wait until you see 'Block #1:' appear in the terminal window. This test is going to exit now."
echo
exit
fi
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./requirements.txt > /dev/null 2>&1
sleep 5
robot --variable BLOCKCHAIN:"$BLOCKCHAIN_TYPE" --report NONE --log smart-contract-hardhat-"$BLOCKCHAIN_TYPE"-tests-log.html --output smart-contract-hardhat-"$BLOCKCHAIN_TYPE"-tests-output.xml -N "Robot Framework Solidity Smart Contract Hardhat Network $BLOCKCHAIN_TYPE Test" -d ./logs ./robotframework-hardhat-test-keywords.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Run-Smart-Contract-Tests-Forked-Mainnet-Hardhat-Network" ]; then
clear
echo
echo "------------------------------------[[[[ Run-Smart-Contract-Tests-Forked-Mainnet-Hardhat-Network ]]]]------------------------------------"
echo
echo "This command uses the CONTRACT_ADDRESS variable in the hardhat-environment-variables.env file to run Robot Framework Javascript automation that will perform an interactive test on Solidity Smart Contracts using the built-in Hardhat Network after performing a deployment to a mainnet fork. This run started on $TIMESTAMP."
echo
echo "ATTENTION: This is only one determistic quick check after a smart contract deployment on a mainnet fork. The provided Token.sol contract has never been deployed to any external EVM compatible blockchain mainnets or testnets. Also any tests run on contract address '0x5fbdb2315678afecb367f032d93f642f64180aa3' on Fantom mainnet will reveal another unrelated token that has zero affiliation with the creator of this Robot Framework project."
echo
cd ./solidity-hardhat-multichain-tools
source ./hardhat-environment-variables.env
export BLOCKCHAIN_TYPE=$(cat ./logs/blockchain-type.log)
BLOCKCHAIN_TYPE_FILE=./logs/blockchain-type.log
if [ -f "$BLOCKCHAIN_TYPE_FILE" ]; then
echo
echo "BLOCKCHAIN_TYPE_FILE is set and the test will now continue without interuptions."
echo
else
echo
echo "BLOCKCHAIN_TYPE_FILE is not set. Please run the 'Start-Default-Hardhat-Network-And-Robotremoteserver' command or 'Start-Multichain-Hardhat-Network-And-Robotremoteserver' command, follow the instructions, and wait until you see 'Block #1:' appear in the terminal window. This test is going to exit now."
echo
exit
fi
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./requirements.txt > /dev/null 2>&1
sleep 5
robot --include Forked_Mainnet_Test --variable BLOCKCHAIN:"$BLOCKCHAIN_TYPE" --report NONE --log smart-contract-hardhat-"$BLOCKCHAIN_TYPE"-tests-log.html --output smart-contract-hardhat-"$BLOCKCHAIN_TYPE"-tests-output.xml -N "Robot Framework Solidity Smart Contract Forked Mainnet Hardhat Network $BLOCKCHAIN_TYPE Test" -d ./logs ./robotframework-hardhat-test-keywords.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Run-Solidity-Static-Analysis" ]; then
echo
echo "------------------------------------[[[[ Run-Solidity-Static-Analysis ]]]]------------------------------------"
echo
echo "This command will run Robot Framework automation that checks Solidity Smart Contracts using various static analysis tools. This run started on $TIMESTAMP."
echo
cd ./solidity-static-analysis-tools
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./requirements.txt > /dev/null 2>&1
robot --report NONE --log smart-contract-static-analysis-log.html --output smart-contract-static-analysis-output.xml -N "Robot Framework Solidity Smart Contract Static Analysis" -d ./logs ./robotframework-solidity-static-analyzer.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Run-Smart-Contract-Hardhat-Ethereum-RPA-Deployment" ]; then
clear
rm -rf ./solidity-hardhat-multichain-tools/logs/blockchain-type.log
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
echo
echo "------------------------------------[[[[ Run-Smart-Contract-Hardhat-Ethereum-RPA-Deployment ]]]]------------------------------------"
echo
echo "This command will run Robot Framework RPA automation that compiles and deploys Solidity Smart Contracts using the built-in Hardhat Network designed for local development. This run started on $TIMESTAMP."
echo
echo "Ethereum" > ./solidity-hardhat-multichain-tools/logs/blockchain-type.log
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./solidity-hardhat-multichain-tools/requirements.txt > /dev/null 2>&1
robot --variable BLOCKCHAIN:"Ethereum" --report NONE --log smart-contract-hardhat-deployment-log.html --output smart-contract-hardhat-deployment-output.xml -N "Robot Framework Solidity Smart Contract Hardhat Deployment Ethereum Mainnet Fork" -d ./solidity-hardhat-multichain-tools/logs ./solidity-hardhat-multichain-tools/robotframework-hardhat-deployment-rpa-keywords.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Run-Smart-Contract-Hardhat-Fantom-RPA-Deployment" ]; then
clear
rm -rf ./solidity-hardhat-multichain-tools/logs/blockchain-type.log
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
echo
echo "------------------------------------[[[[ Run-Smart-Contract-Hardhat-Fantom-RPA-Deployment ]]]]------------------------------------"
echo
echo "This command will run Robot Framework RPA automation that compiles and deploys Solidity Smart Contracts using the built-in Hardhat Network designed for local development. This run started on $TIMESTAMP."
echo
echo "Fantom" > ./solidity-hardhat-multichain-tools/logs/blockchain-type.log
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./solidity-hardhat-multichain-tools/requirements.txt > /dev/null 2>&1
robot --variable BLOCKCHAIN:"Fantom" --report NONE --log smart-contract-hardhat-deployment-log.html --output smart-contract-hardhat-deployment-output.xml -N "Robot Framework Solidity Smart Contract Hardhat Deployment Fantom Mainnet Fork" -d ./solidity-hardhat-multichain-tools/logs ./solidity-hardhat-multichain-tools/robotframework-hardhat-deployment-rpa-keywords.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Run-Smart-Contract-Hardhat-Polygon-RPA-Deployment" ]; then
clear
rm -rf ./solidity-hardhat-multichain-tools/logs/blockchain-type.log
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
echo
echo "------------------------------------[[[[ Run-Smart-Contract-Hardhat-Polygon-RPA-Deployment ]]]]------------------------------------"
echo
echo "This command will run Robot Framework RPA automation that compiles and deploys Solidity Smart Contracts using the built-in Hardhat Network designed for local development. This run started on $TIMESTAMP."
echo
echo "Polygon" > ./solidity-hardhat-multichain-tools/logs/blockchain-type.log
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./solidity-hardhat-multichain-tools/requirements.txt > /dev/null 2>&1
robot --variable BLOCKCHAIN:"Polygon" --report NONE --log smart-contract-hardhat-deployment-log.html --output smart-contract-hardhat-deployment-output.xml -N "Robot Framework Solidity Smart Contract Hardhat Deployment Polygon Mainnet Fork" -d ./solidity-hardhat-multichain-tools/logs ./solidity-hardhat-multichain-tools/robotframework-hardhat-deployment-rpa-keywords.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Run-Smart-Contract-Hardhat-Avalanche-RPA-Deployment" ]; then
clear
rm -rf ./solidity-hardhat-multichain-tools/logs/blockchain-type.log
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
echo
echo "------------------------------------[[[[ Run-Smart-Contract-Hardhat-Avalanche-RPA-Deployment ]]]]------------------------------------"
echo
echo "This command will run Robot Framework RPA automation that compiles and deploys Solidity Smart Contracts using the built-in Hardhat Network designed for local development. This run started on $TIMESTAMP."
echo
echo "Avalanche" > ./solidity-hardhat-multichain-tools/logs/blockchain-type.log
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./solidity-hardhat-multichain-tools/requirements.txt > /dev/null 2>&1
robot --variable BLOCKCHAIN:"Avalanche" --report NONE --log smart-contract-hardhat-deployment-log.html --output smart-contract-hardhat-deployment-output.xml -N "Robot Framework Solidity Smart Contract Hardhat Deployment Avalanche Mainnet Fork" -d ./solidity-hardhat-multichain-tools/logs ./solidity-hardhat-multichain-tools/robotframework-hardhat-deployment-rpa-keywords.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Start-Default-Truffle-Develop-And-Robotremoteserver" ]; then
echo
echo "------------------------------------[[[[ Start-Default-Truffle-Develop-And-Robotremoteserver ]]]]------------------------------------"
echo
echo "This command was designed to run a built-in Truffle Develop locally running Ethereum node in its own terminal window. It will also start the node-robotremoteserver. This run started on $TIMESTAMP."
echo
echo "Please read this documentation to learn more about the Truffle Develop tool... https://trufflesuite.com/docs/truffle/how-to/debug-test/use-truffle-develop-and-the-console/"
echo
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
cd ./solidity-truffle-web3js-tools
rm -rf ./logs/truffle-default-network-node-standalone-mode.log
rm -rf ./logs/robotframework-truffle-remote-library-standalone-mode.log
rm -rf ./logs/truffle-contract-compile.log
echo
echo
truffle compile > ./logs/truffle-contract-compile.log &&
echo
echo
truffle develop > ./logs/truffle-default-network-node-standalone-mode.log &
sleep 10
echo
echo
truffle migrate | grep "contract address:" | awk '{print $4}' > ./logs/truffle-contract-address.log &&
echo
echo
nohup node ./robotframework-truffle-remote-library.js > ./logs/robotframework-truffle-remote-library-standalone-mode.log &
sleep 10
TIMESTAMP2=$(date)
echo "------------------------------------[[[[ Truffle-Develop-Ethereum-Node-And-Robotremoteserver-Log-Output ]]]]------------------------------------"
echo
echo "************************************"
echo "The following log output comes from the truffle-contract-address.log"
cat ./logs/truffle-contract-address.log
echo
echo "************************************"
echo "The following log output comes from the robotframework-truffle-remote-library-standalone-mode.log"
cat ./logs/robotframework-truffle-remote-library-standalone-mode.log
echo
echo "************************************"
echo "The following log output comes from the truffle-default-network-node-standalone-mode.log"
tail -F ./logs/truffle-default-network-node-standalone-mode.log
echo
echo "This run ended on $TIMESTAMP2."
fi
if [ "$1" == "Run-Smart-Contract-Tests-Default-Truffle-Develop-Instance" ]; then
clear
echo
echo "------------------------------------[[[[ Run-Smart-Contract-Tests-Default-Truffle-Develop-Instance ]]]]------------------------------------"
echo
echo "This command will run Robot Framework Javascript automation that will perform an interactive test on Solidity Smart Contracts using the built-in Truffle Develop blockchain designed for local development. This run started on $TIMESTAMP."
echo
cd ./solidity-truffle-web3js-tools
export CONTRACT_ADDRESS=$(cat ./logs/truffle-contract-address.log)
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./requirements.txt > /dev/null 2>&1
sleep 5
robot --report NONE --log smart-contract-truffle-tests-log.html --output smart-contract-truffle-tests-output.xml -N "Robot Framework Solidity Smart Contract Truffle Ethereum Test" -d ./logs ./robotframework-truffle-test-keywords.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Run-Smart-Contract-Truffle-Ethereum-RPA-Deployment" ]; then
clear
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
echo
echo "------------------------------------[[[[ Run-Smart-Contract-Truffle-Ethereum-RPA-Deployment ]]]]------------------------------------"
echo
echo "This command will run Robot Framework RPA automation that compiles and deploys Solidity Smart Contracts using the built-in Truffle Develop designed for local development. This run started on $TIMESTAMP."
echo
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./solidity-truffle-web3js-tools/requirements.txt > /dev/null 2>&1
robot --variable BLOCKCHAIN:"Ethereum" --report NONE --log smart-contract-truffle-deployment-log.html --output smart-contract-truffle-deployment-output.xml -N "Robot Framework Solidity Smart Contract Truffle Deployment Ethereum" -d ./solidity-truffle-web3js-tools/logs ./solidity-truffle-web3js-tools/robotframework-truffle-deployment-rpa-keywords.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Start-Forked-Foundry-Anvil-Node-And-Wagmi-dApp" ]; then
echo
echo "------------------------------------[[[[ Start-Forked-Foundry-Anvil-Node-And-Wagmi-dApp ]]]]------------------------------------"
echo
echo "This command was designed to run a local Ethereum blockchain using the forked Foundry Anvil node simulator in its own terminal window. It will also start the dapp-e2e-example NextJS dApp utilizing a wagmi Mock Connector Wallet. This run started on $TIMESTAMP."
echo
echo "Please read this documentation to learn more about the Foundry Anvil tool... https://book.getfoundry.sh/anvil/"
echo
killall rust > /dev/null 2>&1
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
killall anvil > /dev/null 2>&1
killall yarn > /dev/null 2>&1
pkill rust > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
pkill anvil > /dev/null 2>&1
pkill yarn > /dev/null 2>&1
source "$HOME"/.bashrc
export PATH="$PATH:$HOME/.foundry/bin/"
echo
echo
echo "Checking the Foundry Forge command..."
forge -V
cd ./solidity-foundry-playwright-wagmi-tools
rm -rf ./logs/anvil-default-network-node-standalone-mode.log
rm -rf ./logs/forge-compile-and-deployment.log
echo "Ethereum" > ./logs/blockchain-type.log
echo
echo
cd ./dapp-e2e-example-main
## If you have issues with this LTS Node.js version, then un-comment the following command.
#nvm install --lts
npm install yarn -g
npm install
yarn dev > ./wagmi-nextjs-dapp.log &
cd ..
ls -la
source ./foundry-environment-variables.env
rm -rf ./anvil-smartcontract-address*
## The following command can help debug anvil connection issues.
## sudo lsof -i -P -n | grep LISTEN
anvil --prune-history --fork-block-number="$ANVIL_FORK_BLOCK_NUMBER" --fork-url="$ANVIL_FORK_URL" > ./logs/anvil-default-network-node-standalone-mode.log &
sleep 10
echo
echo
forge create ./contracts/ERC20Interface.sol:IERC20 --rpc-url http://localhost:8545 --private-key "$ANVIL_WALLET_PRIVATE_KEY" --root ./
forge create ./contracts/ERC20Token.sol:ERC20 --rpc-url http://localhost:8545 --private-key "$ANVIL_WALLET_PRIVATE_KEY" --constructor-args "QAToken" "QA" "18" --root ./ > ./logs/forge-compile-and-deployment.log &&
echo
echo
sleep 10
DEPLOYED_CONTRACT_ADDRESS=$(cat ./logs/forge-compile-and-deployment.log | grep "Deployed to" | awk '{print $3}')
echo -n "$DEPLOYED_CONTRACT_ADDRESS" > ./anvil-smartcontract-address.env
#echo "$DEPLOYED_CONTRACT_ADDRESS" > ./anvil-smartcontract-address.txt
#tail -n -1 ./anvil-smartcontract-address.txt > ./anvil-smartcontract-address.env
#rm -rf ./anvil-smartcontract-address.txt
cat ./anvil-smartcontract-address.env
echo
echo
TIMESTAMP2=$(date)
echo "------------------------------------[[[[ Foundry-Anvil-Ethereum-Node-And-Wagmi-dApp-Log-Output ]]]]------------------------------------"
echo
echo "************************************"
echo "The following log output comes from the forge-compile-and-deployment.log"
cat ./logs/forge-compile-and-deployment.log
echo
echo "************************************"
echo "The following log output comes from the wagmi-nextjs-dapp.log"
cat ./dapp-e2e-example-main/wagmi-nextjs-dapp.log
echo
echo "************************************"
echo "The following log outputs comes from wagmi-nextjs-dapp.log and anvil-default-network-node-standalone-mode.log"
tail -F ./logs/anvil-default-network-node-standalone-mode.log
echo
echo "This run ended on $TIMESTAMP2."
fi
if [ "$1" == "Start-Default-Foundry-Anvil-Node-And-Wagmi-dApp" ]; then
echo
echo "------------------------------------[[[[ Start-Default-Foundry-Anvil-Node-And-Wagmi-dApp ]]]]------------------------------------"
echo
echo "This command was designed to run a local Ethereum blockchain using the Foundry Anvil node simulator in its own terminal window, but not forked. It will also start the dapp-e2e-example NextJS dApp utilizing a wagmi Mock Connector Wallet. This run started on $TIMESTAMP."
echo
echo "Please read this documentation to learn more about the Foundry Anvil tool... https://book.getfoundry.sh/anvil/"
echo
killall rust > /dev/null 2>&1
killall node > /dev/null 2>&1
killall npm > /dev/null 2>&1
killall robot > /dev/null 2>&1
killall anvil > /dev/null 2>&1
killall yarn > /dev/null 2>&1
pkill rust > /dev/null 2>&1
pkill node > /dev/null 2>&1
pkill npm > /dev/null 2>&1
pkill robot > /dev/null 2>&1
pkill anvil > /dev/null 2>&1
pkill yarn > /dev/null 2>&1
source "$HOME"/.bashrc
export PATH="$PATH:$HOME/.foundry/bin/"
echo
echo
echo "Checking the Foundry Forge command..."
forge -V
cd ./solidity-foundry-playwright-wagmi-tools
rm -rf ./logs/anvil-default-network-node-standalone-mode.log
rm -rf ./logs/forge-compile-and-deployment.log
echo "Ethereum" > ./logs/blockchain-type.log
echo
echo
cd ./dapp-e2e-example-main
## If you have issues with this LTS Node.js version, then un-comment the following command.
#nvm install --lts
npm install yarn -g
npm install
yarn dev > ./wagmi-nextjs-dapp.log &
cd ..
ls -la
source ./foundry-environment-variables.env
rm -rf ./anvil-smartcontract-address*
## The following command can help debug anvil connection issues.
## sudo lsof -i -P -n | grep LISTEN
anvil --prune-history > ./logs/anvil-default-network-node-standalone-mode.log &
sleep 10
echo
echo
forge create ./contracts/ERC20Interface.sol:IERC20 --rpc-url http://localhost:8545 --private-key "$ANVIL_WALLET_PRIVATE_KEY" --root ./
forge create ./contracts/ERC20Token.sol:ERC20 --rpc-url http://localhost:8545 --private-key "$ANVIL_WALLET_PRIVATE_KEY" --constructor-args "QAToken" "QA" "18" --root ./ > ./logs/forge-compile-and-deployment.log &&
echo
echo
sleep 10
DEPLOYED_CONTRACT_ADDRESS=$(cat ./logs/forge-compile-and-deployment.log | grep "Deployed to" | awk '{print $3}')
echo -n "$DEPLOYED_CONTRACT_ADDRESS" > ./anvil-smartcontract-address.env
#echo "$DEPLOYED_CONTRACT_ADDRESS" > ./anvil-smartcontract-address.txt
#tail -n -1 ./anvil-smartcontract-address.txt > ./anvil-smartcontract-address.env
#rm -rf ./anvil-smartcontract-address.txt
cat ./anvil-smartcontract-address.env
echo
echo
TIMESTAMP2=$(date)
echo "------------------------------------[[[[ Foundry-Anvil-Ethereum-Node-And-Wagmi-dApp-Log-Output ]]]]------------------------------------"
echo
echo "************************************"
echo "The following log output comes from the forge-compile-and-deployment.log"
cat ./logs/forge-compile-and-deployment.log
echo
echo "************************************"
echo "The following log output comes from the wagmi-nextjs-dapp.log"
cat ./dapp-e2e-example-main/wagmi-nextjs-dapp.log
echo
echo "************************************"
echo "The following log outputs comes from wagmi-nextjs-dapp.log and anvil-default-network-node-standalone-mode.log"
tail -F ./logs/anvil-default-network-node-standalone-mode.log
echo
echo "This run ended on $TIMESTAMP2."
fi
if [ "$1" == "Run-Parallel-Smart-Contract-Foundry-And-Playwright-Browser-Tests" ]; then
clear
echo
echo "------------------------------------[[[[ Run-Parallel-Smart-Contract-Foundry-And-Playwright-Browser-Tests ]]]]------------------------------------"
echo
echo "This command uses the deployed Solidity Smart Contracts address found in the anvil-smartcontract-address.env file to run Robot Framework Foundry Cast automation that will perform an interactive test on the Solidity Smart Contracts using the Foundry Anvil node designed for local development. A Playwright browser test will also run in parallel to test the dapp-e2e-example-main Mock Wallet dApp. This run started on $TIMESTAMP."
echo
cd ./solidity-foundry-playwright-wagmi-tools
source ./foundry-environment-variables.env
export BLOCKCHAIN_TYPE=$(cat ./logs/blockchain-type.log)
BLOCKCHAIN_TYPE_FILE=./logs/blockchain-type.log
if [ -f "$BLOCKCHAIN_TYPE_FILE" ]; then
echo
echo "BLOCKCHAIN_TYPE_FILE is set and the test will now continue without interuptions."
echo
else
echo
echo "BLOCKCHAIN_TYPE_FILE is not set. Please run the 'Start-Forked-Foundry-Anvil-Node-And-Wagmi-dApp' command or 'Start-Default-Foundry-Anvil-Node-And-Wagmi-dApp' command, follow the instructions, and wait until you see Foundry Anvil output appearing in the terminal window. This test is going to exit now."
echo
exit
fi
source "$HOME"/.bashrc
export PATH="$PATH:$HOME/.foundry/bin/"
echo
echo
echo "Checking the Foundry Forge command..."
forge -V
echo
echo
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./requirements.txt > /dev/null 2>&1
sleep 5
if [ "$2" == "Skip-Browser-Setup" ]; then
echo
echo "The 'rfbrowser init' command will skip browser setup for this test."
echo
rfbrowser init --skip-browsers
else
echo
echo "The regular 'rfbrowser init' command will run for this test."
echo
rfbrowser init
fi
sleep 5
pabot --verbose --variable BLOCKCHAIN:"$BLOCKCHAIN_TYPE" --report NONE --log smart-contract-foundry-playwright-"$BLOCKCHAIN_TYPE"-tests-log.html --output smart-contract-foundry-playwright-"$BLOCKCHAIN_TYPE"-tests-output.xml -N "Robot Framework Solidity Smart Contract Foundry $BLOCKCHAIN_TYPE And Playwright dApp Test" -d ./logs ./robotframework-foundry-cast-test-keywords.robot ./robotframework-mock-wallet-playwright-test-keywords.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Stop-And-Clean-Up-Docker-Security-Tests" ]; then
echo
echo "------------------------------------[[[[ Stop-And-Clean-Up-Docker-Security-Tests ]]]]------------------------------------"
echo
echo "This will build the Docker image defined in the docker-compose.yml file and also clean up any Docker containers used in previous workflow processes. This run started on $TIMESTAMP."
echo
docker image prune --force
echo
cd ./solidity-parallel-datadriven-security-tools/resources
bash ./run-solidity-security-tests.sh Stop-Docker-Containers-Setup-Napalm-And-Mythril
echo
echo "Checking for running containers. Should be blank below this line..."
echo
docker ps -a
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
fi
if [ "$1" == "Run-Parallel-Datadriven-Smart-Contract-Security-Tests" ]; then
clear
echo
echo "------------------------------------[[[[ Run-Parallel-Datadriven-Smart-Contract-Security-Tests ]]]]------------------------------------"
echo
echo "This command uses the deployed and verified Solidity Smart Contracts addresses found in Datadriver CSV files to run parallel Robot Framework Solidity vulnerability checking automation using different types of Consensys security tools. This run started on $TIMESTAMP."
echo
cd ./solidity-parallel-datadriven-security-tools
rm -rf ./resources/mythril/*.log
rm -rf ./resources/napalm/*.log
pip3 install virtualenv --user > /dev/null 2>&1
virtualenv -p python3 venv > /dev/null 2>&1
source venv/bin/activate
pip3 install -r ./resources/requirements.txt > /dev/null 2>&1
sleep 5
robot --report NONE --log smart-contract-security-tests-setup-log.html --output smart-contract-security-tests-setup-output.xml -N "Smart Contract Security Testing Setup" -d ./logs ./robotframework-rpa*.robot
pabot --verbose --report NONE --log smart-contract-parallel-security-tests-log.html --output smart-contract-parallel-security-tests-output.xml -N "Parallel Smart Contract Security Tests Using Consensys Mythril And Napalm Tools" -d ./logs ./robotframework-security-test*.robot
TIMESTAMP2=$(date)
echo "This run ended on $TIMESTAMP2."
exit
fi
if [ "$1" == "Stop-And-Clean-Up-Docker-Bot-RPA-Tasks" ]; then
echo
echo "------------------------------------[[[[ Stop-And-Clean-Up-Docker-Bot-RPA-Tasks ]]]]------------------------------------"
echo
echo "This will build the Docker image defined in the docker-compose.yml file and also clean up any Docker containers used in previous workflow processes. This run started on $TIMESTAMP."
echo
docker stop $(docker ps -a -q) &&
docker rm $(docker ps -a -q)
cd ./alchemy-sdk-docker-blockchain-tools
docker compose -f docker-compose.yml down
docker compose -f docker-compose.yml rm -f
docker compose -f docker-compose.yml build
cd ./infura-websocket-docker-blockchain-tools
docker compose -f docker-compose.yml down
docker compose -f docker-compose.yml rm -f
docker compose -f docker-compose.yml build
TIMESTAMP2=$(date)
echo "This build ended on $TIMESTAMP2."
fi
if [ "$1" == "Run-Alchemy-SDK-Bot-RPA-Tasks" ]; then
echo
echo "------------------------------------[[[[ Run-Alchemy-SDK-Bot-RPA-Tasks ]]]]------------------------------------"
echo
echo "This Run-Alchemy-SDK-Bot-RPA-Tasks script is running. This run started on $TIMESTAMP."
echo
echo
cd ./alchemy-sdk-docker-blockchain-tools
docker compose -f docker-compose.yml down
docker compose -f docker-compose.yml rm -f
docker compose -f docker-compose.yml build
docker compose run docker-task-runner run-commands-inside-docker.sh
docker stop $(docker ps -a -q) &&
docker rm $(docker ps -a -q)
docker compose -f docker-compose.yml down
docker compose -f docker-compose.yml rm -f
TIMESTAMP2=$(date)
echo "This test run ended on $TIMESTAMP2."
fi
if [ "$1" == "Run-Infura-Websocket-Bot-RPA-Tasks" ]; then
echo
echo "------------------------------------[[[[ Run-Infura-Websocket-Bot-RPA-Tasks ]]]]------------------------------------"
echo
echo "This Run-Infura-Websocket-Bot-RPA-Tasks script is running. This run started on $TIMESTAMP."
echo
echo
cd ./infura-websocket-docker-blockchain-tools
docker compose -f docker-compose.yml down
docker compose -f docker-compose.yml rm -f
docker compose -f docker-compose.yml build
docker compose run docker-task-runner run-commands-inside-docker.sh
docker stop $(docker ps -a -q) &&
docker rm $(docker ps -a -q)
docker compose -f docker-compose.yml down
docker compose -f docker-compose.yml rm -f
TIMESTAMP2=$(date)
echo "This test run ended on $TIMESTAMP2."
fi
usage_explanation() {
echo
echo
echo "------------------------------------[[[[ Tool Runner Script ]]]]------------------------------------"
echo
echo
echo "This tool runner script can be used to run the following commands to test smart contracts written in Solidity."
echo
echo "You can view just this help menu again (without triggering any automation) by running 'bash ./start-solidity-qa-workflows.sh -h' or 'bash ./start-solidity-qa-workflows.sh --help'."
echo
echo "---->>>> Local Solidity Test Environment Setup Commands <<<<----"
echo "bash ./start-solidity-qa-workflows.sh Install-Tools-On-MacOS-Or-Linux"
echo "bash ./start-solidity-qa-workflows.sh Install-Solidity-Security-Testing-Tools-On-MacOS"
echo "bash ./start-solidity-qa-workflows.sh Start-Default-Hardhat-Network-And-Robotremoteserver"
echo "bash ./start-solidity-qa-workflows.sh Start-Multichain-Hardhat-Network-And-Robotremoteserver"
echo "bash ./start-solidity-qa-workflows.sh Start-Default-Truffle-Develop-And-Robotremoteserver"
echo "bash ./start-solidity-qa-workflows.sh Start-Default-Foundry-Anvil-Node-And-Wagmi-dApp"
echo "bash ./start-solidity-qa-workflows.sh Start-Forked-Foundry-Anvil-Node-And-Wagmi-dApp"
echo "bash ./start-solidity-qa-workflows.sh Stop-Local-Blockchain-Nodes-And-Delete-Logs"
echo
echo "---->>>> Solidity Static Analysis And Security Testing Commands <<<<----"
echo "bash ./start-solidity-qa-workflows.sh Run-Solidity-Static-Analysis"
echo
echo "---->>>> Solidity Vulnerability Scanning Security Testing Commands <<<<----"
echo "bash ./start-solidity-qa-workflows.sh Stop-And-Clean-Up-Docker-Security-Tests"
echo "bash ./start-solidity-qa-workflows.sh Run-Parallel-Datadriven-Smart-Contract-Security-Tests"
echo
echo "---->>>> Alchemy SDK and Infura Websocket Docker Container Bots Powered by Robot Framework RPA <<<<----"
echo "bash ./start-solidity-qa-workflows.sh Stop-And-Clean-Up-Docker-Bot-RPA-Tasks"
echo "bash ./start-solidity-qa-workflows.sh Run-Alchemy-SDK-Bot-RPA-Tasks"
echo "bash ./start-solidity-qa-workflows.sh Run-Infura-Websocket-Bot-RPA-Tasks"
echo
echo "---->>>> Hardhat Deployment Commands Powered by Robot Framework RPA (NOTE: These scripts are capable of deploying to Mainnets or Testnets!) <<<<----"
echo "bash ./start-solidity-qa-workflows.sh Run-Smart-Contract-Hardhat-Ethereum-RPA-Deployment"
echo "bash ./start-solidity-qa-workflows.sh Run-Smart-Contract-Hardhat-Fantom-RPA-Deployment"
echo "bash ./start-solidity-qa-workflows.sh Run-Smart-Contract-Hardhat-Polygon-RPA-Deployment"
echo "bash ./start-solidity-qa-workflows.sh Run-Smart-Contract-Hardhat-Avalanche-RPA-Deployment"
echo
echo "---->>>> Truffle Deployment Commands Powered by Robot Framework RPA (NOTE: These scripts are capable of deploying to Mainnets or Testnets!) <<<<----"
echo "bash ./start-solidity-qa-workflows.sh Run-Smart-Contract-Truffle-Ethereum-RPA-Deployment"
echo
echo "---->>>> Interactive Tests For Deployed Smart Contracts Using Hardhat (NOTE: These tests can run on multiple EVM Compatible Blockchains!) <<<<----"
echo "bash ./start-solidity-qa-workflows.sh Run-Smart-Contract-Tests-Default-NonForked-Hardhat-Network"
echo "bash ./start-solidity-qa-workflows.sh Run-Smart-Contract-Tests-Forked-Mainnet-Hardhat-Network"
echo
echo "---->>>> Interactive Tests For Deployed Smart Contracts Using Truffle Suite <<<<----"
echo "bash ./start-solidity-qa-workflows.sh Run-Smart-Contract-Tests-Default-Truffle-Develop-Instance"
echo
echo "---->>>> Interactive Tests For Deployed Smart Contracts Using Foundry <<<<----"
echo "bash ./start-solidity-qa-workflows.sh Run-Parallel-Smart-Contract-Foundry-And-Playwright-Browser-Tests"
echo
cat ./notes-images-and-demonstrations/NOTES.md 2> /dev/null
echo
echo
}
error_handler() {
local error_message="$@"
echo "${error_message}" 1>&2;
}
argument="$1"
if [[ -z $argument ]] ; then
usage_explanation
else
case $argument in
-h|--help)
usage_explanation
;;
*)
usage_explanation
;;
esac
fi