id
int64 0
458k
| file_name
stringlengths 4
119
| file_path
stringlengths 14
227
| content
stringlengths 24
9.96M
| size
int64 24
9.96M
| language
stringclasses 1
value | extension
stringclasses 14
values | total_lines
int64 1
219k
| avg_line_length
float64 2.52
4.63M
| max_line_length
int64 5
9.91M
| alphanum_fraction
float64 0
1
| repo_name
stringlengths 7
101
| repo_stars
int64 100
139k
| repo_forks
int64 0
26.4k
| repo_open_issues
int64 0
2.27k
| repo_license
stringclasses 12
values | repo_extraction_date
stringclasses 433
values |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2,286,100 | caller_context.py | NioTheFirst_ScType/slither/solc_parsing/declarations/caller_context.py | import abc
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from slither.core.compilation_unit import SlitherCompilationUnit
from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc
class CallerContextExpression(metaclass=abc.ABCMeta):
"""
This class is inherited by all the declarations class that can be used in the expression/type parsing
As a source of context/scope
It is used by any declaration class that can be top-level and require complex parsing
"""
@property
@abc.abstractmethod
def is_compact_ast(self) -> bool:
pass
@property
@abc.abstractmethod
def compilation_unit(self) -> "SlitherCompilationUnit":
pass
@abc.abstractmethod
def get_key(self) -> str:
pass
@property
@abc.abstractmethod
def slither_parser(self) -> "SlitherCompilationUnitSolc":
pass
| 913 | Python | .py | 26 | 29.769231 | 105 | 0.740319 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,101 | using_for_top_level.py | NioTheFirst_ScType/slither/solc_parsing/declarations/using_for_top_level.py | """
Using For Top Level module
"""
import logging
from typing import TYPE_CHECKING, Dict, Union
from slither.core.compilation_unit import SlitherCompilationUnit
from slither.core.declarations import (
StructureTopLevel,
EnumTopLevel,
)
from slither.core.declarations.using_for_top_level import UsingForTopLevel
from slither.core.scope.scope import FileScope
from slither.core.solidity_types import TypeAliasTopLevel
from slither.core.solidity_types.user_defined_type import UserDefinedType
from slither.solc_parsing.declarations.caller_context import CallerContextExpression
from slither.solc_parsing.solidity_types.type_parsing import parse_type
if TYPE_CHECKING:
from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc
LOGGER = logging.getLogger("UsingForTopLevelSolc")
class UsingForTopLevelSolc(CallerContextExpression): # pylint: disable=too-few-public-methods
"""
UsingFor class
"""
def __init__(
self,
uftl: UsingForTopLevel,
top_level_data: Dict,
slither_parser: "SlitherCompilationUnitSolc",
) -> None:
self._type_name = top_level_data["typeName"]
self._global = top_level_data["global"]
if "libraryName" in top_level_data:
self._library_name = top_level_data["libraryName"]
else:
self._functions = top_level_data["functionList"]
self._library_name = None
self._using_for = uftl
self._slither_parser = slither_parser
def analyze(self) -> None:
type_name = parse_type(self._type_name, self)
self._using_for.using_for[type_name] = []
if self._library_name is not None:
library_name = parse_type(self._library_name, self)
self._using_for.using_for[type_name].append(library_name)
self._propagate_global(type_name)
else:
for f in self._functions:
full_name_split = f["function"]["name"].split(".")
if len(full_name_split) == 1:
# Top level function
function_name: str = full_name_split[0]
self._analyze_top_level_function(function_name, type_name)
elif len(full_name_split) == 2:
# It can be a top level function behind an aliased import
# or a library function
first_part = full_name_split[0]
function_name = full_name_split[1]
self._check_aliased_import(first_part, function_name, type_name)
else:
# MyImport.MyLib.a we don't care of the alias
library_name_str = full_name_split[1]
function_name = full_name_split[2]
self._analyze_library_function(library_name_str, function_name, type_name)
def _check_aliased_import(
self,
first_part: str,
function_name: str,
type_name: Union[TypeAliasTopLevel, UserDefinedType],
):
# We check if the first part appear as alias for an import
# if it is then function_name must be a top level function
# otherwise it's a library function
for i in self._using_for.file_scope.imports:
if i.alias == first_part:
self._analyze_top_level_function(function_name, type_name)
return
self._analyze_library_function(first_part, function_name, type_name)
def _analyze_top_level_function(
self, function_name: str, type_name: Union[TypeAliasTopLevel, UserDefinedType]
) -> None:
for tl_function in self.compilation_unit.functions_top_level:
if tl_function.name == function_name:
self._using_for.using_for[type_name].append(tl_function)
self._propagate_global(type_name)
break
def _analyze_library_function(
self,
library_name: str,
function_name: str,
type_name: Union[TypeAliasTopLevel, UserDefinedType],
) -> None:
found = False
for c in self.compilation_unit.contracts:
if found:
break
if c.name == library_name:
for cf in c.functions:
if cf.name == function_name:
self._using_for.using_for[type_name].append(cf)
self._propagate_global(type_name)
found = True
break
if not found:
LOGGER.warning(
f"Top level using for: Library {library_name} - function {function_name} not found"
)
def _propagate_global(self, type_name: Union[TypeAliasTopLevel, UserDefinedType]) -> None:
if self._global:
for scope in self.compilation_unit.scopes.values():
if isinstance(type_name, TypeAliasTopLevel):
for alias in scope.user_defined_types.values():
if alias == type_name:
scope.using_for_directives.add(self._using_for)
elif isinstance(type_name, UserDefinedType):
self._propagate_global_UserDefinedType(scope, type_name)
else:
LOGGER.error(
f"Error when propagating global using for {type_name} {type(type_name)}"
)
def _propagate_global_UserDefinedType(self, scope: FileScope, type_name: UserDefinedType):
underlying = type_name.type
if isinstance(underlying, StructureTopLevel):
for struct in scope.structures.values():
if struct == underlying:
scope.using_for_directives.add(self._using_for)
elif isinstance(underlying, EnumTopLevel):
for enum in scope.enums.values():
if enum == underlying:
scope.using_for_directives.add(self._using_for)
else:
LOGGER.error(
f"Error when propagating global {underlying} {type(underlying)} not a StructTopLevel or EnumTopLevel"
)
@property
def is_compact_ast(self) -> bool:
return self._slither_parser.is_compact_ast
@property
def compilation_unit(self) -> SlitherCompilationUnit:
return self._slither_parser.compilation_unit
def get_key(self) -> str:
return self._slither_parser.get_key()
@property
def slither_parser(self) -> "SlitherCompilationUnitSolc":
return self._slither_parser
@property
def underlying_using_for(self) -> UsingForTopLevel:
return self._using_for
| 6,683 | Python | .py | 147 | 34.122449 | 117 | 0.614794 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,102 | structure_top_level.py | NioTheFirst_ScType/slither/solc_parsing/declarations/structure_top_level.py | """
Structure module
"""
from typing import TYPE_CHECKING, Dict
from slither.core.compilation_unit import SlitherCompilationUnit
from slither.core.declarations.structure_top_level import StructureTopLevel
from slither.core.variables.structure_variable import StructureVariable
from slither.solc_parsing.declarations.caller_context import CallerContextExpression
from slither.solc_parsing.variables.structure_variable import StructureVariableSolc
if TYPE_CHECKING:
from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc
class StructureTopLevelSolc(CallerContextExpression): # pylint: disable=too-few-public-methods
"""
Structure class
"""
# elems = [(type, name)]
def __init__( # pylint: disable=too-many-arguments
self,
st: StructureTopLevel,
struct: Dict,
slither_parser: "SlitherCompilationUnitSolc",
):
if slither_parser.is_compact_ast:
name = struct["name"]
attributes = struct
else:
name = struct["attributes"][slither_parser.get_key()]
attributes = struct["attributes"]
if "canonicalName" in attributes:
canonicalName = attributes["canonicalName"]
else:
canonicalName = name
children = struct["members"] if "members" in struct else struct.get("children", [])
self._structure = st
st.name = name
st.canonical_name = canonicalName
self._slither_parser = slither_parser
self._elemsNotParsed = children
def analyze(self):
for elem_to_parse in self._elemsNotParsed:
elem = StructureVariable()
elem.set_structure(self._structure)
elem.set_offset(elem_to_parse["src"], self._slither_parser.compilation_unit)
elem_parser = StructureVariableSolc(elem, elem_to_parse)
elem_parser.analyze(self)
self._structure.elems[elem.name] = elem
self._structure.add_elem_in_order(elem.name)
self._elemsNotParsed = []
@property
def is_compact_ast(self) -> bool:
return self._slither_parser.is_compact_ast
@property
def compilation_unit(self) -> SlitherCompilationUnit:
return self._slither_parser.compilation_unit
def get_key(self) -> str:
return self._slither_parser.get_key()
@property
def slither_parser(self) -> "SlitherCompilationUnitSolc":
return self._slither_parser
@property
def underlying_structure(self) -> StructureTopLevel:
return self._structure
| 2,594 | Python | .py | 62 | 34.16129 | 95 | 0.688146 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,103 | modifier.py | NioTheFirst_ScType/slither/solc_parsing/declarations/modifier.py | """
Event module
"""
from typing import Dict, TYPE_CHECKING, Union
from slither.core.cfg.node import NodeType
from slither.core.cfg.node import link_nodes
from slither.core.cfg.scope import Scope
from slither.core.declarations.modifier import Modifier
from slither.solc_parsing.cfg.node import NodeSolc
from slither.solc_parsing.declarations.function import FunctionSolc
if TYPE_CHECKING:
from slither.solc_parsing.declarations.contract import ContractSolc
from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc
from slither.core.declarations import Function
class ModifierSolc(FunctionSolc):
def __init__(
self,
modifier: Modifier,
function_data: Dict,
contract_parser: "ContractSolc",
slither_parser: "SlitherCompilationUnitSolc",
):
super().__init__(modifier, function_data, contract_parser, slither_parser)
# _modifier is equal to _function, but keep it here to prevent
# confusion for mypy in underlying_function
self._modifier = modifier
@property
def underlying_function(self) -> Modifier:
return self._modifier
def analyze_params(self):
# Can be re-analyzed due to inheritance
if self._params_was_analyzed:
return
self._params_was_analyzed = True
self._analyze_attributes()
if self.is_compact_ast:
params = self._functionNotParsed["parameters"]
else:
children = self._functionNotParsed["children"]
# It uses to be
# params = children[0]
# But from Solidity 0.6.3 to 0.6.10 (included)
# Comment above a function might be added in the children
params = next(child for child in children if child[self.get_key()] == "ParameterList")
if params:
self._parse_params(params)
def analyze_content(self):
if self._content_was_analyzed:
return
self._content_was_analyzed = True
if self.is_compact_ast:
body = self._functionNotParsed.get("body", None)
if body and body[self.get_key()] == "Block":
self._function.is_implemented = True
self._parse_cfg(body)
else:
children = self._functionNotParsed["children"]
self._function.is_implemented = False
if len(children) > 1:
# It uses to be
# params = children[1]
# But from Solidity 0.6.3 to 0.6.10 (included)
# Comment above a function might be added in the children
block = next(child for child in children if child[self.get_key()] == "Block")
self._function.is_implemented = True
self._parse_cfg(block)
for local_var_parser in self._local_variables_parser:
local_var_parser.analyze(self)
for node in self._node_to_nodesolc.values():
node.analyze_expressions(self)
self._rewrite_ternary_as_if_else()
self._remove_alone_endif()
# self._analyze_read_write()
# self._analyze_calls()
def _parse_statement(
self, statement: Dict, node: NodeSolc, scope: Union[Scope, "Function"]
) -> NodeSolc:
name = statement[self.get_key()]
if name == "PlaceholderStatement":
placeholder_node = self._new_node(NodeType.PLACEHOLDER, statement["src"], scope)
link_nodes(node.underlying_node, placeholder_node.underlying_node)
return placeholder_node
return super()._parse_statement(statement, node, scope)
| 3,662 | Python | .py | 83 | 34.674699 | 98 | 0.641653 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,104 | contract.py | NioTheFirst_ScType/slither/solc_parsing/declarations/contract.py | import logging
import re
from typing import List, Dict, Callable, TYPE_CHECKING, Union, Set
from slither.core.declarations import Modifier, Event, EnumContract, StructureContract, Function
from slither.core.declarations.contract import Contract
from slither.core.declarations.custom_error_contract import CustomErrorContract
from slither.core.declarations.function_contract import FunctionContract
from slither.core.solidity_types import ElementaryType, TypeAliasContract, Type
from slither.core.variables.state_variable import StateVariable
from slither.solc_parsing.declarations.caller_context import CallerContextExpression
from slither.solc_parsing.declarations.custom_error import CustomErrorSolc
from slither.solc_parsing.declarations.event import EventSolc
from slither.solc_parsing.declarations.function import FunctionSolc
from slither.solc_parsing.declarations.modifier import ModifierSolc
from slither.solc_parsing.declarations.structure_contract import StructureContractSolc
from slither.solc_parsing.exceptions import ParsingError, VariableNotFound
from slither.solc_parsing.solidity_types.type_parsing import parse_type
from slither.solc_parsing.variables.state_variable import StateVariableSolc
LOGGER = logging.getLogger("ContractSolcParsing")
if TYPE_CHECKING:
from slither.solc_parsing.slither_compilation_unit_solc import SlitherCompilationUnitSolc
from slither.core.slither_core import SlitherCore
from slither.core.compilation_unit import SlitherCompilationUnit
# pylint: disable=too-many-instance-attributes,import-outside-toplevel,too-many-nested-blocks,too-many-public-methods
class ContractSolc(CallerContextExpression):
def __init__(self, slither_parser: "SlitherCompilationUnitSolc", contract: Contract, data):
# assert slitherSolc.solc_version.startswith('0.4')
self._contract = contract
self._slither_parser = slither_parser
self._data = data
self._functionsNotParsed: List[Dict] = []
self._modifiersNotParsed: List[Dict] = []
self._functions_no_params: List[FunctionSolc] = []
self._modifiers_no_params: List[ModifierSolc] = []
self._eventsNotParsed: List[Dict] = []
self._variablesNotParsed: List[Dict] = []
self._enumsNotParsed: List[Dict] = []
self._structuresNotParsed: List[Dict] = []
self._usingForNotParsed: List[Dict] = []
self._customErrorParsed: List[Dict] = []
self._functions_parser: List[FunctionSolc] = []
self._modifiers_parser: List[ModifierSolc] = []
self._structures_parser: List[StructureContractSolc] = []
self._custom_errors_parser: List[CustomErrorSolc] = []
self._is_analyzed: bool = False
# use to remap inheritance id
self._remapping: Dict[str, str] = {}
self.baseContracts: List[str] = []
self.baseConstructorContractsCalled: List[str] = []
self._linearized_base_contracts: List[int]
self._variables_parser: List[StateVariableSolc] = []
# Export info
if self.is_compact_ast:
self._contract.name = self._data["name"]
self._handle_comment(self._data)
else:
self._contract.name = self._data["attributes"][self.get_key()]
self._handle_comment(self._data["attributes"])
self._contract.id = self._data["id"]
self._parse_contract_info()
self._parse_contract_items()
###################################################################################
###################################################################################
# region General Properties
###################################################################################
###################################################################################
@property
def is_analyzed(self) -> bool:
return self._is_analyzed
def set_is_analyzed(self, is_analyzed: bool):
self._is_analyzed = is_analyzed
@property
def underlying_contract(self) -> Contract:
return self._contract
@property
def linearized_base_contracts(self) -> List[int]:
return self._linearized_base_contracts
@property
def compilation_unit(self) -> "SlitherCompilationUnit":
return self._contract.compilation_unit
@property
def slither_parser(self) -> "SlitherCompilationUnitSolc":
return self._slither_parser
@property
def functions_parser(self) -> List["FunctionSolc"]:
return self._functions_parser
@property
def modifiers_parser(self) -> List["ModifierSolc"]:
return self._modifiers_parser
@property
def structures_not_parsed(self) -> List[Dict]:
return self._structuresNotParsed
@property
def enums_not_parsed(self) -> List[Dict]:
return self._enumsNotParsed
###################################################################################
###################################################################################
# region AST
###################################################################################
###################################################################################
def get_key(self) -> str:
return self._slither_parser.get_key()
def get_children(self, key="nodes") -> str:
if self.is_compact_ast:
return key
return "children"
@property
def remapping(self) -> Dict[str, str]:
return self._remapping
@property
def is_compact_ast(self) -> bool:
return self._slither_parser.is_compact_ast
# endregion
###################################################################################
###################################################################################
# region SlithIR
###################################################################################
###################################################################################
def _parse_contract_info(self):
if self.is_compact_ast:
attributes = self._data
else:
attributes = self._data["attributes"]
self._contract.is_interface = False
if "contractKind" in attributes:
if attributes["contractKind"] == "interface":
self._contract.is_interface = True
elif attributes["contractKind"] == "library":
self._contract.is_library = True
self._contract.contract_kind = attributes["contractKind"]
self._linearized_base_contracts = attributes["linearizedBaseContracts"]
# self._contract.fullyImplemented = attributes["fullyImplemented"]
# Parse base contract information
self._parse_base_contract_info()
# trufle does some re-mapping of id
if "baseContracts" in self._data:
for elem in self._data["baseContracts"]:
if elem["nodeType"] == "InheritanceSpecifier":
self._remapping[elem["baseName"]["referencedDeclaration"]] = elem["baseName"][
"name"
]
def _parse_base_contract_info(self): # pylint: disable=too-many-branches
# Parse base contracts (immediate, non-linearized)
if self.is_compact_ast:
# Parse base contracts + constructors in compact-ast
if "baseContracts" in self._data:
for base_contract in self._data["baseContracts"]:
if base_contract["nodeType"] != "InheritanceSpecifier":
continue
if (
"baseName" not in base_contract
or "referencedDeclaration" not in base_contract["baseName"]
):
continue
# Obtain our contract reference and add it to our base contract list
referencedDeclaration = base_contract["baseName"]["referencedDeclaration"]
self.baseContracts.append(referencedDeclaration)
# If we have defined arguments in our arguments object, this is a constructor invocation.
# (note: 'arguments' can be [], which is not the same as None. [] implies a constructor was
# called with no arguments, while None implies no constructor was called).
if "arguments" in base_contract and base_contract["arguments"] is not None:
self.baseConstructorContractsCalled.append(referencedDeclaration)
else:
# Parse base contracts + constructors in legacy-ast
if "children" in self._data:
for base_contract in self._data["children"]:
if base_contract["name"] != "InheritanceSpecifier":
continue
if "children" not in base_contract or len(base_contract["children"]) == 0:
continue
# Obtain all items for this base contract specification (base contract, followed by arguments)
base_contract_items = base_contract["children"]
if (
"name" not in base_contract_items[0]
or base_contract_items[0]["name"] != "UserDefinedTypeName"
):
continue
if (
"attributes" not in base_contract_items[0]
or "referencedDeclaration" not in base_contract_items[0]["attributes"]
):
continue
# Obtain our contract reference and add it to our base contract list
referencedDeclaration = base_contract_items[0]["attributes"][
"referencedDeclaration"
]
self.baseContracts.append(referencedDeclaration)
# If we have an 'attributes'->'arguments' which is None, this is not a constructor call.
if (
"attributes" not in base_contract
or "arguments" not in base_contract["attributes"]
or base_contract["attributes"]["arguments"] is not None
):
self.baseConstructorContractsCalled.append(referencedDeclaration)
def _parse_contract_items(self):
# pylint: disable=too-many-branches
if not self.get_children() in self._data: # empty contract
return
for item in self._data[self.get_children()]:
if item[self.get_key()] == "FunctionDefinition":
self._functionsNotParsed.append(item)
elif item[self.get_key()] == "EventDefinition":
self._eventsNotParsed.append(item)
elif item[self.get_key()] == "InheritanceSpecifier":
# we dont need to parse it as it is redundant
# with self.linearizedBaseContracts
continue
elif item[self.get_key()] == "VariableDeclaration":
self._variablesNotParsed.append(item)
elif item[self.get_key()] == "EnumDefinition":
self._enumsNotParsed.append(item)
elif item[self.get_key()] == "ModifierDefinition":
self._modifiersNotParsed.append(item)
elif item[self.get_key()] == "StructDefinition":
self._structuresNotParsed.append(item)
elif item[self.get_key()] == "UsingForDirective":
self._usingForNotParsed.append(item)
elif item[self.get_key()] == "ErrorDefinition":
self._customErrorParsed.append(item)
elif item[self.get_key()] == "UserDefinedValueTypeDefinition":
self._parse_type_alias(item)
else:
raise ParsingError("Unknown contract item: " + item[self.get_key()])
return
def _parse_type_alias(self, item: Dict) -> None:
assert "name" in item
assert "underlyingType" in item
underlying_type = item["underlyingType"]
assert "nodeType" in underlying_type and underlying_type["nodeType"] == "ElementaryTypeName"
assert "name" in underlying_type
original_type = ElementaryType(underlying_type["name"])
# For user defined types defined at the contract level the lookup can be done
# Using the name or the canonical name
# For example during the type parsing the canonical name
# Note that Solidity allows shadowing of user defined types
# Between top level and contract definitions
alias = item["name"]
alias_canonical = self._contract.name + "." + item["name"]
user_defined_type = TypeAliasContract(original_type, alias, self.underlying_contract)
user_defined_type.set_offset(item["src"], self.compilation_unit)
self._contract.file_scope.user_defined_types[alias] = user_defined_type
self._contract.file_scope.user_defined_types[alias_canonical] = user_defined_type
def _parse_struct(self, struct: Dict):
st = StructureContract(self._contract.compilation_unit)
st.set_contract(self._contract)
st.set_offset(struct["src"], self._contract.compilation_unit)
st_parser = StructureContractSolc(st, struct, self)
self._contract.structures_as_dict[st.name] = st
self._structures_parser.append(st_parser)
def parse_structs(self):
for father in self._contract.inheritance_reverse:
self._contract.structures_as_dict.update(father.structures_as_dict)
for struct in self._structuresNotParsed:
self._parse_struct(struct)
self._structuresNotParsed = None
def _parse_custom_error(self, custom_error: Dict):
ce = CustomErrorContract(self.compilation_unit)
ce.set_contract(self._contract)
ce.set_offset(custom_error["src"], self.compilation_unit)
ce_parser = CustomErrorSolc(ce, custom_error, self._slither_parser)
self._contract.custom_errors_as_dict[ce.name] = ce
self._custom_errors_parser.append(ce_parser)
def parse_custom_errors(self):
for father in self._contract.inheritance_reverse:
self._contract.custom_errors_as_dict.update(father.custom_errors_as_dict)
for custom_error in self._customErrorParsed:
self._parse_custom_error(custom_error)
self._customErrorParsed = None
def parse_state_variables(self):
for father in self._contract.inheritance_reverse:
self._contract.variables_as_dict.update(
{
name: v
for name, v in father.variables_as_dict.items()
if v.visibility != "private"
}
)
self._contract.add_variables_ordered(
[
var
for var in father.state_variables_ordered
if var not in self._contract.state_variables_ordered
]
)
for varNotParsed in self._variablesNotParsed:
var = StateVariable()
var.set_offset(varNotParsed["src"], self._contract.compilation_unit)
var.set_contract(self._contract)
var_parser = StateVariableSolc(var, varNotParsed)
self._variables_parser.append(var_parser)
self._contract.variables_as_dict[var.name] = var
self._contract.add_variables_ordered([var])
def _parse_modifier(self, modifier_data: Dict):
modif = Modifier(self._contract.compilation_unit)
modif.set_offset(modifier_data["src"], self._contract.compilation_unit)
modif.set_contract(self._contract)
modif.set_contract_declarer(self._contract)
modif_parser = ModifierSolc(modif, modifier_data, self, self.slither_parser)
self._contract.compilation_unit.add_modifier(modif)
self._modifiers_no_params.append(modif_parser)
self._modifiers_parser.append(modif_parser)
self._slither_parser.add_function_or_modifier_parser(modif_parser)
def parse_modifiers(self):
for modifier in self._modifiersNotParsed:
self._parse_modifier(modifier)
self._modifiersNotParsed = None
def _parse_function(self, function_data: Dict):
func = FunctionContract(self._contract.compilation_unit)
func.set_offset(function_data["src"], self._contract.compilation_unit)
func.set_contract(self._contract)
func.set_contract_declarer(self._contract)
func_parser = FunctionSolc(func, function_data, self, self._slither_parser)
self._contract.compilation_unit.add_function(func)
self._functions_no_params.append(func_parser)
self._functions_parser.append(func_parser)
self._slither_parser.add_function_or_modifier_parser(func_parser)
def parse_functions(self):
for function in self._functionsNotParsed:
self._parse_function(function)
self._functionsNotParsed = None
# endregion
###################################################################################
###################################################################################
# region Analyze
###################################################################################
###################################################################################
def log_incorrect_parsing(self, error: str) -> None:
if self._contract.compilation_unit.core.disallow_partial:
raise ParsingError(error)
LOGGER.error(error)
self._contract.is_incorrectly_constructed = True
def analyze_content_modifiers(self):
try:
for modifier_parser in self._modifiers_parser:
modifier_parser.analyze_content()
except (VariableNotFound, KeyError) as e:
self.log_incorrect_parsing(f"Missing modifier {e}")
def analyze_content_functions(self):
try:
for function_parser in self._functions_parser:
function_parser.analyze_content()
except (VariableNotFound, KeyError, ParsingError) as e:
self.log_incorrect_parsing(f"Missing function {e}")
def analyze_params_modifiers(self):
try:
elements_no_params = self._modifiers_no_params
getter = lambda c: c.modifiers_parser
getter_available = lambda c: c.modifiers_declared
Cls = Modifier
Cls_parser = ModifierSolc
modifiers = self._analyze_params_elements(
elements_no_params,
getter,
getter_available,
Cls,
Cls_parser,
self._modifiers_parser,
)
self._contract.set_modifiers(modifiers)
except (VariableNotFound, KeyError) as e:
self.log_incorrect_parsing(f"Missing params {e}")
self._modifiers_no_params = []
def analyze_params_functions(self):
try:
elements_no_params = self._functions_no_params
getter = lambda c: c.functions_parser
getter_available = lambda c: c.functions_declared
Cls = FunctionContract
Cls_parser = FunctionSolc
functions = self._analyze_params_elements(
elements_no_params,
getter,
getter_available,
Cls,
Cls_parser,
self._functions_parser,
)
self._contract.set_functions(functions)
except (VariableNotFound, KeyError) as e:
self.log_incorrect_parsing(f"Missing params {e}")
self._functions_no_params = []
def _analyze_params_element( # pylint: disable=too-many-arguments
self,
Cls: Callable,
Cls_parser: Callable,
element_parser: FunctionSolc,
explored_reference_id: Set[str],
parser: List[FunctionSolc],
all_elements: Dict[str, Function],
):
elem = Cls(self._contract.compilation_unit)
elem.set_contract(self._contract)
underlying_function = element_parser.underlying_function
# TopLevel function are not analyzed here
assert isinstance(underlying_function, FunctionContract)
elem.set_contract_declarer(underlying_function.contract_declarer)
elem.set_offset(
element_parser.function_not_parsed["src"],
self._contract.compilation_unit,
)
elem_parser = Cls_parser(
elem, element_parser.function_not_parsed, self, self.slither_parser
)
if (
element_parser.underlying_function.id
and element_parser.underlying_function.id in explored_reference_id
):
# Already added from other fathers
return
if element_parser.underlying_function.id:
explored_reference_id.add(element_parser.underlying_function.id)
elem_parser.analyze_params()
if isinstance(elem, Modifier):
self._contract.compilation_unit.add_modifier(elem)
else:
self._contract.compilation_unit.add_function(elem)
self._slither_parser.add_function_or_modifier_parser(elem_parser)
all_elements[elem.canonical_name] = elem
parser.append(elem_parser)
def _analyze_params_elements( # pylint: disable=too-many-arguments,too-many-locals
self,
elements_no_params: List[FunctionSolc],
getter: Callable[["ContractSolc"], List[FunctionSolc]],
getter_available: Callable[[Contract], List[FunctionContract]],
Cls: Callable,
Cls_parser: Callable,
parser: List[FunctionSolc],
) -> Dict[str, Union[FunctionContract, Modifier]]:
"""
Analyze the parameters of the given elements (Function or Modifier).
The function iterates over the inheritance to create an instance or inherited elements (Function or Modifier)
If the element is shadowed, set is_shadowed to True
:param elements_no_params: list of elements to analyzer
:param getter: fun x
:param getter_available: fun x
:param Cls: Class to create for collision
:return:
"""
all_elements = {}
explored_reference_id = set()
try:
for father in self._contract.inheritance:
father_parser = self._slither_parser.underlying_contract_to_parser[father]
for element_parser in getter(father_parser):
self._analyze_params_element(
Cls, Cls_parser, element_parser, explored_reference_id, parser, all_elements
)
accessible_elements = self._contract.available_elements_from_inheritances(
all_elements, getter_available
)
# If there is a constructor in the functions
# We remove the previous constructor
# As only one constructor is present per contracts
#
# Note: contract.all_functions_called returns the constructors of the base contracts
has_constructor = False
for element_parser in elements_no_params:
element_parser.analyze_params()
if element_parser.underlying_function.is_constructor:
has_constructor = True
if has_constructor:
_accessible_functions = {
k: v for (k, v) in accessible_elements.items() if not v.is_constructor
}
for element_parser in elements_no_params:
accessible_elements[
element_parser.underlying_function.full_name
] = element_parser.underlying_function
all_elements[
element_parser.underlying_function.canonical_name
] = element_parser.underlying_function
for element in all_elements.values():
if accessible_elements[element.full_name] != all_elements[element.canonical_name]:
element.is_shadowed = True
accessible_elements[element.full_name].shadows = True
except (VariableNotFound, KeyError) as e:
self.log_incorrect_parsing(f"Missing params {e}")
return all_elements
def analyze_constant_state_variables(self):
for var_parser in self._variables_parser:
if var_parser.underlying_variable.is_constant:
# cant parse constant expression based on function calls
try:
var_parser.analyze(self)
except (VariableNotFound, KeyError) as e:
LOGGER.error(e)
def analyze_state_variables(self):
try:
for var_parser in self._variables_parser:
var_parser.analyze(self)
return
except (VariableNotFound, KeyError) as e:
self.log_incorrect_parsing(f"Missing state variable {e}")
def analyze_using_for(self): # pylint: disable=too-many-branches
try:
for father in self._contract.inheritance:
self._contract.using_for.update(father.using_for)
if self.is_compact_ast:
for using_for in self._usingForNotParsed:
if "typeName" in using_for and using_for["typeName"]:
type_name = parse_type(using_for["typeName"], self)
else:
type_name = "*"
if type_name not in self._contract.using_for:
self._contract.using_for[type_name] = []
if "libraryName" in using_for:
self._contract.using_for[type_name].append(
parse_type(using_for["libraryName"], self)
)
else:
# We have a list of functions. A function can be topLevel or a library function
self._analyze_function_list(using_for["functionList"], type_name)
else:
for using_for in self._usingForNotParsed:
children = using_for[self.get_children()]
assert children and len(children) <= 2
if len(children) == 2:
new = parse_type(children[0], self)
old = parse_type(children[1], self)
else:
new = parse_type(children[0], self)
old = "*"
if old not in self._contract.using_for:
self._contract.using_for[old] = []
self._contract.using_for[old].append(new)
self._usingForNotParsed = []
except (VariableNotFound, KeyError) as e:
self.log_incorrect_parsing(f"Missing using for {e}")
def _analyze_function_list(self, function_list: List, type_name: Type):
for f in function_list:
full_name_split = f["function"]["name"].split(".")
if len(full_name_split) == 1:
# Top level function
function_name = full_name_split[0]
self._analyze_top_level_function(function_name, type_name)
elif len(full_name_split) == 2:
# It can be a top level function behind an aliased import
# or a library function
first_part = full_name_split[0]
function_name = full_name_split[1]
self._check_aliased_import(first_part, function_name, type_name)
else:
# MyImport.MyLib.a we don't care of the alias
library_name = full_name_split[1]
function_name = full_name_split[2]
self._analyze_library_function(library_name, function_name, type_name)
def _check_aliased_import(self, first_part: str, function_name: str, type_name: Type):
# We check if the first part appear as alias for an import
# if it is then function_name must be a top level function
# otherwise it's a library function
for i in self._contract.file_scope.imports:
if i.alias == first_part:
self._analyze_top_level_function(function_name, type_name)
return
self._analyze_library_function(first_part, function_name, type_name)
def _analyze_top_level_function(self, function_name: str, type_name: Type):
for tl_function in self.compilation_unit.functions_top_level:
if tl_function.name == function_name:
self._contract.using_for[type_name].append(tl_function)
def _analyze_library_function(
self, library_name: str, function_name: str, type_name: Type
) -> None:
# Get the library function
found = False
for c in self.compilation_unit.contracts:
if found:
break
if c.name == library_name:
for f in c.functions:
if f.name == function_name:
self._contract.using_for[type_name].append(f)
found = True
break
if not found:
self.log_incorrect_parsing(
f"Contract level using for: Library {library_name} - function {function_name} not found"
)
def analyze_enums(self):
try:
for father in self._contract.inheritance:
self._contract.enums_as_dict.update(father.enums_as_dict)
for enum in self._enumsNotParsed:
# for enum, we can parse and analyze it
# at the same time
self._analyze_enum(enum)
self._enumsNotParsed = None
except (VariableNotFound, KeyError) as e:
self.log_incorrect_parsing(f"Missing enum {e}")
def _analyze_enum(self, enum):
# Enum can be parsed in one pass
if self.is_compact_ast:
name = enum["name"]
canonicalName = enum["canonicalName"]
else:
name = enum["attributes"][self.get_key()]
if "canonicalName" in enum["attributes"]:
canonicalName = enum["attributes"]["canonicalName"]
else:
canonicalName = self._contract.name + "." + name
values = []
for child in enum[self.get_children("members")]:
assert child[self.get_key()] == "EnumValue"
if self.is_compact_ast:
values.append(child["name"])
else:
values.append(child["attributes"][self.get_key()])
new_enum = EnumContract(name, canonicalName, values)
new_enum.set_contract(self._contract)
new_enum.set_offset(enum["src"], self._contract.compilation_unit)
self._contract.enums_as_dict[canonicalName] = new_enum
def _analyze_struct(self, struct: StructureContractSolc): # pylint: disable=no-self-use
struct.analyze()
def analyze_structs(self):
try:
for struct in self._structures_parser:
self._analyze_struct(struct)
except (VariableNotFound, KeyError) as e:
self.log_incorrect_parsing(f"Missing struct {e}")
def analyze_custom_errors(self):
for custom_error in self._custom_errors_parser:
custom_error.analyze_params()
def analyze_events(self):
try:
for father in self._contract.inheritance_reverse:
self._contract.events_as_dict.update(father.events_as_dict)
for event_to_parse in self._eventsNotParsed:
event = Event()
event.set_contract(self._contract)
event.set_offset(event_to_parse["src"], self._contract.compilation_unit)
event_parser = EventSolc(event, event_to_parse, self)
event_parser.analyze(self)
self._contract.events_as_dict[event.full_name] = event
except (VariableNotFound, KeyError) as e:
self.log_incorrect_parsing(f"Missing event {e}")
self._eventsNotParsed = None
# endregion
###################################################################################
###################################################################################
# region Internal
###################################################################################
###################################################################################
def delete_content(self):
"""
Remove everything not parsed from the contract
This is used only if something went wrong with the inheritance parsing
:return:
"""
self._functionsNotParsed = []
self._modifiersNotParsed = []
self._functions_no_params = []
self._modifiers_no_params = []
self._eventsNotParsed = []
self._variablesNotParsed = []
self._enumsNotParsed = []
self._structuresNotParsed = []
self._usingForNotParsed = []
self._customErrorParsed = []
def _handle_comment(self, attributes: Dict) -> None:
if (
"documentation" in attributes
and attributes["documentation"] is not None
and "text" in attributes["documentation"]
):
candidates = attributes["documentation"]["text"].replace("\n", ",").split(",")
for candidate in candidates:
if "@custom:security isDelegatecallProxy" in candidate:
self._contract.is_upgradeable_proxy = True
if "@custom:security isUpgradeable" in candidate:
self._contract.is_upgradeable = True
version_name = re.search(r"@custom:version name=([\w-]+)", candidate)
if version_name:
self._contract.upgradeable_version = version_name.group(1)
# endregion
###################################################################################
###################################################################################
# region Built in definitions
###################################################################################
###################################################################################
def __hash__(self):
return self._contract.id
# endregion
| 34,641 | Python | .py | 681 | 38.81351 | 117 | 0.575553 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,105 | expression_to_slithir.py | NioTheFirst_ScType/slither/visitors/slithir/expression_to_slithir.py | import logging
from typing import List
from slither.core.declarations import (
Function,
SolidityVariable,
SolidityVariableComposed,
SolidityFunction,
Contract,
)
from slither.core.declarations.enum import Enum
from slither.core.expressions import (
AssignmentOperationType,
UnaryOperationType,
BinaryOperationType,
ElementaryTypeNameExpression,
CallExpression,
Identifier,
MemberAccess,
)
from slither.core.solidity_types import ArrayType, ElementaryType, TypeAlias
from slither.core.solidity_types.type import Type
from slither.core.variables.local_variable_init_from_tuple import LocalVariableInitFromTuple
from slither.core.variables.variable import Variable
from slither.slithir.exceptions import SlithIRError
from slither.slithir.operations import (
Assignment,
Binary,
BinaryType,
Delete,
Index,
InitArray,
InternalCall,
Member,
TypeConversion,
Unary,
Unpack,
Return,
SolidityCall,
Operation,
)
from slither.slithir.tmp_operations.argument import Argument
from slither.slithir.tmp_operations.tmp_call import TmpCall
from slither.slithir.tmp_operations.tmp_new_array import TmpNewArray
from slither.slithir.tmp_operations.tmp_new_contract import TmpNewContract
from slither.slithir.tmp_operations.tmp_new_elementary_type import TmpNewElementaryType
from slither.slithir.variables import (
Constant,
ReferenceVariable,
TemporaryVariable,
TupleVariable,
)
from slither.visitors.expression.expression import ExpressionVisitor
logger = logging.getLogger("VISTIOR:ExpressionToSlithIR")
key = "expressionToSlithIR"
def get(expression):
val = expression.context[key]
# we delete the item to reduce memory use
del expression.context[key]
return val
def get_without_removing(expression):
return expression.context[key]
def set_val(expression, val):
expression.context[key] = val
_binary_to_binary = {
BinaryOperationType.POWER: BinaryType.POWER,
BinaryOperationType.MULTIPLICATION: BinaryType.MULTIPLICATION,
BinaryOperationType.DIVISION: BinaryType.DIVISION,
BinaryOperationType.MODULO: BinaryType.MODULO,
BinaryOperationType.ADDITION: BinaryType.ADDITION,
BinaryOperationType.SUBTRACTION: BinaryType.SUBTRACTION,
BinaryOperationType.LEFT_SHIFT: BinaryType.LEFT_SHIFT,
BinaryOperationType.RIGHT_SHIFT: BinaryType.RIGHT_SHIFT,
BinaryOperationType.AND: BinaryType.AND,
BinaryOperationType.CARET: BinaryType.CARET,
BinaryOperationType.OR: BinaryType.OR,
BinaryOperationType.LESS: BinaryType.LESS,
BinaryOperationType.GREATER: BinaryType.GREATER,
BinaryOperationType.LESS_EQUAL: BinaryType.LESS_EQUAL,
BinaryOperationType.GREATER_EQUAL: BinaryType.GREATER_EQUAL,
BinaryOperationType.EQUAL: BinaryType.EQUAL,
BinaryOperationType.NOT_EQUAL: BinaryType.NOT_EQUAL,
BinaryOperationType.ANDAND: BinaryType.ANDAND,
BinaryOperationType.OROR: BinaryType.OROR,
}
_signed_to_unsigned = {
BinaryOperationType.DIVISION_SIGNED: BinaryType.DIVISION,
BinaryOperationType.MODULO_SIGNED: BinaryType.MODULO,
BinaryOperationType.LESS_SIGNED: BinaryType.LESS,
BinaryOperationType.GREATER_SIGNED: BinaryType.GREATER,
BinaryOperationType.RIGHT_SHIFT_ARITHMETIC: BinaryType.RIGHT_SHIFT,
}
def convert_assignment(left, right, t, return_type):
if t == AssignmentOperationType.ASSIGN:
return Assignment(left, right, return_type)
if t == AssignmentOperationType.ASSIGN_OR:
return Binary(left, left, right, BinaryType.OR)
if t == AssignmentOperationType.ASSIGN_CARET:
return Binary(left, left, right, BinaryType.CARET)
if t == AssignmentOperationType.ASSIGN_AND:
return Binary(left, left, right, BinaryType.AND)
if t == AssignmentOperationType.ASSIGN_LEFT_SHIFT:
return Binary(left, left, right, BinaryType.LEFT_SHIFT)
if t == AssignmentOperationType.ASSIGN_RIGHT_SHIFT:
return Binary(left, left, right, BinaryType.RIGHT_SHIFT)
if t == AssignmentOperationType.ASSIGN_ADDITION:
return Binary(left, left, right, BinaryType.ADDITION)
if t == AssignmentOperationType.ASSIGN_SUBTRACTION:
return Binary(left, left, right, BinaryType.SUBTRACTION)
if t == AssignmentOperationType.ASSIGN_MULTIPLICATION:
return Binary(left, left, right, BinaryType.MULTIPLICATION)
if t == AssignmentOperationType.ASSIGN_DIVISION:
return Binary(left, left, right, BinaryType.DIVISION)
if t == AssignmentOperationType.ASSIGN_MODULO:
return Binary(left, left, right, BinaryType.MODULO)
raise SlithIRError("Missing type during assignment conversion")
class ExpressionToSlithIR(ExpressionVisitor):
def __init__(self, expression, node): # pylint: disable=super-init-not-called
from slither.core.cfg.node import NodeType # pylint: disable=import-outside-toplevel
self._expression = expression
self._node = node
self._result: List[Operation] = []
self._visit_expression(self.expression)
if node.type == NodeType.RETURN:
r = Return(get(self.expression))
r.set_expression(expression)
self._result.append(r)
for ir in self._result:
ir.set_node(node)
def result(self):
return self._result
def _post_assignement_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
if isinstance(left, list): # tuple expression:
if isinstance(right, list): # unbox assigment
assert len(left) == len(right)
for idx, _ in enumerate(left):
if not left[idx] is None:
operation = convert_assignment(
left[idx],
right[idx],
expression.type,
expression.expression_return_type,
)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, None)
else:
assert isinstance(right, TupleVariable)
for idx, _ in enumerate(left):
if not left[idx] is None:
index = idx
# The following test is probably always true?
if (
isinstance(left[idx], LocalVariableInitFromTuple)
and left[idx].tuple_index is not None
):
index = left[idx].tuple_index
operation = Unpack(left[idx], right, index)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, None)
# Tuple with only one element. We need to convert the assignment to a Unpack
# Ex:
# (uint a,,) = g()
elif (
isinstance(left, LocalVariableInitFromTuple)
and left.tuple_index is not None
and isinstance(right, TupleVariable)
):
operation = Unpack(left, right, left.tuple_index)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, None)
else:
# Init of array, like
# uint8[2] var = [1,2];
if isinstance(right, list):
operation = InitArray(right, left)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, left)
else:
operation = convert_assignment(
left, right, expression.type, expression.expression_return_type
)
operation.set_expression(expression)
self._result.append(operation)
# Return left to handle
# a = b = 1;
set_val(expression, left)
def _post_binary_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = TemporaryVariable(self._node)
if expression.type in _signed_to_unsigned:
new_left = TemporaryVariable(self._node)
conv_left = TypeConversion(new_left, left, ElementaryType("int256"))
new_left.set_type(ElementaryType("int256"))
conv_left.set_expression(expression)
self._result.append(conv_left)
if expression.type != BinaryOperationType.RIGHT_SHIFT_ARITHMETIC:
new_right = TemporaryVariable(self._node)
conv_right = TypeConversion(new_right, right, ElementaryType("int256"))
new_right.set_type(ElementaryType("int256"))
conv_right.set_expression(expression)
self._result.append(conv_right)
else:
new_right = right
new_final = TemporaryVariable(self._node)
operation = Binary(new_final, new_left, new_right, _signed_to_unsigned[expression.type])
operation.set_expression(expression)
self._result.append(operation)
conv_final = TypeConversion(val, new_final, ElementaryType("uint256"))
val.set_type(ElementaryType("uint256"))
conv_final.set_expression(expression)
self._result.append(conv_final)
else:
operation = Binary(val, left, right, _binary_to_binary[expression.type])
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, val)
def _post_call_expression(
self, expression
): # pylint: disable=too-many-branches,too-many-statements,too-many-locals
assert isinstance(expression, CallExpression)
expression_called = expression.called
called = get(expression_called)
args = [get(a) for a in expression.arguments if a]
for arg in args:
arg_ = Argument(arg)
arg_.set_expression(expression)
self._result.append(arg_)
if isinstance(called, Function):
# internal call
# If tuple
if expression.type_call.startswith("tuple(") and expression.type_call != "tuple()":
val = TupleVariable(self._node)
else:
val = TemporaryVariable(self._node)
internal_call = InternalCall(called, len(args), val, expression.type_call)
internal_call.set_expression(expression)
self._result.append(internal_call)
set_val(expression, val)
# User defined types
elif (
isinstance(called, TypeAlias)
and isinstance(expression_called, MemberAccess)
and expression_called.member_name in ["wrap", "unwrap"]
and len(args) == 1
):
# wrap: underlying_type -> alias
# unwrap: alias -> underlying_type
dest_type = (
called if expression_called.member_name == "wrap" else called.underlying_type
)
val = TemporaryVariable(self._node)
var = TypeConversion(val, args[0], dest_type)
var.set_expression(expression)
val.set_type(dest_type)
self._result.append(var)
set_val(expression, val)
# yul things
elif called.name == "caller()":
val = TemporaryVariable(self._node)
var = Assignment(val, SolidityVariableComposed("msg.sender"), "uint256")
self._result.append(var)
set_val(expression, val)
elif called.name == "origin()":
val = TemporaryVariable(self._node)
var = Assignment(val, SolidityVariableComposed("tx.origin"), "uint256")
self._result.append(var)
set_val(expression, val)
elif called.name == "extcodesize(uint256)":
val = ReferenceVariable(self._node)
var = Member(args[0], Constant("codesize"), val)
self._result.append(var)
set_val(expression, val)
elif called.name == "selfbalance()":
val = TemporaryVariable(self._node)
var = TypeConversion(val, SolidityVariable("this"), ElementaryType("address"))
val.set_type(ElementaryType("address"))
self._result.append(var)
val1 = ReferenceVariable(self._node)
var1 = Member(val, Constant("balance"), val1)
self._result.append(var1)
set_val(expression, val1)
elif called.name == "address()":
val = TemporaryVariable(self._node)
var = TypeConversion(val, SolidityVariable("this"), ElementaryType("address"))
val.set_type(ElementaryType("address"))
self._result.append(var)
set_val(expression, val)
elif called.name == "callvalue()":
val = TemporaryVariable(self._node)
var = Assignment(val, SolidityVariableComposed("msg.value"), "uint256")
self._result.append(var)
set_val(expression, val)
else:
# If tuple
if expression.type_call.startswith("tuple(") and expression.type_call != "tuple()":
val = TupleVariable(self._node)
else:
val = TemporaryVariable(self._node)
message_call = TmpCall(called, len(args), val, expression.type_call)
message_call.set_expression(expression)
# Gas/value are only accessible here if the syntax {gas: , value: }
# Is used over .gas().value()
if expression.call_gas:
call_gas = get(expression.call_gas)
message_call.call_gas = call_gas
if expression.call_value:
call_value = get(expression.call_value)
message_call.call_value = call_value
if expression.call_salt:
call_salt = get(expression.call_salt)
message_call.call_salt = call_salt
self._result.append(message_call)
set_val(expression, val)
def _post_conditional_expression(self, expression):
raise Exception(f"Ternary operator are not convertible to SlithIR {expression}")
def _post_elementary_type_name_expression(self, expression):
set_val(expression, expression.type)
def _post_identifier(self, expression):
set_val(expression, expression.value)
def _post_index_access(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
# Left can be a type for abi.decode(var, uint[2])
if isinstance(left, Type):
# Nested type are not yet supported by abi.decode, so the assumption
# Is that the right variable must be a constant
assert isinstance(right, Constant)
t = ArrayType(left, right.value)
set_val(expression, t)
return
val = ReferenceVariable(self._node)
# access to anonymous array
# such as [0,1][x]
if isinstance(left, list):
init_array_val = TemporaryVariable(self._node)
init_array_right = left
left = init_array_val
operation = InitArray(init_array_right, init_array_val)
operation.set_expression(expression)
self._result.append(operation)
operation = Index(val, left, right, expression.type)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, val)
def _post_literal(self, expression):
cst = Constant(expression.value, expression.type, expression.subdenomination)
set_val(expression, cst)
def _post_member_access(self, expression):
expr = get(expression.expression)
# Look for type(X).max / min
# Because we looked at the AST structure, we need to look into the nested expression
# Hopefully this is always on a direct sub field, and there is no weird construction
if isinstance(expression.expression, CallExpression) and expression.member_name in [
"min",
"max",
]:
if isinstance(expression.expression.called, Identifier):
if expression.expression.called.value == SolidityFunction("type()"):
assert len(expression.expression.arguments) == 1
val = TemporaryVariable(self._node)
type_expression_found = expression.expression.arguments[0]
if isinstance(type_expression_found, ElementaryTypeNameExpression):
type_found = type_expression_found.type
constant_type = type_found
else:
# type(enum).max/min
assert isinstance(type_expression_found, Identifier)
type_found = type_expression_found.value
assert isinstance(type_found, Enum)
constant_type = None
if expression.member_name == "min":
op = Assignment(
val,
Constant(str(type_found.min), constant_type),
type_found,
)
else:
op = Assignment(
val,
Constant(str(type_found.max), constant_type),
type_found,
)
self._result.append(op)
set_val(expression, val)
return
# This does not support solidity 0.4 contract_name.balance
if (
isinstance(expr, Variable)
and expr.type == ElementaryType("address")
and expression.member_name in ["balance", "code", "codehash"]
):
val = TemporaryVariable(self._node)
name = expression.member_name + "(address)"
sol_func = SolidityFunction(name)
s = SolidityCall(
sol_func,
1,
val,
sol_func.return_type,
)
s.set_expression(expression)
s.arguments.append(expr)
self._result.append(s)
set_val(expression, val)
return
if isinstance(expr, TypeAlias) and expression.member_name in ["wrap", "unwrap"]:
# The logic is be handled by _post_call_expression
set_val(expression, expr)
return
if isinstance(expr, Contract):
# Early lookup to detect user defined types from other contracts definitions
# contract A { type MyInt is int}
# contract B { function f() public{ A.MyInt test = A.MyInt.wrap(1);}}
# The logic is handled by _post_call_expression
if expression.member_name in expr.file_scope.user_defined_types:
set_val(expression, expr.file_scope.user_defined_types[expression.member_name])
return
# Lookup errors referred to as member of contract e.g. Test.myError.selector
if expression.member_name in expr.custom_errors_as_dict:
set_val(expression, expr.custom_errors_as_dict[expression.member_name])
return
val = ReferenceVariable(self._node)
member = Member(expr, Constant(expression.member_name), val)
member.set_expression(expression)
self._result.append(member)
set_val(expression, val)
def _post_new_array(self, expression):
val = TemporaryVariable(self._node)
operation = TmpNewArray(expression.depth, expression.array_type, val)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, val)
def _post_new_contract(self, expression):
val = TemporaryVariable(self._node)
operation = TmpNewContract(expression.contract_name, val)
operation.set_expression(expression)
if expression.call_value:
call_value = get(expression.call_value)
operation.call_value = call_value
if expression.call_salt:
call_salt = get(expression.call_salt)
operation.call_salt = call_salt
self._result.append(operation)
set_val(expression, val)
def _post_new_elementary_type(self, expression):
# TODO unclear if this is ever used?
val = TemporaryVariable(self._node)
operation = TmpNewElementaryType(expression.type, val)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, val)
def _post_tuple_expression(self, expression):
expressions = [get(e) if e else None for e in expression.expressions]
if len(expressions) == 1:
val = expressions[0]
else:
val = expressions
set_val(expression, val)
def _post_type_conversion(self, expression):
expr = get(expression.expression)
val = TemporaryVariable(self._node)
operation = TypeConversion(val, expr, expression.type)
val.set_type(expression.type)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, val)
def _post_unary_operation(
self, expression
): # pylint: disable=too-many-branches,too-many-statements
value = get(expression.expression)
if expression.type in [UnaryOperationType.BANG, UnaryOperationType.TILD]:
lvalue = TemporaryVariable(self._node)
operation = Unary(lvalue, value, expression.type)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, lvalue)
elif expression.type in [UnaryOperationType.DELETE]:
operation = Delete(value, value)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, value)
elif expression.type in [UnaryOperationType.PLUSPLUS_PRE]:
operation = Binary(value, value, Constant("1", value.type), BinaryType.ADDITION)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, value)
elif expression.type in [UnaryOperationType.MINUSMINUS_PRE]:
operation = Binary(value, value, Constant("1", value.type), BinaryType.SUBTRACTION)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, value)
elif expression.type in [UnaryOperationType.PLUSPLUS_POST]:
lvalue = TemporaryVariable(self._node)
operation = Assignment(lvalue, value, value.type)
operation.set_expression(expression)
self._result.append(operation)
operation = Binary(value, value, Constant("1", value.type), BinaryType.ADDITION)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, lvalue)
elif expression.type in [UnaryOperationType.MINUSMINUS_POST]:
lvalue = TemporaryVariable(self._node)
operation = Assignment(lvalue, value, value.type)
operation.set_expression(expression)
self._result.append(operation)
operation = Binary(value, value, Constant("1", value.type), BinaryType.SUBTRACTION)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, lvalue)
elif expression.type in [UnaryOperationType.PLUS_PRE]:
set_val(expression, value)
elif expression.type in [UnaryOperationType.MINUS_PRE]:
lvalue = TemporaryVariable(self._node)
operation = Binary(lvalue, Constant("0", value.type), value, BinaryType.SUBTRACTION)
operation.set_expression(expression)
self._result.append(operation)
set_val(expression, lvalue)
else:
raise SlithIRError(f"Unary operation to IR not supported {expression}")
| 24,488 | Python | .py | 525 | 35.207619 | 100 | 0.627447 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,106 | left_value.py | NioTheFirst_ScType/slither/visitors/expression/left_value.py | # Return the 'left' value of an expression
from slither.visitors.expression.expression import ExpressionVisitor
from slither.core.expressions.assignment_operation import AssignmentOperationType
from slither.core.variables.variable import Variable
key = "LeftValue"
def get(expression):
val = expression.context[key]
# we delete the item to reduce memory use
del expression.context[key]
return val
def set_val(expression, val):
expression.context[key] = val
class LeftValue(ExpressionVisitor):
def result(self):
if self._result is None:
self._result = list(set(get(self.expression)))
return self._result
# overide index access visitor to explore only left part
def _visit_index_access(self, expression):
self._visit_expression(expression.expression_left)
def _post_assignement_operation(self, expression):
if expression.type != AssignmentOperationType.ASSIGN:
left = get(expression.expression_left)
else:
left = []
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_binary_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_call_expression(self, expression):
called = get(expression.called)
args = [get(a) for a in expression.arguments if a]
args = [item for sublist in args for item in sublist]
val = called + args
set_val(expression, val)
def _post_conditional_expression(self, expression):
if_expr = get(expression.if_expression)
else_expr = get(expression.else_expression)
then_expr = get(expression.then_expression)
val = if_expr + else_expr + then_expr
set_val(expression, val)
def _post_elementary_type_name_expression(self, expression):
set_val(expression, [])
# save only identifier expression
def _post_identifier(self, expression):
if isinstance(expression.value, Variable):
set_val(expression, [expression.value])
# elif isinstance(expression.value, SolidityInbuilt):
# set_val(expression, [expression])
else:
set_val(expression, [])
def _post_index_access(self, expression):
left = get(expression.expression_left)
val = left
set_val(expression, val)
def _post_literal(self, expression):
set_val(expression, [])
def _post_member_access(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
def _post_new_array(self, expression):
set_val(expression, [])
def _post_new_contract(self, expression):
set_val(expression, [])
def _post_new_elementary_type(self, expression):
set_val(expression, [])
def _post_tuple_expression(self, expression):
expressions = [get(e) for e in expression.expressions if e]
val = [item for sublist in expressions for item in sublist]
set_val(expression, val)
def _post_type_conversion(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
def _post_unary_operation(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
| 3,483 | Python | .py | 83 | 34.337349 | 81 | 0.667161 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,107 | find_push.py | NioTheFirst_ScType/slither/visitors/expression/find_push.py | from slither.visitors.expression.expression import ExpressionVisitor
from slither.visitors.expression.right_value import RightValue
key = "FindPush"
def get(expression):
val = expression.context[key]
# we delete the item to reduce memory use
del expression.context[key]
return val
def set_val(expression, val):
expression.context[key] = val
class FindPush(ExpressionVisitor):
def result(self):
if self._result is None:
self._result = list(set(get(self.expression)))
return self._result
def _post_assignement_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_binary_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_call_expression(self, expression):
called = get(expression.called)
args = [get(a) for a in expression.arguments if a]
args = [item for sublist in args for item in sublist]
val = called + args
set_val(expression, val)
def _post_conditional_expression(self, expression):
if_expr = get(expression.if_expression)
else_expr = get(expression.else_expression)
then_expr = get(expression.then_expression)
val = if_expr + else_expr + then_expr
set_val(expression, val)
def _post_elementary_type_name_expression(self, expression):
set_val(expression, [])
# save only identifier expression
def _post_identifier(self, expression):
set_val(expression, [])
def _post_index_access(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_literal(self, expression):
set_val(expression, [])
def _post_member_access(self, expression):
val = []
if expression.member_name == "push":
right = RightValue(expression.expression)
val = right.result()
set_val(expression, val)
def _post_new_array(self, expression):
set_val(expression, [])
def _post_new_contract(self, expression):
set_val(expression, [])
def _post_new_elementary_type(self, expression):
set_val(expression, [])
def _post_tuple_expression(self, expression):
expressions = [get(e) for e in expression.expressions if e]
val = [item for sublist in expressions for item in sublist]
set_val(expression, val)
def _post_type_conversion(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
def _post_unary_operation(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
| 2,994 | Python | .py | 73 | 33.39726 | 68 | 0.662181 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,108 | find_calls.py | NioTheFirst_ScType/slither/visitors/expression/find_calls.py | from typing import List
from slither.core.expressions.expression import Expression
from slither.visitors.expression.expression import ExpressionVisitor
key = "FindCall"
def get(expression):
val = expression.context[key]
# we delete the item to reduce memory use
del expression.context[key]
return val
def set_val(expression, val):
expression.context[key] = val
class FindCalls(ExpressionVisitor):
def result(self) -> List[Expression]:
if self._result is None:
self._result = list(set(get(self.expression)))
return self._result
def _post_assignement_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_binary_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_call_expression(self, expression):
called = get(expression.called)
args = [get(a) for a in expression.arguments if a]
args = [item for sublist in args for item in sublist]
val = called + args
val += [expression]
set_val(expression, val)
def _post_conditional_expression(self, expression):
if_expr = get(expression.if_expression)
else_expr = get(expression.else_expression)
then_expr = get(expression.then_expression)
val = if_expr + else_expr + then_expr
set_val(expression, val)
def _post_elementary_type_name_expression(self, expression):
set_val(expression, [])
# save only identifier expression
def _post_identifier(self, expression):
set_val(expression, [])
def _post_index_access(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_literal(self, expression):
set_val(expression, [])
def _post_member_access(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
def _post_new_array(self, expression):
set_val(expression, [])
def _post_new_contract(self, expression):
set_val(expression, [])
def _post_new_elementary_type(self, expression):
set_val(expression, [])
def _post_tuple_expression(self, expression):
expressions = [get(e) for e in expression.expressions if e]
val = [item for sublist in expressions for item in sublist]
set_val(expression, val)
def _post_type_conversion(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
def _post_unary_operation(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
| 2,975 | Python | .py | 73 | 33.356164 | 68 | 0.666898 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,109 | expression.py | NioTheFirst_ScType/slither/visitors/expression/expression.py | import logging
from typing import Any
from slither.core.expressions.assignment_operation import AssignmentOperation
from slither.core.expressions.binary_operation import BinaryOperation
from slither.core.expressions.call_expression import CallExpression
from slither.core.expressions.conditional_expression import ConditionalExpression
from slither.core.expressions.elementary_type_name_expression import ElementaryTypeNameExpression
from slither.core.expressions.expression import Expression
from slither.core.expressions.identifier import Identifier
from slither.core.expressions.index_access import IndexAccess
from slither.core.expressions.literal import Literal
from slither.core.expressions.member_access import MemberAccess
from slither.core.expressions.new_array import NewArray
from slither.core.expressions.new_contract import NewContract
from slither.core.expressions.new_elementary_type import NewElementaryType
from slither.core.expressions.tuple_expression import TupleExpression
from slither.core.expressions.type_conversion import TypeConversion
from slither.core.expressions.unary_operation import UnaryOperation
from slither.exceptions import SlitherError
logger = logging.getLogger("ExpressionVisitor")
class ExpressionVisitor:
def __init__(self, expression: Expression):
# Inherited class must declared their variables prior calling super().__init__
self._expression = expression
self._result: Any = None
self._visit_expression(self.expression)
def result(self):
return self._result
@property
def expression(self) -> Expression:
return self._expression
# visit an expression
# call pre_visit, visit_expression_name, post_visit
def _visit_expression(self, expression: Expression): # pylint: disable=too-many-branches
self._pre_visit(expression)
if isinstance(expression, AssignmentOperation):
self._visit_assignement_operation(expression)
elif isinstance(expression, BinaryOperation):
self._visit_binary_operation(expression)
elif isinstance(expression, CallExpression):
self._visit_call_expression(expression)
elif isinstance(expression, ConditionalExpression):
self._visit_conditional_expression(expression)
elif isinstance(expression, ElementaryTypeNameExpression):
self._visit_elementary_type_name_expression(expression)
elif isinstance(expression, Identifier):
self._visit_identifier(expression)
elif isinstance(expression, IndexAccess):
self._visit_index_access(expression)
elif isinstance(expression, Literal):
self._visit_literal(expression)
elif isinstance(expression, MemberAccess):
self._visit_member_access(expression)
elif isinstance(expression, NewArray):
self._visit_new_array(expression)
elif isinstance(expression, NewContract):
self._visit_new_contract(expression)
elif isinstance(expression, NewElementaryType):
self._visit_new_elementary_type(expression)
elif isinstance(expression, TupleExpression):
self._visit_tuple_expression(expression)
elif isinstance(expression, TypeConversion):
self._visit_type_conversion(expression)
elif isinstance(expression, UnaryOperation):
self._visit_unary_operation(expression)
elif expression is None:
pass
else:
raise SlitherError(f"Expression not handled: {expression}")
self._post_visit(expression)
# visit_expression_name
def _visit_assignement_operation(self, expression):
self._visit_expression(expression.expression_left)
self._visit_expression(expression.expression_right)
def _visit_binary_operation(self, expression):
self._visit_expression(expression.expression_left)
self._visit_expression(expression.expression_right)
def _visit_call_expression(self, expression):
self._visit_expression(expression.called)
for arg in expression.arguments:
if arg:
self._visit_expression(arg)
if expression.call_value:
self._visit_expression(expression.call_value)
if expression.call_gas:
self._visit_expression(expression.call_gas)
if expression.call_salt:
self._visit_expression(expression.call_salt)
def _visit_conditional_expression(self, expression):
self._visit_expression(expression.if_expression)
self._visit_expression(expression.else_expression)
self._visit_expression(expression.then_expression)
def _visit_elementary_type_name_expression(self, expression):
pass
def _visit_identifier(self, expression):
pass
def _visit_index_access(self, expression):
self._visit_expression(expression.expression_left)
self._visit_expression(expression.expression_right)
def _visit_literal(self, expression):
pass
def _visit_member_access(self, expression):
self._visit_expression(expression.expression)
def _visit_new_array(self, expression):
pass
def _visit_new_contract(self, expression):
pass
def _visit_new_elementary_type(self, expression):
pass
def _visit_tuple_expression(self, expression):
for e in expression.expressions:
if e:
self._visit_expression(e)
def _visit_type_conversion(self, expression):
self._visit_expression(expression.expression)
def _visit_unary_operation(self, expression):
self._visit_expression(expression.expression)
# pre visit
def _pre_visit(self, expression): # pylint: disable=too-many-branches
if isinstance(expression, AssignmentOperation):
self._pre_assignement_operation(expression)
elif isinstance(expression, BinaryOperation):
self._pre_binary_operation(expression)
elif isinstance(expression, CallExpression):
self._pre_call_expression(expression)
elif isinstance(expression, ConditionalExpression):
self._pre_conditional_expression(expression)
elif isinstance(expression, ElementaryTypeNameExpression):
self._pre_elementary_type_name_expression(expression)
elif isinstance(expression, Identifier):
self._pre_identifier(expression)
elif isinstance(expression, IndexAccess):
self._pre_index_access(expression)
elif isinstance(expression, Literal):
self._pre_literal(expression)
elif isinstance(expression, MemberAccess):
self._pre_member_access(expression)
elif isinstance(expression, NewArray):
self._pre_new_array(expression)
elif isinstance(expression, NewContract):
self._pre_new_contract(expression)
elif isinstance(expression, NewElementaryType):
self._pre_new_elementary_type(expression)
elif isinstance(expression, TupleExpression):
self._pre_tuple_expression(expression)
elif isinstance(expression, TypeConversion):
self._pre_type_conversion(expression)
elif isinstance(expression, UnaryOperation):
self._pre_unary_operation(expression)
elif expression is None:
pass
else:
raise SlitherError(f"Expression not handled: {expression}")
# pre_expression_name
def _pre_assignement_operation(self, expression):
pass
def _pre_binary_operation(self, expression):
pass
def _pre_call_expression(self, expression):
pass
def _pre_conditional_expression(self, expression):
pass
def _pre_elementary_type_name_expression(self, expression):
pass
def _pre_identifier(self, expression):
pass
def _pre_index_access(self, expression):
pass
def _pre_literal(self, expression):
pass
def _pre_member_access(self, expression):
pass
def _pre_new_array(self, expression):
pass
def _pre_new_contract(self, expression):
pass
def _pre_new_elementary_type(self, expression):
pass
def _pre_tuple_expression(self, expression):
pass
def _pre_type_conversion(self, expression):
pass
def _pre_unary_operation(self, expression):
pass
# post visit
def _post_visit(self, expression): # pylint: disable=too-many-branches
if isinstance(expression, AssignmentOperation):
self._post_assignement_operation(expression)
elif isinstance(expression, BinaryOperation):
self._post_binary_operation(expression)
elif isinstance(expression, CallExpression):
self._post_call_expression(expression)
elif isinstance(expression, ConditionalExpression):
self._post_conditional_expression(expression)
elif isinstance(expression, ElementaryTypeNameExpression):
self._post_elementary_type_name_expression(expression)
elif isinstance(expression, Identifier):
self._post_identifier(expression)
elif isinstance(expression, IndexAccess):
self._post_index_access(expression)
elif isinstance(expression, Literal):
self._post_literal(expression)
elif isinstance(expression, MemberAccess):
self._post_member_access(expression)
elif isinstance(expression, NewArray):
self._post_new_array(expression)
elif isinstance(expression, NewContract):
self._post_new_contract(expression)
elif isinstance(expression, NewElementaryType):
self._post_new_elementary_type(expression)
elif isinstance(expression, TupleExpression):
self._post_tuple_expression(expression)
elif isinstance(expression, TypeConversion):
self._post_type_conversion(expression)
elif isinstance(expression, UnaryOperation):
self._post_unary_operation(expression)
elif expression is None:
pass
else:
raise SlitherError(f"Expression not handled: {expression}")
# post_expression_name
def _post_assignement_operation(self, expression):
pass
def _post_binary_operation(self, expression):
pass
def _post_call_expression(self, expression):
pass
def _post_conditional_expression(self, expression):
pass
def _post_elementary_type_name_expression(self, expression):
pass
def _post_identifier(self, expression):
pass
def _post_index_access(self, expression):
pass
def _post_literal(self, expression):
pass
def _post_member_access(self, expression):
pass
def _post_new_array(self, expression):
pass
def _post_new_contract(self, expression):
pass
def _post_new_elementary_type(self, expression):
pass
def _post_tuple_expression(self, expression):
pass
def _post_type_conversion(self, expression):
pass
def _post_unary_operation(self, expression):
pass
| 11,301 | Python | .py | 251 | 36.243028 | 97 | 0.700302 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,110 | right_value.py | NioTheFirst_ScType/slither/visitors/expression/right_value.py | # Return the 'right' value of an expression
# On index access, explore the left
# on member access, return the member_name
# a.b.c[d] returns c
from slither.visitors.expression.expression import ExpressionVisitor
from slither.core.expressions.assignment_operation import AssignmentOperationType
from slither.core.expressions.expression import Expression
from slither.core.variables.variable import Variable
key = "RightValue"
def get(expression):
val = expression.context[key]
# we delete the item to reduce memory use
del expression.context[key]
return val
def set_val(expression, val):
expression.context[key] = val
class RightValue(ExpressionVisitor):
def result(self):
if self._result is None:
self._result = list(set(get(self.expression)))
return self._result
# overide index access visitor to explore only left part
def _visit_index_access(self, expression):
self._visit_expression(expression.expression_left)
def _post_assignement_operation(self, expression):
if expression.type != AssignmentOperationType.ASSIGN:
left = get(expression.expression_left)
else:
left = []
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_binary_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_call_expression(self, expression):
called = get(expression.called)
args = [get(a) for a in expression.arguments if a]
args = [item for sublist in args for item in sublist]
val = called + args
set_val(expression, val)
def _post_conditional_expression(self, expression):
if_expr = get(expression.if_expression)
else_expr = get(expression.else_expression)
then_expr = get(expression.then_expression)
val = if_expr + else_expr + then_expr
set_val(expression, val)
def _post_elementary_type_name_expression(self, expression):
set_val(expression, [])
# save only identifier expression
def _post_identifier(self, expression):
if isinstance(expression.value, Variable):
set_val(expression, [expression.value])
# elif isinstance(expression.value, SolidityInbuilt):
# set_val(expression, [expression])
else:
set_val(expression, [])
def _post_index_access(self, expression):
left = get(expression.expression_left)
val = left
set_val(expression, val)
def _post_literal(self, expression):
set_val(expression, [])
def _post_member_access(self, expression):
val = []
if isinstance(expression.member_name, Expression):
expr = get(expression.member_name)
val = expr
set_val(expression, val)
def _post_new_array(self, expression):
set_val(expression, [])
def _post_new_contract(self, expression):
set_val(expression, [])
def _post_new_elementary_type(self, expression):
set_val(expression, [])
def _post_tuple_expression(self, expression):
expressions = [get(e) for e in expression.expressions if e]
val = [item for sublist in expressions for item in sublist]
set_val(expression, val)
def _post_type_conversion(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
def _post_unary_operation(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
| 3,730 | Python | .py | 89 | 34.460674 | 81 | 0.670263 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,111 | read_var.py | NioTheFirst_ScType/slither/visitors/expression/read_var.py | from slither.visitors.expression.expression import ExpressionVisitor
from slither.core.expressions.assignment_operation import AssignmentOperationType
from slither.core.variables.variable import Variable
from slither.core.declarations.solidity_variables import SolidityVariable
key = "ReadVar"
def get(expression):
val = expression.context[key]
# we delete the item to reduce memory use
del expression.context[key]
return val
def set_val(expression, val):
expression.context[key] = val
class ReadVar(ExpressionVisitor):
def result(self):
if self._result is None:
self._result = list(set(get(self.expression)))
return self._result
# overide assignement
# dont explore if its direct assignement (we explore if its +=, -=, ...)
def _visit_assignement_operation(self, expression):
if expression.type != AssignmentOperationType.ASSIGN:
self._visit_expression(expression.expression_left)
self._visit_expression(expression.expression_right)
def _post_assignement_operation(self, expression):
if expression.type != AssignmentOperationType.ASSIGN:
left = get(expression.expression_left)
else:
left = []
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_binary_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_call_expression(self, expression):
called = get(expression.called)
args = [get(a) for a in expression.arguments if a]
args = [item for sublist in args for item in sublist]
val = called + args
set_val(expression, val)
def _post_conditional_expression(self, expression):
if_expr = get(expression.if_expression)
else_expr = get(expression.else_expression)
then_expr = get(expression.then_expression)
val = if_expr + else_expr + then_expr
set_val(expression, val)
def _post_elementary_type_name_expression(self, expression):
set_val(expression, [])
# save only identifier expression
def _post_identifier(self, expression):
if isinstance(expression.value, Variable):
set_val(expression, [expression])
elif isinstance(expression.value, SolidityVariable):
set_val(expression, [expression])
else:
set_val(expression, [])
def _post_index_access(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right + [expression]
set_val(expression, val)
def _post_literal(self, expression):
set_val(expression, [])
def _post_member_access(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
def _post_new_array(self, expression):
set_val(expression, [])
def _post_new_contract(self, expression):
set_val(expression, [])
def _post_new_elementary_type(self, expression):
set_val(expression, [])
def _post_tuple_expression(self, expression):
expressions = [get(e) for e in expression.expressions if e]
val = [item for sublist in expressions for item in sublist]
set_val(expression, val)
def _post_type_conversion(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
def _post_unary_operation(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
| 3,735 | Python | .py | 87 | 35.206897 | 81 | 0.674027 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,112 | expression_printer.py | NioTheFirst_ScType/slither/visitors/expression/expression_printer.py | from slither.visitors.expression.expression import ExpressionVisitor
def get(expression):
val = expression.context["ExpressionPrinter"]
# we delete the item to reduce memory use
del expression.context["ExpressionPrinter"]
return val
def set_val(expression, val):
expression.context["ExpressionPrinter"] = val
class ExpressionPrinter(ExpressionVisitor):
def result(self):
if not self._result:
self._result = get(self.expression)
return self._result
def _post_assignement_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = f"{left} {expression.type} {right}"
set_val(expression, val)
def _post_binary_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = f"{left} {expression.type} {right}"
set_val(expression, val)
def _post_call_expression(self, expression):
called = get(expression.called)
arguments = ",".join([get(x) for x in expression.arguments if x])
val = f"{called}({arguments})"
set_val(expression, val)
def _post_conditional_expression(self, expression):
if_expr = get(expression.if_expression)
else_expr = get(expression.else_expression)
then_expr = get(expression.then_expression)
val = f"if {if_expr} then {else_expr} else {then_expr}"
set_val(expression, val)
def _post_elementary_type_name_expression(self, expression):
set_val(expression, str(expression.type))
def _post_identifier(self, expression):
set_val(expression, str(expression.value))
def _post_index_access(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = f"{left}[{right}]"
set_val(expression, val)
def _post_literal(self, expression):
set_val(expression, str(expression.value))
def _post_member_access(self, expression):
expr = get(expression.expression)
member_name = str(expression.member_name)
val = f"{expr}.{member_name}"
set_val(expression, val)
def _post_new_array(self, expression):
array = str(expression.array_type)
depth = expression.depth
val = f"new {array}{'[]' * depth}"
set_val(expression, val)
def _post_new_contract(self, expression):
contract = str(expression.contract_name)
val = f"new {contract}"
set_val(expression, val)
def _post_new_elementary_type(self, expression):
t = str(expression.type)
val = f"new {t}"
set_val(expression, val)
def _post_tuple_expression(self, expression):
expressions = [get(e) for e in expression.expressions if e]
val = f"({','.join(expressions)})"
set_val(expression, val)
def _post_type_conversion(self, expression):
t = str(expression.type)
expr = get(expression.expression)
val = f"{t}({expr})"
set_val(expression, val)
def _post_unary_operation(self, expression):
t = str(expression.type)
expr = get(expression.expression)
if expression.is_prefix:
val = f"{t}{expr}"
else:
val = f"{expr}{t}"
set_val(expression, val)
| 3,389 | Python | .py | 80 | 34.4 | 73 | 0.647506 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,113 | write_var.py | NioTheFirst_ScType/slither/visitors/expression/write_var.py | from slither.visitors.expression.expression import ExpressionVisitor
key = "WriteVar"
def get(expression):
val = expression.context[key]
# we delete the item to reduce memory use
del expression.context[key]
return val
def set_val(expression, val):
expression.context[key] = val
class WriteVar(ExpressionVisitor):
def result(self):
if self._result is None:
self._result = list(set(get(self.expression)))
return self._result
def _post_binary_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
if expression.is_lvalue:
val += [expression]
set_val(expression, val)
def _post_call_expression(self, expression):
called = get(expression.called)
args = [get(a) for a in expression.arguments if a]
args = [item for sublist in args for item in sublist]
val = called + args
if expression.is_lvalue:
val += [expression]
set_val(expression, val)
def _post_conditional_expression(self, expression):
if_expr = get(expression.if_expression)
else_expr = get(expression.else_expression)
then_expr = get(expression.then_expression)
val = if_expr + else_expr + then_expr
if expression.is_lvalue:
val += [expression]
set_val(expression, val)
def _post_assignement_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
if expression.is_lvalue:
val += [expression]
set_val(expression, val)
def _post_elementary_type_name_expression(self, expression):
set_val(expression, [])
# save only identifier expression
def _post_identifier(self, expression):
if expression.is_lvalue:
set_val(expression, [expression])
else:
set_val(expression, [])
# if isinstance(expression.value, Variable):
# set_val(expression, [expression.value])
# else:
# set_val(expression, [])
def _post_index_access(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
if expression.is_lvalue:
# val += [expression]
val += [expression.expression_left]
# n = expression.expression_left
# parse all the a.b[..].c[..]
# while isinstance(n, (IndexAccess, MemberAccess)):
# if isinstance(n, IndexAccess):
# val += [n.expression_left]
# n = n.expression_left
# else:
# val += [n.expression]
# n = n.expression
set_val(expression, val)
def _post_literal(self, expression):
set_val(expression, [])
def _post_member_access(self, expression):
expr = get(expression.expression)
val = expr
if expression.is_lvalue:
val += [expression]
val += [expression.expression]
set_val(expression, val)
def _post_new_array(self, expression):
set_val(expression, [])
def _post_new_contract(self, expression):
set_val(expression, [])
def _post_new_elementary_type(self, expression):
set_val(expression, [])
def _post_tuple_expression(self, expression):
expressions = [get(e) for e in expression.expressions if e]
val = [item for sublist in expressions for item in sublist]
if expression.is_lvalue:
val += [expression]
set_val(expression, val)
def _post_type_conversion(self, expression):
expr = get(expression.expression)
val = expr
if expression.is_lvalue:
val += [expression]
set_val(expression, val)
def _post_unary_operation(self, expression):
expr = get(expression.expression)
val = expr
if expression.is_lvalue:
val += [expression]
set_val(expression, val)
| 4,202 | Python | .py | 106 | 31.254717 | 68 | 0.606187 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,114 | export_values.py | NioTheFirst_ScType/slither/visitors/expression/export_values.py | from slither.visitors.expression.expression import ExpressionVisitor
key = "ExportValues"
def get(expression):
val = expression.context[key]
# we delete the item to reduce memory use
del expression.context[key]
return val
def set_val(expression, val):
expression.context[key] = val
class ExportValues(ExpressionVisitor):
def result(self):
if self._result is None:
self._result = list(set(get(self.expression)))
return self._result
def _post_assignement_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_binary_operation(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_call_expression(self, expression):
called = get(expression.called)
args = [get(a) for a in expression.arguments if a]
args = [item for sublist in args for item in sublist]
val = called + args
set_val(expression, val)
def _post_conditional_expression(self, expression):
if_expr = get(expression.if_expression)
else_expr = get(expression.else_expression)
then_expr = get(expression.then_expression)
val = if_expr + else_expr + then_expr
set_val(expression, val)
def _post_elementary_type_name_expression(self, expression):
set_val(expression, [])
def _post_identifier(self, expression):
set_val(expression, [expression.value])
def _post_index_access(self, expression):
left = get(expression.expression_left)
right = get(expression.expression_right)
val = left + right
set_val(expression, val)
def _post_literal(self, expression):
set_val(expression, [])
def _post_member_access(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
def _post_new_array(self, expression):
set_val(expression, [])
def _post_new_contract(self, expression):
set_val(expression, [])
def _post_new_elementary_type(self, expression):
set_val(expression, [])
def _post_tuple_expression(self, expression):
expressions = [get(e) for e in expression.expressions if e]
val = [item for sublist in expressions for item in sublist]
set_val(expression, val)
def _post_type_conversion(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
def _post_unary_operation(self, expression):
expr = get(expression.expression)
val = expr
set_val(expression, val)
| 2,828 | Python | .py | 69 | 33.405797 | 68 | 0.663135 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,115 | constants_folding.py | NioTheFirst_ScType/slither/visitors/expression/constants_folding.py | from fractions import Fraction
from slither.core.expressions import (
BinaryOperationType,
Literal,
UnaryOperationType,
Identifier,
BinaryOperation,
UnaryOperation,
)
from slither.utils.integer_conversion import convert_string_to_fraction, convert_string_to_int
from slither.visitors.expression.expression import ExpressionVisitor
class NotConstant(Exception):
pass
KEY = "ConstantFolding"
def get_val(expression):
val = expression.context[KEY]
# we delete the item to reduce memory use
del expression.context[KEY]
return val
def set_val(expression, val):
expression.context[KEY] = val
class ConstantFolding(ExpressionVisitor):
def __init__(self, expression, custom_type):
self._type = custom_type
super().__init__(expression)
def result(self):
value = get_val(self._expression)
if isinstance(value, Fraction):
value = int(value)
# emulate 256-bit wrapping
if str(self._type).startswith("uint"):
value = value & (2**256 - 1)
return Literal(value, self._type)
def _post_identifier(self, expression: Identifier):
if not expression.value.is_constant:
raise NotConstant
expr = expression.value.expression
# assumption that we won't have infinite loop
if not isinstance(expr, Literal):
cf = ConstantFolding(expr, self._type)
expr = cf.result()
set_val(expression, convert_string_to_int(expr.converted_value))
# pylint: disable=too-many-branches
def _post_binary_operation(self, expression: BinaryOperation):
left = get_val(expression.expression_left)
right = get_val(expression.expression_right)
if expression.type == BinaryOperationType.POWER:
set_val(expression, left**right)
elif expression.type == BinaryOperationType.MULTIPLICATION:
set_val(expression, left * right)
elif expression.type == BinaryOperationType.DIVISION:
set_val(expression, left / right)
elif expression.type == BinaryOperationType.MODULO:
set_val(expression, left % right)
elif expression.type == BinaryOperationType.ADDITION:
set_val(expression, left + right)
elif expression.type == BinaryOperationType.SUBTRACTION:
set_val(expression, left - right)
# Convert to int for operations not supported by Fraction
elif expression.type == BinaryOperationType.LEFT_SHIFT:
set_val(expression, int(left) << int(right))
elif expression.type == BinaryOperationType.RIGHT_SHIFT:
set_val(expression, int(left) >> int(right))
elif expression.type == BinaryOperationType.AND:
set_val(expression, int(left) & int(right))
elif expression.type == BinaryOperationType.CARET:
set_val(expression, int(left) ^ int(right))
elif expression.type == BinaryOperationType.OR:
set_val(expression, int(left) | int(right))
elif expression.type == BinaryOperationType.LESS:
set_val(expression, int(left) < int(right))
elif expression.type == BinaryOperationType.LESS_EQUAL:
set_val(expression, int(left) <= int(right))
elif expression.type == BinaryOperationType.GREATER:
set_val(expression, int(left) > int(right))
elif expression.type == BinaryOperationType.GREATER_EQUAL:
set_val(expression, int(left) >= int(right))
elif expression.type == BinaryOperationType.EQUAL:
set_val(expression, int(left) == int(right))
elif expression.type == BinaryOperationType.NOT_EQUAL:
set_val(expression, int(left) != int(right))
# Convert boolean literals from string to bool
elif expression.type == BinaryOperationType.ANDAND:
set_val(expression, left == "true" and right == "true")
elif expression.type == BinaryOperationType.OROR:
set_val(expression, left == "true" or right == "true")
else:
raise NotConstant
def _post_unary_operation(self, expression: UnaryOperation):
# Case of uint a = -7; uint[-a] arr;
if expression.type == UnaryOperationType.MINUS_PRE:
expr = expression.expression
if not isinstance(expr, Literal):
cf = ConstantFolding(expr, self._type)
expr = cf.result()
assert isinstance(expr, Literal)
set_val(expression, -convert_string_to_fraction(expr.converted_value))
else:
raise NotConstant
def _post_literal(self, expression: Literal):
if expression.converted_value in ["true", "false"]:
set_val(expression, expression.converted_value)
else:
try:
set_val(expression, convert_string_to_fraction(expression.converted_value))
except ValueError as e:
raise NotConstant from e
def _post_assignement_operation(self, expression):
raise NotConstant
def _post_call_expression(self, expression):
raise NotConstant
def _post_conditional_expression(self, expression):
raise NotConstant
def _post_elementary_type_name_expression(self, expression):
raise NotConstant
def _post_index_access(self, expression):
raise NotConstant
def _post_member_access(self, expression):
raise NotConstant
def _post_new_array(self, expression):
raise NotConstant
def _post_new_contract(self, expression):
raise NotConstant
def _post_new_elementary_type(self, expression):
raise NotConstant
def _post_tuple_expression(self, expression):
if expression.expressions:
if len(expression.expressions) == 1:
cf = ConstantFolding(expression.expressions[0], self._type)
expr = cf.result()
assert isinstance(expr, Literal)
set_val(expression, convert_string_to_fraction(expr.converted_value))
return
raise NotConstant
def _post_type_conversion(self, expression):
cf = ConstantFolding(expression.expression, self._type)
expr = cf.result()
assert isinstance(expr, Literal)
set_val(expression, convert_string_to_fraction(expr.converted_value))
| 6,402 | Python | .py | 139 | 36.726619 | 94 | 0.658329 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,116 | has_conditional.py | NioTheFirst_ScType/slither/visitors/expression/has_conditional.py | from slither.visitors.expression.expression import ExpressionVisitor
class HasConditional(ExpressionVisitor):
def result(self):
# == True, to convert None to false
return self._result is True
def _post_conditional_expression(self, expression):
# if self._result is True:
# raise('Slither does not support nested ternary operator')
self._result = True
| 420 | Python | .py | 9 | 40 | 78 | 0.681373 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,117 | colors.py | NioTheFirst_ScType/slither/utils/colors.py | from functools import partial
import platform
import sys
class Colors: # pylint: disable=too-few-public-methods
COLORIZATION_ENABLED = True
RED = "\033[91m"
GREEN = "\033[92m"
YELLOW = "\033[93m"
BLUE = "\033[94m"
MAGENTA = "\033[95m"
BOLD = "\033[1m"
END = "\033[0m"
def colorize(color: Colors, txt: str) -> str:
if Colors.COLORIZATION_ENABLED:
return f"{color}{txt}{Colors.END}"
return txt
def enable_windows_virtual_terminal_sequences() -> bool:
"""
Sets the appropriate flags to enable virtual terminal sequences in a Windows command prompt.
Reference: https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
"""
try:
# pylint: disable=import-outside-toplevel
from ctypes import windll, byref
from ctypes.wintypes import DWORD, HANDLE
kernel32 = windll.kernel32
virtual_terminal_flag = 0x04 # ENABLE_VIRTUAL_TERMINAL_PROCESSING
# Obtain our stdout/stderr handles.
# Reference: https://docs.microsoft.com/en-us/windows/console/getstdhandle
handle_stdout = kernel32.GetStdHandle(-11)
handle_stderr = kernel32.GetStdHandle(-12)
# Loop for each stdout/stderr handle.
for current_handle in [handle_stdout, handle_stderr]:
# If we get a null handle, or fail any subsequent calls in this scope, we do not colorize any output.
if current_handle is None or current_handle == HANDLE(-1):
return False
# Try to obtain the current flags for the console.
current_mode = DWORD()
if not kernel32.GetConsoleMode(current_handle, byref(current_mode)):
return False
# If the virtual terminal sequence processing is not yet enabled, we enable it.
if (current_mode.value & virtual_terminal_flag) == 0:
if not kernel32.SetConsoleMode(
current_handle, current_mode.value | virtual_terminal_flag
):
return False
except Exception: # pylint: disable=broad-except
# Any generic failure (possibly from calling these methods on older Windows builds where they do not exist)
# will fall back onto disabling colorization.
return False
return True
def set_colorization_enabled(enabled: bool):
"""
Sets the enabled state of output colorization.
:param enabled: Boolean indicating whether output should be colorized.
:return: None
"""
# If color is supposed to be enabled and this is windows, we have to enable console virtual terminal sequences:
if enabled and platform.system() == "Windows":
Colors.COLORIZATION_ENABLED = enable_windows_virtual_terminal_sequences()
else:
# This is not windows, or colorization is being disabled, so we can adjust the state immediately.
Colors.COLORIZATION_ENABLED = enabled
green = partial(colorize, Colors.GREEN)
yellow = partial(colorize, Colors.YELLOW)
red = partial(colorize, Colors.RED)
blue = partial(colorize, Colors.BLUE)
magenta = partial(colorize, Colors.MAGENTA)
bold = partial(colorize, Colors.BOLD)
# We enable colorization by default if the output is a tty
set_colorization_enabled(sys.stdout.isatty())
| 3,305 | Python | .py | 71 | 39.197183 | 115 | 0.688336 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,118 | tests_pattern.py | NioTheFirst_ScType/slither/utils/tests_pattern.py | from pathlib import Path
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from slither.core.declarations.contract import Contract
_TESTS_PATTERNS = ["Test", "test", "Mock", "mock"]
TESTS_PATTERNS = _TESTS_PATTERNS + [x + "s" for x in _TESTS_PATTERNS]
def _is_test_pattern(txt: str, pattern: str) -> bool:
"""
Check if the txt starts with the pattern, or ends with it
:param pattern:
:return:
"""
if txt.endswith(pattern):
return True
if not txt.startswith(pattern):
return False
length = len(pattern)
if len(txt) <= length:
return True
return txt[length] == "_" or txt[length].isupper()
def is_test_file(path: Path) -> bool:
"""
Check if the given path points to a test/mock file
:param path:
:return:
"""
return any((test_pattern in path.parts for test_pattern in TESTS_PATTERNS))
def is_test_contract(contract: "Contract") -> bool:
"""
Check if the contract is a test/mock
:param contract:
:return:
"""
return (
_is_test_pattern(contract.name, "Test")
or _is_test_pattern(contract.name, "Mock")
or (
contract.source_mapping.filename.absolute
and is_test_file(Path(contract.source_mapping.filename.absolute))
)
)
| 1,300 | Python | .py | 41 | 26.219512 | 79 | 0.647482 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,119 | integer_conversion.py | NioTheFirst_ScType/slither/utils/integer_conversion.py | from fractions import Fraction
from typing import Union
from slither.exceptions import SlitherError
def convert_string_to_fraction(val: Union[str, int]) -> Fraction:
if isinstance(val, int):
return Fraction(val)
if val.startswith(("0x", "0X")):
return Fraction(int(val, 16))
# Fractions do not support underscore separators (on Python <3.11)
val = val.replace("_", "")
if "e" in val or "E" in val:
base, expo = val.split("e") if "e" in val else val.split("E")
base, expo = Fraction(base), int(expo)
# The resulting number must be < 2**256-1, otherwise solc
# Would not be able to compile it
# 10**77 is the largest exponent that fits
# See https://github.com/ethereum/solidity/blob/9e61f92bd4d19b430cb8cb26f1c7cf79f1dff380/libsolidity/ast/Types.cpp#L1281-L1290
if expo > 77:
if base != Fraction(0):
raise SlitherError(
f"{base}e{expo} is too large to fit in any Solidity integer size"
)
return 0
return Fraction(base) * Fraction(10**expo)
return Fraction(val)
def convert_string_to_int(val: Union[str, int]) -> int:
return int(convert_string_to_fraction(val))
| 1,252 | Python | .py | 27 | 38.259259 | 134 | 0.643385 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,120 | myprettytable.py | NioTheFirst_ScType/slither/utils/myprettytable.py | from typing import List, Dict
from prettytable import PrettyTable
class MyPrettyTable:
def __init__(self, field_names: List[str]):
self._field_names = field_names
self._rows: List = []
def add_row(self, row: List[str]) -> None:
self._rows.append(row)
def to_pretty_table(self) -> PrettyTable:
table = PrettyTable(self._field_names)
for row in self._rows:
table.add_row(row)
return table
def to_json(self) -> Dict:
return {"fields_names": self._field_names, "rows": self._rows}
def __str__(self) -> str:
return str(self.to_pretty_table())
| 641 | Python | .py | 17 | 30.647059 | 70 | 0.620746 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,121 | comparable_enum.py | NioTheFirst_ScType/slither/utils/comparable_enum.py | from enum import Enum
# pylint: disable=comparison-with-callable
class ComparableEnum(Enum):
def __eq__(self, other):
if isinstance(other, ComparableEnum):
return self.value == other.value
return False
def __ne__(self, other):
if isinstance(other, ComparableEnum):
return self.value != other.value
return False
def __lt__(self, other):
if isinstance(other, ComparableEnum):
return self.value < other.value
return False
def __repr__(self):
return f"{str(self.value)}"
def __hash__(self):
return hash(self.value)
| 638 | Python | .py | 19 | 25.894737 | 45 | 0.619281 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,122 | function.py | NioTheFirst_ScType/slither/utils/function.py | from Crypto.Hash import keccak
def get_function_id(sig: str) -> int:
"""'
Return the function id of the given signature
Args:
sig (str)
Return:
(int)
"""
digest = keccak.new(digest_bits=256)
digest.update(sig.encode("utf-8"))
return int("0x" + digest.hexdigest()[:8], 16)
| 326 | Python | .py | 12 | 21.666667 | 53 | 0.608974 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,123 | output_capture.py | NioTheFirst_ScType/slither/utils/output_capture.py | import io
import logging
import sys
class CapturingStringIO(io.StringIO):
"""
I/O implementation which captures output, and optionally mirrors it to the original I/O stream it replaces.
"""
def __init__(self, original_io=None):
super().__init__()
self.original_io = original_io
def write(self, s):
super().write(s)
if self.original_io:
self.original_io.write(s)
class StandardOutputCapture:
"""
Redirects and captures standard output/errors.
"""
original_stdout = None
original_stderr = None
original_logger_handlers = None
@staticmethod
def enable(block_original: bool = True) -> None:
"""
Redirects stdout and stderr to a capturable StringIO.
:param block_original: If True, blocks all output to the original stream. If False, duplicates output.
:return: None
"""
# Redirect stdout
if StandardOutputCapture.original_stdout is None:
StandardOutputCapture.original_stdout = sys.stdout
sys.stdout = CapturingStringIO(
None if block_original else StandardOutputCapture.original_stdout
)
# Redirect stderr
if StandardOutputCapture.original_stderr is None:
StandardOutputCapture.original_stderr = sys.stderr
sys.stderr = CapturingStringIO(
None if block_original else StandardOutputCapture.original_stderr
)
# Backup and swap root logger handlers
root_logger = logging.getLogger()
StandardOutputCapture.original_logger_handlers = root_logger.handlers
root_logger.handlers = [logging.StreamHandler(sys.stderr)]
@staticmethod
def disable() -> None:
"""
Disables redirection of stdout/stderr, if previously enabled.
:return: None
"""
# If we have a stdout backup, restore it.
if StandardOutputCapture.original_stdout is not None:
sys.stdout.close()
sys.stdout = StandardOutputCapture.original_stdout
StandardOutputCapture.original_stdout = None
# If we have an stderr backup, restore it.
if StandardOutputCapture.original_stderr is not None:
sys.stderr.close()
sys.stderr = StandardOutputCapture.original_stderr
StandardOutputCapture.original_stderr = None
# Restore our logging handlers
if StandardOutputCapture.original_logger_handlers is not None:
root_logger = logging.getLogger()
root_logger.handlers = StandardOutputCapture.original_logger_handlers
StandardOutputCapture.original_logger_handlers = None
@staticmethod
def get_stdout_output() -> str:
"""
Obtains the output from the currently set stdout
:return: Returns stdout output as a string
"""
sys.stdout.seek(0)
return sys.stdout.read()
@staticmethod
def get_stderr_output() -> str:
"""
Obtains the output from the currently set stderr
:return: Returns stderr output as a string
"""
sys.stderr.seek(0)
return sys.stderr.read()
| 3,225 | Python | .py | 81 | 30.876543 | 111 | 0.652924 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,124 | source_mapping.py | NioTheFirst_ScType/slither/utils/source_mapping.py | from typing import List
from crytic_compile import CryticCompile
from slither.core.declarations import Contract, Function, Enum, Event, Import, Pragma, Structure
from slither.core.solidity_types.type import Type
from slither.core.source_mapping.source_mapping import Source, SourceMapping
from slither.core.variables.variable import Variable
from slither.exceptions import SlitherError
def get_definition(target: SourceMapping, crytic_compile: CryticCompile) -> Source:
if isinstance(target, (Contract, Function, Enum, Event, Structure, Variable)):
# Add " " to look after the first solidity keyword
pattern = " " + target.name
elif isinstance(target, Import):
pattern = "import"
elif isinstance(target, Pragma):
pattern = "pragma" # todo maybe return with the while pragma statement
elif isinstance(target, Type):
raise SlitherError("get_definition_generic not implemented for types")
else:
raise SlitherError(f"get_definition_generic not implemented for {type(target)}")
file_content = crytic_compile.src_content_for_file(target.source_mapping.filename.absolute)
txt = file_content[
target.source_mapping.start : target.source_mapping.start + target.source_mapping.length
]
start_offset = txt.find(pattern) + 1 # remove the space
starting_line, starting_column = crytic_compile.get_line_from_offset(
target.source_mapping.filename, target.source_mapping.start + start_offset
)
ending_line, ending_column = crytic_compile.get_line_from_offset(
target.source_mapping.filename, target.source_mapping.start + start_offset + len(pattern)
)
s = Source()
s.start = target.source_mapping.start + start_offset
s.length = len(pattern)
s.filename = target.source_mapping.filename
s.is_dependency = target.source_mapping.is_dependency
s.lines = list(range(starting_line, ending_line + 1))
s.starting_column = starting_column
s.ending_column = ending_column
s.end = s.start + s.length
s.compilation_unit = target.compilation_unit
return s
def get_implementation(target: SourceMapping) -> Source:
return target.source_mapping
def get_references(target: SourceMapping) -> List[Source]:
return target.references
| 2,288 | Python | .py | 45 | 45.666667 | 97 | 0.744509 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,125 | codex.py | NioTheFirst_ScType/slither/utils/codex.py | import logging
import os
from argparse import ArgumentParser
from pathlib import Path
from slither.utils.command_line import defaults_flag_in_config
logger = logging.getLogger("Slither")
def init_parser(parser: ArgumentParser, always_enable_codex: bool = False) -> None:
"""
Init the cli arg with codex features
Args:
parser:
always_enable_codex (Optional(bool)): if true, --codex is not enabled
Returns:
"""
group_codex = parser.add_argument_group("Codex (https://beta.openai.com/docs/guides/code)")
if not always_enable_codex:
group_codex.add_argument(
"--codex",
help="Enable codex (require an OpenAI API Key)",
action="store_true",
default=defaults_flag_in_config["codex"],
)
group_codex.add_argument(
"--codex-log",
help="Log codex queries (in crytic_export/codex/)",
action="store_true",
default=False,
)
group_codex.add_argument(
"--codex-contracts",
help="Comma separated list of contracts to submit to OpenAI Codex",
action="store",
default=defaults_flag_in_config["codex_contracts"],
)
group_codex.add_argument(
"--codex-model",
help="Name of the Codex model to use (affects pricing). Defaults to 'text-davinci-003'",
action="store",
default=defaults_flag_in_config["codex_model"],
)
group_codex.add_argument(
"--codex-temperature",
help="Temperature to use with Codex. Lower number indicates a more precise answer while higher numbers return more creative answers. Defaults to 0",
action="store",
default=defaults_flag_in_config["codex_temperature"],
)
group_codex.add_argument(
"--codex-max-tokens",
help="Maximum amount of tokens to use on the response. This number plus the size of the prompt can be no larger than the limit (4097 for text-davinci-003)",
action="store",
default=defaults_flag_in_config["codex_max_tokens"],
)
# TODO: investigate how to set the correct return type
# So that the other modules can work with openai
def openai_module(): # type: ignore
"""
Return the openai module
Consider checking the usage of open (slither.codex_enabled) before using this function
Returns:
Optional[the openai module]
"""
try:
# pylint: disable=import-outside-toplevel
import openai
api_key = os.getenv("OPENAI_API_KEY")
if api_key is None:
logger.info(
"Please provide an Open API Key in OPENAI_API_KEY (https://beta.openai.com/account/api-keys)"
)
return None
openai.api_key = api_key
except ImportError:
logger.info("OpenAI was not installed") # type: ignore
logger.info('run "pip install openai"')
return None
return openai
def log_codex(filename: str, prompt: str) -> None:
"""
Log the prompt in crytic/export/codex/filename
Append to the file
Args:
filename: filename to write to
prompt: prompt to write
Returns:
None
"""
Path("crytic_export/codex").mkdir(parents=True, exist_ok=True)
with open(Path("crytic_export/codex", filename), "a", encoding="utf8") as file:
file.write(prompt)
file.write("\n")
| 3,387 | Python | .py | 90 | 30.422222 | 165 | 0.650886 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,126 | output.py | NioTheFirst_ScType/slither/utils/output.py | import hashlib
import os
import json
import logging
import zipfile
from collections import OrderedDict
from typing import Optional, Dict, List, Union, Any, TYPE_CHECKING, Type
from zipfile import ZipFile
from pkg_resources import require
from slither.core.cfg.node import Node
from slither.core.declarations import Contract, Function, Enum, Event, Structure, Pragma
from slither.core.source_mapping.source_mapping import SourceMapping
from slither.core.variables.variable import Variable
from slither.exceptions import SlitherError
from slither.utils.colors import yellow
from slither.utils.myprettytable import MyPrettyTable
if TYPE_CHECKING:
from slither.core.compilation_unit import SlitherCompilationUnit
from slither.detectors.abstract_detector import AbstractDetector
logger = logging.getLogger("Slither")
###################################################################################
###################################################################################
# region Output
###################################################################################
###################################################################################
def output_to_json(filename: Optional[str], error, results: Dict) -> None:
"""
:param filename: Filename where the json will be written. If None or "-", write to stdout
:param error: Error to report
:param results: Results to report
:param logger: Logger where to log potential info
:return:
"""
# Create our encapsulated JSON result.
json_result = {"success": error is None, "error": error, "results": results}
if filename == "-":
filename = None
# Determine if we should output to stdout
if filename is None:
# Write json to console
print(json.dumps(json_result))
else:
# Write json to file
if os.path.isfile(filename):
logger.info(yellow(f"{filename} exists already, the overwrite is prevented"))
else:
with open(filename, "w", encoding="utf8") as f:
json.dump(json_result, f, indent=2)
def _output_result_to_sarif(
detector: Dict, detectors_classes: List["AbstractDetector"], sarif: Dict
) -> None:
confidence = "very-high"
if detector["confidence"] == "Medium":
confidence = "high"
elif detector["confidence"] == "Low":
confidence = "medium"
elif detector["confidence"] == "Informational":
confidence = "low"
risk = "0.0"
if detector["impact"] == "High":
risk = "8.0"
elif detector["impact"] == "Medium":
risk = "4.0"
elif detector["impact"] == "Low":
risk = "3.0"
detector_class = next((d for d in detectors_classes if d.ARGUMENT == detector["check"]))
check_id = (
str(detector_class.IMPACT.value)
+ "-"
+ str(detector_class.CONFIDENCE.value)
+ "-"
+ detector["check"]
)
rule = {
"id": check_id,
"name": detector["check"],
"properties": {"precision": confidence, "security-severity": risk},
"shortDescription": {"text": detector_class.WIKI_TITLE},
"help": {"text": detector_class.WIKI_RECOMMENDATION},
}
# Add the rule if does not exist yet
if len([x for x in sarif["runs"][0]["tool"]["driver"]["rules"] if x["id"] == check_id]) == 0:
sarif["runs"][0]["tool"]["driver"]["rules"].append(rule)
if not detector["elements"]:
logger.info(yellow("Cannot generate Github security alert for finding without location"))
logger.info(yellow(detector["description"]))
logger.info(yellow("This will be supported in a future Slither release"))
return
# From 3.19.10 (http://docs.oasis-open.org/sarif/sarif/v2.0/csprd01/sarif-v2.0-csprd01.html)
# The locations array SHALL NOT contain more than one element unless the condition indicated by the result,
# if any, can only be corrected by making a change at every location specified in the array.
finding = detector["elements"][0]
path = finding["source_mapping"]["filename_relative"]
start_line = finding["source_mapping"]["lines"][0]
end_line = finding["source_mapping"]["lines"][-1]
sarif["runs"][0]["results"].append(
{
"ruleId": check_id,
"message": {"text": detector["description"], "markdown": detector["markdown"]},
"level": "warning",
"locations": [
{
"physicalLocation": {
"artifactLocation": {"uri": path},
"region": {"startLine": start_line, "endLine": end_line},
}
}
],
"partialFingerprints": {"id": detector["id"]},
}
)
def output_to_sarif(
filename: Optional[str], results: Dict, detectors_classes: List[Type["AbstractDetector"]]
) -> None:
"""
:param filename:
:type filename:
:param results:
:type results:
:return:
:rtype:
"""
sarif: Dict[str, Any] = {
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
"version": "2.1.0",
"runs": [
{
"tool": {
"driver": {
"name": "Slither",
"informationUri": "https://github.com/crytic/slither",
"version": require("slither-analyzer")[0].version,
"rules": [],
}
},
"results": [],
}
],
}
for detector in results.get("detectors", []):
_output_result_to_sarif(detector, detectors_classes, sarif)
if filename == "-":
filename = None
# Determine if we should output to stdout
if filename is None:
# Write json to console
print(json.dumps(sarif))
else:
# Write json to file
if os.path.isfile(filename):
logger.info(yellow(f"{filename} exists already, the overwrite is prevented"))
else:
with open(filename, "w", encoding="utf8") as f:
json.dump(sarif, f, indent=2)
# https://docs.python.org/3/library/zipfile.html#zipfile-objects
ZIP_TYPES_ACCEPTED = {
"lzma": zipfile.ZIP_LZMA,
"stored": zipfile.ZIP_STORED,
"deflated": zipfile.ZIP_DEFLATED,
"bzip2": zipfile.ZIP_BZIP2,
}
def output_to_zip(filename: str, error: Optional[str], results: Dict, zip_type: str = "lzma"):
"""
Output the results to a zip
The file in the zip is named slither_results.json
Note: the json file will not have indentation, as a result the resulting json file will be smaller
:param zip_type:
:param filename:
:param error:
:param results:
:return:
"""
json_result = {"success": error is None, "error": error, "results": results}
if os.path.isfile(filename):
logger.info(yellow(f"{filename} exists already, the overwrite is prevented"))
else:
with ZipFile(
filename,
"w",
compression=ZIP_TYPES_ACCEPTED.get(zip_type, zipfile.ZIP_LZMA),
) as file_desc:
file_desc.writestr("slither_results.json", json.dumps(json_result).encode("utf8"))
# endregion
###################################################################################
###################################################################################
# region Json generation
###################################################################################
###################################################################################
def _convert_to_description(d):
if isinstance(d, str):
return d
if not isinstance(d, SourceMapping):
raise SlitherError(f"{d} does not inherit from SourceMapping, conversion impossible")
if isinstance(d, Node):
if d.expression:
return f"{d.expression} ({d.source_mapping})"
return f"{str(d)} ({d.source_mapping})"
if hasattr(d, "canonical_name"):
return f"{d.canonical_name} ({d.source_mapping})"
if hasattr(d, "name"):
return f"{d.name} ({d.source_mapping})"
raise SlitherError(f"{type(d)} cannot be converted (no name, or canonical_name")
def _convert_to_markdown(d, markdown_root):
if isinstance(d, str):
return d
if not isinstance(d, SourceMapping):
raise SlitherError(f"{d} does not inherit from SourceMapping, conversion impossible")
if isinstance(d, Node):
if d.expression:
return f"[{d.expression}]({d.source_mapping.to_markdown(markdown_root)})"
return f"[{str(d)}]({d.source_mapping.to_markdown(markdown_root)})"
if hasattr(d, "canonical_name"):
return f"[{d.canonical_name}]({d.source_mapping.to_markdown(markdown_root)})"
if hasattr(d, "name"):
return f"[{d.name}]({d.source_mapping.to_markdown(markdown_root)})"
raise SlitherError(f"{type(d)} cannot be converted (no name, or canonical_name")
def _convert_to_id(d):
"""
Id keeps the source mapping of the node, otherwise we risk to consider two different node as the same
:param d:
:return:
"""
if isinstance(d, str):
return d
if not isinstance(d, SourceMapping):
raise SlitherError(f"{d} does not inherit from SourceMapping, conversion impossible")
if isinstance(d, Node):
if d.expression:
return f"{d.expression} ({d.source_mapping})"
return f"{str(d)} ({d.source_mapping})"
if isinstance(d, Pragma):
return f"{d} ({d.source_mapping})"
if hasattr(d, "canonical_name"):
return f"{d.canonical_name}"
if hasattr(d, "name"):
return f"{d.name}"
raise SlitherError(f"{type(d)} cannot be converted (no name, or canonical_name")
# endregion
###################################################################################
###################################################################################
# region Internal functions
###################################################################################
###################################################################################
def _create_base_element(
custom_type, name, source_mapping: Dict, type_specific_fields=None, additional_fields=None
):
if additional_fields is None:
additional_fields = {}
if type_specific_fields is None:
type_specific_fields = {}
element = {"type": custom_type, "name": name, "source_mapping": source_mapping}
if type_specific_fields:
element["type_specific_fields"] = type_specific_fields
if additional_fields:
element["additional_fields"] = additional_fields
return element
def _create_parent_element(element):
# pylint: disable=import-outside-toplevel
from slither.core.children.child_contract import ChildContract
from slither.core.children.child_function import ChildFunction
from slither.core.children.child_inheritance import ChildInheritance
if isinstance(element, ChildInheritance):
if element.contract_declarer:
contract = Output("")
contract.add_contract(element.contract_declarer)
return contract.data["elements"][0]
elif isinstance(element, ChildContract):
if element.contract:
contract = Output("")
contract.add_contract(element.contract)
return contract.data["elements"][0]
elif isinstance(element, ChildFunction):
if element.function:
function = Output("")
function.add_function(element.function)
return function.data["elements"][0]
return None
SupportedOutput = Union[Variable, Contract, Function, Enum, Event, Structure, Pragma, Node]
AllSupportedOutput = Union[str, SupportedOutput]
class Output:
def __init__(
self,
info_: Union[str, List[Union[str, SupportedOutput]]],
additional_fields: Optional[Dict] = None,
markdown_root="",
standard_format=True,
):
if additional_fields is None:
additional_fields = {}
# Allow info to be a string to simplify the API
info: List[Union[str, SupportedOutput]]
if isinstance(info_, str):
info = [info_]
else:
info = info_
self._data = OrderedDict()
self._data["elements"] = []
self._data["description"] = "".join(_convert_to_description(d) for d in info)
self._data["markdown"] = "".join(_convert_to_markdown(d, markdown_root) for d in info)
self._data["first_markdown_element"] = ""
self._markdown_root = markdown_root
id_txt = "".join(_convert_to_id(d) for d in info)
self._data["id"] = hashlib.sha3_256(id_txt.encode("utf-8")).hexdigest()
if standard_format:
to_add = [i for i in info if not isinstance(i, str)]
for add in to_add:
self.add(add)
if additional_fields:
self._data["additional_fields"] = additional_fields
def add(self, add: SupportedOutput, additional_fields: Optional[Dict] = None):
if not self._data["first_markdown_element"]:
self._data["first_markdown_element"] = add.source_mapping.to_markdown(
self._markdown_root
)
if isinstance(add, Variable):
self.add_variable(add, additional_fields=additional_fields)
elif isinstance(add, Contract):
self.add_contract(add, additional_fields=additional_fields)
elif isinstance(add, Function):
self.add_function(add, additional_fields=additional_fields)
elif isinstance(add, Enum):
self.add_enum(add, additional_fields=additional_fields)
elif isinstance(add, Event):
self.add_event(add, additional_fields=additional_fields)
elif isinstance(add, Structure):
self.add_struct(add, additional_fields=additional_fields)
elif isinstance(add, Pragma):
self.add_pragma(add, additional_fields=additional_fields)
elif isinstance(add, Node):
self.add_node(add, additional_fields=additional_fields)
else:
raise SlitherError(f"Impossible to add {type(add)} to the json")
@property
def data(self) -> Dict:
return self._data
@property
def elements(self) -> List[Dict]:
return self._data["elements"]
# endregion
###################################################################################
###################################################################################
# region Variables
###################################################################################
###################################################################################
def add_variable(self, variable: Variable, additional_fields: Optional[Dict] = None):
if additional_fields is None:
additional_fields = {}
type_specific_fields = {"parent": _create_parent_element(variable)}
element = _create_base_element(
"variable",
variable.name,
variable.source_mapping.to_json(),
type_specific_fields,
additional_fields,
)
self._data["elements"].append(element)
def add_variables(self, variables: List[Variable]):
for variable in sorted(variables, key=lambda x: x.name):
self.add_variable(variable)
# endregion
###################################################################################
###################################################################################
# region Contract
###################################################################################
###################################################################################
def add_contract(self, contract: Contract, additional_fields: Optional[Dict] = None):
if additional_fields is None:
additional_fields = {}
element = _create_base_element(
"contract", contract.name, contract.source_mapping.to_json(), {}, additional_fields
)
self._data["elements"].append(element)
# endregion
###################################################################################
###################################################################################
# region Functions
###################################################################################
###################################################################################
def add_function(self, function: Function, additional_fields: Optional[Dict] = None):
if additional_fields is None:
additional_fields = {}
type_specific_fields = {
"parent": _create_parent_element(function),
"signature": function.full_name,
}
element = _create_base_element(
"function",
function.name,
function.source_mapping.to_json(),
type_specific_fields,
additional_fields,
)
self._data["elements"].append(element)
def add_functions(self, functions: List[Function], additional_fields: Optional[Dict] = None):
if additional_fields is None:
additional_fields = {}
for function in sorted(functions, key=lambda x: x.name):
self.add_function(function, additional_fields)
# endregion
###################################################################################
###################################################################################
# region Enum
###################################################################################
###################################################################################
def add_enum(self, enum: Enum, additional_fields: Optional[Dict] = None):
if additional_fields is None:
additional_fields = {}
type_specific_fields = {"parent": _create_parent_element(enum)}
element = _create_base_element(
"enum",
enum.name,
enum.source_mapping.to_json(),
type_specific_fields,
additional_fields,
)
self._data["elements"].append(element)
# endregion
###################################################################################
###################################################################################
# region Structures
###################################################################################
###################################################################################
def add_struct(self, struct: Structure, additional_fields: Optional[Dict] = None):
if additional_fields is None:
additional_fields = {}
type_specific_fields = {"parent": _create_parent_element(struct)}
element = _create_base_element(
"struct",
struct.name,
struct.source_mapping.to_json(),
type_specific_fields,
additional_fields,
)
self._data["elements"].append(element)
# endregion
###################################################################################
###################################################################################
# region Events
###################################################################################
###################################################################################
def add_event(self, event: Event, additional_fields: Optional[Dict] = None):
if additional_fields is None:
additional_fields = {}
type_specific_fields = {
"parent": _create_parent_element(event),
"signature": event.full_name,
}
element = _create_base_element(
"event",
event.name,
event.source_mapping.to_json(),
type_specific_fields,
additional_fields,
)
self._data["elements"].append(element)
# endregion
###################################################################################
###################################################################################
# region Nodes
###################################################################################
###################################################################################
def add_node(self, node: Node, additional_fields: Optional[Dict] = None):
if additional_fields is None:
additional_fields = {}
type_specific_fields = {
"parent": _create_parent_element(node),
}
node_name = str(node.expression) if node.expression else ""
element = _create_base_element(
"node",
node_name,
node.source_mapping.to_json(),
type_specific_fields,
additional_fields,
)
self._data["elements"].append(element)
def add_nodes(self, nodes: List[Node]):
for node in sorted(nodes, key=lambda x: x.node_id):
self.add_node(node)
# endregion
###################################################################################
###################################################################################
# region Pragma
###################################################################################
###################################################################################
def add_pragma(self, pragma: Pragma, additional_fields: Optional[Dict] = None):
if additional_fields is None:
additional_fields = {}
type_specific_fields = {"directive": pragma.directive}
element = _create_base_element(
"pragma",
pragma.version,
pragma.source_mapping.to_json(),
type_specific_fields,
additional_fields,
)
self._data["elements"].append(element)
# endregion
###################################################################################
###################################################################################
# region File
###################################################################################
###################################################################################
def add_file(self, filename: str, content: str, additional_fields: Optional[Dict] = None):
if additional_fields is None:
additional_fields = {}
type_specific_fields = {"filename": filename, "content": content}
element = _create_base_element("file", type_specific_fields, additional_fields)
self._data["elements"].append(element)
# endregion
###################################################################################
###################################################################################
# region Pretty Table
###################################################################################
###################################################################################
def add_pretty_table(
self,
content: MyPrettyTable,
name: str,
additional_fields: Optional[Dict] = None,
):
if additional_fields is None:
additional_fields = {}
type_specific_fields = {"content": content.to_json(), "name": name}
element = _create_base_element("pretty_table", type_specific_fields, additional_fields)
self._data["elements"].append(element)
# endregion
###################################################################################
###################################################################################
# region Others
###################################################################################
###################################################################################
def add_other(
self,
name: str,
source_mapping,
compilation_unit: "SlitherCompilationUnit",
additional_fields: Optional[Dict] = None,
):
# If this a tuple with (filename, start, end), convert it to a source mapping.
if additional_fields is None:
additional_fields = {}
if isinstance(source_mapping, tuple):
# Parse the source id
(filename, start, end) = source_mapping
source_id = next(
(
source_unit_id
for (
source_unit_id,
source_unit_filename,
) in compilation_unit.source_units.items()
if source_unit_filename == filename
),
-1,
)
# Convert to a source mapping string
source_mapping = f"{start}:{end}:{source_id}"
# If this is a source mapping string, parse it.
if isinstance(source_mapping, str):
source_mapping_str = source_mapping
source_mapping = SourceMapping()
source_mapping.set_offset(source_mapping_str, compilation_unit)
# If this is a source mapping object, get the underlying source mapping dictionary
if isinstance(source_mapping, SourceMapping):
source_mapping = source_mapping.source_mapping.to_json()
# Create the underlying element and add it to our resulting json
element = _create_base_element("other", name, source_mapping, {}, additional_fields)
self._data["elements"].append(element)
| 25,854 | Python | .py | 569 | 37.077329 | 116 | 0.500616 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,127 | code_complexity.py | NioTheFirst_ScType/slither/utils/code_complexity.py | # Function computing the code complexity
from typing import TYPE_CHECKING, List
if TYPE_CHECKING:
from slither.core.declarations import Function
from slither.core.cfg.node import Node
def compute_number_edges(function: "Function") -> int:
"""
Compute the number of edges of the CFG
Args:
function (core.declarations.function.Function)
Returns:
int
"""
n = 0
for node in function.nodes:
n += len(node.sons)
return n
def compute_strongly_connected_components(function: "Function") -> List[List["Node"]]:
"""
Compute strongly connected components
Based on Kosaraju algo
Implem follows wikipedia algo: https://en.wikipedia.org/wiki/Kosaraju%27s_algorithm#The_algorithm
Args:
function (core.declarations.function.Function)
Returns:
list(list(nodes))
"""
visited = {n: False for n in function.nodes}
assigned = {n: False for n in function.nodes}
components = []
l = []
def visit(node):
if not visited[node]:
visited[node] = True
for son in node.sons:
visit(son)
l.append(node)
for n in function.nodes:
visit(n)
def assign(node: "Node", root: List["Node"]):
if not assigned[node]:
assigned[node] = True
root.append(node)
for father in node.fathers:
assign(father, root)
for n in l:
component: List["Node"] = []
assign(n, component)
if component:
components.append(component)
return components
def compute_cyclomatic_complexity(function: "Function") -> int:
"""
Compute the cyclomatic complexity of a function
Args:
function (core.declarations.function.Function)
Returns:
int
"""
# from https://en.wikipedia.org/wiki/Cyclomatic_complexity
# M = E - N + 2P
# where M is the complexity
# E number of edges
# N number of nodes
# P number of connected components
E = compute_number_edges(function)
N = len(function.nodes)
P = len(compute_strongly_connected_components(function))
return E - N + 2 * P
| 2,197 | Python | .py | 69 | 24.913043 | 105 | 0.634515 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,128 | utils.py | NioTheFirst_ScType/slither/utils/utils.py | from typing import List
def unroll(list_to_unroll: List) -> List:
ret = []
for x in list_to_unroll:
if not isinstance(x, list):
ret += [x]
else:
ret += unroll(x)
return ret
| 227 | Python | .py | 9 | 18.222222 | 41 | 0.541667 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,129 | standard_libraries.py | NioTheFirst_ScType/slither/utils/standard_libraries.py | from pathlib import Path
from typing import Optional, TYPE_CHECKING
from hashlib import sha1
from slither.utils.oz_hashes import oz_hashes
if TYPE_CHECKING:
from slither.core.declarations import Contract
libraries = {
"Openzeppelin-SafeMath": lambda x: is_openzeppelin_safemath(x),
"Openzeppelin-ECRecovery": lambda x: is_openzeppelin_ecrecovery(x),
"Openzeppelin-Ownable": lambda x: is_openzeppelin_ownable(x),
"Openzeppelin-ERC20": lambda x: is_openzeppelin_erc20(x),
"Openzeppelin-ERC721": lambda x: is_openzeppelin_erc721(x),
"Zos-Upgrade": lambda x: is_zos_initializable(x),
"Dapphub-DSAuth": lambda x: is_dapphub_ds_auth(x),
"Dapphub-DSMath": lambda x: is_dapphub_ds_math(x),
"Dapphub-DSToken": lambda x: is_dapphub_ds_token(x),
"Dapphub-DSProxy": lambda x: is_dapphub_ds_proxy(x),
"Dapphub-DSGroup": lambda x: is_dapphub_ds_group(x),
"AragonOS-SafeMath": lambda x: is_aragonos_safemath(x),
"AragonOS-ERC20": lambda x: is_aragonos_erc20(x),
"AragonOS-AppProxyBase": lambda x: is_aragonos_app_proxy_base(x),
"AragonOS-AppProxyPinned": lambda x: is_aragonos_app_proxy_pinned(x),
"AragonOS-AppProxyUpgradeable": lambda x: is_aragonos_app_proxy_upgradeable(x),
"AragonOS-AppStorage": lambda x: is_aragonos_app_storage(x),
"AragonOS-AragonApp": lambda x: is_aragonos_aragon_app(x),
"AragonOS-UnsafeAragonApp": lambda x: is_aragonos_unsafe_aragon_app(x),
"AragonOS-Autopetrified": lambda x: is_aragonos_autopetrified(x),
"AragonOS-DelegateProxy": lambda x: is_aragonos_delegate_proxy(x),
"AragonOS-DepositableDelegateProxy": lambda x: is_aragonos_depositable_delegate_proxy(x),
"AragonOS-DepositableStorage": lambda x: is_aragonos_delegate_proxy(x),
"AragonOS-Initializable": lambda x: is_aragonos_initializable(x),
"AragonOS-IsContract": lambda x: is_aragonos_is_contract(x),
"AragonOS-Petrifiable": lambda x: is_aragonos_petrifiable(x),
"AragonOS-ReentrancyGuard": lambda x: is_aragonos_reentrancy_guard(x),
"AragonOS-TimeHelpers": lambda x: is_aragonos_time_helpers(x),
"AragonOS-VaultRecoverable": lambda x: is_aragonos_vault_recoverable(x),
}
def is_standard_library(contract: "Contract") -> Optional[str]:
for name, is_lib in libraries.items():
if is_lib(contract):
return name
return None
###################################################################################
###################################################################################
# region General libraries
###################################################################################
###################################################################################
def is_openzeppelin(contract: "Contract") -> bool:
if not contract.is_from_dependency():
return False
path = Path(contract.source_mapping.filename.absolute).parts
is_zep = "openzeppelin-solidity" in Path(contract.source_mapping.filename.absolute).parts
try:
is_zep |= path[path.index("@openzeppelin") + 1] == "contracts"
except IndexError:
pass
except ValueError:
pass
return is_zep
def is_openzeppelin_strict(contract: "Contract") -> bool:
start = contract.source_mapping.start
end = start + contract.source_mapping.length
source_code = contract.compilation_unit.core.source_code[
contract.source_mapping.filename.absolute
][start:end]
source_hash = sha1(source_code.encode("utf-8")).hexdigest()
return source_hash in oz_hashes
def is_zos(contract: "Contract") -> bool:
if not contract.is_from_dependency():
return False
return "zos-lib" in Path(contract.source_mapping.filename.absolute).parts
def is_aragonos(contract: "Contract") -> bool:
if not contract.is_from_dependency():
return False
return "@aragon/os" in Path(contract.source_mapping.filename.absolute).parts
# endregion
###################################################################################
###################################################################################
# region SafeMath
###################################################################################
###################################################################################
def is_safemath(contract: "Contract") -> bool:
return contract.name == "SafeMath"
def is_openzeppelin_safemath(contract: "Contract") -> bool:
return is_safemath(contract) and is_openzeppelin(contract)
def is_aragonos_safemath(contract: "Contract") -> bool:
return is_safemath(contract) and is_aragonos(contract)
# endregion
###################################################################################
###################################################################################
# region ECRecovery
###################################################################################
###################################################################################
def is_ecrecovery(contract: "Contract") -> bool:
return contract.name == "ECRecovery"
def is_openzeppelin_ecrecovery(contract: "Contract") -> bool:
return is_ecrecovery(contract) and is_openzeppelin(contract)
# endregion
###################################################################################
###################################################################################
# region Ownable
###################################################################################
###################################################################################
def is_ownable(contract: "Contract") -> bool:
return contract.name == "Ownable"
def is_openzeppelin_ownable(contract: "Contract") -> bool:
return is_ownable(contract) and is_openzeppelin(contract)
# endregion
###################################################################################
###################################################################################
# region ERC20
###################################################################################
###################################################################################
def is_erc20(contract: "Contract") -> bool:
return contract.name == "ERC20"
def is_openzeppelin_erc20(contract: "Contract") -> bool:
return is_erc20(contract) and is_openzeppelin(contract)
def is_aragonos_erc20(contract: "Contract") -> bool:
return is_erc20(contract) and is_aragonos(contract)
# endregion
###################################################################################
###################################################################################
# region ERC721
###################################################################################
###################################################################################
def is_erc721(contract: "Contract") -> bool:
return contract.name == "ERC721"
def is_openzeppelin_erc721(contract: "Contract") -> bool:
return is_erc721(contract) and is_openzeppelin(contract)
# endregion
###################################################################################
###################################################################################
# region Zos Initializable
###################################################################################
###################################################################################
def is_initializable(contract: "Contract") -> bool:
return contract.name == "Initializable"
def is_zos_initializable(contract: "Contract") -> bool:
return is_initializable(contract) and is_zos(contract)
# endregion
###################################################################################
###################################################################################
# region DappHub
###################################################################################
###################################################################################
dapphubs = {
"DSAuth": "ds-auth",
"DSMath": "ds-math",
"DSToken": "ds-token",
"DSProxy": "ds-proxy",
"DSGroup": "ds-group",
}
def _is_ds(contract: "Contract", name: str) -> bool:
return contract.name == name
def _is_dappdhub_ds(contract: "Contract", name: str) -> bool:
if not contract.is_from_dependency():
return False
if not dapphubs[name] in Path(contract.source_mapping.filename.absolute).parts:
return False
return _is_ds(contract, name)
def is_ds_auth(contract: "Contract") -> bool:
return _is_ds(contract, "DSAuth")
def is_dapphub_ds_auth(contract: "Contract") -> bool:
return _is_dappdhub_ds(contract, "DSAuth")
def is_ds_math(contract: "Contract") -> bool:
return _is_ds(contract, "DSMath")
def is_dapphub_ds_math(contract: "Contract") -> bool:
return _is_dappdhub_ds(contract, "DSMath")
def is_ds_token(contract: "Contract") -> bool:
return _is_ds(contract, "DSToken")
def is_dapphub_ds_token(contract: "Contract") -> bool:
return _is_dappdhub_ds(contract, "DSToken")
def is_ds_proxy(contract: "Contract") -> bool:
return _is_ds(contract, "DSProxy")
def is_dapphub_ds_proxy(contract: "Contract") -> bool:
return _is_dappdhub_ds(contract, "DSProxy")
def is_ds_group(contract: "Contract") -> bool:
return _is_ds(contract, "DSGroup")
def is_dapphub_ds_group(contract: "Contract") -> bool:
return _is_dappdhub_ds(contract, "DSGroup")
# endregion
###################################################################################
###################################################################################
# region Aragon
###################################################################################
###################################################################################
def is_aragonos_app_proxy_base(contract: "Contract") -> bool:
return contract.name == "AppProxyBase" and is_aragonos(contract)
def is_aragonos_app_proxy_pinned(contract: "Contract") -> bool:
return contract.name == "AppProxyPinned" and is_aragonos(contract)
def is_aragonos_app_proxy_upgradeable(contract: "Contract") -> bool:
return contract.name == "AppProxyUpgradeable" and is_aragonos(contract)
def is_aragonos_app_storage(contract: "Contract") -> bool:
return contract.name == "AppStorage" and is_aragonos(contract)
def is_aragonos_aragon_app(contract: "Contract") -> bool:
return contract.name == "AragonApp" and is_aragonos(contract)
def is_aragonos_unsafe_aragon_app(contract: "Contract") -> bool:
return contract.name == "UnsafeAragonApp" and is_aragonos(contract)
def is_aragonos_autopetrified(contract: "Contract") -> bool:
return contract.name == "Autopetrified" and is_aragonos(contract)
def is_aragonos_delegate_proxy(contract: "Contract") -> bool:
return contract.name == "DelegateProxy" and is_aragonos(contract)
def is_aragonos_depositable_delegate_proxy(contract: "Contract") -> bool:
return contract.name == "DepositableDelegateProxy" and is_aragonos(contract)
def is_aragonos_depositable_storage(contract: "Contract") -> bool:
return contract.name == "DepositableStorage" and is_aragonos(contract)
def is_aragonos_ether_token_contract(contract: "Contract") -> bool:
return contract.name == "EtherTokenConstant" and is_aragonos(contract)
def is_aragonos_initializable(contract: "Contract") -> bool:
return contract.name == "Initializable" and is_aragonos(contract)
def is_aragonos_is_contract(contract: "Contract") -> bool:
return contract.name == "IsContract" and is_aragonos(contract)
def is_aragonos_petrifiable(contract: "Contract") -> bool:
return contract.name == "Petrifiable" and is_aragonos(contract)
def is_aragonos_reentrancy_guard(contract: "Contract") -> bool:
return contract.name == "ReentrancyGuard" and is_aragonos(contract)
def is_aragonos_time_helpers(contract: "Contract") -> bool:
return contract.name == "TimeHelpers" and is_aragonos(contract)
def is_aragonos_vault_recoverable(contract: "Contract") -> bool:
return contract.name == "VaultRecoverable" and is_aragonos(contract)
| 12,133 | Python | .py | 220 | 51.4 | 93 | 0.546456 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,130 | oz_hashes.py | NioTheFirst_ScType/slither/utils/oz_hashes.py | from typing import NamedTuple, List
class LibraryInfo(NamedTuple):
name: str
versons: List[str]
# pylint: disable=too-many-lines
oz_hashes = {
"16ad4eed535bc7e7ea4d1096618d68ffe5a02287": LibraryInfo("Bounty", ["v1.3.0"]),
"896a88e86ba21fe176d5e3de434af62ee531b1d5": LibraryInfo(
"Target", ["v1.3.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"ab36e566a3daf2aa0a8e129c150ed868a4902891": LibraryInfo("DayLimit", ["v1.3.0"]),
"07684a10bdf44d974020a0370e5ed7afbe1f9e44": LibraryInfo("ECRecovery", ["v1.3.0"]),
"0df8b61d53724353dff7ceb4948f99f4d5d0a558": LibraryInfo("LimitBalance", ["v1.3.0"]),
"a034f5999f05402616da9a54ed665d6196c6adee": LibraryInfo("MerkleProof", ["v1.3.0"]),
"7e2f3e9543ef140fb05e6cd5b67ee85f9e5c89e8": LibraryInfo("ReentrancyGuard", ["v1.3.0"]),
"1b983aa0e808ccb541f22f643011ee24e9eddc1e": LibraryInfo("CappedCrowdsale", ["v1.3.0"]),
"f48c976b3a18769596a181adc072c3266a232166": LibraryInfo("Crowdsale", ["v1.3.0"]),
"fc085749b4f49f6999c5cccd50c6a8b567b0ed5d": LibraryInfo("FinalizableCrowdsale", ["v1.3.0"]),
"2190fe74b4df2a58266ce573a1c09a047fec8b68": LibraryInfo("RefundVault", ["v1.3.0"]),
"06c26f4535dea69cdec2cf94d31f3a542430f692": LibraryInfo("RefundableCrowdsale", ["v1.3.0"]),
"e2e8a667511fa076aa2f4721a7b0476ded68f179": LibraryInfo(
"SampleCrowdsaleToken", ["v1.3.0", "v1.12.0"]
),
"618409ffc0166d51eae7474a0e65db339c1a1a48": LibraryInfo("SampleCrowdsale", ["v1.3.0"]),
"4893616c2a59bcc5b391a85598145327f6c9b481": LibraryInfo("SimpleToken", ["v1.3.0"]),
"78d8f11bc1dd500ef6aa3bf95b516facd34ae97f": LibraryInfo("Destructible", ["v1.3.0"]),
"7c2320f840fb8175ef0338f82488b437bccb3a2d": LibraryInfo("Migrations", ["v1.3.0"]),
"20954e05e6a84d9d349f36b720d20057a5849126": LibraryInfo("Pausable", ["v1.3.0"]),
"98656c8719e36d1e018b5e7d907f84531d0cde71": LibraryInfo("TokenDestructible", ["v1.3.0"]),
"77c201c932c5fd7a11e30bb970afda5a5c1a0e6c": LibraryInfo("Math", ["v1.3.0"]),
"dcd94e653605571a4adaef30328837552088af90": LibraryInfo("SafeMath", ["v1.3.0"]),
"e102f7570918afe9b8a712ec7b8cf2ce2d7ccf06": LibraryInfo(
"CanReclaimToken", ["v1.3.0", "v1.9.0", "v1.10.0", "v1.11.0"]
),
"18816a398c07b658ed4f84871d8afa1132ff2ea9": LibraryInfo("Claimable", ["v1.3.0"]),
"a51d83ec668c67ee7e3cb6744f207d7fba110ad8": LibraryInfo("Contactable", ["v1.3.0"]),
"ef49ebbffe424c8b829cf8d8fe07b0bdd4b6a32a": LibraryInfo("DelayedClaimable", ["v1.3.0"]),
"295a28a0cc845f398fd3f73fe7d7ebd3f217efb5": LibraryInfo(
"HasNoContracts", ["v1.3.0", "v1.9.0", "v1.10.0", "v1.11.0"]
),
"0695e926e394b778337e14f8bbbdce3aee6756c9": LibraryInfo("HasNoEther", ["v1.3.0"]),
"e0d144a37d99136b64edec4bc0a7d5f003ca4eb5": LibraryInfo("HasNoTokens", ["v1.3.0"]),
"70334d1b91d44591475891c4a1462711d37a8990": LibraryInfo(
"NoOwner", ["v1.3.0", "v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"4bafe87e87f2f7924cebc0f210ffc504f62479ea": LibraryInfo("Ownable", ["v1.3.0"]),
"9f8caf856608726e48ee86370d866088590bf374": LibraryInfo("PullPayment", ["v1.3.0"]),
"a586769701d35125a8281597f0187c12eebf45d8": LibraryInfo("BasicToken", ["v1.3.0"]),
"1938eb4e2cdedd786c42fbace059fbe4591a3c11": LibraryInfo("BurnableToken", ["v1.3.0"]),
"7d6c8036444ef12c4293c12f6dac7ea09b009ccd": LibraryInfo("ERC20", ["v1.3.0"]),
"26cac836b179301d90c2fb814eda7f46c0a185ef": LibraryInfo("ERC20Basic", ["v1.3.0"]),
"9414672a30d64bb82b495245b0dd47ef4f9f626c": LibraryInfo("LimitedTransferToken", ["v1.3.0"]),
"0774060a7337641beb9a43a8c0bdcb1c3ae145bc": LibraryInfo("MintableToken", ["v1.3.0"]),
"b3ce90caedd7821ec2a6f1bcbcda81637501d52b": LibraryInfo("PausableToken", ["v1.3.0", "v1.9.0"]),
"3af6c4bebea1014a2a35abccc63a5fcba9be70ab": LibraryInfo("SafeERC20", ["v1.3.0"]),
"cc3aea9e2f2110e02913b2ce811c9ed4beecf465": LibraryInfo("StandardToken", ["v1.3.0"]),
"fa1616bdd4888c5d16500a3e407fa001ddd75df0": LibraryInfo("TokenTimelock", ["v1.3.0"]),
"09c671cd62433379e237d2fc5dc311af49cf1f5c": LibraryInfo("VestedToken", ["v1.3.0"]),
"7762232a812e8fa5f4cc1f41d0e8c647839bcf3f": LibraryInfo("AddressUtils", ["v1.9.0", "v1.9.1"]),
"9adc4ade8a73cef7a0494e49b3195491f2567630": LibraryInfo("Bounty", ["v1.9.0", "v1.10.0"]),
"dc527f7040995e42e07446f383fd40b293814e4c": LibraryInfo("DayLimit", ["v1.9.0"]),
"91c4da8fd04d8dc4678a741b7a553a7fc47bfc0c": LibraryInfo(
"ECRecovery", ["v1.9.0", "v1.9.1", "v1.10.0"]
),
"e362496576b5ef824429b2aa0634a04e5e13864d": LibraryInfo("LimitBalance", ["v1.9.0"]),
"d2ad47f4ddb62fb8bcb3f4add161aeb0f3f5a4be": LibraryInfo("MerkleProof", ["v1.9.0", "v1.9.1"]),
"abe9489ed9de21737a43ab9698d131e7407620f6": LibraryInfo(
"ReentrancyGuard", ["v1.9.0", "v1.10.0", "v1.11.0"]
),
"76fae86d089153d66e6e8402d43da9485c2113a8": LibraryInfo(
"SignatureBouncer", ["v1.9.0", "v1.10.0"]
),
"20c12a01e1c64fa836c2569bb44eb852d44c7c5c": LibraryInfo("Crowdsale", ["v1.9.0"]),
"22465351d15ee5cd18d91ae8ab159129d4dcfb4d": LibraryInfo(
"FinalizableCrowdsale", ["v1.9.0", "v1.10.0", "v1.11.0"]
),
"9774a38be6323299d069a8756b44179c880e7c1e": LibraryInfo("PostDeliveryCrowdsale", ["v1.9.0"]),
"e933560cd155790112d5685ed76df0e235c780ea": LibraryInfo("RefundableCrowdsale", ["v1.9.0"]),
"d7910b2369b470f77e0e14605a8b061d6e2bd46d": LibraryInfo("RefundVault", ["v1.9.0"]),
"2661d9bc3203d658e7ed5d29a47fa66e0fdac5ba": LibraryInfo("AllowanceCrowdsale", ["v1.9.0"]),
"eb321ffdfe7be1efaefc8bdd9e6acb46eca221f4": LibraryInfo("MintedCrowdsale", ["v1.9.0"]),
"09016aac11d32d3fda430c154c180afb2fb7732d": LibraryInfo("IncreasingPriceCrowdsale", ["v1.9.0"]),
"1ff28b511dec3f0515c96d659e10f6ef7c47ce0b": LibraryInfo("CappedCrowdsale", ["v1.9.0"]),
"e789d95184e0adabe7b5b79510d3f32c9d882cd3": LibraryInfo(
"IndividuallyCappedCrowdsale", ["v1.9.0"]
),
"d062ebe0b22232bb1d8ac84cf09f10c3cbea5618": LibraryInfo("TimedCrowdsale", ["v1.9.0"]),
"7d396a8c6ff432ad5e51697af40baa20dbe97603": LibraryInfo("WhitelistedCrowdsale", ["v1.9.0"]),
"9e1ceee37e77060c7b13a87909cac0902e2ad81e": LibraryInfo("SampleCrowdsaleToken", ["v1.9.0"]),
"b1a63d12b5f88f0b4d8d0283aabcb052b03b9a6f": LibraryInfo("SampleCrowdsale", ["v1.9.0"]),
"4ffdf78526d08ef08faa67476631359f1f34d39c": LibraryInfo("SimpleSavingsWallet", ["v1.9.0"]),
"848e77f0c272c709d7df601a0a7dff1be871aa47": LibraryInfo("SimpleToken", ["v1.9.0"]),
"149e2bf2bf05ac0417a92de826b691e605375f87": LibraryInfo("Destructible", ["v1.9.0"]),
"9ec21dbeba82d8ffbb547ec3efc63e946e403433": LibraryInfo(
"Pausable", ["v1.9.0", "v1.10.0", "v1.11.0"]
),
"0636e347e26d51691bbe203f326ed3a81c14893b": LibraryInfo("TokenDestructible", ["v1.9.0"]),
"8c43814c5d4144e7241ad3acf036831f72626f53": LibraryInfo(
"Math", ["v1.9.0", "v1.9.1", "v1.10.0", "v1.11.0"]
),
"dcb0461fc135342c8335ec971c0fce948749fcad": LibraryInfo("SafeMath", ["v1.9.0", "v1.9.1"]),
"3c84335582613c4f61db5e2dba4a5bdf9a32647e": LibraryInfo("AllowanceCrowdsaleImpl", ["v1.9.0"]),
"f27124a3561a89f719110813c710df74b8852455": LibraryInfo("BasicTokenMock", ["v1.9.0", "v1.9.1"]),
"882c0e313871f9bdb3ade123cd21a06e80b9687b": LibraryInfo(
"SignatureBouncerMock", ["v1.9.0", "v1.10.0"]
),
"767d1b9bea360813c53f074339dab44dba2be3e1": LibraryInfo(
"BurnableTokenMock", ["v1.9.0", "v1.9.1"]
),
"c06b8492aa76d2b3e863e9cc21e56ea9220b6725": LibraryInfo("CappedCrowdsaleImpl", ["v1.9.0"]),
"5e4b5478ed4656e3e83cae78eeddca3ffdc77ce7": LibraryInfo("DayLimitMock", ["v1.9.0"]),
"c07480985ff1aef7516290b6e1c6eb0f5f428379": LibraryInfo("DetailedERC20Mock", ["v1.9.0"]),
"01478e8bf733ffd6b1f847f5406b6225c8b02f1c": LibraryInfo(
"ECRecoveryMock", ["v1.9.0", "v1.9.1", "v1.10.0", "v1.11.0"]
),
"17b3d5a66300e613b33d994b29afae7826d66b15": LibraryInfo(
"ERC223ContractInterface", ["v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"02100ab471369f65ef7a811c4979da275426f021": LibraryInfo("ERC223TokenMock", ["v1.9.0"]),
"ed7ae160a58372fd8f7fd58b4138ff029dd27df1": LibraryInfo(
"ERC721BasicTokenMock", ["v1.9.0", "v1.9.1", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"c6c6e961e36c39df202768b8fd18f1f76cefd1ff": LibraryInfo(
"ERC721ReceiverMock", ["v1.9.0", "v1.9.1"]
),
"400593f520c28ce9b68fb12bd4dd3f869f570f39": LibraryInfo("ERC721TokenMock", ["v1.9.0"]),
"2442a363e65369915bcde718b986a2143220fbfd": LibraryInfo("ERC827TokenMock", ["v1.9.0"]),
"59841830db8f308b717f22514cbc406dff101d0f": LibraryInfo("FinalizableCrowdsaleImpl", ["v1.9.0"]),
"2022504c8205da3c77517ffbc24ec595065050e0": LibraryInfo("ForceEther", ["v1.9.0"]),
"f0aac4a39cf1687f94c084250f2aadb75f9474b2": LibraryInfo("HasNoEtherTest", ["v1.9.0"]),
"aba043594e0651956d0ae8be33625f29883a0503": LibraryInfo(
"IncreasingPriceCrowdsaleImpl", ["v1.9.0"]
),
"e04e7327bfe0b1c52d1c6ff340837d7752c6a1ef": LibraryInfo(
"IndividuallyCappedCrowdsaleImpl", ["v1.9.0"]
),
"3860cb9cc1bcc675eabfc3fc498c012f97956f89": LibraryInfo(
"InsecureTargetMock", ["v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"0ae95f3ba71966844f02df90764349726fa5faa3": LibraryInfo(
"InsecureTargetBounty", ["v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"056f7fb47b260ca924e77d4bf345dcf67e62b732": LibraryInfo(
"LimitBalanceMock", ["v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"3c0eb7e3a1376c180c4afc060e6b02ff2dc0a12a": LibraryInfo(
"MathMock", ["v1.9.0", "v1.9.1", "v1.10.0", "v1.11.0"]
),
"dc1cbbcf7506800281d7264f137d2d20e30c980a": LibraryInfo(
"MerkleProofWrapper", ["v1.9.0", "v1.9.1"]
),
"bba58d62208bcee8307170a5dc002d5f0c0c1d2d": LibraryInfo("MessageHelper", ["v1.9.0"]),
"f5c9e9e324b4d6f1ef41008850e5dbb0e525c234": LibraryInfo("MintedCrowdsaleImpl", ["v1.9.0"]),
"8d93ca1addadb71893e2016bfa26db40fc2f4a2f": LibraryInfo("PausableMock", ["v1.9.0"]),
"36659de8c778859e75e98389e40f86261ca0becf": LibraryInfo("PausableTokenMock", ["v1.9.0"]),
"a297f3f1391501f49a3d8bb132e158faaa7249b6": LibraryInfo(
"PostDeliveryCrowdsaleImpl", ["v1.9.0"]
),
"2695bb63d6fc96d972146f159cb17d2bdb7f1cd7": LibraryInfo(
"PullPaymentMock", ["v1.9.0", "v1.9.1"]
),
"b087e928c74ce7d5adc14e9b484bb7de22f268d4": LibraryInfo("RBACMock", ["v1.9.0"]),
"0bddfeb265ff29d4c3d6ca38852747a1e21318ad": LibraryInfo(
"ReentrancyAttack", ["v1.9.0", "v1.10.0"]
),
"a9a47c2b37110ab4c5a96948b848e823abb391b9": LibraryInfo("ReentrancyMock", ["v1.9.0"]),
"585bffaaba0b7bb6fd37817b94d373ec54c4d2c7": LibraryInfo("RefundableCrowdsaleImpl", ["v1.9.0"]),
"30d70d64a1416b8cead631c93b84ed113b5e18d7": LibraryInfo("ERC20FailingMock", ["v1.9.0"]),
"ae5f3e2f0996d8b0445e4890701f35389fd565c5": LibraryInfo("ERC20SucceedingMock", ["v1.9.0"]),
"b5703426566223d0c7e0079a8aded144192c330d": LibraryInfo(
"SafeERC20Helper", ["v1.9.0", "v1.9.1"]
),
"378b31ac238e143f5f752834203492dd3980522f": LibraryInfo(
"SafeMathMock", ["v1.9.0", "v1.9.1", "v1.10.0", "v1.11.0"]
),
"2f487c8b59cc0cb91ea2ee7aa7a2b7b9bbe22a02": LibraryInfo(
"SecureTargetMock", ["v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"78c3a5e7b0d5b58efe770c54a73b42bf1d242d9b": LibraryInfo(
"SecureTargetBounty", ["v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"c4cfaf59a49f506e31c3acd8d3ae8624613c2044": LibraryInfo(
"StandardBurnableTokenMock", ["v1.9.0", "v1.9.1"]
),
"5a3481b0e8029747c9bf839d7a12b7f831513ba7": LibraryInfo(
"StandardTokenMock", ["v1.9.0", "v1.9.1"]
),
"eded4e7da3e73140ba6fd5a80217c562c5922c47": LibraryInfo("TimedCrowdsaleImpl", ["v1.9.0"]),
"b8eaff3a88d6c9b87a050ae4e3caf8eb39c508f3": LibraryInfo("WhitelistMock", ["v1.9.0", "v1.10.0"]),
"2e295e4571f9f017638cd4b9e013ce502d4f2759": LibraryInfo("WhitelistedCrowdsaleImpl", ["v1.9.0"]),
"dd349689f6d497b6d60d18af598981c0c5ea5c43": LibraryInfo(
"Claimable", ["v1.9.0", "v1.10.0", "v1.11.0"]
),
"b4c914658062b263ddd7bbad7a303f9aadb8edda": LibraryInfo(
"Contactable", ["v1.9.0", "v1.10.0", "v1.11.0"]
),
"379f3940245b3bf07e3da0ba8bacb31a7b71837a": LibraryInfo(
"DelayedClaimable", ["v1.9.0", "v1.10.0", "v1.11.0"]
),
"04a144226212c8093a72edac65132dfebf5cbc34": LibraryInfo("HasNoEther", ["v1.9.0"]),
"e581fe4461bda93a810cf8f56e985d7b17e5c57c": LibraryInfo(
"HasNoTokens", ["v1.9.0", "v1.10.0", "v1.11.0"]
),
"adca50311c8c516281fae62e7bf8711b247dd1fe": LibraryInfo("Heritable", ["v1.9.0"]),
"bff7a458838d22f59d77dcb1e4c8f71ad9e6c6ad": LibraryInfo("Ownable", ["v1.9.0"]),
"b92612ef15ec3b9d6df30a8f7becdc945bde3d4b": LibraryInfo("Whitelist", ["v1.9.0"]),
"c9ee90b58cfe7db8fb2093a5dc6ac901e3560376": LibraryInfo(
"RBAC", ["v1.9.0", "v1.9.1", "v1.10.0"]
),
"d07bdfe9e5c1197eaaeb8db19a60b2d7c8b08a88": LibraryInfo("RBACWithAdmin", ["v1.9.0"]),
"3bf165712333a39e76e159a3406fa49517afe215": LibraryInfo(
"Roles", ["v1.9.0", "v1.9.1", "v1.10.0", "v1.11.0"]
),
"7e998f3b5ecb8820313c1bb24dfb0d6d99ace954": LibraryInfo(
"PullPayment", ["v1.9.0", "v1.9.1", "v1.10.0"]
),
"74d3dda7f213a09504a9a9291a40a3dcd8365fbd": LibraryInfo("SplitPayment", ["v1.9.0"]),
"819441e9e704135b09b0b1f72db902159a737913": LibraryInfo(
"BasicToken", ["v1.9.0", "v1.9.1", "v1.10.0"]
),
"27dea92802e715fa1863d34fdd4d5c9c07f2447a": LibraryInfo(
"BurnableToken", ["v1.9.0", "v1.9.1", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"cddbea62966149d6c6e6709ab8568b3c4f0ad494": LibraryInfo("CappedToken", ["v1.9.0"]),
"cf6e58a034f1418d57a0f1952afb136e82102f94": LibraryInfo("DetailedERC20", ["v1.9.0"]),
"8d2f3828797c3e84f29d2c8cdb6ed25ee69511f6": LibraryInfo("ERC20", ["v1.9.0", "v1.9.1"]),
"953db1b3480bf572e44ad6fa898f6c6bf2eee57c": LibraryInfo(
"ERC20Basic", ["v1.9.0", "v1.9.1", "v1.10.0", "v1.11.0"]
),
"241b903da1f922131be0e2bdf10c4306082848ea": LibraryInfo("MintableToken", ["v1.9.0"]),
"b34956dcce7a77bd57b4fad7545ab5988bf8dbf1": LibraryInfo("SafeERC20", ["v1.9.0", "v1.9.1"]),
"de2af31e6fa1013b6f867fa12ccaa7696d9442d7": LibraryInfo(
"StandardBurnableToken", ["v1.9.0", "v1.9.1", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"50589279d9b57e6c0ad23388176dda20dc4c491e": LibraryInfo("StandardToken", ["v1.9.0", "v1.9.1"]),
"be03e255bc582a956bff757a7e1a8bad8bdc3361": LibraryInfo("TokenTimelock", ["v1.9.0"]),
"59d01319278f7765dd0e242d02c1ca82e6ba091a": LibraryInfo("TokenVesting", ["v1.9.0"]),
"012926dd9f55e8dfe9776b9f1df62546bca5ecc1": LibraryInfo(
"DeprecatedERC721", ["v1.9.0", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"30067e830dea40199578d0debf1d3d2c85b310df": LibraryInfo(
"ERC721Enumerable", ["v1.9.0", "v1.9.1"]
),
"4a83cf38bff15fc12b16638f7844fc0f8980f9f3": LibraryInfo(
"ERC721Metadata", ["v1.9.0", "v1.9.1", "v1.10.0"]
),
"2e8afdc67c556a384622e8f1518264a445a92b57": LibraryInfo(
"ERC721", ["v1.9.0", "v1.9.1", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"bb0256dd101e575fe0c2371482723f8e2c32c087": LibraryInfo("ERC721Basic", ["v1.9.0", "v1.9.1"]),
"a8eecb22ae520032234d75016dfcf803ba6fba82": LibraryInfo(
"ERC721BasicToken", ["v1.9.0", "v1.9.1"]
),
"5ce55c0eca12e6589b4ccef66917574890fdf1af": LibraryInfo(
"ERC721Holder", ["v1.9.0", "v1.9.1", "v1.10.0"]
),
"4646738364802bb2215ef7f4062cdc03bc33bc33": LibraryInfo("ERC721Receiver", ["v1.9.0", "v1.9.1"]),
"24749e32f3f9f241cbf61755cd27c4e1c33ec6ef": LibraryInfo("ERC721Token", ["v1.9.0"]),
"34e294455d0b633a92c85294e33391da976dfff2": LibraryInfo("ERC827", ["v1.9.0"]),
"5646047a82bc6b598f782b9ecfbe0ef37b1bde4b": LibraryInfo("ERC827Token", ["v1.9.0"]),
"ba598a71f86f1d7453d8d921680d7bd75d34a15d": LibraryInfo("SignatureBouncer", ["v1.9.1"]),
"af99a0bc53580c8d654923048cec891e61e24a6b": LibraryInfo("Pausable", ["v1.9.1"]),
"eaf939ca050feaf102dbd9835b6a67eb4b51e0b9": LibraryInfo("SignatureBouncerMock", ["v1.9.1"]),
"c998cfc7431ac0d0c66f70f0982b3e8659c6bfb9": LibraryInfo("DetailedERC20Mock", ["v1.9.1"]),
"a364bd1d78dd9528eb357f93c190db2652cbbd5c": LibraryInfo("ERC721TokenMock", ["v1.9.1"]),
"8b07a36751ac1e354baf93be047c852143a57119": LibraryInfo("PausableMock", ["v1.9.1"]),
"70b936df444e167029f22e8ef48b007bbe37d544": LibraryInfo("PausableTokenMock", ["v1.9.1"]),
"dc38f5ba7ca5eb5a8a85b7b0e9d8288a1e70e41d": LibraryInfo("RBACMock", ["v1.9.1"]),
"d1f6822833daab2b5c6521ee6aacc6303b946095": LibraryInfo(
"ERC20FailingMock", ["v1.9.1", "v1.10.0", "v1.11.0", "v1.12.0"]
),
"87310193da0df53c2be5ff230d2704011a0806a5": LibraryInfo("ERC20SucceedingMock", ["v1.9.1"]),
"d1dd6a62116d8605377f70bb5de6f2c70ced3d81": LibraryInfo("Ownable", ["v1.9.1"]),
"be72653e125b02bb575d00a9a8db2b40aaa6bc9f": LibraryInfo("RBACWithAdmin", ["v1.9.1"]),
"7c353bddb33d9c15e9aebfb843a1e5d63645f267": LibraryInfo("SplitPayment", ["v1.9.1"]),
"a0b88b77efc2a12f98310d83fa335fa5564cca08": LibraryInfo("DetailedERC20", ["v1.9.1"]),
"feb56e7c42453ae5639cbbcae4b8d8e5c59447c2": LibraryInfo("DetailedMintableToken", ["v1.9.1"]),
"cea5d86a5cdca1d9dd226d199d740a3d3cd32d07": LibraryInfo("DetailedPremintedToken", ["v1.9.1"]),
"6bed3b69e3391bded476aabdd2c5f861819e73f8": LibraryInfo("MintableToken", ["v1.9.1"]),
"46ebd57a637d411818418140d0aa63dbf1cc2246": LibraryInfo("PausableToken", ["v1.9.1"]),
"5cc2a3e344df53e317dbe38e76ac94695a38e9e0": LibraryInfo("TokenTimelock", ["v1.9.1"]),
"3e7d8f34659881bc3b2ca951668372a47f79193d": LibraryInfo("TokenVesting", ["v1.9.1"]),
"e197b8a76f56af18f47f67a89005390e3bd55694": LibraryInfo("ERC721Token", ["v1.9.1"]),
"1b53bd5e5472c4a818e266b64d0f9e6fd49857cb": LibraryInfo("MintableERC721Token", ["v1.9.1"]),
"ec78d7ca528901ef6910c0f44ab705b870742c90": LibraryInfo("Migratable", ["v1.9.1"]),
"fc413be3907db5515f084a8fff63bcc8c5635400": LibraryInfo("AddressUtils", ["v1.10.0"]),
"31c153b4c6b900b16219cae11feef97ce4076143": LibraryInfo(
"LimitBalance", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"962b05e5b0824201f5aedc58501637db05b154a3": LibraryInfo("MerkleProof", ["v1.10.0"]),
"b08f9ebec900e55ba7b20624dad0097bc243c12a": LibraryInfo("Crowdsale", ["v1.10.0"]),
"5124365778e24aa55c9e06bdf26149d4310d95d0": LibraryInfo(
"PostDeliveryCrowdsale", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"57737cab20c3fada86461ebe4df4b14d7d515b7a": LibraryInfo("RefundableCrowdsale", ["v1.10.0"]),
"1fdb50fd86681dfa181c490bcdef28171be6e6f3": LibraryInfo("RefundVault", ["v1.10.0"]),
"cde035237ef2f07d69f3756cd9d1305cda39f749": LibraryInfo("AllowanceCrowdsale", ["v1.10.0"]),
"e7b6247a1c2be98eb8a1c56486c3f17dc60b98ed": LibraryInfo(
"MintedCrowdsale", ["v1.10.0", "v1.11.0"]
),
"e318ca5d228fcbbd844491efd5fee829e32c53ac": LibraryInfo(
"IncreasingPriceCrowdsale", ["v1.10.0", "v1.11.0"]
),
"e9b16e3a549af2c8cd56090702d269b432a80283": LibraryInfo(
"CappedCrowdsale", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"bdaaf0e469b346ce4d51c3fe15d14a4b02bc990e": LibraryInfo(
"IndividuallyCappedCrowdsale", ["v1.10.0", "v1.11.0"]
),
"eff0fd34b36c459c2d98f5a04a7b04fff08674e0": LibraryInfo(
"TimedCrowdsale", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"8a1c7e2eda5d6444d767db6e960beb998e94e523": LibraryInfo("WhitelistedCrowdsale", ["v1.10.0"]),
"35690875b56b9ef06dc5c82640a067bd9132901c": LibraryInfo(
"RBACWithAdmin", ["v1.10.0", "v1.11.0"]
),
"c5dfbb1d2f9641afa4f031f2f600f697e9a77b05": LibraryInfo(
"SampleCrowdsaleToken", ["v1.10.0", "v1.11.0"]
),
"9f752a8cbc435f39d6c36760d3fff29d99d079c4": LibraryInfo(
"SampleCrowdsale", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"edca9f3d7957cef23f6f3209af3eee94ea523194": LibraryInfo("SimpleSavingsWallet", ["v1.10.0"]),
"f844de78dd748876a43a33fa9a6caccbe3fb511a": LibraryInfo("SimpleToken", ["v1.10.0"]),
"0c02b9e264482b9501239880d508d2fc45a921c7": LibraryInfo("Destructible", ["v1.10.0", "v1.11.0"]),
"d66ff49a491298f7d0aadc302cce5b80e20397c1": LibraryInfo(
"TokenDestructible", ["v1.10.0", "v1.11.0"]
),
"ee4d3ec37306122ceeec79f60680a632176509b0": LibraryInfo("SafeMath", ["v1.10.0", "v1.11.0"]),
"1e3619093d26ad06a7fd448a3e4db543de00d219": LibraryInfo(
"AllowanceCrowdsaleImpl", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"565c175208220601b83adfeaca95bb41efe016c3": LibraryInfo(
"BasicTokenMock", ["v1.10.0", "v1.11.0"]
),
"635c6422d4af70e8ffe48d54148f457329870eaa": LibraryInfo(
"BurnableTokenMock", ["v1.10.0", "v1.11.0"]
),
"e7177cb6bde32587072093fece1269add34133cc": LibraryInfo(
"CappedCrowdsaleImpl", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"63f108c805f519b16c8db619e7274d4937aad376": LibraryInfo(
"DetailedERC20Mock", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"fb554453f065e88a35f0d412de76fe4e83686366": LibraryInfo(
"ERC223TokenMock", ["v1.10.0", "v1.11.0"]
),
"e288225fc414795b7697952164f0e2a02fb89e97": LibraryInfo("ERC721ReceiverMock", ["v1.10.0"]),
"774d1a89a0f8fbb420f6a6586b9328e6853d5f7e": LibraryInfo(
"ERC721TokenMock", ["v1.10.0", "v1.11.0"]
),
"8d29283dd9ef9bde0001ebf6a7c765a6af12bc68": LibraryInfo("ERC827TokenMock", ["v1.10.0"]),
"7449c745206ac15d5192ba7a16bed39819a50113": LibraryInfo(
"FinalizableCrowdsaleImpl", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"60704a7554b0ad4ee9d0626bcbbadbac87d8d270": LibraryInfo(
"ForceEther", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"b339de538541166e1bf3390a1b07fef171e03b00": LibraryInfo(
"HasNoEtherTest", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"80198840976a3fdcdcf2fa5a8d9454b1e39004de": LibraryInfo(
"IncreasingPriceCrowdsaleImpl", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"9628906154701c6e5306e6da622b4db92cc6f6ec": LibraryInfo(
"IndividuallyCappedCrowdsaleImpl", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"cd5924adb9ef87e99bcd94ae9ae57b7a6897b1e0": LibraryInfo(
"MerkleProofWrapper", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"1f6d4d30c38abd953fca5a89b5193e10df9d1751": LibraryInfo(
"MessageHelper", ["v1.10.0", "v1.11.0"]
),
"0a1706f232f69f32bf2954b566c7c2c14d69392d": LibraryInfo(
"MintedCrowdsaleImpl", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"c684d5ce1dd245aa8c912952594a373f977c76e7": LibraryInfo(
"PausableMock", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"3be1ec9b4f338c96d86b894ba8ceb846fb647c23": LibraryInfo(
"PausableTokenMock", ["v1.10.0", "v1.11.0"]
),
"b28308433da65d22476951196f1caeb41f26cf33": LibraryInfo(
"PostDeliveryCrowdsaleImpl", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"559fa0817335651783601a27dde5faf21fc686b0": LibraryInfo("PullPaymentMock", ["v1.10.0"]),
"8107d16875287a7046493571b10dd5eab0d97976": LibraryInfo("RBACMock", ["v1.10.0", "v1.11.0"]),
"07e16eeb1ec64a6995695ed1816a95243000f8a8": LibraryInfo("ReentrancyMock", ["v1.10.0"]),
"f0bd68476f483619630828a8419d39ac57d0f49b": LibraryInfo(
"RefundableCrowdsaleImpl", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"2b40af803f1243f59805beb75d2afadf5fdb84a7": LibraryInfo(
"ERC20SucceedingMock", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"3c6b59e930edaae5e84ee9338017b301d7fc12b4": LibraryInfo("SafeERC20Helper", ["v1.10.0"]),
"695a35876abcaf66f60903ec69331e522a9001f8": LibraryInfo(
"StandardBurnableTokenMock", ["v1.10.0", "v1.11.0"]
),
"07eb9f220d92b3b0a026d03abe31782e18b8a3aa": LibraryInfo(
"StandardTokenMock", ["v1.10.0", "v1.11.0"]
),
"13a503e0871b386c82691937b1cdca7542f35bbd": LibraryInfo(
"TimedCrowdsaleImpl", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"f401c66a3d208ecf85040784b4eb8bb14e20d0e7": LibraryInfo(
"WhitelistedCrowdsaleImpl", ["v1.10.0"]
),
"93407117e15d8a7a63deaf473df32c73518a30ea": LibraryInfo("HasNoEther", ["v1.10.0"]),
"baa2d89bbdb2edb622a4c9c1fdc23a6642d899c4": LibraryInfo("Heritable", ["v1.10.0"]),
"211a4479365db5f0eaa4377da409e42db4a25b52": LibraryInfo("Ownable", ["v1.10.0"]),
"ff57312417ac31bd0332308e65ef44f4d4062111": LibraryInfo(
"Superuser", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"2db796d1517717fca1dd3983832f3a45f390ab55": LibraryInfo("Whitelist", ["v1.10.0"]),
"2ee8d28f85d2697054414783e221260b9a7f6c97": LibraryInfo("SplitPayment", ["v1.10.0", "v1.11.0"]),
"cd31a5ef466eeb34195d244e35a3c87b253e9788": LibraryInfo("CappedToken", ["v1.10.0"]),
"405f965e67819b1bd2a94f8c121e66fccb198b8d": LibraryInfo(
"DetailedERC20", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"1fafc8de20663f8ceaa7386a89b7c9e5dce82a3f": LibraryInfo("ERC20", ["v1.10.0", "v1.11.0"]),
"dfac014d93a70a21a3b8b97e3d1b57efd14fe545": LibraryInfo(
"MintableToken", ["v1.10.0", "v1.11.0"]
),
"c9027d7b556e7e687bec0304ffaecf1d474eabfa": LibraryInfo(
"PausableToken", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"968207fdc2ce386ab24cac2101d8d0e7f9eb7417": LibraryInfo(
"RBACMintableToken", ["v1.10.0", "v1.11.0"]
),
"87f48da5d43ba18ca15d7347a5626cc37cf01dac": LibraryInfo("SafeERC20", ["v1.10.0", "v1.11.0"]),
"ab442d8dd4ecf1d472d9dce47ea1157c27d0a44e": LibraryInfo("StandardToken", ["v1.10.0"]),
"075e8adaeaed593aad3e14ca9820df4e55e364e2": LibraryInfo(
"TokenTimelock", ["v1.10.0", "v1.11.0"]
),
"1fcb0b4c52970b0f395e2da5bc6595daa71daff2": LibraryInfo("TokenVesting", ["v1.10.0", "v1.11.0"]),
"ef375977e93dc6aeae3256bc5a0c0ed23a734df8": LibraryInfo(
"ERC721Enumerable", ["v1.10.0", "v1.11.0", "v1.12.0"]
),
"15405a8487b11120873f75247b1ab5461f1ed8c7": LibraryInfo("ERC721Basic", ["v1.10.0"]),
"4a3380e9127e514a0630ea0656facdebfe716acc": LibraryInfo("ERC721BasicToken", ["v1.10.0"]),
"1c47823ad3c15275bfd34a4c1a66525fca5454bd": LibraryInfo("ERC721Receiver", ["v1.10.0"]),
"95a8f9396ea8cbc14f6cca9a8b6492fbf2437f18": LibraryInfo("ERC721Token", ["v1.10.0"]),
"9fcc86aa8a8ae5217bd10cce1a954c5cb7caac82": LibraryInfo("ERC827", ["v1.10.0"]),
"68b878162744df8ddb16479dd790341cafce251f": LibraryInfo("ERC827Token", ["v1.10.0"]),
"9c4ab3267a3dc0ce51b3baee28fae5006a3be725": LibraryInfo("AddressUtils", ["v1.11.0"]),
"452fe8fdaa7d15bbe79e9ab641f3307b1bece216": LibraryInfo("Bounty", ["v1.11.0"]),
"4b73fc34d4fe601e4c4065e08ec11fc8c3a1ad18": LibraryInfo("ECRecovery", ["v1.11.0"]),
"19ced19ab2d8edf9fe46282e242d8b52a09f7bd6": LibraryInfo("MerkleProof", ["v1.11.0"]),
"4e1211d90f62f0b3d59bb318ac744ac95e6f6317": LibraryInfo("SignatureBouncer", ["v1.11.0"]),
"48d836f14524ef04eccac96647887425545781c0": LibraryInfo("Whitelist", ["v1.11.0"]),
"ee718ffb3fe3609d882556704f41c62311effe27": LibraryInfo("Crowdsale", ["v1.11.0"]),
"6bea0f0c1a89ad2622afba8f47a0af62c2799629": LibraryInfo(
"RefundableCrowdsale", ["v1.11.0", "v1.12.0"]
),
"8da34d0e919bf9d1a2b1da81e797a6c2c1ed60b4": LibraryInfo(
"AllowanceCrowdsale", ["v1.11.0", "v1.12.0"]
),
"8bf8cb311ea7d15c8ddaf54454e60ce44a60bdf4": LibraryInfo("WhitelistedCrowdsale", ["v1.11.0"]),
"a1419a713627dbb2ffea8a68c616e0a051f1b606": LibraryInfo("SimpleSavingsWallet", ["v1.11.0"]),
"0b8d54f5efc4de837b7dd93996db086849cb14da": LibraryInfo("SimpleToken", ["v1.11.0"]),
"a7e1df3805ef75dc41a754ae5546f06fec8cb03f": LibraryInfo("ERC165", ["v1.11.0", "v1.12.0"]),
"5e7625321628749b31d4c4cc45e2d90b556d6409": LibraryInfo(
"SupportsInterfaceWithLookup", ["v1.11.0"]
),
"c1351bcccd9852179bfd81b241caaa056de4be3b": LibraryInfo("SignatureBouncerMock", ["v1.11.0"]),
"cd6add9c23aeffa94971107e162281b260df91dd": LibraryInfo(
"ConditionalEscrowMock", ["v1.11.0", "v1.12.0"]
),
"5b43908bda2ed2a2abd97bdc0c726f4e0a994686": LibraryInfo("ERC20WithMetadataMock", ["v1.11.0"]),
"afd20cd7880b7afcab66a1177bea6b85ba76ae80": LibraryInfo(
"ERC721ReceiverMock", ["v1.11.0", "v1.12.0"]
),
"a53e6a8705e545971a03677411de3e3e2fa21104": LibraryInfo("PullPaymentMock", ["v1.11.0"]),
"66ac45d59afe1d96a3512f788c9f1742c8d6948e": LibraryInfo("RBACCappedTokenMock", ["v1.11.0"]),
"65022b9fefebb8d6c04e9d7c6869843a504cb607": LibraryInfo(
"ReentrancyAttack", ["v1.11.0", "v2.0.0", "v2.0.1"]
),
"429c0d0af89af3652ab701919da11ce73a98d37d": LibraryInfo(
"ReentrancyMock", ["v1.11.0", "v2.0.0", "v2.0.1"]
),
"b956eb0e6216174795f2ee06204c7da650e845b8": LibraryInfo(
"SafeERC20Helper", ["v1.11.0", "v1.12.0"]
),
"c2ef9875134777ad5fb22ebdc123e383caafbd19": LibraryInfo(
"SupportsInterfaceWithLookupMock", ["v1.11.0", "v1.12.0"]
),
"aaeffe18854cb829f1a400a2d89f0b625a5b345d": LibraryInfo("WhitelistMock", ["v1.11.0"]),
"ed2e1b404135b09fe5f0d79f95dbe33b78b587f0": LibraryInfo(
"WhitelistedCrowdsaleImpl", ["v1.11.0", "v1.12.0"]
),
"319335756a88f45e8684a029ca1c8bc0a311da2a": LibraryInfo("HasNoEther", ["v1.11.0"]),
"5527c4a0bee8b4bb21e2b8f3aef283d724dc62f6": LibraryInfo("Heritable", ["v1.11.0"]),
"d2e619214bc724aeb273d48e420db453b3ffe31d": LibraryInfo("Ownable", ["v1.11.0", "v1.12.0"]),
"4ace23c2264121b28731efcf28cd3552e6fca588": LibraryInfo("RBAC", ["v1.11.0"]),
"2bfe51db8ee661f769d98f9ae45361a9b8f6e0ec": LibraryInfo(
"ConditionalEscrow", ["v1.11.0", "v1.12.0"]
),
"627f53ee54bf4c94d1cad825b7ae55998a65bc9d": LibraryInfo("Escrow", ["v1.11.0", "v1.12.0"]),
"78f1f3f29386d9b09253ca23087eae02c2efedcd": LibraryInfo("PullPayment", ["v1.11.0", "v1.12.0"]),
"142c5a368e011d0578205a2fb5f776b4937605df": LibraryInfo("RefundEscrow", ["v1.11.0", "v1.12.0"]),
"392ccebdf4b62992e7460dc3f65064cb5d042a45": LibraryInfo(
"ERC20TokenMetadata", ["v1.11.0", "v1.12.0"]
),
"4a35664713c0831432f0f44b72df33f7eed2248a": LibraryInfo("ERC20WithMetadata", ["v1.11.0"]),
"38c60461bba3a6795a0459e3de0c035ee1d1a53e": LibraryInfo("BasicToken", ["v1.11.0"]),
"917071f9daeb837c90acc2222568398b048b95f6": LibraryInfo("CappedToken", ["v1.11.0", "v1.12.0"]),
"2b6593f6ad447e65d848bc4bfec26e9a8b34557e": LibraryInfo("StandardToken", ["v1.11.0"]),
"3e6344b21675b204f35c12801cea0dfe18d4d298": LibraryInfo(
"ERC721Metadata", ["v1.11.0", "v1.12.0"]
),
"ed3cce364a25058da857c468423935a1b5fde50d": LibraryInfo("ERC721Basic", ["v1.11.0"]),
"1a45edece56696e721cddc98e8f6703a1d8bbf9b": LibraryInfo("ERC721BasicToken", ["v1.11.0"]),
"cb15d8841ffa1b27b982e31901772957f6123aad": LibraryInfo("ERC721Holder", ["v1.11.0"]),
"715d07f7f060007413defdb6fd5c6934486f34f7": LibraryInfo("ERC721Receiver", ["v1.11.0"]),
"0144a17b7f1ed3cd662df4069296e2e1c32c8dd8": LibraryInfo("ERC721Token", ["v1.11.0"]),
"0450b83815a1e26a02b54c4233ac7aa4cf053ea9": LibraryInfo("AddressUtils", ["v1.12.0"]),
"d583f3e45f2c243e55ee47a107a29bb9e972fe68": LibraryInfo("AutoIncrementing", ["v1.12.0"]),
"a8144e43cf0c0c8b0bb54dcedb0531639e4d00d8": LibraryInfo("Bounty", ["v1.12.0"]),
"d3f87956fa5f05f54106216a9c4a8079ba8d086a": LibraryInfo("ECRecovery", ["v1.12.0"]),
"094905728bfb1ba7462642ae7ce245c709717531": LibraryInfo("MerkleProof", ["v1.12.0"]),
"3cb4bc1e9a9a34a46858922cba2f0af59d767054": LibraryInfo("ReentrancyGuard", ["v1.12.0"]),
"c00a7c93b18d897e6ebf868e0b093ed6ace719dd": LibraryInfo("SignatureBouncer", ["v1.12.0"]),
"a1b464a6a3a1bbbd2fe33b5c231eba11236fa92e": LibraryInfo("Whitelist", ["v1.12.0"]),
"12a2f840294d267c6950a1347b726222b416ed46": LibraryInfo("RBAC", ["v1.12.0"]),
"50dd834b3d24a0bab1361fb858cbc51cf67ccbcf": LibraryInfo("Roles", ["v1.12.0"]),
"e11c891ecfb38b3bc7f4cf1363aae79feb99cf12": LibraryInfo("Crowdsale", ["v1.12.0"]),
"8b5f8bc529ee24fd54869c1d3dcfc18990a59548": LibraryInfo("FinalizableCrowdsale", ["v1.12.0"]),
"2b6997bc5d0b3be1d0e2c1869353383a2fbd4993": LibraryInfo("MintedCrowdsale", ["v1.12.0"]),
"59ed05ce0be380f62d4a3999c32428497594e327": LibraryInfo(
"IncreasingPriceCrowdsale", ["v1.12.0"]
),
"8a8a532f2e3ea4c08ff27af946fe20298a1e45ae": LibraryInfo(
"IndividuallyCappedCrowdsale", ["v1.12.0"]
),
"8a9c055e3d1349a664caa802eb204cd198a0f539": LibraryInfo("WhitelistedCrowdsale", ["v1.12.0"]),
"230848a3836ccef1f4430b0bf203cd21f8052291": LibraryInfo("RBACWithAdmin", ["v1.12.0"]),
"0ce489b153032a7ee90ed0eddca2c52daef1abf3": LibraryInfo("SimpleSavingsWallet", ["v1.12.0"]),
"1a2d42f20aef6df99897db234b801340a423450c": LibraryInfo("SimpleToken", ["v1.12.0"]),
"90d9d40b3412f59732a2bb622a88a4bc36f6b821": LibraryInfo(
"SupportsInterfaceWithLookup", ["v1.12.0"]
),
"2321441ae68a4e14b2306c7575958449a3c29b98": LibraryInfo("Destructible", ["v1.12.0"]),
"ad31f71ee52649c94cb438200fd1c1ed08094bf5": LibraryInfo("Pausable", ["v1.12.0"]),
"53f24a0ac15b157dbbc3f61d5c1408998c1db0ef": LibraryInfo("TokenDestructible", ["v1.12.0"]),
"2ff3848281b684d98af5b73bd62d933ad9795e1b": LibraryInfo("Math", ["v1.12.0"]),
"5b9701e018c1d6a97bc507e5c00433246ac7f025": LibraryInfo("SafeMath", ["v1.12.0"]),
"a03dbbc1c4f0ae5e64d672d84690dc48152e2650": LibraryInfo("AutoIncrementingImpl", ["v1.12.0"]),
"977f8bdafbecf36f639f00746a506a0665e14ee8": LibraryInfo("BasicTokenMock", ["v1.12.0"]),
"68cd257584aa39dab35cc08947cb4aabe9ce852f": LibraryInfo("SignatureBouncerMock", ["v1.12.0"]),
"f08f0cd0d441234b1b15fa1cc1aeed01d651523c": LibraryInfo("BurnableTokenMock", ["v1.12.0"]),
"482f4acdd6c3523e078f68f3905f8e9c0bd96f85": LibraryInfo("DestructibleMock", ["v1.12.0"]),
"e5b1031669b3bfd06fb12626a47888243c07c469": LibraryInfo("ECRecoveryMock", ["v1.12.0"]),
"d439e3f9b056d304aba764b34c2623b4600c55fb": LibraryInfo("ERC20WithMetadataMock", ["v1.12.0"]),
"22f1d1e0932e3558eef115f3e867619c135b5a26": LibraryInfo("ERC223TokenMock", ["v1.12.0"]),
"c37afaa6e4b7ab6775e3c9b3b2c1b848ee3e0548": LibraryInfo("ERC721TokenMock", ["v1.12.0"]),
"fa28e9b84c25de3655f8068c07f5ae030f00705c": LibraryInfo("MathMock", ["v1.12.0"]),
"41437f07fa0866525684129c46b107cf2a28d9dc": LibraryInfo("MessageHelper", ["v1.12.0"]),
"e781977728414ecb0dc389712cbaea2f3c1b2401": LibraryInfo("PausableTokenMock", ["v1.12.0"]),
"c5cbc9122a21b464aec57faf3e8b783f455f3175": LibraryInfo("PullPaymentMock", ["v1.12.0"]),
"10618dab995da34a38ef8e7d53b069a7b0bda621": LibraryInfo("RBACCappedTokenMock", ["v1.12.0"]),
"9fae112623b416c1c3a847d6de92967854f4e3ba": LibraryInfo("RBACMock", ["v1.12.0"]),
"84992bb16c0aa52e586c7ce43af9f8ef80d71382": LibraryInfo("ReentrancyAttack", ["v1.12.0"]),
"ec8922620cd3664ea34d9295aa85c64b77b61c0c": LibraryInfo("ReentrancyMock", ["v1.12.0"]),
"2cddebeab16c4e11f6457eae79615514d0467224": LibraryInfo("SafeMathMock", ["v1.12.0"]),
"ed5496d88df044b594a28d8b4e2b02aa8c5c98a9": LibraryInfo(
"StandardBurnableTokenMock", ["v1.12.0"]
),
"4b79de8b6a7b868ac3db16c36c7caf1511dc4e9c": LibraryInfo("StandardTokenMock", ["v1.12.0"]),
"207467653a042b1e3f796be82daa00deae4be4e0": LibraryInfo("WhitelistMock", ["v1.12.0"]),
"3b64fac09338834e7f31e4a94857c405644ad27a": LibraryInfo("CanReclaimToken", ["v1.12.0"]),
"39458b20c5ba02b89578bdb4d0569fdedbb89449": LibraryInfo("Claimable", ["v1.12.0"]),
"30b2eb1b65dfd72e93c6370eec1b66cbc77514b6": LibraryInfo("Contactable", ["v1.12.0"]),
"d08d45bef636d729b4781cee2671f02dfc65cd46": LibraryInfo("DelayedClaimable", ["v1.12.0"]),
"733f7047e97a7426847cbc4176463ee020cf48d6": LibraryInfo("HasNoContracts", ["v1.12.0"]),
"4a4e894cd3cd3cfa4dcbcbd9568f81d20cd4e307": LibraryInfo("HasNoEther", ["v1.12.0"]),
"b025cfaf6f8e5da5efafe9883f25f18bab015a1f": LibraryInfo("HasNoTokens", ["v1.12.0"]),
"98a5d657fe6eb93bcdb660880496f6c163e654c1": LibraryInfo("Heritable", ["v1.12.0"]),
"8d77727ba855420961ee128de2676fec22402a03": LibraryInfo("SplitPayment", ["v1.12.0"]),
"55799f56ada0b8e0bcc75ecce38851eeb1332d8a": LibraryInfo("ERC20WithMetadata", ["v1.12.0"]),
"3c34d6a7f6c127303531d7e54e94a47fe0e30e82": LibraryInfo("BasicToken", ["v1.12.0"]),
"c784fa49f4c22ac28509c8b0d54381eabcc00a99": LibraryInfo("ERC20", ["v1.12.0"]),
"d89b847b33cf7f9529f426c6ed57e4b12cadda40": LibraryInfo("ERC20Basic", ["v1.12.0"]),
"c992e0acf64fafaea8a3158d8d80b84e22b3aaca": LibraryInfo("MintableToken", ["v1.12.0"]),
"bec3d2b20fa3b24ef5ac434c4a01b47b1e64a134": LibraryInfo("RBACMintableToken", ["v1.12.0"]),
"60e42b733ad56c03b8addc0df215791b1338c01e": LibraryInfo("SafeERC20", ["v1.12.0"]),
"ee8d24c22c925406ad22c22adab9654866eafdf3": LibraryInfo("StandardToken", ["v1.12.0"]),
"28a8c7bb0a04847910d3f9eead16d6d449620534": LibraryInfo("TokenTimelock", ["v1.12.0"]),
"1d8a3c508c18473083cb5db9961a36ba1a7f796e": LibraryInfo("TokenVesting", ["v1.12.0"]),
"c29ab0fd5418aa6c45a6e82f4d5a4f1477241875": LibraryInfo("ERC721Basic", ["v1.12.0"]),
"40d61fc659d2cba425f99f5b2656eb37b35731a4": LibraryInfo("ERC721BasicToken", ["v1.12.0"]),
"bb10ec6ee3cdd5386ecfd6de333f1eeb6a377689": LibraryInfo("ERC721Holder", ["v1.12.0"]),
"950c07b39c3ca854d94e48357f5d453e4c9c1965": LibraryInfo("ERC721Receiver", ["v1.12.0"]),
"6a9692e0a456886959918a48694dcd3dcb8baf5f": LibraryInfo("ERC721Token", ["v1.12.0"]),
"f0a61efe61df17f5559adaead1964139182d7dbf": LibraryInfo("Roles", ["v2.0.0", "v2.0.1"]),
"0d6fbe8089bfed5e4961f8bc56d5c8fb7be2dbda": LibraryInfo("CapperRole", ["v2.0.0", "v2.0.1"]),
"c7189a4af9a64378f15e69b14fc8e8b9cf99779a": LibraryInfo("MinterRole", ["v2.0.0", "v2.0.1"]),
"61a08e1edc53903eaeda23582b34825c0a67d23c": LibraryInfo("PauserRole", ["v2.0.0", "v2.0.1"]),
"d775bbc48440cc258eaa96091fcb81fa08bad123": LibraryInfo("SignerRole", ["v2.0.0", "v2.0.1"]),
"de16a5f2763080c0e057578a3cca2c570af9d066": LibraryInfo("Crowdsale", ["v2.0.0", "v2.0.1"]),
"567baa80771bce105326a8b76f150738e6a10db3": LibraryInfo(
"FinalizableCrowdsale", ["v2.0.0", "v2.0.1"]
),
"ffd73415ed9b47f97e48f5b42212bb055b4d21ed": LibraryInfo(
"PostDeliveryCrowdsale", ["v2.0.0", "v2.0.1"]
),
"ab93b46587fb58c1adb6cbd580ca17412917b74e": LibraryInfo(
"RefundableCrowdsale", ["v2.0.0", "v2.0.1"]
),
"a3a1fa663a64dda4b8c95f50c518bad87f75541e": LibraryInfo(
"AllowanceCrowdsale", ["v2.0.0", "v2.0.1"]
),
"656d0767acf97048298609648350fd1b019442a7": LibraryInfo(
"MintedCrowdsale", ["v2.0.0", "v2.0.1"]
),
"9ab95e8d5b012575e490704b512ce4928dbee629": LibraryInfo(
"IncreasingPriceCrowdsale", ["v2.0.0", "v2.0.1"]
),
"41f26f62f9f5227b1b6dbf65a6196c226e0939c8": LibraryInfo(
"CappedCrowdsale", ["v2.0.0", "v2.0.1"]
),
"b8bd1ce8e8a33223abedb3548de7c2f989969ebc": LibraryInfo(
"IndividuallyCappedCrowdsale", ["v2.0.0", "v2.0.1"]
),
"7b2a6e8e9aa71fb6a5d28b20399b0f5dccbd5463": LibraryInfo("TimedCrowdsale", ["v2.0.0", "v2.0.1"]),
"e6060cd66b2d3908f948ae9b850e85c3464ea305": LibraryInfo("ECDSA", ["v2.0.0", "v2.0.1"]),
"0260526f527ee9224774358021b9859015296518": LibraryInfo("MerkleProof", ["v2.0.0", "v2.0.1"]),
"1b7e98ea211e7445e5f678fa148ea775af49b6e1": LibraryInfo("Counter", ["v2.0.0", "v2.0.1"]),
"5be5fa4c91b2869c02f52a199e21be5806044560": LibraryInfo(
"ERC20TokenMetadata", ["v2.0.0", "v2.0.1"]
),
"d769c77787738e2e01649f5b5b943fb06ed9b8a9": LibraryInfo(
"ERC20WithMetadata", ["v2.0.0", "v2.0.1"]
),
"423800580427804d9eca8b706c43dc0297e37614": LibraryInfo("ERC20Migrator", ["v2.0.0", "v2.0.1"]),
"8d7f569e100340e8ba17eaedc939ff68b406b05e": LibraryInfo(
"SignatureBouncer", ["v2.0.0", "v2.0.1"]
),
"b66a976d5f147079fb9c7f0a12415e008f585598": LibraryInfo("TokenVesting", ["v2.0.0", "v2.0.1"]),
"3f9165306b2f53880ed5096af1b4e74db56da9bf": LibraryInfo(
"SampleCrowdsaleToken", ["v2.0.0", "v2.0.1"]
),
"1265d4f6bf6767e10033e733858ee6fa32a9073c": LibraryInfo(
"SampleCrowdsale", ["v2.0.0", "v2.0.1"]
),
"3c7f94391a02d5dc6f8f262ec96b3bc2a4b25640": LibraryInfo("SimpleToken", ["v2.0.0", "v2.0.1"]),
"713380dc6ccc9d47f8d31a25eb0e446ebc4b4863": LibraryInfo("ERC165", ["v2.0.0", "v2.0.1"]),
"c281f8016ab3d891630a35bd07f11dff97431234": LibraryInfo("ERC165Checker", ["v2.0.0", "v2.0.1"]),
"1d4d0241d585c68fb08c1599437a4eea11eeab02": LibraryInfo("IERC165", ["v2.0.0", "v2.0.1"]),
"313e8327db21cc8aa166fe5721eb99a46e4fa19c": LibraryInfo("Pausable", ["v2.0.0", "v2.0.1"]),
"3d6ac03389ed6c835e26b7ebd8cd6f5bbc37934a": LibraryInfo("Math", ["v2.0.0", "v2.0.1"]),
"8580d3e0df2d45ed48cbd99d42c0934038129cf7": LibraryInfo("SafeMath", ["v2.0.0", "v2.0.1"]),
"113210a137c1be5187dcb3918a2a521d63f540cf": LibraryInfo("AddressImpl", ["v2.0.0", "v2.0.1"]),
"e09a6efec62a3a1d426fcf5bf0a6ef150cadb36d": LibraryInfo(
"AllowanceCrowdsaleImpl", ["v2.0.0", "v2.0.1"]
),
"34f5dc1d6acd84e2efeba46c180527f251dadcca": LibraryInfo("ArraysImpl", ["v2.0.0", "v2.0.1"]),
"5fe750839b60d2691dfc55d926090028b5003043": LibraryInfo(
"CappedCrowdsaleImpl", ["v2.0.0", "v2.0.1"]
),
"39412da7b5fdc81977acbda550e8dc71f6dba41b": LibraryInfo("CapperRoleMock", ["v2.0.0", "v2.0.1"]),
"717e4d2b812a14a6c4d5658cb94dcc835a0af6f9": LibraryInfo(
"ConditionalEscrowMock", ["v2.0.0", "v2.0.1"]
),
"85e956ec45ece826f1c53505c1f035f3329fe0ad": LibraryInfo("CounterImpl", ["v2.0.0", "v2.0.1"]),
"7ab9fe5373ce944504f2893349ea086b216b71a8": LibraryInfo("CrowdsaleMock", ["v2.0.0", "v2.0.1"]),
"c321c20499e195867282851da42f2ccbbdb96167": LibraryInfo(
"ERC20DetailedMock", ["v2.0.0", "v2.0.1"]
),
"5e0bcabbb2cfd18eb2d43ff6fd8d8e20dbeeb019": LibraryInfo("ECDSAMock", ["v2.0.0", "v2.0.1"]),
"a5da195613c182f94167d833dec5c7d4da0b5ba7": LibraryInfo(
"SupportsInterfaceWithLookupMock", ["v2.0.0", "v2.0.1"]
),
"bc1a4e4cfd066ef11bc6e2465ddec0f3fd4d51c4": LibraryInfo(
"ERC165InterfacesSupported", ["v2.0.0", "v2.0.1"]
),
"29cd8653e4b4504f0999a2454d9abf1f945de8f9": LibraryInfo(
"ERC165NotSupported", ["v2.0.0", "v2.0.1"]
),
"ae16304dfc91c51729a425eaf772ae8d08593dae": LibraryInfo(
"ERC165CheckerMock", ["v2.0.0", "v2.0.1"]
),
"aea815c696fff49c7fc52185b0523a33f7371b49": LibraryInfo("ERC165Mock", ["v2.0.0", "v2.0.1"]),
"b7b9d98b25d14185d4e3c2986c7a5a39b1f0781d": LibraryInfo(
"ERC20BurnableMock", ["v2.0.0", "v2.0.1"]
),
"2399138dd71e45eaa2b5496aa7c751e39304ff91": LibraryInfo(
"ERC20MintableMock", ["v2.0.0", "v2.0.1"]
),
"069f9a6dfd87e2586b4fab42ca29e826310646ea": LibraryInfo("ERC20Mock", ["v2.0.0", "v2.0.1"]),
"a5c6bf38e0fa04c8d470478a4bb8a3076e00e6e0": LibraryInfo(
"ERC20PausableMock", ["v2.0.0", "v2.0.1"]
),
"9a8f6b3985ad17fe0cadbda553573df4e4731e7e": LibraryInfo(
"ERC20WithMetadataMock", ["v2.0.0", "v2.0.1"]
),
"947e9e69d2016cebb10ee296f0f6495090671a21": LibraryInfo("ERC721FullMock", ["v2.0.0", "v2.0.1"]),
"3ca707c71f9022105f61b352c598c256703178f2": LibraryInfo(
"ERC721MintableBurnableImpl", ["v2.0.0", "v2.0.1"]
),
"7c3cb25da3236a7c5738e31d410df75d16af096c": LibraryInfo("ERC721Mock", ["v2.0.0", "v2.0.1"]),
"cb9a0e0a90469cd5b4e5aca0a818330f486bc3f9": LibraryInfo(
"ERC721PausableMock", ["v2.0.0", "v2.0.1"]
),
"13b19933bdd88840f5a617e14c9d736546ea8839": LibraryInfo(
"ERC721ReceiverMock", ["v2.0.0", "v2.0.1"]
),
"53bfe5d6b4368228e985c1fe3f02b8534416b3a0": LibraryInfo("EventEmitter", ["v2.0.0", "v2.0.1"]),
"7057eb7b10d45a631cb5f442fc76bb7d5407a901": LibraryInfo(
"FinalizableCrowdsaleImpl", ["v2.0.0", "v2.0.1"]
),
"2c959d10bff6c2909017efd20dc0e347da94e219": LibraryInfo(
"IncreasingPriceCrowdsaleImpl", ["v2.0.0", "v2.0.1"]
),
"4a383b44bd773fe5ed6e84ff12070f60603c1eca": LibraryInfo(
"IndividuallyCappedCrowdsaleImpl", ["v2.0.0", "v2.0.1"]
),
"15f79f51354210f3bf40a1555bd9e0f479292474": LibraryInfo("MathMock", ["v2.0.0", "v2.0.1"]),
"f1291dc03b8c8f52ebc9ebda49c5ec933f050fa2": LibraryInfo(
"MerkleProofWrapper", ["v2.0.0", "v2.0.1"]
),
"f1cfdc773653bf69f5c277a60d81abd46029bebd": LibraryInfo(
"MintedCrowdsaleImpl", ["v2.0.0", "v2.0.1"]
),
"cedf354f18ea2894c41fb93c79a08d07051846c4": LibraryInfo("MinterRoleMock", ["v2.0.0", "v2.0.1"]),
"43a5ef129162556fd38e9c4175c7dcbcf3213d22": LibraryInfo("OwnableMock", ["v2.0.0", "v2.0.1"]),
"59b3c7740b08088fb10e47d0d86fb6b7312e269a": LibraryInfo("PausableMock", ["v2.0.0", "v2.0.1"]),
"d2b11cbf3fca7f65ac31170f6e1533b639486478": LibraryInfo("PauserRoleMock", ["v2.0.0", "v2.0.1"]),
"4c25587eb2479ee3623ae6e168e3edf3f51914b7": LibraryInfo(
"PostDeliveryCrowdsaleImpl", ["v2.0.0", "v2.0.1"]
),
"dc38502622bd92737566c51aba07ec48ed2c02ac": LibraryInfo(
"PullPaymentMock", ["v2.0.0", "v2.0.1"]
),
"1c605d2812687edd646a5fde7d2fe7ccda137edb": LibraryInfo(
"RefundableCrowdsaleImpl", ["v2.0.0", "v2.0.1"]
),
"03dfbef44fe5a4a75c99a3e995675f027f15b2d6": LibraryInfo("RolesMock", ["v2.0.0", "v2.0.1"]),
"938a3b0db268f2cefb5b7eb3ed792308f5865027": LibraryInfo(
"ERC20FailingMock", ["v2.0.0", "v2.0.1"]
),
"45d60ab40be79c18dcb7a111ab02614c3e47db37": LibraryInfo("ERC20SucceedingMock", ["v2.0.0"]),
"2e88c135c98b395714739991d9072bdaf48b7cf0": LibraryInfo(
"SafeERC20Helper", ["v2.0.0", "v2.0.1"]
),
"0dc70ec0c9017ae55f65d3473d5a44f0c093dcab": LibraryInfo("SafeMathMock", ["v2.0.0", "v2.0.1"]),
"337c1f8e999806aed78498d4372754b2344ccb2d": LibraryInfo("SecondaryMock", ["v2.0.0", "v2.0.1"]),
"3f228f7bf41c099970f6748488b9cd7d00afe7f6": LibraryInfo(
"SignatureBouncerMock", ["v2.0.0", "v2.0.1"]
),
"caf3459749bb0264fa5a5d0a07f413f6991e0c41": LibraryInfo("SignerRoleMock", ["v2.0.0", "v2.0.1"]),
"a2df662c3e2a73f196b5067859545a352db2bdac": LibraryInfo(
"TimedCrowdsaleImpl", ["v2.0.0", "v2.0.1"]
),
"e2ca5cd4923928c9f46de8e2e7df82ba01585738": LibraryInfo("Ownable", ["v2.0.0", "v2.0.1"]),
"a6c503a46f2f91f5fb01793e96c7cb9c5363069e": LibraryInfo("Secondary", ["v2.0.0", "v2.0.1"]),
"bb8f25ed8686742450daf6ba9b7cf99a2d20dacd": LibraryInfo(
"PaymentSplitter", ["v2.0.0", "v2.0.1"]
),
"52b717d273b5bfb68c8630175990354fc172b4e6": LibraryInfo("PullPayment", ["v2.0.0", "v2.0.1"]),
"186ae2534c331ef59b6a86efc4a02d3b41cf1c8d": LibraryInfo(
"ConditionalEscrow", ["v2.0.0", "v2.0.1"]
),
"e2af959beebe03963562c8e06b5eddbfe4e8b750": LibraryInfo("Escrow", ["v2.0.0", "v2.0.1"]),
"284f716f2501cfb02bee9357adc4c1eb840b0ac0": LibraryInfo("RefundEscrow", ["v2.0.0", "v2.0.1"]),
"8235160a08bafe5bcafad41567e3229bbc331839": LibraryInfo("ERC20", ["v2.0.0", "v2.0.1"]),
"4a97e9cbe78ad401ec19e46d114c71ea6f6f3d14": LibraryInfo("ERC20Burnable", ["v2.0.0", "v2.0.1"]),
"c098a863a8b795e46bd3c055ebf944190443f2be": LibraryInfo("ERC20Capped", ["v2.0.0", "v2.0.1"]),
"9dc5cc5b708cd1822f27baee4bc9c7d5f1b15d15": LibraryInfo("ERC20Detailed", ["v2.0.0", "v2.0.1"]),
"0222ab47eca4f760dd21963f230a5fb803c0b4db": LibraryInfo("ERC20Mintable", ["v2.0.0", "v2.0.1"]),
"23c0bd7b456d222b9d9625220eff56887fcff2ff": LibraryInfo("ERC20Pausable", ["v2.0.0", "v2.0.1"]),
"fc05cf3f16e6ed0739b635d0b79e115d53ab4d76": LibraryInfo("IERC20", ["v2.0.0", "v2.0.1"]),
"f05d94772232c941ce0bba7c06a494b3a0b0a217": LibraryInfo("SafeERC20", ["v2.0.0"]),
"5eba5fb2bcd1248ec673a99ce57e788601326cdb": LibraryInfo("TokenTimelock", ["v2.0.0", "v2.0.1"]),
"18adf8251b9db34a725031820ac989d18b6823f7": LibraryInfo("ERC721", ["v2.0.0", "v2.0.1"]),
"10c5c3d991ca543dc5cc61d85664c797a01dd473": LibraryInfo("ERC721Burnable", ["v2.0.0", "v2.0.1"]),
"beb061075916c16204b16cc18d4a3804df2aaeeb": LibraryInfo(
"ERC721Enumerable", ["v2.0.0", "v2.0.1"]
),
"8c15a90797b67219f50776315045bdad8ebe7a87": LibraryInfo("ERC721Full", ["v2.0.0", "v2.0.1"]),
"f0ab234347570e7a9fc23f9d740b6784f31f2a58": LibraryInfo("ERC721Holder", ["v2.0.0", "v2.0.1"]),
"5769b699617659dc63abace9efab19a6bb17a22e": LibraryInfo("ERC721Metadata", ["v2.0.0", "v2.0.1"]),
"1f3d7d62ddc8d3c2b2a20255a4c40ee86432049e": LibraryInfo(
"ERC721MetadataMintable", ["v2.0.0", "v2.0.1"]
),
"e9ea73c83db4303fb0a6556f2b37eee4441b73df": LibraryInfo("ERC721Mintable", ["v2.0.0", "v2.0.1"]),
"f82126eaeab8efc10723ee81a2f039d1baa7f6df": LibraryInfo("ERC721Pausable", ["v2.0.0", "v2.0.1"]),
"560f515efb7ed83cf9c09d5b79693343104260d4": LibraryInfo("IERC721", ["v2.0.0", "v2.0.1"]),
"67ad40b09e6d653e19421f7014f3e350d5cdd9ac": LibraryInfo(
"IERC721Enumerable", ["v2.0.0", "v2.0.1"]
),
"90d70ae5ca5809d733d2e9fb28f817532cf2f0fb": LibraryInfo("IERC721Full", ["v2.0.0", "v2.0.1"]),
"51959c2d6c447821dd8897bda07dcb6c633282ba": LibraryInfo(
"IERC721Metadata", ["v2.0.0", "v2.0.1"]
),
"e14b06d2c5031542140ef8bc33fd56fd99c2ecc6": LibraryInfo(
"IERC721Receiver", ["v2.0.0", "v2.0.1"]
),
"03d71a566ea9225b43c66ae51dceebcd0da7e323": LibraryInfo("Address", ["v2.0.0", "v2.0.1"]),
"a41c0e26a104eac14adff7bfb2fbaa3e223883e5": LibraryInfo("Arrays", ["v2.0.0", "v2.0.1"]),
"d3ed07597d18babbd7344381e4e6d7b727795ca8": LibraryInfo(
"ReentrancyGuard", ["v2.0.0", "v2.0.1"]
),
"8b179f92ca6c1e439bb544b4798c389b5c78687b": LibraryInfo("ERC20SucceedingMock", ["v2.0.1"]),
"ef0d299d4c858659f2b78e2ede4e089067ef911b": LibraryInfo("SafeERC20", ["v2.0.1"]),
"49d0b746a287d74cc714cbf2c174c231093fbf72": LibraryInfo(
"Roles", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"e58c83075e53473844ccb571dde2cd30a4b82912": LibraryInfo(
"CapperRole", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"da35a3d6d7d9d825fbb987d916b68fd32e348f47": LibraryInfo(
"MinterRole", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"69fa5a584acfdc5b9a6d8e76882308aad31a31e4": LibraryInfo(
"PauserRole", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"a81e3a3364183cd787d8e461c6df7daaf55586f2": LibraryInfo(
"SignerRole", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"581f46692dcd9692ca67f5cc61a7bb1b3e712290": LibraryInfo(
"WhitelistAdminRole", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"42d70f9fafd3ff7a27bedd0976b0905416bb0a4f": LibraryInfo(
"WhitelistedRole", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"780a9ae4d9266ce7ec373260ffce87614258ca2f": LibraryInfo(
"Crowdsale", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"0dbefc37cfbfcfe26099c488dadba4a66d6e9512": LibraryInfo(
"FinalizableCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"60ff213d27e3d08e39d78629af2e0f57119d93e2": LibraryInfo(
"PostDeliveryCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"487942e4eb8721d19908196bd30f897dc2c6db3e": LibraryInfo(
"RefundableCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"fb65273ef381e17d86e898541acd1fba51e304a7": LibraryInfo(
"RefundablePostDeliveryCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"961682e22bd8ffe0ffcc8111fd7e2ad1003d2189": LibraryInfo(
"AllowanceCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"ebaedbafbdaa1cde24c257781d36ba931a2dd830": LibraryInfo(
"MintedCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"e2c4d52950ae64e9f7a4f551972df02e1b099de5": LibraryInfo(
"IncreasingPriceCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"f62969face2bdc7724d99bcd5046883288ecea52": LibraryInfo(
"CappedCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"43b1d8a5e54c23dc212c7f199511a965a4fec5b7": LibraryInfo(
"IndividuallyCappedCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"fb880cb8c46f68da6b53afca6fa8429b5bab3ade": LibraryInfo(
"PausableCrowdsale",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"dd7b8f3a631856e81a5fd24beb58fa56417cd0fc": LibraryInfo(
"TimedCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"3bf3e3bb72048132bff0717ef5dd2dd25d61f229": LibraryInfo(
"WhitelistCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"8eac263edf76d56c747feb9a5a4e5529d920aa11": LibraryInfo(
"ECDSA", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"d86f0bd36ed54800fbf5d094c0cd61680bd7fe22": LibraryInfo(
"MerkleProof", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"d86f0434c7e803fa4e355f6bb78c5847d8e828e6": LibraryInfo(
"Counter", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"3063a8a855ab9d8e1d31ac38179c32bd475a2aa1": LibraryInfo(
"ERC20TokenMetadata", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"40b61fcc362b84b7b8f5b45403faaac2ded0048c": LibraryInfo(
"ERC20WithMetadata", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"6f5320de16c71dbf2d08b478bcae89a7c8cfe0e0": LibraryInfo(
"ERC20Migrator", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"163a9d74ebf7a2cc7f910697d513585918f276e7": LibraryInfo(
"SignatureBouncer", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"bc64e7383ee9e61b613c0aa77c38e4173b727986": LibraryInfo(
"SignedSafeMath", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"5bc207b44f8ed1bf37ed702d8785882f6eb3277a": LibraryInfo(
"TokenVesting", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"63f538b47a22324fed11f97b993e48a18d32b522": LibraryInfo(
"SampleCrowdsaleToken",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"18ac17a25a4dfe3748f013b5e1acd2e638495cd8": LibraryInfo(
"SampleCrowdsale", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"858f334ed2c08da2e605ab04db4d526ede537cd9": LibraryInfo(
"SimpleToken", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0"]
),
"b511b2fa36bea37c2840edc1be130612d949daed": LibraryInfo(
"ERC165", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"ef087ed4bf42cc143bba6361e99f5d965c5209a3": LibraryInfo(
"ERC165Checker", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"89b41dcad369ddf9289dd5bb640703e5e19805bf": LibraryInfo(
"IERC165", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"8f78aa0fbc5f33696eba1aa5999f0367ccbe4b29": LibraryInfo(
"Pausable", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"294fd705d0a1c8e94cce6774f9f0275538787670": LibraryInfo("Math", ["v2.1.1", "v2.1.2", "v2.1.3"]),
"ff5489b53ba0a4f650a926519ed6745ff910f7a8": LibraryInfo(
"SafeMath", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"397b543dc2df14ccc410e0e472228aef1279e096": LibraryInfo(
"Acknowledger", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"85458728ded749f7a0cb0417b4e6608c6fc04ca7": LibraryInfo(
"AddressImpl", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0"]
),
"8b9f37cdbcfeb15a883ad849d9868379469b94b4": LibraryInfo(
"AllowanceCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"65eb147c8b702f4742f2325c5774f1f87bca413d": LibraryInfo(
"ArraysImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"352bf73276ce2e422b715010bbb26a7dea1c060c": LibraryInfo(
"CappedCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"2f63c91f090d3cf53ce96db8800692c34c53ba41": LibraryInfo(
"CapperRoleMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"e43d3f784551e1eca9b046aff7dd1746ca1e53eb": LibraryInfo(
"ConditionalEscrowMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"249d26fc0d08c342aedec0b9d92cc74e31d97db7": LibraryInfo(
"CounterImpl", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"e063b808e89ecc3de5c4bbc9c919ffa7d7301b8b": LibraryInfo(
"CrowdsaleMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"261bee63890ac92d183103eb06aa9e6468d00af7": LibraryInfo(
"ERC20DetailedMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"a6d03a12f085621702ec2abe355799a5e60980fa": LibraryInfo(
"ECDSAMock",
[
"v2.1.1",
"v2.1.2",
"v2.1.3",
"v2.2.0",
"v2.3.0",
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
],
),
"97bcc379f499053394cb9b39baca0b5bd2c95f3b": LibraryInfo(
"SupportsInterfaceWithLookupMock", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"e3f94dff17a0ddffe91cce083b0ab7da1ca407f8": LibraryInfo(
"ERC165InterfacesSupported",
[
"v2.1.1",
"v2.1.2",
"v2.1.3",
"v2.2.0",
"v2.3.0",
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.2.0",
"v3.3.0",
"v3.4.0",
"v3.4.1",
"v3.4.2",
],
),
"ce2f042f44149297411c63b1656a7aed7c351281": LibraryInfo(
"ERC165NotSupported",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"c8c6b08e59408716543fdf833bfdd2a46d5e9042": LibraryInfo(
"ERC165CheckerMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"cc59e5ee83e2ac3c54a9faf63f95c3c7db171e66": LibraryInfo(
"ERC165Mock",
[
"v2.1.1",
"v2.1.2",
"v2.1.3",
"v2.2.0",
"v2.3.0",
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"d9b73968b741d5cd53aaa7ac879f736785c91141": LibraryInfo(
"ERC20BurnableMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"03703594ba3bb7a29f8c457c8485de1f768c430c": LibraryInfo(
"ERC20MintableMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"06a59988de5e175074dfd61846655d8ceb6aabb0": LibraryInfo(
"ERC20Mock", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"7c599fc3da0043e6e8a27890071a64e581e9491c": LibraryInfo(
"ERC20PausableMock", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0"]
),
"cdf48b32e8a2040fa1785ff4006015ae3621620b": LibraryInfo(
"ERC20WithMetadataMock", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"d1d60fd9b13a8685ab6f8aa87048c6e0a67d1c27": LibraryInfo(
"ERC721FullMock", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0"]
),
"6944978f728b1665abaf2da7ba86b5428e99dba2": LibraryInfo(
"ERC721MintableBurnableImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"bb08f27cff0b19ef4adf183eb68d1e2ad2664ba7": LibraryInfo(
"ERC721Mock", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0"]
),
"e51473b4de0d0cc41702f42d615f4d0e27789c60": LibraryInfo(
"ERC721PausableMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"de3c52bb67df9b1e74f88dccf8ddacad748a91bc": LibraryInfo(
"ERC721ReceiverMock", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"b9f98976e3f3bb053a1d6ac241b4e13dce74244d": LibraryInfo(
"EventEmitter", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"ebb254073b372b3a28ea94e56212bb41ff372386": LibraryInfo(
"IndirectEventEmitter", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"9dcc5fe734a4d420457384896568ef817dda942f": LibraryInfo(
"Failer", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"06096854e33cbf52e2704e3f87d107c58f52d145": LibraryInfo(
"FinalizableCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"f7a220e190e202e59e7ed83e8d93ebb8f676d3a5": LibraryInfo(
"IncreasingPriceCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"48221c607b28f7ff67eb496dccaac552e2e4b80c": LibraryInfo(
"IndividuallyCappedCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"a1780e67e3aeed1cb9493ffe00e2840fd85e5b52": LibraryInfo(
"MathMock",
[
"v2.1.1",
"v2.1.2",
"v2.1.3",
"v2.2.0",
"v2.3.0",
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"811b3f5f798d1bd67cb4351ede94b40a96251450": LibraryInfo(
"MerkleProofWrapper",
[
"v2.1.1",
"v2.1.2",
"v2.1.3",
"v2.2.0",
"v2.3.0",
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"f19bf654847043124db5ee412a4926fd45ece93c": LibraryInfo(
"MintedCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"80c381c593821fb47db89d55e26bc66eb3b9815b": LibraryInfo(
"MinterRoleMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"46c4d8c42833e483c06badecf3ef4870eeeef4c0": LibraryInfo(
"OwnableInterfaceId",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"799e7db4e23a6cef4a8d9642ae4b5cd2d7eaa3c1": LibraryInfo(
"OwnableMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"3f555df97ee448ff10299cb97da90b3f3b38a0d2": LibraryInfo(
"PausableCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"351955623b3a5ba04402dc84132efe3bd36d81d6": LibraryInfo(
"PausableMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"39f9b49623e98258a14b689f719e4c9e39960a58": LibraryInfo(
"PauserRoleMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"df64a5fc7bb156be6d151d1853a4717c501fe981": LibraryInfo(
"PostDeliveryCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"f2bc5891107b19ad4a9e2bcc9eb78651c23d8536": LibraryInfo(
"PullPaymentMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"4cc249e1ae70127d1438dd7e52e00c76a0714e7a": LibraryInfo(
"ReentrancyAttack", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"f9a7437047cc110b3d7c7886c537e63c88d58f77": LibraryInfo(
"ReentrancyMock", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"9baeb425b432c40949ab0d772f3673356433e5fe": LibraryInfo(
"RefundableCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"3a1327b39ea8686de5d4eae4488f464238196ba8": LibraryInfo(
"RefundablePostDeliveryCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"7c102c2c0df13f6306a1491d1dab99216519efe4": LibraryInfo(
"RolesMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"9172a3718949c08ec82487993301e25b4e988338": LibraryInfo(
"ERC20FailingMock", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"05db7acd560f57643755be95bbbafe39db03db36": LibraryInfo(
"ERC20SucceedingMock", ["v2.1.1", "v2.1.2"]
),
"e0f626fb634ae0401a38f07d5562a7e66339e42e": LibraryInfo(
"SafeERC20Helper", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"5cb3f28de3e654931732a980fd663fecc4a1081a": LibraryInfo(
"SafeMathMock",
[
"v2.1.1",
"v2.1.2",
"v2.1.3",
"v2.2.0",
"v2.3.0",
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"f8da5f69fc930b78d4d5ea2eac5147aa2b6ea5d4": LibraryInfo(
"SecondaryMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"991f87c81fa1c7f853b0d77766c2d897e6f0f084": LibraryInfo(
"SignatureBouncerMock", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0"]
),
"8ce412c8cd9286e85b7c28e3c3ed644bacaf39d8": LibraryInfo(
"SignedSafeMathMock",
[
"v2.1.1",
"v2.1.2",
"v2.1.3",
"v2.2.0",
"v2.3.0",
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"47eee6b2d10bb21084c63f29a263bbe01173cac4": LibraryInfo(
"SignerRoleMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"07b4e8cb7b3f12b92375f0a93c3eb2eb23aaaf60": LibraryInfo(
"TimedCrowdsaleImpl", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"20f40b25fbd13c483becd042f5bf06e98b7bfe33": LibraryInfo(
"WhitelistAdminRoleMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"148d4321f050aa8ff5724607bf13e1d4b55ca33c": LibraryInfo(
"WhitelistCrowdsaleImpl",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"9986f2f41f56c43eb27b92c0547ac10e02d052fc": LibraryInfo(
"WhitelistedRoleMock",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"d918cc9ba3b27a39e2e0a05c8be5b5fb07117521": LibraryInfo(
"Ownable", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"f682e6ff4e928c190146ce6abc350197ee6dd9b2": LibraryInfo(
"Secondary", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"015f648298c32f15f9b2e3dbda148e05c9f29ec1": LibraryInfo(
"PaymentSplitter", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"feb2a352c4a8597f50e0c7f7caec4787e8a04571": LibraryInfo(
"PullPayment", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"1236e7cc69efcf915b7ce81450fa7c8f013d66e3": LibraryInfo(
"ConditionalEscrow", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"a1b2c0241d1f22d1d32c71415293e2357ce9754c": LibraryInfo(
"Escrow", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"6e2e6ee47de4500756716fbf8943f13b29b2771e": LibraryInfo(
"RefundEscrow", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"a08504b8c3c127e9f3a15cdd588573058a60acca": LibraryInfo(
"ERC20", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"3bcfc9705f5bcab4583eebcaefd66a89e28e23c7": LibraryInfo(
"ERC20Burnable", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"566bcf581eb9ed38c8c2b2e90cace8b78e7e2acb": LibraryInfo(
"ERC20Capped", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"77ba7d78c25254fb6a22f0a92fa04b95a8ba4ef0": LibraryInfo(
"ERC20Detailed", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"d602a9c5786af67ef6bb2d431651081d76dcdd89": LibraryInfo(
"ERC20Mintable", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"563404ae3ad9decba0f1f12d78aff9234a84bab5": LibraryInfo(
"ERC20Pausable", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"b3e5be0b3f985e92fe1f9146d8133f70c7370c9c": LibraryInfo(
"IERC20", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"bdd10fc95fdb3e43dcb6f50c5a790526eb2339a5": LibraryInfo("SafeERC20", ["v2.1.1", "v2.1.2"]),
"1bc7268e369e6f66cae9a346a3be4200fb9ab2a2": LibraryInfo(
"TokenTimelock", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"f5495923e256fc4aa541fe592c69f9c6a49d09b1": LibraryInfo(
"ERC721", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"bff0ac152d4f9d6016939cc8a2f0abd3952a5cff": LibraryInfo(
"ERC721Burnable", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"14d60ce0ee22fe6cc17a67f827f2d6405fde45fb": LibraryInfo(
"ERC721Enumerable", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"1c5e388a06c8bc5e4ebbd264403d229c79cb538b": LibraryInfo(
"ERC721Full",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"dc6488481efeb3f0a3fe4012e44cc9630de20454": LibraryInfo(
"ERC721Holder",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"57d6282eac3ccb6f9934d1d2341098cd94888d34": LibraryInfo(
"ERC721Metadata", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"bf266ddbcc0c703ec528a3589125187209ecfa0b": LibraryInfo(
"ERC721MetadataMintable", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"feb0e24e8119875a567c7f63ae626229e989ba6b": LibraryInfo(
"ERC721Mintable", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"4e7a7464f14927dcd4ac1c4c80c1416a532a1762": LibraryInfo(
"ERC721Pausable", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0"]
),
"181645ad9bfe9ec844972ef6c3335fd0ea4a350e": LibraryInfo(
"IERC721", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"5eeb659e05046a4f4fc1b998fca1960305af320d": LibraryInfo(
"IERC721Enumerable",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"49a0645eb5f2c78e85729f78b6e46b5daba24d94": LibraryInfo(
"IERC721Full",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"80912b3e9ab6eb4d3fc3d42d7a49810811a8067d": LibraryInfo(
"IERC721Metadata",
["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"],
),
"54be7bd4bad6dd7473376057523b9d49cb448688": LibraryInfo(
"IERC721Receiver", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"7a16711320090635c8beb50e1328a501c188f888": LibraryInfo(
"Address", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"5176d91de61a03d02be10f24b2a03fdbc6683a68": LibraryInfo(
"Arrays", ["v2.1.1", "v2.1.2", "v2.1.3"]
),
"2b1f3555fce0551e87ee87794b27941844b305ed": LibraryInfo(
"ReentrancyGuard", ["v2.1.1", "v2.1.2", "v2.1.3", "v2.2.0"]
),
"8bf62064d4d5f310f90c3b0260f35ed98a945899": LibraryInfo("ERC20SucceedingMock", ["v2.1.3"]),
"7fc61c5c87173431d88d59b7645b20b7a5a30a13": LibraryInfo("SafeERC20", ["v2.1.3"]),
"26d3b2bc6fb00cba01f3fc93926107bb8547dfca": LibraryInfo("Crowdsale", ["v2.2.0"]),
"dbbddfca9a9d822603879d0b26c9a87f896185e7": LibraryInfo("IncreasingPriceCrowdsale", ["v2.2.0"]),
"0b1275c2973bc9904a4719496518db986e75f0d9": LibraryInfo("TimedCrowdsale", ["v2.2.0"]),
"3181a686cc87d9773617f11e6e744a8ef4cd1485": LibraryInfo("WhitelistCrowdsale", ["v2.2.0"]),
"b44caa5b9a40b460428ea5145c3b516263196f9c": LibraryInfo("ECDSA", ["v2.2.0"]),
"a49a652a900af135636686be65e24c59b562f1f2": LibraryInfo(
"Counters", ["v2.2.0", "v2.3.0", "v2.4.0"]
),
"24b08de6151fdf941a10bb1dec241f27958feee3": LibraryInfo(
"ERC20Metadata", ["v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"ced0258d0b0d50383252c1a10e11e72c54d8f854": LibraryInfo("ERC20Migrator", ["v2.2.0"]),
"d6493fab55286955839b4d6d279bda02b11c3644": LibraryInfo("ERC20Snapshot", ["v2.2.0"]),
"83dc70f4ffa7ca8b4bb744aafe520ca5813e5df5": LibraryInfo("SignatureBouncer", ["v2.2.0"]),
"df185ebc2fa12c378e5015bd475332756504f60d": LibraryInfo("SignedSafeMath", ["v2.2.0"]),
"4fb66323fe71536c1796582d32bfcabf6716ff65": LibraryInfo("TokenVesting", ["v2.2.0"]),
"bdfbcc3f8bc59328aa6ab0d4a20d24270492f9a2": LibraryInfo("ERC165", ["v2.2.0"]),
"2d2ca1d7fb9b959879a30f3a36a6ff381be7a50b": LibraryInfo("ERC165Checker", ["v2.2.0"]),
"d0b3500ec510385e5f14da45b3f72cbecf2d0e1a": LibraryInfo("Math", ["v2.2.0"]),
"a38f7d36cea19217092f7ee679308e368ec9a9bc": LibraryInfo("SafeMath", ["v2.2.0"]),
"b65922943e3104021a6f39825a9ad792d6c06202": LibraryInfo(
"CountersImpl",
[
"v2.2.0",
"v2.3.0",
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"0568279ce96d91ad7a4dbba12201003893a914a0": LibraryInfo(
"SupportsInterfaceWithLookupMock", ["v2.2.0"]
),
"191327eebe6456d41be46d29262f424cb14cdaa4": LibraryInfo(
"ERC20MetadataMock", ["v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"ec24556da2b236f33be4263e76835c6f7b07c579": LibraryInfo("ERC20Mock", ["v2.2.0"]),
"b1f5209f1503fb7b95c1e274a4605961263658d6": LibraryInfo(
"ERC20SnapshotMock", ["v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"600c8541c63ee789fdef9c5c2901eabfcefc40c1": LibraryInfo("ERC20ReturnFalseMock", ["v2.2.0"]),
"375ddc80a306ac6fd622911e87a929e4317bc498": LibraryInfo(
"ERC20ReturnTrueMock", ["v2.2.0", "v2.3.0"]
),
"5ff30663aecee0ab6ec3bc9342d9a21cb64e1ad3": LibraryInfo(
"ERC20NoReturnMock", ["v2.2.0", "v2.3.0"]
),
"c6eeb63f9350a6293d3cd162768c72f84899efac": LibraryInfo(
"SafeERC20Wrapper", ["v2.2.0", "v2.3.0"]
),
"5ec72a2da405c23f8b5610b9e7b0e4bb586a904c": LibraryInfo(
"TimedCrowdsaleImpl", ["v2.2.0", "v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"3086bc6470bdddb0bccf23d803130a76067fee7a": LibraryInfo("Ownable", ["v2.2.0"]),
"b83b3645b9107f5cbc95e2afbb57f6002e3e72d7": LibraryInfo("PullPayment", ["v2.2.0", "v2.3.0"]),
"9ab9c8709262c8ac99601051ce5c5d1ddd2950a6": LibraryInfo("ConditionalEscrow", ["v2.2.0"]),
"61dd244ce7b91aab023abcd5e64e90a7c2d363dd": LibraryInfo("Escrow", ["v2.2.0", "v2.3.0"]),
"4a5447519ca8bb2d82a79bd5b0b9b0792bba23a8": LibraryInfo("RefundEscrow", ["v2.2.0"]),
"c8df889cca25546f32a258b75f263fff3be529e9": LibraryInfo("ERC20", ["v2.2.0"]),
"21b260d15766f58e0590ea216fb5db31db4788e9": LibraryInfo("ERC20Burnable", ["v2.2.0"]),
"490f2847cf60a16df023549e03e6ff6a16f01f9e": LibraryInfo("SafeERC20", ["v2.2.0"]),
"67ec2c098cb4626d76ee8762f555edadeaf863c8": LibraryInfo("ERC721", ["v2.2.0"]),
"84f02d651f97b0225a3ad08eda8e51c73fca5eda": LibraryInfo("ERC721Enumerable", ["v2.2.0"]),
"b3f7f407fd76e2dc2ee39174a1f483e5864bb7b7": LibraryInfo("ERC721Metadata", ["v2.2.0"]),
"4e241f646d96f095386eae6a7a5f13e6dac682f1": LibraryInfo(
"IERC721Receiver", ["v2.2.0", "v2.3.0"]
),
"5d932009fc8f204b32e2ff3b795b5a4016ba8856": LibraryInfo("Arrays", ["v2.2.0"]),
"97ad171eccfd6d686444cb1a096ca32c1e081173": LibraryInfo(
"Roles", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"12d3a805c82a503a32584116eaa679c58663182e": LibraryInfo("CapperRole", ["v2.3.0"]),
"920fb014fdab17d9962e4a051ecb05e0346803c4": LibraryInfo("MinterRole", ["v2.3.0"]),
"0755ddb27f6aeb4095c5fa52223c6c321f634f37": LibraryInfo("PauserRole", ["v2.3.0"]),
"f2fdc6353650ca2a99350d5668fec6460865baf0": LibraryInfo("SignerRole", ["v2.3.0"]),
"a7420e74fc819c039143c4fc4060b3f8233aed23": LibraryInfo("WhitelistAdminRole", ["v2.3.0"]),
"7731004a855c8698643498ec733dfc528ab5e9af": LibraryInfo("WhitelistedRole", ["v2.3.0"]),
"362c8c4f6c21345efab16b43ac7a6dda826ef8bb": LibraryInfo("Crowdsale", ["v2.3.0"]),
"3a548446ff8b86dd7fc634446568f9549949d0aa": LibraryInfo(
"FinalizableCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"4109c79f50836cd29d813afbeeed549745e579c9": LibraryInfo(
"PostDeliveryCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"8d80a124fdfc163f1856b30d54475338d1995fa2": LibraryInfo(
"__unstable__TokenVault", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"9dc3b6cc96b6bcf6dcdeb91ba4c732a8f7da0336": LibraryInfo("RefundableCrowdsale", ["v2.3.0"]),
"b123691e7215b1777026a26b72965372b355fc71": LibraryInfo(
"RefundablePostDeliveryCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"18869bdf9d3a93150d1e0edcb1db4a85ee23e28c": LibraryInfo(
"AllowanceCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"6e75e6262faa2337d43ec1066f50e2fd71409199": LibraryInfo(
"MintedCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"33eb8c2e2ae6b95c6cf58d3c9c06587e7ca2bf3f": LibraryInfo(
"IncreasingPriceCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"e8bfd676822015708c097b2064fc5d898f45c5fd": LibraryInfo(
"CappedCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"8c2f617d1f49cb4fbef87748d2cf71aed74d515a": LibraryInfo(
"IndividuallyCappedCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"9d143c684d3650ae76ef4cc89c043eb8c3680445": LibraryInfo(
"TimedCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"6080c9c622f05b4a6439d1c98b67333b5edb9bb9": LibraryInfo(
"WhitelistCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"791cc5d0ccd96d4d7cea297d4dd4282a2e03e30e": LibraryInfo("ECDSA", ["v2.3.0"]),
"4737e887fd1bc839b8b8cf2f10f02eaacda8294d": LibraryInfo("MerkleProof", ["v2.3.0", "v2.4.0"]),
"b7ed70197dc7c1b670f34cf2e3b4e58865383cd9": LibraryInfo(
"ERC20Migrator", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"1b898dc4c40ad6e77b5e7600958f0675d6182077": LibraryInfo(
"ERC20Snapshot", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"13b02c8c4a18591bc141c84d4f390a470699efee": LibraryInfo("SignatureBouncer", ["v2.3.0"]),
"e121f6ee965082a37437175f7f7de7327fc7f6ec": LibraryInfo("SignedSafeMath", ["v2.3.0"]),
"34333c9d9d0dd9cad48ced9b7ec9f16499d9e51f": LibraryInfo(
"TokenVesting", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1", "v3.0.0", "v3.0.1", "v3.0.2"]
),
"0006db197a30a83123ae42b1412b9eb36e42a28a": LibraryInfo(
"SampleCrowdsale", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"c09017218a635de03a5da5e72c0ca29453a3f119": LibraryInfo("ERC165", ["v2.3.0"]),
"65df18d3f80dc6e25c7b9261139254c041565eaa": LibraryInfo("ERC165Checker", ["v2.3.0"]),
"82aff27a106fe353c21f329d0884dba69a89e5f8": LibraryInfo("ERC1820Implementer", ["v2.3.0"]),
"7b1e6947bc70edd40153bcea559844c17eb80236": LibraryInfo("IERC165", ["v2.3.0"]),
"a4a4c4e1884a9ecff9a3be99eacc783c290bf7e5": LibraryInfo("IERC1820Implementer", ["v2.3.0"]),
"6fe4d6ebe9da8d97a48c7be4cb30aaabb3ff405c": LibraryInfo("IERC1820Registry", ["v2.3.0"]),
"ae0db82d81525d22cdc433cef124addd50430fc5": LibraryInfo("Pausable", ["v2.3.0"]),
"6b96a25ebec0776be5318fbff49d141d73f4f5de": LibraryInfo(
"Math",
[
"v2.3.0",
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"2a829cf20030b8d3de8ac9873f0beaca3cad1f4e": LibraryInfo("SafeMath", ["v2.3.0"]),
"7c044669d66a8d69734c5f828a50d2ebd53f6bbd": LibraryInfo(
"SupportsInterfaceWithLookupMock", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"7b97383d271f6b4cf1373d76ee256ba3028f24ea": LibraryInfo(
"ERC1820ImplementerMock",
[
"v2.3.0",
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"95998f85eb3757d7b010f9d7c1480a92d9016d92": LibraryInfo(
"ERC20Mock", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"30b598e64b3ea2b9915acaf629b2d0e4a2eb66ac": LibraryInfo(
"ERC721ReceiverMock", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"e092e16bb0e17e23ca9e1b8c1521cfb386697e2a": LibraryInfo("ERC777Mock", ["v2.3.0"]),
"53a0001a2ebd03b5203549fa6c6c80cc9697187e": LibraryInfo(
"ERC777SenderRecipientMock", ["v2.3.0"]
),
"ca4b8cacced7f06ec8ac865f7be0d5bf1b1957ff": LibraryInfo("ReentrancyAttack", ["v2.3.0"]),
"068676df02968b7b9e9b4d3b7f69155a9f70a13e": LibraryInfo(
"ReentrancyMock", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"9124b8c0668411c9dfee424d0bb9ae6e8f7706e2": LibraryInfo("ERC20ReturnFalseMock", ["v2.3.0"]),
"257829241097f5fd720b48aa5025a7e972b0bb30": LibraryInfo("Ownable", ["v2.3.0"]),
"eefbd0e574c1afa621b60d5c0060ad123e094988": LibraryInfo("Secondary", ["v2.3.0"]),
"cf6cc9c70bb5ee318b5ba3588e9f2c4f34cca72d": LibraryInfo("PaymentSplitter", ["v2.3.0"]),
"f8d97ab19910043c2be57dfa599cd98b2e79c0e8": LibraryInfo(
"ConditionalEscrow", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"cef9149e1ef5098f9600007ec477b01ea5f41140": LibraryInfo(
"RefundEscrow", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"5e3eabc1f7f46c3375a3d8eb4ab618ea528254c4": LibraryInfo("ERC20", ["v2.3.0"]),
"9f0cfbf4cf9505829c19bf3698aa3a87660ce1d4": LibraryInfo("ERC20Burnable", ["v2.3.0"]),
"f6d6fbf05185ca026c9ccf4eab910054069c3f8f": LibraryInfo("ERC20Capped", ["v2.3.0"]),
"a9ef7428ed0d036ab79ddd21ae9b95da666634fb": LibraryInfo("ERC20Detailed", ["v2.3.0"]),
"cb12ca8d883bb3ad8317c61b2e7251221def665f": LibraryInfo("ERC20Mintable", ["v2.3.0"]),
"0f194824b2052c308c52ec5cae790adea7c64c57": LibraryInfo("ERC20Pausable", ["v2.3.0"]),
"3efeef33c00f8c7513b55015ee54e6235bb0b668": LibraryInfo("IERC20", ["v2.3.0"]),
"7f3606ceb7a5ca3d169607f28d825b7844d8f6ed": LibraryInfo("SafeERC20", ["v2.3.0"]),
"54bbee45e99d6502f0c9b5be1b80d4bbe3786d94": LibraryInfo(
"TokenTimelock", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"11fc4d574650f2b1c58366124832c3409c78413a": LibraryInfo("ERC721", ["v2.3.0"]),
"205f8e867ab267c38e439b791c1e1bd1d8ca88c7": LibraryInfo("ERC721Burnable", ["v2.3.0"]),
"9b8256d1597bccaec572a77db88f059f58df9345": LibraryInfo("ERC721Enumerable", ["v2.3.0"]),
"66f22e50f77d448e975e59f871645e6abf6d1cf8": LibraryInfo("ERC721Metadata", ["v2.3.0"]),
"743b6405c190d6966e1284622dc0bade6c9cb40f": LibraryInfo(
"ERC721MetadataMintable", ["v2.3.0", "v2.4.0", "v2.5.0", "v2.5.1"]
),
"628a4855f3a319fc3280111e4747b4faa9ac39a5": LibraryInfo("ERC721Mintable", ["v2.3.0"]),
"d5e1935a6ff55517a209f36ed99d5998837c9e4f": LibraryInfo("IERC721", ["v2.3.0"]),
"640289cb3557be343a7520230cd1c3d31961d3c2": LibraryInfo("ERC777", ["v2.3.0"]),
"532858b09be39df731d0f660c1c8df677d90663e": LibraryInfo("IERC777", ["v2.3.0"]),
"3c3e0a7eeab6fb60705ad74295fc20d947d4fd38": LibraryInfo("IERC777Recipient", ["v2.3.0"]),
"7c644be4848da35aed4b1b1358c79d273c5eb2c3": LibraryInfo("IERC777Sender", ["v2.3.0"]),
"862f5b1732442b00bc2bd40124ebbfc93e506b73": LibraryInfo("Address", ["v2.3.0"]),
"ffe0c2e7651f57976a4875cd95580dfc0a012a2a": LibraryInfo("Arrays", ["v2.3.0"]),
"00fd45355e275a2ed1c1eb0b3b2fc82786dcac5b": LibraryInfo("ReentrancyGuard", ["v2.3.0"]),
"f5f947f1c918d8d1ece09da651c3248f66cf7e4d": LibraryInfo(
"Context", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"2e44800ce075b20ea3c20d1e62300384dfe2c517": LibraryInfo(
"GSNRecipient", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"c5aee0ebb7cd74d8527a5db5954b364b863603d1": LibraryInfo(
"GSNRecipientERC20Fee", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"99159b6dfffe5ffb4c973a9645385542d26aeaa4": LibraryInfo(
"__unstable__ERC20PrimaryAdmin", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"a4073980c6f85544223a230d9dc9391f1b0dc311": LibraryInfo(
"GSNRecipientSignature", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"d914062eb6557699da04d907e2b70c24de94bd12": LibraryInfo("IRelayHub", ["v2.4.0"]),
"3e206957fb817eb0ec41dc08053084c29a6a061b": LibraryInfo("IRelayRecipient", ["v2.4.0"]),
"43710cb6060b92e5f845d7c76ed4ab1f85f7cc86": LibraryInfo(
"CapperRole", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"4a5a3fca54b8b8b1997614b1dd3b408a964c538d": LibraryInfo(
"MinterRole", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"76bbbe6b0782ad22a92c56058b01b89ae789b599": LibraryInfo(
"PauserRole", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"d4e83a7891c65c3ed3670a978bb76b634584af20": LibraryInfo(
"SignerRole", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"6cc6766baef98a700e8e38821ae2aa15cbc31062": LibraryInfo(
"WhitelistAdminRole", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"71c272ca2459bd2e5648c31cf3342109274dc265": LibraryInfo(
"WhitelistedRole", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"bb5bc67bb08af53d6db7d3c6bfca4dfd34e5e574": LibraryInfo(
"Crowdsale", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"c73846163f45573292c9e7281471658d480d83ba": LibraryInfo(
"RefundableCrowdsale", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"041e87ca76fd2207ef3cf4936ec0205204be6b96": LibraryInfo(
"ECDSA", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"0000d7516560f14246e909e2efa04fab08aa639c": LibraryInfo(
"SignedSafeMath", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"b002d3ff71af2317f8c44c7098c5e12814bba92c": LibraryInfo(
"Strings", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"cef172a9650a72ad1bbc8aa71d6c5e755f0b49bf": LibraryInfo(
"SimpleToken", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"150947d54d2a71dae3b56af334766eb70e6253a4": LibraryInfo(
"ERC165", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"a7c76ea626e3f0e494df9149c8e40ac8fb90d240": LibraryInfo("ERC165Checker", ["v2.4.0"]),
"0f2bb06c58e981260a4204795f24203a365c2737": LibraryInfo(
"ERC1820Implementer", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"67b2092d07fad864c8fe808b9c3ca3e8749ef8a2": LibraryInfo(
"IERC165",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"cf18bfd2ac9bb0e6f31e2e0169bcf7812b48d020": LibraryInfo(
"IERC1820Implementer",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"c6d7a58fa8e4408d90bf4dba2251c7f384442e61": LibraryInfo(
"IERC1820Registry", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"1d1a1e6a2b8373a0f9c12fecb97e9e9e2f5565bb": LibraryInfo(
"Pausable", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"40c5df80b4b5cbba8434b7662078aa2f7bd11703": LibraryInfo(
"SafeMath", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"7e7979f1b224b9a2f1521c2e7ee6269e86c192da": LibraryInfo(
"AddressImpl", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"d2953944bb76616ec71f7ac0973f4a2c7735e3f5": LibraryInfo(
"ContextMock",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"b9f88ead37062ca195d2a397eca7462b23377705": LibraryInfo(
"ContextMockCaller",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"e4e81b34ffc158b871c398905044eaa407b53309": LibraryInfo(
"ERC20PausableMock", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"1d5e75b5b0c6d5a5411479d0c5922cbc23b88935": LibraryInfo(
"ERC721GSNRecipientMock", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"ccb9f10bcbdd9b08e3be1ddcea53285c2edfbbac": LibraryInfo(
"ERC721Mock", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"f6dd2052f9728379c16000c51866baa667ae8ba4": LibraryInfo("ERC777Mock", ["v2.4.0", "v2.5.0"]),
"40c2c74b3acb1d4f2701bbc1726c54e7b93d879f": LibraryInfo(
"ERC777SenderRecipientMock", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"a6ebcc719baf42b346ce99ce787a988dffafbe67": LibraryInfo(
"EtherReceiverMock", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"31c735b3a0f5aca4dbcae3cd833d5327d77020e7": LibraryInfo(
"GSNRecipientERC20FeeMock", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"f951aa42da5cb767b2d25af86911f06cd5558981": LibraryInfo(
"GSNRecipientMock", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"35ec5d4c73fddcf8a5aaf5757ef1af99352b3e7f": LibraryInfo(
"GSNRecipientSignatureMock", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"d3525012d52c3d06a22bb704ada33f21c0256dc8": LibraryInfo(
"ReentrancyAttack",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"860bdd56a5ddf01ae3557917163d7c9dc8de8ee2": LibraryInfo(
"ERC20ReturnFalseMock",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"ae01681cc37d58ab8052869e687f215e6cb8d0cf": LibraryInfo(
"ERC20ReturnTrueMock",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"93af43acbe7d5b909433810d28f2ac6826dd1d91": LibraryInfo(
"ERC20NoReturnMock",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"d09209d71a33bf114bf1adcec684c64deb010de4": LibraryInfo(
"SafeERC20Wrapper",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.2.0",
"v3.3.0",
"v3.4.0",
"v3.4.1",
"v3.4.2",
],
),
"3d00f6d348841ae204c485cda3c4c2816af76957": LibraryInfo(
"StringsMock", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"d1523aae49fb6f1896f49e590b6f51039e4bdd72": LibraryInfo("Ownable", ["v2.4.0"]),
"2fce93f9d6faa205cd88c0a09bd9f76fc5330932": LibraryInfo("Secondary", ["v2.4.0"]),
"0d32d5cabbfa9f420623b256dc5fb3494ed22769": LibraryInfo(
"PaymentSplitter", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"99e22b366e81118ef4050f8f5f75962e73330c73": LibraryInfo(
"PullPayment", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"4562c170bc9809fa46e6666f9728e8e61dd33f72": LibraryInfo(
"Escrow", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"626414a459336b3ac497b8e49fa22f1f0abf1b92": LibraryInfo("ERC20", ["v2.4.0"]),
"950167661be5dc085fba4c584183bbd83a29eee7": LibraryInfo(
"ERC20Burnable", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"38d0818e3e974224e2fbabbd73c57eda95034984": LibraryInfo(
"ERC20Capped", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"e406b324425fe7c3f7c5589e06dbea4796503de1": LibraryInfo(
"ERC20Detailed", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"3f15c8af26605011c8d5de1ce87ab8fd0ce60ea7": LibraryInfo(
"ERC20Mintable", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"09071ee20d5607366d247ff1fa9aaaa46d606dd8": LibraryInfo(
"ERC20Pausable", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"a8466bda6a100f8073131ee60f1f55f39cc79715": LibraryInfo(
"IERC20",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"2c19d3f26dbfbf3d39f50dd735fe0fe5b5e6cb69": LibraryInfo(
"SafeERC20", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"53de48de263bd917431b935fe6733716efaa53aa": LibraryInfo("ERC721", ["v2.4.0"]),
"f6798a7bd8cd9f0f9315ecf200035b4c1b27652b": LibraryInfo(
"ERC721Burnable", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"5287c032e953f49cbead7d8e8dfb5013fdbea35a": LibraryInfo(
"ERC721Enumerable", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"32a640d5908aa379be7abda1424894a0ed5cb389": LibraryInfo("ERC721Metadata", ["v2.4.0"]),
"0465da94cef491f15c1f0cf03ab35ba5f57c2e53": LibraryInfo(
"ERC721Mintable", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"652b0218b8ce2fa84fc1489346eb4f8ba6be36fa": LibraryInfo(
"ERC721Pausable", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"dbb96f95f55be6a05475b97ef7c35bd3e93ab4ed": LibraryInfo(
"IERC721", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"f4b123f5b40878b70f02476c2e17a144bf88e1a2": LibraryInfo(
"IERC721Receiver", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"fc247ca5c3f2ce5dfe65d307d34461c314f07225": LibraryInfo("ERC777", ["v2.4.0"]),
"70795fc39191bc51871b45a31c12b3bfb7a8d95f": LibraryInfo(
"IERC777", ["v2.4.0", "v2.5.0", "v2.5.1"]
),
"923531fc7154edb1c04430faa466f2fc21be91b5": LibraryInfo(
"IERC777Recipient",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"91df3b8cb635ee73d073bb41677b30cca16cdfaa": LibraryInfo(
"IERC777Sender",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"671c527f68ac3d8c6793881d78179da4ad394eba": LibraryInfo("Address", ["v2.4.0"]),
"0bf7ab409d936c5f8868bfbcdcd40635b2d5975f": LibraryInfo(
"Arrays",
[
"v2.4.0",
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"e6a65bea2d5d2b3629bebed655e5f99ba6b5cb62": LibraryInfo("ReentrancyGuard", ["v2.4.0"]),
"33fd40c136a0417ba1aca69c95440a6f6af396ee": LibraryInfo("IRelayHub", ["v2.5.0", "v2.5.1"]),
"e60e312ee7de5b97f6b691d2aa22a754139c0174": LibraryInfo(
"IRelayRecipient", ["v2.5.0", "v2.5.1"]
),
"80635da095b81f3ac67980a810c197b175cd191a": LibraryInfo(
"MerkleProof",
[
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"2001957575c00b8d4f0d2e86da40374cc1f9b95c": LibraryInfo(
"Counters",
[
"v2.5.0",
"v2.5.1",
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"bee16f12e3d00612347f7716ac3dd919958f6ecd": LibraryInfo("ERC165Checker", ["v2.5.0", "v2.5.1"]),
"b7ffce9048179efef559653bd0fe78e3dbf3ccc9": LibraryInfo("Create2Impl", ["v2.5.0", "v2.5.1"]),
"ab5709072e811dc6892d9bea6dc2febc84c2eebb": LibraryInfo("ERC721FullMock", ["v2.5.0", "v2.5.1"]),
"8eebc80db69e1dc9feea6f06833983578d4b3780": LibraryInfo(
"EnumerableSetMock", ["v2.5.0", "v2.5.1"]
),
"da3bb9482cc3fef975d4b940aa6a7a241620cddc": LibraryInfo("SafeCastMock", ["v2.5.0", "v2.5.1"]),
"418be7dc23fea0fb0685acfcd0924205d309da45": LibraryInfo("Ownable", ["v2.5.0", "v2.5.1"]),
"016a31280fdbbb2437d69d2d2077a7c6905c714d": LibraryInfo("Secondary", ["v2.5.0", "v2.5.1"]),
"e54799317dc440001a42e881955539c39216f20b": LibraryInfo("ERC20", ["v2.5.0", "v2.5.1"]),
"7f18034de8806b6e04a081d9139af0bafa7ebe28": LibraryInfo("ERC721", ["v2.5.0", "v2.5.1"]),
"a8e2e47304e89ec12edb4796701610ca0545f690": LibraryInfo("ERC721Metadata", ["v2.5.0", "v2.5.1"]),
"270b244803ef7871cc0ea9c7140c58b0cecc7121": LibraryInfo("ERC777", ["v2.5.0"]),
"46d949813bed5d0c28d461308d29b801440d4b5a": LibraryInfo("Address", ["v2.5.0", "v2.5.1"]),
"27cd94941b6e8368a47c3056f9881d9b777a12ee": LibraryInfo("Create2", ["v2.5.0", "v2.5.1"]),
"3f0be66d5ab109f6f063a2f621e2a27f598e9c75": LibraryInfo("EnumerableSet", ["v2.5.0", "v2.5.1"]),
"288ea0f7c464d6c209aedcb70702d40d055061a5": LibraryInfo(
"ReentrancyGuard", ["v2.5.0", "v2.5.1", "v3.0.0", "v3.0.1", "v3.0.2"]
),
"96b9d4c39c132847fe9878012875a60be6815d6c": LibraryInfo("SafeCast", ["v2.5.0", "v2.5.1"]),
"d858e0f859c9a0007983f900e87377bc7b9db2d9": LibraryInfo("ERC777Mock", ["v2.5.1"]),
"c50d4a4bdb1ae07acba0c1808a395989814eb11c": LibraryInfo("ERC777", ["v2.5.1"]),
"b796dbdd6a4a193975d3e83a2705332b97d04c9e": LibraryInfo(
"Context", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"26f098ad471cc55860f980fdb2a0e03e76124c5c": LibraryInfo(
"GSNRecipient", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.1.0-solc-0.7"]
),
"df2e4c908e0f63db31a061d6b1a88aa3ac5e4259": LibraryInfo(
"GSNRecipientERC20Fee", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0"]
),
"f6e0a568a7b389b06da90d094cff83cb479ea60d": LibraryInfo(
"__unstable__ERC20Owned", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0"]
),
"250da0268e9484838d295b0a509683c70b9c2bcc": LibraryInfo(
"GSNRecipientSignature",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"7db2684fb121525320f90ba363fb9d393c882c2a": LibraryInfo(
"IRelayHub", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0"]
),
"b59618fd7459ca78735d140104a33f746c87ca23": LibraryInfo(
"IRelayRecipient", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.1.0-solc-0.7"]
),
"f61364a0c94c546c2686fccf64fb00b7e6a238f5": LibraryInfo(
"AccessControl", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"5d4b8f8c71145f3eea66f7436b857d639d294975": LibraryInfo(
"Ownable", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0"]
),
"5ce37f6d78b690e78105d779c9c5f8b133b20713": LibraryInfo(
"ECDSA",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
],
),
"e2563eee26d163e13a84de12c231bad5bd9d07ef": LibraryInfo(
"ERC165", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0"]
),
"bab56366523b8b4b46e5f4745d87d1c4925a4cd5": LibraryInfo(
"ERC165Checker",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"e0902a009ac1aef60cb3f2396c3e0551cabe50e4": LibraryInfo(
"ERC1820Implementer",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"8c1783f1553244438a69f197761338b573ea437a": LibraryInfo(
"IERC1820Registry",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.1.0-solc-0.7", "v3.2.0", "v3.2.1-solc-0.7"],
),
"299995a0dda5331bc9ee5b50a02caecae0ab2f47": LibraryInfo(
"SafeMath", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"381c1c12d9d6ed7263d499568493801a2f9f6c98": LibraryInfo(
"SignedSafeMath", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"b36bba5668b0585f8fd14a482b2b732245a71bbb": LibraryInfo(
"AccessControlMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"ea494ccbabbb741ef48ad0ff5c085f91efcf3a3f": LibraryInfo(
"AddressImpl", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"efab65e1bceef92614ebe4fbb8f9fb24482b6ed6": LibraryInfo(
"ArraysImpl",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"3a520123de9cd4ca9a16c3f5b2d60d7d30aba9f7": LibraryInfo(
"ConditionalEscrowMock",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"dfd11780fdbce9683363b9951c1736dd9c0a3479": LibraryInfo(
"Create2Impl",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
],
),
"039c37d37cd81934ed60f46f40e5b7c454e5c61e": LibraryInfo(
"SupportsInterfaceWithLookupMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"945e934e278de6fd89f396f2cf47be09063ca054": LibraryInfo(
"ERC165NotSupported",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"ea356c162ff728d39db8f4b1f8629294b7dc53c1": LibraryInfo(
"ERC165CheckerMock",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"0a36b70b7c01ef2e9ad666db0b7c7815a2954bdc": LibraryInfo(
"ERC20BurnableMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"44563df6fb78cc199c6afa99364a06e8b6bb1a8b": LibraryInfo(
"ERC20CappedMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"065fda899fd387ce4fb161a544c6ca5c4d2cefe0": LibraryInfo(
"ERC20DecimalsMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"0848d902f46092fd3cb28518efb3485754a176bd": LibraryInfo(
"ERC20Mock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"d3694a314c74d8e0061fd1ee4abe29265e333a8a": LibraryInfo(
"ERC20PausableMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"b87497aeac600f01a5e99eef27004dba2b386db9": LibraryInfo(
"ERC20SnapshotMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"801315f0005d984a6660bcc6a0980fd812f1c36a": LibraryInfo(
"ERC721BurnableMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"7b7d05bbf487b7101f6d0b1b17d9775001297456": LibraryInfo(
"ERC721GSNRecipientMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"b702ee7d010f646e049b5e6786395716a6c4e5de": LibraryInfo(
"ERC721Mock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"4265a7d8085494949939f615f62481d368c2ea2a": LibraryInfo(
"ERC721PausableMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"153e1fe8ab29256f08340d4b68bb4d0e7bf31c1b": LibraryInfo(
"ERC721ReceiverMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"9b9a5118eced1d02b1558076d4598e9e007ef161": LibraryInfo("ERC777Mock", ["v3.0.0"]),
"d4ab30adb57b13f8a100753fcbcc100b5b93c41f": LibraryInfo(
"ERC777SenderRecipientMock",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"56edef128a9c6161b588e85b7e9f8a7c8719330c": LibraryInfo(
"EnumerableMapMock",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"42492e1e3840893868cce13e052e73be0115a282": LibraryInfo(
"EnumerableSetMock", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"8142f6d05936c535329a037a5982940423113d0d": LibraryInfo(
"EtherReceiverMock",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"926923f5dda7a7fdefe2b298549b4c7c899d644d": LibraryInfo(
"GSNRecipientERC20FeeMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"b25e72ff5f0838564ad1fef33a62269baa223e58": LibraryInfo(
"GSNRecipientMock",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.3.0",
"v3.4.0",
"v3.4.1",
"v3.4.2",
],
),
"08d9ca42c0b395de9866fdc89cf80baa79f3c544": LibraryInfo(
"GSNRecipientSignatureMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"35bab91349a98ac9d37a0b0dea207ec66d9df1de": LibraryInfo(
"OwnableMock",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"b598caa720703755d142c55313587b39afd98fed": LibraryInfo(
"PausableMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"ee40626ef9ea1cda61726721063073150205a62d": LibraryInfo(
"PullPaymentMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"9e583d7f7bb1a067f370d89b9fbe3761ec3e9667": LibraryInfo(
"ReentrancyMock",
["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"],
),
"b2abff56fa395cf30f6f70e37eca3d75afbba4fd": LibraryInfo(
"SafeCastMock", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"bd3f6a5cf9aa93cca8f92896283807e732bf562f": LibraryInfo(
"StringsMock",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"128b25a6695355f36790d5a10fd795b8bb27fa2d": LibraryInfo(
"PaymentSplitter", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0"]
),
"86fd813a5a70b5d7233bc1dd53d2f794978e8bcd": LibraryInfo("PullPayment", ["v3.0.0"]),
"88a3718cebe06fc9da77d9678a2b6f0ed68ddba3": LibraryInfo(
"ConditionalEscrow",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"69fb19ca610d79dbf1138608ac29096e7f1b5976": LibraryInfo(
"Escrow",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"f2caea65705f8c4230984e0a8c7e764b2d87c29c": LibraryInfo(
"RefundEscrow", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0"]
),
"54363b19c1cc14361dfea5510bff28f17a35e284": LibraryInfo(
"ERC20PresetMinterPauser", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"38ca7b059432b97d9bd6ebb4dbfd3a8e7626c059": LibraryInfo(
"ERC721PresetMinterPauserAutoId", ["v3.0.0"]
),
"01a31d70eac15ebc3e72762f3d9083e2ec58102f": LibraryInfo(
"ERC20", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0"]
),
"b6e55d3df0d0552ed089b09f61be8bc6379ead02": LibraryInfo(
"ERC20Burnable", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0"]
),
"32dab051731393e6bfb3688e8cfb871017bb917d": LibraryInfo(
"ERC20Capped", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0"]
),
"33382c542643be96d197ace0347bc3ca0b450993": LibraryInfo(
"ERC20Pausable",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"b1b3262a12fc93ad5fc3044f105688b26a8fc39c": LibraryInfo(
"ERC20Snapshot", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.1.0-solc-0.7"]
),
"8ad28076b641582bd77b676374b81cfd0f2e1a16": LibraryInfo(
"SafeERC20", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"b021a1cfeb77d1b2933aee2118525dec020d52e3": LibraryInfo(
"TokenTimelock", ["v3.0.0", "v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0"]
),
"876d34e7701f0b3ebefb39f5fa5c0fe434181466": LibraryInfo(
"ERC721", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"a880a1b2738b3efcc5a95143d0a326ff227a45d0": LibraryInfo(
"ERC721Burnable", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"562cd257f69b05c02c7e235fd3a6d3619c428006": LibraryInfo(
"ERC721Holder", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"fa7968daf5e28907a8097cf716abe22a74102d2b": LibraryInfo(
"ERC721Pausable",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"c05ee17be3c12e0d5062b147bbc85543ca5e57a0": LibraryInfo("IERC721", ["v3.0.0"]),
"2f8c54269c3eef1154da10fbe4cc8b9b988909d8": LibraryInfo("IERC721Enumerable", ["v3.0.0"]),
"c03c0409f543870410ebc74e33089d8bd8fe4d33": LibraryInfo("IERC721Metadata", ["v3.0.0"]),
"a4499a2caaf32ff3a48dfbb81587c3adf6adfae8": LibraryInfo(
"IERC721Receiver", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"5899fda2e6c4c8cf2177cc7c078c78e6e5afd218": LibraryInfo("ERC777", ["v3.0.0"]),
"b9ef6216c31f8261423581d843bf14a333570560": LibraryInfo(
"IERC777",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"b3b149c4a02c930e5f138a7bd4d1ed07e5742f36": LibraryInfo(
"Address", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"61cc196dcfac4de6436deb8ec083d4aabf408a69": LibraryInfo(
"Create2", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"a37fb5e05f9228dc03b7c50737be17949c276978": LibraryInfo(
"EnumerableMap",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"ab23fb82ac99e05ad0a8697c1ad6b8eca4b9b6cf": LibraryInfo(
"EnumerableSet",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
],
),
"21547b61a2857572da1e51464899cdd52ebd5737": LibraryInfo(
"Pausable", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"7e7fa83b0f54ef795991472b8e1d61d5cf98c7d9": LibraryInfo(
"SafeCast", ["v3.0.0", "v3.0.1", "v3.0.2"]
),
"47fdeef8766861e816936156be77b55cb8e0d15d": LibraryInfo(
"Strings",
[
"v3.0.0",
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"3ebd393dd34383ead311cc6a4ac498d0562fbeed": LibraryInfo(
"ERC777Mock", ["v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0", "v3.3.0"]
),
"08d677f4935acdd04f1939d6430d2d98ed95a8b8": LibraryInfo(
"PullPayment", ["v3.0.1", "v3.0.2", "v3.1.0", "v3.2.0"]
),
"bcab2445fc6987740f10b1b48f5cc9f0a9dc628f": LibraryInfo(
"ERC721PresetMinterPauserAutoId", ["v3.0.1", "v3.0.2"]
),
"391484feda2d514efcbd8ad05bf24925d6a71d9c": LibraryInfo("IERC721", ["v3.0.1", "v3.0.2"]),
"043402c29808063960b154297d4d949f81f27e38": LibraryInfo(
"IERC721Enumerable",
[
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"609c41e5ec3e7eda3fe7b20d5fdf8459da4741fe": LibraryInfo(
"IERC721Metadata",
[
"v3.0.1",
"v3.0.2",
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"fe18a97dfdc6f6805760ef16a3a6426fd4ca5742": LibraryInfo("ERC777", ["v3.0.1", "v3.0.2"]),
"59f0695316bfaf076e70940bb15f611ab18e7380": LibraryInfo(
"Context",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"6ce10025cea27bb5e02ed9a0a849c592d991f9ba": LibraryInfo(
"AccessControl",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"05fb43f68cd62715cd9537e2407662ffd80d1b14": LibraryInfo(
"SafeMath",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"14bdd1cf1d91f81d608b9317df714bfdce5cc5c8": LibraryInfo(
"SignedSafeMath", ["v3.1.0", "v3.1.0-solc-0.7"]
),
"c387ffafae87632afcf8a61aa9a3046f74207337": LibraryInfo(
"AddressImpl", ["v3.1.0", "v3.1.0-solc-0.7", "v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7"]
),
"77dbf870fb94cfd13fd3fd2cf4d40eed0e1b5fe5": LibraryInfo(
"CallReceiverMock",
["v3.1.0", "v3.1.0-solc-0.7", "v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7"],
),
"2fbafc739e08a6e4f30468e02c422a0f46a44133": LibraryInfo(
"ERC1155BurnableMock", ["v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"]
),
"edebb3dec4141dedd0e6486b38ae6d2f4a2750df": LibraryInfo(
"ERC1155Mock", ["v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"]
),
"497e0d5e7016d8c029788a4612313a68b0dcac11": LibraryInfo(
"ERC1155PausableMock", ["v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"]
),
"b63233a551c74f686b15f9d1e41ec9a511b216c9": LibraryInfo(
"ERC1155ReceiverMock", ["v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"]
),
"4e0eb152c67034b43787e86dd9517e5acef04406": LibraryInfo(
"EnumerableAddressSetMock",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
],
),
"33031da76437b1311f45e835d07084449361c05e": LibraryInfo(
"EnumerableUintSetMock",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
],
),
"d58e3bc4a8dc2a667dfc6cd02e834693f8970d4f": LibraryInfo(
"SafeCastMock",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"59444c98b67b5f88dfb7bc0165563cc10963cb54": LibraryInfo(
"ERC1155PresetMinterPauser", ["v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"]
),
"57f1c230932cbfd9944efde495ece7b93961216c": LibraryInfo(
"ERC20PresetMinterPauser", ["v3.1.0", "v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"]
),
"60a2b550bd5c41484cbb9d96840bde18080cc9e0": LibraryInfo(
"ERC721PresetMinterPauserAutoId", ["v3.1.0"]
),
"271759a8472e5c3f9bd708d319334bc362f7ea28": LibraryInfo("ERC1155", ["v3.1.0"]),
"134643457f4b7b6f0e9e7e4d1a9dcc4490977b5b": LibraryInfo(
"ERC1155Burnable",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"cdb13d40682488f9f0953066325cf069b44dbd1e": LibraryInfo(
"ERC1155Holder",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"ad8f8fb3ef5b64079ea06b8a84f71961ca862b2c": LibraryInfo(
"ERC1155Pausable",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"bd50c286a31a9281ae013970efdd8a2698f70a3d": LibraryInfo(
"ERC1155Receiver", ["v3.1.0", "v3.2.0"]
),
"b51299123b2b7ac6f4473c4e9eeff2fae2527866": LibraryInfo(
"IERC1155", ["v3.1.0", "v3.1.0-solc-0.7"]
),
"ebbd8915f7e42b138f231d12a57aa3205648c228": LibraryInfo(
"IERC1155MetadataURI",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"461f1b75562c952dc593e4b74fe5957247b47e96": LibraryInfo(
"IERC1155Receiver",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"af36aa37efe07de73c75c3e3b2768abaf71d1f7e": LibraryInfo(
"SafeERC20",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"76e26d8fe94c40bc65de0b949ba063aec0c8888d": LibraryInfo("ERC721", ["v3.1.0"]),
"8b36b4f8062eab95d4c7b88da93222c71ab4bc9a": LibraryInfo(
"ERC721Burnable",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"8a49c9027bfd68a7406842fc38a54c1ffdb0f55c": LibraryInfo(
"ERC721Holder",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"6bc0035b00df60df8ab929ad72f1c15907ead145": LibraryInfo(
"IERC721", ["v3.1.0", "v3.1.0-solc-0.7"]
),
"66c525cc867324229ddc289348a728c95abd8ac0": LibraryInfo(
"IERC721Receiver",
["v3.1.0", "v3.1.0-solc-0.7", "v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7"],
),
"885e6164dd6b49a503e5a2a4ed16277b6eb23ca1": LibraryInfo("ERC777", ["v3.1.0", "v3.2.0"]),
"61c30616ec7a625371407d69c4f4287bef65465c": LibraryInfo(
"Address", ["v3.1.0", "v3.1.0-solc-0.7", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7"]
),
"e55e6ff86a0622d2187303e42de5dbd1f8bd7577": LibraryInfo(
"Create2",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
],
),
"7253411ae52004badc4d7f7410ce466489d61649": LibraryInfo("Pausable", ["v3.1.0", "v3.2.0"]),
"26c0a8f218e277e2f800073ec1cf3d9e8589d369": LibraryInfo(
"ReentrancyGuard", ["v3.1.0", "v3.2.0"]
),
"3bab9320873cd011466b2a6ab0dcac0f5dc1bc69": LibraryInfo(
"SafeCast",
[
"v3.1.0",
"v3.1.0-solc-0.7",
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"4078d8de60d037cbbb1a421d03159750cef400d7": LibraryInfo(
"GSNRecipientERC20Fee", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7"]
),
"05584150eb03bca28420d821f0d3079f3c392059": LibraryInfo(
"__unstable__ERC20Owned",
["v3.1.0-solc-0.7", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7", "v3.3.0-solc-0.7"],
),
"4821563b16a010649bd9fde1586e911f6c9c1841": LibraryInfo(
"GSNRecipientSignature",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"15cacbe095318831e2b3e609d4018cf5d59bb7af": LibraryInfo("IRelayHub", ["v3.1.0-solc-0.7"]),
"0453e5d14887ca74d7a9dd93ea24ffd21b33c0cc": LibraryInfo(
"Ownable", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7"]
),
"1e0f45ff715be57f9424f5703cbaf1c7c0b4cdad": LibraryInfo(
"ERC165", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7"]
),
"2dab2a74b7d92d977062dc109c47ca5ff6817564": LibraryInfo(
"AccessControlMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
],
),
"8caf6b0156b3bddcfbc8fdca0f640795d2dad50a": LibraryInfo(
"ArraysImpl",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"a0dd84b48b5d2c1d88cf53ceb5e3f992edb33507": LibraryInfo(
"ERC1155BurnableMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"b423c7c0aa88de46bbfd3d42fea4db2cda7733fe": LibraryInfo(
"ERC1155Mock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"85b3c12fd1d0ddd48e056e0b40f7407323376576": LibraryInfo(
"ERC1155PausableMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"73e683d19ff414928daa00a6fced00488cb31307": LibraryInfo(
"ERC1155ReceiverMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"83c038d09502c0d9a0315629e03aca228f6aeca7": LibraryInfo(
"SupportsInterfaceWithLookupMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"32bbc7aff9562c2ae47502929375cd06c0e01aab": LibraryInfo(
"ERC165InterfacesSupported",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"7d163c3d68597c146c14da4df3f451afed59a2f3": LibraryInfo(
"ERC20BurnableMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"7214c953c5c6ec720257cd10340380687965941f": LibraryInfo(
"ERC20CappedMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"8971a5f34be9083e20af4a06fb75050ff87cc784": LibraryInfo(
"ERC20DecimalsMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"22cfcfc29d92bda4cca9a70b78b9ddefab727ccc": LibraryInfo(
"ERC20Mock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"db4e7558d868ae1b732167860c6d77e361f552fa": LibraryInfo(
"ERC20PausableMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"4f7b8369f212124b124bbd4ff4d9809d1462f947": LibraryInfo(
"ERC20SnapshotMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"a98e5e8ec5b8c839786c8b5fec95f1a8c0d76999": LibraryInfo(
"ERC721BurnableMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"6bca38a21f8600f2c6e7ba24572beeeca15a7007": LibraryInfo(
"ERC721GSNRecipientMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"27639747781f75ef1d11c3a8af9e7f9425b6595b": LibraryInfo(
"ERC721Mock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"f1e38a0757425bc9c416626fcf8f4a73a612264a": LibraryInfo(
"ERC721PausableMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"4fa02f6cb2fe182533fe2c180323c8bdaf20472c": LibraryInfo(
"ERC721ReceiverMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"01f24211871a64c439300003fc8b8dc76ddff4b6": LibraryInfo(
"ERC777Mock", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"d286a08d1ddefa6a8fa5b8d6d8a52f4fdee2ce0c": LibraryInfo(
"GSNRecipientERC20FeeMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"fec57f6d1902f7fbac554b0f375b3117e8e745eb": LibraryInfo(
"GSNRecipientSignatureMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"ea7b7becb2c1cc0987b63d7cd3065b1819bb4b0a": LibraryInfo(
"PausableMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"7d8fde97a41abf14faf73685794d849a4c3e0ac1": LibraryInfo(
"PullPaymentMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"0c8d3622e8f5d7562ad37806f3d75b9290558a3a": LibraryInfo(
"ReentrancyMock",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"0dbc8bb2fa7ae511f40ac5143ce8817dba57d89c": LibraryInfo(
"SafeERC20Wrapper",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"9c68614788325a6129235a41228ca6d0d2ae806b": LibraryInfo(
"PaymentSplitter", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7"]
),
"8084049564949219b37e12ecf91934ad62e5a94d": LibraryInfo(
"PullPayment", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7"]
),
"1a5d2d9ad8b09f49594f516e1c1bd434264b6441": LibraryInfo(
"RefundEscrow", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7"]
),
"7ef8bf14f12c46b04f4bb701ac6148af107d151e": LibraryInfo(
"ERC1155PresetMinterPauser",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"4d3c1b8ff12cb6f53bfe559c4001aaae2ce5bfa9": LibraryInfo(
"ERC20PresetMinterPauser",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"76e1b471738b29e9ad472002b299e6ca5c992583": LibraryInfo(
"ERC721PresetMinterPauserAutoId", ["v3.1.0-solc-0.7"]
),
"13032a5e6e8c053928c1a7079d1cec08a8f72545": LibraryInfo("ERC1155", ["v3.1.0-solc-0.7"]),
"e9aeb04c7cf3cfe28278030bef8e6918e8822bd0": LibraryInfo(
"ERC1155Receiver",
["v3.1.0-solc-0.7", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7", "v3.3.0-solc-0.7"],
),
"1524e25dfd71e549c0927267e4cf939f87eb856c": LibraryInfo("ERC20", ["v3.1.0-solc-0.7"]),
"ce38bf299cd7a12c71f467aab654930a323c8947": LibraryInfo(
"ERC20Burnable",
[
"v3.1.0-solc-0.7",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"a093419c3b2483a11d550d411c12a40b4d2bc644": LibraryInfo(
"ERC20Capped", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7"]
),
"c13eed0a07804745778304d7af258421bc4f2c50": LibraryInfo(
"TokenTimelock", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7"]
),
"5553fa5d1dd434b4ff2f5631f89923d65a4156db": LibraryInfo("ERC721", ["v3.1.0-solc-0.7"]),
"c97967b9b005fffa9ed4fc230cf48d48e34e71bc": LibraryInfo("ERC777", ["v3.1.0-solc-0.7"]),
"c6c506954a6d5d6b55db67cc577e31e7da641ecd": LibraryInfo(
"Pausable", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7"]
),
"aa82b2ee7d508dc438e8a7d3995278479076184e": LibraryInfo(
"ReentrancyGuard", ["v3.1.0-solc-0.7", "v3.2.1-solc-0.7"]
),
"85e7ef332d5fc621ce63ccba93ee518591bf8c8b": LibraryInfo(
"GSNRecipient",
["v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7", "v3.3.0", "v3.3.0-solc-0.7"],
),
"96d2749e41cfd4e833a6178779093d82efbb7d0b": LibraryInfo(
"IRelayHub",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"ffe1a6c90aa2b5556371b3799d2c65380a257d0b": LibraryInfo(
"IRelayRecipient",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"0d2073be4268aabd41cce88b3769748e23142750": LibraryInfo(
"SignedSafeMath",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"c0bae1111dcdf923d9a02599ff8a04c00e2456ed": LibraryInfo(
"ClashingImplementation",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"4f92b6c4dfa12c3081d1fe4007e48df4c8c82e5c": LibraryInfo(
"Impl",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"299556791f944a3fdbb677e5940c9d6865822606": LibraryInfo(
"DummyImplementation", ["v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7"]
),
"0b65288765b06e6baaa610a1d42eaa2b4591d8cd": LibraryInfo(
"DummyImplementationV2", ["v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7"]
),
"36075e336521530913cca767578aac6f07a38909": LibraryInfo(
"InitializableMock",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"2f0630fab703c0cfc42ae33caf06e886fc4e6969": LibraryInfo(
"SampleHuman",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"0de21f8a03ee4c6f6a63c6b6bf8b4f72d72ceced": LibraryInfo(
"SampleMother",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"62b03120ad8b165c812e68bfdbba23080bf441b2": LibraryInfo(
"SampleGramps",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"0bb55179c7e2bafad38c05cdad4d7a4a6b82d90e": LibraryInfo(
"SampleFather",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"dc4d51c37ecfb1e2967ef74f7a2559a6252a5272": LibraryInfo(
"SampleChild",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"85d6460e3b0ac8447a7db9493a5ff396c5e9364a": LibraryInfo(
"Implementation1",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"43af63388be018e6a4448b585ee2244486d266ff": LibraryInfo(
"Implementation2",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"1b7890b0027cf8b10d871746f93c892d4b2e814c": LibraryInfo(
"Implementation3",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"257829569899b91fcbbfbd6fe9660d7ed25f82b1": LibraryInfo(
"Implementation4",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"e179e255d203b40b5e050148327a89a4db0274af": LibraryInfo(
"MigratableMockV1",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"b74cf7f9f38e31bc2c4cc77a87569a094d157de0": LibraryInfo(
"MigratableMockV2",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"97d9d9e61df537b9d68d8d94b363eb8f58f9c855": LibraryInfo(
"MigratableMockV3",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"36ef2be3f4842ffce40b0baad7a38c98dca86627": LibraryInfo(
"ERC721PresetMinterPauserAutoId", ["v3.2.0", "v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"]
),
"44346833a6bd65fe95c90748b5722a563f3dc3e1": LibraryInfo(
"Initializable",
["v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7", "v3.3.0", "v3.3.0-solc-0.7"],
),
"c2f5c325aaa4ab9aa2c8def40e53cb2e7c38dd66": LibraryInfo(
"Proxy", ["v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7"]
),
"62927e48e0b61e131a6cfa67ebda7218969a6f3d": LibraryInfo(
"ProxyAdmin", ["v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7", "v3.3.0", "v3.3.0-solc-0.7"]
),
"a312403c3feaf629c2900ce0f0d1434bc359d428": LibraryInfo(
"TransparentUpgradeableProxy", ["v3.2.0"]
),
"2dc09dba2775be34524d45a25c6a12a6064b687e": LibraryInfo(
"UpgradeableProxy", ["v3.2.0", "v3.3.0"]
),
"1451ecddce18800239ff93690b719b8a654a8b2e": LibraryInfo("ERC1155", ["v3.2.0"]),
"4635856f8449649c520428ead6e61d6f9b1e13a8": LibraryInfo(
"IERC1155",
[
"v3.2.0",
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"12525308d365e1082fcf3ada1fb2d71db3972b16": LibraryInfo("ERC20", ["v3.2.0"]),
"0ea2181daa5c7e76ccbabf8a9999f9fbd1833820": LibraryInfo(
"ERC20Snapshot",
["v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7", "v3.3.0", "v3.3.0-solc-0.7"],
),
"65ebeb77cd51d64c2e748bd176562b4e4b3766b7": LibraryInfo("ERC721", ["v3.2.0"]),
"365098499bb100597dd9267be4172eb9a51e49f7": LibraryInfo(
"IERC721", ["v3.2.0", "v3.2.1-solc-0.7", "v3.2.2-solc-0.7", "v3.3.0", "v3.3.0-solc-0.7"]
),
"aca21574c58b1e1387769de3b07df2bd8648fe2a": LibraryInfo("Address", ["v3.2.0"]),
"5e2433d4880abf2da08dc7bb2b1bed1ee89500dc": LibraryInfo(
"ERC721PresetMinterPauserAutoId",
[
"v3.2.1-solc-0.7",
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"060fa9715f285857c483f5f8aa8f283597b32a8e": LibraryInfo(
"TransparentUpgradeableProxy", ["v3.2.1-solc-0.7"]
),
"eeb1b0eb21f40d26aeaa5db59da4d89bdd78eb3a": LibraryInfo(
"UpgradeableProxy", ["v3.2.1-solc-0.7", "v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"a6e8c979be5bb5af9fbb1e614b27b38839a5894d": LibraryInfo("ERC1155", ["v3.2.1-solc-0.7"]),
"99b6d5df430ce23689a152c8438164c5de872197": LibraryInfo("ERC20", ["v3.2.1-solc-0.7"]),
"c60a6be3f3fce5a3b3ef5122354fffa11cc2f04a": LibraryInfo("ERC721", ["v3.2.1-solc-0.7"]),
"ac504766b532baf6b726e48a8e3c99f16b2453c2": LibraryInfo("ERC777", ["v3.2.1-solc-0.7"]),
"f9fd0c5c9e330675fda7856b975b0fe6b02624d0": LibraryInfo(
"GSNRecipientERC20Fee", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"f1fee8d515a2f71cfbbc450e793a2d2b17caca7a": LibraryInfo(
"Ownable", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"b503decf7949df51f4ba6808c081792e70437c0d": LibraryInfo(
"ERC165", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"761f89f6ffc7ca427b95c3f0101db6d1f271d0e8": LibraryInfo(
"IERC1820Registry",
[
"v3.2.2-solc-0.7",
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
],
),
"7640634b8811549a807f0ba07f7acb29afbedf2d": LibraryInfo(
"GSNRecipientMock",
[
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"ef02f12e6402f08a97633ad225b6b312578ad132": LibraryInfo(
"PaymentSplitter", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"248a8a1273db727248a7412571724b5707d2946b": LibraryInfo(
"PullPayment",
[
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
],
),
"397958f6f4842504963dbd017cfb8bc64d4cc2f8": LibraryInfo(
"RefundEscrow", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"84a1ee038830d25ac77a33ebe4b6d27360da022c": LibraryInfo(
"TransparentUpgradeableProxy", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"bbc4789f86eff2f3a7f1da837ae6a85de7e2f803": LibraryInfo(
"ERC1155", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"73606b13add74a0032c16e323d11c28d0a62fa05": LibraryInfo("ERC20", ["v3.2.2-solc-0.7"]),
"c7e4c94e1c49864431de7e3b2dea4595757189d6": LibraryInfo(
"ERC20Capped", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"ca4fe971d9d72558abd50f77b6cd8b3de2554b26": LibraryInfo(
"TokenTimelock", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"eab2db3a101c13a594e8f1d140adf52c64242bf1": LibraryInfo(
"ERC721", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"505e83265ba5e1b1939a2c199ec99b5beef596bb": LibraryInfo(
"ERC777", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"ee5e60d9ed917eab36f085b0b128c2fff2caf10b": LibraryInfo(
"Pausable", ["v3.2.2-solc-0.7", "v3.3.0-solc-0.7"]
),
"bc88ca03e46528a04853c32ebf121df42c4d9edd": LibraryInfo(
"ReentrancyGuard",
[
"v3.2.2-solc-0.7",
"v3.3.0-solc-0.7",
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"2cefc88832911d8f000cf1f853a8a1ec34a83869": LibraryInfo("GSNRecipientERC20Fee", ["v3.3.0"]),
"ff468e5fb020023b45058cd9d6baa684a07c169a": LibraryInfo("Ownable", ["v3.3.0"]),
"62e78f66a0dc5a7ad8b7f155a4a3c0bc056d37ed": LibraryInfo("TimelockController", ["v3.3.0"]),
"7661544d7b4503ae1db879c1b06335abe437eb43": LibraryInfo("ECDSA", ["v3.3.0", "v3.3.0-solc-0.7"]),
"79f657470505cee15284ebf0afac69c26820b6bd": LibraryInfo("ERC165", ["v3.3.0"]),
"3a5cd51f0635a3fb082c4e761450b541cedd5e9f": LibraryInfo(
"AddressImpl", ["v3.3.0", "v3.3.0-solc-0.7"]
),
"780be56bedddc62c2722b13e5fe2e258e07da87e": LibraryInfo(
"CallReceiverMock",
[
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
],
),
"eebcccd00f6a1385ea11f82064fe982637af2cd8": LibraryInfo(
"Create2Impl",
[
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"54279277126550e93cb4518ef5b0ec055915ec67": LibraryInfo(
"DummyImplementation", ["v3.3.0", "v3.3.0-solc-0.7"]
),
"0b1c723fb1caabd0949393e90cbb3a18af826a7b": LibraryInfo(
"DummyImplementationV2",
[
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"8f7732e30464761faf28ca7d986c979cb78b55ff": LibraryInfo(
"EnumerableBytes32SetMock",
[
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
],
),
"08b973b9862e47b6cef3ae3540a9c798a2e3948a": LibraryInfo("PaymentSplitter", ["v3.3.0"]),
"3e2e2f659b27f72c72462d35a41afed6c71e1310": LibraryInfo(
"PullPayment", ["v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"]
),
"36cbd240c302af1fc3f2bd00aa7f204ccbe1e051": LibraryInfo("RefundEscrow", ["v3.3.0"]),
"80b95e3cad825888ef85966822547e32c545d044": LibraryInfo("Proxy", ["v3.3.0", "v3.3.0-solc-0.7"]),
"fb5050efb413c3776ec0c9ffa540df1a42d3ce2b": LibraryInfo(
"TransparentUpgradeableProxy", ["v3.3.0"]
),
"93c13eddcfcd62395624270cde928e5d24d3b4b8": LibraryInfo("ERC1155", ["v3.3.0"]),
"61e358e538e2273e31fa7133009c7a3c4ff8b9dd": LibraryInfo("ERC1155Receiver", ["v3.3.0"]),
"0dc22cde3abaf6c0fa621b32f9f7934e22f4c1d1": LibraryInfo("ERC20", ["v3.3.0"]),
"63536d5bfe0f79c8ef6782baebe76002151cb22e": LibraryInfo("ERC20Capped", ["v3.3.0"]),
"dd756683800487b41064dd881e0b65a419862aa0": LibraryInfo("TokenTimelock", ["v3.3.0"]),
"818503b17c0db33bfe69b5cc461cbc061d0c65b9": LibraryInfo("ERC721", ["v3.3.0"]),
"04278f72bdb6c61d366aec038058a1212a4f07e9": LibraryInfo(
"IERC721Receiver",
[
"v3.3.0",
"v3.3.0-solc-0.7",
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"5512c580e9da164446f6551a20486a35e1c08807": LibraryInfo("ERC777", ["v3.3.0"]),
"da934a25d30edfd91855d54555dc0144dbbfd7cb": LibraryInfo(
"Address", ["v3.3.0", "v3.3.0-solc-0.7"]
),
"179de8c468d36b2e51824b07136adedae7bcbdc3": LibraryInfo(
"EnumerableSet", ["v3.3.0", "v3.3.0-solc-0.7"]
),
"12cb21575ea5e6e30c37c9a7440fcc2b3adb0845": LibraryInfo("Pausable", ["v3.3.0"]),
"ffca07556d8e39845429a3b009980201301c5b6e": LibraryInfo(
"ReentrancyGuard", ["v3.3.0", "v3.4.0", "v3.4.1", "v3.4.2"]
),
"be045cb6e49d12aa04b07af22ad6e600d472b78f": LibraryInfo(
"TimelockController", ["v3.3.0-solc-0.7"]
),
"6af4381b463ec0dcd9e2332bff9cf3ea9568ba29": LibraryInfo("ERC20", ["v3.3.0-solc-0.7"]),
"33beec74bb53c2ee0e9e12f694e367258724e6b2": LibraryInfo(
"GSNRecipient",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"32a14bea425dc2959b680187600942f4901efceb": LibraryInfo(
"GSNRecipientERC20Fee", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"fa5e7908a5cb10013f735b6718ba6ef4fb41b794": LibraryInfo(
"__unstable__ERC20Owned", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"5d07d72245331e4275c204db282ad3900383f778": LibraryInfo(
"Ownable", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"5d26e032a554805a01aca59579417663de70f966": LibraryInfo(
"TimelockController", ["v3.4.0", "v3.4.1"]
),
"63a2430e318736b284bccc524d6c619d329ce419": LibraryInfo(
"ECDSA",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"2cf03d8347d7129c4de359dcaa4f0dc40f88684a": LibraryInfo(
"EIP712", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"92215334770433b2add7c67ac51233591f7fe922": LibraryInfo(
"ERC20Permit", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"e2f97eec1c3991924b7b1456696f87048be7d783": LibraryInfo(
"IERC20Permit",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
],
),
"f35d0cf20e1373848e42b706d4d6aa9fd46988c2": LibraryInfo(
"ERC165", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"c8909db38edab0286eb1e83f45baad9b70ed6340": LibraryInfo(
"ERC165Checker",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"dbf020d120894cffa01451b8caa8cac408122c47": LibraryInfo(
"ERC1820Implementer",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"a1815b90bd687d3a96e0d4cc57bc8aa5acc126a9": LibraryInfo(
"SafeMath",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"1eee0a26498f2e503cda12d7f0a3631e9256d11f": LibraryInfo(
"AddressImpl",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"64ba98e0a7a3462e9a936a0744ed9d1f27f4efe2": LibraryInfo(
"BadBeaconNoImpl",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"49252afe482c957eb4d0d4e1f61a70fae4534bbe": LibraryInfo(
"BadBeaconNotContract",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"f21645963792a804fe46d24eae733ced9792325e": LibraryInfo(
"ClonesMock",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"c312288ff11bbaa9f288b73efa4e89905b4b3e0c": LibraryInfo(
"DummyImplementation",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"fba59a0ad823b65925d38fba35a9fb0acba4f11c": LibraryInfo(
"EIP712External", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"3f41e938116aa300aad2aefadfbcaa6193c490ef": LibraryInfo(
"ERC165CheckerMock",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"f5bc328483f38e40a88c2830fc7d26319aa9b5fb": LibraryInfo(
"ERC20PermitMock", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"02d7d727adc8cb0dbc83f8e1803c172a0990296f": LibraryInfo(
"ERC777Mock", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"7cdf827fe3a903fbcaa418bad074950ae9f8c8d2": LibraryInfo(
"ERC777SenderRecipientMock",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"3a93528b96d70af4e872192f05dfc7ee25419517": LibraryInfo(
"EnumerableMapMock",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"c68710ed96a182101e1024d3e1aa91cfd2a636d2": LibraryInfo(
"SafeMathMock",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"5a91c81404f840fd7f9054fe06f3a1c5036d4343": LibraryInfo(
"PaymentSplitter", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"e7ac2394f80e32ef8d86823bf3ab56e94543490f": LibraryInfo(
"Escrow",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"46e54ddada38f2432fbbd672068ebc144fba6137": LibraryInfo(
"RefundEscrow", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"222751ccf88f680c3c75ab80cfb80797d45b2651": LibraryInfo(
"ERC20PresetFixedSupply", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"1a1081be6939302bfc77c7b3be6c5f874118297f": LibraryInfo(
"ERC777PresetFixedSupply", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"ce7db6d05e7868e70e75528f1c0fbd9297bc6fcf": LibraryInfo(
"BeaconProxy", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"4249e310139fbc623392ee676281a60d143c16da": LibraryInfo(
"Clones",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"869d95b3589c7fa6b2ecb1dfeb9008c463c267bf": LibraryInfo(
"IBeacon",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"0fbaee3e2bef583ef42cb3ed731b3e40b68aea33": LibraryInfo(
"Initializable",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"3785f5c4f386559127baa5a185d2ec13ad4c53af": LibraryInfo(
"Proxy",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"1c570dba696f08a170e92f985d839dbe0ecb4a91": LibraryInfo(
"ProxyAdmin",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"a7386fcd820a2c66235bb3e835a30b553545812f": LibraryInfo(
"TransparentUpgradeableProxy", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"870cdbd1d2ddaf132c3a1a6a1d48d6ea004b123a": LibraryInfo(
"UpgradeableBeacon", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"9ce86a848977d6ebddddd293ea9e81836c488c6a": LibraryInfo(
"UpgradeableProxy", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"3160f17274036d6719cd64c436b4167104e70bc1": LibraryInfo(
"ERC1155", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"1c6dbf08eb3ea12cf8a55ba920f32971bf194e89": LibraryInfo(
"ERC1155Pausable",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"b5611144434fe88f4b7fa065d3fe437178a770ce": LibraryInfo(
"ERC1155Receiver", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"1c7854ebfeea3b6b4ada23aa0dec5cdd142d5524": LibraryInfo(
"ERC20", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"54480a412d33bc4808a6f4626c12a186086c236b": LibraryInfo(
"ERC20Capped", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"06ea9a75c96d6774e79699e85d93b2b2daf7e701": LibraryInfo(
"ERC20Snapshot",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"7042e55c509ff3cbe7c149238e29fed880359381": LibraryInfo(
"TokenTimelock", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"6146ecf60a2e9e538355b19cf9095a9723197adc": LibraryInfo("ERC721", ["v3.4.0"]),
"7e232aaf85bb00c9401b300972a3f6322faed39d": LibraryInfo(
"IERC721",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"9fa1eca3807f9186d44ae941020d506dfe551adc": LibraryInfo(
"ERC777", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"041cd09ad5b7832a451916a4eab7c14b9157f9bb": LibraryInfo(
"Address",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"1c6caa372c1211fa570af1576c88d16cacb426c0": LibraryInfo(
"Create2",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"cafd568a2be123baff9a85ba0d347a428fb5777e": LibraryInfo(
"EnumerableMap",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"1690dfe17f8334a2a88203427ce601d9c6b25760": LibraryInfo(
"EnumerableSet",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
"v4.0.0",
],
),
"3246d2bfdfc6dd0197a0fe1497632d66ae05fd58": LibraryInfo(
"Pausable", ["v3.4.0", "v3.4.1", "v3.4.2"]
),
"b12a995aa8744db27ab0e367133c4cf01eb3a9de": LibraryInfo(
"Strings",
[
"v3.4.0",
"v3.4.0-solc-0.7",
"v3.4.1",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2",
"v3.4.2-solc-0.7",
],
),
"1dca314c082a2d86c4b13fc44d00ed3caf84660d": LibraryInfo(
"GSNRecipientERC20Fee",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"507897800a5e8a472a426aebecc8e766854e20cd": LibraryInfo(
"__unstable__ERC20Owned",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"e7f6d7ee5a886c88c0052fc24f06e83a3f3a08d1": LibraryInfo(
"Ownable",
[
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"b1eaec929a4492a5ab9c3ee0941f4d0ad4dae002": LibraryInfo(
"TimelockController", ["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2"]
),
"050c8ca6f92fe1485057a1faa1293ac23af4e9ec": LibraryInfo(
"EIP712", ["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"]
),
"4fd1e1d5762c465c2779bb5062ab69c1c15df7b6": LibraryInfo(
"ERC20Permit",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7", "v4.0.0"],
),
"8ebfa908d5afc1a43d6c42fb85da4d675ad2acaa": LibraryInfo(
"ERC165", ["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"]
),
"69db7dc4835bf134acaadee0aa2d3f51ab9e655b": LibraryInfo(
"EIP712External",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"91dc025deeeb2e4dead2db739f04e2d00619a818": LibraryInfo(
"ERC20PermitMock",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"f37b58e417ed7f71db679b2c2fa5c0ce14226133": LibraryInfo(
"ERC777Mock",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7", "v4.0.0"],
),
"b052abe16f942be8a710a608a09f437476b8ca03": LibraryInfo(
"PaymentSplitter",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"47f3ee26c503ec9c706f580520db5e78af9aeeef": LibraryInfo(
"RefundEscrow",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"8a505d49e69fe65120a99979dbdca39b8efe22f5": LibraryInfo(
"ERC20PresetFixedSupply",
[
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"ea8b53fd468c496848babd2a0e108b002c94c3d7": LibraryInfo(
"ERC777PresetFixedSupply",
[
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"2bc90d97df0f2ee6653f0237130bdf57ca2437ab": LibraryInfo(
"BeaconProxy",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7", "v4.0.0"],
),
"f1f156b98ccda98d19e894c141bc0317cc5eb9c0": LibraryInfo(
"TransparentUpgradeableProxy",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"1ae15cdffe0ca9340174ae68cb8d2892fe831bc5": LibraryInfo(
"UpgradeableBeacon",
[
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"1c2989c2b4cad10ff8b0ed4f7cffce37d3f7a6dd": LibraryInfo(
"UpgradeableProxy",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"51ad04dc5cdffc68238a1696f78d7672555ec7dd": LibraryInfo(
"ERC1155", ["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"]
),
"48ba59afc22a61b178aba0199a30340b43f9ba62": LibraryInfo(
"ERC1155Receiver",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"7cf1a0c8c25eaa2edbfccc040d2942fbb7d7596e": LibraryInfo(
"ERC20", ["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"]
),
"12d077e4475d8cc3dd032a10fb2f97138c5c2bf4": LibraryInfo(
"ERC20Capped",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"8846bad470e1c4a2177e3247c29c6604a2307157": LibraryInfo(
"TokenTimelock",
["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"],
),
"171ab805afaa2a3b05e4bdba9d9a8271c77db63a": LibraryInfo(
"ERC721", ["v3.4.0-solc-0.7", "v3.4.1-solc-0.7"]
),
"a908082bdc2115f43aabea87e8c2897833bfda29": LibraryInfo(
"ERC777", ["v3.4.0-solc-0.7", "v3.4.1-solc-0.7", "v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"]
),
"0424544a512fcdda8b090610916a0f7c5d375387": LibraryInfo(
"Pausable",
[
"v3.4.0-solc-0.7",
"v3.4.1-solc-0.7",
"v3.4.1-solc-0.7-2",
"v3.4.2-solc-0.7",
"v4.0.0",
"v4.1.0",
],
),
"1321258244d9c40eff5a48ed1ecb88b2577a56b7": LibraryInfo("ERC721", ["v3.4.1", "v3.4.2"]),
"a0a26ed94d63bffb8f31246bdfce9867514cd672": LibraryInfo(
"ERC721", ["v3.4.1-solc-0.7-2", "v3.4.2-solc-0.7"]
),
"b01a301a7d54e6d284e847eb9d9e24076112808c": LibraryInfo("TimelockController", ["v3.4.2"]),
"69d0e361a511bf3103d25a77dbe77048ee5e0115": LibraryInfo(
"TimelockController", ["v3.4.2-solc-0.7"]
),
"ef9cee4fc16302d9c2f27edb367db294c1b81f5f": LibraryInfo("IAccessControl", ["v4.0.0", "v4.1.0"]),
"dab86c163c575d30473cb3a5c0624b44334efc12": LibraryInfo("AccessControl", ["v4.0.0"]),
"2207123df93140cd294823148a2558be596e6495": LibraryInfo(
"IAccessControlEnumerable", ["v4.0.0", "v4.1.0"]
),
"abbe8b6df781ca55c069fd98e85f817213835c6d": LibraryInfo(
"AccessControlEnumerable", ["v4.0.0", "v4.1.0"]
),
"9565576e12fc40a6a8a79f663a4899ef55e80c5e": LibraryInfo(
"PaymentSplitter", ["v4.0.0", "v4.1.0"]
),
"92411b430030f18396dc798bcf7d29c2d53b68eb": LibraryInfo("TimelockController", ["v4.0.0"]),
"259338440d397d3da2a4bf44649d51cc646c5aa0": LibraryInfo("ERC2771Context", ["v4.0.0", "v4.1.0"]),
"566d42bf0d67adb04c1e73658ef5802b61702c97": LibraryInfo(
"MinimalForwarder", ["v4.0.0", "v4.1.0"]
),
"253248bcf8aaa75c515f000d674e69e3ad2dc67c": LibraryInfo(
"AccessControlEnumerableMock", ["v4.0.0"]
),
"868d87ef0ff053e2007b9e9180f2d5daede6491a": LibraryInfo("ClonesMock", ["v4.0.0", "v4.1.0"]),
"e4ddf77999bc8a4befcd1d9428b77ec0156f1c82": LibraryInfo("EIP712External", ["v4.0.0", "v4.1.0"]),
"56a0750afc35891ff98a07f7c36aecbb2103c32e": LibraryInfo(
"ERC1155ReceiverMock", ["v4.0.0", "v4.1.0"]
),
"8ac6ce7dd83fe6abaaea9e149de7fab285cb6f76": LibraryInfo(
"ERC165MissingData",
[
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"b33e2d44585e75d38aa904a4e210baf4350189da": LibraryInfo("ERC165Mock", ["v4.0.0", "v4.1.0"]),
"e89f235cccbc06e2bac7c41f6da38fd77d4de644": LibraryInfo(
"ERC165StorageMock",
[
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"8ab8d35fe19014b9066aa8ffc249623257072208": LibraryInfo(
"ERC20DecimalsMock", ["v4.0.0", "v4.1.0"]
),
"67b9f92bb0f7ef4c509fd6db84af16f6a1dc95f8": LibraryInfo(
"ERC20PermitMock", ["v4.0.0", "v4.1.0"]
),
"417a78c41729dfd05ac2baac8e6678dbb95f5a05": LibraryInfo(
"ERC2771ContextMock", ["v4.0.0", "v4.1.0"]
),
"4e57221ebf4782201f0d1ca5b851e5bb12ec2b8b": LibraryInfo(
"ERC721BurnableMock", ["v4.0.0", "v4.1.0"]
),
"e4bb74aec903fc8db95fad4c8192ff627923d2e9": LibraryInfo(
"ERC721EnumerableMock", ["v4.0.0", "v4.1.0"]
),
"cef3ef778dd17371bf88d3a20cbdcc3c71298afa": LibraryInfo("ERC721Mock", ["v4.0.0"]),
"9e5a3684f1b44a48c73787f823a3d7898f922753": LibraryInfo(
"ERC721PausableMock", ["v4.0.0", "v4.1.0"]
),
"947534cf69fa1bf1babb1d89e68fa2435d73f59b": LibraryInfo(
"ERC721ReceiverMock", ["v4.0.0", "v4.1.0"]
),
"6fbee4f33e2aa55d513022b4b6629ef896f52db1": LibraryInfo(
"ERC721URIStorageMock", ["v4.0.0", "v4.1.0"]
),
"d955f8e424d0b8531fcec97fd70d2eefa06daf04": LibraryInfo("StringsMock", ["v4.0.0", "v4.1.0"]),
"bf6d216501296a25f572b36b4ececf1e7f752b8e": LibraryInfo("Clones", ["v4.0.0", "v4.1.0"]),
"3caba018d8b811d7a9487df761635928bc7caf3f": LibraryInfo("ERC1967Proxy", ["v4.0.0"]),
"03f4e4dc310c6685debfa53240c8029d66d6a9d5": LibraryInfo(
"TransparentUpgradeableProxy", ["v4.0.0"]
),
"db88ad8eb489e2e93a76e7f0d0843f442bb3e802": LibraryInfo("Initializable", ["v4.0.0", "v4.1.0"]),
"fcafd1a2198e83e29448c4961babe00d479a259e": LibraryInfo("PullPayment", ["v4.0.0", "v4.1.0"]),
"06a7146060ceeb791b34296ac3859ddf9924c8d9": LibraryInfo("ERC1155", ["v4.0.0", "v4.1.0"]),
"fc0e45a63f6c27366e72fba2e93045493a1d0fcc": LibraryInfo(
"ERC1155PresetMinterPauser", ["v4.0.0", "v4.1.0"]
),
"991da8c1a4e38a69803a920b2ba6f04f3534ba90": LibraryInfo(
"ERC1155Receiver", ["v4.0.0", "v4.1.0"]
),
"32f4baf24d04431b9f31d7fffbc14873db05910c": LibraryInfo("ERC20", ["v4.0.0"]),
"b8948a765f56a1cfae8a3b92033d3a7f583d266f": LibraryInfo("ERC20Burnable", ["v4.0.0", "v4.1.0"]),
"3ed786a6529d43a95101022d405252fbd955f7f6": LibraryInfo("ERC20Capped", ["v4.0.0", "v4.1.0"]),
"975df6aa796d442e90665e8639659a8da4d06175": LibraryInfo("ERC20Snapshot", ["v4.0.0", "v4.1.0"]),
"d6d1fc2391215c66cbe050ddb24066c54a8ec13f": LibraryInfo(
"ERC20PresetMinterPauser", ["v4.0.0", "v4.1.0"]
),
"b923239c1bd5ce64cdd82b8a78585e70ce09a0b5": LibraryInfo("SafeERC20", ["v4.0.0", "v4.1.0"]),
"3cc2d212711b9aed654821263900fe101441e08e": LibraryInfo("TokenTimelock", ["v4.0.0", "v4.1.0"]),
"ade76f270c6838a189583a70457b1f34f547fa89": LibraryInfo("ERC721", ["v4.0.0"]),
"e32fa6056318ff4036b6b34ae3631d92cc2ea489": LibraryInfo(
"ERC721Enumerable", ["v4.0.0", "v4.1.0"]
),
"174c62a690020e2cb1b08c2ed4ebf665a78e3bd9": LibraryInfo(
"ERC721URIStorage", ["v4.0.0", "v4.1.0"]
),
"387defc33a85bd87dc92cf3e1b956407169ec624": LibraryInfo(
"ERC721PresetMinterPauserAutoId", ["v4.0.0", "v4.1.0"]
),
"8a77655c684246218b9a58702a073110c1960c2a": LibraryInfo("ERC777", ["v4.0.0"]),
"fffccb2e4aaddd018bf1f74f424764d0d8f3ddcb": LibraryInfo("Context", ["v4.0.0", "v4.1.0"]),
"2a02aed9ef802a8544d18afe1df202a0fc9f22fc": LibraryInfo("Counters", ["v4.0.0", "v4.1.0"]),
"64e303670df935fe5d0a7e7bd932ae8850f6f201": LibraryInfo("Strings", ["v4.0.0", "v4.1.0"]),
"b1f1fd21fabeee2b3f8d781a3f7b61d2da0fa499": LibraryInfo("ECDSA", ["v4.0.0"]),
"53aa499a4c694653ffb7ad64295f7564c8d25f4e": LibraryInfo("EIP712", ["v4.0.0", "v4.1.0"]),
"fef23c7cba2fd6827ad096a963156b7122a5714d": LibraryInfo("Escrow", ["v4.0.0", "v4.1.0"]),
"c52d6d7307f32769c227bc90ff35f7ed9484a418": LibraryInfo("RefundEscrow", ["v4.0.0", "v4.1.0"]),
"27eb537f38f4e78bf50d746739387234f230a4db": LibraryInfo(
"ERC165",
[
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"e00b58223b3f1aebcc28924cdbf577f342709c68": LibraryInfo("ERC165Checker", ["v4.0.0", "v4.1.0"]),
"8ab170369493cd6ef28c81f35ec9fb0597632270": LibraryInfo(
"ERC165Storage",
[
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"01bd41c8fc215254e0fccc0f1937381becb83c93": LibraryInfo("ERC1820Implementer", ["v4.0.0"]),
"725b5b6b3cb30d120bdc97b353b214d7e0d5457d": LibraryInfo("SafeCast", ["v4.0.0", "v4.1.0"]),
"c3556d686a5da76a47d19d4e3c1aa5d53cc96011": LibraryInfo("SafeMath", ["v4.0.0", "v4.1.0"]),
"31f7a9169859955645a6b3b01225caa339e68a92": LibraryInfo(
"SignedSafeMath",
[
"v4.0.0",
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"50b36c99d71a6f1e5bc74eb37305fb633ca745b1": LibraryInfo("EnumerableMap", ["v4.0.0", "v4.1.0"]),
"1eeccb2aba20ae782f788b591c1c73247a2f5710": LibraryInfo("AccessControl", ["v4.1.0"]),
"0d100f93955e406b8f4c64256fe2fac9f58feaa3": LibraryInfo("TimelockController", ["v4.1.0"]),
"03ad79036f06316b924f8e839e05f9f7418203d9": LibraryInfo("IERC1271", ["v4.1.0"]),
"32778f5dea953b5c71cda22b9034d3a99c80a260": LibraryInfo(
"IERC3156FlashBorrower",
[
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"7a7395520740c3e9ca99f25ac256918525d6947b": LibraryInfo("IERC3156FlashLender", ["v4.1.0"]),
"7b42fc0929549dded5a794ba5cbb6234482d5ae5": LibraryInfo(
"AccessControlEnumerableMock",
[
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"105af4b6cb195a355234adb0f75e29dc35fbfe58": LibraryInfo(
"AccessControlMock",
[
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"e69690c196421663cbeb3e40e3ec80db2419b7f8": LibraryInfo(
"ERC1271WalletMock",
[
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"400c8eb934cb0cc695a18678a58f974169150eeb": LibraryInfo("ERC3156FlashBorrowerMock", ["v4.1.0"]),
"d7d5ac3eeb3537f6007674f03f33da91b2a99606": LibraryInfo("ERC20FlashMintMock", ["v4.1.0"]),
"760696c2eddc1f804ccdd6ad139de35e315a8f5a": LibraryInfo("ERC721Mock", ["v4.1.0"]),
"1aed59d47401d84a7d52819e97f7efbb125604bd": LibraryInfo("ERC777Mock", ["v4.1.0"]),
"d4d4dc6d063c378fe8df00eba9ea1d3da940c6df": LibraryInfo("MulticallTest", ["v4.1.0"]),
"d51ce27019d1ba250fe0737caab014f9c51aefd3": LibraryInfo("MulticallTokenMock", ["v4.1.0"]),
"5ceef95f1a2229c02c5f838080b549fefa9d185e": LibraryInfo("SignatureCheckerMock", ["v4.1.0"]),
"d9969b56a2b7a0b53970600d4563508c1ca509e6": LibraryInfo("StorageSlotMock", ["v4.1.0"]),
"1859856bc5a07e18d8967ec00b4d89cd6ea11e0a": LibraryInfo(
"UUPSUpgradeableMock",
[
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"02306349e880c95b317f34313bf0d335bcb20711": LibraryInfo(
"UUPSUpgradeableUnsafeMock",
[
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"9d3be3ef2fe57b5f8345d6bb0b34500b94b3039f": LibraryInfo(
"UUPSUpgradeableBrokenMock", ["v4.1.0"]
),
"ad0004727dde87f3bf6a518a02ccc9475c378edd": LibraryInfo(
"ERC1967Proxy",
[
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"e2bf5ece630b73ede3fa56a42a625ff79cf7a07b": LibraryInfo("ERC1967Upgrade", ["v4.1.0"]),
"775dad710f41a2629d9d5506682c1cd574eae0a6": LibraryInfo(
"BeaconProxy",
[
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"f1865b420ea4dee35a07e61461aa012d55131f33": LibraryInfo(
"TransparentUpgradeableProxy", ["v4.1.0"]
),
"a1b5157f3148bf64bed9182b4d0617a8eadfd581": LibraryInfo("UUPSUpgradeable", ["v4.1.0"]),
"9d146a9046589ef5728295f53cb3fc9209f6f3e9": LibraryInfo("ERC20", ["v4.1.0"]),
"e3f871942e9365cc12cdb31ac4196e415579b5af": LibraryInfo(
"IERC20Metadata",
[
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"1b85965b7436f201b003472d4afba8ef1e2f0707": LibraryInfo("ERC20FlashMint", ["v4.1.0"]),
"2207444dc8582d69d9546a2434504f679dc50d9c": LibraryInfo("ERC20Permit", ["v4.1.0"]),
"6e83d64273b978f98df3e2379c388010ec2860f4": LibraryInfo("IERC20Permit", ["v4.1.0"]),
"1751dd56c4410e19af4980136ef1ba8e54000493": LibraryInfo("ERC721", ["v4.1.0"]),
"5714897c18afeeddd7dbe406d9878e22f5d751d1": LibraryInfo("ERC777", ["v4.1.0"]),
"63d1095e1fb56da130b614eeaa63f4803f99f7e5": LibraryInfo("Multicall", ["v4.1.0"]),
"fe5963116e1e943c56b62faf6875a3f8482cfe84": LibraryInfo(
"StorageSlot",
[
"v4.1.0",
"v4.2.0",
"v4.3.0",
"v4.3.1",
"v4.3.2",
"v4.3.3",
"v4.4.0",
"v4.4.1",
"v4.4.2",
"v4.5.0",
],
),
"b06559b6a9527a4db570993b98327d1e16908ed2": LibraryInfo("ECDSA", ["v4.1.0"]),
"f6325fbfc5e1ff1f03992fba565321bbc17ed789": LibraryInfo("SignatureChecker", ["v4.1.0"]),
"6a11687f7b7fc1433b269fd4abac331c66fa8a77": LibraryInfo("ERC1820Implementer", ["v4.1.0"]),
"6eb9cd105fa9d0262ed7a11160b76381b39cebd5": LibraryInfo("IERC1820Registry", ["v4.1.0"]),
"e91a667e7a573e6eea5d853b468e8f3d60d81889": LibraryInfo("EnumerableSet", ["v4.1.0"]),
"5c61094952cd50d3802c31177357efd5d8964614": LibraryInfo("IAccessControl", ["v4.2.0"]),
"8694d4f12fbafeb16850afc3464c06ea0a548a0a": LibraryInfo("AccessControl", ["v4.2.0"]),
"28331601ee481fd4a956fdbe388c3abf54f3b65b": LibraryInfo("IAccessControlEnumerable", ["v4.2.0"]),
"64d6a3bb174631f086b16b5e8486a5f794d976b7": LibraryInfo("AccessControlEnumerable", ["v4.2.0"]),
"4d7c63c045201a4bb4b072b90c0ccb7e3da4f871": LibraryInfo(
"Ownable", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"42b68abf0eec947d970be6ed8863108313d0af33": LibraryInfo(
"PaymentSplitter", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"c1f9217c77f35c660dfb3d88d0406508c56488a6": LibraryInfo(
"TimelockController", ["v4.2.0", "v4.3.0"]
),
"bc8959ed38c71118622ffefeebc4c039b892709b": LibraryInfo(
"IERC1271",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"0b811309fd111891492fcc5d96a2cb3acd8d72e9": LibraryInfo(
"IERC3156FlashLender",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"b6f84fda4cb8fdbaa97a02726fa37281f78e5c91": LibraryInfo("ERC2771Context", ["v4.2.0"]),
"42603ef9257bbe665bb87cffe0b376d7b67712ab": LibraryInfo(
"MinimalForwarder",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"c2aec4893bc9a14ca843763da02fb355261d8a85": LibraryInfo(
"AddressImpl",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"aa59563d28f55355429620d46a95f62807bf714c": LibraryInfo(
"ArraysImpl",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"129786c0f640a54e1262bd0fa09c0402fa4f5310": LibraryInfo(
"BadBeaconNoImpl",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"c7276d5682c391177c65742657733021762fde2e": LibraryInfo(
"BitMapMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"da0acb035f001bc47226ca65e7805071ebcbc590": LibraryInfo(
"ClashingImplementation",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"9a62fc52dfa77cec1a4fb20a17dc85c2b00165b0": LibraryInfo(
"ClonesMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"e319f874c429173e1b901ab7fc2014f7acc17b54": LibraryInfo(
"ContextMockCaller",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"46564e62cbf056df3d249a990973bdb709e83c2b": LibraryInfo(
"CountersImpl",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"f89165a7467e5e4a909e2b013e8383263d133e18": LibraryInfo(
"Create2Impl",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"5654add772b6dac7815ecc69eeb4c6da58f6ce7c": LibraryInfo(
"Impl",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"9db5258aacf562685ca737ca2de3e42ab6d55a00": LibraryInfo(
"DummyImplementation",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"e2170d2050cc953a0791202b11eb01c352a015b3": LibraryInfo(
"DummyImplementationV2",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"75a5093a9fb3b7de904b13481d04f0570bf5a6ff": LibraryInfo(
"EIP712External",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"369690b5196bce6039aaec5397827ac325a7b4f5": LibraryInfo(
"ERC1155BurnableMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"ffc5443dbc5dd5285e2ded467043517e152a75cc": LibraryInfo(
"ERC1155Mock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"b3a1f1f5c11bb12f910ba0e8d951451eae1d0292": LibraryInfo(
"ERC1155PausableMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"71fec413985069608d5a44630c2fdbd3b8418ccd": LibraryInfo(
"ERC1155ReceiverMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"5cf44c06a1081d98ecd7e65cc1aae83995055909": LibraryInfo(
"ERC1155SupplyMock", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2"]
),
"ad0b6a02674048a5e3a3d4d4a551934a2c897c74": LibraryInfo(
"SupportsInterfaceWithLookupMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"070505611a17dcef9932ae5eb779350f79698235": LibraryInfo(
"ERC165InterfacesSupported",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"93bb8c99dfe0581125332fb3ebd0e3955144df3e": LibraryInfo(
"ERC165NotSupported",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"6b299c538b2c135312b0c72d8af712c821f831a2": LibraryInfo(
"ERC165Mock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"8fee474311bd35767aa7afb389d6e4799eb5b8cf": LibraryInfo(
"ERC20BurnableMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"bf3af764a6c36127b5ff5e46f045291de91933ec": LibraryInfo(
"ERC20CappedMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"21c4be0176e151069878b58aae5a1d165223e6ce": LibraryInfo(
"ERC20DecimalsMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"cd2d838c0fb41e79aae2433e909abc6c0e8122bf": LibraryInfo(
"ERC20FlashMintMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"f83b56148b0339522b662f03900cff6983c51850": LibraryInfo(
"ERC20Mock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"e28bdd635291e4e5aefef3245e353609f1515968": LibraryInfo(
"ERC20PausableMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"9b65c5d1a96a1e41eb6182254c051eece2af5c54": LibraryInfo(
"ERC20PermitMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"2ba8af8608e5448e4715cda8e571bcc6cfd48963": LibraryInfo(
"ERC20VotesCompMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"0ab46f9bd08b5723b1d914e41725574517a12ad6": LibraryInfo(
"ERC20VotesMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"b1c70a189722a29fdab6b49e27b040472f5a2e16": LibraryInfo(
"ERC20WrapperMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"62a9a8199169e0de7117864ee9d256bb4b52083e": LibraryInfo(
"ERC2771ContextMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"ae5f39a87a79311e6e4ad375b3ade2b5e03131ea": LibraryInfo(
"ERC3156FlashBorrowerMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"e09d1048186c05d41f0015ba69aa70a86b243c00": LibraryInfo(
"ERC721BurnableMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"7fae99c0b5530d32609982b4d533509b8674f0ee": LibraryInfo(
"ERC721EnumerableMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"9578913f5871c5e1567c53da7d5675d75dc92747": LibraryInfo(
"ERC721Mock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"449cd793d9e4639b31812292d0319b59b0ca8e55": LibraryInfo(
"ERC721PausableMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"b10cef059262dfabaeade8ff51fd80d2aaba7537": LibraryInfo(
"ERC721ReceiverMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"85c61f773cca6fa57c335796e1ca1f5b98ea1485": LibraryInfo(
"ERC721URIStorageMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"75e9ad33d99c316414a0d3506cab37488b722728": LibraryInfo(
"ERC777Mock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"2af1eabb238c84878673e589fd69defacb92e040": LibraryInfo(
"ERC777SenderRecipientMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"4ce3c0c2f9d135ac50c7075651c9b930daecd603": LibraryInfo(
"EnumerableMapMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"867d1f1aa9db24d77f5ecb83a38eb4a60b09dce9": LibraryInfo(
"EtherReceiverMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"a8e715f4952f7265ec539aba50e8eea7a45f924e": LibraryInfo(
"InitializableMock", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0"]
),
"e67f151ab39236b0419d7e8b0a583c10e549efb3": LibraryInfo(
"MathMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"1f337a2bbb0e83495566c6cff4791828463f973c": LibraryInfo(
"MerkleProofWrapper", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"c02597d82e217259e7d73000bd1f2789d1c7cd61": LibraryInfo(
"MulticallTest",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"517131a8a0737e26e7be43853b9c24ff6a20552d": LibraryInfo(
"MulticallTokenMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"7fadf3b05e77e38e5049e165344022d1e624b617": LibraryInfo(
"SampleHuman", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0"]
),
"769bdb6cddb7c34bb955535a6f0f77f49e98f292": LibraryInfo(
"SampleMother", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0"]
),
"a2b8b3961965b90f6c7b4ecaa477bd0d77f8c7d7": LibraryInfo(
"SampleGramps", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0"]
),
"504d033dfcae64d76986dcb5cb8c5be4d1dded4d": LibraryInfo(
"SampleFather", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0"]
),
"86e3593fee13c15d567cc136bacdca20ea1e6101": LibraryInfo(
"SampleChild", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0"]
),
"cb6a1051fd2f5bc747c3f773fc3af72c484ab3a7": LibraryInfo(
"OwnableMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"24cf84f54a22c4a772fe74d9f72853640e102262": LibraryInfo(
"PausableMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"1167e7738408a66d3897f34aeef40c9ef438686e": LibraryInfo(
"PullPaymentMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"a8fac5d6e42c033f8c2372dcb6ccdcfd37cc1437": LibraryInfo(
"ReentrancyAttack",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"7b976c578c5adaf74bc18e387c7e12147609b8a7": LibraryInfo(
"ReentrancyMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"e66dfe8c2da2a470c76b3d0a0cfe5e7a7580de9a": LibraryInfo(
"Implementation1",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"a1226699bd48b90ff377b53c4a70f27c25a9a16b": LibraryInfo(
"Implementation2",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"c9e618dc47d2ac5cc6dbce47d9b0130d4cc9377e": LibraryInfo(
"Implementation3",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"3ce30a36b36ec42b787dd5be03a12341207a7fa6": LibraryInfo(
"Implementation4",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"f29c76324fd21e33388b40bd77ace0ef9c5c0d41": LibraryInfo(
"SafeCastMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"2689010b084a75537c8e662d0d4c1c82460a7661": LibraryInfo(
"ERC20ReturnFalseMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"acc2c209743671f9c4e44c829247831bf350a0a0": LibraryInfo(
"ERC20ReturnTrueMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"74fd9057d3dffcddeae355918b7644eaa8ef7244": LibraryInfo(
"ERC20NoReturnMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"86229693a21d889433acfa056ae7db96ba4a6cef": LibraryInfo(
"SafeERC20Wrapper",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"4823c60f1f994ca554eea1ecbfa81e5b83b5d561": LibraryInfo(
"SafeMathMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"97db478067ab766d3fa0758aca22823b38c81327": LibraryInfo(
"SignatureCheckerMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"e826f1b32cee3777ae3a3d0bef3cd8c20ac9cf7d": LibraryInfo(
"MigratableMockV1",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"2e635423850dc52ed5a3b9afdec568a0519c6402": LibraryInfo(
"MigratableMockV2",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"27932bcd6aeb679027157cf623195bd425b3d85b": LibraryInfo(
"MigratableMockV3",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"2786cb54d7147fd4c067acd9bcd2ccb9cc57dbd8": LibraryInfo(
"StorageSlotMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"b17d5f234e99981e2caad9c0f56ffaa53ad3e125": LibraryInfo(
"StringsMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"5df1b89723d0bdcc5d517d4317b9c32184247a15": LibraryInfo(
"UUPSUpgradeableBrokenMock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"d90c57be785b0a21161e20792e434763a5617e42": LibraryInfo(
"Clones",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"1a59f5b5a1457a6db4f0fde03cb7ae600702f205": LibraryInfo(
"ERC1967Upgrade",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"3fb535ddf3bc10f6ee9803c6d0be51c32f15947c": LibraryInfo(
"Proxy", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"dd95705feafaba2f8cf136c536916bc6e15679ce": LibraryInfo(
"ProxyAdmin",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"4a8ef6e66df0839cd7aaab06e9e5101d0b427ab3": LibraryInfo(
"TransparentUpgradeableProxy",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"04a6f67acb954ffe770a8a034c7b342ba53d470d": LibraryInfo(
"Initializable", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0"]
),
"dc77065c6d2328495a7a5373a4384cdfa419b536": LibraryInfo(
"UUPSUpgradeable", ["v4.2.0", "v4.3.0", "v4.3.1"]
),
"52cabe02daf5bc8b106eca66daf0d7a2af4a1c28": LibraryInfo(
"Pausable",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"e087c5b92178714f1e90fa95c2eb7d96e584b267": LibraryInfo(
"PullPayment",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"362780bb1082d2ee05b02fbf3586f2efdf55787d": LibraryInfo(
"ReentrancyGuard", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"e0b83559902f4dbc79b69b31b5d5a55566f0a4d8": LibraryInfo("ERC1155", ["v4.2.0"]),
"26a7097a902c5d0ec06e9afe7a1b16e919e04f4d": LibraryInfo(
"IERC1155",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"f7f86cc447e330c0f2fe6c75893393527f9f0b75": LibraryInfo(
"IERC1155Receiver",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"dcc175b857019b96cc84b4b554e4078167fd8061": LibraryInfo(
"ERC1155Burnable",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"6dbb111b0880293ce2d796b20c6a84f2b39b537d": LibraryInfo(
"ERC1155Pausable",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"6c4f2cc4be0924e6b4ad2a9b3c46efb8054335ca": LibraryInfo(
"ERC1155Supply", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2"]
),
"0ba967a226fd02a14a5e8da8780b72a207f642df": LibraryInfo(
"ERC1155PresetMinterPauser",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"8f6be89b0ce95a5a8507d0473dd6bdc86fc05893": LibraryInfo(
"ERC1155Holder",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"3eed534c118e1b55d8807ccdace65018f8e6cbfd": LibraryInfo(
"ERC1155Receiver",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"5861a2fbfab58b39cbd32dfc63795083f43d1e65": LibraryInfo("ERC20", ["v4.2.0"]),
"eefc9e89d017a91a4ce1f87accc52538bb130e97": LibraryInfo(
"IERC20", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"36c08003131ccd3493f61caa424d4ef45e40abef": LibraryInfo(
"ERC20Burnable",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"d577838d7d5ecc6f5fca04d568956aaf48c13597": LibraryInfo(
"ERC20Capped",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"4f57398877163b33c21ce35e9e43b94b72d943ab": LibraryInfo("ERC20FlashMint", ["v4.2.0"]),
"4a726b7b47a1ef62e108e4eabde5e35a24fd062e": LibraryInfo(
"ERC20Pausable",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"aa54946245c2f1991404df914c8a529eece3f57d": LibraryInfo(
"ERC20Snapshot",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"370ff7cbbbcefc8776065285a30cda977191d936": LibraryInfo("ERC20Votes", ["v4.2.0"]),
"6b887b5359c94e61da10ae9dbc82502becb4b45f": LibraryInfo(
"ERC20VotesComp",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"a7bc491c206021ef00c4c58e34737ed6319ccf6e": LibraryInfo(
"ERC20Wrapper",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"273d56d9e427a9c91ac82db0a87ecf5d1d4da973": LibraryInfo(
"ERC20Permit",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"1d200e39cf5dd9bd315f3461c1a664558662d5e8": LibraryInfo(
"IERC20Permit",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"d6bac8d6f8bff3ba4a2c45d3cf23101a81a093b3": LibraryInfo(
"ERC20PresetMinterPauser",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"f1eefb4a9491a1ca4f3c88a9d8518d110f7ab8e8": LibraryInfo(
"SafeERC20",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"d53bbb9fbcdf3ed1c0ff29350e7c813dabf9a5ac": LibraryInfo(
"TokenTimelock",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"2caaed78e7c5899dfdfdc82812a31048d90f11d7": LibraryInfo("ERC721", ["v4.2.0"]),
"7899b986a2072f4ac72b129375c7eac5eee84c3e": LibraryInfo(
"IERC721",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"15cb97070ec4da6593205c442a6fcae406e7af9a": LibraryInfo(
"IERC721Receiver",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"ef9f288af616034ca45cbbfb70926273848a17c3": LibraryInfo(
"ERC721Enumerable",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"06ee92df7f5d22b92b723b7fa47a7163a8bee826": LibraryInfo(
"ERC721Pausable",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"29e0c18d75d521f4530bfd591cfea713a1f49e0c": LibraryInfo(
"ERC721URIStorage",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"8f3477480c38a4dfda7d4192ea80511fd8eb063d": LibraryInfo(
"IERC721Enumerable",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"7a4d553b1a0193fcf9fd4d9468bb5700c27db42b": LibraryInfo(
"IERC721Metadata",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"f3c528e97bbb7f9aac27c721e2d17cbc75be7ce5": LibraryInfo(
"ERC721PresetMinterPauserAutoId",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"0093e17405d73820432e8da360f33ddc23308530": LibraryInfo(
"ERC721Holder",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"ec44444770bfb356bacc955d93d5237656af1390": LibraryInfo(
"ERC777", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"e0bfb77c486769ad6acb629279feaf28455cccc4": LibraryInfo(
"IERC777",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"14955bd29186d48ce191852b38f761ce1622fef1": LibraryInfo("Address", ["v4.2.0"]),
"5625fde14370990aa8d4d094ba822a866b36fbd3": LibraryInfo(
"Arrays",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"4ac4dc8857640e049508901478e37e13576e9925": LibraryInfo(
"Context",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"55cf39dc3f389da17665b6cff3c6b4c47ee5ae5f": LibraryInfo(
"Counters",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"61ca214711b37f23de183403ef96eba568654e74": LibraryInfo(
"Create2",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"abe82d145668c3c90d148f2ca2971ea0cdd3c9ed": LibraryInfo(
"Multicall",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"3965655fb49d3d12cb7b48155c684401673fbb96": LibraryInfo(
"Strings",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"db454d7154deefdcc0d1dea7d458b572c4a0a67b": LibraryInfo("ECDSA", ["v4.2.0"]),
"4fea412076493cc56d86c5296289f1ccc4bd2638": LibraryInfo(
"MerkleProof", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"8c92fa340338deb4146af78038d2f8195df99ed0": LibraryInfo("SignatureChecker", ["v4.2.0"]),
"a94f50827517d3595fb4ea61c7357ef87858dd74": LibraryInfo(
"EIP712", ["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"2de350f849494c8ac4872728cd696d77f879efea": LibraryInfo(
"Escrow",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"fc0669b213fd21fcbf82b48b6a5834a0e8e4797f": LibraryInfo(
"RefundEscrow",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"ffbe0135815bb9d107067eac054384ce9c559853": LibraryInfo("ERC165Checker", ["v4.2.0"]),
"6843b3e0971a80f76c78626e5fbd5816449c4891": LibraryInfo(
"ERC1820Implementer",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"3ab18388a1564c59b08f34c40e49fba6ed2030fa": LibraryInfo(
"IERC1820Registry",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"e4a7521c8dfccec8ef656905b09facaee8dfdb01": LibraryInfo("Math", ["v4.2.0"]),
"69e808bc327ca30cce6784a56944f386502da108": LibraryInfo(
"SafeCast",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"e3d19a417652f39488237ae86f633fc55f37ddd8": LibraryInfo(
"SafeMath",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"61d0bee3d53d397afc63ceb8f5aebb843ad4f58c": LibraryInfo("BitMaps", ["v4.2.0"]),
"f4e98a17d92c50528ac5512cf6d19c28381a671a": LibraryInfo(
"EnumerableMap",
["v4.2.0", "v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"034b7e7cc2490688bf19079ab52aca584c622a2d": LibraryInfo("EnumerableSet", ["v4.2.0"]),
"3ff259364b811ce55fbaf0b7d6e145fe32532877": LibraryInfo(
"AccessControl", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"982c66e73b9fd3c148d7f157a38fb08a074922a9": LibraryInfo(
"AccessControlEnumerable", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"47e570ba4dfb58e4d36d325ca74008a1ac3a25ef": LibraryInfo(
"IAccessControl",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"d78d847dd07ed931c12f77b0f7626eb4e0100745": LibraryInfo(
"IAccessControlEnumerable",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"1f9a441bb3f9991cf0d8db4a0f7338155dc1135e": LibraryInfo(
"Governor", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"c802a401fe1793af47cb8b418684023cd4d5361b": LibraryInfo(
"IGovernor", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"5fd29ee0161a032ec9a5e86f2d8cd71f53bc6ed1": LibraryInfo(
"GovernorCompatibilityBravo", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"0d8b9df97940d08bb323a575ef0d7060676ed260": LibraryInfo(
"IGovernorCompatibilityBravo", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"54543b187e4d9f29dc31c819093f48d9969d7d8a": LibraryInfo(
"GovernorCountingSimple", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"dae38923cfdcb3de8c354a88b7b13fc2ecc26e12": LibraryInfo(
"GovernorProposalThreshold", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"946bb0a46b5c75167f052528a401a12768de1f45": LibraryInfo(
"ICompoundTimelock",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"6d6fc8587f4cc604ecc04de3ee0f8377c88c2e38": LibraryInfo(
"GovernorTimelockCompound", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"8a58931413fa94e76f02d330097fcfa9c1c48bd9": LibraryInfo(
"GovernorTimelockControl",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"2eb8af93a3b36609392bf643c72a9d03f0a6f398": LibraryInfo(
"GovernorVotes", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"fb68a921152337bcb1e01376223f4c55de026197": LibraryInfo(
"GovernorVotesComp",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"f5c1995c54bbbda556c0b279624eb88f03cdea3f": LibraryInfo(
"GovernorVotesQuorumFraction",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"],
),
"bce8f84c0ec1c03925f2478e3a3fccb33f60f35e": LibraryInfo(
"IGovernorTimelock",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"9bd35ec7f53dbd0a4a87d1a93c424f09916497f6": LibraryInfo(
"IERC1363", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"898275960fb383e8850df71e6e26dc86a5af34ee": LibraryInfo(
"IERC1363Receiver",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"8e978b1851c28780339fc78c1095ef2e9844ee55": LibraryInfo(
"IERC1363Spender",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"8794d872af0a539cdb093481e698677eff5e2745": LibraryInfo(
"IERC2981", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"e72cca0e88cb8abd72845272eb6c90402063a578": LibraryInfo(
"IERC2612", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"2bfb18e3d399cff65ab9b803c1e058868d26387a": LibraryInfo(
"ERC2771Context", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"88fb8242a3f1c90475facda5a92901c903676ce3": LibraryInfo(
"ECDSAMock", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"339f780618b8638444d16c9e43ee94e0dedbd4d8": LibraryInfo(
"EnumerableBytes32SetMock",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"a32259aa2046b09ffc5dc8b1a89cd3bbdf4163a1": LibraryInfo(
"EnumerableAddressSetMock",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"47212bb1a4a0679b281ef4d5d1ff20b1d8e152e4": LibraryInfo(
"EnumerableUintSetMock",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"6892b367ba9dbfecaf18e5ec15291d334a2a67a2": LibraryInfo(
"GovernorCompMock", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"fa5c7c49cb08c80190788a5f66c38869fae7ae51": LibraryInfo(
"GovernorCompatibilityBravoMock", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"aa27e63eb1eda7556b559ae08ed141575a001370": LibraryInfo(
"GovernorMock", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"bc7e434e2afd6cea41ec96110028e63c2c55db42": LibraryInfo(
"GovernorTimelockCompoundMock", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"d8b5430cf0a55144e3ebfb8a06f882614dbb7718": LibraryInfo(
"GovernorTimelockControlMock", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"cce92ebddff5d610dca62d66c72c9cb83c62700f": LibraryInfo(
"TimersBlockNumberImpl",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"83786236d97273dfc27838a31c523b1d362bf105": LibraryInfo(
"TimersTimestampImpl",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"8a04dcf69374c0eb397038120d6f3efdcc2ffd76": LibraryInfo(
"CompTimelock",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"60dfa68371a6272fc626fd9aae7e556621402067": LibraryInfo(
"ERC1155", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"f0766528233a6368c8539a4627387175feb32b94": LibraryInfo(
"ERC20", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"91e9f927a20d0de07df4ea6e3c2060bcca716ea3": LibraryInfo(
"ERC20FlashMint", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"b655b4fbbb49760010632cc8d0fc006b15f0c4ee": LibraryInfo(
"ERC20Votes", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"e92b2feb6b8539d301c2c4c66b91fdf11ab3a691": LibraryInfo(
"ERC721", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"1fde194446c5afd545cc902213afbec2c87a46bd": LibraryInfo(
"Address", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"6ced0927362ad42d906b44d8616661c2da119c84": LibraryInfo(
"Timers", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"14c1e71a34bcc6538f8de689211c51c0ec0a8d11": LibraryInfo(
"ECDSA", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3"]
),
"b590e553b7df8030182c6ecb4721a9c5dad81c98": LibraryInfo(
"SignatureChecker", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"eebebdb79c1b3e1f8ffcff988f929b6dc1eda7dc": LibraryInfo(
"ERC165Checker",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"9f15868ec22f5af898a458488bc83dfe12bf8817": LibraryInfo(
"Math", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"2d212d3ead2002233febe7e68c6851cb66449d97": LibraryInfo(
"BitMaps", ["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"1896e438b057c94ccba383036112041dd7cbad62": LibraryInfo(
"EnumerableSet",
["v4.3.0", "v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"],
),
"898b9a1a1bb87f2ca186905c385d3bca567eebb7": LibraryInfo(
"TimelockController", ["v4.3.1", "v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"2219a93edab7ad1455f89d93bc04bfd6799232a1": LibraryInfo(
"UUPSUpgradeable", ["v4.3.2", "v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2"]
),
"8b6ce0d7b4ad592774afeadd155078d4027ab95a": LibraryInfo(
"ERC1155SupplyMock", ["v4.3.3", "v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"dba518f42d643a2286c0bf8eacd3613c53d85ca4": LibraryInfo("ERC1155Supply", ["v4.3.3"]),
"a99091ffa64d372a750e960e401381eb95593793": LibraryInfo(
"AccessControl", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"27faee4bc796dc15628234c0aff9f28e6a93eda9": LibraryInfo(
"AccessControlEnumerable", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"bad3e51ef939deac2032e71376b598cdbfa12b14": LibraryInfo(
"Ownable", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"5492770f5c3d20f1b82762f03356ef4fd6995126": LibraryInfo(
"PaymentSplitter", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"c7fbf0739abbc9f1f60596b280bbd07bb4390681": LibraryInfo(
"VestingWallet", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"f258a176329f89585b497b54a6c49c51dec02479": LibraryInfo(
"Governor", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"13ef8f5e7fef9d50c289b20dc3b1ee35d9fc08a5": LibraryInfo(
"IGovernor", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"84f5273d82b316b964e0094fedc4790215ae3f4a": LibraryInfo(
"GovernorCompatibilityBravo", ["v4.4.0", "v4.4.1"]
),
"828f00113b4c019ae42020b90286d6c0d902bc08": LibraryInfo(
"IGovernorCompatibilityBravo", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"d60a1b5753981b2f04d1b3e8fe01856bca55d895": LibraryInfo(
"GovernorCountingSimple", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"7b5312b7e518b77b9ca1807058090a7f27908f75": LibraryInfo(
"GovernorProposalThreshold", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"5caea9b7191c8bf8fe302e98f69d61efe4a626cf": LibraryInfo(
"GovernorSettings", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"392943039111895161ca27cf1884863f7f9a96b9": LibraryInfo(
"GovernorTimelockCompound", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"bc5e88dd5c3e739eea0b8f33568044dd0a04abf7": LibraryInfo(
"ECDSAMock", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"96506e6a865793695afaa9ba6149baf8acca2f1c": LibraryInfo(
"GovernorCompMock", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"920beda23e95dc26939587a933619dfae19492c2": LibraryInfo(
"GovernorCompatibilityBravoMock", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"00d7d368e9e122f5d5162e42c6247685e5c94a7a": LibraryInfo(
"GovernorMock", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"6ba6c91c65d91381889a327f62e600e48bab91b5": LibraryInfo(
"GovernorTimelockCompoundMock", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"22674de544356a14664077d9598afc866e1e08d3": LibraryInfo(
"GovernorTimelockControlMock", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"308abb0377baa296b93206b78e0f17a7eacd5dd0": LibraryInfo(
"MerkleProofWrapper", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"d594afd3a1d8065b0999fab33b33ee98afbb1a9e": LibraryInfo(
"MyGovernor1", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"a6e00d1c93dca6635da940320b7ca27b97aac5a9": LibraryInfo(
"MyGovernor2", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"73feea0db74075f5757321a99d1602d8255eb17f": LibraryInfo(
"MyGovernor", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"514e3afefce9342035a181c08c0ec2ee4ea03640": LibraryInfo(
"ReentrancyGuard", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"d324c57106e8a29e644543f66c6466102c4cff4d": LibraryInfo(
"ERC1155", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"cdcb56b1b4f8d6c2baa0aad1d5d293975be3b6b6": LibraryInfo(
"ERC1155Supply", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"642fb791ce5f30f714a33b8eadf51e3cc183f353": LibraryInfo(
"ERC20Votes", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"5ea292ebdd2f061e9379b500f2fceba49ef00761": LibraryInfo(
"ERC721", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"61ac98a69d3dfd3c15232499e2315581004d8522": LibraryInfo(
"ECDSA", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"461520eae9f1d49bd16c01cdd05800f72633691d": LibraryInfo(
"MerkleProof", ["v4.4.0", "v4.4.1", "v4.4.2"]
),
"876796dde039fc6fe4b5d43d9ca6e411af135800": LibraryInfo(
"EIP712", ["v4.4.0", "v4.4.1", "v4.4.2", "v4.5.0"]
),
"81903dc774a37209651c9c2e0b2ba85b56f381f1": LibraryInfo(
"InitializableMock", ["v4.4.1", "v4.4.2", "v4.5.0"]
),
"a0ec129eecdccb3a692f9be3661a19f39d1312e2": LibraryInfo(
"ConstructorInitializableMock", ["v4.4.1", "v4.4.2", "v4.5.0"]
),
"f0b9b893ca9aad442d6d92dca525a1c5332c474b": LibraryInfo(
"SampleHuman", ["v4.4.1", "v4.4.2", "v4.5.0"]
),
"1c97276a55c8d0090fa15d4b99d27deaa955e3b7": LibraryInfo(
"SampleMother", ["v4.4.1", "v4.4.2", "v4.5.0"]
),
"26b8494cd75563c4d5f0b141c27c59065421eaf9": LibraryInfo(
"SampleGramps", ["v4.4.1", "v4.4.2", "v4.5.0"]
),
"4fad92aa7e239a5a470b35c3ab8d1101c69c23a0": LibraryInfo(
"SampleFather", ["v4.4.1", "v4.4.2", "v4.5.0"]
),
"31fd7aee4912ba9ae36ba4a04a4a05d9d2690afb": LibraryInfo(
"SampleChild", ["v4.4.1", "v4.4.2", "v4.5.0"]
),
"eec4af0ee55aba5b65b0ac375db706b2541e5653": LibraryInfo(
"Initializable", ["v4.4.1", "v4.4.2", "v4.5.0"]
),
"94d8214a6855376d8fcde6f26316c8d848faeb6d": LibraryInfo(
"GovernorCompatibilityBravo", ["v4.4.2", "v4.5.0"]
),
"2a8c112fa192928eae7c1e7b8f8322fa7766121e": LibraryInfo(
"CallReceiverMock", ["v4.4.2", "v4.5.0"]
),
"f6b1a7502344283a76b1385153d5dbe17bd792ae": LibraryInfo("AccessControl", ["v4.5.0"]),
"a1d8fc054c5d73114421ce0f143b4fabf3568d42": LibraryInfo("AccessControlEnumerable", ["v4.5.0"]),
"7019d3d6e4cf90818adcc5d8f2034670cda85daf": LibraryInfo("Governor", ["v4.5.0"]),
"dbbf75e8914cd4f0946c52f98d04f493e94dd620": LibraryInfo("IGovernor", ["v4.5.0"]),
"c00e7da3dba00f6c11fdcbbf357b6dc18110e2b9": LibraryInfo(
"GovernorPreventLateQuorum", ["v4.5.0"]
),
"1bc4aae7c1537cd679c7193f3f7652101d30a892": LibraryInfo("GovernorTimelockCompound", ["v4.5.0"]),
"58969c4290386e434b89e71174668703cec1ab45": LibraryInfo("GovernorTimelockControl", ["v4.5.0"]),
"29836afa63a7f71b8afb1d048e444b4b75cd822b": LibraryInfo("GovernorVotes", ["v4.5.0"]),
"800c4417f2601773c7bb90aaf81a1dea6f47485f": LibraryInfo(
"GovernorVotesQuorumFraction", ["v4.5.0"]
),
"5235772d4436eccec983d7c5edbd240052c9ba22": LibraryInfo("IVotes", ["v4.5.0"]),
"563ff993a6b7d8def9f98ac8bbba2e0d260ceff0": LibraryInfo("Votes", ["v4.5.0"]),
"287623ca3a4ee8b95286d73ba6b2ed74b31aa56e": LibraryInfo("IERC2981", ["v4.5.0"]),
"2d3287e3ef37104daa848d29ba9e569939dfb421": LibraryInfo("IERC1822Proxiable", ["v4.5.0"]),
"55a1a0a2c8d2703791c32dbbe88d26107897fc53": LibraryInfo("ERC2771Context", ["v4.5.0"]),
"0f78a22d966157b538e172ee646c8b2aa2ddcce5": LibraryInfo("MinimalForwarder", ["v4.5.0"]),
"2ba4a77e01e137cab1d1ad573bae7e2bfef25b8f": LibraryInfo("Base64Mock", ["v4.5.0"]),
"9ad73f0552ac99d3e074b3c630658afda1049412": LibraryInfo("CheckpointsImpl", ["v4.5.0"]),
"660557bd64e5e8e21d5d45f4ee8fb6ad951d0452": LibraryInfo("ERC2771ContextMock", ["v4.5.0"]),
"ea0f405b0d5c246931e84d1375055083872f097c": LibraryInfo("ERC721RoyaltyMock", ["v4.5.0"]),
"e0e331829d37789f4c66f72174b609e65e382d54": LibraryInfo("ERC721VotesMock", ["v4.5.0"]),
"c67fdb73a1ebdc6f94bd34f84f7410d860b179d4": LibraryInfo("GovernorMock", ["v4.5.0"]),
"3d5d49916ab335e7e63e6ac8c6bbdde4ce91774a": LibraryInfo(
"GovernorPreventLateQuorumMock", ["v4.5.0"]
),
"846f47565f55b3ce4e7e1991a4f76a0f6d257cae": LibraryInfo(
"GovernorTimelockCompoundMock", ["v4.5.0"]
),
"d80b0d79f0062440f20d9cd7992ef3b6412d74ee": LibraryInfo(
"GovernorTimelockControlMock", ["v4.5.0"]
),
"50fc19942debe7b63d6307cc2ad4f485739a4f6f": LibraryInfo("GovernorVoteMocks", ["v4.5.0"]),
"50c9c79167cff6cae0533e799ccb7da86cf72d90": LibraryInfo("ERC20ReturnFalseMock", ["v4.5.0"]),
"1306e3dd922f348e0ad76610cec7acfbb1363489": LibraryInfo("SignedMathMock", ["v4.5.0"]),
"fb165320294354e11a7e2d11e8c1b73000dac9c7": LibraryInfo(
"UUPSUpgradeableLegacyMock", ["v4.5.0"]
),
"794af8bd5c3a40c9e038b52ec27b22abcb52c8bb": LibraryInfo("VotesMock", ["v4.5.0"]),
"a3dc30773372880a622a3577d2097f9976622b0b": LibraryInfo("MyGovernor1", ["v4.5.0"]),
"b154ab0518de330d71a343878580a2dd4130c6cd": LibraryInfo("MyGovernor2", ["v4.5.0"]),
"20d2a2d2701c4357b2abce38302a1caa427ae884": LibraryInfo("MyGovernor", ["v4.5.0"]),
"6bc0b1abdafe6cd09f3b89d0a2204361106cd29d": LibraryInfo("ERC1967Upgrade", ["v4.5.0"]),
"1cce6c0614504a6d6ee709651a1182a1cbba8e2e": LibraryInfo("Proxy", ["v4.5.0"]),
"dd05a2a306a051e1c4c381d967584d02c114038a": LibraryInfo("UUPSUpgradeable", ["v4.5.0"]),
"2f99143bf51f009a94948a12b8ee5b5af48743c6": LibraryInfo("IERC1155Receiver", ["v4.5.0"]),
"dfd6949ce9bb4cf1b409dec313064e123de4d18d": LibraryInfo("ERC20", ["v4.5.0"]),
"6fa24eddd6020e757903a86dd74f335e9d6d92ae": LibraryInfo("IERC20", ["v4.5.0"]),
"6137641e7029f78ccdb9ed7576394655140f1687": LibraryInfo("ERC20Burnable", ["v4.5.0"]),
"630204f30f220515a71dada488ef5e2b5f8cac65": LibraryInfo("ERC20FlashMint", ["v4.5.0"]),
"f132d224bf01c7af2adab4143b27eb01e3af3908": LibraryInfo("ERC20Votes", ["v4.5.0"]),
"c78fb00bcac30eac9c9f09370bfb134f1fb0dace": LibraryInfo("ERC20VotesComp", ["v4.5.0"]),
"73965f3b502d3eb2c7b119a1a3385dbbf61431e1": LibraryInfo("TokenTimelock", ["v4.5.0"]),
"d1216cfae4bd3a10f1d1875dfff6d645866adf43": LibraryInfo("ERC721", ["v4.5.0"]),
"bf9ad9a6de08088c645ff86bdf875c0beac8a3b5": LibraryInfo("ERC721Royalty", ["v4.5.0"]),
"a8385ddba748ac6b2d17f1c342aba1e9b5d6927d": LibraryInfo("IERC721Enumerable", ["v4.5.0"]),
"6f84eff1a9116fbf20abd5c4457e4897ab40a415": LibraryInfo("ERC721Votes", ["v4.5.0"]),
"b457774f9fc82764468c9438603124f1243e042f": LibraryInfo("ERC777", ["v4.5.0"]),
"89520f76f5c9a9c6bad97750f2e01377f76bad6f": LibraryInfo("ERC2981", ["v4.5.0"]),
"be306f01ae84e9a1a568f703b8bcc9b1a0c49898": LibraryInfo("Address", ["v4.5.0"]),
"3bc96067d15f810ae58d139dd854197d0c3be98a": LibraryInfo("Base64", ["v4.5.0"]),
"0802f0deda6bb9b59cdbe73a5e5c6a238ea5668b": LibraryInfo("Checkpoints", ["v4.5.0"]),
"fc9ecdcc8173f23d1db2eecc243d1ab3999dbe35": LibraryInfo("Multicall", ["v4.5.0"]),
"68081d1d7d71bcdbb1507f31b71fe09f66b5ad21": LibraryInfo("ECDSA", ["v4.5.0"]),
"33ea0fbdba5f8542328ddac5067b9384c8988296": LibraryInfo("MerkleProof", ["v4.5.0"]),
"1c3856f541a8333183cfecbed1f6034030f2dd2a": LibraryInfo("SignatureChecker", ["v4.5.0"]),
"29e09293303b76a688d81e63b7c3469ef5459b59": LibraryInfo("SignedMath", ["v4.5.0"]),
}
| 251,870 | Python | .py | 6,370 | 30.687598 | 100 | 0.555353 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,131 | arithmetic.py | NioTheFirst_ScType/slither/utils/arithmetic.py | from slither.exceptions import SlitherException
from slither.utils.integer_conversion import convert_string_to_fraction
# pylint: disable=too-many-branches
def convert_subdenomination(
value: str, sub: str
) -> int: # pylint: disable=too-many-return-statements
decimal_value = convert_string_to_fraction(value)
if sub == "wei":
return int(decimal_value)
if sub == "gwei":
return int(decimal_value * int(1e9))
if sub == "szabo":
return int(decimal_value * int(1e12))
if sub == "finney":
return int(decimal_value * int(1e15))
if sub == "ether":
return int(decimal_value * int(1e18))
if sub == "seconds":
return int(decimal_value)
if sub == "minutes":
return int(decimal_value * 60)
if sub == "hours":
return int(decimal_value * 60 * 60)
if sub == "days":
return int(decimal_value * 60 * 60 * 24)
if sub == "weeks":
return int(decimal_value * 60 * 60 * 24 * 7)
if sub == "years":
return int(decimal_value * 60 * 60 * 24 * 7 * 365)
raise SlitherException(f"Subdemonination conversion impossible {decimal_value} {sub}")
| 1,163 | Python | .py | 30 | 32.866667 | 90 | 0.638053 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,132 | type.py | NioTheFirst_ScType/slither/utils/type.py | import math
from typing import List, Union, Set
from slither.core.solidity_types import ArrayType, MappingType, ElementaryType, UserDefinedType
from slither.core.solidity_types.type import Type
from slither.core.variables.variable import Variable
def _convert_type_for_solidity_signature_to_string(
types: Union[Type, List[Type]], seen: Set[Type]
) -> str:
if isinstance(types, Type):
# Array might be struct, so we need to go again through the conversion here
# We could have this logic in convert_type_for_solidity_signature
# But the slither type system is not straightforward to manipulate here
# And it would require to create a new ArrayType, which a potential List[Type] as input
# Which is currently not supported. This comes down to (uint, uint)[] not being possible in Solidity
# While having an array of a struct of two uint leads to a (uint, uint)[] signature
if isinstance(types, ArrayType):
underlying_type = convert_type_for_solidity_signature(types.type, seen)
underlying_type_str = _convert_type_for_solidity_signature_to_string(
underlying_type, seen
)
return underlying_type_str + "[]"
return str(types)
first_item = True
ret = "("
for underlying_type in types:
if first_item:
ret += _convert_type_for_solidity_signature_to_string(underlying_type, seen)
else:
ret += "," + _convert_type_for_solidity_signature_to_string(underlying_type, seen)
first_item = False
ret += ")"
return ret
def convert_type_for_solidity_signature_to_string(t: Type) -> str:
seen: Set[Type] = set()
types = convert_type_for_solidity_signature(t, seen)
return _convert_type_for_solidity_signature_to_string(types, seen)
def convert_type_for_solidity_signature(t: Type, seen: Set[Type]) -> Union[Type, List[Type]]:
# pylint: disable=import-outside-toplevel
from slither.core.declarations import Contract, Enum, Structure
# Solidity allows recursive type for structure definition if its not used in public /external
# When this happens we can reach an infinite loop. If we detect a loop, we just stop converting the underlying type
# This is ok, because it wont happen for public/external function
#
# contract A{
#
# struct St{
# St[] a;
# uint b;
# }
#
# function f(St memory s) internal{}
#
# }
if t in seen:
return t
seen.add(t)
if isinstance(t, UserDefinedType):
underlying_type = t.type
if isinstance(underlying_type, Contract):
return ElementaryType("address")
if isinstance(underlying_type, Enum):
number_values = len(underlying_type.values)
# IF below 65536, avoid calling log2
if number_values <= 256:
uint = "8"
elif number_values <= 65536:
uint = "16"
else:
uint = str(int(math.log2(number_values)))
return ElementaryType(f"uint{uint}")
if isinstance(underlying_type, Structure):
# We can't have recursive types for structure, so recursion is ok here
types = [
convert_type_for_solidity_signature(x.type, seen)
for x in underlying_type.elems_ordered
]
return types
return t
def _export_nested_types_from_variable(
current_type: Type, ret: List[Type], seen: Set[Type]
) -> None:
"""
Export the list of nested types (mapping/array)
:param variable:
:return: list(Type)
"""
if isinstance(current_type, MappingType):
underlying_type = convert_type_for_solidity_signature(current_type.type_from, seen)
if isinstance(underlying_type, list):
ret.extend(underlying_type)
else:
ret.append(underlying_type)
next_type = current_type.type_to
elif isinstance(current_type, ArrayType):
ret.append(ElementaryType("uint256"))
next_type = current_type.type
else:
return
_export_nested_types_from_variable(next_type, ret, seen)
def export_nested_types_from_variable(variable: Variable) -> List[Type]:
"""
Export the list of nested types (mapping/array)
:param variable:
:return: list(Type)
"""
l: List[Type] = []
seen: Set[Type] = set()
_export_nested_types_from_variable(variable.type, l, seen)
return l
def _export_return_type_from_variable(underlying_type: Type, all_types: bool) -> List[Type]:
# pylint: disable=import-outside-toplevel
from slither.core.declarations import Structure
if isinstance(underlying_type, MappingType):
if not all_types:
return []
return export_return_type_from_variable(underlying_type.type_to)
if isinstance(underlying_type, ArrayType):
if not all_types:
return []
return export_return_type_from_variable(underlying_type.type)
if isinstance(underlying_type, UserDefinedType) and isinstance(underlying_type.type, Structure):
ret = []
for r in underlying_type.type.elems_ordered:
ret += export_return_type_from_variable(r, all_types=False)
return ret
return [underlying_type]
def export_return_type_from_variable(
variable_or_type: Union[Type, Variable], all_types: bool = True
) -> List[Type]:
"""
Return the type returned by a variable.
If all_types set to false, filter array/mapping. This is useful as the mapping/array in a structure are not
returned by solidity
:param variable_or_type
:param all_types
:return: Type
"""
# pylint: disable=import-outside-toplevel
from slither.core.declarations import Structure
if isinstance(variable_or_type, Type):
return _export_return_type_from_variable(variable_or_type, all_types)
if isinstance(variable_or_type.type, MappingType):
if not all_types:
return []
return export_return_type_from_variable(variable_or_type.type.type_to)
if isinstance(variable_or_type.type, ArrayType):
if not all_types:
return []
return export_return_type_from_variable(variable_or_type.type.type)
if isinstance(variable_or_type.type, UserDefinedType) and isinstance(
variable_or_type.type.type, Structure
):
ret = []
for r in variable_or_type.type.type.elems_ordered:
ret += export_return_type_from_variable(r, all_types=False)
return ret
return [variable_or_type.type]
| 6,658 | Python | .py | 157 | 34.853503 | 119 | 0.663729 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,133 | type_helpers.py | NioTheFirst_ScType/slither/utils/type_helpers.py | from typing import Union, Tuple, TYPE_CHECKING
if TYPE_CHECKING:
from slither.core.declarations import (
Function,
SolidityFunction,
Contract,
SolidityVariable,
)
from slither.core.variables.variable import Variable
### core.declaration
# pylint: disable=used-before-assignment
InternalCallType = Union[Function, SolidityFunction]
HighLevelCallType = Tuple[Contract, Union[Function, Variable]]
LibraryCallType = Tuple[Contract, Function]
LowLevelCallType = Tuple[Union[Variable, SolidityVariable], str]
| 549 | Python | .py | 15 | 32.533333 | 64 | 0.774436 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,134 | erc.py | NioTheFirst_ScType/slither/utils/erc.py | from collections import namedtuple
from typing import List
ERC = namedtuple("ERC", ["name", "parameters", "return_type", "view", "required", "events"])
ERC_EVENT = namedtuple("ERC_EVENT", ["name", "parameters", "indexes"])
def erc_to_signatures(erc: List[ERC]):
"""
Return the list of mandatory signatures
:param erc:
:return:
"""
return [f'{e.name}({",".join(e.parameters)})' for e in erc if e.required]
# Final
# https://eips.ethereum.org/EIPS/eip-20
ERC20_transfer_event = ERC_EVENT("Transfer", ["address", "address", "uint256"], [True, True, False])
ERC20_approval_event = ERC_EVENT("Approval", ["address", "address", "uint256"], [True, True, False])
ERC20_EVENTS = [ERC20_transfer_event, ERC20_approval_event]
ERC20 = [
ERC("totalSupply", [], "uint256", True, True, []),
ERC("balanceOf", ["address"], "uint256", True, True, []),
ERC("transfer", ["address", "uint256"], "bool", False, True, [ERC20_transfer_event]),
ERC(
"transferFrom",
["address", "address", "uint256"],
"bool",
False,
True,
[ERC20_transfer_event],
),
ERC("approve", ["address", "uint256"], "bool", False, True, [ERC20_approval_event]),
ERC("allowance", ["address", "address"], "uint256", True, True, []),
]
ERC20_OPTIONAL = [
ERC("name", [], "string", True, False, []),
ERC("symbol", [], "string", True, False, []),
ERC("decimals", [], "uint8", True, False, []),
]
ERC20 = ERC20 + ERC20_OPTIONAL
ERC20_signatures = erc_to_signatures(ERC20)
# Draft
# https://github.com/ethereum/eips/issues/223
ERC223_transfer_event = ERC_EVENT(
"Transfer", ["address", "address", "uint256", "bytes"], [True, True, False, False]
)
ERC223_EVENTS = [ERC223_transfer_event]
ERC223 = [
ERC("name", [], "string", True, True, []),
ERC("symbol", [], "string", True, True, []),
ERC("decimals", [], "uint8", True, True, []),
ERC("totalSupply", [], "uint256", True, True, []),
ERC("balanceOf", ["address"], "uint256", True, True, []),
ERC("transfer", ["address", "uint256"], "bool", False, True, [ERC223_transfer_event]),
ERC(
"transfer",
["address", "uint256", "bytes"],
"bool",
False,
True,
[ERC223_transfer_event],
),
ERC(
"transfer",
["address", "uint256", "bytes", "string"],
"bool",
False,
True,
[ERC223_transfer_event],
),
]
ERC223_signatures = erc_to_signatures(ERC223)
# Final
# https://eips.ethereum.org/EIPS/eip-165
ERC165_EVENTS: List = []
ERC165 = [ERC("supportsInterface", ["bytes4"], "bool", True, True, [])]
ERC165_signatures = erc_to_signatures(ERC165)
# Final
# https://eips.ethereum.org/EIPS/eip-721
# Must have ERC165
ERC721_transfer_event = ERC_EVENT("Transfer", ["address", "address", "uint256"], [True, True, True])
ERC721_approval_event = ERC_EVENT("Approval", ["address", "address", "uint256"], [True, True, True])
ERC721_approvalforall_event = ERC_EVENT(
"ApprovalForAll", ["address", "address", "bool"], [True, True, False]
)
ERC721_EVENTS = [
ERC721_transfer_event,
ERC721_approval_event,
ERC721_approvalforall_event,
]
ERC721 = [
ERC("balanceOf", ["address"], "uint256", True, True, []),
ERC("ownerOf", ["uint256"], "address", True, True, []),
ERC(
"safeTransferFrom",
["address", "address", "uint256", "bytes"],
"",
False,
True,
[ERC721_transfer_event],
),
ERC(
"safeTransferFrom",
["address", "address", "uint256"],
"",
False,
True,
[ERC721_transfer_event],
),
ERC(
"transferFrom",
["address", "address", "uint256"],
"",
False,
True,
[ERC721_transfer_event],
),
ERC("approve", ["address", "uint256"], "", False, True, [ERC721_approval_event]),
ERC(
"setApprovalForAll",
["address", "bool"],
"",
False,
True,
[ERC721_approvalforall_event],
),
ERC("getApproved", ["uint256"], "address", True, True, []),
ERC("isApprovedForAll", ["address", "address"], "bool", True, True, []),
] + ERC165
ERC721_OPTIONAL = [
ERC("name", [], "string", True, False, []),
ERC("symbol", [], "string", False, False, []),
ERC("tokenURI", ["uint256"], "string", False, False, []),
]
ERC721 = ERC721 + ERC721_OPTIONAL
ERC721_signatures = erc_to_signatures(ERC721)
# Final
# https://eips.ethereum.org/EIPS/eip-1820
ERC1820_EVENTS: List = []
ERC1820 = [
ERC(
"canImplementInterfaceForAddress",
["bytes32", "address"],
"bytes32",
True,
True,
[],
)
]
ERC1820_signatures = erc_to_signatures(ERC1820)
# Last Call
# https://eips.ethereum.org/EIPS/eip-777
ERC777_sent_event = ERC_EVENT(
"Sent",
["address", "address", "address", "uint256", "bytes", "bytes"],
[True, True, True, False, False, False],
)
ERC777_minted_event = ERC_EVENT(
"Minted",
["address", "address", "uint256", "bytes", "bytes"],
[True, True, False, False, False],
)
ERC777_burned_event = ERC_EVENT(
"Burned",
["address", "address", "uint256", "bytes", "bytes"],
[True, True, False, False, False],
)
ERC777_authorizedOperator_event = ERC_EVENT(
"AuthorizedOperator", ["address", "address"], [True, True]
)
ERC777_revokedoperator_event = ERC_EVENT("RevokedOperator", ["address", "address"], [True, True])
ERC777_EVENTS = [
ERC777_sent_event,
ERC777_minted_event,
ERC777_burned_event,
ERC777_authorizedOperator_event,
ERC777_revokedoperator_event,
]
ERC777 = [
ERC("name", [], "string", True, True, []),
ERC("symbol", [], "string", True, True, []),
ERC("totalSupply", [], "uint256", True, True, []),
ERC("balanceOf", ["address"], "uint256", True, True, []),
ERC("granularity", [], "uint256", True, True, []),
ERC("defaultOperators", [], "address[]", True, True, []),
ERC("isOperatorFor", ["address", "address"], "bool", True, True, []),
ERC(
"authorizeOperator",
["address"],
"",
False,
True,
[ERC777_authorizedOperator_event],
),
ERC("revokeOperator", ["address"], "", False, True, [ERC777_revokedoperator_event]),
ERC("send", ["address", "uint256", "bytes"], "", False, True, [ERC777_sent_event]),
ERC(
"operatorSend",
["address", "address", "uint256", "bytes", "bytes"],
"",
False,
True,
[ERC777_sent_event],
),
ERC("burn", ["uint256", "bytes"], "", False, True, [ERC777_burned_event]),
ERC(
"operatorBurn",
["address", "uint256", "bytes", "bytes"],
"",
False,
True,
[ERC777_burned_event],
),
]
ERC777_signatures = erc_to_signatures(ERC777)
# Final
# https://eips.ethereum.org/EIPS/eip-1155
# Must have ERC165
ERC1155_transfersingle_event = ERC_EVENT(
"TransferSingle",
["address", "address", "address", "uint256", "uint256"],
[True, True, True, False, False],
)
ERC1155_transferbatch_event = ERC_EVENT(
"TransferBatch",
["address", "address", "address", "uint256[]", "uint256[]"],
[True, True, True, False, False],
)
ERC1155_approvalforall_event = ERC_EVENT(
"ApprovalForAll",
["address", "address", "bool"],
[True, True, False],
)
ERC1155_uri_event = ERC_EVENT(
"URI",
["string", "uint256"],
[False, True],
)
ERC1155_EVENTS = [
ERC1155_transfersingle_event,
ERC1155_transferbatch_event,
ERC1155_approvalforall_event,
ERC1155_uri_event,
]
ERC1155 = [
ERC(
"safeTransferFrom",
["address", "address", "uint256", "uint256", "bytes"],
"",
False,
True,
[ERC1155_transfersingle_event],
),
ERC(
"safeBatchTransferFrom",
["address", "address", "uint256[]", "uint256[]", "bytes"],
"",
False,
True,
[],
),
ERC("balanceOf", ["address", "uint256"], "uint256", True, True, []),
ERC("balanceOfBatch", ["address[]", "uint256[]"], "uint256[]", True, True, []),
ERC("setApprovalForAll", ["address", "bool"], "", False, True, [ERC1155_approvalforall_event]),
ERC("isApprovedForAll", ["address", "address"], "bool", True, True, []),
] + ERC165
ERC1155_TOKEN_RECEIVER = [
ERC(
"onERC1155Received",
["address", "address", "uint256", "uint256", "bytes"],
"bytes4",
False,
False,
[],
),
ERC(
"onERC1155BatchReceived",
["address", "address", "uint256[]", "uint256[]", "bytes"],
"bytes4",
False,
False,
[],
),
]
ERC1155_METADATA = [ERC("uri", ["uint256"], "string", True, False, [])]
ERC1155 = ERC1155 + ERC1155_TOKEN_RECEIVER + ERC1155_METADATA
ERC1155_signatures = erc_to_signatures(ERC1155)
# Review
# https://eips.ethereum.org/EIPS/eip-2612
# Must have ERC20
ERC2612_EVENTS = []
ERC2612 = [
ERC(
"permit",
["address", "address", "uint256", "uint256", "uint8", "bytes32", "bytes32"],
"",
False,
True,
[],
),
ERC("nonces", ["address"], "uint256", True, True, []),
ERC("DOMAIN_SEPARATOR", [], "bytes32", True, True, []),
] + ERC20
ERC2612_signatures = erc_to_signatures(ERC2612)
# Review
# https://eips.ethereum.org/EIPS/eip-1363
# Must have ERC20 and ERC165
ERC1363_EVENTS = []
ERC1363 = (
[
ERC("transferAndCall", ["address", "uint256"], "bool", False, True, []),
ERC("transferAndCall", ["address", "uint256", "bytes"], "bool", False, True, []),
ERC("transferFromAndCall", ["address", "address", "uint256"], "bool", False, True, []),
ERC(
"transferFromAndCall",
["address", "address", "uint256", "bytes"],
"bool",
False,
True,
[],
),
ERC("approveAndCall", ["address", "uint256"], "bool", False, True, []),
ERC("approveAndCall", ["address", "uint256", "bytes"], "bool", False, True, []),
]
+ ERC20
+ ERC165
)
ERC1363_signatures = erc_to_signatures(ERC1363)
# Review
# https://eips.ethereum.org/EIPS/eip-4524
# Must have ERC20 and ERC165
ERC4524_EVENTS = []
ERC4524 = (
[
ERC("safeTransfer", ["address", "uint256"], "bool", False, True, []),
ERC("safeTransfer", ["address", "uint256", "bytes"], "bool", False, True, []),
ERC("safeTransferFrom", ["address", "address", "uint256"], "bool", False, True, []),
ERC(
"safeTransferFrom", ["address", "address", "uint256", "bytes"], "bool", False, True, []
),
]
+ ERC20
+ ERC165
)
ERC4524_signatures = erc_to_signatures(ERC4524)
# Final
# https://eips.ethereum.org/EIPS/eip-4626
# Must have ERC20
ERC4626_deposit_event = ERC_EVENT(
"Deposit",
["address", "address", "uint256", "uint256"],
[True, True, False, False],
)
ERC4626_withdraw_event = ERC_EVENT(
"Withdraw",
["address", "address", "address", "uint256", "uint256"],
[True, True, True, False, False],
)
ERC4626_EVENTS = [
ERC4626_deposit_event,
ERC4626_withdraw_event,
]
ERC4626 = [
ERC("asset", [], "address", True, True, []),
ERC("totalAssets", [], "uint256", True, True, []),
ERC("convertToShares", ["uint256"], "uint256", True, True, []),
ERC("convertToAssets", ["uint256"], "uint256", True, True, []),
ERC("maxDeposit", ["address"], "uint256", True, True, []),
ERC("previewDeposit", ["uint256"], "uint256", True, True, []),
ERC("deposit", ["uint256", "address"], "uint256", False, True, [ERC4626_deposit_event]),
ERC("maxMint", ["address"], "uint256", True, True, []),
ERC("previewMint", ["uint256"], "uint256", True, True, []),
ERC("mint", ["uint256", "address"], "uint256", False, True, [ERC4626_deposit_event]),
ERC("maxWithdraw", ["address"], "uint256", True, True, []),
ERC("previewWithdraw", ["uint256"], "uint256", True, True, []),
ERC(
"withdraw",
["uint256", "address", "address"],
"uint256",
False,
True,
[ERC4626_withdraw_event],
),
ERC("maxRedeem", ["address"], "uint256", True, True, []),
ERC("previewRedeem", ["uint256"], "uint256", True, True, []),
ERC(
"redeem",
["uint256", "address", "address"],
"uint256",
False,
True,
[ERC4626_withdraw_event],
),
] + ERC20
ERC4626_signatures = erc_to_signatures(ERC4626)
ERCS = {
"ERC20": (ERC20, ERC20_EVENTS),
"ERC223": (ERC223, ERC223_EVENTS),
"ERC165": (ERC165, ERC165_EVENTS),
"ERC721": (ERC721, ERC721_EVENTS),
"ERC1820": (ERC1820, ERC1820_EVENTS),
"ERC777": (ERC777, ERC777_EVENTS),
"ERC1155": (ERC1155, ERC1155_EVENTS),
"ERC2612": (ERC2612, ERC2612_EVENTS),
"ERC1363": (ERC1363, ERC1363_EVENTS),
"ERC4524": (ERC4524, ERC4524_EVENTS),
"ERC4626": (ERC4626, ERC4626_EVENTS),
}
| 12,953 | Python | .py | 405 | 26.723457 | 100 | 0.585274 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,135 | inheritance_analysis.py | NioTheFirst_ScType/slither/utils/inheritance_analysis.py | """
Detects various properties of inheritance in provided contracts.
"""
from collections import defaultdict
from typing import TYPE_CHECKING, List, Dict, Set, Tuple
if TYPE_CHECKING:
from slither.core.declarations import Contract, Function
from slither.core.variables.state_variable import StateVariable
def detect_c3_function_shadowing(
contract: "Contract",
) -> Dict["Function", Set["Function"]]:
"""
Detects and obtains functions which are indirectly shadowed via multiple inheritance by C3 linearization
properties, despite not directly inheriting from each other.
:param contract: The contract to check for potential C3 linearization shadowing within.
:return: A dict (function winner -> [shadowed functions])
"""
targets: Dict[str, "Function"] = {
f.full_name: f
for f in contract.functions_inherited
if f.shadows and not f.is_constructor and not f.is_constructor_variables
}
collisions: Dict["Function", Set["Function"]] = defaultdict(set)
for contract_inherited in contract.immediate_inheritance:
for candidate in contract_inherited.functions:
if candidate.full_name not in targets or candidate.is_shadowed:
continue
if targets[candidate.full_name].canonical_name != candidate.canonical_name:
collisions[targets[candidate.full_name]].add(candidate)
return collisions
def detect_state_variable_shadowing(
contracts: List["Contract"],
) -> Set[Tuple["Contract", "StateVariable", "Contract", "StateVariable"]]:
"""
Detects all overshadowing and overshadowed state variables in the provided contracts.
:param contracts: The contracts to detect shadowing within.
:return: Returns a set of tuples (overshadowing_contract, overshadowing_state_var, overshadowed_contract,
overshadowed_state_var).
The contract-variable pair's variable does not need to be defined in its paired contract, it may have been
inherited. The contracts are simply included to denote the immediate inheritance path from which the shadowed
variable originates.
"""
results: Set[Tuple["Contract", "StateVariable", "Contract", "StateVariable"]] = set()
for contract in contracts:
variables_declared: Dict[str, "StateVariable"] = {
variable.name: variable for variable in contract.state_variables_declared
}
for immediate_base_contract in contract.immediate_inheritance:
for variable in immediate_base_contract.variables:
if variable.name in variables_declared:
results.add(
(
contract,
variables_declared[variable.name],
immediate_base_contract,
variable,
)
)
return results
| 2,919 | Python | .py | 59 | 40.508475 | 113 | 0.683509 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,136 | command_line.py | NioTheFirst_ScType/slither/utils/command_line.py | import argparse
import json
import os
import re
import logging
from collections import defaultdict
from typing import Dict, List, Type, Union
from crytic_compile.cryticparser.defaults import (
DEFAULTS_FLAG_IN_CONFIG as DEFAULTS_FLAG_IN_CONFIG_CRYTIC_COMPILE,
)
from slither.detectors.abstract_detector import classification_txt, AbstractDetector
from slither.printers.abstract_printer import AbstractPrinter
from slither.utils.colors import yellow, red
from slither.utils.myprettytable import MyPrettyTable
logger = logging.getLogger("Slither")
DEFAULT_JSON_OUTPUT_TYPES = ["detectors", "printers"]
JSON_OUTPUT_TYPES = [
"compilations",
"console",
"detectors",
"printers",
"list-detectors",
"list-printers",
]
# Those are the flags shared by the command line and the config file
defaults_flag_in_config = {
"codex": False,
"codex_contracts": "all",
"codex_model": "text-davinci-003",
"codex_temperature": 0,
"codex_max_tokens": 300,
"codex_log": False,
"detectors_to_run": "all",
"printers_to_run": None,
"detectors_to_exclude": None,
"exclude_dependencies": False,
"exclude_informational": False,
"exclude_optimization": False,
"exclude_low": False,
"exclude_medium": False,
"exclude_high": False,
"fail_pedantic": True,
"fail_low": False,
"fail_medium": False,
"fail_high": False,
"json": None,
"sarif": None,
"json-types": ",".join(DEFAULT_JSON_OUTPUT_TYPES),
"disable_color": False,
"filter_paths": None,
"generate_patches": False,
# debug command
"skip_assembly": False,
"legacy_ast": False,
"zip": None,
"zip_type": "lzma",
"show_ignored_findings": False,
"no_fail": False,
**DEFAULTS_FLAG_IN_CONFIG_CRYTIC_COMPILE,
}
def read_config_file(args: argparse.Namespace) -> None:
# No config file was provided as an argument
if args.config_file is None:
# Check wether the default config file is present
if os.path.exists("slither.config.json"):
# The default file exists, use it
args.config_file = "slither.config.json"
else:
return
if os.path.isfile(args.config_file):
try:
with open(args.config_file, encoding="utf8") as f:
config = json.load(f)
for key, elem in config.items():
if key not in defaults_flag_in_config:
logger.info(
yellow(f"{args.config_file} has an unknown key: {key} : {elem}")
)
continue
if getattr(args, key) == defaults_flag_in_config[key]:
setattr(args, key, elem)
except json.decoder.JSONDecodeError as e:
logger.error(red(f"Impossible to read {args.config_file}, please check the file {e}"))
else:
logger.error(red(f"File {args.config_file} is not a file or does not exist"))
logger.error(yellow("Falling back to the default settings..."))
def output_to_markdown(
detector_classes: List[Type[AbstractDetector]],
printer_classes: List[Type[AbstractPrinter]],
filter_wiki: str,
) -> None:
def extract_help(cls: Union[Type[AbstractDetector], Type[AbstractPrinter]]) -> str:
if cls.WIKI == "":
return cls.HELP
return f"[{cls.HELP}]({cls.WIKI})"
detectors_list = []
print(filter_wiki)
for detector in detector_classes:
argument = detector.ARGUMENT
# dont show the backdoor example
if argument == "backdoor":
continue
if not filter_wiki in detector.WIKI:
continue
help_info = extract_help(detector)
impact = detector.IMPACT
confidence = classification_txt[detector.CONFIDENCE]
detectors_list.append((argument, help_info, impact, confidence))
# Sort by impact, confidence, and name
detectors_list = sorted(
detectors_list, key=lambda element: (element[2], element[3], element[0])
)
idx = 1
for (argument, help_info, impact, confidence) in detectors_list:
print(f"{idx} | `{argument}` | {help_info} | {classification_txt[impact]} | {confidence}")
idx = idx + 1
print()
printers_list = []
for printer in printer_classes:
argument = printer.ARGUMENT
help_info = extract_help(printer)
printers_list.append((argument, help_info))
# Sort by impact, confidence, and name
printers_list = sorted(printers_list, key=lambda element: (element[0]))
idx = 1
for (argument, help_info) in printers_list:
print(f"{idx} | `{argument}` | {help_info}")
idx = idx + 1
def get_level(l: str) -> int:
tab = l.count("\t") + 1
if l.replace("\t", "").startswith(" -"):
tab = tab + 1
if l.replace("\t", "").startswith("-"):
tab = tab + 1
return tab
def convert_result_to_markdown(txt: str) -> str:
# -1 to remove the last \n
lines = txt[0:-1].split("\n")
ret = []
level = 0
for l in lines:
next_level = get_level(l)
prefix = "<li>"
if next_level < level:
prefix = "</ul>" * (level - next_level) + prefix
if next_level > level:
prefix = "<ul>" * (next_level - level) + prefix
level = next_level
ret.append(prefix + l)
return "".join(ret)
def output_results_to_markdown(all_results: List[Dict], checklistlimit: str) -> None:
checks = defaultdict(list)
info: Dict = defaultdict(dict)
for results_ in all_results:
checks[results_["check"]].append(results_)
info[results_["check"]] = {
"impact": results_["impact"],
"confidence": results_["confidence"],
}
print("Summary")
for check_ in checks:
print(
f" - [{check_}](#{check_}) ({len(checks[check_])} results) ({info[check_]['impact']})"
)
counter = 0
for (check, results) in checks.items():
print(f"## {check}")
print(f'Impact: {info[check]["impact"]}')
print(f'Confidence: {info[check]["confidence"]}')
additional = False
if checklistlimit and len(results) > 5:
results = results[0:5]
additional = True
for result in results:
print(" - [ ] ID-" + f"{counter}")
counter = counter + 1
print(result["markdown"])
if result["first_markdown_element"]:
print(result["first_markdown_element"])
print("\n")
if additional:
print(f"**More results were found, check [{checklistlimit}]({checklistlimit})**")
def output_wiki(detector_classes: List[Type[AbstractDetector]], filter_wiki: str) -> None:
# Sort by impact, confidence, and name
detectors_list = sorted(
detector_classes,
key=lambda element: (element.IMPACT, element.CONFIDENCE, element.ARGUMENT),
)
for detector in detectors_list:
argument = detector.ARGUMENT
# dont show the backdoor example
if argument == "backdoor":
continue
if not filter_wiki in detector.WIKI:
continue
check = detector.ARGUMENT
impact = classification_txt[detector.IMPACT]
confidence = classification_txt[detector.CONFIDENCE]
title = detector.WIKI_TITLE
description = detector.WIKI_DESCRIPTION
exploit_scenario = detector.WIKI_EXPLOIT_SCENARIO
recommendation = detector.WIKI_RECOMMENDATION
print(f"\n## {title}")
print("### Configuration")
print(f"* Check: `{check}`")
print(f"* Severity: `{impact}`")
print(f"* Confidence: `{confidence}`")
print("\n### Description")
print(description)
if exploit_scenario:
print("\n### Exploit Scenario:")
print(exploit_scenario)
print("\n### Recommendation")
print(recommendation)
def output_detectors(detector_classes: List[Type[AbstractDetector]]) -> None:
detectors_list = []
for detector in detector_classes:
argument = detector.ARGUMENT
# dont show the backdoor example
if argument == "backdoor":
continue
help_info = detector.HELP
impact = detector.IMPACT
confidence = classification_txt[detector.CONFIDENCE]
detectors_list.append((argument, help_info, impact, confidence))
table = MyPrettyTable(["Num", "Check", "What it Detects", "Impact", "Confidence"])
# Sort by impact, confidence, and name
detectors_list = sorted(
detectors_list, key=lambda element: (element[2], element[3], element[0])
)
idx = 1
for (argument, help_info, impact, confidence) in detectors_list:
table.add_row([str(idx), argument, help_info, classification_txt[impact], confidence])
idx = idx + 1
print(table)
# pylint: disable=too-many-locals
def output_detectors_json(
detector_classes: List[Type[AbstractDetector]],
) -> List[Dict]:
detectors_list = []
for detector in detector_classes:
argument = detector.ARGUMENT
# dont show the backdoor example
if argument == "backdoor":
continue
help_info = detector.HELP
impact = detector.IMPACT
confidence = classification_txt[detector.CONFIDENCE]
wiki_url = detector.WIKI
wiki_description = detector.WIKI_DESCRIPTION
wiki_exploit_scenario = detector.WIKI_EXPLOIT_SCENARIO
wiki_recommendation = detector.WIKI_RECOMMENDATION
detectors_list.append(
(
argument,
help_info,
impact,
confidence,
wiki_url,
wiki_description,
wiki_exploit_scenario,
wiki_recommendation,
)
)
# Sort by impact, confidence, and name
detectors_list = sorted(
detectors_list, key=lambda element: (element[2], element[3], element[0])
)
idx = 1
table = []
for (
argument,
help_info,
impact,
confidence,
wiki_url,
description,
exploit,
recommendation,
) in detectors_list:
table.append(
{
"index": idx,
"check": argument,
"title": help_info,
"impact": classification_txt[impact],
"confidence": confidence,
"wiki_url": wiki_url,
"description": description,
"exploit_scenario": exploit,
"recommendation": recommendation,
}
)
idx = idx + 1
return table
def output_printers(printer_classes: List[Type[AbstractPrinter]]) -> None:
printers_list = []
for printer in printer_classes:
argument = printer.ARGUMENT
help_info = printer.HELP
printers_list.append((argument, help_info))
table = MyPrettyTable(["Num", "Printer", "What it Does"])
# Sort by impact, confidence, and name
printers_list = sorted(printers_list, key=lambda element: (element[0]))
idx = 1
for (argument, help_info) in printers_list:
table.add_row([str(idx), argument, help_info])
idx = idx + 1
print(table)
def output_printers_json(printer_classes: List[Type[AbstractPrinter]]) -> List[Dict]:
printers_list = []
for printer in printer_classes:
argument = printer.ARGUMENT
help_info = printer.HELP
printers_list.append((argument, help_info))
# Sort by name
printers_list = sorted(printers_list, key=lambda element: (element[0]))
idx = 1
table = []
for (argument, help_info) in printers_list:
table.append({"index": idx, "check": argument, "title": help_info})
idx = idx + 1
return table
def check_and_sanitize_markdown_root(markdown_root: str) -> str:
# Regex to check whether the markdown_root is a GitHub URL
match = re.search(
r"(https://)github.com/([a-zA-Z-]+)([:/][A-Za-z0-9_.-]+[:/]?)([A-Za-z0-9_.-]*)(.*)",
markdown_root,
)
if match:
if markdown_root[-1] != "/":
logger.warning("Appending '/' in markdown_root url for better code referencing")
markdown_root = markdown_root + "/"
if not match.group(4):
logger.warning(
"Appending 'master/tree/' in markdown_root url for better code referencing"
)
markdown_root = markdown_root + "master/tree/"
elif match.group(4) == "tree":
logger.warning(
"Replacing 'tree' with 'blob' in markdown_root url for better code referencing"
)
positions = match.span(4)
markdown_root = f"{markdown_root[:positions[0]]}blob{markdown_root[positions[1]:]}"
return markdown_root
| 12,940 | Python | .py | 345 | 29.315942 | 98 | 0.607809 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,137 | expression_manipulations.py | NioTheFirst_ScType/slither/utils/expression_manipulations.py | """
We use protected member, to avoid having setter in the expression
as they should be immutable
"""
import copy
from typing import Union, Callable
from slither.core.expressions import UnaryOperation
from slither.core.expressions.assignment_operation import AssignmentOperation
from slither.core.expressions.binary_operation import BinaryOperation
from slither.core.expressions.call_expression import CallExpression
from slither.core.expressions.conditional_expression import ConditionalExpression
from slither.core.expressions.elementary_type_name_expression import ElementaryTypeNameExpression
from slither.core.expressions.expression import Expression
from slither.core.expressions.identifier import Identifier
from slither.core.expressions.index_access import IndexAccess
from slither.core.expressions.literal import Literal
from slither.core.expressions.member_access import MemberAccess
from slither.core.expressions.new_array import NewArray
from slither.core.expressions.new_contract import NewContract
from slither.core.expressions.tuple_expression import TupleExpression
from slither.core.expressions.type_conversion import TypeConversion
from slither.all_exceptions import SlitherException
# pylint: disable=protected-access
def f_expressions(
e: Union[AssignmentOperation, BinaryOperation, TupleExpression],
x: Union[Identifier, Literal, MemberAccess, IndexAccess],
) -> None:
e._expressions.append(x)
def f_call(e: CallExpression, x):
e._arguments.append(x)
def f_call_value(e: CallExpression, x):
e._value = x
def f_call_gas(e: CallExpression, x):
e._gas = x
def f_expression(e: Union[TypeConversion, UnaryOperation, MemberAccess], x):
e._expression = x
def f_called(e: CallExpression, x):
e._called = x
class SplitTernaryExpression:
def __init__(self, expression: Union[AssignmentOperation, ConditionalExpression]) -> None:
if isinstance(expression, ConditionalExpression):
self.true_expression = copy.copy(expression.then_expression)
self.false_expression = copy.copy(expression.else_expression)
self.condition = copy.copy(expression.if_expression)
else:
self.true_expression = copy.copy(expression)
self.false_expression = copy.copy(expression)
self.condition = None
self.copy_expression(expression, self.true_expression, self.false_expression)
def conditional_not_ahead(
self,
next_expr: Expression,
true_expression: Union[AssignmentOperation, MemberAccess],
false_expression: Union[AssignmentOperation, MemberAccess],
f: Callable,
) -> bool:
# look ahead for parenthetical expression (.. ? .. : ..)
if (
isinstance(next_expr, TupleExpression)
and len(next_expr.expressions) == 1
and isinstance(next_expr.expressions[0], ConditionalExpression)
):
next_expr = next_expr.expressions[0]
if isinstance(next_expr, ConditionalExpression):
f(true_expression, copy.copy(next_expr.then_expression))
f(false_expression, copy.copy(next_expr.else_expression))
self.condition = copy.copy(next_expr.if_expression)
return False
f(true_expression, copy.copy(next_expr))
f(false_expression, copy.copy(next_expr))
return True
def copy_expression(
self, expression: Expression, true_expression: Expression, false_expression: Expression
) -> None:
if self.condition:
return
if isinstance(expression, ConditionalExpression):
raise SlitherException("Nested ternary operator not handled")
if isinstance(
expression,
(Literal, Identifier, IndexAccess, NewArray, NewContract, ElementaryTypeNameExpression),
):
return
if isinstance(expression, (AssignmentOperation, BinaryOperation, TupleExpression)):
true_expression._expressions = []
false_expression._expressions = []
self.convert_expressions(expression, true_expression, false_expression)
elif isinstance(expression, CallExpression):
next_expr = expression.called
self.convert_call_expression(expression, next_expr, true_expression, false_expression)
elif isinstance(expression, (TypeConversion, UnaryOperation, MemberAccess)):
next_expr = expression.expression
if self.conditional_not_ahead(
next_expr, true_expression, false_expression, f_expression
):
self.copy_expression(
expression.expression,
true_expression.expression,
false_expression.expression,
)
else:
raise SlitherException(
f"Ternary operation not handled {expression}({type(expression)})"
)
def convert_expressions(
self,
expression: Union[AssignmentOperation, BinaryOperation, TupleExpression],
true_expression: Expression,
false_expression: Expression,
) -> None:
for next_expr in expression.expressions:
# TODO: can we get rid of `NoneType` expressions in `TupleExpression`?
# montyly: this might happen with unnamed tuple (ex: (,,,) = f()), but it needs to be checked
if next_expr:
if isinstance(next_expr, IndexAccess):
self.convert_index_access(next_expr, true_expression, false_expression)
if self.conditional_not_ahead(
next_expr, true_expression, false_expression, f_expressions
):
# always on last arguments added
self.copy_expression(
next_expr,
true_expression.expressions[-1],
false_expression.expressions[-1],
)
def convert_index_access(
self, next_expr: IndexAccess, true_expression: Expression, false_expression: Expression
) -> None:
# create an index access for each branch
# x[if cond ? 1 : 2] -> if cond { x[1] } else { x[2] }
for expr in next_expr.expressions:
if self.conditional_not_ahead(expr, true_expression, false_expression, f_expressions):
self.copy_expression(
expr,
true_expression.expressions[-1],
false_expression.expressions[-1],
)
def convert_call_expression(
self,
expression: CallExpression,
next_expr: Expression,
true_expression: Expression,
false_expression: Expression,
) -> None:
# case of lib
# (.. ? .. : ..).add
if self.conditional_not_ahead(next_expr, true_expression, false_expression, f_called):
self.copy_expression(next_expr, true_expression.called, false_expression.called)
# In order to handle ternaries in both call options, gas and value, we return early if the
# conditional is not ahead to rewrite both ternaries (see `_rewrite_ternary_as_if_else`).
if expression.call_gas:
# case of (..).func{gas: .. ? .. : ..}()
next_expr = expression.call_gas
if self.conditional_not_ahead(next_expr, true_expression, false_expression, f_call_gas):
self.copy_expression(
next_expr,
true_expression.call_gas,
false_expression.call_gas,
)
else:
return
if expression.call_value:
# case of (..).func{value: .. ? .. : ..}()
next_expr = expression.call_value
if self.conditional_not_ahead(
next_expr, true_expression, false_expression, f_call_value
):
self.copy_expression(
next_expr,
true_expression.call_value,
false_expression.call_value,
)
else:
return
true_expression._arguments = []
false_expression._arguments = []
for expr in expression.arguments:
if self.conditional_not_ahead(expr, true_expression, false_expression, f_call):
# always on last arguments added
self.copy_expression(
expr,
true_expression.arguments[-1],
false_expression.arguments[-1],
)
| 8,621 | Python | .py | 184 | 36.027174 | 105 | 0.640809 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,138 | all_detectors.py | NioTheFirst_ScType/slither/detectors/all_detectors.py | # pylint: disable=unused-import,relative-beyond-top-level
from .examples.backdoor import Backdoor
#from .my_detectors.detect_external import detect_external
#from .my_detectors.detect_round import detect_round
from .my_detectors.tcheck import tcheck
from .variables.uninitialized_state_variables import UninitializedStateVarsDetection
from .variables.uninitialized_storage_variables import UninitializedStorageVars
from .variables.uninitialized_local_variables import UninitializedLocalVars
from .variables.var_read_using_this import VarReadUsingThis
from .attributes.constant_pragma import ConstantPragma
from .attributes.incorrect_solc import IncorrectSolc
from .attributes.locked_ether import LockedEther
from .functions.arbitrary_send_eth import ArbitrarySendEth
from .erc.erc20.arbitrary_send_erc20_no_permit import ArbitrarySendErc20NoPermit
from .erc.erc20.arbitrary_send_erc20_permit import ArbitrarySendErc20Permit
from .functions.suicidal import Suicidal
# from .functions.complex_function import ComplexFunction
from .reentrancy.reentrancy_benign import ReentrancyBenign
from .reentrancy.reentrancy_read_before_write import ReentrancyReadBeforeWritten
from .reentrancy.reentrancy_eth import ReentrancyEth
from .reentrancy.reentrancy_no_gas import ReentrancyNoGas
from .reentrancy.reentrancy_events import ReentrancyEvent
from .variables.unused_state_variables import UnusedStateVars
from .variables.could_be_constant import CouldBeConstant
from .variables.could_be_immutable import CouldBeImmutable
from .statements.tx_origin import TxOrigin
from .statements.assembly import Assembly
from .operations.low_level_calls import LowLevelCalls
from .operations.unused_return_values import UnusedReturnValues
from .operations.unchecked_transfer import UncheckedTransfer
from .naming_convention.naming_convention import NamingConvention
from .functions.external_function import ExternalFunction
from .statements.controlled_delegatecall import ControlledDelegateCall
from .attributes.const_functions_asm import ConstantFunctionsAsm
from .attributes.const_functions_state import ConstantFunctionsState
from .shadowing.abstract import ShadowingAbstractDetection
from .shadowing.state import StateShadowing
from .shadowing.local import LocalShadowing
from .shadowing.builtin_symbols import BuiltinSymbolShadowing
from .operations.block_timestamp import Timestamp
from .statements.calls_in_loop import MultipleCallsInLoop
from .statements.incorrect_strict_equality import IncorrectStrictEquality
from .erc.erc20.incorrect_erc20_interface import IncorrectERC20InterfaceDetection
from .erc.incorrect_erc721_interface import IncorrectERC721InterfaceDetection
from .erc.unindexed_event_parameters import UnindexedERC20EventParameters
from .statements.deprecated_calls import DeprecatedStandards
from .source.rtlo import RightToLeftOverride
from .statements.too_many_digits import TooManyDigits
from .operations.unchecked_low_level_return_values import UncheckedLowLevel
from .operations.unchecked_send_return_value import UncheckedSend
from .operations.void_constructor import VoidConstructor
from .statements.type_based_tautology import TypeBasedTautology
from .statements.boolean_constant_equality import BooleanEquality
from .statements.boolean_constant_misuse import BooleanConstantMisuse
from .statements.divide_before_multiply import DivideBeforeMultiply
from .statements.unprotected_upgradeable import UnprotectedUpgradeable
from .slither.name_reused import NameReused
from .functions.unimplemented import UnimplementedFunctionDetection
from .statements.mapping_deletion import MappingDeletionDetection
from .statements.array_length_assignment import ArrayLengthAssignment
from .variables.similar_variables import SimilarVarsDetection
from .variables.function_init_state_variables import FunctionInitializedState
from .statements.redundant_statements import RedundantStatements
from .operations.bad_prng import BadPRNG
from .statements.costly_operations_in_loop import CostlyOperationsInLoop
from .statements.assert_state_change import AssertStateChange
from .attributes.unimplemented_interface import MissingInheritance
from .assembly.shift_parameter_mixup import ShiftParameterMixup
from .compiler_bugs.storage_signed_integer_array import StorageSignedIntegerArray
from .compiler_bugs.uninitialized_function_ptr_in_constructor import (
UninitializedFunctionPtrsConstructor,
)
from .compiler_bugs.storage_ABIEncoderV2_array import ABIEncoderV2Array
from .compiler_bugs.array_by_reference import ArrayByReference
from .compiler_bugs.enum_conversion import EnumConversion
from .compiler_bugs.multiple_constructor_schemes import MultipleConstructorSchemes
from .compiler_bugs.public_mapping_nested import PublicMappingNested
from .compiler_bugs.reused_base_constructor import ReusedBaseConstructor
from .operations.missing_events_access_control import MissingEventsAccessControl
from .operations.missing_events_arithmetic import MissingEventsArithmetic
from .functions.modifier import ModifierDefaultDetection
from .variables.predeclaration_usage_local import PredeclarationUsageLocal
from .statements.unary import IncorrectUnaryExpressionDetection
from .operations.missing_zero_address_validation import MissingZeroAddressValidation
from .functions.dead_code import DeadCode
from .statements.write_after_write import WriteAfterWrite
from .statements.msg_value_in_loop import MsgValueInLoop
from .statements.delegatecall_in_loop import DelegatecallInLoop
from .functions.protected_variable import ProtectedVariables
from .functions.permit_domain_signature_collision import DomainSeparatorCollision
from .functions.codex import Codex
| 5,638 | Python | .py | 91 | 60.89011 | 84 | 0.888368 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,139 | abstract_detector.py | NioTheFirst_ScType/slither/detectors/abstract_detector.py | import abc
import re
from logging import Logger
from typing import Optional, List, TYPE_CHECKING, Dict, Union, Callable
from slither.core.compilation_unit import SlitherCompilationUnit
from slither.core.declarations import Contract
from slither.utils.colors import green, yellow, red
from slither.formatters.exceptions import FormatImpossible
from slither.formatters.utils.patches import apply_patch, create_diff
from slither.utils.comparable_enum import ComparableEnum
from slither.utils.output import Output, SupportedOutput
if TYPE_CHECKING:
from slither import Slither
class IncorrectDetectorInitialization(Exception):
pass
class DetectorClassification(ComparableEnum):
HIGH = 0
MEDIUM = 1
LOW = 2
INFORMATIONAL = 3
OPTIMIZATION = 4
UNIMPLEMENTED = 999
classification_colors: Dict[DetectorClassification, Callable[[str], str]] = {
DetectorClassification.INFORMATIONAL: green,
DetectorClassification.OPTIMIZATION: green,
DetectorClassification.LOW: green,
DetectorClassification.MEDIUM: yellow,
DetectorClassification.HIGH: red,
}
classification_txt = {
DetectorClassification.INFORMATIONAL: "Informational",
DetectorClassification.OPTIMIZATION: "Optimization",
DetectorClassification.LOW: "Low",
DetectorClassification.MEDIUM: "Medium",
DetectorClassification.HIGH: "High",
}
def make_solc_versions(minor: int, patch_min: int, patch_max: int) -> List[str]:
"""
Create a list of solc version: [0.minor.patch_min .... 0.minor.patch_max]
"""
return [f"0.{minor}.{x}" for x in range(patch_min, patch_max + 1)]
ALL_SOLC_VERSIONS_04 = make_solc_versions(4, 0, 26)
ALL_SOLC_VERSIONS_05 = make_solc_versions(5, 0, 17)
ALL_SOLC_VERSIONS_06 = make_solc_versions(6, 0, 12)
ALL_SOLC_VERSIONS_07 = make_solc_versions(7, 0, 6)
# No VERSIONS_08 as it is still in dev
class AbstractDetector(metaclass=abc.ABCMeta):
ARGUMENT = "" # run the detector with slither.py --ARGUMENT
HELP = "" # help information
IMPACT: DetectorClassification = DetectorClassification.UNIMPLEMENTED
CONFIDENCE: DetectorClassification = DetectorClassification.UNIMPLEMENTED
WIKI = ""
WIKI_TITLE = ""
WIKI_DESCRIPTION = ""
WIKI_EXPLOIT_SCENARIO = ""
WIKI_RECOMMENDATION = ""
STANDARD_JSON = True
# list of vulnerable solc versions as strings (e.g. ["0.4.25", "0.5.0"])
# If the detector is meant to run on all versions, use None
VULNERABLE_SOLC_VERSIONS: Optional[List[str]] = None
def __init__(
self, compilation_unit: SlitherCompilationUnit, slither: "Slither", logger: Logger
):
self.compilation_unit: SlitherCompilationUnit = compilation_unit
self.contracts: List[Contract] = compilation_unit.contracts
self.slither: "Slither" = slither
# self.filename = slither.filename
self.logger = logger
if not self.HELP:
raise IncorrectDetectorInitialization(
f"HELP is not initialized {self.__class__.__name__}"
)
if not self.ARGUMENT:
raise IncorrectDetectorInitialization(
f"ARGUMENT is not initialized {self.__class__.__name__}"
)
if not self.WIKI:
raise IncorrectDetectorInitialization(
f"WIKI is not initialized {self.__class__.__name__}"
)
if not self.WIKI_TITLE:
raise IncorrectDetectorInitialization(
f"WIKI_TITLE is not initialized {self.__class__.__name__}"
)
if not self.WIKI_DESCRIPTION:
raise IncorrectDetectorInitialization(
f"WIKI_DESCRIPTION is not initialized {self.__class__.__name__}"
)
if not self.WIKI_EXPLOIT_SCENARIO and self.IMPACT not in [
DetectorClassification.INFORMATIONAL,
DetectorClassification.OPTIMIZATION,
]:
raise IncorrectDetectorInitialization(
f"WIKI_EXPLOIT_SCENARIO is not initialized {self.__class__.__name__}"
)
if not self.WIKI_RECOMMENDATION:
raise IncorrectDetectorInitialization(
f"WIKI_RECOMMENDATION is not initialized {self.__class__.__name__}"
)
if self.VULNERABLE_SOLC_VERSIONS is not None and not self.VULNERABLE_SOLC_VERSIONS:
raise IncorrectDetectorInitialization(
f"VULNERABLE_SOLC_VERSIONS should not be an empty list {self.__class__.__name__}"
)
if re.match("^[a-zA-Z0-9_-]*$", self.ARGUMENT) is None:
raise IncorrectDetectorInitialization(
f"ARGUMENT has illegal character {self.__class__.__name__}"
)
if self.IMPACT not in [
DetectorClassification.LOW,
DetectorClassification.MEDIUM,
DetectorClassification.HIGH,
DetectorClassification.INFORMATIONAL,
DetectorClassification.OPTIMIZATION,
]:
raise IncorrectDetectorInitialization(
f"IMPACT is not initialized {self.__class__.__name__}"
)
if self.CONFIDENCE not in [
DetectorClassification.LOW,
DetectorClassification.MEDIUM,
DetectorClassification.HIGH,
DetectorClassification.INFORMATIONAL,
DetectorClassification.OPTIMIZATION,
]:
raise IncorrectDetectorInitialization(
f"CONFIDENCE is not initialized {self.__class__.__name__}"
)
def _log(self, info: str) -> None:
if self.logger:
self.logger.info(self.color(info))
def _uses_vulnerable_solc_version(self) -> bool:
if self.VULNERABLE_SOLC_VERSIONS:
return self.compilation_unit.solc_version in self.VULNERABLE_SOLC_VERSIONS
return True
@abc.abstractmethod
def _detect(self) -> List[Output]:
"""TODO Documentation"""
return []
# pylint: disable=too-many-branches
def detect(self) -> List[Dict]:
results: List[Dict] = []
# check solc version
if not self._uses_vulnerable_solc_version():
return results
# only keep valid result, and remove duplicate
# Keep only dictionaries
for r in [output.data for output in self._detect()]:
if self.compilation_unit.core.valid_result(r) and r not in results:
results.append(r)
if results and self.logger:
self._log_result(results)
if self.compilation_unit.core.generate_patches:
for result in results:
try:
self._format(self.compilation_unit, result)
if not "patches" in result:
continue
result["patches_diff"] = {}
for file in result["patches"]:
original_txt = self.compilation_unit.core.source_code[file].encode("utf8")
patched_txt = original_txt
offset = 0
patches = result["patches"][file]
patches.sort(key=lambda x: x["start"])
if not all(
patches[i]["end"] <= patches[i + 1]["end"]
for i in range(len(patches) - 1)
):
self._log(
f"Impossible to generate patch; patches collisions: {patches}"
)
continue
for patch in patches:
patched_txt, offset = apply_patch(patched_txt, patch, offset)
diff = create_diff(self.compilation_unit, original_txt, patched_txt, file)
if not diff:
self._log(f"Impossible to generate patch; empty {result}")
else:
result["patches_diff"][file] = diff
except FormatImpossible as exception:
self._log(f'\nImpossible to patch:\n\t{result["description"]}\t{exception}')
if results and self.slither.triage_mode:
while True:
indexes = input(
f'Results to hide during next runs: "0,1,...,{len(results)}" or "All" (enter to not hide results):\n'
)
if indexes == "All":
self.slither.save_results_to_hide(results)
return []
if indexes == "":
return results
if indexes.startswith("["):
indexes = indexes[1:]
if indexes.endswith("]"):
indexes = indexes[:-1]
try:
indexes_converted = [int(i) for i in indexes.split(",")]
self.slither.save_results_to_hide(
[r for (idx, r) in enumerate(results) if idx in indexes_converted]
)
return [r for (idx, r) in enumerate(results) if idx not in indexes_converted]
except ValueError:
self.logger.error(yellow("Malformed input. Example of valid input: 0,1,2,3"))
results = sorted(results, key=lambda x: x["id"])
return results
@property
def color(self) -> Callable[[str], str]:
return classification_colors[self.IMPACT]
def generate_result(
self,
info: Union[str, List[Union[str, SupportedOutput]]],
additional_fields: Optional[Dict] = None,
) -> Output:
output = Output(
info,
additional_fields,
standard_format=self.STANDARD_JSON,
markdown_root=self.slither.markdown_root,
)
output.data["check"] = self.ARGUMENT
output.data["impact"] = classification_txt[self.IMPACT]
output.data["confidence"] = classification_txt[self.CONFIDENCE]
return output
@staticmethod
def _format(_compilation_unit: SlitherCompilationUnit, _result: Dict) -> None:
"""Implement format"""
return
def _log_result(self, results: List[Dict]) -> None:
info = "\n"
for idx, result in enumerate(results):
if self.slither.triage_mode:
info += f"{idx}: "
info += result["description"]
info += f"Reference: {self.WIKI}"
self._log(info)
| 10,489 | Python | .py | 235 | 33.080851 | 121 | 0.599059 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,140 | state.py | NioTheFirst_ScType/slither/detectors/shadowing/state.py | """
Module detecting shadowing of state variables
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.core.declarations import Contract
from .common import is_upgradable_gap_variable
def detect_shadowing(contract: Contract):
ret = []
variables_fathers = []
for father in contract.inheritance:
if any(f.is_implemented for f in father.functions + father.modifiers):
variables_fathers += father.state_variables_declared
for var in contract.state_variables_declared:
# Ignore __gap variables for updatable contracts
if is_upgradable_gap_variable(contract, var):
continue
shadow = [v for v in variables_fathers if v.name == var.name]
if shadow:
ret.append([var] + shadow)
return ret
class StateShadowing(AbstractDetector):
"""
Shadowing of state variable
"""
ARGUMENT = "shadowing-state"
HELP = "State variables shadowing"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing"
WIKI_TITLE = "State variable shadowing"
WIKI_DESCRIPTION = "Detection of state variables shadowed."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract BaseContract{
address owner;
modifier isOwner(){
require(owner == msg.sender);
_;
}
}
contract DerivedContract is BaseContract{
address owner;
constructor(){
owner = msg.sender;
}
function withdraw() isOwner() external{
msg.sender.transfer(this.balance);
}
}
```
`owner` of `BaseContract` is never assigned and the modifier `isOwner` does not work."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Remove the state variable shadowing."
def _detect(self):
"""Detect shadowing
Recursively visit the calls
Returns:
list: {'vuln', 'filename,'contract','func', 'shadow'}
"""
results = []
for c in self.contracts:
shadowing = detect_shadowing(c)
if shadowing:
for all_variables in shadowing:
shadow = all_variables[0]
variables = all_variables[1:]
info = [shadow, " shadows:\n"]
for var in variables:
info += ["\t- ", var, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 2,622 | Python | .py | 73 | 28.150685 | 99 | 0.645034 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,141 | local.py | NioTheFirst_ScType/slither/detectors/shadowing/local.py | """
Module detecting local variable shadowing
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
class LocalShadowing(AbstractDetector):
"""
Local variable shadowing
"""
ARGUMENT = "shadowing-local"
HELP = "Local variables shadowing"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#local-variable-shadowing"
WIKI_TITLE = "Local variable shadowing"
WIKI_DESCRIPTION = "Detection of shadowing using local variables."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
pragma solidity ^0.4.24;
contract Bug {
uint owner;
function sensitive_function(address owner) public {
// ...
require(owner == msg.sender);
}
function alternate_sensitive_function() public {
address owner = msg.sender;
// ...
require(owner == msg.sender);
}
}
```
`sensitive_function.owner` shadows `Bug.owner`. As a result, the use of `owner` in `sensitive_function` might be incorrect."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Rename the local variables that shadow another component."
OVERSHADOWED_FUNCTION = "function"
OVERSHADOWED_MODIFIER = "modifier"
OVERSHADOWED_STATE_VARIABLE = "state variable"
OVERSHADOWED_EVENT = "event"
def detect_shadowing_definitions(self, contract): # pylint: disable=too-many-branches
"""Detects if functions, access modifiers, events, state variables, and local variables are named after
reserved keywords. Any such definitions are returned in a list.
Returns:
list of tuple: (type, contract name, definition)"""
result = []
# Loop through all functions + modifiers in this contract.
for function in contract.functions + contract.modifiers:
# We should only look for functions declared directly in this contract (not in a base contract).
if function.contract_declarer != contract:
continue
# This function was declared in this contract, we check what its local variables might shadow.
for variable in function.variables:
overshadowed = []
for scope_contract in [contract] + contract.inheritance:
# Check functions
for scope_function in scope_contract.functions_declared:
if variable.name == scope_function.name:
overshadowed.append((self.OVERSHADOWED_FUNCTION, scope_function))
# Check modifiers
for scope_modifier in scope_contract.modifiers_declared:
if variable.name == scope_modifier.name:
overshadowed.append((self.OVERSHADOWED_MODIFIER, scope_modifier))
# Check events
for scope_event in scope_contract.events_declared:
if variable.name == scope_event.name:
overshadowed.append((self.OVERSHADOWED_EVENT, scope_event))
# Check state variables
for scope_state_variable in scope_contract.state_variables_declared:
if variable.name == scope_state_variable.name:
overshadowed.append(
(self.OVERSHADOWED_STATE_VARIABLE, scope_state_variable)
)
# If we have found any overshadowed objects, we'll want to add it to our result list.
if overshadowed:
result.append((variable, overshadowed))
return result
def _detect(self):
"""Detect shadowing local variables
Recursively visit the calls
Returns:
list: {'vuln', 'filename,'contract','func', 'shadow'}
"""
results = []
for contract in self.contracts:
shadows = self.detect_shadowing_definitions(contract)
if shadows:
for shadow in shadows:
local_variable = shadow[0]
overshadowed = shadow[1]
info = [local_variable, " shadows:\n"]
for overshadowed_entry in overshadowed:
info += [
"\t- ",
overshadowed_entry[1],
f" ({overshadowed_entry[0]})\n",
]
# Generate relevant JSON data for this shadowing definition.
res = self.generate_result(info)
results.append(res)
return results
| 4,794 | Python | .py | 100 | 35.05 | 126 | 0.600985 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,142 | builtin_symbols.py | NioTheFirst_ScType/slither/detectors/shadowing/builtin_symbols.py | """
Module detecting reserved keyword shadowing
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
class BuiltinSymbolShadowing(AbstractDetector):
"""
Built-in symbol shadowing
"""
ARGUMENT = "shadowing-builtin"
HELP = "Built-in symbol shadowing"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#builtin-symbol-shadowing"
WIKI_TITLE = "Builtin Symbol Shadowing"
WIKI_DESCRIPTION = "Detection of shadowing built-in symbols using local variables, state variables, functions, modifiers, or events."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
pragma solidity ^0.4.24;
contract Bug {
uint now; // Overshadows current time stamp.
function assert(bool condition) public {
// Overshadows built-in symbol for providing assertions.
}
function get_next_expiration(uint earlier_time) private returns (uint) {
return now + 259200; // References overshadowed timestamp.
}
}
```
`now` is defined as a state variable, and shadows with the built-in symbol `now`. The function `assert` overshadows the built-in `assert` function. Any use of either of these built-in symbols may lead to unexpected results."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Rename the local variables, state variables, functions, modifiers, and events that shadow a builtin symbol."
SHADOWING_FUNCTION = "function"
SHADOWING_MODIFIER = "modifier"
SHADOWING_LOCAL_VARIABLE = "local variable"
SHADOWING_STATE_VARIABLE = "state variable"
SHADOWING_EVENT = "event"
# Reserved keywords reference: https://solidity.readthedocs.io/en/v0.5.2/units-and-global-variables.html
BUILTIN_SYMBOLS = [
"assert",
"require",
"revert",
"block",
"blockhash",
"gasleft",
"msg",
"now",
"tx",
"this",
"addmod",
"mulmod",
"keccak256",
"sha256",
"sha3",
"ripemd160",
"ecrecover",
"selfdestruct",
"suicide",
"abi",
"fallback",
"receive",
]
# https://solidity.readthedocs.io/en/v0.5.2/miscellaneous.html#reserved-keywords
RESERVED_KEYWORDS = [
"abstract",
"after",
"alias",
"apply",
"auto",
"case",
"catch",
"copyof",
"default",
"define",
"final",
"immutable",
"implements",
"in",
"inline",
"let",
"macro",
"match",
"mutable",
"null",
"of",
"override",
"partial",
"promise",
"reference",
"relocatable",
"sealed",
"sizeof",
"static",
"supports",
"switch",
"try",
"type",
"typedef",
"typeof",
"unchecked",
]
def is_builtin_symbol(self, word):
"""Detects if a given word is a built-in symbol.
Returns:
boolean: True if the given word represents a built-in symbol."""
return word in self.BUILTIN_SYMBOLS or word in self.RESERVED_KEYWORDS
def detect_builtin_shadowing_locals(self, function_or_modifier):
"""Detects if local variables in a given function/modifier are named after built-in symbols.
Any such items are returned in a list.
Returns:
list of tuple: (type, definition, local variable parent)"""
results = []
for local in function_or_modifier.variables:
if self.is_builtin_symbol(local.name):
results.append((self.SHADOWING_LOCAL_VARIABLE, local))
return results
def detect_builtin_shadowing_definitions(self, contract):
"""Detects if functions, access modifiers, events, state variables, or local variables are named after built-in
symbols. Any such definitions are returned in a list.
Returns:
list of tuple: (type, definition, [local variable parent])"""
result = []
# Loop through all functions, modifiers, variables (state and local) to detect any built-in symbol keywords.
for function in contract.functions_declared:
if self.is_builtin_symbol(function.name):
if function.is_fallback or function.is_receive:
continue
result.append((self.SHADOWING_FUNCTION, function))
result += self.detect_builtin_shadowing_locals(function)
for modifier in contract.modifiers_declared:
if self.is_builtin_symbol(modifier.name):
result.append((self.SHADOWING_MODIFIER, modifier))
result += self.detect_builtin_shadowing_locals(modifier)
for variable in contract.state_variables_declared:
if self.is_builtin_symbol(variable.name):
result.append((self.SHADOWING_STATE_VARIABLE, variable))
for event in contract.events_declared:
if self.is_builtin_symbol(event.name):
result.append((self.SHADOWING_EVENT, event))
return result
def _detect(self):
"""Detect shadowing of built-in symbols
Recursively visit the calls
Returns:
list: {'vuln', 'filename,'contract','func', 'shadow'}
"""
results = []
for contract in self.contracts:
shadows = self.detect_builtin_shadowing_definitions(contract)
if shadows:
for shadow in shadows:
# Obtain components
shadow_type = shadow[0]
shadow_object = shadow[1]
info = [
shadow_object,
f' ({shadow_type}) shadows built-in symbol"\n',
]
res = self.generate_result(info)
results.append(res)
return results
| 6,080 | Python | .py | 161 | 28.440994 | 226 | 0.611857 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,143 | abstract.py | NioTheFirst_ScType/slither/detectors/shadowing/abstract.py | """
Module detecting shadowing variables on abstract contract
Recursively check the called functions
"""
from typing import List
from slither.core.declarations import Contract
from slither.core.variables.state_variable import StateVariable
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.utils.output import Output, AllSupportedOutput
from .common import is_upgradable_gap_variable
def detect_shadowing(contract: Contract) -> List[List[StateVariable]]:
ret: List[List[StateVariable]] = []
variables_fathers = []
for father in contract.inheritance:
if all(not f.is_implemented for f in father.functions + list(father.modifiers)):
variables_fathers += father.state_variables_declared
var: StateVariable
for var in contract.state_variables_declared:
if is_upgradable_gap_variable(contract, var):
continue
shadow: List[StateVariable] = [v for v in variables_fathers if v.name == var.name]
if shadow:
ret.append([var] + shadow)
return ret
class ShadowingAbstractDetection(AbstractDetector):
"""
Shadowing detection
"""
ARGUMENT = "shadowing-abstract"
HELP = "State variables shadowing from abstract contracts"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing-from-abstract-contracts"
WIKI_TITLE = "State variable shadowing from abstract contracts"
WIKI_DESCRIPTION = "Detection of state variables shadowed from abstract contracts."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract BaseContract{
address owner;
}
contract DerivedContract is BaseContract{
address owner;
}
```
`owner` of `BaseContract` is shadowed in `DerivedContract`."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Remove the state variable shadowing."
def _detect(self) -> List[Output]:
"""Detect shadowing
Recursively visit the calls
Returns:
list: {'vuln', 'filename,'contract','func', 'shadow'}
"""
results: List[Output] = []
for contract in self.contracts:
shadowing = detect_shadowing(contract)
if shadowing:
for all_variables in shadowing:
shadow = all_variables[0]
variables = all_variables[1:]
info: List[AllSupportedOutput] = [shadow, " shadows:\n"]
for var in variables:
info += ["\t- ", var, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 2,795 | Python | .py | 67 | 34.283582 | 123 | 0.685493 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,144 | common.py | NioTheFirst_ScType/slither/detectors/shadowing/common.py | from slither.core.declarations import Contract
from slither.core.variables.state_variable import StateVariable
from slither.core.solidity_types import ArrayType, ElementaryType
def is_upgradable_gap_variable(contract: Contract, variable: StateVariable) -> bool:
"""Helper function that returns true if 'variable' is a gap variable used
for upgradable contracts. More specifically, the function returns true if:
- variable is named "__gap"
- it is a uint256 array declared at the end of the contract
- it has private visibility"""
# Return early on if the variable name is != gap to avoid iterating over all the state variables
if variable.name != "__gap":
return False
declared_variable_ordered = [
v for v in contract.state_variables_ordered if v in contract.state_variables_declared
]
if not declared_variable_ordered:
return False
variable_type = variable.type
return (
declared_variable_ordered[-1] is variable
and isinstance(variable_type, ArrayType)
and variable_type.type == ElementaryType("uint256")
and variable.visibility == "private"
)
| 1,164 | Python | .py | 24 | 42.625 | 100 | 0.730159 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,145 | incorrect_erc721_interface.py | NioTheFirst_ScType/slither/detectors/erc/incorrect_erc721_interface.py | """
Detect incorrect erc721 interface.
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
class IncorrectERC721InterfaceDetection(AbstractDetector):
"""
Incorrect ERC721 Interface
"""
ARGUMENT = "erc721-interface"
HELP = "Incorrect ERC721 interfaces"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.HIGH
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc721-interface"
)
WIKI_TITLE = "Incorrect erc721 interface"
WIKI_DESCRIPTION = "Incorrect return values for `ERC721` functions. A contract compiled with solidity > 0.4.22 interacting with these functions will fail to execute them, as the return value is missing."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Token{
function ownerOf(uint256 _tokenId) external view returns (bool);
//...
}
```
`Token.ownerOf` does not return an address like `ERC721` expects. Bob deploys the token. Alice creates a contract that interacts with it but assumes a correct `ERC721` interface implementation. Alice's contract is unable to interact with Bob's contract."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = (
"Set the appropriate return values and vtypes for the defined `ERC721` functions."
)
@staticmethod
def incorrect_erc721_interface(signature):
(name, parameters, returnVars) = signature
# ERC721
if name == "balanceOf" and parameters == ["address"] and returnVars != ["uint256"]:
return True
if name == "ownerOf" and parameters == ["uint256"] and returnVars != ["address"]:
return True
if (
name == "safeTransferFrom"
and parameters == ["address", "address", "uint256", "bytes"]
and returnVars != []
):
return True
if (
name == "safeTransferFrom"
and parameters == ["address", "address", "uint256"]
and returnVars != []
):
return True
if (
name == "transferFrom"
and parameters == ["address", "address", "uint256"]
and returnVars != []
):
return True
if name == "approve" and parameters == ["address", "uint256"] and returnVars != []:
return True
if name == "setApprovalForAll" and parameters == ["address", "bool"] and returnVars != []:
return True
if name == "getApproved" and parameters == ["uint256"] and returnVars != ["address"]:
return True
if (
name == "isApprovedForAll"
and parameters == ["address", "address"]
and returnVars != ["bool"]
):
return True
# ERC165 (dependency)
if name == "supportsInterface" and parameters == ["bytes4"] and returnVars != ["bool"]:
return True
return False
@staticmethod
def detect_incorrect_erc721_interface(contract):
"""Detect incorrect ERC721 interface
Returns:
list(str) : list of incorrect function signatures
"""
# Verify this is an ERC721 contract.
if not contract.is_possible_erc721() or not contract.is_possible_erc20():
return []
funcs = contract.functions
functions = [
f
for f in funcs
if IncorrectERC721InterfaceDetection.incorrect_erc721_interface(f.signature)
]
return functions
def _detect(self):
"""Detect incorrect erc721 interface
Returns:
dict: [contract name] = set(str) events
"""
results = []
for c in self.compilation_unit.contracts_derived:
functions = IncorrectERC721InterfaceDetection.detect_incorrect_erc721_interface(c)
if functions:
for function in functions:
info = [
c,
" has incorrect ERC721 function interface:",
function,
"\n",
]
res = self.generate_result(info)
results.append(res)
return results
| 4,317 | Python | .py | 107 | 30.53271 | 256 | 0.60272 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,146 | unindexed_event_parameters.py | NioTheFirst_ScType/slither/detectors/erc/unindexed_event_parameters.py | """
Detect mistakenly un-indexed ERC20 event parameters
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
class UnindexedERC20EventParameters(AbstractDetector):
"""
Un-indexed ERC20 event parameters
"""
ARGUMENT = "erc20-indexed"
HELP = "Un-indexed ERC20 event parameters"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-erc20-event-parameters"
WIKI_TITLE = "Unindexed ERC20 event parameters"
WIKI_DESCRIPTION = "Detects whether events defined by the `ERC20` specification that should have some parameters as `indexed` are missing the `indexed` keyword."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract ERC20Bad {
// ...
event Transfer(address from, address to, uint value);
event Approval(address owner, address spender, uint value);
// ...
}
```
`Transfer` and `Approval` events should have the 'indexed' keyword on their two first parameters, as defined by the `ERC20` specification.
Failure to include these keywords will exclude the parameter data in the transaction/block's bloom filter, so external tooling searching for these parameters may overlook them and fail to index logs from this token contract."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Add the `indexed` keyword to event parameters that should include it, according to the `ERC20` specification."
STANDARD_JSON = False
@staticmethod
def detect_erc20_unindexed_event_params(contract):
"""
Detect un-indexed ERC20 event parameters in a given contract.
:param contract: The contract to check ERC20 events for un-indexed parameters in.
:return: A list of tuple(event, parameter) of parameters which should be indexed.
"""
# Create our result array
results = []
# If this contract isn't an ERC20 token, we return our empty results.
if not contract.is_erc20():
return results
# Loop through all events to look for poor form.
for event in contract.events_declared:
# If this is transfer/approval events, expect the first two parameters to be indexed.
if event.full_name in [
"Transfer(address,address,uint256)",
"Approval(address,address,uint256)",
]:
if not event.elems[0].indexed:
results.append((event, event.elems[0]))
if not event.elems[1].indexed:
results.append((event, event.elems[1]))
# Return the results.
return results
def _detect(self):
"""
Detect un-indexed ERC20 event parameters in all contracts.
"""
results = []
for c in self.contracts:
unindexed_params = self.detect_erc20_unindexed_event_params(c)
if unindexed_params:
# Add each problematic event definition to our result list
for (event, parameter) in unindexed_params:
info = [
"ERC20 event ",
event,
f"does not index parameter {parameter}\n",
]
# Add the events to the JSON (note: we do not add the params/vars as they have no source mapping).
res = self.generate_result(info)
res.add(event, {"parameter_name": parameter.name})
results.append(res)
return results
| 3,669 | Python | .py | 75 | 39.133333 | 227 | 0.653706 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,147 | incorrect_erc20_interface.py | NioTheFirst_ScType/slither/detectors/erc/erc20/incorrect_erc20_interface.py | """
Detect incorrect erc20 interface.
Some contracts do not return a bool on transfer/transferFrom/approve, which may lead to preventing the contract to be used with contracts compiled with recent solc (>0.4.22)
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
class IncorrectERC20InterfaceDetection(AbstractDetector):
"""
Incorrect ERC20 Interface
"""
ARGUMENT = "erc20-interface"
HELP = "Incorrect ERC20 interfaces"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc20-interface"
WIKI_TITLE = "Incorrect erc20 interface"
WIKI_DESCRIPTION = "Incorrect return values for `ERC20` functions. A contract compiled with Solidity > 0.4.22 interacting with these functions will fail to execute them, as the return value is missing."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Token{
function transfer(address to, uint value) external;
//...
}
```
`Token.transfer` does not return a boolean. Bob deploys the token. Alice creates a contract that interacts with it but assumes a correct `ERC20` interface implementation. Alice's contract is unable to interact with Bob's contract."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = (
"Set the appropriate return values and types for the defined `ERC20` functions."
)
@staticmethod
def incorrect_erc20_interface(signature):
(name, parameters, returnVars) = signature
if name == "transfer" and parameters == ["address", "uint256"] and returnVars != ["bool"]:
return True
if (
name == "transferFrom"
and parameters == ["address", "address", "uint256"]
and returnVars != ["bool"]
):
return True
if name == "approve" and parameters == ["address", "uint256"] and returnVars != ["bool"]:
return True
if (
name == "allowance"
and parameters == ["address", "address"]
and returnVars != ["uint256"]
):
return True
if name == "balanceOf" and parameters == ["address"] and returnVars != ["uint256"]:
return True
if name == "totalSupply" and parameters == [] and returnVars != ["uint256"]:
return True
return False
@staticmethod
def detect_incorrect_erc20_interface(contract):
"""Detect incorrect ERC20 interface
Returns:
list(str) : list of incorrect function signatures
"""
# Verify this is an ERC20 contract.
if not contract.is_possible_erc20():
return []
# If this contract implements a function from ERC721, we can assume it is an ERC721 token. These tokens
# offer functions which are similar to ERC20, but are not compatible.
if contract.is_possible_erc721():
return []
funcs = contract.functions
functions = [
f
for f in funcs
if IncorrectERC20InterfaceDetection.incorrect_erc20_interface(f.signature)
]
return functions
def _detect(self):
"""Detect incorrect erc20 interface
Returns:
dict: [contract name] = set(str) events
"""
results = []
for c in self.compilation_unit.contracts_derived:
functions = IncorrectERC20InterfaceDetection.detect_incorrect_erc20_interface(c)
if functions:
for function in functions:
info = [
c,
" has incorrect ERC20 function interface:",
function,
"\n",
]
json = self.generate_result(info)
results.append(json)
return results
| 3,985 | Python | .py | 92 | 33.73913 | 233 | 0.6303 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,148 | arbitrary_send_erc20.py | NioTheFirst_ScType/slither/detectors/erc/erc20/arbitrary_send_erc20.py | from typing import List
from slither.core.cfg.node import Node
from slither.core.declarations.solidity_variables import SolidityVariable
from slither.slithir.operations import HighLevelCall, LibraryCall
from slither.core.declarations import Contract, Function, SolidityVariableComposed
from slither.analyses.data_dependency.data_dependency import is_dependent
from slither.core.compilation_unit import SlitherCompilationUnit
class ArbitrarySendErc20:
"""Detects instances where ERC20 can be sent from an arbitrary from address."""
def __init__(self, compilation_unit: SlitherCompilationUnit):
self._compilation_unit = compilation_unit
self._no_permit_results: List[Node] = []
self._permit_results: List[Node] = []
@property
def compilation_unit(self) -> SlitherCompilationUnit:
return self._compilation_unit
@property
def no_permit_results(self) -> List[Node]:
return self._no_permit_results
@property
def permit_results(self) -> List[Node]:
return self._permit_results
def _detect_arbitrary_from(self, contract: Contract):
for f in contract.functions:
all_high_level_calls = [
f_called[1].solidity_signature
for f_called in f.high_level_calls
if isinstance(f_called[1], Function)
]
all_library_calls = [f_called[1].solidity_signature for f_called in f.library_calls]
if (
"transferFrom(address,address,uint256)" in all_high_level_calls
or "safeTransferFrom(address,address,address,uint256)" in all_library_calls
):
if (
"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"
in all_high_level_calls
):
ArbitrarySendErc20._arbitrary_from(f.nodes, self._permit_results)
else:
ArbitrarySendErc20._arbitrary_from(f.nodes, self._no_permit_results)
@staticmethod
def _arbitrary_from(nodes: List[Node], results: List[Node]):
"""Finds instances of (safe)transferFrom that do not use msg.sender or address(this) as from parameter."""
for node in nodes:
for ir in node.irs:
if (
isinstance(ir, HighLevelCall)
and isinstance(ir.function, Function)
and ir.function.solidity_signature == "transferFrom(address,address,uint256)"
and not (
is_dependent(
ir.arguments[0],
SolidityVariableComposed("msg.sender"),
node.function.contract,
)
or is_dependent(
ir.arguments[0],
SolidityVariable("this"),
node.function.contract,
)
)
):
results.append(ir.node)
elif (
isinstance(ir, LibraryCall)
and ir.function.solidity_signature
== "safeTransferFrom(address,address,address,uint256)"
and not (
is_dependent(
ir.arguments[1],
SolidityVariableComposed("msg.sender"),
node.function.contract,
)
or is_dependent(
ir.arguments[1],
SolidityVariable("this"),
node.function.contract,
)
)
):
results.append(ir.node)
def detect(self):
"""Detect transfers that use arbitrary `from` parameter."""
for c in self.compilation_unit.contracts_derived:
self._detect_arbitrary_from(c)
| 4,022 | Python | .py | 86 | 31.011628 | 114 | 0.550293 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,149 | arbitrary_send_erc20_permit.py | NioTheFirst_ScType/slither/detectors/erc/erc20/arbitrary_send_erc20_permit.py | from typing import List
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.utils.output import Output
from .arbitrary_send_erc20 import ArbitrarySendErc20
class ArbitrarySendErc20Permit(AbstractDetector):
"""
Detect when `msg.sender` is not used as `from` in transferFrom along with the use of permit.
"""
ARGUMENT = "arbitrary-send-erc20-permit"
HELP = "transferFrom uses arbitrary from with permit"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#arbitrary-from-in-transferfrom-used-with-permit"
WIKI_TITLE = "Arbitrary `from` in transferFrom used with permit"
WIKI_DESCRIPTION = (
"Detect when `msg.sender` is not used as `from` in transferFrom and permit is used."
)
WIKI_EXPLOIT_SCENARIO = """
```solidity
function bad(address from, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s, address to) public {
erc20.permit(from, address(this), value, deadline, v, r, s);
erc20.transferFrom(from, to, value);
}
```
If an ERC20 token does not implement permit and has a fallback function e.g. WETH, transferFrom allows an attacker to transfer all tokens approved for this contract."""
WIKI_RECOMMENDATION = """
Ensure that the underlying ERC20 token correctly implements a permit function.
"""
def _detect(self) -> List[Output]:
""""""
results: List[Output] = []
arbitrary_sends = ArbitrarySendErc20(self.compilation_unit)
arbitrary_sends.detect()
for node in arbitrary_sends.permit_results:
func = node.function
info = [
func,
" uses arbitrary from in transferFrom in combination with permit: ",
node,
"\n",
]
res = self.generate_result(info)
results.append(res)
return results
| 2,012 | Python | .py | 44 | 38.613636 | 168 | 0.690658 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,150 | arbitrary_send_erc20_no_permit.py | NioTheFirst_ScType/slither/detectors/erc/erc20/arbitrary_send_erc20_no_permit.py | from typing import List
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.utils.output import Output
from .arbitrary_send_erc20 import ArbitrarySendErc20
class ArbitrarySendErc20NoPermit(AbstractDetector):
"""
Detect when `msg.sender` is not used as `from` in transferFrom
"""
ARGUMENT = "arbitrary-send-erc20"
HELP = "transferFrom uses arbitrary `from`"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#arbitrary-from-in-transferfrom"
WIKI_TITLE = "Arbitrary `from` in transferFrom"
WIKI_DESCRIPTION = "Detect when `msg.sender` is not used as `from` in transferFrom."
WIKI_EXPLOIT_SCENARIO = """
```solidity
function a(address from, address to, uint256 amount) public {
erc20.transferFrom(from, to, am);
}
```
Alice approves this contract to spend her ERC20 tokens. Bob can call `a` and specify Alice's address as the `from` parameter in `transferFrom`, allowing him to transfer Alice's tokens to himself."""
WIKI_RECOMMENDATION = """
Use `msg.sender` as `from` in transferFrom.
"""
def _detect(self) -> List[Output]:
""""""
results: List[Output] = []
arbitrary_sends = ArbitrarySendErc20(self.compilation_unit)
arbitrary_sends.detect()
for node in arbitrary_sends.no_permit_results:
func = node.function
info = [func, " uses arbitrary from in transferFrom: ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 1,666 | Python | .py | 36 | 40.472222 | 198 | 0.710056 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,151 | reentrancy_benign.py | NioTheFirst_ScType/slither/detectors/reentrancy/reentrancy_benign.py | """"
Re-entrancy detection
Based on heuristics, it may lead to FP and FN
Iterate over all the nodes of the graph until reaching a fixpoint
"""
from collections import namedtuple, defaultdict
from typing import List
from slither.detectors.abstract_detector import DetectorClassification
from .reentrancy import Reentrancy, to_hashable
FindingKey = namedtuple("FindingKey", ["function", "calls", "send_eth"])
FindingValue = namedtuple("FindingValue", ["variable", "node", "nodes"])
class ReentrancyBenign(Reentrancy):
ARGUMENT = "reentrancy-benign"
HELP = "Benign reentrancy vulnerabilities"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-2"
)
WIKI_TITLE = "Reentrancy vulnerabilities"
# region wiki_description
WIKI_DESCRIPTION = """
Detection of the [reentrancy bug](https://github.com/trailofbits/not-so-smart-contracts/tree/master/reentrancy).
Only report reentrancy that acts as a double call (see `reentrancy-eth`, `reentrancy-no-eth`)."""
# endregion wiki_description
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
function callme(){
if( ! (msg.sender.call()() ) ){
throw;
}
counter += 1
}
```
`callme` contains a reentrancy. The reentrancy is benign because it's exploitation would have the same effect as two consecutive calls."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Apply the [`check-effects-interactions` pattern](http://solidity.readthedocs.io/en/v0.4.21/security-considerations.html#re-entrancy)."
STANDARD_JSON = False
def find_reentrancies(self):
result = defaultdict(set)
for contract in self.contracts:
for f in contract.functions_and_modifiers_declared:
for node in f.nodes:
# dead code
if self.KEY not in node.context:
continue
if node.context[self.KEY].calls:
if not any(n != node for n in node.context[self.KEY].calls):
continue
read_then_written = []
for c in node.context[self.KEY].calls:
read_then_written += [
v
for v in node.context[self.KEY].written
if v in node.context[self.KEY].reads_prior_calls[c]
]
not_read_then_written = {
FindingValue(
v,
node,
tuple(sorted(nodes, key=lambda x: x.node_id)),
)
for (v, nodes) in node.context[self.KEY].written.items()
if v not in read_then_written
}
if not_read_then_written:
# calls are ordered
finding_key = FindingKey(
function=node.function,
calls=to_hashable(node.context[self.KEY].calls),
send_eth=to_hashable(node.context[self.KEY].send_eth),
)
result[finding_key] |= not_read_then_written
return result
def _detect(self): # pylint: disable=too-many-branches
""""""
super()._detect()
reentrancies = self.find_reentrancies()
results = []
result_sorted = sorted(list(reentrancies.items()), key=lambda x: x[0].function.name)
varsWritten: List[FindingValue]
for (func, calls, send_eth), varsWritten in result_sorted:
calls = sorted(list(set(calls)), key=lambda x: x[0].node_id)
send_eth = sorted(list(set(send_eth)), key=lambda x: x[0].node_id)
varsWritten = sorted(varsWritten, key=lambda x: (x.variable.name, x.node.node_id))
info = ["Reentrancy in ", func, ":\n"]
info += ["\tExternal calls:\n"]
for (call_info, calls_list) in calls:
info += ["\t- ", call_info, "\n"]
for call_list_info in calls_list:
if call_list_info != call_info:
info += ["\t\t- ", call_list_info, "\n"]
if calls != send_eth and send_eth:
info += ["\tExternal calls sending eth:\n"]
for (call_info, calls_list) in send_eth:
info += ["\t- ", call_info, "\n"]
for call_list_info in calls_list:
if call_list_info != call_info:
info += ["\t\t- ", call_list_info, "\n"]
info += ["\tState variables written after the call(s):\n"]
for finding_value in varsWritten:
info += ["\t- ", finding_value.node, "\n"]
for other_node in finding_value.nodes:
if other_node != finding_value.node:
info += ["\t\t- ", other_node, "\n"]
# Create our JSON result
res = self.generate_result(info)
# Add the function with the re-entrancy first
res.add(func)
# Add all underlying calls in the function which are potentially problematic.
for (call_info, calls_list) in calls:
res.add(call_info, {"underlying_type": "external_calls"})
for call_list_info in calls_list:
if call_list_info != call_info:
res.add(
call_list_info,
{"underlying_type": "external_calls_sending_eth"},
)
#
# If the calls are not the same ones that send eth, add the eth sending nodes.
if calls != send_eth:
for (call_info, calls_list) in calls:
res.add(call_info, {"underlying_type": "external_calls_sending_eth"})
for call_list_info in calls_list:
if call_list_info != call_info:
res.add(
call_list_info,
{"underlying_type": "external_calls_sending_eth"},
)
# Add all variables written via nodes which write them.
for finding_value in varsWritten:
res.add(
finding_value.node,
{
"underlying_type": "variables_written",
"variable_name": finding_value.variable.name,
},
)
for other_node in finding_value.nodes:
if other_node != finding_value.node:
res.add(
other_node,
{
"underlying_type": "variables_written",
"variable_name": finding_value.variable.name,
},
)
# Append our result
results.append(res)
return results
| 7,452 | Python | .py | 151 | 32.655629 | 161 | 0.51196 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,152 | token.py | NioTheFirst_ScType/slither/detectors/reentrancy/token.py | from collections import defaultdict
from typing import Dict, List
from slither.analyses.data_dependency.data_dependency import is_dependent
from slither.core.cfg.node import Node
from slither.core.declarations import Function, Contract, SolidityVariableComposed
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import LowLevelCall, HighLevelCall
def _detect_token_reentrant(contract: Contract) -> Dict[Function, List[Node]]:
ret: Dict[Function, List[Node]] = defaultdict(list)
for function in contract.functions_entry_points:
if function.full_name in [
"transfer(address,uint256)",
"transferFrom(address,address,uint256)",
]:
for ir in function.all_slithir_operations():
if isinstance(ir, (LowLevelCall, HighLevelCall)):
if not function.parameters:
continue
if any(
(
is_dependent(ir.destination, parameter, function)
for parameter in function.parameters
)
):
ret[function].append(ir.node)
if is_dependent(
ir.destination, SolidityVariableComposed("msg.sender"), function
):
ret[function].append(ir.node)
if is_dependent(
ir.destination, SolidityVariableComposed("tx.origin"), function
):
ret[function].append(ir.node)
return ret
class TokenReentrancy(AbstractDetector):
ARGUMENT = "token-reentrancy"
HELP = "Tokens that are reentrancies unsafe"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#token-reentrant"
WIKI_TITLE = "Token reentrant"
# region wiki_description
WIKI_DESCRIPTION = """
Tokens that allow arbitrary external call on transfer/transfer (such as ERC223/ERC777) can be exploited on third
party through a reentrancy."""
# endregion wiki_description
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract MyToken{
function transferFrom(address from, address to, uint) public{
// do some stuff
from.call("..")
// do some stuff
}
}
contract MyDefi{
function convert(ERC token) public{
// do some stuff
token.transferFrom(..)
//
}
}
```
`MyDefi` has a reentrancy, but its developers did not think transferFrom could be reentrancy.
`MyToken` is used in MyDefi. As a result an attacker can exploit the reentrancy."""
# endregion wiki_exploit_scenario
# region wiki_recommendation
WIKI_RECOMMENDATION = """Avoid to have external calls in `transfer`/`transferFrom`.
If you do, ensure your users are aware of the potential issues."""
# endregion wiki_recommendation
def _detect(self):
results = []
for contract in self.compilation_unit.contracts_derived:
vulns = _detect_token_reentrant(contract)
for function, nodes in vulns.items():
info = [function, " is an reentrancy unsafe token function:\n"]
for node in nodes:
info += ["\t-", node, "\n"]
json = self.generate_result(info)
results.append(json)
return results
| 3,589 | Python | .py | 82 | 33.426829 | 116 | 0.63298 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,153 | reentrancy_events.py | NioTheFirst_ScType/slither/detectors/reentrancy/reentrancy_events.py | """"
Re-entrancy detection
Based on heuristics, it may lead to FP and FN
Iterate over all the nodes of the graph until reaching a fixpoint
"""
from collections import namedtuple, defaultdict
from slither.detectors.abstract_detector import DetectorClassification
from .reentrancy import Reentrancy, to_hashable
FindingKey = namedtuple("FindingKey", ["function", "calls", "send_eth"])
FindingValue = namedtuple("FindingValue", ["variable", "node", "nodes"])
class ReentrancyEvent(Reentrancy):
ARGUMENT = "reentrancy-events"
HELP = "Reentrancy vulnerabilities leading to out-of-order Events"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-3"
)
WIKI_TITLE = "Reentrancy vulnerabilities"
# region wiki_description
WIKI_DESCRIPTION = """
Detection of the [reentrancy bug](https://github.com/trailofbits/not-so-smart-contracts/tree/master/reentrancy).
Only report reentrancies leading to out-of-order events."""
# endregion wiki_description
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
function bug(Called d){
counter += 1;
d.f();
emit Counter(counter);
}
```
If `d.()` re-enters, the `Counter` events will be shown in an incorrect order, which might lead to issues for third parties."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Apply the [`check-effects-interactions` pattern](http://solidity.readthedocs.io/en/v0.4.21/security-considerations.html#re-entrancy)."
STANDARD_JSON = False
def find_reentrancies(self):
result = defaultdict(set)
for contract in self.contracts:
for f in contract.functions_and_modifiers_declared:
if not f.is_reentrant:
continue
for node in f.nodes:
# dead code
if self.KEY not in node.context:
continue
if node.context[self.KEY].calls:
if not any(n != node for n in node.context[self.KEY].calls):
continue
# calls are ordered
finding_key = FindingKey(
function=node.function,
calls=to_hashable(node.context[self.KEY].calls),
send_eth=to_hashable(node.context[self.KEY].send_eth),
)
finding_vars = {
FindingValue(
e,
e.node,
tuple(sorted(nodes, key=lambda x: x.node_id)),
)
for (e, nodes) in node.context[self.KEY].events.items()
}
if finding_vars:
result[finding_key] |= finding_vars
return result
def _detect(self): # pylint: disable=too-many-branches
""""""
super()._detect()
reentrancies = self.find_reentrancies()
results = []
result_sorted = sorted(list(reentrancies.items()), key=lambda x: x[0][0].name)
for (func, calls, send_eth), events in result_sorted:
calls = sorted(list(set(calls)), key=lambda x: x[0].node_id)
send_eth = sorted(list(set(send_eth)), key=lambda x: x[0].node_id)
events = sorted(events, key=lambda x: (str(x.variable.name), x.node.node_id))
info = ["Reentrancy in ", func, ":\n"]
info += ["\tExternal calls:\n"]
for (call_info, calls_list) in calls:
info += ["\t- ", call_info, "\n"]
for call_list_info in calls_list:
if call_list_info != call_info:
info += ["\t\t- ", call_list_info, "\n"]
if calls != send_eth and send_eth:
info += ["\tExternal calls sending eth:\n"]
for (call_info, calls_list) in send_eth:
info += ["\t- ", call_info, "\n"]
for call_list_info in calls_list:
if call_list_info != call_info:
info += ["\t\t- ", call_list_info, "\n"]
info += ["\tEvent emitted after the call(s):\n"]
for finding_value in events:
info += ["\t- ", finding_value.node, "\n"]
for other_node in finding_value.nodes:
if other_node != finding_value.node:
info += ["\t\t- ", other_node, "\n"]
# Create our JSON result
res = self.generate_result(info)
# Add the function with the re-entrancy first
res.add(func)
# Add all underlying calls in the function which are potentially problematic.
for (call_info, calls_list) in calls:
res.add(call_info, {"underlying_type": "external_calls"})
for call_list_info in calls_list:
if call_list_info != call_info:
res.add(
call_list_info,
{"underlying_type": "external_calls_sending_eth"},
)
#
# If the calls are not the same ones that send eth, add the eth sending nodes.
if calls != send_eth:
for (call_info, calls_list) in send_eth:
res.add(call_info, {"underlying_type": "external_calls_sending_eth"})
for call_list_info in calls_list:
if call_list_info != call_info:
res.add(
call_list_info,
{"underlying_type": "external_calls_sending_eth"},
)
for finding_value in events:
res.add(finding_value.node, {"underlying_type": "event"})
for other_node in finding_value.nodes:
if other_node != finding_value.node:
res.add(other_node, {"underlying_type": "event"})
# Append our result
results.append(res)
return results
| 6,396 | Python | .py | 129 | 34.449612 | 161 | 0.534135 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,154 | reentrancy.py | NioTheFirst_ScType/slither/detectors/reentrancy/reentrancy.py | """"
Re-entrancy detection
Based on heuristics, it may lead to FP and FN
Iterate over all the nodes of the graph until reaching a fixpoint
"""
from collections import defaultdict
from typing import Set, Dict, List, Tuple, Optional
from slither.core.cfg.node import NodeType, Node
from slither.core.declarations import Function, Contract
from slither.core.expressions import UnaryOperation, UnaryOperationType
from slither.core.variables.variable import Variable
from slither.detectors.abstract_detector import AbstractDetector
from slither.slithir.operations import Call, EventCall, Operation
from slither.utils.output import Output
def union_dict(d1: Dict, d2: Dict) -> Dict:
d3 = {k: d1.get(k, set()) | d2.get(k, set()) for k in set(list(d1.keys()) + list(d2.keys()))}
return defaultdict(set, d3)
def dict_are_equal(d1: Dict, d2: Dict) -> bool:
if set(list(d1.keys())) != set(list(d2.keys())):
return False
return all(set(d1[k]) == set(d2[k]) for k in d1.keys())
def is_subset(
new_info: Dict,
old_info: Dict,
) -> bool:
for k in new_info.keys():
if k not in old_info:
return False
if not new_info[k].issubset(old_info[k]):
return False
return True
def to_hashable(d: Dict[Node, Set[Node]]) -> Tuple:
list_tuple = list(
tuple((k, tuple(sorted(values, key=lambda x: x.node_id)))) for k, values in d.items()
)
return tuple(sorted(list_tuple, key=lambda x: x[0].node_id))
class AbstractState:
def __init__(self) -> None:
# send_eth returns the list of calls sending value
# calls returns the list of calls that can callback
# read returns the variable read
# read_prior_calls returns the variable read prior a call
self._send_eth: Dict[Node, Set[Node]] = defaultdict(set)
self._calls: Dict[Node, Set[Node]] = defaultdict(set)
self._reads: Dict[Variable, Set[Node]] = defaultdict(set)
self._reads_prior_calls: Dict[Node, Set[Variable]] = defaultdict(set)
self._events: Dict[EventCall, Set[Node]] = defaultdict(set)
self._written: Dict[Variable, Set[Node]] = defaultdict(set)
@property
def send_eth(self) -> Dict[Node, Set[Node]]:
"""
Return the list of calls sending value
:return:
"""
return self._send_eth
@property
def calls(self) -> Dict[Node, Set[Node]]:
"""
Return the list of calls that can callback
:return:
"""
return self._calls
@property
def reads(self) -> Dict[Variable, Set[Node]]:
"""
Return of variables that are read
:return:
"""
return self._reads
@property
def written(self) -> Dict[Variable, Set[Node]]:
"""
Return of variables that are written
:return:
"""
return self._written
@property
def reads_prior_calls(self) -> Dict[Node, Set[Variable]]:
"""
Return the dictionary node -> variables read before any call
:return:
"""
return self._reads_prior_calls
@property
def events(self) -> Dict[EventCall, Set[Node]]:
"""
Return the list of events
:return:
"""
return self._events
def merge_fathers(
self, node: Node, skip_father: Optional[Node], detector: "Reentrancy"
) -> None:
for father in node.fathers:
if detector.KEY in father.context:
self._send_eth = union_dict(
self._send_eth,
{
key: values
for key, values in father.context[detector.KEY].send_eth.items()
if key != skip_father
},
)
self._calls = union_dict(
self._calls,
{
key: values
for key, values in father.context[detector.KEY].calls.items()
if key != skip_father
},
)
self._reads = union_dict(self._reads, father.context[detector.KEY].reads)
self._reads_prior_calls = union_dict(
self.reads_prior_calls,
father.context[detector.KEY].reads_prior_calls,
)
def analyze_node(self, node: Node, detector: "Reentrancy") -> bool:
state_vars_read: Dict[Variable, Set[Node]] = defaultdict(
set, {v: {node} for v in node.state_variables_read}
)
# All the state variables written
state_vars_written: Dict[Variable, Set[Node]] = defaultdict(
set, {v: {node} for v in node.state_variables_written}
)
slithir_operations = []
# Add the state variables written in internal calls
for internal_call in node.internal_calls:
# Filter to Function, as internal_call can be a solidity call
if isinstance(internal_call, Function):
for internal_node in internal_call.all_nodes():
for read in internal_node.state_variables_read:
state_vars_read[read].add(internal_node)
for write in internal_node.state_variables_written:
state_vars_written[write].add(internal_node)
slithir_operations += internal_call.all_slithir_operations()
contains_call = False
self._written = state_vars_written
for ir in node.irs + slithir_operations:
if detector.can_callback(ir):
self._calls[node] |= {ir.node}
self._reads_prior_calls[node] = set(
self._reads_prior_calls.get(node, set())
| set(node.context[detector.KEY].reads.keys())
| set(state_vars_read.keys())
)
contains_call = True
if detector.can_send_eth(ir):
self._send_eth[node] |= {ir.node}
if isinstance(ir, EventCall):
self._events[ir] |= {ir.node, node}
self._reads = union_dict(self._reads, state_vars_read)
return contains_call
def add(self, fathers: "AbstractState") -> None:
self._send_eth = union_dict(self._send_eth, fathers.send_eth)
self._calls = union_dict(self._calls, fathers.calls)
self._reads = union_dict(self._reads, fathers.reads)
self._reads_prior_calls = union_dict(self._reads_prior_calls, fathers.reads_prior_calls)
def does_not_bring_new_info(self, new_info: "AbstractState") -> bool:
if is_subset(new_info.calls, self.calls):
if is_subset(new_info.send_eth, self.send_eth):
if is_subset(new_info.reads, self.reads):
if dict_are_equal(new_info.reads_prior_calls, self.reads_prior_calls):
return True
return False
def _filter_if(node: Node) -> bool:
"""
Check if the node is a condtional node where
there is an external call checked
Heuristic:
- The call is a IF node
- It contains a, external call
- The condition is the negation (!)
This will work only on naive implementation
"""
expression = node.expression
return isinstance(expression, UnaryOperation) and expression.type == UnaryOperationType.BANG
class Reentrancy(AbstractDetector):
KEY = "REENTRANCY"
# can_callback and can_send_eth are static method
# allowing inherited classes to define different behaviors
# For example reentrancy_no_gas consider Send and Transfer as reentrant functions
@staticmethod
def can_callback(ir: Operation) -> bool:
"""
Detect if the node contains a call that can
be used to re-entrance
Consider as valid target:
- low level call
- high level call
"""
return isinstance(ir, Call) and ir.can_reenter()
@staticmethod
def can_send_eth(ir: Operation) -> bool:
"""
Detect if the node can send eth
"""
return isinstance(ir, Call) and ir.can_send_eth()
def _explore(self, node: Optional[Node], skip_father: Optional[Node] = None) -> None:
"""
Explore the CFG and look for re-entrancy
Heuristic: There is a re-entrancy if a state variable is written
after an external call
node.context will contains the external calls executed
It contains the calls executed in father nodes
if node.context is not empty, and variables are written, a re-entrancy is possible
"""
if node is None:
return
fathers_context = AbstractState()
fathers_context.merge_fathers(node, skip_father, self)
# Exclude path that dont bring further information
if node in self.visited_all_paths:
if self.visited_all_paths[node].does_not_bring_new_info(fathers_context):
return
else:
self.visited_all_paths[node] = AbstractState()
self.visited_all_paths[node].add(fathers_context)
node.context[self.KEY] = fathers_context
contains_call = fathers_context.analyze_node(node, self)
node.context[self.KEY] = fathers_context
sons = node.sons
if contains_call and node.type in [NodeType.IF, NodeType.IFLOOP]:
if _filter_if(node):
son = sons[0]
self._explore(son, skip_father=node)
sons = sons[1:]
else:
son = sons[1]
self._explore(son, skip_father=node)
sons = [sons[0]]
for son in sons:
self._explore(son)
def detect_reentrancy(self, contract: Contract) -> None:
for function in contract.functions_and_modifiers_declared:
if not function.is_constructor:
if function.is_implemented:
if self.KEY in function.context:
continue
self._explore(function.entry_point)
function.context[self.KEY] = True
def _detect(self) -> List[Output]:
""""""
# if a node was already visited by another path
# we will only explore it if the traversal brings
# new variables written
# This speedup the exploration through a light fixpoint
# Its particular useful on 'complex' functions with several loops and conditions
self.visited_all_paths = {} # pylint: disable=attribute-defined-outside-init
for c in self.contracts:
self.detect_reentrancy(c)
return []
| 10,740 | Python | .py | 251 | 32.430279 | 97 | 0.599463 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,155 | reentrancy_eth.py | NioTheFirst_ScType/slither/detectors/reentrancy/reentrancy_eth.py | """"
Re-entrancy detection
Based on heuristics, it may lead to FP and FN
Iterate over all the nodes of the graph until reaching a fixpoint
"""
from collections import namedtuple, defaultdict
from typing import List, Dict, Set
from slither.detectors.abstract_detector import DetectorClassification
from .reentrancy import Reentrancy, to_hashable
from ...utils.output import Output
FindingKey = namedtuple("FindingKey", ["function", "calls", "send_eth"])
FindingValue = namedtuple("FindingValue", ["variable", "node", "nodes", "cross_functions"])
class ReentrancyEth(Reentrancy):
ARGUMENT = "reentrancy-eth"
HELP = "Reentrancy vulnerabilities (theft of ethers)"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities"
)
WIKI_TITLE = "Reentrancy vulnerabilities"
# region wiki_description
WIKI_DESCRIPTION = """
Detection of the [reentrancy bug](https://github.com/trailofbits/not-so-smart-contracts/tree/master/reentrancy).
Do not report reentrancies that don't involve Ether (see `reentrancy-no-eth`)"""
# endregion wiki_description
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
function withdrawBalance(){
// send userBalance[msg.sender] Ether to msg.sender
// if mgs.sender is a contract, it will call its fallback function
if( ! (msg.sender.call.value(userBalance[msg.sender])() ) ){
throw;
}
userBalance[msg.sender] = 0;
}
```
Bob uses the re-entrancy bug to call `withdrawBalance` two times, and withdraw more than its initial deposit to the contract."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Apply the [`check-effects-interactions pattern`](http://solidity.readthedocs.io/en/v0.4.21/security-considerations.html#re-entrancy)."
STANDARD_JSON = False
def find_reentrancies(self) -> Dict[FindingKey, Set[FindingValue]]:
result: Dict[FindingKey, Set[FindingValue]] = defaultdict(set)
for contract in self.contracts: # pylint: disable=too-many-nested-blocks
variables_used_in_reentrancy = contract.state_variables_used_in_reentrant_targets
for f in contract.functions_and_modifiers_declared:
for node in f.nodes:
# dead code
if not self.KEY in node.context:
continue
if node.context[self.KEY].calls and node.context[self.KEY].send_eth:
if not any(n != node for n in node.context[self.KEY].send_eth):
continue
read_then_written = set()
for c in node.context[self.KEY].calls:
if c == node:
continue
read_then_written |= {
FindingValue(
v,
node,
tuple(sorted(nodes, key=lambda x: x.node_id)),
tuple(
sorted(
variables_used_in_reentrancy[v], key=lambda x: str(x)
)
),
)
for (v, nodes) in node.context[self.KEY].written.items()
if v in node.context[self.KEY].reads_prior_calls[c]
and (f.is_reentrant or v in variables_used_in_reentrancy)
}
if read_then_written:
# calls are ordered
finding_key = FindingKey(
function=node.function,
calls=to_hashable(node.context[self.KEY].calls),
send_eth=to_hashable(node.context[self.KEY].send_eth),
)
result[finding_key] |= set(read_then_written)
return result
def _detect(self) -> List[Output]: # pylint: disable=too-many-branches,too-many-locals
""""""
super()._detect()
reentrancies = self.find_reentrancies()
results = []
result_sorted = sorted(list(reentrancies.items()), key=lambda x: x[0].function.name)
varsWritten: List[FindingValue]
varsWrittenSet: Set[FindingValue]
for (func, calls, send_eth), varsWrittenSet in result_sorted:
calls = sorted(list(set(calls)), key=lambda x: x[0].node_id)
send_eth = sorted(list(set(send_eth)), key=lambda x: x[0].node_id)
varsWritten = sorted(varsWrittenSet, key=lambda x: (x.variable.name, x.node.node_id))
info = ["Reentrancy in ", func, ":\n"]
info += ["\tExternal calls:\n"]
for (call_info, calls_list) in calls:
info += ["\t- ", call_info, "\n"]
for call_list_info in calls_list:
if call_list_info != call_info:
info += ["\t\t- ", call_list_info, "\n"]
if calls != send_eth and send_eth:
info += ["\tExternal calls sending eth:\n"]
for (call_info, calls_list) in send_eth:
info += ["\t- ", call_info, "\n"]
for call_list_info in calls_list:
if call_list_info != call_info:
info += ["\t\t- ", call_list_info, "\n"]
info += ["\tState variables written after the call(s):\n"]
for finding_value in varsWritten:
info += ["\t- ", finding_value.node, "\n"]
for other_node in finding_value.nodes:
if other_node != finding_value.node:
info += ["\t\t- ", other_node, "\n"]
if finding_value.cross_functions:
info += [
"\t",
finding_value.variable,
" can be used in cross function reentrancies:\n",
]
for cross in finding_value.cross_functions:
info += ["\t- ", cross, "\n"]
# Create our JSON result
res = self.generate_result(info)
# Add the function with the re-entrancy first
res.add(func)
# Add all underlying calls in the function which are potentially problematic.
for (call_info, calls_list) in calls:
res.add(call_info, {"underlying_type": "external_calls"})
for call_list_info in calls_list:
if call_list_info != call_info:
res.add(
call_list_info,
{"underlying_type": "external_calls_sending_eth"},
)
# If the calls are not the same ones that send eth, add the eth sending nodes.
if calls != send_eth:
for (call_info, calls_list) in send_eth:
res.add(call_info, {"underlying_type": "external_calls_sending_eth"})
for call_list_info in calls_list:
if call_list_info != call_info:
res.add(
call_list_info,
{"underlying_type": "external_calls_sending_eth"},
)
# Add all variables written via nodes which write them.
for finding_value in varsWritten:
res.add(
finding_value.node,
{
"underlying_type": "variables_written",
"variable_name": finding_value.variable.name,
},
)
for other_node in finding_value.nodes:
if other_node != finding_value.node:
res.add(
other_node,
{
"underlying_type": "variables_written",
"variable_name": finding_value.variable.name,
},
)
# Append our result
results.append(res)
return results
| 8,599 | Python | .py | 166 | 34.325301 | 161 | 0.513205 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,156 | reentrancy_read_before_write.py | NioTheFirst_ScType/slither/detectors/reentrancy/reentrancy_read_before_write.py | """"
Re-entrancy detection
Based on heuristics, it may lead to FP and FN
Iterate over all the nodes of the graph until reaching a fixpoint
"""
from collections import namedtuple, defaultdict
from typing import Dict, Set, List
from slither.detectors.abstract_detector import DetectorClassification
from .reentrancy import Reentrancy, to_hashable
from ...utils.output import Output
FindingKey = namedtuple("FindingKey", ["function", "calls"])
FindingValue = namedtuple("FindingValue", ["variable", "node", "nodes", "cross_functions"])
class ReentrancyReadBeforeWritten(Reentrancy):
ARGUMENT = "reentrancy-no-eth"
HELP = "Reentrancy vulnerabilities (no theft of ethers)"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-1"
)
WIKI_TITLE = "Reentrancy vulnerabilities"
# region wiki_description
WIKI_DESCRIPTION = """
Detection of the [reentrancy bug](https://github.com/trailofbits/not-so-smart-contracts/tree/master/reentrancy).
Do not report reentrancies that involve Ether (see `reentrancy-eth`)."""
# endregion wiki_description
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
function bug(){
require(not_called);
if( ! (msg.sender.call() ) ){
throw;
}
not_called = False;
}
```
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Apply the [`check-effects-interactions` pattern](http://solidity.readthedocs.io/en/v0.4.21/security-considerations.html#re-entrancy)."
STANDARD_JSON = False
# pylint: disable=too-many-locals
def find_reentrancies(self) -> Dict[FindingKey, Set[FindingValue]]:
result: Dict[FindingKey, Set[FindingValue]] = defaultdict(set)
for contract in self.contracts: # pylint: disable=too-many-nested-blocks
variables_used_in_reentrancy = contract.state_variables_used_in_reentrant_targets
for f in contract.functions_and_modifiers_declared:
for node in f.nodes:
# dead code
if self.KEY not in node.context:
continue
if node.context[self.KEY].calls and not node.context[self.KEY].send_eth:
read_then_written = set()
for c in node.context[self.KEY].calls:
if c == node:
continue
read_then_written |= {
FindingValue(
v,
node,
tuple(sorted(nodes, key=lambda x: x.node_id)),
tuple(
sorted(
variables_used_in_reentrancy[v], key=lambda x: str(x)
)
),
)
for (v, nodes) in node.context[self.KEY].written.items()
if v in node.context[self.KEY].reads_prior_calls[c]
and (f.is_reentrant or v in variables_used_in_reentrancy)
}
# We found a potential re-entrancy bug
if read_then_written:
# calls are ordered
finding_key = FindingKey(
function=node.function,
calls=to_hashable(node.context[self.KEY].calls),
)
result[finding_key] |= read_then_written
return result
def _detect(self) -> List[Output]: # pylint: disable=too-many-branches
""""""
super()._detect()
reentrancies = self.find_reentrancies()
results = []
result_sorted = sorted(list(reentrancies.items()), key=lambda x: x[0].function.name)
varsWritten: List[FindingValue]
varsWrittenSet: Set[FindingValue]
for (func, calls), varsWrittenSet in result_sorted:
calls = sorted(list(set(calls)), key=lambda x: x[0].node_id)
varsWritten = sorted(varsWrittenSet, key=lambda x: (x.variable.name, x.node.node_id))
info = ["Reentrancy in ", func, ":\n"]
info += ["\tExternal calls:\n"]
for (call_info, calls_list) in calls:
info += ["\t- ", call_info, "\n"]
for call_list_info in calls_list:
if call_list_info != call_info:
info += ["\t\t- ", call_list_info, "\n"]
info += "\tState variables written after the call(s):\n"
for finding_value in varsWritten:
info += ["\t- ", finding_value.node, "\n"]
for other_node in finding_value.nodes:
if other_node != finding_value.node:
info += ["\t\t- ", other_node, "\n"]
if finding_value.cross_functions:
info += [
"\t",
finding_value.variable,
" can be used in cross function reentrancies:\n",
]
for cross in finding_value.cross_functions:
info += ["\t- ", cross, "\n"]
# Create our JSON result
res = self.generate_result(info)
# Add the function with the re-entrancy first
res.add(func)
# Add all underlying calls in the function which are potentially problematic.
for (call_info, calls_list) in calls:
res.add(call_info, {"underlying_type": "external_calls"})
for call_list_info in calls_list:
if call_list_info != call_info:
res.add(
call_list_info,
{"underlying_type": "external_calls_sending_eth"},
)
# Add all variables written via nodes which write them.
for finding_value in varsWritten:
res.add(
finding_value.node,
{
"underlying_type": "variables_written",
"variable_name": finding_value.variable.name,
},
)
for other_node in finding_value.nodes:
if other_node != finding_value.node:
res.add(
other_node,
{
"underlying_type": "variables_written",
"variable_name": finding_value.variable.name,
},
)
# Append our result
results.append(res)
return results
| 7,125 | Python | .py | 146 | 32.047945 | 161 | 0.514812 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,157 | reentrancy_no_gas.py | NioTheFirst_ScType/slither/detectors/reentrancy/reentrancy_no_gas.py | """"
Re-entrancy detection
Based on heuristics, it may lead to FP and FN
Iterate over all the nodes of the graph until reaching a fixpoint
"""
from collections import namedtuple, defaultdict
from slither.core.variables.variable import Variable
from slither.detectors.abstract_detector import DetectorClassification
from slither.slithir.operations import Send, Transfer, EventCall
from .reentrancy import Reentrancy, to_hashable
FindingKey = namedtuple("FindingKey", ["function", "calls", "send_eth"])
FindingValue = namedtuple("FindingValue", ["variable", "node", "nodes"])
class ReentrancyNoGas(Reentrancy):
KEY = "REENTRANCY_NO_GAS"
ARGUMENT = "reentrancy-unlimited-gas"
HELP = "Reentrancy vulnerabilities through send and transfer"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-4"
)
WIKI_TITLE = "Reentrancy vulnerabilities"
# region wiki_description
WIKI_DESCRIPTION = """
Detection of the [reentrancy bug](https://github.com/trailofbits/not-so-smart-contracts/tree/master/reentrancy).
Only report reentrancy that is based on `transfer` or `send`."""
# endregion wiki_description
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
function callme(){
msg.sender.transfer(balances[msg.sender]):
balances[msg.sender] = 0;
}
```
`send` and `transfer` do not protect from reentrancies in case of gas price changes."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Apply the [`check-effects-interactions` pattern](http://solidity.readthedocs.io/en/v0.4.21/security-considerations.html#re-entrancy)."
@staticmethod
def can_callback(ir):
"""
Same as Reentrancy, but also consider Send and Transfer
"""
return isinstance(ir, (Send, Transfer))
STANDARD_JSON = False
def find_reentrancies(self):
result = defaultdict(set)
for contract in self.contracts:
for f in contract.functions_and_modifiers_declared:
for node in f.nodes:
# dead code
if self.KEY not in node.context:
continue
if node.context[self.KEY].calls:
if not any(n != node for n in node.context[self.KEY].calls):
continue
# calls are ordered
finding_key = FindingKey(
function=node.function,
calls=to_hashable(node.context[self.KEY].calls),
send_eth=to_hashable(node.context[self.KEY].send_eth),
)
finding_vars = {
FindingValue(
v,
node,
tuple(sorted(nodes, key=lambda x: x.node_id)),
)
for (v, nodes) in node.context[self.KEY].written.items()
}
finding_vars |= {
FindingValue(
e,
e.node,
tuple(sorted(nodes, key=lambda x: x.node_id)),
)
for (e, nodes) in node.context[self.KEY].events.items()
}
if finding_vars:
result[finding_key] |= finding_vars
return result
def _detect(self): # pylint: disable=too-many-branches,too-many-locals
""""""
super()._detect()
reentrancies = self.find_reentrancies()
results = []
result_sorted = sorted(list(reentrancies.items()), key=lambda x: x[0][0].name)
for (func, calls, send_eth), varsWrittenOrEvent in result_sorted:
calls = sorted(list(set(calls)), key=lambda x: x[0].node_id)
send_eth = sorted(list(set(send_eth)), key=lambda x: x[0].node_id)
info = ["Reentrancy in ", func, ":\n"]
info += ["\tExternal calls:\n"]
for (call_info, calls_list) in calls:
info += ["\t- ", call_info, "\n"]
for call_list_info in calls_list:
if call_list_info != call_info:
info += ["\t\t- ", call_list_info, "\n"]
if calls != send_eth and send_eth:
info += ["\tExternal calls sending eth:\n"]
for (call_info, calls_list) in send_eth:
info += ["\t- ", call_info, "\n"]
for call_list_info in calls_list:
if call_list_info != call_info:
info += ["\t\t- ", call_list_info, "\n"]
varsWritten = [
FindingValue(v, node, nodes)
for (v, node, nodes) in varsWrittenOrEvent
if isinstance(v, Variable)
]
varsWritten = sorted(varsWritten, key=lambda x: (x.variable.name, x.node.node_id))
if varsWritten:
info += ["\tState variables written after the call(s):\n"]
for finding_value in varsWritten:
info += ["\t- ", finding_value.node, "\n"]
for other_node in finding_value.nodes:
if other_node != finding_value.node:
info += ["\t\t- ", other_node, "\n"]
events = [
FindingValue(v, node, nodes)
for (v, node, nodes) in varsWrittenOrEvent
if isinstance(v, EventCall)
]
events = sorted(events, key=lambda x: (x.variable.name, x.node.node_id))
if events:
info += ["\tEvent emitted after the call(s):\n"]
for finding_value in events:
info += ["\t- ", finding_value.node, "\n"]
for other_node in finding_value.nodes:
if other_node != finding_value.node:
info += ["\t\t- ", other_node, "\n"]
# Create our JSON result
res = self.generate_result(info)
# Add the function with the re-entrancy first
res.add(func)
# Add all underlying calls in the function which are potentially problematic.
for (call_info, calls_list) in calls:
res.add(call_info, {"underlying_type": "external_calls"})
for call_list_info in calls_list:
if call_list_info != call_info:
res.add(
call_list_info,
{"underlying_type": "external_calls_sending_eth"},
)
#
# If the calls are not the same ones that send eth, add the eth sending nodes.
if calls != send_eth:
for (call_info, calls_list) in send_eth:
res.add(call_info, {"underlying_type": "external_calls_sending_eth"})
for call_list_info in calls_list:
if call_list_info != call_info:
res.add(
call_list_info,
{"underlying_type": "external_calls_sending_eth"},
)
# Add all variables written via nodes which write them.
for finding_value in varsWritten:
res.add(
finding_value.node,
{
"underlying_type": "variables_written",
"variable_name": finding_value.variable.name,
},
)
for other_node in finding_value.nodes:
if other_node != finding_value.node:
res.add(
other_node,
{
"underlying_type": "variables_written",
"variable_name": finding_value.variable.name,
},
)
for finding_value in events:
res.add(finding_value.node, {"underlying_type": "event"})
for other_node in finding_value.nodes:
if other_node != finding_value.node:
res.add(other_node, {"underlying_type": "event"})
# Append our result
results.append(res)
return results
| 8,768 | Python | .py | 180 | 32.25 | 161 | 0.511571 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,158 | missing_events_access_control.py | NioTheFirst_ScType/slither/detectors/operations/missing_events_access_control.py | """
Module detecting missing events for critical contract parameters set by owners and used in access control
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.analyses.data_dependency.data_dependency import is_tainted
from slither.slithir.operations.event_call import EventCall
from slither.core.solidity_types.elementary_type import ElementaryType
class MissingEventsAccessControl(AbstractDetector):
"""
Missing events for critical contract parameters set by owners and used in access control
"""
ARGUMENT = "events-access"
HELP = "Missing Events Access Control"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#missing-events-access-control"
WIKI_TITLE = "Missing events access control"
WIKI_DESCRIPTION = "Detect missing events for critical access control parameters"
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract C {
modifier onlyAdmin {
if (msg.sender != owner) throw;
_;
}
function updateOwner(address newOwner) onlyAdmin external {
owner = newOwner;
}
}
```
`updateOwner()` has no event, so it is difficult to track off-chain owner changes.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Emit an event for critical parameter changes."
@staticmethod
def _detect_missing_events(contract):
"""
Detects if critical contract parameters set by owners and used in access control are missing events
:param contract: The contract to check
:return: Functions with nodes of critical operations but no events
"""
results = []
# pylint: disable=too-many-nested-blocks
for function in contract.functions_entry_points:
nodes = []
# Check for any events in the function and skip if found
# Note: not checking if event corresponds to critical parameter
if any(ir for node in function.nodes for ir in node.irs if isinstance(ir, EventCall)):
continue
# Ignore constructors and private/internal functions
# Heuristic-1: functions with critical operations are typically "protected". Skip unprotected functions.
if function.is_constructor or not function.is_protected():
continue
# Heuristic-2: Critical operations are where state variables are written and tainted
# Heuristic-3: Variables of interest are address type that are used in modifiers i.e. access control
# Heuristic-4: Critical operations present but no events in the function is not a good practice
for node in function.nodes:
for sv in node.state_variables_written:
if is_tainted(sv, function) and sv.type == ElementaryType("address"):
for mod in function.contract.modifiers:
if sv in mod.state_variables_read:
nodes.append((node, sv, mod))
if nodes:
results.append((function, nodes))
return results
def _detect(self):
"""Detect missing events for critical contract parameters set by owners and used in access control
Returns:
list: {'(function, node)'}
"""
# Check derived contracts for missing events
results = []
for contract in self.compilation_unit.contracts_derived:
missing_events = self._detect_missing_events(contract)
for (function, nodes) in missing_events:
info = [function, " should emit an event for: \n"]
for (node, _sv, _mod) in nodes:
info += ["\t- ", node, " \n"]
res = self.generate_result(info)
results.append(res)
return results
| 3,969 | Python | .py | 82 | 39.292683 | 116 | 0.670026 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,159 | void_constructor.py | NioTheFirst_ScType/slither/detectors/operations/void_constructor.py | from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import Nop
class VoidConstructor(AbstractDetector):
ARGUMENT = "void-cst"
HELP = "Constructor called not implemented"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#void-constructor"
WIKI_TITLE = "Void constructor"
WIKI_DESCRIPTION = "Detect the call to a constructor that is not implemented"
WIKI_RECOMMENDATION = "Remove the constructor call."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract A{}
contract B is A{
constructor() public A(){}
}
```
When reading `B`'s constructor definition, we might assume that `A()` initiates the contract, but no code is executed."""
# endregion wiki_exploit_scenario
def _detect(self):
""""""
results = []
for c in self.contracts:
cst = c.constructor
if cst:
for constructor_call in cst.explicit_base_constructor_calls_statements:
for node in constructor_call.nodes:
if any(isinstance(ir, Nop) for ir in node.irs):
info = ["Void constructor called in ", cst, ":\n"]
info += ["\t- ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 1,543 | Python | .py | 35 | 34.8 | 121 | 0.638852 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,160 | low_level_calls.py | NioTheFirst_ScType/slither/detectors/operations/low_level_calls.py | """
Module detecting usage of low level calls
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import LowLevelCall
class LowLevelCalls(AbstractDetector):
"""
Detect usage of low level calls
"""
ARGUMENT = "low-level-calls"
HELP = "Low level calls"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#low-level-calls"
WIKI_TITLE = "Low-level calls"
WIKI_DESCRIPTION = "The use of low-level calls is error-prone. Low-level calls do not check for [code existence](https://solidity.readthedocs.io/en/v0.4.25/control-structures.html#error-handling-assert-require-revert-and-exceptions) or call success."
WIKI_RECOMMENDATION = "Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence."
@staticmethod
def _contains_low_level_calls(node):
"""
Check if the node contains Low Level Calls
Returns:
(bool)
"""
return any(isinstance(ir, LowLevelCall) for ir in node.irs)
def detect_low_level_calls(self, contract):
ret = []
for f in [f for f in contract.functions if contract == f.contract_declarer]:
nodes = f.nodes
assembly_nodes = [n for n in nodes if self._contains_low_level_calls(n)]
if assembly_nodes:
ret.append((f, assembly_nodes))
return ret
def _detect(self):
"""Detect the functions that use low level calls"""
results = []
for c in self.contracts:
values = self.detect_low_level_calls(c)
for func, nodes in values:
info = ["Low level call in ", func, ":\n"]
# sort the nodes to get deterministic results
nodes.sort(key=lambda x: x.node_id)
for node in nodes:
info += ["\t- ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 2,169 | Python | .py | 47 | 37.085106 | 254 | 0.644687 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,161 | missing_zero_address_validation.py | NioTheFirst_ScType/slither/detectors/operations/missing_zero_address_validation.py | """
Module detecting missing zero address validation
"""
from collections import defaultdict
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.analyses.data_dependency.data_dependency import is_tainted
from slither.core.solidity_types.elementary_type import ElementaryType
from slither.slithir.operations import Send, Transfer, LowLevelCall
from slither.slithir.operations import Call
class MissingZeroAddressValidation(AbstractDetector):
"""
Missing zero address validation
"""
ARGUMENT = "missing-zero-check"
HELP = "Missing Zero Address Validation"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#missing-zero-address-validation"
WIKI_TITLE = "Missing zero address validation"
WIKI_DESCRIPTION = "Detect missing zero address validation."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract C {
modifier onlyAdmin {
if (msg.sender != owner) throw;
_;
}
function updateOwner(address newOwner) onlyAdmin external {
owner = newOwner;
}
}
```
Bob calls `updateOwner` without specifying the `newOwner`, so Bob loses ownership of the contract.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Check that the address is not zero."
def _zero_address_validation_in_modifier(self, var, modifier_exprs):
for mod in modifier_exprs:
for node in mod.nodes:
# Skip validation if the modifier's parameters contains more than one variable
# For example
# function f(a) my_modif(some_internal_function(a, b)) {
if len(node.irs) != 1:
continue
args = [arg for ir in node.irs if isinstance(ir, Call) for arg in ir.arguments]
# Check in modifier call arguments and then identify validation of corresponding parameter within modifier context
if var in args and self._zero_address_validation(
mod.modifier.parameters[args.index(var)], mod.modifier.nodes[-1], []
):
return True
return False
def _zero_address_validation(self, var, node, explored):
"""
Detects (recursively) if var is (zero address) checked in the function node
"""
if node in explored:
return False
explored.append(node)
# Heuristic: Assume zero address checked if variable is used within conditional or require/assert
# TBD: Actually check for zero address in predicate
if (node.contains_if() or node.contains_require_or_assert()) and (
var in node.variables_read
):
return True
# Check recursively in all the parent nodes
for father in node.fathers:
if self._zero_address_validation(var, father, explored):
return True
return False
def _detect_missing_zero_address_validation(self, contract):
"""
Detects if addresses are zero address validated before use.
:param contract: The contract to check
:return: Functions with nodes where addresses used are not zero address validated earlier
"""
results = []
for function in contract.functions_entry_points:
var_nodes = defaultdict(list)
for node in function.nodes:
sv_addrs_written = [
sv
for sv in node.state_variables_written
if sv.type == ElementaryType("address")
]
addr_calls = False
for ir in node.irs:
if isinstance(ir, (Send, Transfer, LowLevelCall)):
addr_calls = True
# Continue if no address-typed state variables are written and if no send/transfer/call
if not sv_addrs_written and not addr_calls:
continue
# Check local variables used in such nodes
for var in node.local_variables_read:
# Check for address types that are tainted but not by msg.sender
if var.type == ElementaryType("address") and is_tainted(
var, function, ignore_generic_taint=True
):
# Check for zero address validation of variable
# in the context of modifiers used or prior function context
if not (
self._zero_address_validation_in_modifier(
var, function.modifiers_statements
)
or self._zero_address_validation(var, node, [])
):
# Report a variable only once per function
var_nodes[var].append(node)
if var_nodes:
results.append((function, var_nodes))
return results
def _detect(self):
"""Detect if addresses are zero address validated before use.
Returns:
list: {'(function, node)'}
"""
# Check derived contracts for missing zero address validation
results = []
for contract in self.compilation_unit.contracts_derived:
missing_zero_address_validation = self._detect_missing_zero_address_validation(contract)
for (_, var_nodes) in missing_zero_address_validation:
for var, nodes in var_nodes.items():
info = [var, " lacks a zero-check on ", ":\n"]
for node in nodes:
info += ["\t\t- ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 5,959 | Python | .py | 128 | 34.445313 | 130 | 0.606128 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,162 | unchecked_send_return_value.py | NioTheFirst_ScType/slither/detectors/operations/unchecked_send_return_value.py | """
Module detecting unused return values from send
"""
from slither.detectors.abstract_detector import DetectorClassification
from slither.detectors.operations.unused_return_values import UnusedReturnValues
from slither.slithir.operations import Send
class UncheckedSend(UnusedReturnValues):
"""
If the return value of a send is not checked, it might lead to losing ether
"""
ARGUMENT = "unchecked-send"
HELP = "Unchecked send"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-send"
WIKI_TITLE = "Unchecked Send"
WIKI_DESCRIPTION = "The return value of a `send` is not checked."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract MyConc{
function my_func(address payable dst) public payable{
dst.send(msg.value);
}
}
```
The return value of `send` is not checked, so if the send fails, the Ether will be locked in the contract.
If `send` is used to prevent blocking operations, consider logging the failed `send`.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Ensure that the return value of `send` is checked or logged."
def _is_instance(self, ir): # pylint: disable=no-self-use
return isinstance(ir, Send)
| 1,364 | Python | .py | 33 | 37.393939 | 106 | 0.747352 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,163 | unchecked_transfer.py | NioTheFirst_ScType/slither/detectors/operations/unchecked_transfer.py | """
Module detecting unused transfer/transferFrom return values from external calls
"""
from slither.core.declarations import Function
from slither.detectors.abstract_detector import DetectorClassification
from slither.detectors.operations.unused_return_values import UnusedReturnValues
from slither.slithir.operations import HighLevelCall
class UncheckedTransfer(UnusedReturnValues):
"""
If the return value of a transfer/transferFrom function is never used, it's likely to be bug
"""
ARGUMENT = "unchecked-transfer"
HELP = "Unchecked tokens transfer"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-transfer"
WIKI_TITLE = "Unchecked transfer"
WIKI_DESCRIPTION = "The return value of an external transfer/transferFrom call is not checked"
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Token {
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
}
contract MyBank{
mapping(address => uint) balances;
Token token;
function deposit(uint amount) public{
token.transferFrom(msg.sender, address(this), amount);
balances[msg.sender] += amount;
}
}
```
Several tokens do not revert in case of failure and return false. If one of these tokens is used in `MyBank`, `deposit` will not revert if the transfer fails, and an attacker can call `deposit` for free.."""
# endregion wiki_exploit_scenariox
WIKI_RECOMMENDATION = (
"Use `SafeERC20`, or ensure that the transfer/transferFrom return value is checked."
)
def _is_instance(self, ir): # pylint: disable=no-self-use
return (
isinstance(ir, HighLevelCall)
and isinstance(ir.function, Function)
and ir.function.solidity_signature
in ["transfer(address,uint256)", "transferFrom(address,address,uint256)"]
)
| 2,021 | Python | .py | 45 | 39.844444 | 207 | 0.739705 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,164 | block_timestamp.py | NioTheFirst_ScType/slither/detectors/operations/block_timestamp.py | """
Module detecting dangerous use of block.timestamp
"""
from typing import List, Tuple
from slither.analyses.data_dependency.data_dependency import is_dependent
from slither.core.cfg.node import Node
from slither.core.declarations import Function, Contract
from slither.core.declarations.solidity_variables import (
SolidityVariableComposed,
SolidityVariable,
)
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import Binary, BinaryType
def _timestamp(func: Function) -> List[Node]:
ret = set()
for node in func.nodes:
if node.contains_require_or_assert():
for var in node.variables_read:
if is_dependent(var, SolidityVariableComposed("block.timestamp"), func.contract):
ret.add(node)
if is_dependent(var, SolidityVariable("now"), func.contract):
ret.add(node)
for ir in node.irs:
if isinstance(ir, Binary) and BinaryType.return_bool(ir.type):
for var in ir.read:
if is_dependent(
var, SolidityVariableComposed("block.timestamp"), func.contract
):
ret.add(node)
if is_dependent(var, SolidityVariable("now"), func.contract):
ret.add(node)
return sorted(list(ret), key=lambda x: x.node_id)
def _detect_dangerous_timestamp(
contract: Contract,
) -> List[Tuple[Function, List[Node]]]:
"""
Args:
contract (Contract)
Returns:
list((Function), (list (Node)))
"""
ret = []
for f in [f for f in contract.functions if f.contract_declarer == contract]:
nodes = _timestamp(f)
if nodes:
ret.append((f, nodes))
return ret
class Timestamp(AbstractDetector):
ARGUMENT = "timestamp"
HELP = "Dangerous usage of `block.timestamp`"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#block-timestamp"
WIKI_TITLE = "Block timestamp"
WIKI_DESCRIPTION = (
"Dangerous usage of `block.timestamp`. `block.timestamp` can be manipulated by miners."
)
WIKI_EXPLOIT_SCENARIO = """"Bob's contract relies on `block.timestamp` for its randomness. Eve is a miner and manipulates `block.timestamp` to exploit Bob's contract."""
WIKI_RECOMMENDATION = "Avoid relying on `block.timestamp`."
def _detect(self):
""""""
results = []
for c in self.contracts:
dangerous_timestamp = _detect_dangerous_timestamp(c)
for (func, nodes) in dangerous_timestamp:
info = [func, " uses timestamp for comparisons\n"]
info += ["\tDangerous comparisons:\n"]
# sort the nodes to get deterministic results
nodes.sort(key=lambda x: x.node_id)
for node in nodes:
info += ["\t- ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 3,191 | Python | .py | 74 | 33.743243 | 173 | 0.633193 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,165 | unused_return_values.py | NioTheFirst_ScType/slither/detectors/operations/unused_return_values.py | """
Module detecting unused return values from external calls
"""
from slither.core.variables.state_variable import StateVariable
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import HighLevelCall
from slither.core.declarations import Function
class UnusedReturnValues(AbstractDetector):
"""
If the return value of a function is never used, it's likely to be bug
"""
ARGUMENT = "unused-return"
HELP = "Unused return values"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return"
WIKI_TITLE = "Unused return"
WIKI_DESCRIPTION = (
"The return value of an external call is not stored in a local or state variable."
)
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract MyConc{
using SafeMath for uint;
function my_func(uint a, uint b) public{
a.add(b);
}
}
```
`MyConc` calls `add` of `SafeMath`, but does not store the result in `a`. As a result, the computation has no effect."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Ensure that all the return values of the function calls are used."
def _is_instance(self, ir): # pylint: disable=no-self-use
return isinstance(ir, HighLevelCall) and (
(
isinstance(ir.function, Function)
and ir.function.solidity_signature
not in ["transfer(address,uint256)", "transferFrom(address,address,uint256)"]
)
or not isinstance(ir.function, Function)
)
def detect_unused_return_values(self, f): # pylint: disable=no-self-use
"""
Return the nodes where the return value of a call is unused
Args:
f (Function)
Returns:
list(Node)
"""
values_returned = []
nodes_origin = {}
for n in f.nodes:
for ir in n.irs:
if self._is_instance(ir):
# if a return value is stored in a state variable, it's ok
if ir.lvalue and not isinstance(ir.lvalue, StateVariable):
values_returned.append(ir.lvalue)
nodes_origin[ir.lvalue] = ir
for read in ir.read:
if read in values_returned:
values_returned.remove(read)
return [nodes_origin[value].node for value in values_returned]
def _detect(self):
"""Detect high level calls which return a value that are never used"""
results = []
for c in self.compilation_unit.contracts:
for f in c.functions + c.modifiers:
if f.contract_declarer != c:
continue
unused_return = self.detect_unused_return_values(f)
if unused_return:
for node in unused_return:
info = [f, " ignores return value by ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 3,251 | Python | .py | 77 | 32.142857 | 120 | 0.616529 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,166 | bad_prng.py | NioTheFirst_ScType/slither/detectors/operations/bad_prng.py | """
Module detecting bad PRNG due to the use of block.timestamp, now or blockhash (block.blockhash) as a source of randomness
"""
from typing import List, Tuple
from slither.analyses.data_dependency.data_dependency import is_dependent_ssa
from slither.core.cfg.node import Node
from slither.core.declarations import Function, Contract
from slither.core.declarations.solidity_variables import (
SolidityVariable,
SolidityFunction,
SolidityVariableComposed,
)
from slither.core.variables.variable import Variable
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import BinaryType, Binary
from slither.slithir.operations import SolidityCall
from slither.utils.output import Output, AllSupportedOutput
def collect_return_values_of_bad_PRNG_functions(f: Function) -> List:
"""
Return the return-values of calls to blockhash()
Args:
f (Function)
Returns:
list(values)
"""
values_returned = []
for n in f.nodes:
for ir in n.irs_ssa:
if (
isinstance(ir, SolidityCall)
and ir.function == SolidityFunction("blockhash(uint256)")
and ir.lvalue
):
values_returned.append(ir.lvalue)
return values_returned
def contains_bad_PRNG_sources(func: Function, blockhash_ret_values: List[Variable]) -> List[Node]:
"""
Check if any node in function has a modulus operator and the first operand is dependent on block.timestamp, now or blockhash()
Returns:
(nodes)
"""
ret = set()
# pylint: disable=too-many-nested-blocks
for node in func.nodes:
for ir in node.irs_ssa:
if isinstance(ir, Binary) and ir.type == BinaryType.MODULO:
if is_dependent_ssa(
ir.variable_left, SolidityVariableComposed("block.timestamp"), func.contract
) or is_dependent_ssa(ir.variable_left, SolidityVariable("now"), func.contract):
ret.add(node)
break
for ret_val in blockhash_ret_values:
if is_dependent_ssa(ir.variable_left, ret_val, func.contract):
ret.add(node)
break
return list(ret)
def detect_bad_PRNG(contract: Contract) -> List[Tuple[Function, List[Node]]]:
"""
Args:
contract (Contract)
Returns:
list((Function), (list (Node)))
"""
blockhash_ret_values = []
for f in contract.functions:
blockhash_ret_values += collect_return_values_of_bad_PRNG_functions(f)
ret: List[Tuple[Function, List[Node]]] = []
for f in contract.functions:
bad_prng_nodes = contains_bad_PRNG_sources(f, blockhash_ret_values)
if bad_prng_nodes:
ret.append((f, bad_prng_nodes))
return ret
class BadPRNG(AbstractDetector):
"""
Detect weak PRNG due to a modulo operation on block.timestamp, now or blockhash
"""
ARGUMENT = "weak-prng"
HELP = "Weak PRNG"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#weak-PRNG"
WIKI_TITLE = "Weak PRNG"
WIKI_DESCRIPTION = "Weak PRNG due to a modulo on `block.timestamp`, `now` or `blockhash`. These can be influenced by miners to some extent so they should be avoided."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Game {
uint reward_determining_number;
function guessing() external{
reward_determining_number = uint256(block.blockhash(10000)) % 10;
}
}
```
Eve is a miner. Eve calls `guessing` and re-orders the block containing the transaction.
As a result, Eve wins the game."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = (
"Do not use `block.timestamp`, `now` or `blockhash` as a source of randomness"
)
def _detect(self) -> List[Output]:
"""Detect bad PRNG due to the use of block.timestamp, now or blockhash (block.blockhash) as a source of randomness"""
results = []
for c in self.compilation_unit.contracts_derived:
values = detect_bad_PRNG(c)
for func, nodes in values:
for node in nodes:
info: List[AllSupportedOutput] = [func, ' uses a weak PRNG: "', node, '" \n']
res = self.generate_result(info)
results.append(res)
return results
| 4,565 | Python | .py | 110 | 33.836364 | 170 | 0.662382 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,167 | unchecked_low_level_return_values.py | NioTheFirst_ScType/slither/detectors/operations/unchecked_low_level_return_values.py | """
Module detecting unused return values from low level
"""
from slither.detectors.abstract_detector import DetectorClassification
from slither.detectors.operations.unused_return_values import UnusedReturnValues
from slither.slithir.operations import LowLevelCall
class UncheckedLowLevel(UnusedReturnValues):
"""
If the return value of a send is not checked, it might lead to losing ether
"""
ARGUMENT = "unchecked-lowlevel"
HELP = "Unchecked low-level calls"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-low-level-calls"
WIKI_TITLE = "Unchecked low-level calls"
WIKI_DESCRIPTION = "The return value of a low-level call is not checked."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract MyConc{
function my_func(address payable dst) public payable{
dst.call.value(msg.value)("");
}
}
```
The return value of the low-level call is not checked, so if the call fails, the Ether will be locked in the contract.
If the low level is used to prevent blocking operations, consider logging failed calls.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Ensure that the return value of a low-level call is checked or logged."
def _is_instance(self, ir): # pylint: disable=no-self-use
return isinstance(ir, LowLevelCall)
| 1,467 | Python | .py | 33 | 40.545455 | 118 | 0.758065 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,168 | missing_events_arithmetic.py | NioTheFirst_ScType/slither/detectors/operations/missing_events_arithmetic.py | """
Module detecting missing events for critical contract parameters set by owners and used in arithmetic
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.analyses.data_dependency.data_dependency import is_tainted
from slither.slithir.operations.event_call import EventCall
from slither.core.solidity_types.elementary_type import ElementaryType, Int, Uint
class MissingEventsArithmetic(AbstractDetector):
"""
Missing events for critical contract parameters set by owners and used in arithmetic
"""
ARGUMENT = "events-maths"
HELP = "Missing Events Arithmetic"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#missing-events-arithmetic"
WIKI_TITLE = "Missing events arithmetic"
WIKI_DESCRIPTION = "Detect missing events for critical arithmetic parameters."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract C {
modifier onlyOwner {
if (msg.sender != owner) throw;
_;
}
function setBuyPrice(uint256 newBuyPrice) onlyOwner public {
buyPrice = newBuyPrice;
}
function buy() external {
... // buyPrice is used to determine the number of tokens purchased
}
}
```
`setBuyPrice()` does not emit an event, so it is difficult to track changes in the value of `buyPrice` off-chain.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Emit an event for critical parameter changes."
@staticmethod
def _detect_unprotected_use(contract, sv):
unprotected_functions = [
function for function in contract.functions_declared if not function.is_protected()
]
return [
(node, function)
for function in unprotected_functions
for node in function.nodes
if sv in node.state_variables_read
]
def _detect_missing_events(self, contract):
"""
Detects if critical contract parameters set by owners and used in arithmetic are missing events
:param contract: The contract to check
:return: Functions with nodes of critical operations but no events
"""
results = []
for function in contract.functions_entry_points:
nodes = []
# Check for any events in the function and skip if found
# Note: not checking if event corresponds to critical parameter
if any(ir for node in function.nodes for ir in node.irs if isinstance(ir, EventCall)):
continue
# Ignore constructors and private/internal functions
# Heuristic-1: functions writing to critical parameters are typically "protected".
# Skip unprotected functions.
if function.is_constructor or not function.is_protected():
continue
# Heuristic-2: Critical operations are where state variables are written and tainted
# Heuristic-3: Variables of interest are int/uint types that are used (mostly in arithmetic)
# in other unprotected functions
# Heuristic-4: Critical operations present but no events in the function is not a good practice
for node in function.nodes:
for sv in node.state_variables_written:
if (
is_tainted(sv, function)
and isinstance(sv.type, ElementaryType)
and sv.type.type in Int + Uint
):
used_nodes = self._detect_unprotected_use(contract, sv)
if used_nodes:
nodes.append((node, used_nodes))
if nodes:
results.append((function, nodes))
return results
def _detect(self):
"""Detect missing events for critical contract parameters set by owners and used in arithmetic
Returns:
list: {'(function, node)'}
"""
# Check derived contracts for missing events
results = []
for contract in self.compilation_unit.contracts_derived:
missing_events = self._detect_missing_events(contract)
for (function, nodes) in missing_events:
info = [function, " should emit an event for: \n"]
for (node, _) in nodes:
info += ["\t- ", node, " \n"]
res = self.generate_result(info)
results.append(res)
return results
| 4,622 | Python | .py | 100 | 36.2 | 114 | 0.646602 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,169 | backdoor.py | NioTheFirst_ScType/slither/detectors/examples/backdoor.py | from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
class Backdoor(AbstractDetector):
"""
Detect function named backdoor
"""
ARGUMENT = "backdoor" # slither will launch the detector with slither.py --mydetector
HELP = "Function named backdoor (detector example)"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/trailofbits/slither/wiki/Adding-a-new-detector"
WIKI_TITLE = "Backdoor example"
WIKI_DESCRIPTION = "Plugin example"
WIKI_EXPLOIT_SCENARIO = ".."
WIKI_RECOMMENDATION = ".."
def _detect(self):
results = []
exit(1)
for contract in self.compilation_unit.contracts_derived:
# Check if a function has 'backdoor' in its name
for f in contract.functions:
if "backdoor" in f.name:
# Info to be printed
info = ["Backdoor function found in ", f, "\n"]
# Add the result in result
res = self.generate_result(info)
results.append(res)
return results
| 1,174 | Python | .py | 27 | 33.888889 | 90 | 0.636523 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,170 | shift_parameter_mixup.py | NioTheFirst_ScType/slither/detectors/assembly/shift_parameter_mixup.py | from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import Binary, BinaryType
from slither.slithir.variables import Constant
class ShiftParameterMixup(AbstractDetector):
"""
Check for cases where a return(a,b) is used in an assembly function that also returns two variables
"""
ARGUMENT = "incorrect-shift"
HELP = "The order of parameters in a shift instruction is incorrect."
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.HIGH
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-shift-in-assembly"
)
WIKI_TITLE = "Incorrect shift in assembly."
WIKI_DESCRIPTION = "Detect if the values in a shift operation are reversed"
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract C {
function f() internal returns (uint a) {
assembly {
a := shr(a, 8)
}
}
}
```
The shift statement will right-shift the constant 8 by `a` bits"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Swap the order of parameters."
def _check_function(self, f):
results = []
for node in f.nodes:
for ir in node.irs:
if isinstance(ir, Binary) and ir.type in [
BinaryType.LEFT_SHIFT,
BinaryType.RIGHT_SHIFT,
]:
if isinstance(ir.variable_left, Constant):
info = [f, " contains an incorrect shift operation: ", node, "\n"]
json = self.generate_result(info)
results.append(json)
return results
def _detect(self):
results = []
for c in self.contracts:
for f in c.functions:
if f.contract_declarer != c:
continue
if f.contains_assembly:
results += self._check_function(f)
return results
| 2,044 | Python | .py | 52 | 29.980769 | 103 | 0.622537 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,171 | mapping_deletion.py | NioTheFirst_ScType/slither/detectors/statements/mapping_deletion.py | """
Detect deletion on structure containing a mapping
"""
from slither.core.declarations import Structure
from slither.core.solidity_types import MappingType, UserDefinedType
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import Delete
class MappingDeletionDetection(AbstractDetector):
"""
Mapping deletion detector
"""
ARGUMENT = "mapping-deletion"
HELP = "Deletion on mapping containing a structure"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#deletion-on-mapping-containing-a-structure"
WIKI_TITLE = "Deletion on mapping containing a structure"
WIKI_DESCRIPTION = "A deletion in a structure containing a mapping will not delete the mapping (see the [Solidity documentation](https://solidity.readthedocs.io/en/latest/types.html##delete)). The remaining data may be used to compromise the contract."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
struct BalancesStruct{
address owner;
mapping(address => uint) balances;
}
mapping(address => BalancesStruct) public stackBalance;
function remove() internal{
delete stackBalance[msg.sender];
}
```
`remove` deletes an item of `stackBalance`.
The mapping `balances` is never deleted, so `remove` does not work as intended."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = (
"Use a lock mechanism instead of a deletion to disable structure containing a mapping."
)
@staticmethod
def detect_mapping_deletion(contract):
"""Detect deletion on structure containing a mapping
Returns:
list (function, structure, node)
"""
ret = []
# pylint: disable=too-many-nested-blocks
for f in contract.functions:
for node in f.nodes:
for ir in node.irs:
if isinstance(ir, Delete):
value = ir.variable
if isinstance(value.type, UserDefinedType) and isinstance(
value.type.type, Structure
):
st = value.type.type
if any(isinstance(e.type, MappingType) for e in st.elems.values()):
ret.append((f, st, node))
return ret
def _detect(self):
"""Detect mapping deletion
Returns:
list: {'vuln', 'filename,'contract','func','struct''}
"""
results = []
for c in self.contracts:
mapping = MappingDeletionDetection.detect_mapping_deletion(c)
for (func, struct, node) in mapping:
info = [func, " deletes ", struct, " which contains a mapping:\n"]
info += ["\t-", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 3,064 | Python | .py | 70 | 34.314286 | 256 | 0.641826 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,172 | unprotected_upgradeable.py | NioTheFirst_ScType/slither/detectors/statements/unprotected_upgradeable.py | from typing import List
from slither.core.declarations import SolidityFunction, Function
from slither.core.declarations.contract import Contract
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import LowLevelCall, SolidityCall
def _can_be_destroyed(contract: Contract) -> List[Function]:
targets = []
for f in contract.functions_entry_points:
for ir in f.all_slithir_operations():
if (
isinstance(ir, LowLevelCall) and ir.function_name in ["delegatecall", "codecall"]
) or (
isinstance(ir, SolidityCall)
and ir.function
in [SolidityFunction("suicide(address)"), SolidityFunction("selfdestruct(address)")]
):
targets.append(f)
break
return targets
def _has_initializing_protection(functions: List[Function]) -> bool:
# Detects "initializer" constructor modifiers and "_disableInitializers()" constructor internal calls
# https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#initializing_the_implementation_contract
for f in functions:
for m in f.modifiers:
if m.name == "initializer":
return True
for ifc in f.all_internal_calls():
if ifc.name == "_disableInitializers":
return True
# to avoid future FPs in different modifier + function naming implementations, we can also implement a broader check for state var "_initialized" being written to in the constructor
# though this is still subject to naming false positives...
return False
def _whitelisted_modifiers(f: Function) -> bool:
# The onlyProxy modifier prevents calling the implementation contract (must be delegatecall)
# https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/3dec82093ea4a490d63aab3e925fed4f692909e8/contracts/proxy/utils/UUPSUpgradeable.sol#L38-L42
return "onlyProxy" not in [modifier.name for modifier in f.modifiers]
def _initialize_functions(contract: Contract) -> List[Function]:
return list(
filter(_whitelisted_modifiers, [f for f in contract.functions if f.name == "initialize"])
)
class UnprotectedUpgradeable(AbstractDetector):
ARGUMENT = "unprotected-upgrade"
HELP = "Unprotected upgradeable contract"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#unprotected-upgradeable-contract"
WIKI_TITLE = "Unprotected upgradeable contract"
WIKI_DESCRIPTION = """Detects logic contract that can be destructed."""
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Buggy is Initializable{
address payable owner;
function initialize() external initializer{
require(owner == address(0));
owner = msg.sender;
}
function kill() external{
require(msg.sender == owner);
selfdestruct(owner);
}
}
```
Buggy is an upgradeable contract. Anyone can call initialize on the logic contract, and destruct the contract.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = (
"""Add a constructor to ensure `initialize` cannot be called on the logic contract."""
)
def _detect(self):
results = []
for contract in self.compilation_unit.contracts_derived:
if contract.is_upgradeable:
if not _has_initializing_protection(contract.constructors):
functions_that_can_destroy = _can_be_destroyed(contract)
if functions_that_can_destroy:
initialize_functions = _initialize_functions(contract)
vars_init_ = [
init.all_state_variables_written() for init in initialize_functions
]
vars_init = [item for sublist in vars_init_ for item in sublist]
vars_init_in_constructors_ = [
f.all_state_variables_written() for f in contract.constructors
]
vars_init_in_constructors = [
item for sublist in vars_init_in_constructors_ for item in sublist
]
if vars_init and (set(vars_init) - set(vars_init_in_constructors)):
info = (
[
contract,
" is an upgradeable contract that does not protect its initialize functions: ",
]
+ initialize_functions
+ [
". Anyone can delete the contract with: ",
]
+ functions_that_can_destroy
)
res = self.generate_result(info)
results.append(res)
return results
| 5,197 | Python | .py | 102 | 38.019608 | 185 | 0.61716 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,173 | incorrect_strict_equality.py | NioTheFirst_ScType/slither/detectors/statements/incorrect_strict_equality.py | """
Module detecting dangerous strict equality
"""
from slither.analyses.data_dependency.data_dependency import is_dependent_ssa
from slither.core.declarations import Function
from slither.core.declarations.function_top_level import FunctionTopLevel
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import (
Assignment,
Binary,
BinaryType,
HighLevelCall,
SolidityCall,
)
from slither.core.solidity_types import MappingType, ElementaryType
from slither.core.variables.state_variable import StateVariable
from slither.core.declarations.solidity_variables import (
SolidityVariable,
SolidityVariableComposed,
SolidityFunction,
)
class IncorrectStrictEquality(AbstractDetector):
ARGUMENT = "incorrect-equality"
HELP = "Dangerous strict equalities"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.HIGH
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-strict-equalities"
)
WIKI_TITLE = "Dangerous strict equalities"
WIKI_DESCRIPTION = "Use of strict equalities that can be easily manipulated by an attacker."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Crowdsale{
function fund_reached() public returns(bool){
return this.balance == 100 ether;
}
```
`Crowdsale` relies on `fund_reached` to know when to stop the sale of tokens.
`Crowdsale` reaches 100 Ether. Bob sends 0.1 Ether. As a result, `fund_reached` is always false and the `crowdsale` never ends."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = (
"""Don't use strict equality to determine if an account has enough Ether or tokens."""
)
sources_taint = [
SolidityVariable("now"),
SolidityVariableComposed("block.number"),
SolidityVariableComposed("block.timestamp"),
]
@staticmethod
def is_direct_comparison(ir):
return isinstance(ir, Binary) and ir.type == BinaryType.EQUAL
@staticmethod
def is_any_tainted(variables, taints, function) -> bool:
return any(
(
is_dependent_ssa(var, taint, function.contract)
for var in variables
for taint in taints
)
)
def taint_balance_equalities(self, functions):
taints = []
for func in functions:
for node in func.nodes:
for ir in node.irs_ssa:
if isinstance(ir, SolidityCall) and ir.function == SolidityFunction(
"balance(address)"
):
taints.append(ir.lvalue)
if isinstance(ir, HighLevelCall):
# print(ir.function.full_name)
if (
isinstance(ir.function, Function)
and ir.function.full_name == "balanceOf(address)"
):
taints.append(ir.lvalue)
if (
isinstance(ir.function, StateVariable)
and isinstance(ir.function.type, MappingType)
and ir.function.name == "balanceOf"
and ir.function.type.type_from == ElementaryType("address")
and ir.function.type.type_to == ElementaryType("uint256")
):
taints.append(ir.lvalue)
if isinstance(ir, Assignment):
if ir.rvalue in self.sources_taint:
taints.append(ir.lvalue)
return taints
# Retrieve all tainted (node, function) pairs
def tainted_equality_nodes(self, funcs, taints):
results = {}
taints += self.sources_taint
for func in funcs:
# Disable the detector on top level function until we have good taint on those
if isinstance(func, FunctionTopLevel):
continue
for node in func.nodes:
for ir in node.irs_ssa:
# Filter to only tainted equality (==) comparisons
if self.is_direct_comparison(ir) and self.is_any_tainted(ir.used, taints, func):
if func not in results:
results[func] = []
results[func].append(node)
return results
def detect_strict_equality(self, contract):
funcs = contract.all_functions_called + contract.modifiers
# Taint all BALANCE accesses
taints = self.taint_balance_equalities(funcs)
# Accumulate tainted (node,function) pairs involved in strict equality (==) comparisons
results = self.tainted_equality_nodes(funcs, taints)
return results
def _detect(self):
results = []
for c in self.compilation_unit.contracts_derived:
ret = self.detect_strict_equality(c)
# sort ret to get deterministic results
ret = sorted(list(ret.items()), key=lambda x: x[0].name)
for f, nodes in ret:
func_info = [f, " uses a dangerous strict equality:\n"]
# sort the nodes to get deterministic results
nodes.sort(key=lambda x: x.node_id)
# Output each node with the function info header as a separate result.
for node in nodes:
node_info = func_info + ["\t- ", node, "\n"]
res = self.generate_result(node_info)
results.append(res)
return results
| 5,750 | Python | .py | 129 | 32.75969 | 130 | 0.606977 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,174 | unary.py | NioTheFirst_ScType/slither/detectors/statements/unary.py | """
Module detecting the incorrect use of unary expressions
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.visitors.expression.expression import ExpressionVisitor
from slither.core.expressions.unary_operation import UnaryOperationType, UnaryOperation
class InvalidUnaryExpressionDetector(ExpressionVisitor):
def _post_assignement_operation(self, expression):
if isinstance(expression.expression_right, UnaryOperation):
if expression.expression_right.type == UnaryOperationType.PLUS_PRE:
# This is defined in ExpressionVisitor but pylint
# Seems to think its not
# pylint: disable=attribute-defined-outside-init
self._result = True
class InvalidUnaryStateVariableDetector(ExpressionVisitor):
def _post_unary_operation(self, expression):
if expression.type == UnaryOperationType.PLUS_PRE:
# This is defined in ExpressionVisitor but pylint
# Seems to think its not
# pylint: disable=attribute-defined-outside-init
self._result = True
class IncorrectUnaryExpressionDetection(AbstractDetector):
"""
Incorrect Unary Expression detector
"""
ARGUMENT = "incorrect-unary"
HELP = "Dangerous unary expressions"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-unary-expressions"
)
WIKI_TITLE = "Dangerous unary expressions"
WIKI_DESCRIPTION = "Unary expressions such as `x=+1` probably typos."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```Solidity
contract Bug{
uint public counter;
function increase() public returns(uint){
counter=+1;
return counter;
}
}
```
`increase()` uses `=+` instead of `+=`, so `counter` will never exceed 1."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Remove the unary expression."
def _detect(self):
"""
Detect the incorrect use of unary expressions
"""
results = []
for c in self.contracts:
for variable in c.state_variables:
if (
variable.expression
and InvalidUnaryStateVariableDetector(variable.expression).result()
):
info = [variable, f" uses an dangerous unary operator: {variable.expression}\n"]
json = self.generate_result(info)
results.append(json)
for f in c.functions_and_modifiers_declared:
for node in f.nodes:
if node.expression and InvalidUnaryExpressionDetector(node.expression).result():
info = [node.function, " uses an dangerous unary operator: ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 3,046 | Python | .py | 69 | 34.782609 | 100 | 0.661939 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,175 | divide_before_multiply.py | NioTheFirst_ScType/slither/detectors/statements/divide_before_multiply.py | """
Module detecting possible loss of precision due to divide before multiple
"""
from collections import defaultdict
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import Binary, Assignment, BinaryType, LibraryCall
from slither.slithir.variables import Constant
def is_division(ir):
if isinstance(ir, Binary):
if ir.type == BinaryType.DIVISION:
return True
if isinstance(ir, LibraryCall):
if ir.function.name.lower() in [
"div",
"safediv",
]:
if len(ir.arguments) == 2:
if ir.lvalue:
return True
return False
def is_multiplication(ir):
if isinstance(ir, Binary):
if ir.type == BinaryType.MULTIPLICATION:
return True
if isinstance(ir, LibraryCall):
if ir.function.name.lower() in [
"mul",
"safemul",
]:
if len(ir.arguments) == 2:
if ir.lvalue:
return True
return False
def is_assert(node):
if node.contains_require_or_assert():
return True
# Old Solidity code where using an internal 'assert(bool)' function
# While we dont check that this function is correct, we assume it is
# To avoid too many FP
if "assert(bool)" in [c.full_name for c in node.internal_calls]:
return True
return False
def _explore(to_explore, f_results, divisions): # pylint: disable=too-many-branches
explored = set()
while to_explore: # pylint: disable=too-many-nested-blocks
node = to_explore.pop()
if node in explored:
continue
explored.add(node)
equality_found = False
# List of nodes related to one bug instance
node_results = []
for ir in node.irs:
# check for Constant, has its not hashable (TODO: make Constant hashable)
if isinstance(ir, Assignment) and not isinstance(ir.rvalue, Constant):
if ir.rvalue in divisions:
# Avoid dupplicate. We dont use set so we keep the order of the nodes
if node not in divisions[ir.rvalue]:
divisions[ir.lvalue] = divisions[ir.rvalue] + [node]
else:
divisions[ir.lvalue] = divisions[ir.rvalue]
if is_division(ir):
divisions[ir.lvalue] = [node]
if is_multiplication(ir):
mul_arguments = ir.read if isinstance(ir, Binary) else ir.arguments
nodes = []
for r in mul_arguments:
if not isinstance(r, Constant) and (r in divisions):
# Dont add node already present to avoid dupplicate
# We dont use set to keep the order of the nodes
if node in divisions[r]:
nodes += [n for n in divisions[r] if n not in nodes]
else:
nodes += [n for n in divisions[r] + [node] if n not in nodes]
if nodes:
node_results = nodes
if isinstance(ir, Binary) and ir.type == BinaryType.EQUAL:
equality_found = True
if node_results:
# We do not track the case where the multiplication is done in a require() or assert()
# Which also contains a ==, to prevent FP due to the form
# assert(a == b * c + a % b)
if not (is_assert(node) and equality_found):
f_results.append(node_results)
for son in node.sons:
to_explore.add(son)
def detect_divide_before_multiply(contract):
"""
Detects and returns all nodes with multiplications of division results.
:param contract: Contract to detect assignment within.
:return: A list of nodes with multiplications of divisions.
"""
# Create our result set.
# List of tuple (function -> list(list(nodes)))
# Each list(nodes) of the list is one bug instances
# Each node in the list(nodes) is involved in the bug
results = []
# Loop for each function and modifier.
for function in contract.functions_declared:
if not function.entry_point:
continue
# List of list(nodes)
# Each list(nodes) is one bug instances
f_results = []
# lvalue -> node
# track all the division results (and the assignment of the division results)
divisions = defaultdict(list)
_explore({function.entry_point}, f_results, divisions)
for f_result in f_results:
results.append((function, f_result))
# Return the resulting set of nodes with divisions before multiplications
return results
class DivideBeforeMultiply(AbstractDetector):
"""
Divide before multiply
"""
ARGUMENT = "divide-before-multiply"
HELP = "Imprecise arithmetic operations order"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#divide-before-multiply"
WIKI_TITLE = "Divide before multiply"
WIKI_DESCRIPTION = """Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss."""
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract A {
function f(uint n) public {
coins = (oldSupply / n) * interest;
}
}
```
If `n` is greater than `oldSupply`, `coins` will be zero. For example, with `oldSupply = 5; n = 10, interest = 2`, coins will be zero.
If `(oldSupply * interest / n)` was used, `coins` would have been `1`.
In general, it's usually a good idea to re-arrange arithmetic to perform multiplication before division, unless the limit of a smaller type makes this dangerous."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = """Consider ordering multiplication before division."""
def _detect(self):
"""
Detect divisions before multiplications
"""
results = []
for contract in self.contracts:
divisions_before_multiplications = detect_divide_before_multiply(contract)
if divisions_before_multiplications:
for (func, nodes) in divisions_before_multiplications:
info = [
func,
" performs a multiplication on the result of a division:\n",
]
# sort the nodes to get deterministic results
nodes.sort(key=lambda x: x.node_id)
for node in nodes:
info += ["\t- ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 6,948 | Python | .py | 157 | 33.764331 | 164 | 0.610724 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,176 | delegatecall_in_loop.py | NioTheFirst_ScType/slither/detectors/statements/delegatecall_in_loop.py | from typing import List, Optional
from slither.core.cfg.node import NodeType, Node
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import LowLevelCall, InternalCall
from slither.core.declarations import Contract
from slither.utils.output import Output
def detect_delegatecall_in_loop(contract: Contract) -> List[Node]:
results: List[Node] = []
for f in contract.functions_entry_points:
if f.is_implemented and f.payable:
delegatecall_in_loop(f.entry_point, 0, [], results)
return results
def delegatecall_in_loop(
node: Optional[Node], in_loop_counter: int, visited: List[Node], results: List[Node]
) -> None:
if node is None:
return
if node in visited:
return
# shared visited
visited.append(node)
if node.type == NodeType.STARTLOOP:
in_loop_counter += 1
elif node.type == NodeType.ENDLOOP:
in_loop_counter -= 1
for ir in node.all_slithir_operations():
if (
in_loop_counter > 0
and isinstance(ir, (LowLevelCall))
and ir.function_name == "delegatecall"
):
results.append(ir.node)
if isinstance(ir, (InternalCall)):
delegatecall_in_loop(ir.function.entry_point, in_loop_counter, visited, results)
for son in node.sons:
delegatecall_in_loop(son, in_loop_counter, visited, results)
class DelegatecallInLoop(AbstractDetector):
"""
Detect the use of delegatecall inside a loop in a payable function
"""
ARGUMENT = "delegatecall-loop"
HELP = "Payable functions using `delegatecall` inside a loop"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation/#payable-functions-using-delegatecall-inside-a-loop"
WIKI_TITLE = "Payable functions using `delegatecall` inside a loop"
WIKI_DESCRIPTION = "Detect the use of `delegatecall` inside a loop in a payable function."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract DelegatecallInLoop{
mapping (address => uint256) balances;
function bad(address[] memory receivers) public payable {
for (uint256 i = 0; i < receivers.length; i++) {
address(this).delegatecall(abi.encodeWithSignature("addBalance(address)", receivers[i]));
}
}
function addBalance(address a) public payable {
balances[a] += msg.value;
}
}
```
When calling `bad` the same `msg.value` amount will be accredited multiple times."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = """
Carefully check that the function called by `delegatecall` is not payable/doesn't use `msg.value`.
"""
def _detect(self) -> List[Output]:
""""""
results: List[Output] = []
for c in self.compilation_unit.contracts_derived:
values = detect_delegatecall_in_loop(c)
for node in values:
func = node.function
info = [func, " has delegatecall inside a loop in a payable function: ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 3,301 | Python | .py | 78 | 35.525641 | 126 | 0.6825 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,177 | type_based_tautology.py | NioTheFirst_ScType/slither/detectors/statements/type_based_tautology.py | """
Module detecting tautologies and contradictions based on types in comparison operations over integers
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import Binary, BinaryType
from slither.slithir.variables import Constant
from slither.core.solidity_types.elementary_type import Int, Uint
def typeRange(t):
bits = int(t.split("int")[1])
if t in Uint:
return 0, (2**bits) - 1
if t in Int:
v = (2 ** (bits - 1)) - 1
return -v, v
return None
def _detect_tautology_or_contradiction(low, high, cval, op):
"""
Return true if "[low high] op cval " is always true or always false
:param low:
:param high:
:param cval:
:param op:
:return:
"""
if op == BinaryType.LESS:
# a < cval
# its a tautology if
# high(a) < cval
# its a contradiction if
# low(a) >= cval
return high < cval or low >= cval
if op == BinaryType.GREATER:
# a > cval
# its a tautology if
# low(a) > cval
# its a contradiction if
# high(a) <= cval
return low > cval or high <= cval
if op == BinaryType.LESS_EQUAL:
# a <= cval
# its a tautology if
# high(a) <= cval
# its a contradiction if
# low(a) > cval
return (high <= cval) or (low > cval)
if op == BinaryType.GREATER_EQUAL:
# a >= cval
# its a tautology if
# low(a) >= cval
# its a contradiction if
# high(a) < cval
return (low >= cval) or (high < cval)
return False
class TypeBasedTautology(AbstractDetector):
"""
Type-based tautology or contradiction
"""
ARGUMENT = "tautology"
HELP = "Tautology or contradiction"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.HIGH
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#tautology-or-contradiction"
)
WIKI_TITLE = "Tautology or contradiction"
WIKI_DESCRIPTION = """Detects expressions that are tautologies or contradictions."""
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract A {
function f(uint x) public {
// ...
if (x >= 0) { // bad -- always true
// ...
}
// ...
}
function g(uint8 y) public returns (bool) {
// ...
return (y < 512); // bad!
// ...
}
}
```
`x` is a `uint256`, so `x >= 0` will be always true.
`y` is a `uint8`, so `y <512` will be always true.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = (
"""Fix the incorrect comparison by changing the value type or the comparison."""
)
flip_table = {
BinaryType.GREATER: BinaryType.LESS,
BinaryType.GREATER_EQUAL: BinaryType.LESS_EQUAL,
BinaryType.LESS: BinaryType.GREATER,
BinaryType.LESS_EQUAL: BinaryType.GREATER_EQUAL,
}
def detect_type_based_tautologies(self, contract):
"""
Detects and returns all nodes with tautology/contradiction comparisons (based on type alone).
:param contract: Contract to detect assignment within.
:return: A list of nodes with tautolgies/contradictions.
"""
# Create our result set.
results = []
allInts = Int + Uint
# Loop for each function and modifier.
for function in contract.functions_declared: # pylint: disable=too-many-nested-blocks
f_results = set()
for node in function.nodes:
for ir in node.irs:
if isinstance(ir, Binary) and ir.type in self.flip_table:
# If neither side is a constant, we can't do much
if isinstance(ir.variable_left, Constant):
cval = ir.variable_left.value
rtype = str(ir.variable_right.type)
if rtype in allInts:
(low, high) = typeRange(rtype)
if _detect_tautology_or_contradiction(
low, high, cval, self.flip_table[ir.type]
):
f_results.add(node)
if isinstance(ir.variable_right, Constant):
cval = ir.variable_right.value
ltype = str(ir.variable_left.type)
if ltype in allInts:
(low, high) = typeRange(ltype)
if _detect_tautology_or_contradiction(low, high, cval, ir.type):
f_results.add(node)
results.append((function, f_results))
# Return the resulting set of nodes with tautologies and contradictions
return results
def _detect(self):
"""
Detect tautological (or contradictory) comparisons
"""
results = []
for contract in self.contracts:
tautologies = self.detect_type_based_tautologies(contract)
if tautologies:
for (func, nodes) in tautologies:
for node in nodes:
info = [func, " contains a tautology or contradiction:\n"]
info += ["\t- ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 5,553 | Python | .py | 147 | 27.496599 | 101 | 0.565298 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,178 | boolean_constant_equality.py | NioTheFirst_ScType/slither/detectors/statements/boolean_constant_equality.py | """
Module detecting misuse of Boolean constants
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import (
Binary,
BinaryType,
)
from slither.slithir.variables import Constant
class BooleanEquality(AbstractDetector):
"""
Boolean constant equality
"""
ARGUMENT = "boolean-equal"
HELP = "Comparison to boolean constant"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#boolean-equality"
WIKI_TITLE = "Boolean equality"
WIKI_DESCRIPTION = """Detects the comparison to boolean constants."""
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract A {
function f(bool x) public {
// ...
if (x == true) { // bad!
// ...
}
// ...
}
}
```
Boolean constants can be used directly and do not need to be compare to `true` or `false`."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = """Remove the equality to the boolean constant."""
@staticmethod
def _detect_boolean_equality(contract):
# Create our result set.
results = []
# Loop for each function and modifier.
# pylint: disable=too-many-nested-blocks
for function in contract.functions_and_modifiers_declared:
f_results = set()
# Loop for every node in this function, looking for boolean constants
for node in function.nodes:
for ir in node.irs:
if isinstance(ir, Binary):
if ir.type in [BinaryType.EQUAL, BinaryType.NOT_EQUAL]:
for r in ir.read:
if isinstance(r, Constant):
if isinstance(r.value, bool):
f_results.add(node)
results.append((function, f_results))
# Return the resulting set of nodes with improper uses of Boolean constants
return results
def _detect(self):
"""
Detect Boolean constant misuses
"""
results = []
for contract in self.contracts:
boolean_constant_misuses = self._detect_boolean_equality(contract)
for (func, nodes) in boolean_constant_misuses:
for node in nodes:
info = [
func,
" compares to a boolean constant:\n\t-",
node,
"\n",
]
res = self.generate_result(info)
results.append(res)
return results
| 2,783 | Python | .py | 74 | 27.243243 | 93 | 0.58782 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,179 | assert_state_change.py | NioTheFirst_ScType/slither/detectors/statements/assert_state_change.py | """
Module detecting state changes in assert calls
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations.internal_call import InternalCall
def detect_assert_state_change(contract):
"""
Detects and returns all nodes with assert calls that change contract state from within the invariant
:param contract: Contract to detect
:return: A list of nodes with assert calls that change contract state from within the invariant
"""
# Create our result set.
# List of tuples (function, node)
results = []
# Loop for each function and modifier.
for function in contract.functions_declared + contract.modifiers_declared:
for node in function.nodes:
# Detect assert() calls
if any(c.name == "assert(bool)" for c in node.internal_calls) and (
# Detect direct changes to state
node.state_variables_written
or
# Detect changes to state via function calls
any(
ir
for ir in node.irs
if isinstance(ir, InternalCall) and ir.function.state_variables_written
)
):
results.append((function, node))
# Return the resulting set of nodes
return results
class AssertStateChange(AbstractDetector):
"""
Assert state change
"""
ARGUMENT = "assert-state-change"
HELP = "Assert state change"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#assert-state-change"
WIKI_TITLE = "Assert state change"
WIKI_DESCRIPTION = """Incorrect use of `assert()`. See Solidity best [practices](https://solidity.readthedocs.io/en/latest/control-structures.html#id4)."""
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract A {
uint s_a;
function bad() public {
assert((s_a += 1) > 10);
}
}
```
The assert in `bad()` increments the state variable `s_a` while checking for the condition.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = """Use `require` for invariants modifying the state."""
def _detect(self):
"""
Detect assert calls that change state from within the invariant
"""
results = []
for contract in self.contracts:
assert_state_change = detect_assert_state_change(contract)
for (func, node) in assert_state_change:
info = [func, " has an assert() call which possibly changes state.\n"]
info += ["\t-", node, "\n"]
info += [
"Consider using require() or change the invariant to not modify the state.\n"
]
res = self.generate_result(info)
results.append(res)
return results
| 2,987 | Python | .py | 73 | 32.575342 | 159 | 0.643103 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,180 | controlled_delegatecall.py | NioTheFirst_ScType/slither/detectors/statements/controlled_delegatecall.py | from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import LowLevelCall
from slither.analyses.data_dependency.data_dependency import is_tainted
def controlled_delegatecall(function):
ret = []
for node in function.nodes:
for ir in node.irs:
if isinstance(ir, LowLevelCall) and ir.function_name in [
"delegatecall",
"callcode",
]:
if is_tainted(ir.destination, function.contract):
ret.append(node)
return ret
class ControlledDelegateCall(AbstractDetector):
ARGUMENT = "controlled-delegatecall"
HELP = "Controlled delegatecall destination"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#controlled-delegatecall"
WIKI_TITLE = "Controlled Delegatecall"
WIKI_DESCRIPTION = "`Delegatecall` or `callcode` to an address controlled by the user."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Delegatecall{
function delegate(address to, bytes data){
to.delegatecall(data);
}
}
```
Bob calls `delegate` and delegates the execution to his malicious contract. As a result, Bob withdraws the funds of the contract and destructs it."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Avoid using `delegatecall`. Use only trusted destinations."
def _detect(self):
results = []
for contract in self.compilation_unit.contracts_derived:
for f in contract.functions:
# If its an upgradeable proxy, do not report protected function
# As functions to upgrades the destination lead to too many FPs
if contract.is_upgradeable_proxy and f.is_protected():
continue
nodes = controlled_delegatecall(f)
if nodes:
func_info = [
f,
" uses delegatecall to a input-controlled function id\n",
]
for node in nodes:
node_info = func_info + ["\t- ", node, "\n"]
res = self.generate_result(node_info)
results.append(res)
return results
| 2,417 | Python | .py | 53 | 35.075472 | 149 | 0.640578 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,181 | costly_operations_in_loop.py | NioTheFirst_ScType/slither/detectors/statements/costly_operations_in_loop.py | from typing import List, Optional
from slither.core.cfg.node import NodeType, Node
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.core.declarations import Contract
from slither.utils.output import Output
from slither.slithir.operations import InternalCall, OperationWithLValue
from slither.core.variables.state_variable import StateVariable
def detect_costly_operations_in_loop(contract: Contract) -> List[Node]:
ret: List[Node] = []
for f in contract.functions_entry_points:
if f.is_implemented:
costly_operations_in_loop(f.entry_point, 0, [], ret)
return ret
def costly_operations_in_loop(
node: Optional[Node], in_loop_counter: int, visited: List[Node], ret: List[Node]
) -> None:
if node is None:
return
if node in visited:
return
# shared visited
visited.append(node)
if node.type == NodeType.STARTLOOP:
in_loop_counter += 1
elif node.type == NodeType.ENDLOOP:
in_loop_counter -= 1
if in_loop_counter > 0:
for ir in node.all_slithir_operations():
# Ignore Array/Mapping/Struct types for now
if isinstance(ir, OperationWithLValue) and isinstance(ir.lvalue, StateVariable):
ret.append(ir.node)
break
if isinstance(ir, (InternalCall)):
costly_operations_in_loop(ir.function.entry_point, in_loop_counter, visited, ret)
for son in node.sons:
costly_operations_in_loop(son, in_loop_counter, visited, ret)
class CostlyOperationsInLoop(AbstractDetector):
ARGUMENT = "costly-loop"
HELP = "Costly operations in a loop"
IMPACT = DetectorClassification.INFORMATIONAL
# Overall the detector seems precise, but it does not take into account
# case where there are external calls or internal calls that might read the state
# variable changes. In these cases the optimization should not be applied
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#costly-operations-inside-a-loop"
WIKI_TITLE = "Costly operations inside a loop"
WIKI_DESCRIPTION = (
"Costly operations inside a loop might waste gas, so optimizations are justified."
)
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract CostlyOperationsInLoop{
uint loop_count = 100;
uint state_variable=0;
function bad() external{
for (uint i=0; i < loop_count; i++){
state_variable++;
}
}
function good() external{
uint local_variable = state_variable;
for (uint i=0; i < loop_count; i++){
local_variable++;
}
state_variable = local_variable;
}
}
```
Incrementing `state_variable` in a loop incurs a lot of gas because of expensive `SSTOREs`, which might lead to an `out-of-gas`."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Use a local variable to hold the loop computation result."
def _detect(self) -> List[Output]:
""""""
results: List[Output] = []
for c in self.compilation_unit.contracts_derived:
values = detect_costly_operations_in_loop(c)
for node in values:
func = node.function
info = [func, " has costly operations inside a loop:\n"]
info += ["\t- ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 3,559 | Python | .py | 84 | 35.25 | 131 | 0.676803 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,182 | calls_in_loop.py | NioTheFirst_ScType/slither/detectors/statements/calls_in_loop.py | from typing import List, Optional
from slither.core.cfg.node import NodeType, Node
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.core.declarations import Contract
from slither.utils.output import Output
from slither.slithir.operations import (
HighLevelCall,
LibraryCall,
LowLevelCall,
Send,
Transfer,
InternalCall,
)
def detect_call_in_loop(contract: Contract) -> List[Node]:
ret: List[Node] = []
for f in contract.functions_entry_points:
if f.is_implemented:
call_in_loop(f.entry_point, 0, [], ret)
return ret
def call_in_loop(
node: Optional[Node], in_loop_counter: int, visited: List[Node], ret: List[Node]
) -> None:
if node is None:
return
if node in visited:
return
# shared visited
visited.append(node)
if node.type == NodeType.STARTLOOP:
in_loop_counter += 1
elif node.type == NodeType.ENDLOOP:
in_loop_counter -= 1
if in_loop_counter > 0:
for ir in node.all_slithir_operations():
if isinstance(ir, (LowLevelCall, HighLevelCall, Send, Transfer)):
if isinstance(ir, LibraryCall):
continue
ret.append(ir.node)
if isinstance(ir, (InternalCall)):
call_in_loop(ir.function.entry_point, in_loop_counter, visited, ret)
for son in node.sons:
call_in_loop(son, in_loop_counter, visited, ret)
class MultipleCallsInLoop(AbstractDetector):
ARGUMENT = "calls-loop"
HELP = "Multiple calls in a loop"
IMPACT = DetectorClassification.LOW
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation/#calls-inside-a-loop"
WIKI_TITLE = "Calls inside a loop"
WIKI_DESCRIPTION = "Calls inside a loop might lead to a denial-of-service attack."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract CallsInLoop{
address[] destinations;
constructor(address[] newDestinations) public{
destinations = newDestinations;
}
function bad() external{
for (uint i=0; i < destinations.length; i++){
destinations[i].transfer(i);
}
}
}
```
If one of the destinations has a fallback function that reverts, `bad` will always revert."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Favor [pull over push](https://github.com/ethereum/wiki/wiki/Safety#favor-pull-over-push-for-external-calls) strategy for external calls."
def _detect(self) -> List[Output]:
""""""
results: List[Output] = []
for c in self.compilation_unit.contracts_derived:
values = detect_call_in_loop(c)
for node in values:
func = node.function
info = [func, " has external calls inside a loop: ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 3,041 | Python | .py | 79 | 31.443038 | 165 | 0.663946 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,183 | too_many_digits.py | NioTheFirst_ScType/slither/detectors/statements/too_many_digits.py | """
Module detecting numbers with too many digits.
"""
import re
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.variables import Constant
_HEX_ADDRESS_REGEXP = re.compile("(0[xX])?[0-9a-fA-F]{40}")
def is_hex_address(value) -> bool:
"""
Checks if the given string of text type is an address in hexadecimal encoded form.
"""
return _HEX_ADDRESS_REGEXP.fullmatch(value) is not None
class TooManyDigits(AbstractDetector):
"""
Detect numbers with too many digits
"""
ARGUMENT = "too-many-digits"
HELP = "Conformance to numeric notation best practices"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits"
WIKI_TITLE = "Too many digits"
# region wiki_description
WIKI_DESCRIPTION = """
Literals with many digits are difficult to read and review.
"""
# endregion wiki_description
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract MyContract{
uint 1_ether = 10000000000000000000;
}
```
While `1_ether` looks like `1 ether`, it is `10 ether`. As a result, it's likely to be used incorrectly.
"""
# endregion wiki_exploit_scenario
# region wiki_recommendation
WIKI_RECOMMENDATION = """
Use:
- [Ether suffix](https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#ether-units),
- [Time suffix](https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#time-units), or
- [The scientific notation](https://solidity.readthedocs.io/en/latest/types.html#rational-and-integer-literals)
"""
# endregion wiki_recommendation
@staticmethod
def _detect_too_many_digits(f):
ret = []
for node in f.nodes:
# each node contains a list of IR instruction
for ir in node.irs:
# iterate over all the variables read by the IR
for read in ir.read:
# if the variable is a constant
if isinstance(read, Constant):
# read.value can return an int or a str. Convert it to str
value_as_str = read.original_value
if "00000" in value_as_str and not is_hex_address(value_as_str):
# Info to be printed
ret.append(node)
return ret
def _detect(self):
results = []
# iterate over all contracts
for contract in self.compilation_unit.contracts_derived:
# iterate over all functions
for f in contract.functions:
# iterate over all the nodes
ret = self._detect_too_many_digits(f)
if ret:
func_info = [f, " uses literals with too many digits:"]
for node in ret:
node_info = func_info + ["\n\t- ", node, "\n"]
# Add the result in result
res = self.generate_result(node_info)
results.append(res)
return results
| 3,220 | Python | .py | 77 | 32.896104 | 111 | 0.632118 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,184 | msg_value_in_loop.py | NioTheFirst_ScType/slither/detectors/statements/msg_value_in_loop.py | from typing import List, Optional
from slither.core.cfg.node import NodeType, Node
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import InternalCall
from slither.core.declarations import SolidityVariableComposed, Contract
from slither.utils.output import Output
def detect_msg_value_in_loop(contract: Contract) -> List[Node]:
results: List[Node] = []
for f in contract.functions_entry_points:
if f.is_implemented and f.payable:
msg_value_in_loop(f.entry_point, 0, [], results)
return results
def msg_value_in_loop(
node: Optional[Node], in_loop_counter: int, visited: List[Node], results: List[Node]
) -> None:
if node is None:
return
if node in visited:
return
# shared visited
visited.append(node)
if node.type == NodeType.STARTLOOP:
in_loop_counter += 1
elif node.type == NodeType.ENDLOOP:
in_loop_counter -= 1
for ir in node.all_slithir_operations():
if in_loop_counter > 0 and SolidityVariableComposed("msg.value") in ir.read:
results.append(ir.node)
if isinstance(ir, (InternalCall)):
msg_value_in_loop(ir.function.entry_point, in_loop_counter, visited, results)
for son in node.sons:
msg_value_in_loop(son, in_loop_counter, visited, results)
class MsgValueInLoop(AbstractDetector):
"""
Detect the use of msg.value inside a loop
"""
ARGUMENT = "msg-value-loop"
HELP = "msg.value inside a loop"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation/#msgvalue-inside-a-loop"
WIKI_TITLE = "`msg.value` inside a loop"
WIKI_DESCRIPTION = "Detect the use of `msg.value` inside a loop."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract MsgValueInLoop{
mapping (address => uint256) balances;
function bad(address[] memory receivers) public payable {
for (uint256 i=0; i < receivers.length; i++) {
balances[receivers[i]] += msg.value;
}
}
}
```
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = """
Track msg.value through a local variable and decrease its amount on every iteration/usage.
"""
def _detect(self) -> List[Output]:
""""""
results: List[Output] = []
for c in self.compilation_unit.contracts_derived:
values = detect_msg_value_in_loop(c)
for node in values:
func = node.function
info = [func, " use msg.value in a loop: ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 2,814 | Python | .py | 71 | 33.140845 | 98 | 0.673649 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,185 | write_after_write.py | NioTheFirst_ScType/slither/detectors/statements/write_after_write.py | from typing import List, Set, Tuple, Dict
from slither.core.cfg.node import Node, NodeType
from slither.core.solidity_types import ElementaryType
from slither.core.variables.state_variable import StateVariable
from slither.core.variables.variable import Variable
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import (
OperationWithLValue,
HighLevelCall,
InternalDynamicCall,
InternalCall,
LowLevelCall,
Operation,
)
from slither.slithir.variables import ReferenceVariable, TemporaryVariable, TupleVariable
from slither.slithir.variables.variable import SlithIRVariable
def _remove_states(written: Dict[Variable, Node]):
for key in list(written.keys()):
if isinstance(key, StateVariable):
del written[key]
def _handle_ir(
ir: Operation,
written: Dict[Variable, Node],
ret: List[Tuple[Variable, Node, Node]],
):
if isinstance(ir, (HighLevelCall, InternalDynamicCall, LowLevelCall)):
_remove_states(written)
if isinstance(ir, InternalCall):
if ir.function.all_high_level_calls() or ir.function.all_library_calls():
_remove_states(written)
all_read = ir.function.all_state_variables_read()
for read in all_read:
if (
isinstance(read, Variable)
and isinstance(read.type, ElementaryType)
and not isinstance(read, SlithIRVariable)
and read in written
):
del written[read]
for read in ir.read:
if (
isinstance(read, Variable)
and isinstance(read.type, ElementaryType)
and not isinstance(read, SlithIRVariable)
and read in written
):
del written[read]
if isinstance(ir, OperationWithLValue):
# Until we have a better handling of mapping/array we only look for simple types
if (
ir.lvalue
and isinstance(ir.lvalue.type, ElementaryType)
and not isinstance(ir.lvalue, (ReferenceVariable, TemporaryVariable, TupleVariable))
):
if ir.lvalue.name == "_":
return
if ir.lvalue in written:
ret.append((ir.lvalue, written[ir.lvalue], ir.node))
written[ir.lvalue] = ir.node
def _detect_write_after_write(
node: Node,
explored: Set[Node],
written: Dict[Variable, Node],
ret: List[Tuple[Variable, Node, Node]],
):
if node in explored:
return
explored.add(node)
# We could report write after write for, but this lead to a lot of FP due to the initilization to zero pattern:
# uint a = 0;
# a = 10;
# To do better, we could filter out if the variable is init to zero
if node.type != NodeType.VARIABLE:
for ir in node.irs:
_handle_ir(ir, written, ret)
if len(node.sons) > 1:
written = {}
for son in node.sons:
_detect_write_after_write(son, explored, dict(written), ret)
class WriteAfterWrite(AbstractDetector):
ARGUMENT = "write-after-write"
HELP = "Unused write"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#write-after-write"
WIKI_TITLE = "Write after write"
WIKI_DESCRIPTION = """Detects variables that are written but never read and written again."""
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Buggy{
function my_func() external initializer{
// ...
a = b;
a = c;
// ..
}
}
```
`a` is first asigned to `b`, and then to `c`. As a result the first write does nothing."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = """Fix or remove the writes."""
def _detect(self):
results = []
for contract in self.compilation_unit.contracts_derived:
for function in contract.functions:
if function.entry_point:
ret = []
_detect_write_after_write(function.entry_point, set(), {}, ret)
for var, node1, node2 in ret:
info = [var, " is written in both\n\t", node1, "\n\t", node2, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 4,506 | Python | .py | 114 | 30.947368 | 115 | 0.637134 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,186 | redundant_statements.py | NioTheFirst_ScType/slither/detectors/statements/redundant_statements.py | """
Module detecting redundant statements.
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.core.cfg.node import NodeType
from slither.core.expressions.elementary_type_name_expression import ElementaryTypeNameExpression
from slither.core.expressions.identifier import Identifier
class RedundantStatements(AbstractDetector):
"""
Use of Redundant Statements
"""
ARGUMENT = "redundant-statements"
HELP = "Redundant statements"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#redundant-statements"
WIKI_TITLE = "Redundant Statements"
WIKI_DESCRIPTION = "Detect the usage of redundant statements that have no effect."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract RedundantStatementsContract {
constructor() public {
uint; // Elementary Type Name
bool; // Elementary Type Name
RedundantStatementsContract; // Identifier
}
function test() public returns (uint) {
uint; // Elementary Type Name
assert; // Identifier
test; // Identifier
return 777;
}
}
```
Each commented line references types/identifiers, but performs no action with them, so no code will be generated for such statements and they can be removed."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Remove redundant statements if they congest code but offer no value."
# This is a disallowed list of tuple (node.type, type(node.expression))
REDUNDANT_TOP_LEVEL_EXPRESSIONS = (ElementaryTypeNameExpression, Identifier)
def detect_redundant_statements_contract(self, contract):
"""Detects the usage of redundant statements in a contract.
Returns:
list: nodes"""
results = []
# Loop through all functions + modifiers defined explicitly in this contract.
for function in contract.functions_and_modifiers_declared:
# Loop through each node in this function.
for node in function.nodes:
if node.expression:
if node.type == NodeType.EXPRESSION and isinstance(
node.expression, self.REDUNDANT_TOP_LEVEL_EXPRESSIONS
):
results.append(node)
return results
def _detect(self):
"""Detect redundant statements
Recursively visit the calls
Returns:
list: {'vuln', 'filename,'contract','func', 'redundant_statements'}
"""
results = []
for contract in self.contracts:
redundant_statements = self.detect_redundant_statements_contract(contract)
if redundant_statements:
for redundant_statement in redundant_statements:
info = ['Redundant expression "', redundant_statement, '" in', contract, "\n"]
json = self.generate_result(info)
results.append(json)
return results
| 3,137 | Python | .py | 70 | 36.371429 | 160 | 0.682863 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,187 | deprecated_calls.py | NioTheFirst_ScType/slither/detectors/statements/deprecated_calls.py | """
Module detecting deprecated standards.
"""
from slither.core.cfg.node import NodeType
from slither.core.declarations.solidity_variables import (
SolidityVariableComposed,
SolidityFunction,
)
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import LowLevelCall
from slither.visitors.expression.export_values import ExportValues
# Reference: https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-111
class DeprecatedStandards(AbstractDetector):
"""
Use of Deprecated Standards
"""
ARGUMENT = "deprecated-standards"
HELP = "Deprecated Solidity Standards"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards"
WIKI_TITLE = "Deprecated standards"
WIKI_DESCRIPTION = "Detect the usage of deprecated standards."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract ContractWithDeprecatedReferences {
// Deprecated: Change block.blockhash() -> blockhash()
bytes32 globalBlockHash = block.blockhash(0);
// Deprecated: Change constant -> view
function functionWithDeprecatedThrow() public constant {
// Deprecated: Change msg.gas -> gasleft()
if(msg.gas == msg.value) {
// Deprecated: Change throw -> revert()
throw;
}
}
// Deprecated: Change constant -> view
function functionWithDeprecatedReferences() public constant {
// Deprecated: Change sha3() -> keccak256()
bytes32 sha3Result = sha3("test deprecated sha3 usage");
// Deprecated: Change callcode() -> delegatecall()
address(this).callcode();
// Deprecated: Change suicide() -> selfdestruct()
suicide(address(0));
}
}
```"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Replace all uses of deprecated symbols."
# The format for the following deprecated lists is [(detecting_signature, original_text, recommended_text)]
DEPRECATED_SOLIDITY_VARIABLE = [
("block.blockhash", "block.blockhash()", "blockhash()"),
("msg.gas", "msg.gas", "gasleft()"),
]
DEPRECATED_SOLIDITY_FUNCTIONS = [
("suicide(address)", "suicide()", "selfdestruct()"),
("sha3()", "sha3()", "keccak256()"),
]
DEPRECATED_NODE_TYPES = [(NodeType.THROW, "throw", "revert()")]
DEPRECATED_LOW_LEVEL_CALLS = [("callcode", "callcode", "delegatecall")]
def detect_deprecation_in_expression(self, expression):
"""Detects if an expression makes use of any deprecated standards.
Returns:
list of tuple: (detecting_signature, original_text, recommended_text)"""
# Perform analysis on this expression
export = ExportValues(expression)
export_values = export.result()
# Define our results list
results = []
# Check if there is usage of any deprecated solidity variables or functions
for dep_var in self.DEPRECATED_SOLIDITY_VARIABLE:
if SolidityVariableComposed(dep_var[0]) in export_values:
results.append(dep_var)
for dep_func in self.DEPRECATED_SOLIDITY_FUNCTIONS:
if SolidityFunction(dep_func[0]) in export_values:
results.append(dep_func)
return results
def detect_deprecated_references_in_node(self, node):
"""Detects if a node makes use of any deprecated standards.
Returns:
list of tuple: (detecting_signature, original_text, recommended_text)"""
# Define our results list
results = []
# If this node has an expression, we check the underlying expression.
if node.expression:
results += self.detect_deprecation_in_expression(node.expression)
# Check if there is usage of any deprecated solidity variables or functions
for dep_node in self.DEPRECATED_NODE_TYPES:
if node.type == dep_node[0]:
results.append(dep_node)
return results
def detect_deprecated_references_in_contract(self, contract):
"""Detects the usage of any deprecated built-in symbols.
Returns:
list of tuple: (state_variable | node, (detecting_signature, original_text, recommended_text))"""
results = []
for state_variable in contract.state_variables_declared:
if state_variable.expression:
deprecated_results = self.detect_deprecation_in_expression(
state_variable.expression
)
if deprecated_results:
results.append((state_variable, deprecated_results))
# Loop through all functions + modifiers in this contract.
# pylint: disable=too-many-nested-blocks
for function in contract.functions_and_modifiers_declared:
# Loop through each node in this function.
for node in function.nodes:
# Detect deprecated references in the node.
deprecated_results = self.detect_deprecated_references_in_node(node)
# Detect additional deprecated low-level-calls.
for ir in node.irs:
if isinstance(ir, LowLevelCall):
for dep_llc in self.DEPRECATED_LOW_LEVEL_CALLS:
if ir.function_name == dep_llc[0]:
deprecated_results.append(dep_llc)
# If we have any results from this iteration, add them to our results list.
if deprecated_results:
results.append((node, deprecated_results))
return results
def _detect(self):
"""Detects if an expression makes use of any deprecated standards.
Recursively visit the calls
Returns:
list: {'vuln', 'filename,'contract','func', 'deprecated_references'}
"""
results = []
for contract in self.contracts:
deprecated_references = self.detect_deprecated_references_in_contract(contract)
if deprecated_references:
for deprecated_reference in deprecated_references:
source_object = deprecated_reference[0]
deprecated_entries = deprecated_reference[1]
info = ["Deprecated standard detected ", source_object, ":\n"]
for (_dep_id, original_desc, recommended_disc) in deprecated_entries:
info += [
f'\t- Usage of "{original_desc}" should be replaced with "{recommended_disc}"\n'
]
res = self.generate_result(info)
results.append(res)
return results
| 6,878 | Python | .py | 142 | 38.225352 | 111 | 0.644925 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,188 | tx_origin.py | NioTheFirst_ScType/slither/detectors/statements/tx_origin.py | """
Module detecting usage of `tx.origin` in a conditional node
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
class TxOrigin(AbstractDetector):
"""
Detect usage of tx.origin in a conditional node
"""
ARGUMENT = "tx-origin"
HELP = "Dangerous usage of `tx.origin`"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-usage-of-txorigin"
)
WIKI_TITLE = "Dangerous usage of `tx.origin`"
WIKI_DESCRIPTION = "`tx.origin`-based protection can be abused by a malicious contract if a legitimate user interacts with the malicious contract."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract TxOrigin {
address owner = msg.sender;
function bug() {
require(tx.origin == owner);
}
```
Bob is the owner of `TxOrigin`. Bob calls Eve's contract. Eve's contract calls `TxOrigin` and bypasses the `tx.origin` protection."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Do not use `tx.origin` for authorization."
@staticmethod
def _contains_incorrect_tx_origin_use(node):
"""
Check if the node reads tx.origin and doesn't read msg.sender
Avoid the FP due to (msg.sender == tx.origin)
Returns:
(bool)
"""
solidity_var_read = node.solidity_variables_read
if solidity_var_read:
return any(v.name == "tx.origin" for v in solidity_var_read) and all(
v.name != "msg.sender" for v in solidity_var_read
)
return False
def detect_tx_origin(self, contract):
ret = []
for f in contract.functions:
nodes = f.nodes
condtional_nodes = [
n for n in nodes if n.contains_if() or n.contains_require_or_assert()
]
bad_tx_nodes = [
n for n in condtional_nodes if self._contains_incorrect_tx_origin_use(n)
]
if bad_tx_nodes:
ret.append((f, bad_tx_nodes))
return ret
def _detect(self):
"""Detect the functions that use tx.origin in a conditional node"""
results = []
for c in self.contracts:
values = self.detect_tx_origin(c)
for func, nodes in values:
for node in nodes:
info = [func, " uses tx.origin for authorization: ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 2,685 | Python | .py | 67 | 31.298507 | 151 | 0.621206 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,189 | array_length_assignment.py | NioTheFirst_ScType/slither/detectors/statements/array_length_assignment.py | """
Module detecting assignment of array length
"""
from slither.detectors.abstract_detector import (
AbstractDetector,
DetectorClassification,
ALL_SOLC_VERSIONS_04,
ALL_SOLC_VERSIONS_05,
)
from slither.core.cfg.node import NodeType
from slither.slithir.operations import Assignment, Length
from slither.slithir.variables.reference import ReferenceVariable
from slither.slithir.operations.binary import Binary
from slither.analyses.data_dependency.data_dependency import is_tainted
def detect_array_length_assignment(contract):
"""
Detects and returns all nodes which assign array length.
:param contract: Contract to detect assignment within.
:return: A list of tuples with (Variable, node) where Variable references an array whose length was set by node.
"""
# Create our result set.
results = set()
# Loop for each function and modifier.
# pylint: disable=too-many-nested-blocks
for function in contract.functions_and_modifiers_declared:
# Define a set of reference variables which refer to array length.
array_length_refs = set()
# Loop for every node in this function, looking for expressions where array length references are made,
# and subsequent expressions where array length references are assigned to.
for node in function.nodes:
if node.type == NodeType.EXPRESSION:
for ir in node.irs:
# First we look for the member access for 'length', for which a reference is created.
# We add the reference to our list of array length references.
if isinstance(ir, Length): # a
# if ir.variable_right == "length":
array_length_refs.add(ir.lvalue)
# If we have an assignment/binary operation, verify the left side refers to a reference variable
# which is in our list or array length references. (Array length is being assigned to).
elif isinstance(ir, (Assignment, Binary)):
if isinstance(ir.lvalue, ReferenceVariable):
if ir.lvalue in array_length_refs and any(
is_tainted(v, contract) for v in ir.read
):
# the taint is not precise enough yet
# as a result, REF_0 = REF_0 + 1
# where REF_0 points to a LENGTH operation
# is considered as tainted
if ir.lvalue in ir.read:
continue
results.add(node)
break
# Return the resulting set of nodes which set array length.
return results
class ArrayLengthAssignment(AbstractDetector):
"""
Array length assignment
"""
ARGUMENT = "controlled-array-length"
HELP = "Tainted array length assignment"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#array-length-assignment"
WIKI_TITLE = "Array Length Assignment"
WIKI_DESCRIPTION = """Detects the direct assignment of an array's length."""
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract A {
uint[] testArray; // dynamic size array
function f(uint usersCount) public {
// ...
testArray.length = usersCount;
// ...
}
function g(uint userIndex, uint val) public {
// ...
testArray[userIndex] = val;
// ...
}
}
```
Contract storage/state-variables are indexed by a 256-bit integer.
The user can set the array length to `2**256-1` in order to index all storage slots.
In the example above, one could call the function `f` to set the array length, then call the function `g` to control any storage slot desired.
Note that storage slots here are indexed via a hash of the indexers; nonetheless, all storage will still be accessible and could be controlled by the attacker."""
# endregion wiki_exploit_scenario
# region wiki_recommendation
WIKI_RECOMMENDATION = """Do not allow array lengths to be set directly set; instead, opt to add values as needed.
Otherwise, thoroughly review the contract to ensure a user-controlled variable cannot reach an array length assignment."""
# endregion wiki_recommendation
VULNERABLE_SOLC_VERSIONS = ALL_SOLC_VERSIONS_04 + ALL_SOLC_VERSIONS_05
def _detect(self):
"""
Detect array length assignments
"""
results = []
for contract in self.contracts:
array_length_assignments = detect_array_length_assignment(contract)
if array_length_assignments:
contract_info = [
contract,
" contract sets array length with a user-controlled value:\n",
]
for node in array_length_assignments:
node_info = contract_info + ["\t- ", node, "\n"]
res = self.generate_result(node_info)
results.append(res)
return results
| 5,281 | Python | .py | 109 | 38.238532 | 162 | 0.638517 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,190 | assembly.py | NioTheFirst_ScType/slither/detectors/statements/assembly.py | """
Module detecting usage of inline assembly
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.core.cfg.node import NodeType
class Assembly(AbstractDetector):
"""
Detect usage of inline assembly
"""
ARGUMENT = "assembly"
HELP = "Assembly usage"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage"
WIKI_TITLE = "Assembly usage"
WIKI_DESCRIPTION = "The use of assembly is error-prone and should be avoided."
WIKI_RECOMMENDATION = "Do not use `evm` assembly."
@staticmethod
def _contains_inline_assembly_use(node):
"""
Check if the node contains ASSEMBLY type
Returns:
(bool)
"""
return node.type == NodeType.ASSEMBLY
def detect_assembly(self, contract):
ret = []
for f in contract.functions:
if f.contract_declarer != contract:
continue
nodes = f.nodes
assembly_nodes = [n for n in nodes if self._contains_inline_assembly_use(n)]
if assembly_nodes:
ret.append((f, assembly_nodes))
return ret
def _detect(self):
"""Detect the functions that use inline assembly"""
results = []
for c in self.contracts:
values = self.detect_assembly(c)
for func, nodes in values:
info = [func, " uses assembly\n"]
# sort the nodes to get deterministic results
nodes.sort(key=lambda x: x.node_id)
for node in nodes:
info += ["\t- ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 1,875 | Python | .py | 49 | 28.979592 | 89 | 0.615554 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,191 | boolean_constant_misuse.py | NioTheFirst_ScType/slither/detectors/statements/boolean_constant_misuse.py | """
Module detecting misuse of Boolean constants
"""
from slither.core.cfg.node import NodeType
from slither.core.solidity_types import ElementaryType
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import (
Assignment,
Call,
Return,
InitArray,
Binary,
BinaryType,
Condition,
)
from slither.slithir.variables import Constant
class BooleanConstantMisuse(AbstractDetector):
"""
Boolean constant misuse
"""
ARGUMENT = "boolean-cst"
HELP = "Misuse of Boolean constant"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = (
"https://github.com/crytic/slither/wiki/Detector-Documentation#misuse-of-a-boolean-constant"
)
WIKI_TITLE = "Misuse of a Boolean constant"
WIKI_DESCRIPTION = """Detects the misuse of a Boolean constant."""
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract A {
function f(uint x) public {
// ...
if (false) { // bad!
// ...
}
// ...
}
function g(bool b) public returns (bool) {
// ...
return (b || true); // bad!
// ...
}
}
```
Boolean constants in code have only a few legitimate uses.
Other uses (in complex expressions, as conditionals) indicate either an error or, most likely, the persistence of faulty code."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = """Verify and simplify the condition."""
@staticmethod
def _detect_boolean_constant_misuses(contract): # pylint: disable=too-many-branches
"""
Detects and returns all nodes which misuse a Boolean constant.
:param contract: Contract to detect assignment within.
:return: A list of misusing nodes.
"""
# Create our result set.
results = []
# Loop for each function and modifier.
for function in contract.functions_declared:
f_results = set()
# Loop for every node in this function, looking for boolean constants
for node in function.nodes:
# Do not report "while(true)"
if node.type == NodeType.IFLOOP and node.irs and len(node.irs) == 1:
ir = node.irs[0]
if isinstance(ir, Condition) and ir.value == Constant(
"True", ElementaryType("bool")
):
continue
for ir in node.irs:
if isinstance(ir, (Assignment, Call, Return, InitArray)):
# It's ok to use a bare boolean constant in these contexts
continue
if isinstance(ir, Binary) and ir.type in [
BinaryType.ADDITION,
BinaryType.EQUAL,
BinaryType.NOT_EQUAL,
]:
# Comparing to a Boolean constant is dubious style, but harmless
# Equal is catch by another detector (informational severity)
continue
for r in ir.read:
if isinstance(r, Constant) and isinstance(r.value, bool):
f_results.add(node)
results.append((function, f_results))
# Return the resulting set of nodes with improper uses of Boolean constants
return results
def _detect(self):
"""
Detect Boolean constant misuses
"""
results = []
for contract in self.contracts:
boolean_constant_misuses = self._detect_boolean_constant_misuses(contract)
for (func, nodes) in boolean_constant_misuses:
for node in nodes:
info = [
func,
" uses a Boolean constant improperly:\n\t-",
node,
"\n",
]
res = self.generate_result(info)
results.append(res)
return results
| 4,143 | Python | .py | 108 | 27.564815 | 129 | 0.580035 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,192 | naming_convention.py | NioTheFirst_ScType/slither/detectors/naming_convention/naming_convention.py | import re
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.formatters.naming_convention.naming_convention import custom_format
class NamingConvention(AbstractDetector):
"""
Check if naming conventions are followed
https://solidity.readthedocs.io/en/v0.4.25/style-guide.html?highlight=naming_convention%20convention#naming_convention-conventions
Exceptions:
- Allow constant variables name/symbol/decimals to be lowercase (ERC20)
- Allow '_' at the beggining of the mixed_case match for private variables and unused parameters
- Ignore echidna properties (functions with names starting 'echidna_' or 'crytic_'
"""
ARGUMENT = "naming-convention"
HELP = "Conformity to Solidity naming conventions"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#conformance-to-solidity-naming-conventions"
WIKI_TITLE = "Conformance to Solidity naming conventions"
# region wiki_description
WIKI_DESCRIPTION = """
Solidity defines a [naming convention](https://solidity.readthedocs.io/en/v0.4.25/style-guide.html#naming-conventions) that should be followed.
#### Rule exceptions
- Allow constant variable name/symbol/decimals to be lowercase (`ERC20`).
- Allow `_` at the beginning of the `mixed_case` match for private variables and unused parameters."""
# endregion wiki_description
WIKI_RECOMMENDATION = "Follow the Solidity [naming convention](https://solidity.readthedocs.io/en/v0.4.25/style-guide.html#naming-conventions)."
STANDARD_JSON = False
@staticmethod
def is_cap_words(name):
return re.search("^[A-Z]([A-Za-z0-9]+)?_?$", name) is not None
@staticmethod
def is_mixed_case(name):
return re.search("^[a-z]([A-Za-z0-9]+)?_?$", name) is not None
@staticmethod
def is_mixed_case_with_underscore(name):
# Allow _ at the beginning to represent private variable
# or unused parameters
return re.search("^[_]?[a-z]([A-Za-z0-9]+)?_?$", name) is not None
@staticmethod
def is_upper_case_with_underscores(name):
return re.search("^[A-Z0-9_]+_?$", name) is not None
@staticmethod
def should_avoid_name(name):
return re.search("^[lOI]$", name) is not None
def _detect(self): # pylint: disable=too-many-branches,too-many-statements
results = []
for contract in self.contracts:
if not self.is_cap_words(contract.name):
info = ["Contract ", contract, " is not in CapWords\n"]
res = self.generate_result(info)
res.add(contract, {"target": "contract", "convention": "CapWords"})
results.append(res)
for struct in contract.structures_declared:
if not self.is_cap_words(struct.name):
info = ["Struct ", struct, " is not in CapWords\n"]
res = self.generate_result(info)
res.add(struct, {"target": "structure", "convention": "CapWords"})
results.append(res)
for event in contract.events_declared:
if not self.is_cap_words(event.name):
info = ["Event ", event, " is not in CapWords\n"]
res = self.generate_result(info)
res.add(event, {"target": "event", "convention": "CapWords"})
results.append(res)
for func in contract.functions_declared:
if func.is_constructor:
continue
if not self.is_mixed_case(func.name):
if func.visibility in [
"internal",
"private",
] and self.is_mixed_case_with_underscore(func.name):
continue
if func.name.startswith(("echidna_", "crytic_")):
continue
info = ["Function ", func, " is not in mixedCase\n"]
res = self.generate_result(info)
res.add(func, {"target": "function", "convention": "mixedCase"})
results.append(res)
for argument in func.parameters:
# Ignore parameter names that are not specified i.e. empty strings
if argument.name == "":
continue
if argument in func.variables_read_or_written:
correct_naming = self.is_mixed_case(argument.name)
else:
correct_naming = self.is_mixed_case_with_underscore(argument.name)
if not correct_naming:
info = ["Parameter ", argument, " is not in mixedCase\n"]
res = self.generate_result(info)
res.add(argument, {"target": "parameter", "convention": "mixedCase"})
results.append(res)
for var in contract.state_variables_declared:
if self.should_avoid_name(var.name):
info = [
"Variable ",
var,
" is single letter l, O, or I, which should not be used\n",
]
res = self.generate_result(info)
res.add(
var,
{
"target": "variable",
"convention": "l_O_I_should_not_be_used",
},
)
results.append(res)
if var.is_constant is True:
# For ERC20 compatibility
if var.name in ["symbol", "name", "decimals"]:
continue
if not self.is_upper_case_with_underscores(var.name):
info = [
"Constant ",
var,
" is not in UPPER_CASE_WITH_UNDERSCORES\n",
]
res = self.generate_result(info)
res.add(
var,
{
"target": "variable_constant",
"convention": "UPPER_CASE_WITH_UNDERSCORES",
},
)
results.append(res)
else:
if var.visibility == "private":
correct_naming = self.is_mixed_case_with_underscore(var.name)
else:
correct_naming = self.is_mixed_case(var.name)
if not correct_naming:
info = ["Variable ", var, " is not in mixedCase\n"]
res = self.generate_result(info)
res.add(var, {"target": "variable", "convention": "mixedCase"})
results.append(res)
for enum in contract.enums_declared:
if not self.is_cap_words(enum.name):
info = ["Enum ", enum, " is not in CapWords\n"]
res = self.generate_result(info)
res.add(enum, {"target": "enum", "convention": "CapWords"})
results.append(res)
for modifier in contract.modifiers_declared:
if not self.is_mixed_case(modifier.name):
info = ["Modifier ", modifier, " is not in mixedCase\n"]
res = self.generate_result(info)
res.add(modifier, {"target": "modifier", "convention": "mixedCase"})
results.append(res)
return results
@staticmethod
def _format(slither, result):
custom_format(slither, result)
| 8,015 | Python | .py | 153 | 35.75817 | 148 | 0.533683 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,193 | constant_pragma.py | NioTheFirst_ScType/slither/detectors/attributes/constant_pragma.py | """
Check that the same pragma is used in all the files
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.formatters.attributes.constant_pragma import custom_format
class ConstantPragma(AbstractDetector):
"""
Check that the same pragma is used in all the files
"""
ARGUMENT = "pragma"
HELP = "If different pragma directives are used"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used"
WIKI_TITLE = "Different pragma directives are used"
WIKI_DESCRIPTION = "Detect whether different Solidity versions are used."
WIKI_RECOMMENDATION = "Use one Solidity version."
def _detect(self):
results = []
pragma = self.compilation_unit.pragma_directives
versions = [p.version for p in pragma if p.is_solidity_version]
versions = sorted(list(set(versions)))
if len(versions) > 1:
info = ["Different versions of Solidity are used:\n"]
info += [f"\t- Version used: {[str(v) for v in versions]}\n"]
for p in sorted(pragma, key=lambda x: x.version):
info += ["\t- ", p, "\n"]
res = self.generate_result(info)
results.append(res)
return results
@staticmethod
def _format(slither, result):
custom_format(slither, result)
| 1,507 | Python | .py | 33 | 38.454545 | 111 | 0.684463 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,194 | incorrect_solc.py | NioTheFirst_ScType/slither/detectors/attributes/incorrect_solc.py | """
Check if an incorrect version of solc is used
"""
import re
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.formatters.attributes.incorrect_solc import custom_format
# group:
# 0: ^ > >= < <= (optional)
# 1: ' ' (optional)
# 2: version number
# 3: version number
# 4: version number
# pylint: disable=anomalous-backslash-in-string
PATTERN = re.compile(r"(\^|>|>=|<|<=)?([ ]+)?(\d+)\.(\d+)\.(\d+)")
class IncorrectSolc(AbstractDetector):
"""
Check if an old version of solc is used
"""
ARGUMENT = "solc-version"
HELP = "Incorrect Solidity version"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity"
WIKI_TITLE = "Incorrect versions of Solidity"
# region wiki_description
WIKI_DESCRIPTION = """
`solc` frequently releases new compiler versions. Using an old version prevents access to new Solidity security checks.
We also recommend avoiding complex `pragma` statement."""
# endregion wiki_description
# region wiki_recommendation
WIKI_RECOMMENDATION = """
Deploy with any of the following Solidity versions:
- 0.5.16 - 0.5.17
- 0.6.11 - 0.6.12
- 0.7.5 - 0.7.6
- 0.8.16
The recommendations take into account:
- Risks related to recent releases
- Risks of complex code generation changes
- Risks of new language features
- Risks of known bugs
Use a simple pragma version that allows any of these versions.
Consider using the latest version of Solidity for testing."""
# endregion wiki_recommendation
COMPLEX_PRAGMA_TXT = "is too complex"
OLD_VERSION_TXT = "allows old versions"
LESS_THAN_TXT = "uses lesser than"
TOO_RECENT_VERSION_TXT = "necessitates a version too recent to be trusted. Consider deploying with 0.6.12/0.7.6/0.8.16"
BUGGY_VERSION_TXT = (
"is known to contain severe issues (https://solidity.readthedocs.io/en/latest/bugs.html)"
)
# Indicates the allowed versions. Must be formatted in increasing order.
ALLOWED_VERSIONS = ["0.5.16", "0.5.17", "0.6.11", "0.6.12", "0.7.5", "0.7.6", "0.8.16"]
# Indicates the versions that should not be used.
BUGGY_VERSIONS = [
"0.4.22",
"^0.4.22",
"0.5.5",
"^0.5.5",
"0.5.6",
"^0.5.6",
"0.5.14",
"^0.5.14",
"0.6.9",
"^0.6.9",
"0.8.8",
"^0.8.8",
]
def _check_version(self, version):
op = version[0]
if op and op not in [">", ">=", "^"]:
return self.LESS_THAN_TXT
version_number = ".".join(version[2:])
if version_number in self.BUGGY_VERSIONS:
return self.BUGGY_VERSION_TXT
if version_number not in self.ALLOWED_VERSIONS:
if list(map(int, version[2:])) > list(map(int, self.ALLOWED_VERSIONS[-1].split("."))):
return self.TOO_RECENT_VERSION_TXT
return self.OLD_VERSION_TXT
return None
def _check_pragma(self, version):
if version in self.BUGGY_VERSIONS:
return self.BUGGY_VERSION_TXT
versions = PATTERN.findall(version)
if len(versions) == 1:
version = versions[0]
return self._check_version(version)
if len(versions) == 2:
version_left = versions[0]
version_right = versions[1]
# Only allow two elements if the second one is
# <0.5.0 or <0.6.0
if version_right not in [
("<", "", "0", "5", "0"),
("<", "", "0", "6", "0"),
("<", "", "0", "7", "0"),
]:
return self.COMPLEX_PRAGMA_TXT
return self._check_version(version_left)
return self.COMPLEX_PRAGMA_TXT
def _detect(self):
"""
Detects pragma statements that allow for outdated solc versions.
:return: Returns the relevant JSON data for the findings.
"""
# Detect all version related pragmas and check if they are disallowed.
results = []
pragma = self.compilation_unit.pragma_directives
disallowed_pragmas = []
for p in pragma:
# Skip any pragma directives which do not refer to version
if len(p.directive) < 1 or p.directive[0] != "solidity":
continue
# This is version, so we test if this is disallowed.
reason = self._check_pragma(p.version)
if reason:
disallowed_pragmas.append((reason, p))
# If we found any disallowed pragmas, we output our findings.
if disallowed_pragmas:
for (reason, p) in disallowed_pragmas:
info = ["Pragma version", p, f" {reason}\n"]
json = self.generate_result(info)
results.append(json)
if self.compilation_unit.solc_version not in self.ALLOWED_VERSIONS:
if self.compilation_unit.solc_version in self.BUGGY_VERSIONS:
info = [
"solc-",
self.compilation_unit.solc_version,
" ",
self.BUGGY_VERSION_TXT,
]
else:
info = [
"solc-",
self.compilation_unit.solc_version,
" is not recommended for deployment\n",
]
json = self.generate_result(info)
# TODO: Once crytic-compile adds config file info, add a source mapping element pointing to
# the line in the config that specifies the problematic version of solc
results.append(json)
return results
@staticmethod
def _format(slither, result):
custom_format(slither, result)
| 5,882 | Python | .py | 145 | 31.710345 | 123 | 0.601472 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,195 | const_functions_state.py | NioTheFirst_ScType/slither/detectors/attributes/const_functions_state.py | """
Module detecting constant functions
Recursively check the called functions
"""
from slither.detectors.abstract_detector import (
AbstractDetector,
DetectorClassification,
ALL_SOLC_VERSIONS_04,
)
from slither.formatters.attributes.const_functions import custom_format
class ConstantFunctionsState(AbstractDetector):
"""
Constant function detector
"""
ARGUMENT = "constant-function-state" # run the detector with slither.py --ARGUMENT
HELP = "Constant functions changing the state" # help information
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-changing-the-state"
WIKI_TITLE = "Constant functions changing the state"
# region wiki_description
WIKI_DESCRIPTION = """
Functions declared as `constant`/`pure`/`view` change the state.
`constant`/`pure`/`view` was not enforced prior to Solidity 0.5.
Starting from Solidity 0.5, a call to a `constant`/`pure`/`view` function uses the `STATICCALL` opcode, which reverts in case of state modification.
As a result, a call to an [incorrectly labeled function may trap a contract compiled with Solidity 0.5](https://solidity.readthedocs.io/en/develop/050-breaking-changes.html#interoperability-with-older-contracts)."""
# endregion wiki_description
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Constant{
uint counter;
function get() public view returns(uint){
counter = counter +1;
return counter
}
}
```
`Constant` was deployed with Solidity 0.4.25. Bob writes a smart contract that interacts with `Constant` in Solidity 0.5.0.
All the calls to `get` revert, breaking Bob's smart contract execution."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = (
"Ensure that attributes of contracts compiled prior to Solidity 0.5.0 are correct."
)
VULNERABLE_SOLC_VERSIONS = ALL_SOLC_VERSIONS_04
def _detect(self):
"""Detect the constant function changing the state
Recursively visit the calls
Returns:
list: {'vuln', 'filename,'contract','func','#varsWritten'}
"""
results = []
for c in self.contracts:
for f in c.functions:
if f.contract_declarer != c:
continue
if f.view or f.pure:
variables_written = f.all_state_variables_written()
if variables_written:
attr = "view" if f.view else "pure"
info = [
f,
f" is declared {attr} but changes state variables:\n",
]
for variable_written in variables_written:
info += ["\t- ", variable_written, "\n"]
res = self.generate_result(info, {"contains_assembly": False})
results.append(res)
return results
@staticmethod
def _format(slither, result):
custom_format(slither, result)
| 3,187 | Python | .py | 72 | 35.513889 | 215 | 0.653747 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,196 | locked_ether.py | NioTheFirst_ScType/slither/detectors/attributes/locked_ether.py | """
Check if ethers are locked in the contract
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import (
HighLevelCall,
LowLevelCall,
Send,
Transfer,
NewContract,
LibraryCall,
InternalCall,
)
class LockedEther(AbstractDetector): # pylint: disable=too-many-nested-blocks
ARGUMENT = "locked-ether"
HELP = "Contracts that lock ether"
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#contracts-that-lock-ether"
WIKI_TITLE = "Contracts that lock Ether"
WIKI_DESCRIPTION = "Contract with a `payable` function, but without a withdrawal capacity."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
pragma solidity 0.4.24;
contract Locked{
function receive() payable public{
}
}
```
Every Ether sent to `Locked` will be lost."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Remove the payable attribute or add a withdraw function."
@staticmethod
def do_no_send_ether(contract):
functions = contract.all_functions_called
to_explore = functions
explored = []
while to_explore: # pylint: disable=too-many-nested-blocks
functions = to_explore
explored += to_explore
to_explore = []
for function in functions:
calls = [c.name for c in function.internal_calls]
if "suicide(address)" in calls or "selfdestruct(address)" in calls:
return False
for node in function.nodes:
for ir in node.irs:
if isinstance(
ir,
(Send, Transfer, HighLevelCall, LowLevelCall, NewContract),
):
if ir.call_value and ir.call_value != 0:
return False
if isinstance(ir, (LowLevelCall)):
if ir.function_name in ["delegatecall", "callcode"]:
return False
# If a new internal call or librarycall
# Add it to the list to explore
# InternalCall if to follow internal call in libraries
if isinstance(ir, (InternalCall, LibraryCall)):
if not ir.function in explored:
to_explore.append(ir.function)
return True
def _detect(self):
results = []
for contract in self.compilation_unit.contracts_derived:
if contract.is_signature_only():
continue
funcs_payable = [function for function in contract.functions if function.payable]
if funcs_payable:
if self.do_no_send_ether(contract):
info = ["Contract locking ether found:\n"]
info += ["\tContract ", contract, " has payable functions:\n"]
for function in funcs_payable:
info += ["\t - ", function, "\n"]
info += "\tBut does not have a function to withdraw the ether\n"
json = self.generate_result(info)
results.append(json)
return results
| 3,474 | Python | .py | 80 | 30.8375 | 100 | 0.578574 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,197 | unimplemented_interface.py | NioTheFirst_ScType/slither/detectors/attributes/unimplemented_interface.py | """
Module detecting unimplemented interfaces
Collect all the interfaces
Check for contracts which implement all interface functions but do not explicitly derive from those interfaces.
"""
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
class MissingInheritance(AbstractDetector):
"""
Unimplemented interface detector
"""
ARGUMENT = "missing-inheritance"
HELP = "Missing inheritance"
IMPACT = DetectorClassification.INFORMATIONAL
CONFIDENCE = DetectorClassification.HIGH
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#missing-inheritance"
WIKI_TITLE = "Missing inheritance"
WIKI_DESCRIPTION = "Detect missing inheritance."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
interface ISomething {
function f1() external returns(uint);
}
contract Something {
function f1() external returns(uint){
return 42;
}
}
```
`Something` should inherit from `ISomething`.
"""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Inherit from the missing interface or contract."
@staticmethod
def detect_unimplemented_interface(contract, interfaces):
"""
Detects if contract intends to implement one of the interfaces but does not explicitly do so by deriving from it
:param contract: The contract to check
:param interfaces: List of all the interfaces
:return: Interfaces likely intended to implement by the contract
"""
intended_interfaces = []
sigs_contract = {f.full_name for f in contract.functions_entry_points}
if not sigs_contract:
return intended_interfaces
for interface in interfaces:
# If contract already inherits from interface, skip that interface
if interface in contract.inheritance:
continue
sigs_interface = {f.full_name for f in interface.functions_entry_points}
# Contract should implement all the functions of the intended interface
if not sigs_interface.issubset(sigs_contract):
continue
# A parent contract inherited should not implement a superset of intended interface
# This is because in the following:
# interface ERC20_interface:
# - balanceOf(uint) -> uint
# - transfer(address, address) -> bool
# contract ForeignToken:
# - balanceOf(uint) -> uint
# contract MyERC20Implementation is ERC20_interface
#
# We do not want MyERC20Implementation to be declared as missing ForeignToken interface
intended_interface_is_subset_parent = False
for parent in contract.inheritance:
sigs_parent = {f.full_name for f in parent.functions_entry_points}
if sigs_interface.issubset(sigs_parent):
intended_interface_is_subset_parent = True
break
if not intended_interface_is_subset_parent:
# Should not be a subset of an earlier determined intended_interface or derive from it
intended_interface_is_subset_intended = False
for intended_interface in list(intended_interfaces):
sigs_intended_interface = {
f.full_name for f in intended_interface.functions_entry_points
}
if (
sigs_interface.issubset(sigs_intended_interface)
or interface in intended_interface.inheritance
):
intended_interface_is_subset_intended = True
break
# If superset of an earlier determined intended_interface or derives from it,
# remove the intended_interface
if (
sigs_intended_interface.issubset(sigs_interface)
or intended_interface in interface.inheritance
):
intended_interfaces.remove(intended_interface)
if not intended_interface_is_subset_intended:
intended_interfaces.append(interface)
return intended_interfaces
def _detect(self):
"""Detect unimplemented interfaces
Returns:
list: {'contract'}
"""
# Collect all the interfaces
# Here interface can be "interface" from solidity, or contracts with only functions declaration
# Skip interfaces without functions
interfaces = [
contract
for contract in self.compilation_unit.contracts
if contract.is_signature_only()
and any(not f.is_constructor_variables for f in contract.functions)
]
# Check derived contracts for missing interface implementations
results = []
for contract in self.compilation_unit.contracts_derived:
# Skip interfaces
if contract in interfaces:
continue
intended_interfaces = self.detect_unimplemented_interface(contract, interfaces)
for interface in intended_interfaces:
info = [contract, " should inherit from ", interface, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 5,485 | Python | .py | 118 | 35.008475 | 120 | 0.636789 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,198 | const_functions_asm.py | NioTheFirst_ScType/slither/detectors/attributes/const_functions_asm.py | """
Module detecting constant functions
Recursively check the called functions
"""
from slither.detectors.abstract_detector import (
AbstractDetector,
DetectorClassification,
ALL_SOLC_VERSIONS_04,
)
from slither.formatters.attributes.const_functions import custom_format
class ConstantFunctionsAsm(AbstractDetector):
"""
Constant function detector
"""
ARGUMENT = "constant-function-asm" # run the detector with slither.py --ARGUMENT
HELP = "Constant functions using assembly code" # help information
IMPACT = DetectorClassification.MEDIUM
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-using-assembly-code"
WIKI_TITLE = "Constant functions using assembly code"
# region wiki_description
WIKI_DESCRIPTION = """
Functions declared as `constant`/`pure`/`view` using assembly code.
`constant`/`pure`/`view` was not enforced prior to Solidity 0.5.
Starting from Solidity 0.5, a call to a `constant`/`pure`/`view` function uses the `STATICCALL` opcode, which reverts in case of state modification.
As a result, a call to an [incorrectly labeled function may trap a contract compiled with Solidity 0.5](https://solidity.readthedocs.io/en/develop/050-breaking-changes.html#interoperability-with-older-contracts)."""
# endregion wiki_description
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract Constant{
uint counter;
function get() public view returns(uint){
counter = counter +1;
return counter
}
}
```
`Constant` was deployed with Solidity 0.4.25. Bob writes a smart contract that interacts with `Constant` in Solidity 0.5.0.
All the calls to `get` revert, breaking Bob's smart contract execution."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = (
"Ensure the attributes of contracts compiled prior to Solidity 0.5.0 are correct."
)
VULNERABLE_SOLC_VERSIONS = ALL_SOLC_VERSIONS_04
def _detect(self):
"""Detect the constant function using assembly code
Recursively visit the calls
Returns:
list: {'vuln', 'filename,'contract','func','#varsWritten'}
"""
results = []
for c in self.contracts:
for f in c.functions:
if f.contract_declarer != c:
continue
if f.view or f.pure:
if f.contains_assembly:
attr = "view" if f.view else "pure"
info = [f, f" is declared {attr} but contains assembly code\n"]
res = self.generate_result(info, {"contains_assembly": True})
results.append(res)
return results
@staticmethod
def _format(comilation_unit, result):
custom_format(comilation_unit, result)
| 2,911 | Python | .py | 66 | 36.984848 | 215 | 0.686351 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
2,286,199 | arbitrary_send_eth.py | NioTheFirst_ScType/slither/detectors/functions/arbitrary_send_eth.py | """
Module detecting send to arbitrary address
To avoid FP, it does not report:
- If msg.sender is used as index (withdraw situation)
- If the function is protected
- If the value sent is msg.value (repay situation)
- If there is a call to transferFrom
TODO: dont report if the value is tainted by msg.value
"""
from typing import List
from slither.core.cfg.node import Node
from slither.core.declarations import Function, Contract
from slither.analyses.data_dependency.data_dependency import is_tainted, is_dependent
from slither.core.declarations.solidity_variables import (
SolidityFunction,
SolidityVariableComposed,
)
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification
from slither.slithir.operations import (
HighLevelCall,
Index,
LowLevelCall,
Send,
SolidityCall,
Transfer,
)
# pylint: disable=too-many-nested-blocks,too-many-branches
from slither.utils.output import Output
def arbitrary_send(func: Function):
if func.is_protected():
return []
ret: List[Node] = []
for node in func.nodes:
for ir in node.irs:
if isinstance(ir, SolidityCall):
if ir.function == SolidityFunction("ecrecover(bytes32,uint8,bytes32,bytes32)"):
return False
if isinstance(ir, Index):
if ir.variable_right == SolidityVariableComposed("msg.sender"):
return False
if is_dependent(
ir.variable_right,
SolidityVariableComposed("msg.sender"),
func.contract,
):
return False
if isinstance(ir, (HighLevelCall, LowLevelCall, Transfer, Send)):
if isinstance(ir, (HighLevelCall)):
if isinstance(ir.function, Function):
if ir.function.full_name == "transferFrom(address,address,uint256)":
return False
if ir.call_value is None:
continue
if ir.call_value == SolidityVariableComposed("msg.value"):
continue
if is_dependent(
ir.call_value,
SolidityVariableComposed("msg.value"),
func.contract,
):
continue
if is_tainted(ir.destination, func.contract):
ret.append(node)
return ret
def detect_arbitrary_send(contract: Contract):
"""
Detect arbitrary send
Args:
contract (Contract)
Returns:
list((Function), (list (Node)))
"""
ret = []
for f in [f for f in contract.functions if f.contract_declarer == contract]:
nodes = arbitrary_send(f)
if nodes:
ret.append((f, nodes))
return ret
class ArbitrarySendEth(AbstractDetector):
ARGUMENT = "arbitrary-send-eth"
HELP = "Functions that send Ether to arbitrary destinations"
IMPACT = DetectorClassification.HIGH
CONFIDENCE = DetectorClassification.MEDIUM
WIKI = "https://github.com/crytic/slither/wiki/Detector-Documentation#functions-that-send-ether-to-arbitrary-destinations"
WIKI_TITLE = "Functions that send Ether to arbitrary destinations"
WIKI_DESCRIPTION = "Unprotected call to a function sending Ether to an arbitrary address."
# region wiki_exploit_scenario
WIKI_EXPLOIT_SCENARIO = """
```solidity
contract ArbitrarySendEth{
address destination;
function setDestination(){
destination = msg.sender;
}
function withdraw() public{
destination.transfer(this.balance);
}
}
```
Bob calls `setDestination` and `withdraw`. As a result he withdraws the contract's balance."""
# endregion wiki_exploit_scenario
WIKI_RECOMMENDATION = "Ensure that an arbitrary user cannot withdraw unauthorized funds."
def _detect(self) -> List[Output]:
""""""
results = []
for c in self.contracts:
arbitrary_send_result = detect_arbitrary_send(c)
for (func, nodes) in arbitrary_send_result:
info = [func, " sends eth to arbitrary user\n"]
info += ["\tDangerous calls:\n"]
# sort the nodes to get deterministic results
nodes.sort(key=lambda x: x.node_id)
for node in nodes:
info += ["\t- ", node, "\n"]
res = self.generate_result(info)
results.append(res)
return results
| 4,616 | Python | .py | 117 | 29.777778 | 126 | 0.623882 | NioTheFirst/ScType | 8 | 4 | 1 | AGPL-3.0 | 9/5/2024, 10:48:01 PM (Europe/Amsterdam) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.