Fuelup beta-4 install creates meaningless errors

Fuelup installs higher versions of forc, fuel-core etc. for beta-4 and this causes the sway code to break.

fuelup toolchain install beta-4 

installs these dependencies:

  • forc 0.45.0
  • forc-explore 0.28.1
  • forc-index 0.20.7
  • forc-wallet 0.3.0
  • fuel-core 0.20.4
  • fuel-core-keygen 0.20.4
  • fuel-indexer 0.20.7

but in this guide it says:

the common error

   |
95 | 
96 |     fn get_governor() -> Address {
97 |         return storage.governor.read().unwrap();
   |                ^^^^^^^^^^^^^^^^ No storage has been declared
98 |     }
99 |     #[storage(read)]
   |

I’ve got rid of the meaningless errors by creating a custom toolchain with the dependency versions indicated in the beta-4 guide. It worked like a charm.

these commands will create a custom toolchain and install the required dependencies.

fuelup toolchain new my-beta-4
fuelup component add forc@0.44.0
fuelup component add forc-explore@0.28.1
fuelup component add forc-index@0.19.5
fuelup component add forc-wallet@0.2.5
fuelup component add forc-core@0.20.4
fuelup component add fuel-core@0.20.4
fuelup component add fuel-indexer@0.19.5
fuelup default my-beta-4
2 Likes

Hi @boray! Do you mind linking me to the exact guide that you were following as well as your code base?

Sorry, I missed to add the link. Here it is:
https://fuelbook.fuel.network/master/networks/beta-4.html

Hey Boray,

Thanks for the report. Intended version set for beta-4 toolchain:

  • forc 0.45.0
  • forc-explore 0.28.1
  • forc-index 0.20.7
  • forc-wallet 0.3.0
  • fuel-core 0.20.4
  • fuel-core-keygen 0.20.4
  • fuel-indexer 0.20.7

I can confirm that fuelup install toolchain beta-4 installs this version set. Maybe the guide was outdated while you were going through it because now I can see that the linked guide also states the same version set. Also mentioned error is coming from the sway compiler itself. So it should not be related to the mismatch between different binaries such as forc and fuel-core etc. If you are having other problems that makes you feel there is a mismatch between different binary versions, I am here to help.

2 Likes

StorageMap cannot compile in forc v0.45.0 which could be the reason you are seeing this ^^^^^^^^^^^^^^^^ No storage has been declared error

Please develop on v0.44.x until the issue is fixed.

Little update here:

Beta-4 channel is updated to use forc v0.46.1 which does not have this StorageMap problem. You can update to latest beta-4 toolchain.

Best,
k

2 Likes