Skip to content

skpkss/Unhackable_Contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Contract Audits and Testing

Welcome to my smart contract audit and testing repository.This repository contains smart contracts that have been audited using Slither , Echidna , Foundry and Mythril.

Terminal Installation Commands

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:

ech2 ech3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors