From 49f1013a4e604754814aa9f088392f6d7826dc8e Mon Sep 17 00:00:00 2001 From: Behrang Norouzinia Date: Sat, 6 May 2023 15:59:20 +0330 Subject: [PATCH] Fix storage cost of 1MB Previously the calculator on the referenced page had a bug that was showing 4 TON cost for storage of 1MB for a year. Now it is fixed and shows 6 TON. --- src/routes/(examples)/02-variables/content.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/(examples)/02-variables/content.md b/src/routes/(examples)/02-variables/content.md index 7c2762a..670cc02 100644 --- a/src/routes/(examples)/02-variables/content.md +++ b/src/routes/(examples)/02-variables/content.md @@ -2,10 +2,10 @@ The most important variables are those that are persisted in state and retain their value between contract executions. They must be defined in the scope of the contract like `contractVar1`. -Persisting data in state costs gas. The contract must pay rent periodically from its balance. State storage is expensive, about [4 TON per MB per year](https://ton.org/docs/develop/smart-contracts/fees#how-to-calculate-fees). If the contract runs out of balance, the data will be deleted. If you need to store large amounts of data, like images, a service like [TON Storage](https://ton.org/docs/participate/ton-storage/storage-faq) would be more suitable. +Persisting data in state costs gas. The contract must pay rent periodically from its balance. State storage is expensive, about [6 TON per MB per year](https://ton.org/docs/develop/smart-contracts/fees#how-to-calculate-fees). If the contract runs out of balance, the data will be deleted. If you need to store large amounts of data, like images, a service like [TON Storage](https://ton.org/docs/participate/ton-storage/storage-faq) would be more suitable. Persistent state variables can only change in *receivers* by sending messages as transactions. Sending these transactions will cost gas to users. Executing *getters* is read-only, they can access all variables, but cannot change state variables. They are free to execute and don't cost any gas. -Local variables like `localVar1` are temporary. They're not persisted to state. You can define them in any function and they will only exist in run-time during the execution of the function. You can change their value in *getters* too. \ No newline at end of file +Local variables like `localVar1` are temporary. They're not persisted to state. You can define them in any function and they will only exist in run-time during the execution of the function. You can change their value in *getters* too.