message: make sure generated dir exists before codegen
diff: @@ -12,7 +12,8 @@ const addressFile = resolve(join(__dirname, '..', '..', 'cardpay-sdk', 'contract
  const abiDir = resolve(join(__dirname, '..', 'abis', 'generated'));
  const subgraphTemplateFile = resolve(join(__dirname, '..', 'subgraph-template.yaml'));
  const subgraphFile = resolve(join(__dirname, '..', 'subgraph.yaml'));
  -const generatedAddresses = join(__dirname, '..', 'src', 'generated', 'addresses.ts');
  +const generatedDir = join(__dirname, '..', 'src', 'generated');
  +const generatedAddresses = join(generatedDir, 'addresses.ts');
  const network = process.argv.slice(2)[0];
  if (!network) {
  @@ -81,6 +82,7 @@ let subgraph = readFileSync(subgraphTemplateFile, { encoding: 'utf8' })
  removeSync(subgraphFile);
  writeFileSync(subgraphFile, subgraph);
  +ensureDirSync(generatedDir);
  writeFileSync(
  generatedAddresses,
  `
  