1

BiAn is a source code level code obfuscation tool developed for Solidity smart contracts. I run it by BiAn GitHub.

I've cloned BiAn correctly by:

git clone https://github.com/xf97/BiAn

After that, I change the directory to the BiAn src and there I run it by:

python main.py <contractName>.sol <contractName>.ast

But, This error occurred and the process stopped:

Traceback (most recent call last):
  File "...\BiAn\src\main.py", line 5, in <module>
    from dataflowObfuscation import dataflowObfuscation
  File "...\BiAn\src\dataflowObfuscation.py", line 15, in <module>
    from literal2Exp import literal2Exp
  File "...\BiAn\src\literal2Exp.py", line 5, in <module>
    from generateExp import generateExp
  File "...\BiAn\src\generateExp.py", line 7, in <module>
    from postProcessing import postProcessing
  File "...\BiAn\src\postProcessing.py", line 4, in <module>
    from fraction import Fraction
ModuleNotFoundError: No module named 'fraction'

It seems there is no module named fraction in the src. I checked the online file on BiAn's GitHub and see that doesn't exist there too. So, because of that, BiAn can't do its task. What is the solution? How can I find the module?

1
  • FYI Self-answering is allowed; I took the time to post the answer you got from Github.
    – eth
    Commented Jun 21, 2023 at 16:33

1 Answer 1

0

Install the Fraction package: pip3 install Fraction

Source: https://github.com/xf97/BiAn/issues/3#issuecomment-1577216752

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.