types

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 61 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// WasmModuleEventType is stored with any contract TX that returns non empty EventAttributes
	WasmModuleEventType = "wasm"
	// CustomContractEventPrefix contracts can create custom events. To not mix them with other system events they got the `wasm-` prefix.
	CustomContractEventPrefix = "wasm-"

	EventTypeStoreCode              = "store_code"
	EventTypeInstantiate            = "instantiate"
	EventTypeExecute                = "execute"
	EventTypeMigrate                = "migrate"
	EventTypePinCode                = "pin_code"
	EventTypeUnpinCode              = "unpin_code"
	EventTypeSudo                   = "sudo"
	EventTypeReply                  = "reply"
	EventTypeGovContractResult      = "gov_contract_result"
	EventTypeUpdateContractAdmin    = "update_contract_admin"
	EventTypeUpdateContractLabel    = "update_contract_label"
	EventTypeUpdateCodeAccessConfig = "update_code_access_config"
	EventTypePacketRecv             = "ibc_packet_received"
)
View Source
const (
	AttributeReservedPrefix = "_"

	AttributeKeyContractAddr        = "_contract_address"
	AttributeKeyCodeID              = "code_id"
	AttributeKeyChecksum            = "code_checksum"
	AttributeKeyResultDataHex       = "result"
	AttributeKeyRequiredCapability  = "required_capability"
	AttributeKeyNewAdmin            = "new_admin_address"
	AttributeKeyNewLabel            = "new_label"
	AttributeKeyCodePermission      = "code_permission"
	AttributeKeyAuthorizedAddresses = "authorized_addresses"
	AttributeKeyAckSuccess          = "success"
	AttributeKeyAckError            = "error"
)

event attributes returned from contract execution

View Source
const (
	// DefaultGasMultiplier is how many CosmWasm gas points = 1 Cosmos SDK gas point.
	//
	// CosmWasm gas strategy is documented in https://github.com/CosmWasm/cosmwasm/blob/v1.0.0-beta/docs/GAS.md.
	// Cosmos SDK reference costs can be found here: https://github.com/cosmos/cosmos-sdk/blob/v0.42.10/store/types/gas.go#L198-L209.
	//
	// The original multiplier of 100 up to CosmWasm 0.16 was based on
	//     "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... (one read)"
	// as well as manual Wasmer benchmarks from 2019. This was then multiplied by 150_000
	// in the 0.16 -> 1.0 upgrade (https://github.com/CosmWasm/cosmwasm/pull/1120).
	// In the 2.0 upgrade, this was reduced by a factor of 1000 (https://github.com/CosmWasm/cosmwasm/pull/1884).
	//
	// The multiplier deserves more reproducible benchmarking and a strategy that allows easy adjustments.
	// This is tracked in https://github.com/CosmWasm/wasmd/issues/566 and https://github.com/CosmWasm/wasmd/issues/631.
	// Gas adjustments are consensus breaking but may happen in any release marked as consensus breaking.
	// Do not make assumptions on how much gas an operation will consume in places that are hard to adjust,
	// such as hardcoding them in contracts.
	//
	// Please note that all gas prices returned to wasmvm should have this multiplied.
	// Benchmarks and numbers were discussed in: https://github.com/CosmWasm/wasmd/pull/634#issuecomment-938055852
	DefaultGasMultiplier uint64 = 140_000
	// DefaultInstanceCost is how much SDK gas we charge each time we load a WASM instance.
	// Creating a new instance is costly, and this helps put a recursion limit to contracts calling contracts.
	// Benchmarks and numbers were discussed in: https://github.com/CosmWasm/wasmd/pull/634#issuecomment-938056803
	DefaultInstanceCost uint64 = 60_000
	// DefaultInstanceCostDiscount is charged instead of DefaultInstanceCost for cases where
	// we assume the contract is loaded from an in-memory cache.
	// For a long time it was implicitly just 0 in those cases.
	// Now we use something small that roughly reflects the 45µs startup time (30x cheaper than DefaultInstanceCost).
	DefaultInstanceCostDiscount uint64 = 2_000
	// DefaultCompileCost is how much SDK gas is charged *per byte* for compiling WASM code.
	// Benchmarks and numbers were discussed in: https://github.com/CosmWasm/wasmd/pull/634#issuecomment-938056803
	DefaultCompileCost uint64 = 3
	// DefaultEventAttributeDataCost is how much SDK gas is charged *per byte* for attribute data in events.
	// This is used with len(key) + len(value)
	DefaultEventAttributeDataCost uint64 = 1
	// DefaultContractMessageDataCost is how much SDK gas is charged *per byte* of the message that goes to the contract
	// This is used with len(msg). Note that the message is deserialized in the receiving contract and this is charged
	// with wasm gas already. The derserialization of results is also charged in wasmvm. I am unsure if we need to add
	// additional costs here.
	// Note: also used for error fields on reply, and data on reply. Maybe these should be pulled out to a different (non-zero) field
	DefaultContractMessageDataCost uint64 = 0
	// DefaultPerAttributeCost is how much SDK gas we charge per attribute count.
	DefaultPerAttributeCost uint64 = 10
	// DefaultPerCustomEventCost is how much SDK gas we charge per event count.
	DefaultPerCustomEventCost uint64 = 20
	// DefaultEventAttributeDataFreeTier number of bytes of total attribute data we do not charge.
	DefaultEventAttributeDataFreeTier = 100
)
View Source
const (
	// ModuleName is the name of the contract module
	ModuleName = "wasm"

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// TStoreKey is the string transient store representation
	TStoreKey = "transient_" + ModuleName

	// QuerierRoute is the querier route for the wasm module
	QuerierRoute = ModuleName

	// RouterKey is the msg router key for the wasm module
	RouterKey = ModuleName
)
View Source
const (

	// ContractAddrLen defines a valid address length for contracts
	ContractAddrLen = 32
	// SDKAddrLen defines a valid address length that was used in sdk address generation
	SDKAddrLen = 20
)
View Source
const AbsoluteTxPositionLen = 16

AbsoluteTxPositionLen number of elements in byte representation

View Source
const (

	// CodehashWildcard matches any code hash
	CodehashWildcard = "*"
)
View Source
const DefaultMaxQueryStackSize uint32 = 10

DefaultMaxQueryStackSize maximum size of the stack of contract instances doing queries

View Source
const EnableGasVerification = true

Tests should not fail on gas consumption

View Source
const MaxSaltSize = 64

MaxSaltSize is the longest salt that can be used when instantiating a contract

Variables

View Source
var (
	ErrInvalidLengthAuthz        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAuthz          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	DefaultCodespace = ModuleName

	// ErrCreateFailed error for wasm code that has already been uploaded or failed
	ErrCreateFailed = errorsmod.Register(DefaultCodespace, 2, "create wasm contract failed")

	// ErrAccountExists error for a contract account that already exists
	ErrAccountExists = errorsmod.Register(DefaultCodespace, 3, "contract account already exists")

	// ErrInstantiateFailed error for rust instantiate contract failure
	ErrInstantiateFailed = errorsmod.Register(DefaultCodespace, 4, "instantiate wasm contract failed")

	// ErrExecuteFailed error for rust execution contract failure
	ErrExecuteFailed = errorsmod.Register(DefaultCodespace, 5, "execute wasm contract failed")

	// ErrGasLimit error for out of gas
	ErrGasLimit = errorsmod.Register(DefaultCodespace, 6, "insufficient gas")

	// ErrInvalidGenesis error for invalid genesis file syntax
	ErrInvalidGenesis = errorsmod.Register(DefaultCodespace, 7, "invalid genesis")

	// ErrNotFound error for an entry not found in the store
	ErrNotFound = errorsmod.Register(DefaultCodespace, 8, "not found")

	// ErrQueryFailed error for rust smart query contract failure
	ErrQueryFailed = errorsmod.Register(DefaultCodespace, 9, "query wasm contract failed")

	// ErrInvalidMsg error when we cannot process the error returned from the contract
	ErrInvalidMsg = errorsmod.Register(DefaultCodespace, 10, "invalid CosmosMsg from the contract")

	// ErrMigrationFailed error for rust execution contract failure
	ErrMigrationFailed = errorsmod.Register(DefaultCodespace, 11, "migrate wasm contract failed")

	// ErrEmpty error for empty content
	ErrEmpty = errorsmod.Register(DefaultCodespace, 12, "empty")

	// ErrLimit error for content that exceeds a limit
	ErrLimit = errorsmod.Register(DefaultCodespace, 13, "exceeds limit")

	// ErrInvalid error for content that is invalid in this context
	ErrInvalid = errorsmod.Register(DefaultCodespace, 14, "invalid")

	// ErrDuplicate error for content that exists
	ErrDuplicate = errorsmod.Register(DefaultCodespace, 15, "duplicate")

	// ErrMaxIBCChannels error for maximum number of ibc channels reached
	ErrMaxIBCChannels = errorsmod.Register(DefaultCodespace, 16, "max transfer channels")

	// ErrUnsupportedForContract error when a capability is used that is not supported for/ by this contract
	ErrUnsupportedForContract = errorsmod.Register(DefaultCodespace, 17, "unsupported for this contract")

	// ErrPinContractFailed error for pinning contract failures
	ErrPinContractFailed = errorsmod.Register(DefaultCodespace, 18, "pinning contract failed")

	// ErrUnpinContractFailed error for unpinning contract failures
	ErrUnpinContractFailed = errorsmod.Register(DefaultCodespace, 19, "unpinning contract failed")

	// ErrUnknownMsg error by a message handler to show that it is not responsible for this message type
	ErrUnknownMsg = errorsmod.Register(DefaultCodespace, 20, "unknown message from the contract")

	// ErrInvalidEvent error if an attribute/event from the contract is invalid
	ErrInvalidEvent = errorsmod.Register(DefaultCodespace, 21, "invalid event")

	// ErrNoSuchContractFn error factory for an error when an address does not belong to a contract
	ErrNoSuchContractFn = WasmVMFlavouredErrorFactory(errorsmod.Register(DefaultCodespace, 22, "no such contract"),
		func(addr string) error { return wasmvmtypes.NoSuchContract{Addr: addr} },
	)

	// ErrExceedMaxQueryStackSize error if max query stack size is exceeded
	ErrExceedMaxQueryStackSize = errorsmod.Register(DefaultCodespace, 27, "max query stack size exceeded")

	// ErrNoSuchCodeFn factory for an error when a code id does not belong to a code info
	ErrNoSuchCodeFn = WasmVMFlavouredErrorFactory(errorsmod.Register(DefaultCodespace, 28, "no such code"),
		func(id uint64) error { return wasmvmtypes.NoSuchCode{CodeID: id} },
	)

	// ErrVMError means an error occurred in wasmvm (not in the contract itself, but in the host environment)
	ErrVMError = errorsmod.Register(DefaultCodespace, 29, "wasmvm error")
)

