Interacting with a contract with Cloud Code

Iā€™m trying to make some Cloud Code interact with a deployed contract. Currently, I see too ways to get the ABI:

  1. Directly paste it in a TS/JS file, which does not allow the use of typechain.
  2. Importing the ABI as a JSON file, which throws an error as it is not a ā€œwhitelistedā€ module.

One easy workaround is to maintain both copies (inline and JSON file) so that typechain can generate the correct type data from the JSON, but care must be taken that both are exact copies.