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

Add immutable strings array library #1767

Merged
merged 2 commits into from
Feb 25, 2025
Merged

Conversation

ryley-o
Copy link
Contributor

@ryley-o ryley-o commented Feb 21, 2025

Description of the change

Adds an immutable strings library to benefit future systems.

fixes https://linear.app/art-blocks/issue/PRO-1104/immutable-strings-array-solidity-library

This adds a library that efficiently uses contract bytecode to efficiently store immutable arrays of strings. This massively reduces gas costs when storing and loading string arrays.

Assembly is thoroughly commented and simplified for readability.

Tests

Tests are added for coverage of the new functionality, as well as edge cases.

@ryley-o ryley-o marked this pull request as ready for review February 21, 2025 21:28
@ryley-o ryley-o requested a review from a team as a code owner February 21, 2025 21:28
Copy link
Contributor

@lindsgil lindsgil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 🔥 🔥

@ryley-o ryley-o enabled auto-merge February 25, 2025 18:27
@ryley-o ryley-o merged commit 13cf875 into main Feb 25, 2025
10 of 11 checks passed
@ryley-o ryley-o deleted the immutable-strings-array-lib branch February 25, 2025 18:32
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