package
1.8.1
Repository: https://github.com/okex/exchain.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

No description provided by the author
BuildContractAddress builds a sdk account address for a contract.
BuildContractAddressPredictable generates a contract address for the wasm module with len = types.ContractAddrLen using the Cosmos SDK address.Module function.
No description provided by the author
ConvertSdkCoinsToWasmCoins covert sdk type to wasmvm coins type.
ConvertSdkCoinToWasmCoin covert sdk type to wasmvm coin type.
ConvertWasmCoinsToSdkCoins converts the wasm vm type coins to sdk type coins.
ConvertWasmCoinToSdkCoin converts a wasm vm type coin to sdk type coin.
ConvertWasmIBCTimeoutHeightToCosmosHeight converts a wasmvm type ibc timeout height to ibc module type height.
CreateDefaultTestInput common settings for CreateTestInput.
CreateTestInput encoders can be nil to accept the defaults, or set it to override some of the message handlers (like default).
No description provided by the author
DefaultGasRegisterConfig default values.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ExportGenesis returns a GenesisState for a given context and keeper.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InitGenesis sets supply information for genesis.
InstantiateHackatomExampleContract load and instantiate the "./testdata/hackatom.wasm" contract.
InstantiateIBCReflectContract load and instantiate the "./testdata/ibc_reflect.wasm" contract.
LimitReader returns a Reader that reads from r but stops with types.ErrLimit after n bytes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewCountTXDecorator constructor.
No description provided by the author
No description provided by the author
NewDefaultWasmGasRegister creates instance with default values.
No description provided by the author
No description provided by the author
NewGrpcQuerier constructor.
No description provided by the author
NewKeeper creates a new contract Keeper instance If customEncoders is non-nil, we can use this to override some of the message handler, especially custom.
NewLegacyQuerier creates a new querier.
NewLimitSimulationGasDecorator constructor accepts nil value to fallback to block gas limit.
NewMessageDispatcher constructor.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewWasmGasRegister constructor.
NewWasmProposalHandler creates a new governance Handler for wasm proposals.
NewWasmProposalHandlerX creates a new governance Handler for wasm proposals.
NewWasmVMMetricsCollector constructor.
No description provided by the author
No description provided by the author
No description provided by the author
Querier creates a new grpc querier instance.
No description provided by the author
No description provided by the author
SeedNewContractInstance sets the mock wasmerEngine in keeper and calls store + instantiate to init the contract's metadata.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StoreRandomContract sets the mock wasmerEngine in keeper and calls store.
No description provided by the author
No description provided by the author
TestHandler returns a wasm handler for tests (to avoid circular imports).
UInt64LengthPrefix prepend big endian encoded byte length.
No description provided by the author
No description provided by the author
WithAPICosts sets custom api costs.
WithCoinTransferrer is an optional constructor parameter to set a custom coin transferrer.
WithGasRegister set a new gas register to implement custom gas costs.
WithMaxQueryStackSize overwrites the default limit for maximum query stacks.
WithMessageEncoders is an optional constructor parameter to pass custom message encoder to the default wasm message handler.
WithMessageHandler is an optional constructor parameter to set a custom handler for wasmVM messages.
WithMessageHandlerDecorator is an optional constructor parameter to decorate the wasm handler for wasmVM messages.
WithQueryHandler is an optional constructor parameter to set custom query handler for wasmVM requests.
WithQueryHandlerDecorator is an optional constructor parameter to decorate the default wasm query handler for wasmVM requests.
WithQueryPlugins is an optional constructor parameter to pass custom query plugins for wasmVM requests.
No description provided by the author
WithWasmEngine is an optional constructor parameter to replace the default wasmVM engine with the given one.

# Constants

No description provided by the author
No description provided by the author
contractMemoryLimit is the memory limit of each contract execution (in MiB) constant value so all nodes run with the same limit.
DefaultCompileCost is how much SDK gas is charged *per byte* for compiling WASM code.
DefaultContractMessageDataCost is how much SDK gas is charged *per byte* of the message that goes to the contract This is used with len(msg).
DefaultDeserializationCostPerByte The formular should be `len(data) * deserializationCostPerByte`.
DefaultEventAttributeDataCost is how much SDK gas is charged *per byte* for attribute data in events.
DefaultEventAttributeDataFreeTier number of bytes of total attribute data we do not charge.
DefaultGasCostCanonicalAddress is how moch SDK gas we charge to convert to a canonical address format.
DefaultGasCostHumanAddress is how moch SDK gas we charge to convert to a human address format.
DefaultGasMultiplier is how many CosmWasm gas points = 1 Cosmos SDK gas point.
DefaultInstanceCost is how much SDK gas we charge each time we load a WASM instance.
DefaultPerAttributeCost is how much SDK gas we charge per attribute count.
DefaultPerCustomEventCost is how much SDK gas we charge per event count.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

BankCoinTransferrer replicates the cosmos-sdk behaviour as in https://github.com/okex/exchain/libs/cosmos-sdk/blob/v0.41.4/x/bank/keeper/msg_server.go#L26.
No description provided by the author
No description provided by the author
CountTXDecorator ante handler to count the tx position in a block.
No description provided by the author
DefaultWasmVMContractResponseHandler default implementation that first dispatches submessage then normal messages.
EncodingConfig specifies the concrete encoding types to use for a given app.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IBCRawPacketHandler handels IBC.SendPacket messages which are published to an IBC channel.
No description provided by the author
No description provided by the author
Keeper will have a reference to Wasmer with it's own data directory.
No description provided by the author
LimitSimulationGasDecorator ante decorator to limit gas in simulation calls.
MessageDispatcher coordinates message sending and submessage reply/ state commits.
No description provided by the author
MessageHandlerChain defines a chain of handlers that are called one by one until it can be handled.
MultipliedGasMeter wraps the GasMeter from context and multiplies all reads by out defined multiplier.
No description provided by the author
No description provided by the author
No description provided by the author
SDKMessageHandler can handles messages that can be encoded into sdk.Message types and routed.
No description provided by the author
No description provided by the author
WasmGasRegister implements GasRegister interface.
WasmGasRegisterConfig config type.
WasmVMMetricsCollector custom metrics collector to be used with Prometheus.

# Interfaces

No description provided by the author
No description provided by the author
GasRegister abstract source for gas costs.
No description provided by the author
MessageRouter ADR 031 request type routing.
Messenger is an extension point for custom wasmd message handling.
Option is an extension point to instantiate keeper with non default values.
ValidatorSetSource is a subset of the staking keeper.
WasmVMQueryHandler is an extension point for custom query handler implementations.
WasmVMResponseHandler is an extension point to handles the response data returned by a contract call.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MessageHandlerFunc is a helper to construct a function based message handler.
No description provided by the author
No description provided by the author
No description provided by the author
WasmVMQueryHandlerFn is a helper to construct a function based query handler.