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

forc-deploy should list accounts rather than selecting 0th account automatically #4756

Closed
kayagokalp opened this issue Jul 6, 2023 · 0 comments · Fixed by #4771
Closed
Assignees
Labels
enhancement New feature or request forc-deploy Everything to do with forc-deploy

Comments

@kayagokalp
Copy link
Member

We should expose forc-wallet listing functionality so that forc-deploy can offer users a TUI which enables them to select an account.

@kayagokalp kayagokalp added enhancement New feature or request forc-deploy Everything to do with forc-deploy labels Jul 6, 2023
@kayagokalp kayagokalp self-assigned this Jul 18, 2023
kayagokalp added a commit that referenced this issue Aug 8, 2023
…account (#4771)

## Description
closes #4757.
closes #4756.

This PR adds balance query capabilities to forc-deploy so that users can
select the desired account to use before signing their transaction.
Current output looks like:

```console
Please provide the password of your encrypted wallet vault at "/Users/kayagokalp/.fuel/wallets/.wallet":

Account 0 -- fuel1x6pc0g9gwp2c2hzhejlw7l4guqd99732zt2wd68j2ukrdu59kv9qqz9h3k:
  Asset ID                                                           Amount
  0000000000000000000000000000000000000000000000000000000000000000 4294967295

Please provide the index of account to use for signing:0
Do you accept to sign this transaction with fuel1x6pc0g9gwp2c2hzhejlw7l4guqd99732zt2wd68j2ukrdu59kv9qqz9h3k? [y/N]: y


Contract deploy_test_integration Deployed!

Network: http://127.0.0.1:4000
Contract ID: 0x73ea64a310b6fc2c9e6674a49f5515f01950d97cc845cb4149ececea6cbf4060
Deployed in block 0x45ee78fed1083c7734246cb93258dcdc865fc9bc13667b89088aeb43037
```

Also now forc-deploy throws an error for empty accounts:
```console
Please provide the password of your encrypted wallet vault at "/Users/kayagokalp/.fuel/wallets/.wallet":
Error: Your wallet does not have any funds to pay for the deployment transaction.
If you are deploying to a testnet consider using the faucet.
If you are deploying to a local node, consider providing a chainConfig which funds your account.
```
Once we integrate a nice TUI selection library the output could be more
interactive with up and down keys etc.
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-deploy Everything to do with forc-deploy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant