GenesisState constructor

GenesisState({
  1. Params? params,
  2. FeePool? feePool,
  3. Iterable<DelegatorWithdrawInfo>? delegatorWithdrawInfos,
  4. String? previousProposer,
  5. Iterable<ValidatorOutstandingRewardsRecord>? outstandingRewards,
  6. Iterable<ValidatorAccumulatedCommissionRecord>? validatorAccumulatedCommissions,
  7. Iterable<ValidatorHistoricalRewardsRecord>? validatorHistoricalRewards,
  8. Iterable<ValidatorCurrentRewardsRecord>? validatorCurrentRewards,
  9. Iterable<DelegatorStartingInfoRecord>? delegatorStartingInfos,
  10. Iterable<ValidatorSlashEventRecord>? validatorSlashEvents,
})

Implementation

factory GenesisState({
  $3.Params? params,
  $3.FeePool? feePool,
  $core.Iterable<DelegatorWithdrawInfo>? delegatorWithdrawInfos,
  $core.String? previousProposer,
  $core.Iterable<ValidatorOutstandingRewardsRecord>? outstandingRewards,
  $core.Iterable<ValidatorAccumulatedCommissionRecord>? validatorAccumulatedCommissions,
  $core.Iterable<ValidatorHistoricalRewardsRecord>? validatorHistoricalRewards,
  $core.Iterable<ValidatorCurrentRewardsRecord>? validatorCurrentRewards,
  $core.Iterable<DelegatorStartingInfoRecord>? delegatorStartingInfos,
  $core.Iterable<ValidatorSlashEventRecord>? validatorSlashEvents,
}) {
  final _result = create();
  if (params != null) {
    _result.params = params;
  }
  if (feePool != null) {
    _result.feePool = feePool;
  }
  if (delegatorWithdrawInfos != null) {
    _result.delegatorWithdrawInfos.addAll(delegatorWithdrawInfos);
  }
  if (previousProposer != null) {
    _result.previousProposer = previousProposer;
  }
  if (outstandingRewards != null) {
    _result.outstandingRewards.addAll(outstandingRewards);
  }
  if (validatorAccumulatedCommissions != null) {
    _result.validatorAccumulatedCommissions.addAll(validatorAccumulatedCommissions);
  }
  if (validatorHistoricalRewards != null) {
    _result.validatorHistoricalRewards.addAll(validatorHistoricalRewards);
  }
  if (validatorCurrentRewards != null) {
    _result.validatorCurrentRewards.addAll(validatorCurrentRewards);
  }
  if (delegatorStartingInfos != null) {
    _result.delegatorStartingInfos.addAll(delegatorStartingInfos);
  }
  if (validatorSlashEvents != null) {
    _result.validatorSlashEvents.addAll(validatorSlashEvents);
  }
  return _result;
}