diff --git a/.github/workflows/pip-audit.yml b/.github/workflows/pip-audit.yml new file mode 100644 index 000000000..f6360056c --- /dev/null +++ b/.github/workflows/pip-audit.yml @@ -0,0 +1,27 @@ +name: pip-audit + +on: + push: + branches: [ dev, master ] + pull_request: + branches: [ dev, master ] + schedule: [ cron: "0 7 * * 2" ] + +jobs: + audit: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Install pip-audit + run: | + python -m pip install --upgrade pip + python -m pip install pip-audit + - name: Run pip-audit + run: | + python -m pip install . + pip-audit --desc -v diff --git a/slither/tools/erc_conformance/erc/ercs.py b/slither/tools/erc_conformance/erc/ercs.py index da16558b5..1c64dc4a7 100644 --- a/slither/tools/erc_conformance/erc/ercs.py +++ b/slither/tools/erc_conformance/erc/ercs.py @@ -65,10 +65,10 @@ def _check_signature(erc_function, contract, ret): if function_return_type: function_return_type = ",".join([str(x) for x in function_return_type]) if function_return_type == return_type: - txt = f"\t[✓] {sig} -> () (correct return value)" + txt = f"\t[✓] {sig} -> ({function_return_type}) (correct return type)" logger.info(txt) else: - txt = f"\t[ ] {sig} -> () should return {return_type}" + txt = f"\t[ ] {sig} -> ({function_return_type}) should return {return_type}" logger.info(txt) incorrect_return = output.Output( diff --git a/tests/check-erc/test_1.txt b/tests/check-erc/test_1.txt index 1e088017f..014653f1f 100644 --- a/tests/check-erc/test_1.txt +++ b/tests/check-erc/test_1.txt @@ -2,7 +2,7 @@ ## Check functions [✓] totalSupply() is present - [✓] totalSupply() -> () (correct return value) + [✓] totalSupply() -> (uint256) (correct return type) [✓] totalSupply() is view [ ] balanceOf(address) is missing [ ] transfer(address,uint256) is missing