Repository navigation
test(payments): cover EVM address helpers with the EIP-55 vectors (#259) - #277
Merged
juancguerrerodev merged 4 commits intoDec 6, 2026
Merged
juancguerrerodev merged 4 commits into
juancguerrerodev merged 4 commits into
Conversation
juancguerrerodev
force-pushed
the
test/payments-eip55-259
branch
from
December 6, 2026 09:10
1497a4b to
107cf6b
Compare
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.
What and why
Closes #259.
Adds a
describe("EVM addresses")block topackages/payments/test/eip712.test.tscoveringisAddress,checksumAddressandsameAddressfrompackages/payments/src/eip712.tsby name, which until now were only reached through whole transfers. Includes the eight published EIP-55 vectors from their lower case forms, stability on checksummed and all-upper-case input,bad_inputrefusals, and a pinned test that a wrong mixed-case checksum is rewritten rather than refused. Tests only;eip712.tsis unchanged.Vision fit
Principle 7, small, typed and tested: the address helpers every transfer passes through (refusing a bad address, refusing paying yourself, writing both addresses in the authorization) now have direct tests against the published EIP-55 vectors.
Non-negotiables
Checklist
acceptedproposal.0XinisAddressfails 2, and dropping the address guards insameAddressfails 1.pnpm check:privacy,pnpm typecheck,pnpm lint,pnpm testandnode scripts/guard/check.mjs --patterns scripts/guard/patterns.txt. Run locally:pnpm --filter @hermit/payments exec vitest run test/eip712.test.ts(12/12), the full@hermit/paymentssuite (7 files, 144 tests), and@hermit/paymentstypecheck (clean). CI runs the full root gates.packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes. n/a: tests only, no UI string changed.Model path
packages/model,agent,skillsoreval, the prompt, the router, tool descriptions, normalizers, examples or the model file.Screenshots
New dependencies and network calls
None. Tests only;
packages/payments/src/eip712.tsis unchanged.AI agents
describeblock and ran the vitest suites, typecheck and the three mutation checks above, in a session directed by the author.