If the user specifies a custom cairo1BinDir, this is used. If the compilerVersion is specified in the hardhat config file, this is used. These two options cannot be specified at the same time (there is a runtime check). If the user doesn't specify any, the last compiler version compatible with the plugin is used.
If the user specifies a compilerVersion and it is not present, we download it for the user and store it in ~/.starknet-hardhat-plugin. If already present here (and executable), we use that.
Development related changes
Removed condition (and indentation) in setup-compiler.sh
Extract common testing functionality by introducing assertCompilationArtifactsExist
In starknet-wrapper.ts, the compilation functions are moved to the abstract parent class (StarknetWrapper)
The usefulness of starknet wrapper keeps on decreasing.
Checklist:
[x] Formatted the code
[x] No linter errors + tried to avoid introducing linter warnings
[x] Performed a self-review of the code
[x] Rebased to the last commit of the target branch (or merged it into my branch)
[x] Documented the changes
[x] Updated the test directory (with a test case consisting of network.json, hardhat.config.ts, check.ts)
Usage related changes
compilerVersion
is specified in the hardhat config file, this is used. These two options cannot be specified at the same time (there is a runtime check). If the user doesn't specify any, the last compiler version compatible with the plugin is used.~/.starknet-hardhat-plugin
. If already present here (and executable), we use that.Development related changes
assertCompilationArtifactsExist
starknet-wrapper.ts
, the compilation functions are moved to the abstract parent class (StarknetWrapper
)Checklist:
test
directory (with a test case consisting ofnetwork.json
,hardhat.config.ts
,check.ts
)plugin
branch ofstarknet-hardhat-example
:https://github.com/0xSpaceShard/starknet-hardhat-example/pull/120