fix: add validation for mutually exclusive Signal target fields#203
Open
thebookofiz wants to merge 2 commits into0xIntuition:v2_0from
Open
fix: add validation for mutually exclusive Signal target fields#203thebookofiz wants to merge 2 commits into0xIntuition:v2_0from
thebookofiz wants to merge 2 commits into0xIntuition:v2_0from
Conversation
added 2 commits
February 20, 2026 08:04
Addresses GitHub issue 0xIntuition#151: Check for EIP-55 when resolving account atoms. This change adds EIP-55 checksum validation in the resolver's process_account function. When an account with an invalid EIP-55 checksum is encountered, the ENS resolution is skipped instead of attempting to resolve it. This prevents potential issues where addresses with incorrect checksum formatting could cause false positives or errors during ENS resolution. The validation uses Address::parse_checksummed from the alloy library, which is the same approach used in metadata.rs for atom creation validation.
Adds validate() method to Signal struct to ensure exactly one of atom_id, triple_id, deposit_id, or redemption_id is set. These fields are mutually exclusive and this validation prevents invalid data from being inserted into the database. Implements the TODO that was in the code comment.
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.
Adds validate() method to Signal struct to ensure exactly one of atom_id, triple_id, deposit_id, or redemption_id is set.
These fields are mutually exclusive and this validation prevents invalid data from being inserted into the database.
Implements the TODO that was in the code comment.