What problem does it solve?
It solves the problem of adding new Ethereum Request for Comment (ERC) contract standards to Ethernauta without breaking tree-shaking, ABI encoding/decoding, or wallet confirmation behavior.
Core Features & Use Cases
- Deterministic ERC folder structure: Enforces the consistent
packages/erc/src/<n>/ layout so generated methods are importable as @ethernauta/erc/<n> after build.
- Per-function tree-shakable method files: Uses a one-generated-method-per-file rule to keep bundles minimal by importing only what you need.
- Wallet confirmation correctness: Requires each method to export a
<METHOD>_SIGNATURE sidecar so the wallet can render human-readable confirmations based on selector matching.
- Two binding shapes for different contract interactions: Produces
Callable<T> for view/pure methods and Signable<Bytes> for state-changing methods, matching the wallet’s signing flow.
- Exact parameter schema conventions: Standardizes method inputs via
union(tuple, object) and Valibot parsing so callers can use either tuple or object argument styles safely.
- Automatic selector registry generation: Ensures new methods are discoverable by regenerating
registry.generated.ts rather than editing it by hand.
Quick Start
Ask the skill to help you add a new standard by creating packages/erc/src/<n>/IERC<n>.abi.json, generating one method file per ABI function with the required <METHOD>_SIGNATURE, wiring exports through methods/index.ts and <n>/index.ts, writing a behavioral <n>.test.ts, regenerating the selector registry, then validating the build output.