-
Notifications
You must be signed in to change notification settings - Fork 2
feat: FileStorage #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bugbot free trial expires on July 29, 2025
Learn more in the Cursor dashboard.
/// Get metadata about the file (owner, size, timestamps, etc.) | ||
fn get_metadata(self: @ComponentState<TContractState>, file_id: felt252) -> FileMetadata { | ||
self.get_metadata(file_id) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Infinite Recursion in Metadata Retrieval
The get_metadata
function recursively calls itself (self.get_metadata(file_id)
) instead of reading from the storage map. This leads to infinite recursion and a stack overflow. It should instead read from the metadata
storage map using self.metadata.read(file_id)
.
pub enum Event {} | ||
|
||
|
||
#[embeddable_as(DepositImpl)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Incorrect Embeddable Attribute for FileStorage
The #[embeddable_as]
attribute for the FileStorage
component is incorrectly set to DepositImpl
instead of FileStorageImpl
(or similar), likely due to a copy-paste error from another component.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #94 +/- ##
=======================================
Coverage ? 87.18%
=======================================
Files ? 43
Lines ? 1561
Branches ? 0
=======================================
Hits ? 1361
Misses ? 200
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This change is