aelf demo初试

官方参考链接:https://github.com/samjia12/aelfDeveloperCommunity/blob/master/AELF%20BOILERPLATE%20INTRODUCTION%20JUN%205.pdf

准备:

  1. 安装浏览器:chrome,设置为默认浏览器
  2. 安装nodejs:10.15.3(8以上稳定版即可)
  3. 安装.net https://download.visualstudio.microsoft.com/download/pr/fb931b49-7f40-44ba-a347-f0b9fe655864/c99d8ab0402d4b8e6831e1ee74aa945b/dotnet-sdk-2.2.107-win-x64.exe
  4. 安装git https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

mac用户安装 homebrew https://brew.sh/

IDE:可不用安装

安装:
1.克隆源代码:
git clone https://github.com/aelfProject/aelf-boilerplate

2.下载 protobuf
cd 到源代码的根目录
chain/scripts/install_choco.ps1 (Windows)
sh Chain/scripts/install.sh (MacOS)

3.创建你的区块链
cd 到源代码的根目录
cd chain/src/AElf.Boilerplate.Launcher
Dotnet build
Dotnet run bin/Debug/netcoreapp2.2/AElf.Boilerplate.Launcher

执行Dotnet build的时候遇到报错: google/protobuf/descriptor.proto: File not found.
解决:
下载 protoc-3.8.0-win32.zip
然后将解压出来的 google 文件夹拷贝到与 protoc.exe 同一目录下即可,本人的在 C:\ProgramData\chocolatey\bin\

开始demo:
1.Run HelloWorld Smart Contract Demo
cd aelf-boilerplate/chain/test/HelloWorldContract.Test
Dotnet test

aelf demo初试_第1张图片
aelf1.png

2.Run JS SDK Demo
cd aelf-boilerplate\web\JSSDK
Npm install
Npm start
aelf demo初试_第2张图片
aelf2.png

3.Run aelf browser plugin Demo
cd aelf-boilerplate\web\browserExtension
Npm install
Npm start
此步骤需要安装一个chrome插件:https://chrome.google.com/webstore/search/aelf?hl=en
aelf demo初试_第3张图片
aelf3.png

4.Run DAPP Demo - BingoGame
cd aelf-boilerplate\web\browserBingo
用chrom 打开 index.html
aelf demo初试_第4张图片
aelf4.png

你可能感兴趣的:(aelf demo初试)