"Hello, Starknet!" quickstart tutorial troubleshooting
Declaring, deploying, and interacting with HelloStarknet locally
scarb build
fails to run version command for Rust
Starting from Scarb version 2.10 and Starknet Foundry version 0.37.0, Rust is longer required for projects with the following line in their Scarb.toml
file:
[tool.scarb]
allow-prebuilt-plugins = ["snforge_std"]
If not all three conditions are met and Rust is not installed, running scarb build
(and scarb test
) will result in a compilation error. To resolve this, either update Scarb, Starknet Foundry, and your Scarb.toml
file accordingly or install Rust.
starkli declare
unable to identify compiler version
When using starkli declare
, Starkli will do its best to identify the compiler version of the declared class. In case it fails, the --compiler-version
flag can be used to specify the version of the compiler.
-
Find the compiler versions supported by Starkli by running:
starkli declare --help
and looking for the possible values of the
--compiler-version
flag. -
Find the current Scarb version in use:
scarb --version
-
In case a different compiler version is required, switch to a different Scarb version using
asdf
:-
Install the desired Scarb version:
asdf install scarb <VERSION>
-
Select the desired Scarb version as the local version for the project:
asdf set scarb <VERSION>
-
Deploying and interacting with HelloStarknet on Sepolia
Fetching a predeployed Sepolia account
-
Export the private key from your wallet by:
-
For Argent wallets: navigating to
Settings
→<YOUR_ACCOUNT>
→Export Private Key
. -
For Braavos wallets: navigating to
Settings
→Privacy and Security
→Export Private Key
.
-
-
Create a keystore file by running:
starkli signer keystore from-key keystore.json
and entering the private key of your smart wallet, along with a password that will be used to encrypt it.
-
Fetch the account by running:
starkli account fetch \ <SMART_WALLET_ADDRESS> \ --output account.json \ --network=sepolia