
智能合约
Thread刚
这个作者很懒,什么都没留下…
展开
-
智能合约宠物商店
安装相应的框架全局安装Truffle,上一篇文章已经配置好了>npm install -g truffle下载盒子。这也需要安装必要的依赖项。>truffle unbox pet-shop运行开发控制台。提供一个私有链的环境>truffle develop编译和迁移智能合约。请注意,在开发控制台内部,我们不会在命令前添加truffle。>compi...原创 2019-11-14 22:35:55 · 433 阅读 · 1 评论 -
node.js本地安装和Truffle安装
node.js安装1. NodeJS的下载地址:http://nodejs.cn/download/ win64.zip2. 在path环境变量中,添加nodejs路径 3. node h 获取各种参数信息 4. node test.js 可以执行当前目录的test.js文件使用淘宝 NPM 镜像安装cnpm$ npm install -g cn...原创 2019-11-11 18:26:54 · 1596 阅读 · 3 评论 -
众筹智能合约
1.ico.sol 需要结合ERC20.sol使用pragma solidity^0.4.20;interface token{ function transfer(address _to,uint256 _account) external ;}contract ICO { uint public fundingGoal;//众筹目标 uint pu...原创 2019-11-06 16:03:52 · 983 阅读 · 0 评论 -
拍卖竞拍智能合约
pragma solidity^0.4.24;contract auction{ address public seller;//卖家 //最高出价者 address public buyer; uint public auctionAmount;//最高价 uint auctionEndTime;//竞拍结束时间 bool isFin...原创 2019-10-30 22:53:32 · 1045 阅读 · 0 评论 -
简单智能合约
转账pragma solidity^0.4.24;contract Money{ address public owner; constructor() public { owner =msg.sender; } //chong zhi function payMoney() payable public { ...原创 2019-10-30 21:57:11 · 431 阅读 · 0 评论