A question about Algorand Global Storage - If a transaction add/update to the global storage, who pays the fees? Is it paid by the transaction initiator or creator of smart contract?
Comparing this to Solidity, where transaction can add to the state of global storage and transaction initiator pays for it. Is similar possible in Algorand.
I know there is local storage option, however it has a limitation where account with local storage could clear the local storage.
Also I remember Algorand is planning to expand Global Storage limit, curious how the updates to global storage handled and who need to pay for the storage?
The contract creator has to hold the MBR for global state.
With upcoming box storage, the contract account itself has to cover the MBR.
2 Likes
So what is the best mechanism to upgrade the storage.
Charging small fees and checking at every transaction if storage will be full and using the contract holding to pay for upgrade?
I am thinking if the Dapp is running on its own, how could it handle the upgrade?
For contracts, you have to specify the maximum number of keys (local and/or global) that you will ever need, at contract creation time. Then the contract creator has to cover the MBR for global state, and each account opting-in has to cover the MBR for local-state, if any.
Only the upcoming box storage is really ‘pay as you go’
1 Like