From 55171c2496a7dbe2b4cdc26ff4ca1d3a2b8e0fdd Mon Sep 17 00:00:00 2001 From: aeolian <94939382+aeolianeth@users.noreply.github.com> Date: Sun, 1 Dec 2024 22:18:09 +1000 Subject: [PATCH] Add comment --- scripts/abi-codegen.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/abi-codegen.js b/scripts/abi-codegen.js index 4cb19ecda4..c3b27fba87 100644 --- a/scripts/abi-codegen.js +++ b/scripts/abi-codegen.js @@ -1,3 +1,15 @@ +/** + * A script to generate a selection of typescript files that contain the ABI and address of JB contracts. + * + * Behaviour differs slightly, depending on what contract we're importing. + * + * The idea is: instead asyncronously importing the JSON files at runtime, we bundle them into a TS file, and import that instead. + * This way: + * - we reduce the number of individual files that Next/webpack builds + * - we save on some total bundle size (the total TS files < the total JSON files) + * - src code is simpler to read and understand + */ + const fs = require('fs') const core = [