Codes for wasm contract errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthIbc        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowIbc          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupIbc = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	CodeKeyPrefix                                  = []byte{0x01}
	ContractKeyPrefix                              = []byte{0x02}
	ContractStorePrefix                            = []byte{0x03}
	SequenceKeyPrefix                              = []byte{0x04}
	ContractCodeHistoryElementPrefix               = []byte{0x05}
	ContractByCodeIDAndCreatedSecondaryIndexPrefix = []byte{0x06}
	PinnedCodeIndexPrefix                          = []byte{0x07}
	TXCounterPrefix                                = []byte{0x08}
	ContractsByCreatorPrefix                       = []byte{0x09}
	ParamsKey                                      = []byte{0x10}

	KeySequenceCodeID     = append(SequenceKeyPrefix, []byte("lastCodeId")...)
	KeySequenceInstanceID = append(SequenceKeyPrefix, []byte("lastContractId")...)
)
View Source
var (
	DefaultUploadAccess = AllowEverybody
	AllowEverybody      = AccessConfig{Permission: AccessTypeEverybody}
	AllowNobody         = AccessConfig{Permission: AccessTypeNobody}
)
View Source
var (
	ErrInvalidLengthProposalLegacy        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProposalLegacy          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProposalLegacy = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// MaxLabelSize is the longest label that can be used when instantiating a contract
	MaxLabelSize = 128 // extension point for chains to customize via compile flag.

	// MaxWasmSize is the largest a compiled contract code can be when storing code on chain
	MaxWasmSize = 800 * 1024 // extension point for chains to customize via compile flag.

	// MaxProposalWasmSize is the largest a gov proposal compiled contract code can be when storing code on chain
	MaxProposalWasmSize = 3 * 1024 * 1024 // extension point for chains to customize via compile flag.
)
View Source
var AccessType_name = map[int32]string{
	0: "ACCESS_TYPE_UNSPECIFIED",
	1: "ACCESS_TYPE_NOBODY",
	3: "ACCESS_TYPE_EVERYBODY",
	4: "ACCESS_TYPE_ANY_OF_ADDRESSES",
}
View Source
var AccessType_value = map[string]int32{
	"ACCESS_TYPE_UNSPECIFIED":      0,
	"ACCESS_TYPE_NOBODY":           1,
	"ACCESS_TYPE_EVERYBODY":        3,
	"ACCESS_TYPE_ANY_OF_ADDRESSES": 4,
}
View Source
var ContractCodeHistoryOperationType_name = map[int32]string{
	0: "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED",
	1: "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT",
	2: "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE",
	3: "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS",
}
View Source
var ContractCodeHistoryOperationType_value = map[string]int32{
	"CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED": 0,
	"CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT":        1,
	"CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE":     2,
	"CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS":     3,
}
View Source
var DisableAllProposals []ProposalType

DisableAllProposals contains no wasm gov types. Deprecated: all gov v1beta1 types will be removed

EnableAllProposals contains all wasm gov types as keys. Deprecated: all gov v1beta1 types will be removed

Functions

func AcceptGrantedMessage added in v0.30.0

func AcceptGrantedMessage[T AuthzableWasmMsg](ctx sdk.Context, grants []ContractGrant, msg sdk.Msg, factory ContractAuthzFactory) (authztypes.AcceptResponse, error)

AcceptGrantedMessage determines whether this grant permits the provided sdk.Msg to be performed, and if so provides an upgraded authorization instance.

func ConfigTemplate added in v0.40.0

func ConfigTemplate(c WasmConfig) string

ConfigTemplate toml snippet for app.toml

func DefaultConfigTemplate added in v0.40.0

func DefaultConfigTemplate() string

DefaultConfigTemplate toml snippet with default values for app.toml

func DefaultPerByteUncompressCost added in v0.42.0

func DefaultPerByteUncompressCost() wasmvmtypes.UFraction

DefaultPerByteUncompressCost is how much SDK gas we charge per source byte to unpack

func EmitAcknowledgementEvent added in v0.32.0

func EmitAcknowledgementEvent(ctx sdk.Context, contractAddr sdk.AccAddress, ack exported.Acknowledgement, err error)

EmitAcknowledgementEvent emits an event signaling a successful or failed acknowledgement and including the error details if any.

func GetCodeKey

func GetCodeKey(codeID uint64) []byte

GetCodeKey constructs the key for retreiving the ID for the WASM code

func GetContractAddressKey

func GetContractAddressKey(addr sdk.AccAddress) []byte

GetContractAddressKey returns the key for the WASM contract instance

func GetContractByCodeIDSecondaryIndexPrefix

func GetContractByCodeIDSecondaryIndexPrefix(codeID uint64) []byte

GetContractByCodeIDSecondaryIndexPrefix returns the prefix for the second index: `<prefix><codeID>`

func GetContractByCreatedSecondaryIndexKey

func GetContractByCreatedSecondaryIndexKey(contractAddr sdk.AccAddress, c ContractCodeHistoryEntry) []byte

GetContractByCreatedSecondaryIndexKey returns the key for the secondary index: `<prefix><codeID><created/last-migrated><contractAddr>`

func GetContractByCreatorSecondaryIndexKey added in v0.30.0

func GetContractByCreatorSecondaryIndexKey(bz, position []byte, contractAddr sdk.AccAddress) []byte

GetContractByCreatorSecondaryIndexKey returns the key for the second index: `<prefix><creatorAddress length><created time><creatorAddress><contractAddr>`

func GetContractCodeHistoryElementKey

func GetContractCodeHistoryElementKey(contractAddr sdk.AccAddress, pos uint64) []byte

GetContractCodeHistoryElementKey returns the key a contract code history entry: `<prefix><contractAddr><position>`

func GetContractCodeHistoryElementPrefix

func GetContractCodeHistoryElementPrefix(contractAddr sdk.AccAddress) []byte

GetContractCodeHistoryElementPrefix returns the key prefix for a contract code history entry: `<prefix><contractAddr>`

func GetContractStorePrefix

func GetContractStorePrefix(addr sdk.AccAddress) []byte

GetContractStorePrefix returns the store prefix for the WASM contract instance

func GetContractsByCreatorPrefix added in v0.30.0

func GetContractsByCreatorPrefix(addr sdk.AccAddress) []byte

GetContractsByCreatorPrefix returns the contracts by creator prefix for the WASM contract instance

func GetPinnedCodeIndexPrefix

func GetPinnedCodeIndexPrefix(codeID uint64) []byte

GetPinnedCodeIndexPrefix returns the key prefix for a code id pinned into the wasmvm cache

func NewEnv

func NewEnv(ctx sdk.Context, contractAddr sdk.AccAddress) wasmvmtypes.Env

