package
2.0.0-beta.4+incompatible
Repository: https://github.com/scrtlabs/secretnetwork.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
** Warning ** Below are functions that check for magic strings that depends on the output of the enclave.
No description provided by the author
No description provided by the author
No description provided by the author
ParseEvents converts wasm LogAttributes into an sdk.Events (with 0 or 1 elements).
DefaultWasmConfig returns the default settings for WasmConfig.
No description provided by the author
No description provided by the author
GetCodeKey constructs the key for retreiving the ID for the WASM code.
GetConfig load config values from the app options.
GetContractAddressKey returns the key for the WASM contract instance.
GetContractByCodeIDSecondaryIndexPrefix returns the prefix for the second index: `<prefix><codeID>`.
GetContractByCreatedSecondaryIndexKey returns the key for the secondary index: `<prefix><codeID><created/last-migrated><contractAddr>`.
GetContractCodeHistoryElementKey returns the key a contract code history entry: `<prefix><contractAddr><position>`.
GetContractCodeHistoryElementPrefix returns the key prefix for a contract code history entry: `<prefix><contractAddr>`.
GetContractAddressKey returns the key for the WASM contract instance.
GetContractStorePrefixKey returns the store prefix for the WASM contract instance.
GetContractStorePrefixKey returns the store prefix for the WASM contract instance.
GetRandomKey returns the key for the random seed for each block.
No description provided by the author
NewAbsoluteTxPosition gets a timestamp from the context.
NewCodeInfo fills a new Contract struct.
NewContractInfo creates a new instance of a given WASM contract info.
NewCustomEvents converts wasm events from a contract response to sdk type events.
NewEnv initializes the environment for a contract instance.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewWasmCoins translates between Cosmos SDK coins and Wasm coins.
No description provided by the author
No description provided by the author
RegisterCodec registers the account types and interface.
No description provided by the author
RegisterQueryHandler registers the http handlers for service Query to "mux".
RegisterQueryHandlerClient registers the http handlers for service Query to "mux".
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
No description provided by the author
TXCounter returns the tx counter value and found bool from the context.
ValidateGenesis performs basic validation of supply genesis data returning an error for any failed validation criteria.
No description provided by the author
No description provided by the author
WithTXCounter stores a transaction counter value in the context.
# Constants
AbsoluteTxPositionLen number of elements in byte representation.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
event attributes returned from contract execution.
event attributes returned from contract execution.
event attributes returned from contract execution.
event attributes returned from contract execution.
event attributes returned from contract execution.
BuildTagRegexp is a docker image regexp.
CompileCost is how much SDK gas we charge *per byte* for compiling WASM code.
ContractCodeHistoryOperationTypeGenesis based on genesis data.
ContractCodeHistoryOperationTypeInit on chain contract instantiation.
ContractCodeHistoryOperationTypeMigrate code migration.
ContractCodeHistoryOperationTypeUnspecified placeholder for empty value.
CustomContractEventPrefix contracts can create custom events.
WasmModuleEventType is stored with any contract TX that returns non empty EventAttributes.
DefaultConfigTemplate default config template for wasm module.
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
GasMultiplier is how many cosmwasm gas points = 1 sdk gas point SDK reference costs can be found here: https://github.com/cosmos/cosmos-sdk/blob/02c6c9fafd58da88550ab4d7d494724a477c8a68/store/types/gas.go#L153-L164 A write at ~3000 gas and ~200us = 10 gas per us (microsecond) cpu/io Rough timing have 88k gas at 90us, which is equal to 1k sdk gas..
InstanceCost is how much SDK gas we charge each time we load a WASM instance.
No description provided by the author
MaxGas for a contract is 10 billion wasmer gas (enforced in rust to prevent overflow) The limit for v0.9.3 is defined here: https://github.com/CosmWasm/cosmwasm/blob/v0.9.3/packages/vm/src/backends/singlepass.rs#L15-L23 (this will be increased in future releases).
MaxLabelSize is the longest label that can be used when Instantiating a contract.
2MB.
ModuleName is the name of the contract module.
QuerierRoute is the querier route for the staking module.
RouterKey is the msg router key for the staking module.
StoreKey is the string store representation.
TStoreKey is the string transient store representation.
# 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
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
Codes for wasm contract errors 1-5 are errors that contain an encrypted payload.
ErrAccountExists error for a contract account that already exists.
ErrCreateFailed error for wasm code that has already been uploaded or failed.
ErrDuplicate error for content that exsists.
ErrEmpty error for empty content.
ErrExceedMaxCallDepth error if max message stack size is exceeded.
ErrExecuteFailed error for rust execution contract failure.
ErrGasLimit error for out of gas.
ErrInstantiateFailed error for rust instantiate contract failure.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrInvalid error for content that is invalid in this context.
ErrInvalidEvent error if an attribute/event from the contract is invalid.
ErrInvalidGenesis error for invalid genesis file syntax.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrInvalidMsg error when we cannot process the error returned from the contract.
ErrLimit error for content that exceeds a limit.
ErrMaxIBCChannels error for maximum number of ibc channels reached.
ErrMigrationFailed error for rust execution contract failure.
ErrNotFound error for an entry not found in the store.
ErrQueryFailed error for rust smart query contract failure.
ErrReplyFailed error for rust execution contract failure.
ErrSigFailed error for wasm code that has already been uploaded or failed.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrUnknownMsg error by a message handler to show that it is not responsible for this message type.
ErrUnsupportedForContract error when a feature is used that is not supported for/ by this contract.
No description provided by the author
No description provided by the author
ModuleCdc generic sealed codec to be used throughout module.
No description provided by the author
No description provided by the author
No description provided by the author
ZeroSender is a valid 20 byte canonical address that's used to bypass the x/compute checks and later on is ignored by the enclave, which passes a null sender to the contract This is used in OnAcknowledgementPacketOverride & OnTimeoutPacketOverride.
# Structs
AbsoluteTxPosition can be used to sort contracts.
No description provided by the author
Code struct encompasses CodeInfo and CodeBytes.
CodeInfo is data for the uploaded contract WASM code.
No description provided by the author
Contract struct encompasses ContractAddress, ContractInfo, and ContractState.
ContractCodeHistoryEntry metadata to a contract.
No description provided by the author
ContractInfo stores a WASM contract instance.
ContractInfoWithAddress adds the contract address to the ContractInfo representation.
No description provided by the author
DecryptedAnswer is a struct that represents a decrypted tx-query.
No description provided by the author
GenesisState - genesis state of x/wasm.
Model is a struct that holds a KV pair.
MsgClearAdmin removes any admin stored for a smart contract.
MsgClearAdminResponse returns empty data.
No description provided by the author
MsgExecuteContractResponse returns execution result data.
No description provided by the author
MsgInstantiateContractResponse return instantiation result data.
MsgMigrateContract runs a code upgrade/ downgrade for a smart contract.
MsgMigrateContractResponse returns contract migration result data.
No description provided by the author
MsgStoreCodeResponse returns store result data.
MsgUpdateAdmin sets a new admin for a smart contract.
MsgUpdateAdminResponse returns empty data.
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
QueryContractHistoryRequest is the request type for the Query/ContractHistory RPC method.
QueryContractHistoryResponse is the response type for the Query/ContractHistory RPC method.
QueryContractInfoResponse is the response type for the Query/ContractInfo RPC method.
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
Sequence id and value of a counter.
UnimplementedMsgServer can be embedded to have forward compatible implementations.
UnimplementedQueryServer can be embedded to have forward compatible implementations.
WasmConfig is the extra config required for wasm.
# Interfaces
ChannelKeeper defines the expected IBC channel keeper.
IBCContractKeeper IBC lifecycle event handler.
ICS20TransferPortSource is a subset of the ibc transfer keeper.
MsgClient is the client API for Msg service.
MsgServer is the server API for Msg service.
QueryClient is the client API for Query service.
QueryServer is the server API for Query service.
# Type aliases
No description provided by the author
ContractCodeHistoryOperationType actions that caused a code change.