【区块链 | DAPP】Dapp应该怎么开发?分享一篇Dapp开发的逻辑(分享) 更新中~

资讯 2024-06-20 阅读:73 评论:0
写在前面It's in the front. 本篇文章将带领你从零学会一个Dapp开发,笔者从最初的不了解区块链概念到如今精通Dapp、智能合约开发,中间踩过无...
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

写在前面

It's in the front.

本篇文章将带领你从零学会一个Dapp开发,笔者从最初的不了解区块链概念到如今精通Dapp、智能合约开发,中间踩过无数的坑,经历过无数困难!

This article will lead you from a Dapp to xff0c; from an initial lack of understanding of the block chain concept to a current mastery of Dapp, smart contract development xff0c; numerous pits xff0c in the middle; numerous difficulties xff01;

去中心化应用(decentralized application),或简称DApp,通常与区块链平台例如以太坊相联系,是一个在分布式点对点网络上运行的应用程序,而不是在一台中央计算机上。这样做的主要好处是,网络的用户不依赖于中央计算机来发送和接收信息。

Decentralizing applications xff08; decentralized application) xff0c; or Dapp, usually linked to block chain platforms such as the Tailing Room xff0c; an application running on a distributed point-to-point network xff0c; rather than on a central computer. The main benefits of doing so are xff0c; network users do not rely on a central computer to send and receive information.

为了充分理解去中心化应用程序与中心化应用程序之间的区别,我们可以看一下中心化应用程序的一些例子,如Facebook、微博和YouTube。这些都是中心化式应用程序的示例,因为为了使用它们,用户依赖于由中央实体拥有和操作的服务器和网络。这与去中心化应用相反,在去中心化应用中,用户不依赖于中央实体来发送和接收信息。

In order to fully understand the difference between decentralized applications and centralized applications xff0c; we can look at some examples of centralized applications xff0c; e.g. Facebook, Weibo and YouTube. These are examples of centralized applications xff0c; because users rely on servers and networks owned and operated by central entities for their use. This is contrary to decentralized applications xff0c; in decentralized applications xff0c; users do not rely on central entities to send and receive information.

即使DApp不一定需要区块链,大多数DApps都利用区块链技术的强大功能,例如智能合同。智能合同是旨在执行协议条款的自动执行合同。例如,如果您想购买房子,此过程将涉及多个第三方,如房地产代理和律师,他们将为您解决购买问题。然而,在使用智能合同的情况下,这一过程只需要买方和卖方参与。一旦满足所有条件,智能合同将独立于任何第三方执行。

Even if DApp does not necessarily need a block chain & #xff0c; most DApps use the powerful function of block chain technology & #xff0c; e.g. smart contracts are automatic execution contracts designed to enforce the terms of the agreement. For example, xff0c; if you want to buy a house xff0c; this process will involve multiple third parties xff0c; e.g. real estate agent and lawyer xff0c; they will solve the purchase problems for you. xff0c; xff0c in the case of smart contracts; this process only requires the involvement of buyers and sellers.

DApps依赖智能合同来访问区块链并运行,这与中心化应用程序依赖中心化服务器运行的方式非常相似。如果你不完全确定什么是区块链,那么看看后面的解释。

Dapps relies on smart contracts to access block chains and run xff0c; this is very similar to the way a centralised application relies on a centralised server. If you are not entirely sure what a block chain is xff0c; then look at the explanation that follows.

以下是应用程序在真正被视为去中心化之前的一些常见要求:

The following are some of the common requirements of applications before they are really considered to be decentralised:

  • 应用程序必须是开源的
  • 应用程序的数据必须存储在去中心化的区块链上
  • 应用程序必须使用加密令牌也叫通证(例如比特币,以太币)或应用程序固有的令牌
  • 应用程序必须通过密码算法生成令牌,例如工作量证明

去中心化应用对比中心化应用区别:

(a) The difference between the application of decentralised application comparison and the application of #xff1a;

项目中心化应用去中心化应用
代码开源闭源完全开源
数据存放中心化存储存放在智能合约,公平公开化
公平性不透明化,暗箱操作公平公正
运行效率取决于服务器配置,效率较高运行效率取决于公链节点,不可控
手续费用户无需手续费,体验好需要手续费,手续费多少取决于代码量

1. 需要知道自己用什么公链?

Need to know what public chain you use #xff1f;

这一步需要准备:

This step requires preparation #xff1a;

公链的节点rpc接口(公用节点或者自建节点)

Node rpc interface & #xff08; public node or self-building node & #xff09;

公链钱包

Public chain wallet.

公链gas对应的代币

The public chain gas corresponds to the token.

2. 需要学习熟悉公链接口访问形式

2. Need to learn to be familiar with the form of access to the public link

例如,使用js Java 等语言时候需要学习对应的工具包(web3.js web3j)

e.g. xff0c; toolkit for learning when using js Java and other languages xff08; web3.js web3j)

3. 需要准备好dapp浏览器,或者钱包插件

3. Need to prepare dapp browser & #xff0c; or wallet plugins

这个可以使用开源APP或者开源钱包插件安装在浏览器

This can be installed in a browser using an open source APP or an open source wallet plugin.

1. 第一步开发智能合约

1. First step in the development of smart contracts

一般选择以太坊合约、bsc合约、tron合约 建议采用solidity语言?

Do you have any idea what it would be like to use the Taiyo contract, the bsc contract, the tron contract, to recommend the use of the language of solidity?

2. 第二步部署智能合约

2. Step 2 deployment of smart contracts

可以先在测试网部署智能合约,需要到测试网对应的水龙头申请测试币

The smart contract can be deployed first on the test network xff0c; test currency will be applied for for taps to match the test network

部署一般使用remix工具部署

Deployment of generic remix deployment

3. 第三步开发dapp前端

3. Step 3 development dapp frontend

一般采用vue框架开发前端。前端涉及钱包连接,合约调用,数据查询,一般dapp需要有后端支撑

A vue frame development frontend is generally used. The front end involves wallet connections & #xff0c; contract calls & #xff0c; data queries & #xff0c; general dapp needs backend support

4. 第四步后端开发

4. Development of the fourth step back end

一般dapp需要后端作为辅助,为了提高用户体验。也可以不开发后端,纯前端与合约交互

Usually dapp requires backends as support & #xff0c; to improve user experience. You can also not develop backends & #xff0c; pure front ends interact with contracts

1. web3(web3j web3.js等)

1. web3 (web3j web3.js, etc.)

2. vue 前端框架

2. vue frontend framework

3. metamask插件

3. Metamask Plugin

本人已开放区块链专栏,欢迎大家订阅,有任何问题欢迎咨询!

区块链零基础到实战教程-专栏https://blog.csdn.net/qq_28505809/category_10635007.html

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • 区块链社区有哪些?区块链社区是什么?

    区块链社区有哪些?区块链社区是什么?
    展开全文...
  • 0.00006694个比特币等于多少人民币/美金

    0.00006694个比特币等于多少人民币/美金
    0.00006694比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00006694比特币等于4.53424784美元/32.5436 16人民币。比特币(BTC)美元(USDT)人民币(CNY)0.000066944.53424784【比特币密码】32.82795436 16比特币对人民币的最新汇率为:490408.64 CNY(1比特币=490408.64人民币)(1美元=7.24人民币)(0.00006694USDT=0.0004846456 CNY)汇率更新时...
  • 0.00015693个比特币等于多少人民币/美金

    0.00015693个比特币等于多少人民币/美金
    0.000 15693比特币等于多少人民币?根据比特币对人民币的最新汇率,0.000 15693比特币等于10.6 1678529美元/76.86554996人民币。比特币(BTC)【比特币价格翻倍】美元(USDT)人民币(CNY)0.000/克洛克-0/5693【数字货币矿机】10.6 167852976.8655254996比特币对人民币的最新汇率为:489,807.72 CNY(1比特币= 489,807.72人民币)(1美元=7.24人民币)(0.00015693 U...
  • 0.00003374个比特币等于多少人民币/美金

    0.00003374个比特币等于多少人民币/美金
    0.00003374比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00003374比特币等于2.2826 1222美元/16.5261124728人民币。比特币(BTC)美元(USDT)人民币(CNY)0.00003374克洛克-0/22216.5261124728比特币对人民币的最新汇率为:489807.72 CNY(1比特币=489807.72人民币)(1美元=7.24人民币)(0.00003374USDT=0.0002442776 CNY)。汇率更新于2024...
  • 2018-5-31币圈简报

    2018-5-31币圈简报
    一、要闻资讯类I. KEY INFORMATION CATEGORY1、央视:数字货币在京揭牌成立!中国或为此突变!1. View: Digital currency is established in Kyoto! China or mutated for it!中国数字货币来了˂a href="https://mp.weixin.qq.com/s/69fxKCf8GKSCscS4lT8WCA" Target="_blank"rel="noformlow"" Chinese...
标签列表