NewEnv initializes the environment for a contract instance

func NewInfo

func NewInfo(creator sdk.AccAddress, deposit sdk.Coins) wasmvmtypes.MessageInfo

NewInfo initializes the MessageInfo for a contract instance

func NewWasmCoins

func NewWasmCoins(cosmosCoins sdk.Coins) (wasmCoins []wasmvmtypes.Coin)

NewWasmCoins translates between Cosmos SDK coins and Wasm coins

func OnlyGenesisFields

func OnlyGenesisFields(info *ContractInfo)

func ParsePinnedCodeIndex

func ParsePinnedCodeIndex(s []byte) uint64

ParsePinnedCodeIndex converts the serialized code ID back.

func QueryStackSize added in v0.41.0

func QueryStackSize(ctx context.Context) (uint32, bool)

QueryStackSize reads the stack position for smart queries from the context

func RandCreatedFields added in v0.30.0

func RandCreatedFields(info *ContractInfo)

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers the concrete proto types and interfaces with the SDK interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the concrete types and interface

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func TXCounter added in v0.20.0

func TXCounter(ctx context.Context) (uint32, bool)

TXCounter returns the tx counter value and found bool from the context. The result will be (0, false) for external queries or simulations where no counter available.

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis performs basic validation of supply genesis data returning an error for any failed validation criteria.

func ValidateLabel added in v0.29.0

func ValidateLabel(label string) error

ValidateLabel ensure label constraints

func ValidateSalt added in v0.29.0

func ValidateSalt(salt []byte) error

ValidateSalt ensure salt constraints

func ValidateVerificationInfo added in v0.30.0

func ValidateVerificationInfo(source, builder string, codeHash []byte) error

ValidateVerificationInfo ensure source, builder and checksum constraints

func VerifyAddressLen added in v0.22.0

func VerifyAddressLen() func(addr []byte) error

VerifyAddressLen ensures that the address matches the expected length

func WasmVMFlavouredErrorFactory added in v0.31.0

func WasmVMFlavouredErrorFactory[T any](sdkErr *errorsmod.Error, wasmVMErrBuilder func(T) error) func(T) WasmVMFlavouredError

WasmVMFlavouredErrorFactory is a factory method to build a WasmVMFlavouredError type

func WithGasRegister added in v0.42.0

func WithGasRegister(ctx sdk.Context, gr GasRegister) sdk.Context

WithGasRegister stores the gas register into the context returned

func WithQueryStackSize added in v0.41.0

func WithQueryStackSize(ctx sdk.Context, counter uint32) sdk.Context

WithQueryStackSize stores the stack position for smart queries in the context returned

func WithSHA256CodeHash

func WithSHA256CodeHash(wasmCode []byte) func(info *CodeInfo)

func WithSubMsgAuthzPolicy added in v0.41.0

func WithSubMsgAuthzPolicy(ctx sdk.Context, policy AuthorizationPolicy) sdk.Context

WithSubMsgAuthzPolicy stores the authorization policy for submessages into the context returned

func WithTXCounter added in v0.20.0

func WithTXCounter(ctx sdk.Context, counter uint32) sdk.Context

WithTXCounter stores a transaction counter value in the context

Types

type AbsoluteTxPosition

type AbsoluteTxPosition struct {
	// BlockHeight is the block the contract was created at
	BlockHeight uint64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
	// TxIndex is a monotonic counter within the block (actual transaction index,
	// or gas consumed)
	TxIndex uint64 `protobuf:"varint,2,opt,name=tx_index,json=txIndex,proto3" json:"tx_index,omitempty"`
}

AbsoluteTxPosition is a unique transaction position that allows for global ordering of transactions.

func NewAbsoluteTxPosition

func NewAbsoluteTxPosition(ctx sdk.Context) *AbsoluteTxPosition

NewAbsoluteTxPosition gets a block position from the context

func (*AbsoluteTxPosition) Bytes

func (a *AbsoluteTxPosition) Bytes() []byte

Bytes encodes the object into a 16 byte representation with big endian block height and tx index.

func (*AbsoluteTxPosition) Descriptor

func (*AbsoluteTxPosition) Descriptor() ([]byte, []int)

func (*AbsoluteTxPosition) Equal

func (this *AbsoluteTxPosition) Equal(that interface{}) bool

func (*AbsoluteTxPosition) LessThan

func (a *AbsoluteTxPosition) LessThan(b *AbsoluteTxPosition) bool

LessThan can be used to sort

func (*AbsoluteTxPosition) Marshal

func (m *AbsoluteTxPosition) Marshal() (dAtA []byte, err error)

func (*AbsoluteTxPosition) MarshalTo

func (m *AbsoluteTxPosition) MarshalTo(dAtA []byte) (int, error)

func (*AbsoluteTxPosition) MarshalToSizedBuffer

func (m *AbsoluteTxPosition) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AbsoluteTxPosition) ProtoMessage

func (*AbsoluteTxPosition) ProtoMessage()

func (*AbsoluteTxPosition) Reset

func (m *AbsoluteTxPosition) Reset()

func (*AbsoluteTxPosition) Size

func (m *AbsoluteTxPosition) Size() (n int)

func (*AbsoluteTxPosition) String

func (m *AbsoluteTxPosition) String() string

func (*AbsoluteTxPosition) Unmarshal

func (m *AbsoluteTxPosition) Unmarshal(dAtA []byte) error

func (*AbsoluteTxPosition) XXX_DiscardUnknown

func (m *AbsoluteTxPosition) XXX_DiscardUnknown()

func (*AbsoluteTxPosition) XXX_Marshal

func (m *AbsoluteTxPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AbsoluteTxPosition) XXX_Merge

func (m *AbsoluteTxPosition) XXX_Merge(src proto.Message)

func (*AbsoluteTxPosition) XXX_Size

func (m *AbsoluteTxPosition) XXX_Size() int

func (*AbsoluteTxPosition) XXX_Unmarshal

