Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'dict' object has no attribute 'name' in Datadependacy.py #2

Open
Kasche153 opened this issue Apr 29, 2024 · 0 comments

Comments

@Kasche153
Copy link

System

  • Macbook Pro M1 Max
  • macOS Ventura Version 13.0

Requirements.txt

web3utils==0.1.3
z3-solver==4.13.0.0
slither-analyzer==0.10.1
alive-progress==3.1.5

Commands

python -m invconplus.main --address 0x951D51bAeFb72319d9FBE941E1615938d89ABfe2 —maxCount 400

Output including stacktrace

  error:  transferFrom(sender,recipient,amount)  not found in all_func_dependencies
  dict_keys(['maxOTokensIssuable(collateralAmt)', 'transferFrom(sender,recipient,amount)', 'allowance(owner,spender)', 'addETHCollateral(vaultOwner)', 'decreaseAllowance(spender,subtractedValue)', /Users/gustavkasche/Desktop/THESIS/InvConPlus-Tool/Token-data'removeCollateral(amtToRemove)', 'burnOTokens(amtToBurn)', 'transferFee(_address)', 'transfer(recipient,amount)', 'getVault(vaultOwner)', 'calculateCollateralToPay(_oTokens,proportion)', 'createERC20CollateralOption(amtToCreate,amtCollateral,receiver)', 'calculateOTokens(collateralAmt,proportion)', 'owner()', 'isWithinExponentRange(val)', 'constructor(_collateral,_collExp,_underlying,_underlyingExp,_oTokenExchangeExp,_strikePrice,_strikeExp,_strike,_expiry,_optionsExchange,_oracleAddress,_windowSize)', 'createAndSellERC20CollateralOption(amtToCreate,amtCollateral,receiver)', 'transferOwnership(newOwner)', 'addERC20Collateral(vaultOwner,amt)', 'maxOTokensLiquidatable(vaultOwner)', 'renounceOwnership()', '_exercise(oTokensToExercise,vaultToExerciseFrom)', '_approve(owner,spender,amount)', 'isETH(_ierc20)', '_msgSender()', 'hasVault(owner)', 'underlyingRequiredToExercise(oTokensToExercise)', '_addCollateral(vaultOwner,amt)', 'increaseAllowance(spender,addedValue)', 'addAndSellERC20CollateralOption(amtToCreate,amtCollateral,receiver)', 'getVaultOwners()', 'transferUnderlying(_addr,_amt)', '_msgData()', 'totalSupply()', 'notExpired()', 'openVault()', 'liquidate(vaultOwner,oTokensToLiquidate)', 'addAndSellETHCollateralOption(amtToCreate,receiver)', 'onlyOwner()', 'addETHCollateralOption(amtToCreate,receiver)', 'updateParameters(_liquidationIncentive,_liquidationFactor,_transactionFee,_minCollateralizationRatio)', 'transferCollateral(_addr,_amt)', 'addERC20CollateralOption(amtToCreate,amtCollateral,receiver)', '_transfer(sender,recipient,amount)', 'getPrice(asset)', 'createAndSellETHCollateralOption(amtToCreate,receiver)', 'exercise(oTokensToExercise,vaultsToExerciseFrom)', 'isSafe(collateralAmt,oTokensIssued)', 'constructor()', 'hasExpired()', '_mint(account,amount)', '_burn(account,amount)', 'isOwner()', 'isUnsafe(vaultOwner)', 'redeemVaultBalance()', 'balanceOf(account)', 'getOTokensIssued(vaultOwner)', 'getCollateral(vaultOwner)', 'setDetails(_name,_symbol)', 'removeUnderlying()', 'issueOTokens(oTokensToIssue,receiver)', 'isExerciseWindow()', '_transferOwnership(newOwner)', 'approve(spender,amount)', '_burnFrom(account,amount)', 'createETHCollateralOption(amtToCreate,receiver)'])
  Traceback (most recent call last):
    File "/Users/gustavkasche/Desktop/THESIS/InvConPlus-Tool/invconplus/abstractType/DataDependency.py", line 531, in createDerivedVarsForFunc
      return set(self.all_func_dependencies[func_name].createDerivedVarInfos())
    File "/Users/gustavkasche/Desktop/THESIS/InvConPlus-Tool/invconplus/abstractType/DataDependency.py", line 430, in createDerivedVarInfos
      all_varInfo = set(self.getAllVarParentDeps())
    File "/Users/gustavkasche/Desktop/THESIS/InvConPlus-Tool/invconplus/abstractType/DataDependency.py", line 375, in getAllVarParentDeps
      for varDepPair in self.getAllDepdencies():
    File "/Users/gustavkasche/Desktop/THESIS/InvConPlus-Tool/invconplus/abstractType/DataDependency.py", line 163, in getAllDepdencies
      self.replaceVarInfo(paramVarInfo, newVarInfo, all_dependencies, lsVarInfos)
    File "/Users/gustavkasche/Desktop/THESIS/InvConPlus-Tool/invconplus/abstractType/DataDependency.py", line 114, in replaceVarInfo
      value = recursive_replace(pair[0], varInfo, newVarInfo)
    File "/Users/gustavkasche/Desktop/THESIS/InvConPlus-Tool/invconplus/abstractType/DataDependency.py", line 91, in recursive_replace
      elif curVarInfo.derivation.varInfos[i].name == varInfo.name:
  AttributeError: 'dict' object has no attribute 'name'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant