Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This is a basic CRUD decentralized blockchain application in typescript

NotificationsYou must be signed in to change notification settings

vinodnextcoder/simple-dApp-typescript

Repository files navigation

A Create Your First dAPP On ethereum

AUTHOR:

DESCRIPTION:

This repository contains a source code to create simple CURD application and smart contract code.

Setup

Introduction

Inthisarticle,wearegoingtobuildasimpleCRUDdecentralizedapplicationontheEthereumblockchain.AlsowillcreateaCRUDsmartcontractforthesameapplications.Thisisapracticalhands-onarticle.Detailsprocesshttps://medium.com/geekculture/create-your-first-dapp-on-ethereum-6eb50b4083f2-1.Basicunderstandingofsolidityorgeneralprogramming.-2.Metamaskextensiononchromeorfirefox.(Toconnectwithweb3)-3.BasicunderstandingofWeb3.-4.Walletonmetamaskwithsomeether(coins)foraropstennetwork.-5.Nodejsorjavascriptunderstanding.

Smart Contract Deployment

This is a simple curd smart contract, which deals with students’ data.create copy .env.example to .env fileLet’s deploy the contract in a remix environmentFirst, navigate to address https://remix.ethereum.org/ Add new curd.solfile and copy-paste the code from the repository.From the left side click on the 3rd button deployment window will appear of metamask

Setup Steps

Smart contract deployment on ropsten networkFirst, create an account on https://infura.io get infra keyTesting of a smart contract.The architecture of a decentralized application.Build the decentralized application (dAPP) to interact with the blockchain.Run and test the applicationget abi and contract address from  https://remix.ethereum.org/ Run commands nodejs

Installation

npm install

Run

Step-1 npx ts-node src/index.ts################################### Insert Record  uncomment this linse obj.createStudent('Vinod','MSc');commentobj.readStudent(0);Step- ooutput{  from: '0x8aeaexxxxxxxxxxxxxxxxxxxxxx',  gasUsed: 101374,  logs: [],  logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',  status: true,  to: '0x83977bf3e9xxxxxxxxxxxxxxxx',  transactionHash: '0x37169068b6606193XXXXXXXXXXXXXXXXXXXXX',    transactionIndex: 25,     type: '0x0'}----------------------------------------------------------Step-2 Reading record npx ts-node src/index.ts################################### To read record  // comment this line in the index file ---->> obj.createStudent('Vinod','MSc'); // uncomment this lin obj.readStudent(0);

License

MIT License


[8]ページ先頭

©2009-2025 Movatter.jp