Skip to content

fix!: strict EIP-681 compliance with exact BigInt money path - #10

Merged
LiorAgnin merged 6 commits into
fuseio:masterfrom
LiorAgnin:master
Aug 9, 2026
Merged

fix!: strict EIP-681 compliance with exact BigInt money path#10
LiorAgnin merged 6 commits into
fuseio:masterfrom
LiorAgnin:master

Conversation

@LiorAgnin

Copy link
Copy Markdown
Contributor

No description provided.

LiorAgnin and others added 6 commits August 8, 2026 17:27
…ain docs)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
docs: scaffold agent-skills config (issue tracker, triage labels, dom…
Rewrites parse() and build() against the EIP-681 grammar:

- BigInt everywhere on the money path: amounts above int64 no longer
  lose wei silently through num.parse, and build() no longer corrupts
  1000000000000000001 into 1e18 via toStringAsExponential
- build() emits the exponent notation the EIP suggests only when
  trailing zeros make it exact (2.014e18), plain decimal otherwise
- only the spec-defined pay- prefix is accepted; arbitrary ERC-831
  prefixes throw
- bare ENS targets (ethereum:vitalik.eth) parse; hex takes precedence
  over ENS, so an invalid 0x payload is an error, not an ENS fallback
- addresses validate as exactly 40 hex digits
- chain_id restricted to decimal digits per the grammar
- all malformed input throws FormatException (no more raw RangeError)
- QueryString uses strict RFC 3986 percent-decoding so the number
  grammar's leading + survives

BREAKING CHANGE: non-pay prefixes rejected, exception types changed.
Bumps to 0.2.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a library-level doc comment, documents QueryString, refreshes the
stale parse()/build() dartdoc (FormatException, lossless exponent
notation), and makes the two static-only utility classes
uninstantiable. Enforced going forward via public_member_api_docs and
strict analyzer language checks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix!: strict EIP-681 compliance with exact BigInt money path
@LiorAgnin
LiorAgnin merged commit 1cedf74 into fuseio:master Aug 9, 2026
2 of 6 checks passed
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.

1 participant