Skip to content

Commit

Permalink
fix: handle custom env manual input gas price (#1130)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemijspavlovs authored Nov 24, 2024
1 parent 74846cc commit 8d96df2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cmd/rollapp/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,18 @@ func populateSequencerMetadata(raCfg roller.RollappConfig) error {
Telegram: "",
X: "",
}
defaultGasPrice, ok := github_com_cosmos_cosmos_sdk_types.NewIntFromString(
raCfg.HubData.GasPrice,
)

var defaultGasPrice cosmossdktypes.Int
var ok bool

if raCfg.HubData.GasPrice != "" {
defaultGasPrice, ok = github_com_cosmos_cosmos_sdk_types.NewIntFromString(
raCfg.HubData.GasPrice,
)
} else {
defaultGasPrice = cosmossdktypes.NewInt(2000000000)
ok = true
}
if !ok {
return errors.New("failed to parse gas price")
}
Expand Down
1 change: 1 addition & 0 deletions utils/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func createCustomHubDataManually() CustomHubData {
ID: id,
RpcUrl: rpcUrl,
ApiUrl: restUrl,
GasPrice: gasPrice,
DymensionHash: commit,
}
return hd
Expand Down

0 comments on commit 8d96df2

Please sign in to comment.