mirror of https://github.com/crytic/slither
- Remove Balance IR (BREAKING CHANGE), and use solidity function instead - Add support for addr.code / addr/codehash - Add block.basefee support - Improve bytes.concat support - Add type early on for convert operator (useful for .balance/.code/.codehash detection) Replacing Balance by a solidity function allows to ease the analysis, and prevent adding an IR opcode per address.function (code/codehash) Additionally this PR add thorough tests based on https://docs.soliditylang.org/en/latest/units-and-global-variables.html for all the different solidity versions.pull/985/head
parent
5de54f7089
commit
b85d9e8cbf
@ -1,24 +0,0 @@ |
|||||||
from slither.core.solidity_types import ElementaryType |
|
||||||
from slither.slithir.operations.lvalue import OperationWithLValue |
|
||||||
from slither.slithir.utils.utils import is_valid_lvalue, is_valid_rvalue |
|
||||||
|
|
||||||
|
|
||||||
class Balance(OperationWithLValue): |
|
||||||
def __init__(self, value, lvalue): |
|
||||||
super().__init__() |
|
||||||
assert is_valid_rvalue(value) |
|
||||||
assert is_valid_lvalue(lvalue) |
|
||||||
self._value = value |
|
||||||
self._lvalue = lvalue |
|
||||||
lvalue.set_type(ElementaryType("uint256")) |
|
||||||
|
|
||||||
@property |
|
||||||
def read(self): |
|
||||||
return [self._value] |
|
||||||
|
|
||||||
@property |
|
||||||
def value(self): |
|
||||||
return self._value |
|
||||||
|
|
||||||
def __str__(self): |
|
||||||
return "{} -> BALANCE {}".format(self.lvalue, self.value) |
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue