Skip to content

Commit

Permalink
feat: Updated dymension client to accept gas limit, fee and prices pa…
Browse files Browse the repository at this point in the history
…rams. (#243)

* Updated dymension client to accept gas limit, fee and prices params.

* Updated cosmsoclient version.
  • Loading branch information
omritoptix authored Feb 14, 2023
1 parent 39e64d7 commit a738e1d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/avast/retry-go v3.0.0+incompatible
github.com/celestiaorg/go-cnc v0.2.0
github.com/dgraph-io/badger/v3 v3.2103.3
github.com/dymensionxyz/cosmosclient v0.2.0-alpha.0.20230123083919-e1f5afda257a
github.com/dymensionxyz/cosmosclient v0.2.0-alpha.0.20230214103608-6203ac1f22e8
github.com/go-kit/kit v0.12.0
github.com/gofrs/uuid v4.2.0+incompatible
github.com/gogo/protobuf v1.3.3
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQx
github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU=
github.com/dymensionxyz/cosmosclient v0.2.0-alpha.0.20230123083919-e1f5afda257a h1:R6IpzM0nQMx7SySsRxJz0C2wFEW5vWKmuWUCtQ09JAA=
github.com/dymensionxyz/cosmosclient v0.2.0-alpha.0.20230123083919-e1f5afda257a/go.mod h1:H6r0zzseZ1dEoud1uswU5xgOCUkGR+5GrXtyu/4nQ2o=
github.com/dymensionxyz/cosmosclient v0.2.0-alpha.0.20230214101004-460d6299c295 h1:nPqqz7efCqNC3aF1Nen4qhZKoxHbiGFQXrmtogqsbus=
github.com/dymensionxyz/cosmosclient v0.2.0-alpha.0.20230214101004-460d6299c295/go.mod h1:H6r0zzseZ1dEoud1uswU5xgOCUkGR+5GrXtyu/4nQ2o=
github.com/dymensionxyz/cosmosclient v0.2.0-alpha.0.20230214103608-6203ac1f22e8 h1:DGCBPYfNHfIoYBwfS9DciScJwGDPOKSSUDtsq6a800M=
github.com/dymensionxyz/cosmosclient v0.2.0-alpha.0.20230214103608-6203ac1f22e8/go.mod h1:H6r0zzseZ1dEoud1uswU5xgOCUkGR+5GrXtyu/4nQ2o=
github.com/dymensionxyz/dymension v0.1.0-alpha.0.20230110174626-23b70dccd1e5 h1:ZgnXa+BU/zSJt+NZ1yx7SSmFlovIGJHdDCxFcRNnLDY=
github.com/dymensionxyz/dymension v0.1.0-alpha.0.20230110174626-23b70dccd1e5/go.mod h1:C5nQlAlDqVtNigjQVNLSL4SuC3gUVoRhqAsfYZZcDgs=
github.com/dymensionxyz/ibc-go/v3 v3.0.0-rc2.0.20230105134315-1870174ab6da h1:driSbrBc4deT0iRjDKjA4royFDsUsDcE0IgFkFxhopo=
Expand Down
6 changes: 6 additions & 0 deletions settlement/dymension/dymension.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ type Config struct {
KeyRingHomeDir string `json:"keyring_home_dir"`
DymAccountName string `json:"dym_account_name"`
RollappID string `json:"rollapp_id"`
GasLimit uint64 `json:"gas_limit"`
GasPrices string `json:"gas_prices"`
GasFees string `json:"gas_fees"`
}

var _ settlement.LayerClient = &LayerClient{}
Expand Down Expand Up @@ -351,6 +354,9 @@ func getCosmosClientOptions(config *Config) []cosmosclient.Option {
options := []cosmosclient.Option{
cosmosclient.WithAddressPrefix(addressPrefix),
cosmosclient.WithNodeAddress(config.NodeAddress),
cosmosclient.WithGasFees(config.GasFees),
cosmosclient.WithGasLimit(config.GasLimit),
cosmosclient.WithGasPrices(config.GasPrices),
}
if config.KeyringBackend != "" {
options = append(options,
Expand Down

0 comments on commit a738e1d

Please sign in to comment.