以太坊

DApp架构

开发区块链小程序



开发原理去中心化架构图

开发区块链小程序

安装geth节点

    brew 

(用mark进行开发)

步骤:

启动

1.创建一个目录以太坊的数据存放目录

2.创建一个配置文件用来做创世块以及设置网络genesis.json

3.初始化genesisi文件---生成了两个目录 (一个账号信息/一个区块链数据)

4.启动节点

  

rpc协议


Remix 开发工具介绍 在线solidity语言

    1  pragam solidity^4.1.

    2    contract Message{

                    string msg;

         function setMsg(string _msg) public{

                       msg=_msg;

            }

            function getMsg()

                        return msg;

            }       

}



        



{记录/读取/  消耗gas}



在网页中调节以太坊节点

1.引入web3js

js/web3.js

2.链接

<!DOCTYPE html>

<html lang="en">

<body>

<script src="js/web3.js"></script》

<input type ="button"  value="huoquzhanghao ">

<input type ="button"  value=

<input type ="button"  value=

<script>

    document.querySelectorAll("input")[0].onclick=function(){

v

开发区块链小程序

这些东西需要在控制台才能显示


微信开发者工具



相关文章:

  • 2021-04-23
  • 2021-07-09
  • 2021-12-18
  • 2021-10-05
  • 2021-04-16
  • 2021-06-19
  • 2021-10-02
  • 2021-06-11
猜你喜欢
  • 2021-07-11
  • 2022-01-13
  • 2021-09-01
  • 2022-01-24
  • 2021-08-09
  • 2021-06-21
  • 2021-05-31
相关资源
相似解决方案