Questions tagged [memory]

Questions related to memory use in Solidity or by nodes

Filter by
Sorted by
Tagged with
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 ...
Akhil F's user avatar
  • 1,898
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, ...
MrChico's user avatar
  • 1,786
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?
arodriguezdonaire's user avatar
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. ...
uberlaufer's user avatar
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 ...
Akhil F's user avatar
  • 1,898
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!
Hcharlanes's user avatar
  • 1,135

1 2 3 4
5