Merge branch 'dev' into dev-new-detectors

pull/396/head
Josselin 5 years ago
commit 34e43a3f25
  1. 1
      .github/workflows/ci.yml
  2. 3
      scripts/travis_test_embark.sh
  3. 4
      scripts/travis_test_etherscan.sh
  4. 2
      scripts/travis_test_truffle.sh
  5. 6
      setup.py
  6. 17
      slither/core/declarations/contract.py

@ -38,5 +38,6 @@ jobs:
- name: Run Tests
env:
TEST_TYPE: ${{ matrix.type }}
GITHUB_ETHERSCAN: ${{ secrets.GITHUB_ETHERSCAN }}
run: |
bash scripts/travis_test_${TEST_TYPE}.sh

@ -9,9 +9,8 @@ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | b
source ~/.nvm/nvm.sh
nvm install 10.17.0
nvm use 10.17.0
npm --version
npm install -g embark
npm install -g embark@4.2.0
embark demo
cd embark_demo
npm install

@ -8,7 +8,7 @@ cd etherscan
wget -O solc-0.4.25 https://github.com/ethereum/solidity/releases/download/v0.4.25/solc-static-linux
chmod +x solc-0.4.25
slither 0x7F37f78cBD74481E593F9C737776F7113d76B315 --solc "./solc-0.4.25"
slither 0x7F37f78cBD74481E593F9C737776F7113d76B315 --solc "./solc-0.4.25" --etherscan-apikey $GITHUB_ETHERSCAN
if [ $? -ne 5 ]
then
@ -16,7 +16,7 @@ then
exit -1
fi
slither rinkeby:0xFe05820C5A92D9bc906D4A46F662dbeba794d3b7 --solc "./solc-0.4.25"
slither rinkeby:0xFe05820C5A92D9bc906D4A46F662dbeba794d3b7 --solc "./solc-0.4.25" --etherscan-apikey $GITHUB_ETHERSCAN
if [ $? -ne 70 ]
then

@ -14,7 +14,7 @@ npm install -g truffle
truffle unbox metacoin
slither .
if [ $? -eq 7 ]
if [ $? -eq 5 ]
then
exit 0
fi

@ -10,9 +10,9 @@ setup(
python_requires='>=3.6',
install_requires=['prettytable>=0.7.2',
'pysha3>=1.0.2',
'crytic-compile>=0.1.6'],
# 'crytic-compile'],
# dependency_links=['git+https://github.com/crytic/crytic-compile.git@master#egg=crytic-compile'],
# 'crytic-compile>=0.1.6'],
'crytic-compile'],
dependency_links=['git+https://github.com/crytic/crytic-compile.git@dev#egg=crytic-compile'],
license='AGPL-3.0',
long_description=open('README.md').read(),
entry_points={

@ -42,6 +42,7 @@ class Contract(ChildSlither, SourceMapping):
self._kind = None
self._signatures = None
self._signatures_declared = None
self._is_upgradeable = None
self._is_upgradeable_proxy = None
@ -292,7 +293,7 @@ class Contract(ChildSlither, SourceMapping):
Return the signatures of all the public/eterxnal functions/state variables
:return: list(string) the signatures of all the functions that can be called
"""
if self._signatures == None:
if self._signatures is None:
sigs = [v.full_name for v in self.state_variables if v.visibility in ['public',
'external']]
@ -300,6 +301,20 @@ class Contract(ChildSlither, SourceMapping):
self._signatures = list(set(sigs))
return self._signatures
@property
def functions_signatures_declared(self):
"""
Return the signatures of the public/eterxnal functions/state variables that are declared by this contract
:return: list(string) the signatures of all the functions that can be called and are declared by this contract
"""
if self._signatures_declared is None:
sigs = [v.full_name for v in self.state_variables_declared if v.visibility in ['public',
'external']]
sigs += set([f.full_name for f in self.functions_declared if f.visibility in ['public', 'external']])
self._signatures_declared = list(set(sigs))
return self._signatures_declared
@property
def functions(self):
'''

Loading…
Cancel
Save