NethermindEth / warp

Warp - Bringing Solidity to Starknet at warp speed. Warp is a Solidity to Cairo Compiler, this allows teams to write/migrate Solidity to Cairo for easy onboarding into the StarkNet ecosystem.
https://nethermind.io/warp/
Apache License 2.0
754 stars 70 forks source link

Storage Dynamic Arrays #1035

Closed AlejandroLabourdette closed 1 year ago

AlejandroLabourdette commented 1 year ago

Issue: #1026.

piwonskp commented 1 year ago

Conflicts

AlejandroLabourdette commented 1 year ago

t looks good to me. Minor comments and it's good to merge. Could you please remove the changes you did to warplib except for integers. They are not very important for this PR and it will break other branches working with memory.,

Actually they are, we need to have those memory warplib functions working to be able to handle storage dynamic arrays for example. Initial issue #1026 was just to be able to create memory dynamic arrays, but it wouldn't do much if we can't access or update them. Also seems logic to include support for storage dynamic arrays in this pr. All old Cairo0 code from memory.cairo was added to memory.old.cairo file and in the memory.cairo were left just the Cairo1 equivalent of the used util functions. The end will be to translate utils functions as they are needed or perhaps a separate issue to translate all at once (I prefer first approach because they are wide thematic and would be hard to test) and then delete that memory.old.cairo file