"Hello, Starknet!" quickstart tutorial troubleshooting

Setting up your environment

Starkli unable to detect shell

Procedure
  1. Detect whether your shell is zsh or bash:

    echo $SHELL
  2. Add:

    . /Users/<NAME>/.starkli/env

    to either ~/.zshrc or ~/.bashrc.

  3. Restart the terminal, and run either:

    source ~/.zshrc

    or:

    source ~/.bashrc

Declaring, deploying, and interacting with HelloStarknet locally

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.

Procedure
  1. Find the compiler versions supported by Starkli by running:

    starkli declare --help

    and looking for the possible values of the --compiler-version flag.

  2. Find the current Scarb version in use:

    scarb --version
  3. In case a different compiler version is required, switch to a different Scarb version using asdf:

    1. Install the desired Scarb version:

      asdf install scarb <VERSION>
    2. Select the desired Scarb version as the local version for the project:

      asdf local scarb <VERSION>

Deploying and interacting with HelloStarknet on Sepolia

Fetching a predeployed Sepolia account

Procedure
  1. Export the private key from your wallet by:

    • For Argent wallets: navigating to Settings<YOUR_ACCOUNT>Export Private Key.

    • For Braavos wallets: navigating to SettingsPrivacy and SecurityExport Private Key.

  2. 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.

  3. Fetch the account by running:

    starkli account fetch \
        <SMART_WALLET_ADDRESS> \
        --output account.json
        --network=sepolia