near-cli
near-cli copied to clipboard
Confirm each near-cli action
Is your feature request related to a problem? Please describe.
Currently all transactions by near-shell are done without confirmations. With coming upgrades and renames, it's sometimes easy to mess up a transaction you want to do.
For example it's unclear how much gas near call
will attach by default. Or whether the --amount
is at NEAR tokens or yoctoNEAR.
Describe the solution you'd like
I suggest to display the transaction we want to send (before singing it) in a JSON format. It will be easy to inspect all fields visually. You can also check all default parameters and make sure they are legit.
Once satisfied with the result, near-shell should ask you to confirm the transaction with simple y/N
question. Where N
is default option.
You should be able to overwrite this confirmation by passing -y
flag to the command.
Describe alternatives you've considered
Add -n
flag that doesn't send a transaction, but only prints it.
Also once the transaction is signed. We can always link it to explorer, since we know the signer_id
and the transaction hash.