Giter Club home page Giter Club logo

akhileshthite / create-fvm-dapp Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 1.0 1.79 MB

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

Home Page: https://www.npmjs.com/package/create-fvm-dapp

License: MIT License

Shell 0.13% Solidity 2.46% JavaScript 75.48% HTML 13.98% CSS 7.94%
fevm filecoinvirtualmachine hardhat ipfs npm-package react solidity tailwindcss web3storage fvm create-fvm-dapp filecoin starter-kit javascript

create-fvm-dapp's Introduction

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:

npx create-fvm-dapp <your-dapp-name>

# cd into the directory
cd <your-dapp-name>

โš ๏ธ 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 in .env with the variable name PRIVATE_KEY as follows:

PRIVATE_KEY=1234

โš™๏ธ 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.

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 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 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 FEVM network, type the following command:

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

๐Ÿ“œ Contract deployed to: 0x...

๐Ÿ’ป React client

start react app

npm start
# Starting the development server...

Please read the hardhat documentation and FVM documentation for more details.

โš–๏ธ License

create-fvm-dapp is licensed under the MIT License.


Don't forget to leave a star โญ๏ธ ~ twitter

create-fvm-dapp's People

Contributors

akhileshthite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

amalendusuresh

create-fvm-dapp's Issues

bug: HardhatError: HH303: Unrecognized task callRPC

Had to set the priorityFee to resolve the HTTP Error: Provider Error issue while deploying contracts.

Getting "HardhatError: HH303: Unrecognized task callRPC" for dynamically setting the priority fees:

  const priorityFee = await hre.run('callRPC', {
     method: 'eth_maxPriorityFeePerGas',
     params: [],
   });

Hence, setting priority fees manually:

maxPriorityFeePerGas: 199992,

There's is something wrong with the hardhat version.
current hardhat version: 2.12.7

Feel free to raise a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.