feat: ini attestation lifi info payloads#3
Merged
shunkakinoki merged 10 commits intomasterfrom May 15, 2025
Merged
Conversation
Collaborator
shunkakinoki
commented
May 15, 2025
- Reorganized the signature decoding process in AnypayLifiSapientSigner, ensuring the recovery of the signer occurs after decoding the signature.
- Updated the validation logic in AnypayLifiInterpreter to improve clarity and functionality, including renaming error messages for better context.
- Enhanced test cases for AnypayLifiSapientSigner to reflect changes in signature encoding and validation, ensuring comprehensive coverage for various scenarios.
…e functions - Added `mockLifiBridgeOnly` and `mockLifiSwapAndBridge` functions to the MockLiFiDiamond contract to support distinct call types. - Updated the test suite to include a new test for validating signatures on bridge-only calls, ensuring proper handling of empty swap data. - Adjusted existing test cases to utilize the new function signatures for improved clarity and functionality.
…ypayLifiInterpreter for improved clarity and functionality - Removed an unnecessary blank line in AnypayLifiModifierWrapper for cleaner code. - Adjusted spacing in AnypayLiFiDecoder to enhance readability. - Added `originChainId` to the AnypayLifiInfo struct in AnypayLifiInterpreter to capture the originating chain ID, improving data handling.
…roved data access - Updated the visibility of the `getOriginSwapInfo` function from `pure` to `view` in the AnypayLifiInterpreter library to allow access to state variables, enhancing data retrieval capabilities.
- Adjusted function signature formatting in the MockLiFiDiamond contract for better readability. - Cleaned up spacing in the AnypayLifiSapientSignerTest contract to enhance clarity and maintain consistency throughout the file.
…signature decoding and validation - Added a new internal function `_decodeSignature` in AnypayLifiSapientSigner to decode combined signatures into LiFi information and attestation signatures. - Updated the lifi intent hashing process to utilize decoded attestation information. - Introduced a new `validateLifiInfos` function in AnypayLifiInterpreter to validate inferred LiFi info against attested data, including comprehensive error handling for mismatches and invalid data.
…apientSigner and AnypayLifiInterpreter - Reorganized the signature decoding process in AnypayLifiSapientSigner, ensuring the recovery of the signer occurs after decoding the signature. - Updated the validation logic in AnypayLifiInterpreter to improve clarity and functionality, including renaming error messages for better context. - Enhanced test cases for AnypayLifiSapientSigner to reflect changes in signature encoding and validation, ensuring comprehensive coverage for various scenarios.
… clarity - Removed the InferredInfo_InvalidOriginToken and InferredInfo_ZeroMinAmount error definitions, replacing them with a more descriptive InvalidInferredMinAmount error. - Updated the validation logic in the validateLifiInfos function to reflect these changes, enhancing the clarity of error messages in the library. - Adjusted corresponding test cases to ensure they align with the new error handling structure.
- Deleted the AnypayLifiInterpreter library, which included functions for interpreting LiFi data and validating inferred information. - Removed the corresponding test suite for AnypayLifiInterpreter, ensuring no references to the deleted library remain in the codebase.
…n and data handling - Added the AnypayLifiInterpreter library, which includes functions for interpreting LiFi data into AnypayLifiInfo structs and validating inferred information against attested data. - Implemented error handling for various validation scenarios, including mismatched lengths and invalid minimum amounts. - Created a comprehensive test suite for AnypayLifiInterpreter, covering multiple scenarios to ensure robust functionality and error handling.
…pientSigner and AnypayLifiInterpreter - Updated import statements to ensure consistent naming of AnypayLiFiInterpreter across all files. - Adjusted references to AnypayLifiInfo and related functions to match the corrected naming convention, enhancing code clarity and maintainability. - Ensured that all test cases reflect these naming changes for accurate functionality verification.
shunkakinoki
added a commit
that referenced
this pull request
Oct 15, 2025
Add comprehensive technical sequence diagrams documenting all Trails contract interaction flows. Created in response to the October 15, 2025 audit call request for detailed contract interaction documentation. Includes 6 detailed flows with Mermaid diagrams: 1. Cross-chain flow without destination calldata 2. Cross-chain flow with destination calldata (balance injection) 3. Same-chain flow without destination calldata 4. Same-chain flow with destination calldata (direct replacement) 5. Origin chain failure and refund flow 6. Destination chain failure and refund flow Each flow includes: - Call batch sequence numbering (Call #1, #2, #3, etc.) - Key characteristics and use cases - Detailed Mermaid sequence diagrams - Implementation notes and semantics - Contract addresses, function signatures, and call types Addresses audit requests from Tim Sigl and Andy Lin regarding: - Contract interaction details with function names - When injectAndCall() is used vs direct replacement - TrailsRouterShim purpose and call forwarding - Sentinel validation and fallback mechanisms 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
shunkakinoki
added a commit
that referenced
this pull request
Oct 15, 2025
* docs: add technical flow diagrams for audit Add comprehensive technical sequence diagrams documenting all Trails contract interaction flows. Created in response to the October 15, 2025 audit call request for detailed contract interaction documentation. Includes 6 detailed flows with Mermaid diagrams: 1. Cross-chain flow without destination calldata 2. Cross-chain flow with destination calldata (balance injection) 3. Same-chain flow without destination calldata 4. Same-chain flow with destination calldata (direct replacement) 5. Origin chain failure and refund flow 6. Destination chain failure and refund flow Each flow includes: - Call batch sequence numbering (Call #1, #2, #3, etc.) - Key characteristics and use cases - Detailed Mermaid sequence diagrams - Implementation notes and semantics - Contract addresses, function signatures, and call types Addresses audit requests from Tim Sigl and Andy Lin regarding: - Contract interaction details with function names - When injectAndCall() is used vs direct replacement - TrailsRouterShim purpose and call forwarding - Sentinel validation and fallback mechanisms 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: refine technical flow diagrams for clarity Updated the technical flow diagrams documenting Trails contract interactions by removing specific references to the October 15, 2025 audit call and enhancing the clarity of various sections. Adjusted wording for better readability and streamlined the presentation of key characteristics and implementation notes across different scenarios. --------- Co-authored-by: Claude <noreply@anthropic.com>
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.