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

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;
主站蜘蛛池模板: 永年县| 祁门县| 峨眉山市| 海宁市| 邯郸市| 扶沟县| 青冈县| 镇沅| 兴安县| 绍兴县| 游戏| 昭通市| 靖宇县| 北安市| 海阳市| 吉林省| 巧家县| 柳江县| 亚东县| 双桥区| 连云港市| 青冈县| 根河市| 六盘水市| 仪陇县| 志丹县| 建德市| 安丘市| 梧州市| 蒙阴县| 东乌珠穆沁旗| 东安县| 茂名市| 恩施市| 辽中县| 遵化市| 南安市| 磴口县| 清流县| 泗洪县| 昌平区|