GenesisState constructor

GenesisState({
  1. Int64? startingProposalId,
  2. Iterable<Deposit>? deposits,
  3. Iterable<Vote>? votes,
  4. Iterable<Proposal>? proposals,
  5. DepositParams? depositParams,
  6. VotingParams? votingParams,
  7. TallyParams? tallyParams,
})

Implementation

factory GenesisState({
  $fixnum.Int64? startingProposalId,
  $core.Iterable<$6.Deposit>? deposits,
  $core.Iterable<$6.Vote>? votes,
  $core.Iterable<$6.Proposal>? proposals,
  $6.DepositParams? depositParams,
  $6.VotingParams? votingParams,
  $6.TallyParams? tallyParams,
}) {
  final _result = create();
  if (startingProposalId != null) {
    _result.startingProposalId = startingProposalId;
  }
  if (deposits != null) {
    _result.deposits.addAll(deposits);
  }
  if (votes != null) {
    _result.votes.addAll(votes);
  }
  if (proposals != null) {
    _result.proposals.addAll(proposals);
  }
  if (depositParams != null) {
    _result.depositParams = depositParams;
  }
  if (votingParams != null) {
    _result.votingParams = votingParams;
  }
  if (tallyParams != null) {
    _result.tallyParams = tallyParams;
  }
  return _result;
}