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

Add beta-4 target to forc, refactor with tests, and UX improvements #4991

Merged
merged 29 commits into from
Aug 23, 2023

Conversation

sdankel
Copy link
Member

@sdankel sdankel commented Aug 21, 2023

Description

Closes #4974

Added the beta-4 target and updated documentation (from #4974)

Refactored part of forc-deploy and added unit tests.

  • No longer mutating the Command, so the Command is always whatever the user gave us
  • Using the default values from the node itself via API call, rather than hardcoded constants
  • The values of Gas are now optional, so we only override them when the user hasn't specified anything

Other changes:

  • deployment works using the urls without /graphql prefixes, so I updated the constants to remove the prefix. This is shown to the user and it looks cleaner without it.
  • Added coloring and consistent styling for errors and warnings to printed to the console. It looks like this now (previously no color)
  • deploy, run, and submit all now have the same options for specifying the node (node_url, testnet, and target), capture in the TargetNode struct. They use the same helper functions to extract the node url and determine gas limit & price.

image

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@sdankel sdankel changed the title Sophie/4973refactor Refactor, UX improvements, and add beta-4 target to forc Aug 22, 2023
@sdankel sdankel changed the title Refactor, UX improvements, and add beta-4 target to forc Add beta-4 target to forc, refactor with tests, and UX improvements Aug 22, 2023
@sdankel sdankel marked this pull request as ready for review August 22, 2023 01:34
@sdankel sdankel requested a review from a team August 22, 2023 01:34
JoshuaBatty
JoshuaBatty previously approved these changes Aug 22, 2023
@JoshuaBatty JoshuaBatty requested a review from a team August 22, 2023 07:46
xunilrj
xunilrj previously approved these changes Aug 22, 2023
Copy link
Member

@kayagokalp kayagokalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good 🙌 Thanks a lot for the help :) Just a single change requested so that we can deploy with forc-deploy --testnet

forc-plugins/forc-client/src/op/deploy.rs Outdated Show resolved Hide resolved
@sdankel sdankel dismissed stale reviews from xunilrj and JoshuaBatty via 134b203 August 22, 2023 20:32
@kayagokalp
Copy link
Member

Ahh looks like FuelLabs/sway-libs#185 changed folder structure in sway-libs. Fixing it in a separate PR.

@kayagokalp
Copy link
Member

Fix: #4998

kayagokalp
kayagokalp previously approved these changes Aug 22, 2023
Copy link
Member

@kayagokalp kayagokalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :) waiting docs fix to merge so that CI unblocks: #4998

@sdankel sdankel enabled auto-merge (squash) August 23, 2023 05:05
Copy link
Member

@kayagokalp kayagokalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kayagokalp kayagokalp added forc-client Everything related to the `forc-client` crate. forc-deploy Everything to do with forc-deploy enhancement New feature or request labels Aug 23, 2023
@sdankel sdankel merged commit ca4ed7c into master Aug 23, 2023
27 checks passed
@sdankel sdankel deleted the sophie/4973refactor branch August 23, 2023 15:21
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-client Everything related to the `forc-client` crate. forc-deploy Everything to do with forc-deploy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants