a sub-command named faucet and then drip,create,dissolve,close would be nicer. But we also need to disambiguate with the existing faucet command which requires no reputation.....so for now I can live with this wild jungle of commands. But:
[x] better explain cli commands:
close-faucet: lazy garbage collection. can only be called by faucet creator and only once the faucet is empty
dissolve-faucet: can only be called by root. moreover, explain arguments: first one is the faucet address, second one is the beneficiary of the remainding funds
[x] improve create-faucet
whitelist should be comma-separated to make it clear that it is a single argument. explain in cli help
the return value of this command needs to be the faucet address. First, check extrinsic success, report error, then parse FaucetCreated event for address
[x] drip-faucet: check extrinsic success and extract error if any
[x] add list-faucets command.List all faucet accounts, their name, balance, drip amount and whitelist
The current state is working, but not convenient:
a sub-command named faucet and then drip,create,dissolve,close would be nicer. But we also need to disambiguate with the existing faucet command which requires no reputation.....so for now I can live with this wild jungle of commands. But:
with the upgrade of the api-client, this should all be easier now. (examples are not there yet, unfortunately: https://github.com/scs/substrate-api-client/issues/591)