Skip to content

feat(scripting): register workflow scripts as CLI commands#695

Open
yahgwai wants to merge 102 commits intofeat/deploy-full-chainfrom
feat/cli-workflows
Open

feat(scripting): register workflow scripts as CLI commands#695
yahgwai wants to merge 102 commits intofeat/deploy-full-chainfrom
feat/cli-workflows

Conversation

@yahgwai
Copy link
Copy Markdown
Contributor

@yahgwai yahgwai commented Apr 13, 2026

Move deployNewChain, createTokenBridge (renamed to createTokenBridgeAndWethGateway), transferOwnership, and deployFullChain from examples/ to workflows/ and register them in runCli. Add workflow() helper to scriptUtils for single-arg command handlers.

yahgwai added 2 commits April 13, 2026 15:41
Move deployNewChain, createTokenBridge (renamed to
createTokenBridgeAndWethGateway), transferOwnership, and deployFullChain
from examples/ to workflows/ and register them in runCli. Add workflow()
helper to scriptUtils for single-arg command handlers.
Remove workflow() helper and the barrel file. Use cmd() with a toTuple
adapter instead, keeping all command registration in one place.
@yahgwai yahgwai requested a review from TucksonDev April 13, 2026 16:28
@yahgwai yahgwai marked this pull request as ready for review April 13, 2026 16:28
yahgwai and others added 26 commits April 13, 2026 17:29
Split each workflow's schema into inputSchema (ZodObject before
transform) and schema (with transform). This allows deployFullChain
to reference field definitions from transferOwnership and
createTokenBridgeAndWethGateway via .shape instead of redeclaring them.
Rename params to createRollupParams, group token bridge fields under
tokenBridgeParams, and ownership transfer fields under
ownershipTransferParams for clearer CLI input structure.
Add overrides for vite, flatted, picomatch, brace-expansion, and yaml
to resolve transitive vulnerabilities in dev tooling (vitest, eslint,
typescript-eslint, @wagmi/cli, ts-morph, patch-package).
Add action schemas (buildSetIsBatchPoster, buildSetValidKeyset,
buildInvalidateKeysetHash, buildSetMaxTimeVariation,
buildScheduleArbOSUpgrade, isBatchPoster, isValidKeysetHash,
getMaxTimeVariation) and utility schemas (configDefaults,
parentChainIsArbitrum, consensus release lookups, isKnownWasmModuleRoot)
to the CLI runner.
…orkflows

# Conflicts:
#	src/scripting/cli.ts
…ction schemas

The build* actions take account: Address, not a private key. The schemas
should only require what the function actually needs.
# Conflicts:
#	package.json
#	pnpm-lock.yaml
Add publicClientSchema, parentChainPublicClientSchema, and
actionWriteBaseSchema to common.ts. Add withPublicClient helper to
viemTransforms.ts. Update 26 schema files to extend base schemas
instead of redeclaring fields. Simplify 9 destructure-and-spread
transforms to use withPublicClient.
yahgwai added 30 commits April 22, 2026 15:30
…bridge' into feat/cli-workflows

# Conflicts:
#	src/scripting/cli.ts
The regex layer was subsumed by viem's isHex/isAddress and was only
retained to feed the schema coverage test generator. Drop it here;
the coverage generator in feat/schema-coverage will need to learn
about the address/hex formats directly (follow-up on that branch).
…generator

Now that addressSchema and hexSchema use viem's isAddress / isHex
refines (no pattern for the generator to sample from), short-circuit
on them directly. getSchemaLeaves treats either as an atomic leaf so
derived shapes (wrapped in optional/default/pipe/object) still reach
it, and generateForType emits a canonically valid address or hex
string when encountered.
Replace the regex with viem's isHex + size(v) === 32. Matches the
style of hexSchema / addressSchema (refine-backed, no regex).
Coverage generator follow-up lands on feat/schema-coverage.
Replace the regex with isHex + v.length === 66 (0x prefix plus 64 hex
chars). Matches the style of hexSchema / addressSchema. Coverage
generator follow-up lands on feat/schema-coverage.

Supersedes the earlier isHex + size attempt; viem's size() rounds
odd-length hex up via Math.ceil, so it couldn't strictly enforce
length. An explicit length check is accurate.
Extend the identity-based fast path to include privateKeySchema, now
that it's validated via isHex + length (no regex for the generator to
sample).
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.

2 participants