0xSpaceShard / starknet-hardhat-plugin

A plugin for integrating Starknet tools into Hardhat projects
https://0xspaceshard.github.io/starknet-hardhat-plugin/
MIT License
198 stars 36 forks source link

hardhat starknet-compile does not handle single file compilation after Cairo 2.0.1 #397

Closed FabijanC closed 11 months ago

FabijanC commented 1 year ago

Introduced in: https://github.com/starkware-libs/cairo/pull/3533 Used like: https://github.com/starkware-libs/cairo/blob/main/README.md#compiling-starknet-contracts

Since hardhat starknet-compile is meant to be used for single-file compilation we could simply append --single-file internally. This, however, would not work with Cairo versions <= 2.0.0. This could be handled by checking the compiler version provided, but might not be necessary. Using the dockerized compiler should not be a problem, only the one specified with cairo1BinDir.

FabijanC commented 1 year ago

I changed the title to reflect the fact that Cairo 2.0.0 still doesn't require the --single-file flag to be used. EDIT: neither does Cairo 2.0.1

FabijanC commented 11 months ago

Resolved via #408