目录
写在前面的话
近来老大要求了解下区块链,于时翻了各种资料,先是搞清楚各种概念就花了不少时间。这不今天终于开始向智能合约迈出了第一步,就像小孩学走路的时候都会摔跤,我这第一步还没跨出去就摔了。根据官网介绍——Truffle 是基于 Solidity 语言的一套开发框架,它简化了去中心化应用(DApp)的构建和管理流程。本身是采用 Javascript 编写,支持智能合约的编译、部署和测试。嗯,你理解的没错,Truffle就是让你编写合约更简单。废话不多说,直接上问题。主要内容
- OS:Windows10 Node v10.15.3
- 初始化项目:
- google一番后发现是网络原因,大致是访问不到境外的域名服务器,知道原因就好解决了。直接复制下面配置到hosts文件(C:\Windows\System32\drivers\etc\hosts),直接复制下面配置到
# GitHub Start192.30.255.112 gist.github.com
192.30.255.112 github.com 192.30.255.112 www.github.com 151.101.56.133 avatars0.githubusercontent.com 151.101.56.133 avatars1.githubusercontent.com 151.101.56.133 avatars2.githubusercontent.com 151.101.56.133 avatars3.githubusercontent.com 151.101.56.133 avatars4.githubusercontent.com 151.101.56.133 avatars5.githubusercontent.com 151.101.56.133 avatars6.githubusercontent.com 151.101.56.133 avatars7.githubusercontent.com 151.101.56.133 avatars8.githubusercontent.com 151.101.56.133 camo.githubusercontent.com 151.101.56.133 cloud.githubusercontent.com 151.101.56.133 gist.githubusercontent.com 151.101.56.133 marketplace-screenshots.githubusercontent.com 151.101.56.133 raw.githubusercontent.com 151.101.56.133 repository-images.githubusercontent.com 151.101.56.133 user-images.githubusercontent.com # GitHub End
再执行一次,everything goes well