坚固的编译器将声明词抛出代码



我正在写投票合同,面临几乎没有指定错误的错误 DeclarationError: Identifier not found or not unique. Voter[] public voters; ^---^ 这是我下面的完整代码。我不确定我做错了什么。

contract Ballot {
int public majorityVotes;
Candidate[] public candidates;
mapping (address => uint) public voterId;
Voter[] public voters;
event CandidateAdded (uint candidateId, uint amount, string description);
event Voted (uint candidateId, int result, address voter);
event Tallyvotes (uint candidateId, int result, uint tally, bool active);

有关更多详细信息,请访问此处

我试图为过去的第一次投票风格创建投票,但是汇编失败了。我希望有人可以指出一些明显的错误。

该错误说由于未定义而无法找到数据类型选民。

从您发布的git链接中,结构名称是投票而不是选民。

最新更新