Examples of how Starknet Hardhat plugin can be used.
This project demonstrates a basic Hardhat project, but with Starknet plugin.
git clone [email protected]:0xSpaceShard/starknet-hardhat-example.git
cd starknet-hardhat-example
npm ci
npx hardhat starknet-compile cairo1-contracts/contract1.cairo --single-file
npx hardhat starknet-compile-deprecated contracts/contract.cairo
Some scripts require environment variables (search for usage of ensureEnvVar
in the repo). You can define these variables in an .env
file in the project root.
npx hardhat test test/quick-test.ts
starknet-hardhat-plugin
versionpackage.json
is fixed to use the latest starknet-hardhat-plugin
version this example repository is synced with.
If you're having issues trying to use this example repo with the Starknet plugin, try running npm install
or npm update
, as it may be due to version mismatch in the dependencies.
master
- latest stable examplesplugin
- used for testing by Starknet Hardhat Plugin
plugin
branch.master
should ideally be reset (fast forwarded) to plugin
(less ideally merged).