Update README example

Clean code in solidity_variables
pull/21/head
Josselin 6 years ago
parent 4d797bb4b7
commit 14643f5eca
  1. 4
      README.md
  2. 13
      slither/core/declarations/solidity_variables.py

@ -42,9 +42,9 @@ $ slither file.sol
For example:
```
$ slither examples/bugs/uninitialized.sol
$ slither tests/uninitialized.sol
[..]
INFO:Detectors:Uninitialized state variables in examples/bugs/uninitialized.sol, Contract: Uninitialized, Vars: destination, Used in ['transfer']
INFO:Detectors:Uninitialized state variables in tests/uninitialized.sol, Contract: Uninitialized, Vars: destination, Used in ['transfer']
[..]
```

@ -3,7 +3,18 @@
SOLIDITY_VARIABLES = ["block", "msg", "now", "tx", "this", "super", 'abi']
SOLIDITY_VARIABLES_COMPOSED = ["block.coinbase", "block.difficulty", "block.gaslimit", "block.number", "block.timestamp", "msg.data", "msg.gas", "msg.sender", "msg.sig", "msg.value", "tx.gasprice", "tx.origin"]
SOLIDITY_VARIABLES_COMPOSED = ["block.coinbase",
"block.difficulty",
"block.gaslimit",
"block.number",
"block.timestamp",
"msg.data",
"msg.gas",
"msg.sender",
"msg.sig",
"msg.value",
"tx.gasprice",
"tx.origin"]
SOLIDITY_FUNCTIONS = {"gasleft()":['uint256'],

Loading…
Cancel
Save