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

feat: store arrays #26

Merged
merged 3 commits into from
Jun 15, 2023
Merged

feat: store arrays #26

merged 3 commits into from
Jun 15, 2023

Conversation

enitrat
Copy link
Collaborator

@enitrat enitrat commented Jun 13, 2023

Here is an example of how to write the StorageAccess implementation for felt252.

@julio4 Please review!

@enitrat enitrat marked this pull request as ready for review June 14, 2023 13:05
@enitrat enitrat changed the title feat(wip): store arrays feat: store arrays Jun 14, 2023
@julio4
Copy link
Contributor

julio4 commented Jun 15, 2023

Nice example!

StorageAccessFelt252Array is missing these traits implementation in v1.1.0:

fn read_at_offset_internal(
    address_domain: u32, base: StorageBaseAddress, offset: u8
) -> SyscallResult<T>;
fn write_at_offset_internal(
    address_domain: u32, base: StorageBaseAddress, offset: u8, value: T
) -> SyscallResult<()>;
fn size_internal(value: T) -> u8;

Is it ok to not implement those?

Should we add missing imports as well?

@enitrat
Copy link
Collaborator Author

enitrat commented Jun 15, 2023

Is it ok to not implement those?

It looks like this is new from 2.0.0-rc. For now, let's not include them until we change the contract syntax

@julio4
Copy link
Contributor

julio4 commented Jun 15, 2023

It looks like this is new from 2.0.0-rc. For now, let's not include them until we change the contract syntax

That's right, my cairo lsp wasn't correctly set up.
All good then!

@enitrat enitrat merged commit 1b16a25 into main Jun 15, 2023
@enitrat enitrat deleted the feat/store-arrays branch June 16, 2023 12:14
@enitrat enitrat mentioned this pull request Jun 20, 2023
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.

2 participants