func (m *AbsoluteTxPosition) XXX_Unmarshal(b []byte) error

type AcceptedMessageKeysFilter added in v0.30.0

type AcceptedMessageKeysFilter struct {
	// Messages is the list of unique keys
	Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
}

AcceptedMessageKeysFilter accept only the specific contract message keys in the json object to be executed. Since: wasmd 0.30

func NewAcceptedMessageKeysFilter added in v0.30.0

func NewAcceptedMessageKeysFilter(acceptedKeys ...string) *AcceptedMessageKeysFilter

NewAcceptedMessageKeysFilter constructor

func (*AcceptedMessageKeysFilter) Accept added in v0.30.0

Accept only payload messages which contain one of the accepted key names in the json object.

func (*AcceptedMessageKeysFilter) Descriptor added in v0.30.0

func (*AcceptedMessageKeysFilter) Descriptor() ([]byte, []int)

func (*AcceptedMessageKeysFilter) Marshal added in v0.30.0

func (m *AcceptedMessageKeysFilter) Marshal() (dAtA []byte, err error)

func (*AcceptedMessageKeysFilter) MarshalTo added in v0.30.0

func (m *AcceptedMessageKeysFilter) MarshalTo(dAtA []byte) (int, error)

func (*AcceptedMessageKeysFilter) MarshalToSizedBuffer added in v0.30.0

func (m *AcceptedMessageKeysFilter) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AcceptedMessageKeysFilter) ProtoMessage added in v0.30.0

func (*AcceptedMessageKeysFilter) ProtoMessage()

func (*AcceptedMessageKeysFilter) Reset added in v0.30.0

func (m *AcceptedMessageKeysFilter) Reset()

func (*AcceptedMessageKeysFilter) Size added in v0.30.0

func (m *AcceptedMessageKeysFilter) Size() (n int)

func (*AcceptedMessageKeysFilter) String added in v0.30.0

func (m *AcceptedMessageKeysFilter) String() string

func (*AcceptedMessageKeysFilter) Unmarshal added in v0.30.0

func (m *AcceptedMessageKeysFilter) Unmarshal(dAtA []byte) error

func (AcceptedMessageKeysFilter) ValidateBasic added in v0.30.0

func (f AcceptedMessageKeysFilter) ValidateBasic() error

ValidateBasic validates the filter

func (*AcceptedMessageKeysFilter) XXX_DiscardUnknown added in v0.30.0

func (m *AcceptedMessageKeysFilter) XXX_DiscardUnknown()

func (*AcceptedMessageKeysFilter) XXX_Marshal added in v0.30.0

func (m *AcceptedMessageKeysFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AcceptedMessageKeysFilter) XXX_Merge added in v0.30.0

func (m *AcceptedMessageKeysFilter) XXX_Merge(src proto.Message)

func (*AcceptedMessageKeysFilter) XXX_Size added in v0.30.0

func (m *AcceptedMessageKeysFilter) XXX_Size() int

func (*AcceptedMessageKeysFilter) XXX_Unmarshal added in v0.30.0

func (m *AcceptedMessageKeysFilter) XXX_Unmarshal(b []byte) error

type AcceptedMessagesFilter added in v0.30.0

type AcceptedMessagesFilter struct {
	// Messages is the list of raw contract messages
	Messages []RawContractMessage `protobuf:"bytes,1,rep,name=messages,proto3,casttype=RawContractMessage" json:"messages,omitempty"`
}

AcceptedMessagesFilter accept only the specific raw contract messages to be executed. Since: wasmd 0.30

func NewAcceptedMessagesFilter added in v0.30.0

func NewAcceptedMessagesFilter(msgs ...RawContractMessage) *AcceptedMessagesFilter

NewAcceptedMessagesFilter constructor

func (*AcceptedMessagesFilter) Accept added in v0.30.0

Accept only payload messages which are equal to the granted one.

func (*AcceptedMessagesFilter) Descriptor added in v0.30.0

func (*AcceptedMessagesFilter) Descriptor() ([]byte, []int)

func (*AcceptedMessagesFilter) Marshal added in v0.30.0

func (m *AcceptedMessagesFilter) Marshal() (dAtA []byte, err error)

func (*AcceptedMessagesFilter) MarshalTo added in v0.30.0

func (m *AcceptedMessagesFilter) MarshalTo(dAtA []byte) (int, error)

func (*AcceptedMessagesFilter) MarshalToSizedBuffer added in v0.30.0

func (m *AcceptedMessagesFilter) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AcceptedMessagesFilter) ProtoMessage added in v0.30.0

func (*AcceptedMessagesFilter) ProtoMessage()

func (*AcceptedMessagesFilter) Reset added in v0.30.0

func (m *AcceptedMessagesFilter) Reset()

func (*AcceptedMessagesFilter) Size added in v0.30.0

func (m *AcceptedMessagesFilter) Size() (n int)

func (*AcceptedMessagesFilter) String added in v0.30.0

func (m *AcceptedMessagesFilter) String() string

func (*AcceptedMessagesFilter) Unmarshal added in v0.30.0

func (m *AcceptedMessagesFilter) Unmarshal(dAtA []byte) error

func (AcceptedMessagesFilter) ValidateBasic added in v0.30.0

func (f AcceptedMessagesFilter) ValidateBasic() error

ValidateBasic validates the filter

func (*AcceptedMessagesFilter) XXX_DiscardUnknown added in v0.30.0

func (m *AcceptedMessagesFilter) XXX_DiscardUnknown()

func (*AcceptedMessagesFilter) XXX_Marshal added in v0.30.0

func (m *AcceptedMessagesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AcceptedMessagesFilter) XXX_Merge added in v0.30.0

func (m *AcceptedMessagesFilter) XXX_Merge(src proto.Message)

func (*AcceptedMessagesFilter) XXX_Size added in v0.30.0

func (m *AcceptedMessagesFilter) XXX_Size() int

func (*AcceptedMessagesFilter) XXX_Unmarshal added in v0.30.0

func (m *AcceptedMessagesFilter) XXX_Unmarshal(b []byte) error

type AccessConfig

type AccessConfig struct {
	Permission AccessType `protobuf:"varint,1,opt,name=permission,proto3,enum=cosmwasm.wasm.v1.AccessType" json:"permission,omitempty" yaml:"permission"`
	Addresses  []string   `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses,omitempty"`
}

AccessConfig access control type.

func (AccessConfig) AllAuthorizedAddresses added in v0.31.0

func (a AccessConfig) AllAuthorizedAddresses() []string

AllAuthorizedAddresses returns the list of authorized addresses. Can be empty.

func (AccessConfig) Allowed

func (a AccessConfig) Allowed(actor sdk.AccAddress) bool

Allowed returns if permission includes the actor. Actor address must be valid and not nil

func (*AccessConfig) Descriptor

func (*AccessConfig) Descriptor() ([]byte, []int)

func (*AccessConfig) Equal

func (this *AccessConfig) Equal(that interface{}) bool

func (AccessConfig) Equals

func (a AccessConfig) Equals(o AccessConfig) bool

func (AccessConfig) IsSubset added in v0.27.0

func (a AccessConfig) IsSubset(superSet AccessConfig) bool

IsSubset will return true if the caller is the same as the superset, or if the caller is more restrictive than the superset.

func (*AccessConfig) Marshal

func (m *AccessConfig) Marshal() (dAtA []byte, err error)

func (*AccessConfig) MarshalTo

func (m *AccessConfig) MarshalTo(dAtA []byte) (int, error)

func (*AccessConfig) MarshalToSizedBuffer

func (m *AccessConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccessConfig) ProtoMessage

func (*AccessConfig) ProtoMessage()

func (*AccessConfig) Reset

func (m *AccessConfig) Reset()

func (*AccessConfig) Size

func (m *AccessConfig) Size() (n int)

func (*AccessConfig) String

func (m *AccessConfig) String() string

func (*AccessConfig) Unmarshal

func (m *AccessConfig) Unmarshal(dAtA []byte) error

func (AccessConfig) ValidateBasic

func (a AccessConfig) ValidateBasic() error

ValidateBasic performs basic validation

func (*AccessConfig) XXX_DiscardUnknown

func (m *AccessConfig) XXX_DiscardUnknown()

func (*AccessConfig) XXX_Marshal

func (m *AccessConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessConfig) XXX_Merge

func (m *AccessConfig) XXX_Merge(src proto.Message)

func (*AccessConfig) XXX_Size

func (m *AccessConfig) XXX_Size() int

func (*AccessConfig) XXX_Unmarshal

func (m *AccessConfig) XXX_Unmarshal(b []byte) error

type AccessConfigUpdate added in v0.27.0

type AccessConfigUpdate struct {
	// CodeID is the reference to the stored WASM code to be updated
	CodeID uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"`
	// InstantiatePermission to apply to the set of code ids
	InstantiatePermission AccessConfig `protobuf:"bytes,2,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission"`
}

AccessConfigUpdate contains the code id and the access config to be applied.

func (*AccessConfigUpdate) Descriptor added in v0.27.0

func (*AccessConfigUpdate) Descriptor() ([]byte, []int)

func (*AccessConfigUpdate) Equal added in v0.27.0

func (this *AccessConfigUpdate) Equal(that interface{}) bool

func (*AccessConfigUpdate) Marshal added in v0.27.0

func (m *AccessConfigUpdate) Marshal() (dAtA []byte, err error)

func (*AccessConfigUpdate) MarshalTo added in v0.27.0

func (m *AccessConfigUpdate) MarshalTo(dAtA []byte) (int, error)

func (*AccessConfigUpdate) MarshalToSizedBuffer added in v0.27.0

func (m *AccessConfigUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccessConfigUpdate) ProtoMessage added in v0.27.0

func (*AccessConfigUpdate) ProtoMessage()

func (*AccessConfigUpdate) Reset added in v0.27.0

func (m *AccessConfigUpdate) Reset()

func (*AccessConfigUpdate) Size added in v0.27.0

func (m *AccessConfigUpdate) Size() (n int)

func (AccessConfigUpdate) String added in v0.27.0

func (c AccessConfigUpdate) String() string

String implements the Stringer interface.

func (*AccessConfigUpdate) Unmarshal added in v0.27.0

func (m *AccessConfigUpdate) Unmarshal(dAtA []byte) error

func (*AccessConfigUpdate) XXX_DiscardUnknown added in v0.27.0

func (m *AccessConfigUpdate) XXX_DiscardUnknown()

func (*AccessConfigUpdate) XXX_Marshal added in v0.27.0

func (m *AccessConfigUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessConfigUpdate) XXX_Merge added in v0.27.0

func (m *AccessConfigUpdate) XXX_Merge(src proto.Message)

func (*AccessConfigUpdate) XXX_Size added in v0.27.0

func (m *AccessConfigUpdate) XXX_Size() int

func (*AccessConfigUpdate) XXX_Unmarshal added in v0.27.0

func (m *AccessConfigUpdate) XXX_Unmarshal(b []byte) error

type AccessType

type AccessType int32

AccessType permission types

const (
	// AccessTypeUnspecified placeholder for empty value
	AccessTypeUnspecified AccessType = 0
	// AccessTypeNobody forbidden
	AccessTypeNobody AccessType = 1
	// AccessTypeEverybody unrestricted
	AccessTypeEverybody AccessType = 3
	// AccessTypeAnyOfAddresses allow any of the addresses
	AccessTypeAnyOfAddresses AccessType = 4
)

func (AccessType) EnumDescriptor

func (AccessType) EnumDescriptor() ([]byte, []int)

func (AccessType) IsSubset added in v0.29.0

func (a AccessType) IsSubset(superSet AccessType) bool

IsSubset will return true if the caller is the same as the superset, or if the caller is more restrictive than the superset.

func (*AccessType) MarshalJSONPB

func (a *AccessType) MarshalJSONPB(_ *jsonpb.Marshaler) ([]byte, error)

func (AccessType) MarshalText

func (a AccessType) MarshalText() ([]byte, error)

func (AccessType) String

func (a AccessType) String() string

func (*AccessType) UnmarshalJSONPB

func (a *AccessType) UnmarshalJSONPB(_ *jsonpb.Unmarshaler, data []byte) error

func (*AccessType) UnmarshalText

func (a *AccessType) UnmarshalText(text []byte) error

func (AccessType) With

func (a AccessType) With(addrs ...sdk.AccAddress) AccessConfig

type AccessTypeParam

type AccessTypeParam struct {
	Value AccessType `protobuf:"varint,1,opt,name=value,proto3,enum=cosmwasm.wasm.v1.AccessType" json:"value,omitempty" yaml:"value"`
}

AccessTypeParam

func (*AccessTypeParam) Descriptor

func (*AccessTypeParam) Descriptor() ([]byte, []int)

func (*AccessTypeParam) Equal

func (this *AccessTypeParam) Equal(that interface{}) bool

func (*AccessTypeParam) Marshal

func (m *AccessTypeParam) Marshal() (dAtA []byte, err error)

func (*AccessTypeParam) MarshalTo

func (m *AccessTypeParam) MarshalTo(dAtA []byte) (int, error)

func (*AccessTypeParam) MarshalToSizedBuffer

func (m *AccessTypeParam) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AccessTypeParam) ProtoMessage

func (*AccessTypeParam) ProtoMessage()

func (*AccessTypeParam) Reset

func (m *AccessTypeParam) Reset()

func (*AccessTypeParam) Size

func (m *AccessTypeParam) Size() (n int)

func (*AccessTypeParam) String

func (m *AccessTypeParam) String() string

func (*AccessTypeParam) Unmarshal

func (m *AccessTypeParam) Unmarshal(dAtA []byte) error

func (*AccessTypeParam) XXX_DiscardUnknown

func (m *AccessTypeParam) XXX_DiscardUnknown()

func (*AccessTypeParam) XXX_Marshal

func (m *AccessTypeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AccessTypeParam) XXX_Merge

func (m *AccessTypeParam) XXX_Merge(src proto.Message)

func (*AccessTypeParam) XXX_Size

func (m *AccessTypeParam) XXX_Size() int

func (*AccessTypeParam) XXX_Unmarshal

func (m *AccessTypeParam) XXX_Unmarshal(b []byte) error

type AccountKeeper

type AccountKeeper interface {
	// Return a new account with the next account number and the specified address. Does not save the new account to the store.
	NewAccountWithAddress(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
	// Retrieve an account from the store.
	GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI
	// Set an account in the store.
	SetAccount(ctx context.Context, acc sdk.AccountI)
}

AccountKeeper defines a subset of methods implemented by the cosmos-sdk account keeper

type AllowAllMessagesFilter added in v0.30.0

type AllowAllMessagesFilter struct{}

AllowAllMessagesFilter is a wildcard to allow any type of contract payload message. Since: wasmd 0.30

func NewAllowAllMessagesFilter added in v0.30.0

func NewAllowAllMessagesFilter() *AllowAllMessagesFilter

NewAllowAllMessagesFilter constructor

func (*AllowAllMessagesFilter) Accept added in v0.30.0

Accept accepts any valid json message content.

func (*AllowAllMessagesFilter) Descriptor added in v0.30.0

func (*AllowAllMessagesFilter) Descriptor() ([]byte, []int)

func (*AllowAllMessagesFilter) Marshal added in v0.30.0

func (m *AllowAllMessagesFilter) Marshal() (dAtA []byte, err error)

func (*AllowAllMessagesFilter) MarshalTo added in v0.30.0

func (m *AllowAllMessagesFilter) MarshalTo(dAtA []byte) (int, error)

func (*AllowAllMessagesFilter) MarshalToSizedBuffer added in v0.30.0

func (m *AllowAllMessagesFilter) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*AllowAllMessagesFilter) ProtoMessage added in v0.30.0

func (*AllowAllMessagesFilter) ProtoMessage()

func (*AllowAllMessagesFilter) Reset added in v0.30.0

func (m *AllowAllMessagesFilter) Reset()

func (*AllowAllMessagesFilter) Size added in v0.30.0

func (m *AllowAllMessagesFilter) Size() (n int)

func (*AllowAllMessagesFilter) String added in v0.30.0

func (m *AllowAllMessagesFilter) String() string

func (*AllowAllMessagesFilter) Unmarshal added in v0.30.0

func (m *AllowAllMessagesFilter) Unmarshal(dAtA []byte) error

func (AllowAllMessagesFilter) ValidateBasic added in v0.30.0

func (f AllowAllMessagesFilter) ValidateBasic() error

ValidateBasic returns always nil

func (*AllowAllMessagesFilter) XXX_DiscardUnknown added in v0.30.0

func (m *AllowAllMessagesFilter) XXX_DiscardUnknown()

func (*AllowAllMessagesFilter) XXX_Marshal added in v0.30.0

func (m *AllowAllMessagesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AllowAllMessagesFilter) XXX_Merge added in v0.30.0

func (m *AllowAllMessagesFilter) XXX_Merge(src proto.Message)

func (*AllowAllMessagesFilter) XXX_Size added in v0.30.0

func (m *AllowAllMessagesFilter) XXX_Size() int

func (*AllowAllMessagesFilter) XXX_Unmarshal added in v0.30.0

func (m *AllowAllMessagesFilter) XXX_Unmarshal(b []byte) error

type AuthorizationPolicy added in v0.41.0

