区块链DAPP 开发入门 代码实现 场景应用

资讯 2024-06-28 阅读:59 评论:0
美化布局示例

欧易(OKX)最新版本

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

APP下载   全球官网 大陆官网

币安(Binance)最新版本

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

APP下载   官网地址

火币HTX最新版本

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

APP下载   官网地址

智能合约是运行在区块链公链上的一种代码。

Smart contracts are a code that runs on the public chain of block chains.

可以将区块链公链理解成操作系统,智能合约虚拟机则是编程语言编译之后的代码运行环境。

Block chains can be understood as operating systems, and the smart contract virtual machine is the code operating environment after programming language has been compiled.

区块链通常被理解为超级账本,账户与账户直接可以通过交易来完成转账,但这种转账区别于传统银行。

Block chains are often understood as super-books, and accounts and accounts can be directly traded to complete transfers, which are distinguished from traditional banks.

(1)这是一个完全去中心化的金融系统。因为整个系统中没有这样的中心化部门来管理账户信息。使用者只需要根据一种【非对称加密算法】来生成一个密钥对,其公钥作为账户地址,也就是常说的【区块链钱包地址】,这个地址可以在网络中传播,允许网络中所有的账户获取和使用。
由于私钥非常复杂,因此区块链钱包会将私钥进行对称加密,通过使用者输入人类能够理解的密码作为私钥加密的密钥,如果忘记解密密钥的密码,用户就失去了对账户的操作权限,只能查看余额但是没法进行转账和使用,这就是社交媒体经常报道丢失比特币的情况。

(1) This is a completely decentralised financial system. Because there is no centralised sector in the system to manage account information. Users simply need to generate a key pair based on an [asymmetric encryption algorithm] that uses a public key as an account address, often referred to as a [block chain wallet address], which can be disseminated on the network, allowing all accounts in the network to access and use.
, because of the complexity of the private key, the block chain wallets symmetrically encrypt the private key, using the user to enter a password that humans can understand as a private key encryption key. If the user forgets the password to decipher the key, it loses operational rights to the account and can only look at the balance but cannot transfer and use it, which is what social media often report about the loss of bitcoin.

(2)这是一个完全无中心的账本系统。传统情况下,A给B转账100,银行给A扣除100,给B加100,生成两条记录。在区块链上发生的交易则完全不一样,每一笔交易都是一条转账记录,如果该交易成功被整个区块链网络认可则可转账成功,并且会将转账记录存储在区块链的数据库里面,每个区块链节点都可以访问和操作这个数据库,并且任何人都可以查询交易双方的账户信息。BTC的转账,除了转给对方,还要将账户下的余额转给自己,这样就会生成多条记录,这样做是因为BTC没有账户余额的设计。

(2) This is a completely uncentreded account system. Traditionally, A transfers 100 to B, the bank deducts 100 to B plus 100 to produce two records. Transactions occurring on the block chain are completely different, with each transaction being a transfer record, successful if the transaction is successfully recognized by the entire block chain network, and the transfer record is stored in the block chain database, which can be accessed and operated by each block chain node, and anyone can access the account information of both parties to the transaction. BTC transfers, in addition to transferring the balance under the account to each other, generate multiple records, because BTC does not have the account balance design.

(3)发生在区块链上的交易,是存储在区块链网络中的所有全节点上的,并且也是公开可查的。但是即使能看到某个账户下的所有交易和账户余额,也无法跟现实生活中的人联系在一起。

(3) Transactions that occur on the block chain are stored on all nodes of the block chain network and are publicly available. But even if you can see all transactions and account balances under an account, it cannot be associated with people in real life.

区块的作用就是将不同时间阶段内的交易数据按照一定的格式和数量,打包成结构化数据,方便存储和管理。只有被打包到区块中并且被全公链网络认可的交易,才能算真正的有效交易。比如以太坊出块的时间间隔约为15s,而比特币网络则需要10min才生成一个区块。

Blocks have the effect of packaging transaction data into structured data in a given format and quantity over time to facilitate storage and management. Only transactions that are packaged in blocks and endorsed by a whole public-chain network can be considered to be effective transactions.

区块在被增加到区块链之前,并不是所有区块都可以生成区块数据。这个过程有一定的门槛,需要筛选出一个值得信任的节点来生成数据,然后由其他节点来验证其生成数据的有效性。这个生产区块的过程会得到数字货币的激励,因此很多节点会加入生产区块的竞争。这个过程被称作挖矿,而生成数据的节点被称作矿工。

Blocks do not generate block data until they are added to the block chain. This process has a certain threshold of filtering a trusted node to generate data, and then other nodes to verify the validity of the data generated. The process of producing blocks will be stimulated by digital money, so many nodes will compete in the production nodes. This process is called mining and the node to generate the data is called miners.

成为出块人就可以成功拿到奖励,奖励分为系统的奖励和交易中的交易手续费,在每一笔交易数据中,转账人都可以手动设置手续费,这些手续费用于奖励矿工打包的工作。在转账时设置的手续费越高,转账时间就越短,转账速度就越快。

In each transaction, the transferor can manually set the fee, which is a reward for the miners’ work. The higher the fee, the shorter the time, and the faster the time.

为了持续生成区块而被所有网络节点认可的方案就叫做共识算法,被称作PoW (Proof of Word).

A program endorsed by all network nodes for the continued creation of blocks is called the Consensus Algorithm, known as Proof of Word.

