NEWTON
Asked
4 months ago
14
views
0
Hey, As each storage value is by default initialized to 0, does writing it to zero actually do something? Does it use storage in layer 1 with value 0? Or does it just do nothing? Should I check that the value I want to write is different than 0 before writing it otherwise I will waste storage?
The same idea: does writing a storage value to 0 free storage on l1
Newton
asked
4 months ago
0
nope in l1 the default is 0 you can test yourself on remix:
address public uninitialized;
answered
4 months ago
0
Hey, 0 is the default value of any storage variable. Rewriting an existing value is free (at least in storage cost).
answered
4 months ago
Cairo Multiple Storage Vars
How to use Kakarot for my Solidity Contracts?
Are you able to nest mappings in Cairo like you can in Solidity?
storage for array
Braavos does not seem be injected when running app locally it does work when deployed is there something i should check?
Cairo: Getting the zero address
What is the inefficiency in this cairo code using alloc_locals
Expect function call to fail in cairo?
Is there a threshold of optimum transaction speed/cost in L2s?
What should I use to execute abi.encodePacked from solidity in starknet?
Cairo Error: Getting Error while setting value of item in array
How to create Structs in Cairo Lang for StarkNet?
List of Cairo Decorators
How can I get ETH for the test net in StarkNet?