Open xactant opened 3 years ago
big +1 on this
plus additional flags: --force-reset-tables (defaults = false) --backup-tables (defaults = $force-reset-tables)
as in the dev process if i redeploy contracts, true automation would require that the old tables are dropped or renamed so that the new contract sync plugin can use the same table names as before
Currently the add-contract CLI script is interactive: asking the user to select events and then iterating through the events to add detail about each event (description, table anme, etc.). When you have a contract, or a group of contracts that have multiple events the interactive process is long and cound be error prone (human caused errors I mean).
Since this script is interactive it is not scriptable which means this process cannot be included in an automated deployment scheme.
Currently the add-contract script is called as:
To enable a user to included this script in automated deployement, the add-contract script could accept a new parameter --jsonPath "MY JSON FILE". This json file would have the list of event names (or signatures) with required details. The script would then only need to be modified to read the json file and then use the data in the json file instead of the interactive portion of the script. So the add-contract script would be called as:
The user could then include a set of add-contract calls to an automated deployment script.