wasmconfig

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultContractQueryGasLimit      = uint64(3_000_000)
	DefaultContractSimulationGasLimit = uint64(50_000_000)
	DefaultContractDebugMode          = false
	DefaultContractMemoryCacheSize    = uint32(2048)
)

config default values

View Source
const DefaultConfigTemplate = `` /* 634-byte string literal not displayed */

DefaultConfigTemplate default config template for wasm module

Variables

This section is empty.

Functions

func AddConfigFlags

func AddConfigFlags(startCmd *cobra.Command)

AddConfigFlags implements servertypes.WasmConfigFlags interface.

Types

type Config

type Config struct {
	// SimulationGasLimit is the max gas to be used in a smart query contract call
	ContractQueryGasLimit uint64 `mapstructure:"contract-query-gas-limit"`

	// SimulationGasLimit is the max gas to be used in a tx simulation call.
	// When not set the consensus max block gas is used instead
	ContractSimulationGasLimit uint64 `mapstructure:"contract-query-gas-limit"`

	// ContractDebugMode log what contract print
	ContractDebugMode bool `mapstructure:"contract-debug-mode"`

	// MemoryCacheSize in MiB not bytes
	ContractMemoryCacheSize uint32 `mapstructure:"contract-memory-cache-size"`
}

Config is the extra config required for wasm

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default settings for WasmConfig

func GetConfig

func GetConfig(appOpts servertypes.AppOptions) *Config

GetConfig load config values from the app options

func (Config) ToWasmConfig

func (c Config) ToWasmConfig() wasmtypes.WasmConfig

ToWasmConfig convert config to wasmd's config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL