# create-5ire-dapp

> A full-stack starter template with React & Truffle or Hardhat to develop, deploy, and test Solidity smart contracts on the 5ire testnet network.

Latest version **1.0.0** (published 2023-04-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install create-5ire-dapp
pnpm add create-5ire-dapp
yarn add create-5ire-dapp
bun add create-5ire-dapp
```

Provides the command `create-5ire-dapp`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-04-14 |
| First published | 2023-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Sambit Sargam Ekalabya |
| Maintainers | sambitsargam |
| Keywords | react, hardhat, smart-contract, blockchain, 5ire-testnet |

## Links

- npm: https://www.npmjs.com/package/create-5ire-dapp
- Repository: https://github.com/sambitsargam/create-5ire-dapp
- Homepage: https://github.com/sambitsargam/create-5ire-dapp#readme
- Issues: https://github.com/sambitsargam/create-5ire-dapp/issues
- npm.io page: https://npm.io/package/create-5ire-dapp

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-04-14
- 0.0.6 — 2023-04-14
- 0.0.5 — 2023-04-01
- 0.0.4 — 2023-04-01
- 0.0.3 — 2023-04-01
- 0.0.2 — 2023-03-23
- 0.0.1 — 2023-03-23

## README

<p align="center">
    <img align="center" src="https://docs.5ire.org/img/ms-icon-150x150.png" width="175"></img>
</p>

<h1 align="center">create-5ire-dapp</h1>

<div align="center">
    <img src="https://img.shields.io/badge/platform-5ire-blue.svg?style=flat-square" alt="Platform">
    <img src="https://img.shields.io/github/license/sambitsargam/create-5ire-dapp?color=orange&style=flat-square" alt="License">
    <img src="https://img.shields.io/github/v/release/sambitsargam/create-5ire-dapp?color=blue&style=flat-square" alt="Release">
    <img src="https://img.shields.io/npm/dw/create-5ire-dapp?style=flat-square" alt="Downloads">
</div><br>

A full-stack starter template with React & Hardhat or Truffle to develop, deploy, and test Solidity smart contracts on the 5ire testnet network. The starter kit also includes pre-installed ` hardhat full code`,`Truffle code`, `tailwindcss`,`Metamask SDK`, `web3.js`, etc. packages.

## 📺 Quickstart

<div align="center">
</div>

## 🛠️ Installation guide
### It Contains Both for Hardhat and Truffle Individually

## 🛠️ Installation guide for Truffle

Install this for first time by running the following command in your terminal:

```sh
npm install -g create-5ire-dapp
```

### ⌛️ create-5ire-dapp command

Open up your terminal (or command prompt) and type the following command:

```sh
npx create-5ire-dapp <your-dapp-name> truffle

# cd into the directory
cd <your-dapp-name>
```

### 🔑 Mnemonic

Ensure you create a `.secret` file in the `root` directory. Then paste your [Metamask mnemonic](https://metamask.zendesk.com/hc/en-us/articles/360015289512-How-to-reveal-your-Secret-Recovery-Phrase) in `.env` with the variable name `MNEMONIC` as follows:

```sh
xxxx ,xxxx ,xxxx ,xxxx ,xxxx ,xxxx ,xxxx ,xxxx ,xxxx ,xxxx ,xxxx ,xxxx
```

### ⚙️ Compile

Now, you can write your contracts in `./contracts/` directory, replace `Greeter.sol` with `<your-contracts>.sol` file. To write tests, go to `./test` directory and create `<your-contracts>.test.js`.

```sh
truffle compile

# for testing the smart contracts
truffle test
```

After successful compilation, the artifacts directory will be created in `./src/abis` with a JSON `/<your-contracts>.json` containing ABI and Bytecode of your compiled smart contracts.

### ⛓️ Deploy

Before deploying the smart contracts, please make sure you have a `5ire testnet` in your Metamask wallet with sufficient funds, follow this [quickstart](https://docs.5ire.org/) guide if you do not have one.

Also, make changes in `./migrations/2_deploy_contracts.js` (replace the greeter contract name with `<your-contract-name>`).

For deploying the smart contracts to 5ire testnet network, type the following command:

```sh
truffle deploy --network testnet
```

Copy-paste the deployed contract address [here](https://github.com/sambitsargam/create-5ire-dapp/blob/main/src/App.js#L40)


## 🛠️ Installation guide for Hardhat
### 📦 Install the Package Specified in the Package.json

```sh
Install this for first time by running the following command in your terminal:

```sh
npm install -g create-5ire-dapp
```

### ⌛️ create-5ire-dapp command

Open up your terminal (or command prompt) and type the following command:

```sh
npx create-5ire-dapp <your-dapp-name> hardhat

# cd into the directory
cd <your-dapp-name>
```

### 🔑 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=0x734...
```

### ⚙️ Compile

Now, you can write your contracts in `./contracts/` directory, replace `Greeter.sol` with `<your-contracts>.sol` file. To write tests, go to `./test` directory and create `<your-contracts>.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/<your-contracts>.sol/<your-contracts>.json` containing ABI and Bytecode of your compiled smart contracts.

Please make the changes while [Importing](https://github.com/sambitsargam/create-5ire-dapp/blob/main/src/App.js#L7) the JSON in `./src/app.js`.


### ⛓️ Deploy

Before deploying the smart contracts, please make sure you have a `5ire testnet` in your Metamask wallet with sufficient funds, follow this [quickstart](https://docs.5ire.org/) guide if you do not have one.

Also, make changes in `./scripts/deploy.js` (replace the greeter contract name with `<your-contract-name>`).

For deploying the smart contracts to 5ire testnet network, type the following command:

```sh
npx hardhat run scripts/deploy.js
```

Copy-paste the deployed contract address [here](https://github.com/sambitsargam/create-5ire-dapp/blob/main/src/App.js#L35)

```sh
<your-contract> deployed to: 0x...
```

### 💻 React client

start react app

```sh
npm start
# Starting the development server...
```


## ⚖️ License

create-5ire-dapp is licensed under the [MIT License](https://github.com/sambitsargam/create-5ire-dapp/blob/main/LICENSE).

<hr>
Don't forget to leave a star ⭐️ ~ <a href="https://twitter.com/sambitsargam" target="_blank"><img src="https://img.shields.io/twitter/follow/sambitsargam?style=social" alt="twitter" /></a>

---
_Source: https://npm.io/package/create-5ire-dapp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
