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

Spin up explorer with forc command #608

Closed
alex-matthe opened this issue Jan 10, 2022 · 5 comments · Fixed by #674
Closed

Spin up explorer with forc command #608

alex-matthe opened this issue Jan 10, 2022 · 5 comments · Fixed by #674
Assignees
Labels
enhancement New feature or request forc

Comments

@alex-matthe
Copy link
Contributor

alex-matthe commented Jan 10, 2022

Add forc explorer command to start a server that serves the static files used for the Explorer web app

Optional flags

  • --port: override the default port number
@alex-matthe alex-matthe added enhancement New feature or request forc labels Jan 10, 2022
@alex-matthe alex-matthe self-assigned this Jan 10, 2022
@adlerjohn
Copy link
Contributor

Does this require https://github.com/FuelLabs/block-explorer-v2? If so, might be worth making that repo public. Is it cleaned up?

One questions I would have wrt implementation, is how will the block explorer files be distributed?

@SilentCicero
Copy link
Member

@adlerjohn from my knowledge, it would just be a static compressed build that can be quickly hosted with a simple HTTP server.

But the CI might eventually want to build the current explorer from scratch, so I'd say open-sourcing it is the way to go.

@adlerjohn
Copy link
Contributor

That makes sense. My questions was more about versioning and such. Are we going to add a tarball of the block explorer to the Sway repo and distribute it with Forc? How to handle version upgrades? Etc. Seems easier to just fetch it from the git repo, but still need to consider versioning, as their may be incompatibilities and so on. @alex-matthe can you propose how you'd deal with the above to make sure there's a reasonable solution?

@alex-matthe
Copy link
Contributor Author

alex-matthe commented Jan 10, 2022

I already started to work on this. I was thinking the same as Nick, start with a simpler implementation and have a local server which serves the static files (manually added in the forc repo).
At the next iteration I want the forc explorer command to build the web app in the following situations:

  • at first run
  • when --url param changes (this is required at build time)
  • when the version of the explorer is lower than the minimum version required by fuel-core (this can happen for fuel-core alpha/beta version, breaking changes, etc).

And yes, the explorer repo needs to be public. What do you think?

@adlerjohn
Copy link
Contributor

Just made the repo public to avoid headaches.

manually added in the forc repo

I'm against that, because it would add a binary artifact that must be kept around forever (or involve ugly mangling of the Sway repo, which should really be avoided). I know it might take a tiny bit longer, but if you want just a tarball of the block explorer source, tag a release, then download the resultant source tarball from GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request forc
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants