Skip to content

Commit

Permalink
update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jhernandezb committed Feb 21, 2025
1 parent 9edbb98 commit 7fcc5fd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type HandlerOptions struct {
govKeeper govkeeper.Keeper
globalfeeKeeper globalfeekeeper.Keeper
stakingKeeper *stakingkeeper.Keeper
WasmConfig *wasmTypes.WasmConfig
WasmConfig *wasmTypes.NodeConfig
TXCounterStoreService corestoretypes.KVStoreService
Codec codec.BinaryCodec
}
Expand Down
3 changes: 2 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ func NewStargazeApp(

// IBC Wasm Client
wasmDir := filepath.Join(homePath, "wasm")
wasmConfig, err := wasm.ReadWasmConfig(appOpts)
wasmConfig, err := wasm.ReadNodeConfig(appOpts)
if err != nil {
panic(fmt.Sprintf("error while reading wasm config: %s", err))
}
Expand Down Expand Up @@ -699,6 +699,7 @@ func NewStargazeApp(
app.GRPCQueryRouter(),
wasmDir,
wasmConfig,
wasmtypes.VMConfig{},
GetWasmCapabilities(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
wasmOpts...,
Expand Down
6 changes: 3 additions & 3 deletions app/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ import (
// CustomAppConfig defines the configuration for the Nois app.
type CustomAppConfig struct {
serverconfig.Config
Wasm wasmtypes.WasmConfig `mapstructure:"wasm" json:"wasm"`
Wasm wasmtypes.NodeConfig `mapstructure:"wasm" json:"wasm"`
}

func CustomconfigTemplate(config wasmtypes.WasmConfig) string {
func CustomconfigTemplate(config wasmtypes.NodeConfig) string {
return serverconfig.DefaultConfigTemplate + wasmtypes.ConfigTemplate(config)
}

func DefaultConfig() (string, interface{}) {
serverConfig := serverconfig.DefaultConfig()
serverConfig.MinGasPrices = "0ustars"

wasmConfig := wasmtypes.DefaultWasmConfig()
wasmConfig := wasmtypes.DefaultNodeConfig()
simulationLimit := uint64(50_000_000)

wasmConfig.SimulationGasLimit = &simulationLimit
Expand Down
7 changes: 4 additions & 3 deletions app/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package app
import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/cosmos/gogoproto/proto"
tokenfactorytypes "github.com/public-awesome/stargaze/v15/x/tokenfactory/types"
)

Expand All @@ -14,9 +15,9 @@ var wasmCapabilities = []string{
func AcceptedStargateQueries() wasmkeeper.AcceptedQueries {
return wasmkeeper.AcceptedQueries{
// tokenfactory
"/osmosis.tokenfactory.v1beta1.Query/Params": &tokenfactorytypes.QueryParamsResponse{},
"/osmosis.tokenfactory.v1beta1.Query/DenomAuthorityMetadata": &tokenfactorytypes.QueryDenomAuthorityMetadataResponse{},
"/osmosis.tokenfactory.v1beta1.Query/DenomsFromCreator": &tokenfactorytypes.QueryDenomsFromCreatorResponse{},
"/osmosis.tokenfactory.v1beta1.Query/Params": func() proto.Message { return &tokenfactorytypes.QueryParamsResponse{} },
"/osmosis.tokenfactory.v1beta1.Query/DenomAuthorityMetadata": func() proto.Message { return &tokenfactorytypes.QueryDenomAuthorityMetadataResponse{} },
"/osmosis.tokenfactory.v1beta1.Query/DenomsFromCreator": func() proto.Message { return &tokenfactorytypes.QueryDenomsFromCreatorResponse{} },
}
}

Expand Down

0 comments on commit 7fcc5fd

Please sign in to comment.