Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Comments fix
Browse files Browse the repository at this point in the history
  • Loading branch information
goran-ethernal committed Sep 5, 2023
1 parent 4a92ab0 commit bb28c7a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions command/genesis/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ func (p *genesisParams) validateFlags() error {
if err := p.validatePremineInfo(); err != nil {
return err
}

if err := p.validateGovernorAdminAddr(); err != nil {
return err
}
}

// Check if the genesis file already exists
Expand Down Expand Up @@ -531,6 +535,15 @@ func (p *genesisParams) validatePremineInfo() error {
return errReserveAccMustBePremined
}

// validateGovernorAdminAddr validates governor admin address
func (p *genesisParams) validateGovernorAdminAddr() error {
if err := types.IsValidAddress(p.governorAdmin); err != nil {
return fmt.Errorf("governor admin address is not valid: %w", err)
}

return nil
}

// validateBurnContract validates burn contract. If native token is mintable,
// burn contract flag must not be set. If native token is non mintable only one burn contract
// can be set and the specified address will be used to predeploy default EIP1559 burn contract.
Expand Down

0 comments on commit bb28c7a

Please sign in to comment.