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

feat: deprecate --unsigned flag in favor of --default-signer for forc-deploy/run #4957

Merged
merged 4 commits into from
Aug 16, 2023

Conversation

kayagokalp
Copy link
Member

@kayagokalp kayagokalp commented Aug 15, 2023

Description

This PR deprecates --unsigned flag in favor of --default-signer. The reasoning is the following:

The reason forc-deploy was offering --unsigned flag was enabling users to create deployment transactions agains their local node without going through wallet funding steps, an ease of development & testing. There are some accounts funded by fuel-core by default, we can still offer the same seamless deployment to local node by signing them with one of these default accounts. So after this PR we can use the following command to deploy to a local node without going through any manual signing/funding steps:

forc-deploy --default-signer

 Compiling library core (/Users/kayagokalp/.forc/git/checkouts/std-9be0d6062747ea7/241d30f7cde5cdd1f378eb2bc1daae945f329d0c/sway-lib-core)
 Compiling library std (git+https://github.com/fuellabs/sway?tag=v0.44.0#241d30f7cde5cdd1f378eb2bc1daae945f329d0c)
 Compiling contract target-deploy (/Users/kayagokalp/fuel/test_projects/target-deploy)
  Finished debug in 4.496855625s
  contract target-deploy
      Bytecode size: 68 bytes


Contract target-deploy Deployed!

Network: http://127.0.0.1:4000
Contract ID: 0xed71e83b4783f463b9cf4ccd29818d2855878c241c7c957cafa6eb36d543122d
Deployed in block 0xb640ef91c7e988cd5d79efbae433eb970b5d7fc13ad49c6b6554795849edbaaa

We are still keeping the --unsigned flag to make sure anyone depending on it does not break out of no where but we print an explicit warning alongside it. Basically it is now aliased to --default-signer by default and should be removed completely after giving downstream enough time to settle.

forc-deploy --unsigned

 Warning: --unsigned flag is deprecated, please prefer using --default-signer. Assuming `--default-signer` is passed. This means your transaction will be signed by an account that is funded by fuel-core by default for testing purposes.
 Compiling library core (/Users/kayagokalp/.forc/git/checkouts/std-9be0d6062747ea7/241d30f7cde5cdd1f378eb2bc1daae945f329d0c/sway-lib-core)
 Compiling library std (git+https://github.com/fuellabs/sway?tag=v0.44.0#241d30f7cde5cdd1f378eb2bc1daae945f329d0c)
 Compiling contract target-deploy (/Users/kayagokalp/fuel/test_projects/target-deploy)
  Finished debug in 4.63308225s
  contract target-deploy
      Bytecode size: 68 bytes


Contract target-deploy Deployed!

Network: http://127.0.0.1:4000
Contract ID: 0xf969a84f0351033de85d9867c68d1b3ae122ff26de858441aef9d60f2a8ba45f
Deployed in block 0x8ebd8ba5c88bb4ed05d854a40a7e6b6aa582d03d2c947189ea631e58a08eabc5

@kayagokalp kayagokalp added bug Something isn't working enhancement New feature or request P: critical Should be looked at before anything else forc-deploy Everything to do with forc-deploy labels Aug 15, 2023
@kayagokalp kayagokalp self-assigned this Aug 15, 2023
@kayagokalp kayagokalp changed the title feat: deprecate --unsigned flag in favor of --default-signer for forc-deploy feat: deprecate --unsigned flag in favor of --default-signer for forc-deploy/run Aug 15, 2023
@kayagokalp kayagokalp marked this pull request as ready for review August 15, 2023 22:40
@kayagokalp kayagokalp enabled auto-merge (squash) August 15, 2023 22:40
@kayagokalp kayagokalp enabled auto-merge (squash) August 15, 2023 22:41
@kayagokalp kayagokalp requested a review from a team August 15, 2023 22:41
Copy link
Member

@sdankel sdankel 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 requested a review from a team August 16, 2023 06:09
Copy link
Member

@JoshuaBatty JoshuaBatty left a comment

Choose a reason for hiding this comment

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

utACK, thanks :)

@kayagokalp kayagokalp merged commit dbc083f into master Aug 16, 2023
30 checks passed
@kayagokalp kayagokalp deleted the kayagokalp/4956 branch August 16, 2023 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request forc-deploy Everything to do with forc-deploy P: critical Should be looked at before anything else
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants