Skip to content

Instantly share code, notes, and snippets.

View jhd2best's full-sized avatar
💪
keep learning...

Haodi jhd2best

💪
keep learning...
  • HangZhou,China
View GitHub Profile
@jhd2best
jhd2best / ballot.sol
Created April 6, 2022 15:22
ZKU Question B-3
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/// @title Voting with delegation.
contract Ballot {
// This declares a new complex type which will
// be used for variables later.
// It will represent a single voter.
struct Voter {
uint256 weight; // weight is accumulated by delegation