Skip to content
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

[SC-975] Add library to handle bytes storage slices #96

Merged
merged 23 commits into from
Jan 9, 2024

Conversation

k06a
Copy link
Member

@k06a k06a commented Oct 25, 2023

Apparently this library functionality will be implemented as a Solidity language feature in the future: ethereum/solidity#7423

Notes:

  1. BytesStorage.Slice.offset and BytesStorage.Slice.length can be packed into a single 32-bytes word
  2. BytesMemory.Slice.pointer and BytesMemory.Slice.length can be packed into a single 32-bytes word and stored in UDT on stack, not in memory

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2a5521f) 97.33% compared to head (0d7e407) 97.56%.
Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #96      +/-   ##
==========================================
+ Coverage   97.33%   97.56%   +0.23%     
==========================================
  Files          12       14       +2     
  Lines         263      288      +25     
  Branches       60       62       +2     
==========================================
+ Hits          256      281      +25     
  Misses          7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@k06a k06a marked this pull request as draft October 25, 2023 12:06
@zZoMROT zZoMROT changed the title Add library to handle bytes storage slices [SC-975] Add library to handle bytes storage slices Nov 2, 2023
@zZoMROT zZoMROT marked this pull request as ready for review November 2, 2023 23:14
contracts/libraries/BytesMemory.sol Outdated Show resolved Hide resolved
contracts/libraries/BytesMemory.sol Outdated Show resolved Hide resolved
contracts/libraries/BytesStorage.sol Outdated Show resolved Hide resolved
@zZoMROT zZoMROT requested a review from ZumZoom November 17, 2023 09:55
@ZumZoom ZumZoom merged commit d7afb85 into master Jan 9, 2024
8 checks passed
@ZumZoom ZumZoom deleted the feature/bytes-storage-slice branch January 9, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants