Skip to content

Instantly share code, notes, and snippets.

@KONFeature
Last active October 7, 2022 10:42
Show Gist options
  • Select an option

  • Save KONFeature/f7c3f15cd9ba7a7c2efed010083bac13 to your computer and use it in GitHub Desktop.

Select an option

Save KONFeature/f7c3f15cd9ba7a7c2efed010083bac13 to your computer and use it in GitHub Desktop.

Revisions

  1. KONFeature revised this gist Oct 7, 2022. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions mythril.sh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,11 @@ if [ ! -d "contracts" ]; then
    exit 1
    fi

    # Run mythril analyse on the given contract
    function analyse_contract {
    docker run --rm -v `pwd`:/src --workdir=/src mythril/myth -v 4 analyze $1 --solc-json tools/mythril/remapping.json --max-depth 50
    }

    echo ""
    echo "<----- Checking SybelToken.sol ----->"
    analyse_contract contracts/tokens/SybelToken.sol
    @@ -17,8 +22,3 @@ analyse_contract contracts/wallets/VestingWallets.sol
    echo ""
    echo "<----- Checking SybelInternalTokens.sol ----->"
    analyse_contract contracts/tokens/SybelInternalTokens.sol

    # Run mythril analyse on the given contract
    function analyse_contract {
    docker run --rm -v `pwd`:/src --workdir=/src mythril/myth -v 4 analyze $1 --solc-json tools/mythril/remapping.json --max-depth 50
    }
  2. KONFeature revised this gist Oct 7, 2022. 1 changed file with 0 additions and 15 deletions.
    15 changes: 0 additions & 15 deletions mythril.sh
    Original file line number Diff line number Diff line change
    @@ -6,9 +6,6 @@ if [ ! -d "contracts" ]; then
    exit 1
    fi

    echo "<----- Checking SybelMath.sol ----->"
    analyse_contract contracts/utils/SybelMath.sol

    echo ""
    echo "<----- Checking SybelToken.sol ----->"
    analyse_contract contracts/tokens/SybelToken.sol
    @@ -21,18 +18,6 @@ echo ""
    echo "<----- Checking SybelInternalTokens.sol ----->"
    analyse_contract contracts/tokens/SybelInternalTokens.sol

    echo ""
    echo "<----- Checking Minter.sol ----->"
    analyse_contract contracts/minter/Minter.sol

    echo ""
    echo "<----- Checking Rewarder.sol ----->"
    analyse_contract contracts/reward/Rewarder.sol

    echo ""
    echo "<----- Checking Referral.sol ----->"
    analyse_contract contracts/reward/Referral.sol

    # Run mythril analyse on the given contract
    function analyse_contract {
    docker run --rm -v `pwd`:/src --workdir=/src mythril/myth -v 4 analyze $1 --solc-json tools/mythril/remapping.json --max-depth 50
  3. KONFeature created this gist Oct 7, 2022.
    39 changes: 39 additions & 0 deletions mythril.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    #!/bin/bash

    # Assert we are in the right folder
    if [ ! -d "contracts" ]; then
    echo "error: script needs to be run from project root './tools/mythril/mythril.sh'"
    exit 1
    fi

    echo "<----- Checking SybelMath.sol ----->"
    analyse_contract contracts/utils/SybelMath.sol

    echo ""
    echo "<----- Checking SybelToken.sol ----->"
    analyse_contract contracts/tokens/SybelToken.sol

    echo ""
    echo "<----- Checking VestingWallets.sol ----->"
    analyse_contract contracts/wallets/VestingWallets.sol

    echo ""
    echo "<----- Checking SybelInternalTokens.sol ----->"
    analyse_contract contracts/tokens/SybelInternalTokens.sol

    echo ""
    echo "<----- Checking Minter.sol ----->"
    analyse_contract contracts/minter/Minter.sol

    echo ""
    echo "<----- Checking Rewarder.sol ----->"
    analyse_contract contracts/reward/Rewarder.sol

    echo ""
    echo "<----- Checking Referral.sol ----->"
    analyse_contract contracts/reward/Referral.sol

    # Run mythril analyse on the given contract
    function analyse_contract {
    docker run --rm -v `pwd`:/src --workdir=/src mythril/myth -v 4 analyze $1 --solc-json tools/mythril/remapping.json --max-depth 50
    }