由于整个区块链系统是点对点的对等网络,没有统一的中心机构协调各个节点的行为,各个行为都是相互独立的,存在同时生产出区块的情况。为了解决这个问题,区块链采用了一种长链抛弃锻炼的决策方式。参考微信群的报名接龙,多个人选择了同一个序号的情况。

Since the entire block chain system is a peer-to-peer network, there is no unified central agency to coordinate the behaviour of the nodes, which are independent and produce blocks simultaneously. To solve this problem, the block chain adopts a long-chain approach to decision-making that abandons exercise.

以太坊在比特币网络的基础上增加了以太坊智能合约虚拟机,即EVM。就成了一个可编程的去中心化平台,任何系统开发者在支付一定的部署费用之后,就可以拥有一套完全去中心化的业务系统。

Ether has built on the Bitcoin network with an EVM virtual computer, a programable decentralised platform where any system developer can have a fully decentralised business system after paying for deployment costs.

以太坊账户分为两种:(1)智能合约账户:nonce、余额、存储数据的Hash值 (2)外部账户:nonce、余额  组成。

The Taiyo account is divided into two categories: (1) smart contract account: nence, balance, cash value of stored data (2) external account: nence, balance & nbsp; composition.

以太坊公链是操作系统,EVM是区块链代码的运行环境,而Solidity则是区块链的编程语言,通过编程语言编写的逻辑模块被称作智能合约。

The Etherno public chain is the operating system, the EVM is the operating environment for block chain codes, while Solidity is the programming language for block chains, and the logical modules developed through programming language are called smart contracts.

 

ICO通俗来说就是众筹,类似于股市的IPO。

ICO is popular, like the IPO of the stock market.

传统众筹可能存在众筹平台和项目方达成某种默契,存在舞弊的空间。

Traditional crowd-sourcing may have some room for tacit agreement between the public and the project parties and for fraud.

区块链众筹

The chain of blocks is on the line.

(1)资金的使用和项目的方向可以很好地体现众筹人的集体决策意愿

(1) The use of funds and the direction of projects can well reflect the collective decision-making will of the raisers

(2)整个管理和决策过程都是去中心化的、透明公开的。

(2) The entire management and decision-making process is decentralised and transparent.

 

(1)限制筹集资金的使用

(1) Restrictions on the use of fund-raising

(2)公司项目管理的投票

(2) Voting on corporate project management

(3)资金退出机制的管理

(3) Management of exit mechanisms

 

美化布局示例

欧易(OKX)最新版本

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

APP下载   全球官网 大陆官网

币安(Binance)最新版本

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

APP下载   官网地址

火币HTX最新版本

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

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

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

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

分享:

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

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

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • 从 IPFS社区Meetup谈谈2020年的IPFS的发展历程

    从 IPFS社区Meetup谈谈2020年的IPFS的发展历程
    8月3日, IPFS社区Meetup 如期举办,这一次的社区Meetup由交流与演讲和闪电演示两部分组成,其实该会议主要带领我们回顾了IPFS在2020年的发展历程(包括项目进展、IPFS生态发展等),展示了IPFS及其生态。2020年对于IPFS而言是不平凡的一年,其唯一激励层Filecoin的主网即将上线,这让IPFS和Filecoin在全球范围内得到了前所未有的关注,也推动了IPFS的高速发展。接下来,我们一起走进IPFS在20...
  • 超10万人爆仓,比特币跳水,发生了什么

    超10万人爆仓,比特币跳水,发生了什么
    现货比特币ETF上市第二日,数字货币再迎来抛售。比特币一度跌破42000美元/枚,截止1月13日内跌幅超7%,报42562.1美元/枚。The current Bitcoin ETF is on the second day of the market and the digital currency is sold again. Bitcoin fell by over 7% to $4562.1 on 13 January.现货比特币ETF普遍跌6%左右。其中,DEFI跌...
  • 兴业基金调研远光软件、东芯股份

    兴业基金调研远光软件、东芯股份
    根据6月6日公布的公开市场信息和机构研究,世界安全基金会最近对下列两家上市公司进行了一项研究: 1) 光电软件(工程师基金参与公司专项研究) 其中一个亮点是该公司深入参与建造南方网中心和技术平台,导致南网市场在 " 九天 " 平台产品方面取得重大突破;该公司的Won-宇宙大厅已上线,而且,除了Won-宇宙之外,远洋宇宙的应用现已扩大到Won-宇宙发射、Won-宇宙-教师和政党建设-宇宙;该公司的Far-O-Cloud平台已经实现了完全成熟的国家生产,也可以在全国云中运作。...
  • 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...
  • $DOG暴涨400%,加密货币或许正在重新定义和计量“价值”

    $DOG暴涨400%,加密货币或许正在重新定义和计量“价值”
    近/克洛克-0/5,Meme币狗?走吗?去哪?那个?MOON($ DOG)连续上涨超过230%,突破前期高点,达到0.0062美元。在同一时期,比特币生态的许多主流L2协议代币下跌了50%以上。这些就是我们所说的“价值币”。虽然大起大落不能说明什么,但从过去的牛市来看,领头羊MemeCoin表现非凡。在上一轮牛市中,$DOGE的价格上涨了超过150倍,其市值接近900亿美元。还有其他MemeCoin,如$Shib、$People、$ELON、$AKITA等。2 vkwmkpm...
标签列表