-
Notifications
You must be signed in to change notification settings - Fork 746
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
[Proposal] storage vars abstraction for Cairo1 contracts #646
Comments
To calculate the storage addresses, we need the name of the elements in the storage, and their types. |
They are indirectly specified if used in methods. (We can check with SW about extending ABI) |
I made some tests : it works for litterals (including u256), legacyMap, structs, if the user provides the name of the element. Array and enums not supported in Storage (cairo v2.0.0). |
I think that we can have : const content:AllowArray<string>=await myContract.getStorage(varName,nbFeltToRead);
I think it will be difficult to have something more refined... |
Hi, is there anyone working on this? |
Hello, |
How to retrieve storage for complex data types:
Complex mapping - https://docs.starknet.io/documentation/architecture_and_concepts/Contracts/contract-storage/
After resolving this, we could implement class for retreating complex storage vars, by using ABI,
and than on top of that implement it in Contract vars so that one can do:
The text was updated successfully, but these errors were encountered: