This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a Hardhat Ignition module that deploys that contract.
Try running some of the following tasks:
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat ignition deploy ./ignition/modules/Lock.ts
In order to use this, create a .env DEPLOYER_PRIVATE_KEY = "Your private key here"
npm install
cd hellorust
make
cd ..
npm compile
pnpm deploy (npx hardhat compile)
- Create
.env
file in the root directory and add the following:
DEPLOYER_PRIVATE_KEY="Your private key here"
- Build wasm contract
cd hellorust
make
cd ..
- Compile the contract
npx hardhat compile
- Deploy the contract
npx hardhat deploy --network localhost
# or
npx hardhat deploy --network dev
- Interact with the contract
# SOLIDITY_CONTRACT_ADDRESS - was returned after the deploy command
npx hardhat get-greeting --contract <SOLIDITY_CONTRACT_ADDRESS> --network localhost