Skip to content

Instantly share code, notes, and snippets.

@pi0neerpat
Created October 17, 2023 23:17
Show Gist options
  • Save pi0neerpat/0984343ca5c0f784f3387f1435af4a5e to your computer and use it in GitHub Desktop.
Save pi0neerpat/0984343ca5c0f784f3387f1435af4a5e to your computer and use it in GitHub Desktop.
Slither error for open-dollar/od-contract@v1.5.5
'forge clean' running (wd: /Users/dev/repos/opendollar/od-contracts)
'forge build --build-info' running (wd: /Users/dev/repos/opendollar/od-contracts)
ERROR:ContractSolcParsing:Missing function Variable not found: alice (context E2EGlobalSettlementTest)
ERROR:ContractSolcParsing:Missing function Variable not found: alice (context E2EGlobalSettlementTestDirectUser)
ERROR:ContractSolcParsing:Missing function Variable not found: alice (context E2EGlobalSettlementTestProxyUser)
ERROR:ContractSolcParsing:Missing function Variable not found: setUp() (context E2EJobsTest)
ERROR:ContractSolcParsing:Missing function Variable not found: setUp() (context E2EJobsTestDirectUser)
ERROR:ContractSolcParsing:Missing function Variable not found: setUp() (context E2EJobsTestProxyUser)
ERROR:ContractSolcParsing:Missing function Variable not found: _collectFees(bytes32,uint256) (context E2EStabilityFeeTreasuryTest)
ERROR:ContractSolcParsing:Missing function Variable not found: bob (context E2EStabilityFeeTreasuryTestDirectUser)
ERROR:ContractSolcParsing:Missing function Variable not found: setUp() (context E2ETest)
ERROR:ContractSolcParsing:Missing function Variable not found: setUp() (context E2ETestDirectUserTKN)
ERROR:ContractSolcParsing:Missing function Variable not found: setUp() (context E2ETestProxyUserTKN)
ERROR:ContractSolcParsing:Missing function Variable not found: setUp() (context E2ETestDirectUserTKN8D)
ERROR:ContractSolcParsing:Missing function Variable not found: setUp() (context E2ETestProxyUserTKN8D)
ERROR:SlitherSolcParsing:
Failed to generate IR for CollateralAuctionHouse._getBoughtCollateral. Please open an issue https://github.com/crytic/slither/issues.
CollateralAuctionHouse._getBoughtCollateral (src/contracts/CollateralAuctionHouse.sol#114-133):
_discountedPrice = _collateralPrice.rdiv(_systemCoinPrice).wmul(_customDiscount)
_boughtCollateral = _adjustedBid.wdiv(_discountedPrice)
_boughtCollateral <= _amountToSell
(_boughtCollateral,_adjustedBid)
_readjustedBid = _adjustedBid * _amountToSell / _boughtCollateral
(_amountToSell,_readjustedBid)
Traceback (most recent call last):
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/core/cfg/node.py", line 908, in _find_read_write_call
self._high_level_calls.append((ir.destination.type.type, ir.function))
AttributeError: 'NoneType' object has no attribute 'type'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/__main__.py", line 814, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/__main__.py", line 102, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/__main__.py", line 80, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/slither.py", line 135, in __init__
self._init_parsing_and_analyses(kwargs.get("skip_analyze", False))
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/slither.py", line 155, in _init_parsing_and_analyses
raise e
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/slither.py", line 151, in _init_parsing_and_analyses
parser.analyze_contracts()
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 541, in analyze_contracts
self._convert_to_slithir()
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 767, in _convert_to_slithir
raise e
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 752, in _convert_to_slithir
func.generate_slithir_and_analyze()
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/core/declarations/function.py", line 1760, in generate_slithir_and_analyze
node.slithir_generation()
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/core/cfg/node.py", line 708, in slithir_generation
self._find_read_write_call()
File "/Users/dev/Library/Python/3.9/lib/python/site-packages/slither/core/cfg/node.py", line 911, in _find_read_write_call
raise SlitherException(
slither.exceptions.SlitherException: Function not found on IR: TMP_28194(None) = HIGH_LEVEL_CALL, dest:TMP_28193(None), function:wmul, arguments:['_customDiscount'] .
Node: NEW VARIABLE _discountedPrice = _collateralPrice.rdiv(_systemCoinPrice).wmul(_customDiscount) (src/contracts/CollateralAuctionHouse.sol#122)
Function: _getBoughtCollateral
Please try compiling with a recent Solidity version. 'NoneType' object has no attribute 'type'
ERROR:root:Error:
ERROR:root:Function not found on IR: TMP_28194(None) = HIGH_LEVEL_CALL, dest:TMP_28193(None), function:wmul, arguments:['_customDiscount'] .
Node: NEW VARIABLE _discountedPrice = _collateralPrice.rdiv(_systemCoinPrice).wmul(_customDiscount) (src/contracts/CollateralAuctionHouse.sol#122)
Function: _getBoughtCollateral
Please try compiling with a recent Solidity version. 'NoneType' object has no attribute 'type'
ERROR:root:Please report an issue to https://github.com/crytic/slither/issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment