官术网_书友最值得收藏!

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;
主站蜘蛛池模板: 九江县| 尼木县| 横山县| 广州市| 巴马| 淮南市| 习水县| 肥城市| 开平市| 北辰区| 镇平县| 平昌县| 泾阳县| 洛隆县| 泾阳县| 南投市| 松桃| 报价| 三门县| 安徽省| 即墨市| 周口市| 安徽省| 辰溪县| 章丘市| 方山县| 大港区| 宁河县| 南充市| 抚州市| 文水县| 纳雍县| 贺州市| 武城县| 尤溪县| 波密县| 中山市| 宁化县| 大竹县| 泗水县| 高陵县|