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