# Terminate Contracts

## Description

Terminate Abacus contracts in bulk

[Jira ACC-8681](https://theorchard.atlassian.net/browse/ACC-8681)

## Running in Prod

You may encounter issues reaching prod resources on your local machine, regardless of VPN or other network configurations.

If so, you can [create a dev box](https://www.notion.so/AWS-Dev-Boxes-9736a3abda964fcaa530c9a7b1947df7?source=copy_link#1686b244609447a19cdad3be62b9c90c) or access the shared jump box and run the script there. See [SSH key setup for dev boxes / jump box](https://www.notion.so/SSH-key-setup-for-dev-boxes-jump-box-5689b3c8cb204b63b488a179fecea9d5?source=copy_link) for instructions.

Optional: Once setup, the [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) VS Code extension is useful. It opens a workspace that points to the remote machine, allowing you to develop / run the script the same way you would locally.

## Instructions

1. Create a JSON file containing contract IDs and termination effective dates (see [input.example.json](./input.example.json))
   - Dates must be in `YYYY-MM-DD` format.
   - Dates can be in the past, present or future.
   - `terminationNoticeReceived` may optionally be provided.

1. Configure your `.env` file

1. Run
   ```bash
   $ npm start
   ```

1. Review your output (See [output.example.json](./output.example.json))
