Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultContractQueryGasLimit = uint64(3000000) DefaultContractDebugMode = false DefaultContractMemoryCacheSize = uint32(100) )
config default values
View Source
const DefaultConfigTemplate = `` /* 493-byte string literal not displayed */
DefaultConfigTemplate default config template for wasm module
Variables ¶
View Source
var DBDir = "data/wasm"
DBDir used to store wasm data to
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The maximum gas amount can be spent for contract query // The external query will invoke contract vm on wasm module, // so we need to restrict the max usage to prevent DoS attack ContractQueryGasLimit uint64 `mapstructure:"contract-query-gas-limit"` // The flag to specify whether print contract logs or not ContractDebugMode bool `mapstructure:"contract-debug-mode"` // The WASM VM memory cache size 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
Click to show internal directories.
Click to hide internal directories.