feat(write): mint-pod mainnet support (--share 0-100)#25
Merged
anajuliabit merged 1 commit intomainfrom May 6, 2026
Merged
Conversation
Closes the testnet/mainnet asymmetry — mainnet mint-pod was previously
returning NETWORK_NOT_SUPPORTED. The mainnet flow is canonical
production, not a "V1 to be deprecated" — testnet was forked from
mainnet and had subnet/datanet logic added for a client experiment
(per the Reppo team).
mint-pod now branches on network:
- mainnet: mintPod(to, emissionSharePercent) — pays publishingFee in REPPO.
Required: --share <0-100>. Pre-flight checks publishingFee, balance,
allowance.
- testnet: mintPodWithREPPO(to, subnetId) (or mintPodWithPrimaryToken
via --token primary). Required: --datanet <id>. Pre-flight: validSubnet.
New error codes (mainnet path):
MISSING_SHARE, INVALID_SHARE, INSUFFICIENT_REPPO_BALANCE,
INSUFFICIENT_ALLOWANCE.
New error codes (testnet path):
MISSING_DATANET (was rejected by clipanion as "required" before;
now optional at clipanion level, validated in execute()).
Comment + doc cleanup (the "V1/V2 split" framing was misleading —
implies one is older/being-deprecated, but they're both current
deployments with different params):
- CLAUDE.md, src/chain/abis.ts, src/chain/contracts.ts,
src/commands/query/pod.ts, src/commands/claim-emissions.ts,
src/chain/contracts.test.ts: rename "V1/V2" → "mainnet vs testnet
param-variant" with one-line context.
- .claude/agents/abi-pairing-reviewer.md,
.claude/skills/command-scaffold/SKILL.md: same rename.
Test updates:
- src/__tests__/command-error-paths.test.ts: replace the
NETWORK_NOT_SUPPORTED test with MISSING_SHARE + INVALID_SHARE +
MISSING_DATANET (mainnet/testnet param-variant validation).
Smoke-tested locally:
- mainnet, no --share → MISSING_SHARE
- mainnet, --share 150 → INVALID_SHARE
- testnet, no --datanet → MISSING_DATANET
Pipeline: lint, typecheck, test (90/90), build all green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branched off main. Closes the asymmetry: mainnet `mint-pod` was returning `NETWORK_NOT_SUPPORTED`. Now it's the canonical production flow.
Summary
`mint-pod` branches on network:
Both have optional `--to ` (defaults to caller) and the standard `--idempotency-key` / `--dry-run` flags.
Why this matters
Per the Reppo team (Slack confirmation): testnet was forked from mainnet and had subnet/datanet logic added for a client experiment. Mainnet is canonical production, not a "V1 to be deprecated." The previous comment framing throughout the codebase ("V1/V2 split") was misleading. This PR fixes the framing in the same change.
New error codes
Pre-existing testnet codes preserved: `INVALID_DATANET_ID`, `INVALID_TOKEN`, `DATANET_NOT_FOUND`.
Comment + doc cleanup (V1/V2 → mainnet/testnet param-variant)
The "V1/V2 PodManager split" labeling implied one was being deprecated. Renamed throughout:
Test plan (local)
End-to-end mainnet mint requires a funded EOA on Base mainnet — covered by the integration harness (PR #8) once that's unblocked.
Status update on #5
9 → 10 commands fully implemented (mainnet + testnet). Remaining 3 blocked: `create-datanet`, `register-agent` (need platform API spec), `query emissions-due` (needs pod enumeration), `swap` (deferred-by-scope).
🤖 Generated with Claude Code