https://github.com/lfscamargo/hardhat-typescript-boilerplate
Hardhat typecript project with sample contract
https://github.com/lfscamargo/hardhat-typescript-boilerplate
Last synced: 11 months ago
JSON representation
Hardhat typecript project with sample contract
- Host: GitHub
- URL: https://github.com/lfscamargo/hardhat-typescript-boilerplate
- Owner: LFSCamargo
- Created: 2021-09-16T13:47:25.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-16T13:48:05.000Z (almost 5 years ago)
- Last Synced: 2025-03-17T08:47:10.110Z (over 1 year ago)
- Language: TypeScript
- Size: 161 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hardhat typescript boilerplate
This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts.
## Local env setup
1. Install [Ganache](https://www.trufflesuite.com/ganache)
2. Setup a new project select an account from the accounts that are listed and copy a private key and the server url and place it on the env

3. After that change the local env private key and api url
like this:
```
PRIVATE_KEY = a494e40ee032ead82210bebd8d0b50c432058a83f4e3b40bc441ab82116d6e90
API_URL = HTTP://127.0.0.1:7545
```
4. After compile the project running `yarn compile`
5. Afterwards run the tests `yarn test`
## Check other hardhat commands
```shell
npx hardhat accounts
npx hardhat balance --account private_key_here
npx hardhat compile
npx hardhat clean
npx hardhat test
```