Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed parsing rollappID parameter #379

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const (
flagSLGasLimit = "dymint.settlement_config.gas_limit"
flagSLGasPrices = "dymint.settlement_config.gas_prices"
flagSLGasFees = "dymint.settlement_config.gas_fees"
flagRollappID = "dymint.settlement_config.rollapp_id"
)

// NodeConfig stores Dymint node configuration.
Expand Down Expand Up @@ -132,6 +133,7 @@ func AddNodeFlags(cmd *cobra.Command) {
cmd.Flags().String(flagSLGasFees, def.SettlementConfig.GasFees, "Settlement Layer gas fees")
cmd.Flags().String(flagSLGasPrices, def.SettlementConfig.GasPrices, "Settlement Layer gas prices")
cmd.Flags().Uint64(flagSLGasLimit, def.SettlementConfig.GasLimit, "Settlement Layer batch submit gas limit")
cmd.Flags().String(flagRollappID, def.SettlementConfig.RollappID, "The chainID of the rollapp")
}

func BindDymintFlags(cmd *cobra.Command, v *viper.Viper) error {
Expand Down Expand Up @@ -186,6 +188,9 @@ func BindDymintFlags(cmd *cobra.Command, v *viper.Viper) error {
if err := v.BindPFlag("gas_limit", cmd.Flags().Lookup(flagSLGasLimit)); err != nil {
return err
}
if err := v.BindPFlag("rollapp_id", cmd.Flags().Lookup(flagRollappID)); err != nil {
return err
}

return nil
}
3 changes: 2 additions & 1 deletion settlement/dymension/dymension.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"strconv"
"time"

"cosmossdk.io/errors"
"github.com/avast/retry-go"
"github.com/cosmos/cosmos-sdk/codec"
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand Down Expand Up @@ -287,7 +288,7 @@ func (d *HubClient) GetBatchAtIndex(rollappID string, index uint64) (*settlement
func (d *HubClient) GetSequencers(rollappID string) ([]*types.Sequencer, error) {
sequencers, err := d.sequencerQueryClient.SequencersByRollapp(d.ctx, &sequencertypes.QueryGetSequencersByRollappRequest{RollappId: d.config.RollappID})
if err != nil {
return nil, settlement.ErrNoSequencerForRollapp
return nil, errors.Wrapf(settlement.ErrNoSequencerForRollapp, "rollappID: %s", rollappID)
}
sequencersList := []*types.Sequencer{}
for _, sequencer := range sequencers.SequencerInfoList {
Expand Down