Closed sideninja closed 1 month ago
The changes primarily involve a transition from using models.StorageReceipt
to a more generalized models.Receipt
across multiple files. This modification impacts function signatures, return types, and internal logic related to transaction and block receipt handling. Additionally, several new functions have been introduced, and some functions have been renamed to align with the updated data structure. The overall structure and logic flow remain consistent throughout the codebase.
Files | Change Summary |
---|---|
api/api.go , api/models.go , models/events.go , models/receipt.go , models/transaction.go , services/ingestion/engine.go , services/ingestion/engine_test.go , services/logs/filter_test.go , storage/index.go , storage/index_testsuite.go , storage/mocks/AccountIndexer.go , storage/mocks/ReceiptIndexer.go , storage/mocks/mocks.go , storage/pebble/accounts.go , storage/pebble/receipts.go |
Transitioned from models.StorageReceipt to models.Receipt in function signatures and return types across various files, reflecting a unified approach to receipt handling. New functions added and some functions renamed for clarity. |
storage/index_testsuite.go , storage/mocks/AccountIndexer.go , storage/mocks/ReceiptIndexer.go , storage/mocks/mocks.go , storage/pebble/accounts.go , storage/pebble/receipts.go |
Updated test cases and mock implementations to use the new models.Receipt type, ensuring consistency in the tests. |
sequenceDiagram
participant Client
participant API
participant Storage
participant Receipt
Client->>API: Request Transaction Receipt
API->>Storage: Fetch Receipts
Storage->>Receipt: Process Receipt Data
Receipt->>Storage: Return Processed Receipt
Storage->>API: Return Receipts
API->>Client: Send Response with Receipts
π In the code where receipts dwell,
A change was made, oh what a spell!
From storage types, we leap and bound,
To general receipts, now weβre unbound.
With functions fresh and tests in tow,
Hopping along, weβre ready to go!
π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
Refactor and improve receipt model and add factory from bytes.
This PR has a lot of changes because it renames
StorageReceipt
to justReceipt
to be consistent with other model names. It also adds a methodReceiptsFromBytes
so we have on place to handle decoding of receipts. It also moves marshal receipt into the API layer.For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes
Refactor
StorageReceipt
with a more generalizedReceipt
type across multiple components.Tests