以太坊开发:Dapp示例-简单投票(二)

投票项目智能合约内容:Voting.sol

pragma solidity ^0.4.22;
contract Voting {
   
     
    mapping (bytes32 => uint8) public votesReceived;
    bytes32[] public candidateList;
    constructor(bytes32[] candidateNames) public {
   
     
        candidateList = candidateNames;

你可能感兴趣的:(以太坊)