Questions tagged [memory]
Questions related to memory use in Solidity or by nodes
206
questions
14
votes
2
answers
3k
views
error: Storage location can only be given for array or struct types
Getting the error "Storage location can only be given for array or struct types" in a setup function. The exact line is
uint memory _total = 0;
I'm confused by the error, because I'm not trying to ...
8
votes
1
answer
996
views
What is the composition of the blockchain database?
From axic's explanation of the structure of the ethereum database, we learned that data is stored in Merkle Patricia tries, usually inside a LevelDB store. It consists of structures such as blocks, ...
33
votes
3
answers
24k
views
Can I save structs in a Mapping?
Is it possible to store structs in a Mapping or any dynamic memory structure in my Solidity SmartContract?
56
votes
2
answers
26k
views
What does the keyword "memory" do exactly?
I've been looking through the code of Etherdice and noticed that some variables are declared like
ParserResult memory result;
and I haven't found the keyword "memory" in any documentation.
...
6
votes
1
answer
2k
views
In solidity, how can I hardcode bytes > 32 bytes
I want to create a contract with a hardcoded bytes variable.
contract Test(){
function Test(){
bytes x = 0x..... //greater than 32 bytes
}
}
The above returns a Type int_const not ...
40
votes
3
answers
15k
views
Difference between Memory and Storage?
What is the difference between Memory and Storage ?
From both the EVM point of view and the contract design one.
Thanks!