An open API service indexing awesome lists of open source software.

https://github.com/akhileshthite/create-fvm-dapp

📦 A full-stack starter template with React & Hardhat to develop, deploy, and test Solidity smart contracts on the FEVM network.
https://github.com/akhileshthite/create-fvm-dapp

create-fvm-dapp fevm filecoin filecoinvirtualmachine fvm hardhat ipfs javascript npm-package react solidity starter-kit tailwindcss web3storage

Last synced: 29 days ago
JSON representation

📦 A full-stack starter template with React & Hardhat to develop, deploy, and test Solidity smart contracts on the FEVM network.

Awesome Lists containing this project

README

        



create-fvm-dapp


Platform
License
Release
Downloads

A full-stack starter template with React & Hardhat to develop, deploy, and test Solidity smart contracts on the FEVM network. The starter kit also includes pre-installed `web3.storage`, `tailwindcss`, `web3.js`, etc. packages.

## 📺 Quickstart



## 🛠️ Installation guide

### ⌛️ create-fvm-dapp command

Open up your terminal (or command prompt) and type the following command:

```sh
npx create-fvm-dapp

# cd into the directory
cd
```

> ⚠️ If you encounter any errors during package installation, please ensure that your `node.js` and `npm` versions are up-to-date.

### 🔑 Private key

Ensure you create a `.env` file in the `root` directory. Then paste your [Metamask private key](https://metamask.zendesk.com/hc/en-us/articles/360015289632-How-to-export-an-account-s-private-key) in `.env` with the variable name `PRIVATE_KEY` as follows:

```sh
PRIVATE_KEY=1234
```

### ⚙️ Compile

Now, you can write your contracts in `./contracts/` directory, replace `Greeter.sol` with `.sol` file. To write tests, go to `./test` directory and create `.test.js`.

```sh
npx hardhat compile

# for testing the smart contracts
npx hardhat test
```

After successful compilation, the artifacts directory will be created in `./src/artifacts` with a JSON `/contracts/.sol/.json` containing ABI and Bytecode of your compiled smart contracts.

Please make the changes while [Importing](https://github.com/akhileshthite/create-fvm-dapp/blob/670b4561e7da5db6faa121f2664c427b8427da60/src/App.js#L9) the JSON in `./src/app.js`.

### ⛓️ Deploy

Before deploying the smart contracts, please make sure you have a `hyperspace testnet` in your Metamask wallet with sufficient funds, follow this [quickstart](https://github.com/filecoin-project/testnet-hyperspace#quickstart) guide if you do not have one.

Also, make changes in `./scripts/deploy.js` (replace the greeter contract name with ``).

For deploying the smart contracts to FEVM network, type the following command:

```sh
npx hardhat run --network hyperspace scripts/deploy.js

# mainnet: npx hardhat run --network filecoin_mainnet scripts/deploy.js
```

Copy-paste the deployed contract address [here](https://github.com/akhileshthite/create-fvm-dapp/blob/27af748b814f3e1448db710af03f39d12464cc20/src/App.js#L32)

```sh
📜 Contract deployed to: 0x...
```

### 💻 React client

start react app

```sh
npm start
# Starting the development server...
```

Please read the [hardhat documentation](https://hardhat.org/hardhat-runner/docs/getting-started#quick-start) and [FVM documentation](https://docs.filecoin.io/developers/smart-contracts/filecoin-virtual-machine/) for more details.

## ⚖️ License

create-fvm-dapp is licensed under the [MIT License](https://github.com/akhileshthite/create-fvm-dapp/blob/main/LICENSE).



Don't forget to leave a star ⭐️ ~ twitter