NEWTON
Asked
6 months ago
69
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
6 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
6 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 ?
How can I pass an array of felt to call with Nile in StarkNet?
Questions about useStarknetExecute. Do we update the transaction manager on our end? [StarkNet/Cairo]
How do I connect my DAPP to a private Starknet network using starknetjs?
What's the best advanced StarkNet guide?
The only way to invoke a contract is using migrations (this applies for both devnet and testnet?)
Is there a Cairo Lang implementation to compute power of a floating point?
What if my solidity contract contains Assembly or special EVM calls ?