Storage, Memory and Stack in Solidity Ethereum Smart Contracts
In Solidity or particularly ethereum smart contracts data are stored in 3 ways:-
- It stores data in blockchain form
- It store data permanently and no one can change it
- It’s costly. It have high Gas Fee (cost to run smart contract on EVM)
- generally data of users, tokens and balance are stored here
- It have higher gas fee because it’s stored in blockchain.
- Its short term memory, it’s stored data during code/function execute
- Its like storing something on RAM. when program completed, RAM cleaned
- Its cheaper than Storage and Stack
- Its not stored in blockchain, its just simple storage stored for sometime.
- Its also not stored in any storage — database, its stored in the function itself.
- It store data in personal database of Ethereum, not in Ethereum blockchain
- Its cheaper than storage
- Its generally used to store temporary data which’re needed for immidiate processing
To understand there words properly, and get actual costs, make DApps, because best way to learn swimming is “Jump into the water”
Decentralized Storage | ethereum.org
Overview of what decentralized storage is and available tools to integrate into a dapp.
Gas and fees | ethereum.org
Ethereum is a global, decentralized platform for money and new kinds of applications. On Ethereum, you can write code…