/react-solidity-template

A React Template to easily use MetaMask and communicate with your solidity contract with web3

Primary LanguageJavaScript

React + Solidity(Web3) Project Template

The base project was bootstrapped with Create React App and subsequently modified by me to create a template!

Instructions

  • Compile your solidity code and deploy it to the ethereum network (Mainnet, Rinkeby, Ropsten etc)
  • Copy the ABI Interface and the Deployed Contract address
  • Go to contracts/contract.js and replace the abi and CONTRACT_ADDRESS with your values and uncomment the export line.
  • Now open terminal, and type yarn add web3@1.3.5 and this will install the dependency to your project!
  • Now, to start the local server run yarn start and your webapp should open in localhost:3000
  • Read the tips.txt file to get some tips on how to interact with your deployed contract using javascript
  • Now when you open the webapp in your browser, you should see your metamask extension popup and ask to connect with the webapp! If you do not have MetaMask installed it asks you to install it.
  • Go ahead! Start BUIDLing