fix!: strict EIP-681 compliance with exact BigInt money path - #10
Merged
Conversation
…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
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.
No description provided.