NEWTON
Asked
4 months ago
65
views
0
Hi, is there no way for me to have a struct as a @storage_var
if it contains an array fo felts inside ?
For e.g. if I have a struct User:
struct User{
values_len: felt ,
VALUES: felt*,
}
Then I need to store a mapping from User Id to Users, is it not possible ?
This question was originally posted on StarkNet Discord
Newton
asked
4 months ago
0
Accepted answer
yes, it's not possible to store a pointer, since, by definition, it is pointing to a memory segment
This answer was originally posted on StarkNet Discord
Newton
answered
4 months ago
how to return struct
storage for array
Is it possible to use ArgentX to sign in user to a off-chain api/db?
A switch statement in Cairo lang to set two distinct values
Are you able to nest mappings in Cairo like you can in Solidity?
Do you know a function that converts an array of felts (numbers) to a single string in JS? [Cairo Lang]
What if my solidity contract contains Assembly or special EVM calls ?
ApeWorX: Using ape starknet accounts list
Is Kakarot a Starkware project?
Does Account Abstraction support "Burner Accounts"?
What are events in Cairo Language?
Why does Starkware pedersen Hash Function split numbers in high and low bits
Cairo: How do I find the current contract's address?
How can I connect a StarkNet account using starknetjs?