zkapp-cli
zkapp-cli copied to clipboard
Add feature to go back in process (where makes sense)
It seems it will be very useful if some complex scenarios will have an option to go one step back from where the user is at the moment. For example, good candidate will be deployment alias configuration with another fee payer selected. In the end of the list of existing stored/cached fee payer accounts it will be also good to provide the "go back" option, which will bring user one step back in process (list of available option that will create/reuse the fee payer account - recover from private key, create new, use another stored account).
zk config
┌─────────────────────────────────────────────────────────┐
│ Deploy aliases in config.json │
├──────┬───────────────────────────────┬──────────────────┤
│ Name │ URL │ Smart Contract │
├──────┼───────────────────────────────┼──────────────────┤
│ 1 │ http://localhost:8282/graphql │ (never deployed) │
├──────┼───────────────────────────────┼──────────────────┤
│ 2 │ http://localhost:8282/graphql │ (never deployed) │
├──────┼───────────────────────────────┼──────────────────┤
│ 3 │ http://localhost:8282/graphql │ (never deployed) │
└──────┴───────────────────────────────┴──────────────────┘
Enter values to create a deploy alias:
✔ Create a name (can be anything): · 4
✔ Set the Mina GraphQL API URL to deploy to: · http://localhost:8282/graphql
✔ Set transaction fee to use when deploying (in MINA): · 1
✔ Choose an account to pay transaction fees: · Use a different account (select to see options)
✔ feepayer · Choose another saved fee payer
? Choose another saved fee payer: …
1
2
❯ 3
This is an interesting idea @shimkiv that I think will be very useful in certain situations. Are you proposing a back option in every step, or just in certain situations like when prompted to select from multiple cached fee payers?
I was thinking to make it possible to go back from final steps of deployment aliases configuration. But having it for one scenario when prompted to select from multiple cached fee payers will be good starting point.
We have the following options to deal with fee payer accounts: use cached, recover from private key, create new and select another existing cached one.
The "go back" visual option can only be listed for the last case (select another account), hence, I believe ideal candidate.
In other cases like recovering from PK and creating new account we might add this feature by checking if, for example, user pressed esc button, that will return users back to the list of available option of fee payer account management for this deployment alias.