This project demonstrates a basic Hardhat project, but with Starknet plugin.
git clone git@github.com: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
package.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
- New PRs and features should be targeted to the
plugin
branch. - After releasing a new plugin version,
master
should ideally be reset (fast forwarded) toplugin
(less ideally merged).