https://github.com/wighawag/template-ethereum-contracts
Template to develop ethereum smart contracts
https://github.com/wighawag/template-ethereum-contracts
Last synced: 8 days ago
JSON representation
Template to develop ethereum smart contracts
- Host: GitHub
- URL: https://github.com/wighawag/template-ethereum-contracts
- Owner: wighawag
- Created: 2020-10-23T11:39:16.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-03T15:55:45.000Z (18 days ago)
- Last Synced: 2025-04-07T03:02:23.060Z (15 days ago)
- Language: TypeScript
- Size: 1.23 MB
- Stars: 499
- Watchers: 7
- Forks: 117
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-solidity - wighawag/template-ethereum-contracts - Template to develop smart contracts. (Resources)
- awesome-solidity - wighawag/template-ethereum-contracts - Template to develop smart contracts. (Resources)
- awesome-solidity - wighawag/template-ethereum-contracts - Template to develop smart contracts. (Resources)
- awesome-dapptools - Template Ethereum Contracts
- awesome-solidity - wighawag/template-ethereum-contracts - Template to develop smart contracts. (Resources)
- awesome-solidity - wighawag/template-ethereum-contracts - Template to develop smart contracts. (Resources)
README
# A template for EVM-based smart contract development
A template for developing EVM smart contract using hardhat (v3) and hardhat-deploy (v2)
## How to use it?
### Compile your contracts
```bash
pnpm compile
```### Test your contracts
```bash
pnpm test
```This will test both solidity and node test (as hardhat v3 does)
### watch for changes and rebuild automatically
```bash
pnpm compile:watch
```### deploy your contract
- on localhost
This assumes you have a local node running: `pnpm local_node`
```bash
pnpm run deploy localhost
```- on a network of your choice
Just make sure you have your .env.local setup, see [.env](.env) or if you use hardhat secret store, configure it
```bash
pnpm run deploy
```### execute scripts
```bash
pnpm execute scripts/setMessage.ts
```or if you want to execute in a forked environment :
```bash
pnpm fork:execute scripts/setMessage.ts "Hello world"
```### zellij
[zellij](https://zellij.dev/) is a useful multiplexer (think tmux) for which we have included a [layout file](./zellij.kdl) to get started
Once installed simply run the following to get a local in-memory Ethereum node running along with the tests
```bash
pnpm start
```if you want to try Zellij without installing it, try this :
```bash
bash <(curl -L zellij.dev/launch) --layout zellij.kdl
```In the shell in the upper pane, you execute the script as mentioned above
```bash
pnpm execute localhost scripts/setMessage.ts "Hello everyone"
```## Initial Setup
You need to have these installed
- [nodejs](https://nodejs.org/en)
- [pnpm](https://pnpm.io/)
```bash
npm i -g pnpm
```Then you need to install the local dependencies with the following command:
```bash
pnpm i
```We also recommend installing [Zellij](https://zellij.dev/) to have your dev env setup in one go via `pnpm start`