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

Unable to declare classes fetched by `starkli class-by-hash` #90

Closed amanusk closed 2 weeks ago

amanusk commented 2 weeks ago

It should be possible to declare the results fetched by starkli class-by-hash or class-at to another chain (e.g. devnet/katana) without formatting the resulting file

Steps to reproduce: Fetching a class from sepolia:

starkli class-by-hash 0x00816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253 > braavos.json

Trying to declare on another chain:

starkli declare ./braavos.json
Enter keystore password:
Error: failed to parse contract artifact
amanusk commented 2 weeks ago

Closing, works with starkli class-by-hash 0x00816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253 --parse

Perhaps this can stated in docs/help that flag is needed for declaration

xJonathanLEI commented 2 weeks ago

Just added a section for this: https://book.starkli.rs/declaring-classes#redeclaring-classes