Welcome to my smart contract audit and testing repository.This repository contains smart contracts that have been audited using Slither , Echidna , Foundry and Mythril.
1.Foundry(for development and testing):
curl -L https://foundry.paradigm.xyz | bash
Open another terminal.Then run:
foundryup
For compilation, run:
forge build
Written tests including fuzz tests.Check them out in the tests folders. For testing them, run:
forge test
Running tests for particular Smart Contracts:
forge test --match-path test/CryptoWalletInsurance.t.sol
forge test --match-path test/CollateralProtectionInsurance.t.sol
2.Slither(used for static analysis):
pip3 install slither-analyzer
Using Slither for particular smart contracts:
cd src
slither CryptoWalletInsurance.sol
slither CollateralProtectionInsurance.sol
3.Mythril(analysis techniques, including taint analysis and symbolic execution)
pip3 install mythril
Using Mythril for particular smart contracts:
cd src
myth analyze CryptoWalletInsurance.sol
myth analyze CollateralProtectionInsurance.sol
4.solc (Solidity Compiler):
pip3 install solc-select
solc-select install 0.8.26
solc-select use 0.8.26
5.Echidna(for more advanced fuzz testing)
brew install echidna
Using echidna for particular smart contracts:
cd src
echidna CollateralProtectionInsurance.sol --contract CollateralProtectionInsuranceEchidnaTest
echidna CryptoWalletInsurance.sol --contract CryptoWalletInsuranceEchidnaTest
Results after running fuzz tests: