第52篇 笔记-彩票类智能合约示例
本文所有智能合约源码来自网络。1.lottery01.sol特点:限定人数,随机数与合约拥有者无关;合约编译通过:pragma solidity ^0.4.23;contract Lottery10Users { address[10] participants; //限制为10个用户 uint8 participantsCount = 0; //本轮已参与用户数 uint randNonce = 0;