You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### TL;DR
Added functionality to strip and normalize Solidity function and event signatures.
### What changed?
- Introduced a new `StripPayload` function in `utils.go` to remove parameter names, 'indexed' keywords, and extra whitespaces from Solidity function or event signatures.
- Implemented helper functions `parseParameters`, `cleanType`, and `isType` to support the signature stripping process.
- Updated `GetLogsByContractAndSignature` and `GetTransactionsByContractAndSignature` handlers to use the new `StripPayload` function before processing requests.
### How to test?
1. Call the API endpoints for getting logs or transactions by contract and signature.
2. Use various Solidity function and event signatures, including those with parameter names, `indexed` keywords, and extra whitespaces.
3. Verify that the API correctly handles and matches these signatures, regardless of the extra information included.
### Why make this change?
This change improves the flexibility and user-friendliness of the API. It allows users to query logs and transactions using more verbose Solidity signatures without requiring exact matches. This normalization process ensures that signatures with different formatting or additional information (like parameter names) are still correctly recognized and processed by the system.
0 commit comments