Store all files in a common location in users home directory
Handle error writing file (exit with data logged to console for recovery/manual save)
Create all files as read-only to reduce the chance of accidental deletion
Mnemonic:
Handle password match on create (retry 3 times -> exit on error)
Warn user for redundant backup (keystore + manual recovery mechanism via mnemonic)
Handle recovery from keystore (default location), keystore (manual file location), mnemonic (retry 3 times -> exit on error)
Wallet:
Handle hot wallet funded state for distributions that have not started, partial distributions, or complete distributions
Handle mismatch state between number of transactions in distribution vs number of txs signed/broadcasted.
Sign transaction are all or nothing (ie. we won't write state file unless all txs have been signed successfully)
Handle picking up from completed sign transaction step (begin broadcasting transactions)
Handle transaction broadcasting:
Write all success txids for each run (allow partial broadcast)
Pick up from partial broadcast and continue attempting to broadcast remaining txs
Handle error broadcasting transaction
IPFS:
Handle invalid epoch IPFS hash (exit on error)
Handle invalid epoch IPFS contents (exit on error)
Handle invalid metadata IPFS hash (exit on error)
Handle invalid metadata IPFS contents (exit on error)
Confirm metadata update of existing epoch ipfs hash
General:
Re-running the script after an error will pick up from the existing state files (wallet recovery, funding step, distribution step)
Attempt to start a new distribution for the same epoch if an in progress distribution is detected will throw a waning requiring action before continuing
Files:
Mnemonic:
Wallet:
IPFS:
General: