- Mastering Ethereum
- Merunas Grincalaitis
- 95字
- 2021-06-24 15:01:06
Data location
In Solidity, you have the option to define where your variables will be stored. You can decide to store them in the following places:
- Storage: This is a permanent place that gets written on the blockchain, therefore it's expensive to use
- Memory: This is a non-permanent place where variables are held for only as long as the smart contract is running
- Calldata: This is where the msg object data information is stored, a place dedicated to global variables
An example of this is in the following code:
uint256 memory myNumber;
string storage myText;
推薦閱讀
- 神奇的數(shù)學(xué)(二)
- 概率論與數(shù)理統(tǒng)計(jì)
- 這才是好看的數(shù)學(xué)
- 走近費(fèi)曼叢書(shū):費(fèi)曼講物理:相對(duì)論
- The Modern C# Challenge
- 數(shù)學(xué)的故事
- Abaqus有限元分析從入門(mén)到精通(2022版)
- 越玩越聰明的印度數(shù)學(xué)和孫子算經(jīng)
- 丈量世界:時(shí)間、空間與數(shù)學(xué)(萬(wàn)物皆數(shù)學(xué))
- 基于變分法的細(xì)胞演化建模
- 模糊數(shù)學(xué)基礎(chǔ)及應(yīng)用
- 經(jīng)濟(jì)數(shù)學(xué)(二):線(xiàn)性代數(shù)、概率論及數(shù)理統(tǒng)計(jì)
- ANSYS 2020有限元分析從入門(mén)到精通(升級(jí)版)
- 復(fù)分析:可視化方法
- 別萊利曼的趣味代數(shù)學(xué)