Skip to content

feat: add a typescript version of generate.sh - #15

Merged
spsjvc merged 6 commits into
mainfrom
feat/typescript-generate
Aug 5, 2026
Merged

feat: add a typescript version of generate.sh#15
spsjvc merged 6 commits into
mainfrom
feat/typescript-generate

Conversation

@alxdca

@alxdca alxdca commented Apr 22, 2026

Copy link
Copy Markdown
Contributor
This PR is part of a stack created with Aviator.

Summary

  • add a TypeScript generator entrypoint in generate.ts that validates required env vars, runs the Foundry script, merges optional
    custom alloc JSON, and rewrites serializedChainConfig deterministically before writing genesis/genesis.json
  • add Node.js/pnpm tooling for the TypeScript workflow, including package.json, tsconfig.json, Prettier config, lockfile, and Node
    24 version pinning
  • document the Node.js setup in README.md and ignore generated/dependency directories such as dist/ and node_modules/

Why / Context

  • provide a maintained TypeScript-based workflow for generating genesis files alongside the existing shell-based process
  • make the generator easier to run from standard Node.js tooling with explicit scripts and version requirements
  • keep the generated chain config serialization stable after parsing and rewriting the output JSON

Test Plan

  • pnpm install
  • pnpm build
  • pnpm prettier:check
  • pnpm generate with a valid .env
  • compare the generated genesis/genesis.json and follow-on blockhash/sendRoot flow against the existing ./generate.sh workflow

@alxdca
alxdca marked this pull request as ready for review April 22, 2026 15:33
@Jason-W123
Jason-W123 requested a review from TucksonDev April 22, 2026 15:53
Comment thread README.md Outdated
Comment thread package.json
Comment thread generate.ts Outdated

@TucksonDev TucksonDev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes based on the modifications of the Foundry files. I'd prefer if we hardcode the output path, but happy to discuss those changes if we need them.

Comment thread foundry.toml Outdated
Comment thread script/GenerateGenesis.s.sol Outdated
Comment thread README.md Outdated
@alxdca
alxdca force-pushed the feat/typescript-generate branch from 75f1670 to a6dde3c Compare April 29, 2026 12:45
@TucksonDev
TucksonDev self-requested a review April 29, 2026 15:36
@spsjvc
spsjvc merged commit 756e0ee into main Aug 5, 2026
@spsjvc
spsjvc deleted the feat/typescript-generate branch August 5, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants