diff --git a/command/genesis/predeploy/genesis_predeploy.go b/command/genesis/predeploy/genesis_predeploy.go index 0a4c77e620..c0d5a6cd21 100644 --- a/command/genesis/predeploy/genesis_predeploy.go +++ b/command/genesis/predeploy/genesis_predeploy.go @@ -3,9 +3,10 @@ package predeploy import ( "fmt" + "github.com/spf13/cobra" + "github.com/0xPolygon/polygon-edge/command" "github.com/0xPolygon/polygon-edge/command/helper" - "github.com/spf13/cobra" ) func GetCommand() *cobra.Command { diff --git a/command/genesis/predeploy/params.go b/command/genesis/predeploy/params.go index f0611f1206..0b8b231bda 100644 --- a/command/genesis/predeploy/params.go +++ b/command/genesis/predeploy/params.go @@ -21,21 +21,14 @@ const ( ) var ( - errInvalidPredeployAddress = errors.New("invalid predeploy address provided") - errAddressTaken = errors.New("the provided predeploy address is taken") - errReservedPredeployAddress = errors.New("the provided predeploy address is reserved") - errInvalidAddress = fmt.Errorf( + errInvalidPredeployAddress = errors.New("invalid predeploy address provided") + errAddressTaken = errors.New("the provided predeploy address is taken") + errInvalidAddress = fmt.Errorf( "the provided predeploy address must be >= %s", predeployAddressMin.String(), ) -) -var ( predeployAddressMin = types.StringToAddress("01100") - reservedAddresses = []types.Address{} -) - -var ( - params = &predeployParams{} + params = &predeployParams{} ) type predeployParams struct { @@ -77,26 +70,11 @@ func (p *predeployParams) initPredeployAddress() error { return errInvalidPredeployAddress } - address := types.StringToAddress(p.addressRaw) - if isReservedAddress(address) { - return errReservedPredeployAddress - } - - p.address = address + p.address = types.StringToAddress(p.addressRaw) return nil } -func isReservedAddress(address types.Address) bool { - for _, reservedAddress := range reservedAddresses { - if address == reservedAddress { - return true - } - } - - return false -} - func (p *predeployParams) verifyMinAddress() error { address, err := hex.DecodeHexToBig(p.address.String()) if err != nil {