diff --git a/ignite/cmd/testnet_inplace.go b/ignite/cmd/testnet_inplace.go index 2911ef9e9c..d85b835151 100644 --- a/ignite/cmd/testnet_inplace.go +++ b/ignite/cmd/testnet_inplace.go @@ -1,6 +1,8 @@ package ignitecmd import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ignite/cli/v29/ignite/pkg/cliui" "github.com/ignite/cli/v29/ignite/services/chain" "github.com/spf13/cobra" @@ -80,10 +82,17 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error { if err != nil { return err } - - var acc string - for _, i := range cfg.Accounts { - acc = acc + "," + i.Address + var operatorAddress sdk.ValAddress + var accounts string + for _, acc := range cfg.Accounts { + if cfg.Validators[0].Name == acc.Name { + accAddr, err := sdk.AccAddressFromBech32(acc.Address) + if err != nil { + return err + } + operatorAddress = sdk.ValAddress(accAddr) + } + accounts = accounts + "," + acc.Address } chainID, err := c.ID() @@ -93,8 +102,8 @@ func testnetInplace(cmd *cobra.Command, session *cliui.Session) error { args := chain.InplaceArgs{ NewChainID: chainID, - NewOperatorAddress: cfg.Validators[0].OperatorAddress, - AcountsToFund: acc, + NewOperatorAddress: operatorAddress.String(), + AcountsToFund: accounts, } return c.TestNetInPlace(cmd.Context(), args) } diff --git a/ignite/config/chain/v1/validator.go b/ignite/config/chain/v1/validator.go index 259b60c255..9ee1e51103 100644 --- a/ignite/config/chain/v1/validator.go +++ b/ignite/config/chain/v1/validator.go @@ -9,8 +9,6 @@ type Validator struct { // Name is the name of the validator. Name string `yaml:"name" doc:"Name of the validator."` - OperatorAddress string `yaml:"operatoraddress" doc:"OperatorAddress of the validator."` - // Bonded is how much the validator has staked. Bonded string `yaml:"bonded" doc:"Amount staked by the validator."`