When I compile the tutorial code with nargo build, I hit the following error.
error: cannot find `storage` in this scope
┌─ /Users/anonymous/aztec-packages/yarn-project/noir-contracts/src/contracts/counter_contract/src/main.nr:49:24
│
49 │ let counters = storage.counters;
│ ------- not found in this scope
│
Could someone explain how “storage” get defined? Is it because every contract has it implicitly? If so, how come it doesn’t work for me.
Actually we are still hunting this bug. Sometimes the LSP acts up and says storage is not in scope when there is another error. I’m hoping to get the docs fix out soon!
Thanks for the investigation.
Is the language server involved here? I am running nargo from the command line on the master branch.
This is also the first error. There were a few warnings before.