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

Replace Armlet with MythXJS #71

Merged
merged 4 commits into from
Aug 9, 2019
Merged

Replace Armlet with MythXJS #71

merged 4 commits into from
Aug 9, 2019

Conversation

blitz-1306
Copy link
Collaborator

@blitz-1306 blitz-1306 commented Aug 6, 2019

Tasks

Status

Stable. Review will be appreciated.

Changes

  • Removed Armlet dependency.
  • Added MythXJS dependency.
  • Overhauled lib/client.js to use MythXJS instead of Armlet:
    • getRequestData() now completely controls analysis data arranging process (that was partial due to Armlet's older interface).
    • getMythXReport() is async now because must control a lot of asynchronous remote actions, provided by MythXJS.
  • Minor fixes in sabre.js:
    • Implemented --version CLI option/switch.
    • Implemented --help CLI option/switch.
    • Added v-spaces between some constructs for clarity.
    • Switched arguments for getRequestData() and getMythXReport().
    • Renamed mythxSpinner to analysisSpinner.
    • Other minor stuff.

Notes

  • No error handling to refresh JWT tokens yet. It is a question if this logic is needed in case of short-term analyses.
  • MythxJS is not yet supporting --noCacheLookup parameter, so it will need additional fix. I've created a PR for it: Add support for noCacheLookup API parameter Consensys/mythxjs#24. When it will be merged, we will need to recheck current behavior.
  • Polling mechanic is borrowed from Armlet and optimized little bit.
  • This PR is heavily relying on async / await.

Regards, @blitz-1306.

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

Successfully merging this pull request may close these issues.

Refactor sabre to use mythxjs instead of Armlet
2 participants