xJonathanLEI / starkli

Starkli (/ˈstɑːrklaɪ/), a ⚡ blazing ⚡ fast ⚡ CLI tool for Starknet powered by 🦀 starknet-rs 🦀
https://book.starkli.rs
Apache License 2.0
155 stars 43 forks source link

Can't declare classhash #85

Closed Th0rgal closed 2 months ago

Th0rgal commented 2 months ago

Hey, I'm encountering a persistent error when trying to declare a class hash using Starkli, despite setting up the environment variables correctly and confirming the validity of the keystore. This issue happens no matter which RPC or network settings I use.

Steps to Reproduce:

  1. First, I set up the environment variables for Starkli like so:
    export STARKNET_ACCOUNT="~/.starkli-wallets/sepolia/th0rgal.json"
    export STARKNET_RPC="https://sepolia.rpc.starknet.id/"
    export STARKNET_KEYSTORE="~/.starkli-wallets/sepolia/th0rgal.keystore.json"
  2. Then, I run the command to declare the contract class:
    starkli declare target/release/composable_multicall_ComposableMulticall.compiled_contract_class.json

Expected Result: The class hash should be declared smoothly without any errors.

Actual Result: Unfortunately, the declaration process fails, suggesting there might be an issue with Starkli or perhaps some aspect of my setup.

Additional Information:

Configuration Files:

xJonathanLEI commented 2 months ago

Unfortunately, the declaration process fails, suggesting there might be an issue with Starkli or perhaps some aspect of my setup.

What exactly is the failure though?

Th0rgal commented 2 months ago
   starkli declare target/release/composable_multicall_ComposableMulticall.compiled_contract_class.json

Sorry I forgot the most important part, I just get:

Error: No such file or directory (os error 2)
xJonathanLEI commented 2 months ago

Thanks for reporting. Found a bug that's presumably already fixed but turns out it still hangs around. Fixed in https://github.com/xJonathanLEI/starkli/commit/53ffb435fff917a245e3ef5e417a73299a742730. Releasing soon.

Meanwhile, you can work around this issue by using full path for STARKNET_ACCOUNT instead of including ~.

Th0rgal commented 2 months ago

Awesome. Thank you

xJonathanLEI commented 2 months ago

The fix has now been released with v0.2.9.