type AuthorizationPolicy interface {
	CanCreateCode(chainConfigs ChainAccessConfigs, actor types.AccAddress, contractConfig AccessConfig) bool
	CanInstantiateContract(c AccessConfig, actor types.AccAddress) bool
	CanModifyContract(admin, actor types.AccAddress) bool
	CanModifyCodeAccessConfig(creator, actor types.AccAddress, isSubset bool) bool
	// SubMessageAuthorizationPolicy returns authorization policy to be used for submessages. Must never be nil
	SubMessageAuthorizationPolicy(entrypoint AuthorizationPolicyAction) AuthorizationPolicy
}

AuthorizationPolicy is an abstract authorization ruleset defined as an extension point that can be customized by chains

func SubMsgAuthzPolicy added in v0.41.0

func SubMsgAuthzPolicy(ctx context.Context) (AuthorizationPolicy, bool)

SubMsgAuthzPolicy reads the authorization policy for submessages from the context

type AuthorizationPolicyAction added in v0.41.0

type AuthorizationPolicyAction uint64
const (
	AuthZActionInstantiate AuthorizationPolicyAction
	AuthZActionMigrateContract
)

type AuthzableWasmMsg added in v0.30.0

type AuthzableWasmMsg interface {
	GetFunds() sdk.Coins
	GetMsg() RawContractMessage
	GetContract() string
	ValidateBasic() error
}

AuthzableWasmMsg is abstract wasm tx message that is supported in authz

type BankKeeper

type BankKeeper interface {
	BankViewKeeper
	Burner
	IsSendEnabledCoins(ctx context.Context, coins ...sdk.Coin) error
	BlockedAddr(addr sdk.AccAddress) bool
	SendCoins(ctx context.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error
}

BankKeeper defines a subset of methods implemented by the cosmos-sdk bank keeper

type BankViewKeeper

type BankViewKeeper interface {
	GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin
	GetSupply(ctx context.Context, denom string) sdk.Coin
	GetDenomMetaData(ctx context.Context, denom string) (banktypes.Metadata, bool)
	DenomsMetadata(ctx context.Context, req *banktypes.QueryDenomsMetadataRequest) (*banktypes.QueryDenomsMetadataResponse, error)
}

BankViewKeeper defines a subset of methods implemented by the cosmos-sdk bank keeper

type Burner

type Burner interface {
	BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}

Burner is a subset of the sdk bank keeper methods

type CapabilityKeeper

type CapabilityKeeper interface {
	GetCapability(ctx sdk.Context, name string) (*capabilitytypes.Capability, bool)
	ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
	AuthenticateCapability(ctx sdk.Context, capability *capabilitytypes.Capability, name string) bool
}

type ChainAccessConfigs added in v0.41.0

type ChainAccessConfigs struct {
	Upload      AccessConfig
	Instantiate AccessConfig
}

ChainAccessConfigs chain settings

func NewChainAccessConfigs added in v0.41.0

func NewChainAccessConfigs(upload, instantiate AccessConfig) ChainAccessConfigs

NewChainAccessConfigs constructor

type ChannelKeeper

type ChannelKeeper interface {
	GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool)
	GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)
	ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error
	GetAllChannels(ctx sdk.Context) (channels []channeltypes.IdentifiedChannel)
	SetChannel(ctx sdk.Context, portID, channelID string, channel channeltypes.Channel)
	GetAllChannelsWithPortPrefix(ctx sdk.Context, portPrefix string) []channeltypes.IdentifiedChannel
}

ChannelKeeper defines the expected IBC channel keeper

type ClearAdminProposal deprecated

type ClearAdminProposal struct {
	// Title is a short summary
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// Description is a human readable text
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Contract is the address of the smart contract
	Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"`
}

Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for an explicit ClearAdminProposal. To clear the admin of a contract, a simple MsgClearAdmin can be invoked from the x/gov module via a v1 governance proposal.

Deprecated: Do not use.

func (*ClearAdminProposal) Descriptor

func (*ClearAdminProposal) Descriptor() ([]byte, []int)

func (*ClearAdminProposal) Equal

func (this *ClearAdminProposal) Equal(that interface{}) bool

func (ClearAdminProposal) GetDescription

func (p ClearAdminProposal) GetDescription() string

GetDescription returns the human readable description of the proposal

func (*ClearAdminProposal) GetTitle

func (p *ClearAdminProposal) GetTitle() string

GetTitle returns the title of the proposal

func (*ClearAdminProposal) Marshal

func (m *ClearAdminProposal) Marshal() (dAtA []byte, err error)

func (*ClearAdminProposal) MarshalTo

func (m *ClearAdminProposal) MarshalTo(dAtA []byte) (int, error)

func (*ClearAdminProposal) MarshalToSizedBuffer

func (m *ClearAdminProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (ClearAdminProposal) ProposalRoute

func (p ClearAdminProposal) ProposalRoute() string

ProposalRoute returns the routing key of a parameter change proposal.

func (ClearAdminProposal) ProposalType

func (p ClearAdminProposal) ProposalType() string

ProposalType returns the type

func (*ClearAdminProposal) ProtoMessage

func (*ClearAdminProposal) ProtoMessage()

func (*ClearAdminProposal) Reset

func (m *ClearAdminProposal) Reset()

func (*ClearAdminProposal) Size

func (m *ClearAdminProposal) Size() (n int)

func (ClearAdminProposal) String

func (p ClearAdminProposal) String() string

String implements the Stringer interface.

func (*ClearAdminProposal) Unmarshal

func (m *ClearAdminProposal) Unmarshal(dAtA []byte) error

func (ClearAdminProposal) ValidateBasic

func (p ClearAdminProposal) ValidateBasic() error

ValidateBasic validates the proposal

func (*ClearAdminProposal) XXX_DiscardUnknown

func (m *ClearAdminProposal) XXX_DiscardUnknown()

func (*ClearAdminProposal) XXX_Marshal

func (m *ClearAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClearAdminProposal) XXX_Merge

func (m *ClearAdminProposal) XXX_Merge(src proto.