Issue
For example- I am sending an Tezos FA1.2/FA2 token to an address that has previously not held any amount of that token. So, the address is not present in the ledger big_map of the contract. This would clearly lead to an increase in storage being used, since the address and the corresponding balance needs to be added to the big_map. Mostly this incurs a storage fee ~0.01675 tez (on mainnet).
However, at times, I have noticed that no storage fee is incurred in such a scenario (just gas). Why does this seem to happen?
Solution
That may happen when someone removes data from the storage before your operation, releasing some space, so that the contract has a kind of "prepaid" space, for which storage fee won't be taken.
It works like this:
- op1 writes 10 bytes (storage fee is taken for 10 bytes);
- op2 removes 5 bytes (no storage fees, nor refunds);
- op3 writes 3 bytes (no storage fees);
- op4 writes 3 bytes (storage fee is taken for 1 byte);
Answered By - Figario Answer Checked By - Clifford M. (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.