Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-polkadot-dapp

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-polkadot-dapp

  • 0.0.1-alpha0
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
0
Weekly downloads
 
Created
Source

react-solidity template

This template sets up a combination of Solidity smart contracts and a React front-end app that interacts with these smart contracts.
This template includes

  • ethers for smart contract interaction
  • Tailwind CSS + Tailwind UI.
  • Vite for dev tooling.

Writing smart contracts

Currently, only Remix environment is supported.

  1. Run pnpm remixd to start remixd environment.
  2. Go to https://remix.polkadot.io and activate REMIXD plugin.
  3. Start hacking! Changes performed in Remix will be synced to local file system.
  4. After deploying and pinning a smart contract, it'll be saved on your file system, run pnpm contracts:build to export contract data.

Interacting with smart contracts from frontend app

  1. Run pnpm frontend:dev to start vite environment
  2. You can import all exported contracts using import { contracts } from "contracts"
  3. You can call your contracts like this:
import { Contract, formatEther } from "ethers";
import { contracts, ContractData } from "contracts"

const contractData: ContractData = contracts["1b5b93a223026219f4f75e5b90c20970ab976451"];
const contract = new Contract(contractData.address, contractData.abi, signer);

const transactionResponse = await contract.retrieve(); // method on your smart contract

More info at:

FAQs

Package last updated on 27 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc