Merged
Conversation
Collaborator
lnbc1QWFyb24
commented
Oct 9, 2025
- src/types.rs:74 reshapes AgentPayload with a schema version, PriceUnit, canonical JSON digest helpers, and a signing round-trip test while dropping the old fee/unit enums and unused agent score structs.
- src/agent.rs:100 publishes all estimates with schema version 1 and converts gwei floats into integer wei strings before signing.
- src/chain/types.rs:47 parses the payload’s decimal wei string into U240 so oracle payloads carry the canonical value.
- Cargo.toml:1 bumps the crate to 0.1.0, enables alloy’s serde feature, adds sha2, and refreshes Cargo.lock.
- README.md:186 and EVALUATION.md:3 clean up markdown spacing, headings, and emphasis for consistency.
Changed the payload signing method from EIP712 typed data to canonical JSON with keccak256 hashing. This simplifies the signing process and removes the dependency on chain-specific domain separators. Key changes: - Replace U256 price field with string representation and add unit field for clarity - Remove EIP712 domain separator and struct hash implementation - Add canonical JSON serialization with lexicographically sorted keys - Sign keccak256 hash of canonical JSON directly instead of EIP712 digest - Update tests to validate canonical JSON signatures - Add sha2 dependency for hashing operations
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.