Skip to content

Instantly share code, notes, and snippets.

@ngtuna
Last active January 3, 2019 03:53
Show Gist options
  • Save ngtuna/5d4c02fab66f507d98f8fe324edfd77e to your computer and use it in GitHub Desktop.
Save ngtuna/5d4c02fab66f507d98f8fe324edfd77e to your computer and use it in GitHub Desktop.
slot-smc
struct ValidatorState {
address owner;
bool isCandidate;
uint256 cap;
mapping(address => uint256) voters;
}
struct WithdrawState {
mapping(uint256 => uint256) caps;
uint256[] blockNumbers;
}
mapping(address => WithdrawState) withdrawsState; 0
mapping(address => ValidatorState) validatorsState; 1
mapping(address => address[]) voters; 2
address[] public candidates; 3
uint256 public candidateCount = 0; 4
uint256 public minCandidateCap; 5
uint256 public minVoterCap; 6
uint256 public maxValidatorNumber; 7
uint256 public candidateWithdrawDelay; 8
uint256 public voterWithdrawDelay; 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment